Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <link rel="import" href="/bower_components/polymer/polymer.html"> | |
| 2 | |
| 3 <link rel="import" href="/bower_components/iron-ajax/iron-ajax.html"> | |
| 4 | |
| 5 <dom-module id="som-bug-queue"> | |
| 6 <template> | |
| 7 <style> | |
| 8 #main { | |
| 9 padding: 1em; | |
| 10 background: white; | |
| 11 } | |
| 12 #error { | |
| 13 padding: 1em; | |
| 14 color: red; | |
| 15 } | |
| 16 h2 { | |
| 17 font-size: 18px; | |
| 18 font-weight: bold; | |
| 19 } | |
| 20 .bug { | |
| 21 padding: 0.5em; | |
| 22 border-bottom: 1px solid #ddd; | |
| 23 } | |
| 24 .summary { | |
| 25 font-weight: bold; | |
| 26 } | |
| 27 </style> | |
| 28 <iron-ajax | |
|
martiniss
2016/06/10 21:11:28
Can you make this able to be refresh? The refresh
seanmccullough1
2016/06/10 21:23:27
added a refresh() method. Is that what you mean?
| |
| 29 auto | |
| 30 id="bugQueueAjax" | |
| 31 url="/api/v1/bugqueue/[[alertsGroup]]" | |
| 32 handle-as="json" | |
| 33 last-error="{{_bugQueueJsonError}}" | |
| 34 last-response="{{_bugQueueJson}}" | |
| 35 debounce-duration="300"></iron-ajax> | |
| 36 <div id="main" hidden$="[[_haveNoBugs(_bugQueueJson)]]"> | |
| 37 <h2>Bug Queue (<a href="https://sites.google.com/a/chromium.org/dev/develo pers/tree-sheriffs/sheriffing-bug-queues">What to do with this?</a>):</h2> | |
| 38 <template is="dom-repeat" items="[[_bugQueueJson.items]]" as="item"> | |
| 39 <div class="bug"> | |
| 40 <div class="summary">[[item.summary]]</div> | |
| 41 <a href="http://crbug.com/[[item.id]]">http://crbug.com/[[item.id]]</a > ([[item.status]]) | |
|
martiniss
2016/06/10 21:11:28
Maybe have the link text be 'Bug 123123'? That's s
seanmccullough1
2016/06/10 21:23:27
Done.
| |
| 42 </div> | |
| 43 </template> | |
| 44 </div> | |
| 45 <div id="error" hidden$="[[_haveNoErrors(_bugQueueJsonError)]]"> | |
| 46 Error fetching bug queue: [[_bugQueueJsonError.error]] | |
| 47 </div> | |
| 48 </template> | |
| 49 <script> | |
| 50 (function() { | |
| 51 'use strict'; | |
| 52 | |
| 53 Polymer({ | |
| 54 is: 'som-bug-queue', | |
| 55 | |
| 56 properties: { | |
| 57 alertsGroup: { | |
| 58 type: String, | |
| 59 }, | |
| 60 _bugQueueJson: { | |
| 61 type: Object, | |
| 62 value: null, | |
| 63 }, | |
| 64 _bugQueueJsonError: { | |
| 65 type: Object, | |
| 66 value: null, | |
| 67 }, | |
| 68 }, | |
| 69 | |
| 70 _haveNoBugs: function(json) { | |
| 71 if (!json || !json.items) { | |
| 72 return true | |
| 73 } | |
| 74 | |
| 75 return json.items.length == 0; | |
| 76 }, | |
| 77 | |
| 78 _haveNoErrors: function(error) { | |
| 79 return !error; | |
| 80 }, | |
| 81 }); | |
| 82 })(); | |
| 83 </script> | |
| 84 </dom-module> | |
| OLD | NEW |