| OLD | NEW |
| (Empty) |
| 1 <!-- | |
| 2 Copyright 2014 The Chromium Authors. All rights reserved. | |
| 3 Use of this source code is governed by a BSD-style license that can be | |
| 4 found in the LICENSE file. | |
| 5 --> | |
| 6 | |
| 7 <link rel="import" href="../bower_components/paper-button/paper-button.html"> | |
| 8 <link rel="import" href="../model/tree-status.html"> | |
| 9 <link rel="import" href="ct-failure-stream.html"> | |
| 10 <link rel="import" href="ct-last-updated.html"> | |
| 11 <link rel="import" href="ct-party-time.html"> | |
| 12 <link rel="import" href="ct-tree-status.html"> | |
| 13 | |
| 14 <polymer-element name="ct-unexpected-failures" attributes="tree commitLog failur
es"> | |
| 15 <template> | |
| 16 <style> | |
| 17 ct-tree-status { | |
| 18 white-space: nowrap; | |
| 19 overflow: hidden; | |
| 20 text-overflow: ellipsis; | |
| 21 margin: 5px; | |
| 22 padding: 3px; | |
| 23 } | |
| 24 | |
| 25 ct-tree-status[state=open] { | |
| 26 margin: 0; | |
| 27 padding: 0; | |
| 28 } | |
| 29 | |
| 30 .toolbar { | |
| 31 display: flex; | |
| 32 justify-content: space-between; | |
| 33 align-items: baseline; | |
| 34 padding: 0 5px; | |
| 35 } | |
| 36 </style> | |
| 37 <div class="toolbar"> | |
| 38 <a href="https://code.google.com/p/chromium/wiki/UsefulURLs">Useful URLs</
a> | |
| 39 <a href="http://www.chromium.org/developers/tree-sheriffs/sheriff-details-
chromium">How to Sheriff</a> | |
| 40 </div> | |
| 41 <ct-tree-status status="{{ treeStatuses['chromium'] }}" state="{{ treeStatus
es['chromium'].status }}"></ct-tree-status> | |
| 42 <template if="{{ tree == 'blink' }}"> | |
| 43 <ct-tree-status status="{{ treeStatuses['blink'] }}" state="{{ treeStatuse
s['blink'].status }}"></ct-tree-status> | |
| 44 </template> | |
| 45 <template if="{{ failures && failures.failures && (!failures.failures[tree]
|| !failures.failures[tree].length) }}"> | |
| 46 <ct-party-time></ct-party-time> | |
| 47 </template> | |
| 48 <ct-failure-stream title="Tree closers" category="treecloser" groups="{{ fai
lures && failures.failures[tree] }}" commitLog="{{ commitLog }}"></ct-failure-st
ream> | |
| 49 <ct-failure-stream title="Probably-hung bots" category="builder" groups="{{
failures && failures.failures[tree] }}" commitLog="{{ commitLog }}"></ct-failure
-stream> | |
| 50 <ct-failure-stream title="Reliable failures" category="default" groups="{{ f
ailures && failures.failures[tree] }}" commitLog="{{ commitLog }}"></ct-failure-
stream> | |
| 51 <ct-failure-stream title="Failures that have only happened once (on one bot)
" category="failedOnce" groups="{{ failures && failures.failures[tree] }}" commi
tLog="{{ commitLog }}"></ct-failure-stream> | |
| 52 <ct-failure-stream title="Snoozed failures" category="snoozed" groups="{{ fa
ilures && failures.failures[tree] }}" commitLog="{{ commitLog }}"></ct-failure-s
tream> | |
| 53 </template> | |
| 54 <script> | |
| 55 (function() { | |
| 56 Polymer({ | |
| 57 tree: '', | |
| 58 | |
| 59 created: function() { | |
| 60 this.treeStatuses = {}; | |
| 61 var projects = ['chromium', 'blink']; | |
| 62 for (var i = 0; i < projects.length; i++) { | |
| 63 this.treeStatuses[projects[i]] = new TreeStatus(projects[i]); | |
| 64 } | |
| 65 }, | |
| 66 | |
| 67 attached: function() { | |
| 68 this.update(); | |
| 69 }, | |
| 70 | |
| 71 update: function() { | |
| 72 // FIXME: These shouldn't update if there's already an update in progres
s. | |
| 73 Object.keys(this.treeStatuses, function(tree, status) { | |
| 74 status.update(); | |
| 75 }); | |
| 76 }, | |
| 77 }); | |
| 78 })(); | |
| 79 </script> | |
| 80 </polymer-element> | |
| OLD | NEW |