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

Side by Side Diff: go/src/infra/appengine/sheriff-o-matic/elements/som-alert-item.html

Issue 2081383004: SoM: Added notice about chromium webkit failures + documentation links. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 <link rel="import" href="/bower_components/polymer/polymer.html"> 1 <link rel="import" href="/bower_components/polymer/polymer.html">
2 2
3 <link rel="import" href="/bower_components/iron-icon/iron-icon.html"> 3 <link rel="import" href="/bower_components/iron-icon/iron-icon.html">
4 <link rel="import" href="/bower_components/iron-icons/iron-icons.html"> 4 <link rel="import" href="/bower_components/iron-icons/iron-icons.html">
5 <link rel="import" href="/bower_components/paper-button/paper-button.html"> 5 <link rel="import" href="/bower_components/paper-button/paper-button.html">
6 <link rel="import" href="/bower_components/paper-icon-button/paper-icon-button.h tml"> 6 <link rel="import" href="/bower_components/paper-icon-button/paper-icon-button.h tml">
7 <link rel="import" href="/elements/som-extension-build-failure.html"> 7 <link rel="import" href="/elements/som-extension-build-failure.html">
8 <link rel="import" href="/elements/som-uberify-behavior.html"> 8 <link rel="import" href="/elements/som-uberify-behavior.html">
9 9
10 <dom-module id="som-alert-item"> 10 <dom-module id="som-alert-item">
(...skipping 29 matching lines...) Expand all
40 .file-bug-icon, 40 .file-bug-icon,
41 .snooze-icon { 41 .snooze-icon {
42 color: #aaa; 42 color: #aaa;
43 } 43 }
44 .snoozed { 44 .snoozed {
45 opacity: 0.5; 45 opacity: 0.5;
46 } 46 }
47 #root { 47 #root {
48 transition: opacity .25s; 48 transition: opacity .25s;
49 } 49 }
50 #bugsList { 50 #bugsList,
51 #handleLink {
51 margin-left: 15px; 52 margin-left: 15px;
52 } 53 }
53 hr { 54 hr {
54 width: 100%; 55 width: 100%;
55 background-color: #000; 56 background-color: #000;
56 } 57 }
57 .divider { 58 .divider {
58 width: 20px; 59 width: 20px;
59 } 60 }
60 </style> 61 </style>
61 <div id="root" class$="[[_cssClass]]"> 62 <div id="root" class$="[[_cssClass]]">
62 <div class$="[[_classForAlert(alert, selected)]]"> 63 <div class$="[[_classForAlert(alert, selected)]]">
63 <div class="list-item"> 64 <div class="list-item">
64 <div class="alert-title-bar horizontal layout justified"> 65 <div class="alert-title-bar horizontal layout justified">
65 <div class="horizontal layout"> 66 <div class="horizontal layout">
66 <div class="alert-title self-center">[[alert.title]]</div> 67 <div class="alert-title self-center">[[alert.title]] </div>
68 <div id="handleLink" class="self-center" hidden$="[[!_helpLinkForA lert(alert)]]">
69 [<a href="[[_helpLinkForAlert(alert)]]">Help</a>]
70 </div>
67 <div id="bugsList" hidden$="[[!_hasBugs]]" class="alert-links"> 71 <div id="bugsList" hidden$="[[!_hasBugs]]" class="alert-links">
68 <template is="dom-repeat" items="[[annotation.bugs]]" as="bug"> 72 <template is="dom-repeat" items="[[annotation.bugs]]" as="bug">
69 <a target="_blank" href$="[[bug]]">[[_bugLabel(bug)]]</a> 73 <a target="_blank" href$="[[bug]]">[[_bugLabel(bug)]]</a>
70 <paper-button id="remove[[index]]" on-tap="_removeBug" raised> Remove</paper-button> 74 <paper-button id="remove[[index]]" on-tap="_removeBug" raised> Remove</paper-button>
71 </template> 75 </template>
72 </div> 76 </div>
73 </div> 77 </div>
74 <div class="alert-times"> 78 <div class="alert-times">
75 [[_duration]] 79 [[_duration]]
76 </div> 80 </div>
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 let deltaSec = Math.round((alert.time - alert.start_time)); 179 let deltaSec = Math.round((alert.time - alert.start_time));
176 let hours = Math.floor(deltaSec/60/60); 180 let hours = Math.floor(deltaSec/60/60);
177 let minutes = Math.floor((deltaSec - hours*60*60)/60); 181 let minutes = Math.floor((deltaSec - hours*60*60)/60);
178 let seconds = deltaSec - hours * 60*60 - minutes*60; 182 let seconds = deltaSec - hours * 60*60 - minutes*60;
179 if (hours == 0 && minutes == 0 && seconds == 0) { 183 if (hours == 0 && minutes == 0 && seconds == 0) {
180 return ''; 184 return '';
181 } 185 }
182 return `Active for: ${hours}h ${minutes}m ${seconds}s`; 186 return `Active for: ${hours}h ${minutes}m ${seconds}s`;
183 }, 187 },
184 188
189 _helpLinkForAlert: function(alert) {
190 // TODO: Add documentation links for other kinds of alerts
191 if (this._alertIsWebkit(alert)) {
192 return "http://www.chromium.org/blink/sheriffing";
193 }
194 return null;
195 },
196
197 _alertIsWebkit(alert) {
198 // TODO: Find a better way to categorize alerts
martiniss 2016/06/23 01:20:25 Usually, with TODOs, you do something like TODO(zh
199 return alert.key.indexOf("chromium.webkit") > -1;
martiniss 2016/06/23 01:20:25 I believe there's an array.include you can use.
Tiff 2016/06/23 17:24:57 alert.key is a string so I don't think that'd work
seanmccullough1 2016/06/23 17:36:41 There is an includes() on String too :) https://de
Tiff 2016/06/23 18:46:58 Ahh, you're right! Submitted another patch for thi
200 },
201
185 _classForAlert: function(alert, selected) { 202 _classForAlert: function(alert, selected) {
186 return 'alert' + (selected ? ' selected' : ''); 203 return 'alert' + (selected ? ' selected' : '');
187 }, 204 },
188 205
189 _computeHasBugs: function(bugs) { 206 _computeHasBugs: function(bugs) {
190 return !!(bugs && bugs.length > 0); 207 return !!(bugs && bugs.length > 0);
191 }, 208 },
192 209
193 _computeSnoozeText: function(snoozed) { 210 _computeSnoozeText: function(snoozed) {
194 return snoozed ? 'Unsnooze' : 'Snooze'; 211 return snoozed ? 'Unsnooze' : 'Snooze';
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 change: {'snoozeTime': true}, 250 change: {'snoozeTime': true},
234 }); 251 });
235 } else { 252 } else {
236 this.fire('snooze'); 253 this.fire('snooze');
237 } 254 }
238 }, 255 },
239 }); 256 });
240 })(); 257 })();
241 </script> 258 </script>
242 </dom-module> 259 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698