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

Side by Side Diff: appengine/sheriff_o_matic/ui/ct-unexpected-failures.html

Issue 1315693002: SoM: upgrade Polymer from 0.5 to 1.0 Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: get bower_components from polymer_1.0.4 Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 <!-- 1 <!--
2 Copyright 2014 The Chromium Authors. All rights reserved. 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 3 Use of this source code is governed by a BSD-style license that can be
4 found in the LICENSE file. 4 found in the LICENSE file.
5 --> 5 --><html><head><link rel="import" href="../bower_components/paper-button/paper-b utton.html">
6 6 <link rel="import" href="../bower_components/paper-material/paper-material.html" >
7 <link rel="import" href="../bower_components/paper-button/paper-button.html">
8 <link rel="import" href="../bower_components/paper-shadow/paper-shadow.html">
9 <link rel="import" href="../model/tree-status.html"> 7 <link rel="import" href="../model/tree-status.html">
10 <link rel="import" href="ct-alerts.html"> 8 <link rel="import" href="ct-alerts.html">
11 <link rel="import" href="ct-failure-stream.html"> 9 <link rel="import" href="ct-failure-stream.html">
12 <link rel="import" href="ct-last-updated.html"> 10 <link rel="import" href="ct-last-updated.html">
13 <link rel="import" href="ct-party-time.html"> 11 <link rel="import" href="ct-party-time.html">
14 <link rel="import" href="ct-time-series.html"> 12 <link rel="import" href="ct-time-series.html">
15 <link rel="import" href="ct-tree-status.html"> 13 <link rel="import" href="ct-tree-status.html">
16 14
17 <polymer-element name="ct-unexpected-failures" attributes="tree repositories fai lures"> 15 <dom-module id="ct-unexpected-failures">
18 <template> 16 <style>
19 <style>
20 .toolbar { 17 .toolbar {
21 display: flex; 18 display: flex;
22 justify-content: space-between; 19 justify-content: space-between;
23 align-items: baseline; 20 align-items: baseline;
24 padding: 0 5px; 21 padding: 0 5px;
25 } 22 }
26 paper-shadow { 23 paper-shadow {
27 margin: 1em; 24 margin: 1em;
28 padding: 1em; 25 padding: 1em;
29 font-size: large; 26 font-size: large;
30 font-weight: bold; 27 font-weight: bold;
31 background: white; 28 background: white;
32 text-align: center; 29 text-align: center;
33 } 30 }
34 </style> 31 </style>
32 <template>
35 <ct-tree-status status="{{ treeStatuses['chromium'] }}" state="{{ treeStatus es['chromium'].status }}"></ct-tree-status> 33 <ct-tree-status status="{{ treeStatuses['chromium'] }}" state="{{ treeStatus es['chromium'].status }}"></ct-tree-status>
36 <template if="{{ tree == 'blink' }}"> 34 <template is="dom-if" if="{{computeIf(tree)}}">
37 <ct-tree-status status="{{ treeStatuses['blink'] }}" state="{{ treeStatuse s['blink'].status }}"></ct-tree-status> 35 <ct-tree-status status="{{ treeStatuses['blink'] }}" state="{{ treeStatuse s['blink'].status }}"></ct-tree-status>
38 </template> 36 </template>
39 <template if="{{ tree == 'trooper' }}"> 37 <template is="dom-if" if="{{computeIf2(tree)}}">
40 <ct-tree-status status="{{ treeStatuses['infra'] }}" state="{{ treeStatuse s['infra'].status }}"></ct-tree-status> 38 <ct-tree-status status="{{ treeStatuses['infra'] }}" state="{{ treeStatuse s['infra'].status }}"></ct-tree-status>
41 <paper-shadow z="1"> 39 <paper-material elevation="1">
42 <div class="trooper-bugs"> 40 <div class="trooper-bugs">
43 <a href="https://code.google.com/p/chromium/issues/list?can=2&q=Infra% 3DTroopers"> 41 <a href="https://code.google.com/p/chromium/issues/list?can=2&amp;q=In fra%3DTroopers">
44 Current Trooper bug list 42 Current Trooper bug list
45 </a> 43 </a>
46 </div> 44 </div>
47 </paper-shadow> 45 </paper-material>
48 </template> 46 </template>
49 <template if="{{ tree == 'time-series-alerts' }}"> 47 <template is="dom-if" if="{{computeIf3(tree)}}">
50 <ct-time-series> 48 <ct-time-series>
51 </ct-time-series> 49 </ct-time-series>
52 </template> 50 </template>
53 <template if="{{ tree != 'time-series-alerts' && (!failures.failures[tree] | | failures.failures[tree].length == 0) }}"> 51 <template is="dom-if" if="{{computeIf4(failures, tree)}}">
54 <ct-party-time></ct-party-time> 52 <ct-party-time></ct-party-time>
55 </template> 53 </template>
56 <ct-failure-stream caption="Tree closers" category="treeCloser" groups="{{ f ailures && failures.failures[tree] }}" repositories="{{ repositories }}"></ct-fa ilure-stream> 54 <ct-failure-stream caption="Tree closers" category="treeCloser" groups="{{co mputeGroups(failures, tree)}}" repositories="{{computeGroups(failures, tree)}}"> </ct-failure-stream>
57 <ct-failure-stream caption="Probably-hung bots" category="builder" groups="{ { failures && failures.failures[tree] }}" repositories="{{ repositories }}"></ct -failure-stream> 55 <ct-failure-stream caption="Probably-hung bots" category="builder" groups="{ {computeGroups(failures, tree)}}" repositories="{{computeGroups(failures, tree)} }"></ct-failure-stream>
58 <ct-failure-stream caption="Reliable failures" category="default" groups="{{ failures && failures.failures[tree] }}" repositories="{{ repositories }}"></ct- failure-stream> 56 <ct-failure-stream caption="Reliable failures" category="default" groups="{{ computeGroups(failures, tree)}}" repositories="{{computeGroups(failures, tree)}} "></ct-failure-stream>
59 <ct-failure-stream caption="Failures that have only happened once (on one bo t)" category="failedOnce" groups="{{ failures && failures.failures[tree] }}" rep ositories="{{ repositories }}"></ct-failure-stream> 57 <ct-failure-stream caption="Failures that have only happened once (on one bo t)" category="failedOnce" groups="{{computeGroups(failures, tree)}}" repositorie s="{{computeGroups(failures, tree)}}"></ct-failure-stream>
60 <ct-failure-stream caption="Snoozed failures" category="snoozed" groups="{{ failures && failures.failures[tree] }}" repositories="{{ repositories }}"></ct-f ailure-stream> 58 <ct-failure-stream caption="Snoozed failures" category="snoozed" groups="{{c omputeGroups(failures, tree)}}" repositories="{{ repositories }}"></ct-failure-s tream>
61 </template> 59 </template>
62 <script> 60 <script>
63 (function() { 61 (function () {
64 Polymer({ 62 Polymer({
65 tree: '', 63 is: 'ct-unexpected-failures',
66 64 properties: {
67 created: function() { 65 failures: { notify: true },
68 this.treeStatuses = {}; 66 repositories: { notify: true },
69 var projects = ['chromium', 'blink', 'infra']; 67 tree: {
70 for (var i = 0; i < projects.length; i++) { 68 type: String,
71 this.treeStatuses[projects[i]] = new TreeStatus(projects[i]); 69 value: '',
70 notify: true
71 }
72 },
73 created: function () {
74 this.treeStatuses = {};
75 var projects = [
76 'chromium',
77 'blink',
78 'infra'
79 ];
80 for (var i = 0; i < projects.length; i++) {
81 this.treeStatuses[projects[i]] = new TreeStatus(projects[i]);
82 }
83 },
84 attached: function () {
85 this.update();
86 },
87 update: function () {
88 // FIXME: These shouldn't update if there's already an update in progr ess.
89 // This causes noticeable jank becuse <tree-status>.update makes an xh r
90 // for current?format=json every time you nav from one tree to another .
91 Object.keys(this.treeStatuses, function (tree, status) {
92 status.update();
93 });
94 },
95 computeIf: function (tree) {
96 return tree == 'blink';
97 },
98 computeIf2: function (tree) {
99 return tree == 'trooper';
100 },
101 computeIf3: function (tree) {
102 return tree == 'time-series-alerts';
103 },
104 computeIf4: function (failures, tree) {
105 return tree != 'time-series-alerts' && (!failures.failures[tree] || fa ilures.failures[tree].length == 0);
106 },
107 computeGroups: function (failures, tree) {
108 return failures && failures.failures[tree];
72 } 109 }
73 }, 110 });
74 111 }());
75 attached: function() {
76 this.update();
77 },
78
79 update: function() {
80 // FIXME: These shouldn't update if there's already an update in progres s.
81 // This causes noticeable jank becuse <tree-status>.update makes an xhr
82 // for current?format=json every time you nav from one tree to another.
83 Object.keys(this.treeStatuses, function(tree, status) {
84 status.update();
85 });
86 },
87 });
88 })();
89 </script> 112 </script>
90 </polymer-element> 113 </dom-module>
OLDNEW
« no previous file with comments | « appengine/sheriff_o_matic/ui/ct-trooper-card.html ('k') | appengine/sheriff_o_matic/ui/ct-user-prefs.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698