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

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: Changed logic to just check the tree. 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
« no previous file with comments | « no previous file | go/src/infra/appengine/sheriff-o-matic/elements/som-app.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 .file-bug-icon, 47 .file-bug-icon,
48 .snooze-icon { 48 .snooze-icon {
49 color: #aaa; 49 color: #aaa;
50 } 50 }
51 .snoozed { 51 .snoozed {
52 opacity: 0.5; 52 opacity: 0.5;
53 } 53 }
54 #root { 54 #root {
55 transition: opacity .25s; 55 transition: opacity .25s;
56 } 56 }
57 #bugsList { 57 #bugsList,
58 #handleLink {
58 margin-left: 15px; 59 margin-left: 15px;
59 } 60 }
60 hr { 61 hr {
61 width: 100%; 62 width: 100%;
62 background-color: #000; 63 background-color: #000;
63 } 64 }
64 .divider { 65 .divider {
65 width: 20px; 66 width: 20px;
66 } 67 }
67 </style> 68 </style>
68 <div id="root" class$="[[_cssClass]]"> 69 <div id="root" class$="[[_cssClass]]">
69 <div class$="[[_classForAlert(alert, selected)]]"> 70 <div class$="[[_classForAlert(alert, selected)]]">
70 <div class="list-item"> 71 <div class="list-item">
71 <div class="alert-title-bar horizontal layout justified"> 72 <div class="alert-title-bar horizontal layout justified">
72 <div class="horizontal layout"> 73 <div class="horizontal layout">
73 <div class="alert-title self-center">[[alert.title]]</div> 74 <div class="alert-title self-center">[[alert.title]] </div>
75 <div id="handleLink" class="self-center" hidden$="[[!_helpLinkForA lert(alert)]]">
76 [<a href="[[_helpLinkForAlert(alert)]]">Help</a>]
77 </div>
74 <div id="bugsList" hidden$="[[!_hasBugs]]" class="alert-links"> 78 <div id="bugsList" hidden$="[[!_hasBugs]]" class="alert-links">
75 <template is="dom-repeat" items="[[annotation.bugs]]" as="bug"> 79 <template is="dom-repeat" items="[[annotation.bugs]]" as="bug">
76 <a target="_blank" href$="[[bug]]">[[_bugLabel(bug)]]</a> 80 <a target="_blank" href$="[[bug]]">[[_bugLabel(bug)]]</a>
77 <paper-button id="remove[[index]]" on-tap="_removeBug" raised> Remove</paper-button> 81 <paper-button id="remove[[index]]" on-tap="_removeBug" raised> Remove</paper-button>
78 </template> 82 </template>
79 </div> 83 </div>
80 </div> 84 </div>
81 <div class="alert-times"> 85 <div class="alert-times">
82 [[_duration]] 86 [[_duration]]
83 </div> 87 </div>
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 let deltaSec = Math.round((alert.time - alert.start_time)); 186 let deltaSec = Math.round((alert.time - alert.start_time));
183 let hours = Math.floor(deltaSec/60/60); 187 let hours = Math.floor(deltaSec/60/60);
184 let minutes = Math.floor((deltaSec - hours*60*60)/60); 188 let minutes = Math.floor((deltaSec - hours*60*60)/60);
185 let seconds = deltaSec - hours * 60*60 - minutes*60; 189 let seconds = deltaSec - hours * 60*60 - minutes*60;
186 if (hours == 0 && minutes == 0 && seconds == 0) { 190 if (hours == 0 && minutes == 0 && seconds == 0) {
187 return ''; 191 return '';
188 } 192 }
189 return `Active for: ${hours}h ${minutes}m ${seconds}s`; 193 return `Active for: ${hours}h ${minutes}m ${seconds}s`;
190 }, 194 },
191 195
196 _helpLinkForAlert: function(alert) {
197 // TODO(zhangtiff): Add documentation links for other kinds of alerts
198 if (this._alertIsWebkit(alert)) {
199 return "http://www.chromium.org/blink/sheriffing";
200 }
201 return null;
202 },
203
204 _alertIsWebkit(alert) {
205 // TODO(zhangtiff): Find a better way to categorize alerts
206 return alert.key.includes("chromium.webkit");
207 },
208
192 _classForAlert: function(alert, selected) { 209 _classForAlert: function(alert, selected) {
193 return 'alert' + (selected ? ' selected' : ''); 210 return 'alert' + (selected ? ' selected' : '');
194 }, 211 },
195 212
196 _computeHasBugs: function(bugs) { 213 _computeHasBugs: function(bugs) {
197 return !!(bugs && bugs.length > 0); 214 return !!(bugs && bugs.length > 0);
198 }, 215 },
199 216
200 _computeSnoozeText: function(snoozed) { 217 _computeSnoozeText: function(snoozed) {
201 return snoozed ? 'Unsnooze' : 'Snooze'; 218 return snoozed ? 'Unsnooze' : 'Snooze';
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 change: {'snoozeTime': true}, 257 change: {'snoozeTime': true},
241 }); 258 });
242 } else { 259 } else {
243 this.fire('snooze'); 260 this.fire('snooze');
244 } 261 }
245 }, 262 },
246 }); 263 });
247 })(); 264 })();
248 </script> 265 </script>
249 </dom-module> 266 </dom-module>
OLDNEW
« no previous file with comments | « no previous file | go/src/infra/appengine/sheriff-o-matic/elements/som-app.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698