Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(452)

Unified Diff: go/src/infra/appengine/sheriff-o-matic/elements/som-bug-queue.html

Issue 2053893002: [som] Add bug queue UI. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: refresh Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: go/src/infra/appengine/sheriff-o-matic/elements/som-bug-queue.html
diff --git a/go/src/infra/appengine/sheriff-o-matic/elements/som-bug-queue.html b/go/src/infra/appengine/sheriff-o-matic/elements/som-bug-queue.html
new file mode 100644
index 0000000000000000000000000000000000000000..35731339c97c35ac96dc17e73913e193be315356
--- /dev/null
+++ b/go/src/infra/appengine/sheriff-o-matic/elements/som-bug-queue.html
@@ -0,0 +1,88 @@
+<link rel="import" href="/bower_components/polymer/polymer.html">
+
+<link rel="import" href="/bower_components/iron-ajax/iron-ajax.html">
+
+<dom-module id="som-bug-queue">
+ <template>
+ <style>
+ #main {
+ padding: 1em;
+ background: white;
+ }
+ #error {
+ padding: 1em;
+ color: red;
+ }
+ h2 {
+ font-size: 18px;
+ font-weight: bold;
+ }
+ .bug {
+ padding: 0.5em;
+ border-bottom: 1px solid #ddd;
+ }
+ .summary {
+ font-weight: bold;
+ }
+ </style>
+ <iron-ajax
+ auto
+ id="bugQueueAjax"
+ url="/api/v1/bugqueue/[[alertsGroup]]"
+ handle-as="json"
+ last-error="{{_bugQueueJsonError}}"
+ last-response="{{_bugQueueJson}}"
+ debounce-duration="300"></iron-ajax>
+ <div id="main" hidden$="[[_haveNoBugs(_bugQueueJson)]]">
+ <h2>Bug Queue (<a href="https://sites.google.com/a/chromium.org/dev/developers/tree-sheriffs/sheriffing-bug-queues">What to do with this?</a>):</h2>
+ <template is="dom-repeat" items="[[_bugQueueJson.items]]" as="item">
+ <div class="bug">
+ <div class="summary">[[item.summary]]</div>
+ <a href="http://crbug.com/[[item.id]]">Bug [[item.id]]</a> ([[item.status]])
+ </div>
+ </template>
+ </div>
+ <div id="error" hidden$="[[_haveNoErrors(_bugQueueJsonError)]]">
+ Error fetching bug queue: [[_bugQueueJsonError.error]]
+ </div>
+ </template>
+ <script>
+ (function() {
+ 'use strict';
+
+ Polymer({
+ is: 'som-bug-queue',
+
+ properties: {
+ alertsGroup: {
+ type: String,
+ },
+ _bugQueueJson: {
+ type: Object,
+ value: null,
+ },
+ _bugQueueJsonError: {
+ type: Object,
+ value: null,
+ },
+ },
+
+ refresh: function() {
+ this.$.bugQueueAjax.generateRequest();
+ },
+
+ _haveNoBugs: function(json) {
+ if (!json || !json.items) {
+ return true
+ }
+
+ return json.items.length == 0;
+ },
+
+ _haveNoErrors: function(error) {
+ return !error;
+ },
+ });
+ })();
+ </script>
+</dom-module>
« no previous file with comments | « go/src/infra/appengine/sheriff-o-matic/elements/som-app.html ('k') | go/src/infra/appengine/sheriff-o-matic/test/index.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698