Chromium Code Reviews| Index: go/src/infra/appengine/sheriff-o-matic/elements/som-alert-item.html |
| diff --git a/go/src/infra/appengine/sheriff-o-matic/elements/som-alert-item.html b/go/src/infra/appengine/sheriff-o-matic/elements/som-alert-item.html |
| index fd286d996e71f8349bf7fb768ed86bd13d2bfd72..72e1933e7ed8ec490a96a375e2c27e325e5e45e6 100644 |
| --- a/go/src/infra/appengine/sheriff-o-matic/elements/som-alert-item.html |
| +++ b/go/src/infra/appengine/sheriff-o-matic/elements/som-alert-item.html |
| @@ -47,7 +47,8 @@ |
| #root { |
| transition: opacity .25s; |
| } |
| - #bugsList { |
| + #bugsList, |
| + #handleLink { |
| margin-left: 15px; |
| } |
| hr { |
| @@ -63,7 +64,10 @@ |
| <div class="list-item"> |
| <div class="alert-title-bar horizontal layout justified"> |
| <div class="horizontal layout"> |
| - <div class="alert-title self-center">[[alert.title]]</div> |
| + <div class="alert-title self-center">[[alert.title]] </div> |
| + <div id="handleLink" class="self-center" hidden$="[[!_helpLinkForAlert(alert)]]"> |
| + [<a href="[[_helpLinkForAlert(alert)]]">Help</a>] |
| + </div> |
| <div id="bugsList" hidden$="[[!_hasBugs]]" class="alert-links"> |
| <template is="dom-repeat" items="[[annotation.bugs]]" as="bug"> |
| <a target="_blank" href$="[[bug]]">[[_bugLabel(bug)]]</a> |
| @@ -182,6 +186,19 @@ |
| return `Active for: ${hours}h ${minutes}m ${seconds}s`; |
| }, |
| + _helpLinkForAlert: function(alert) { |
| + // TODO: Add documentation links for other kinds of alerts |
| + if (this._alertIsWebkit(alert)) { |
| + return "http://www.chromium.org/blink/sheriffing"; |
| + } |
| + return null; |
| + }, |
| + |
| + _alertIsWebkit(alert) { |
| + // TODO: Find a better way to categorize alerts |
|
martiniss
2016/06/23 01:20:25
Usually, with TODOs, you do something like TODO(zh
|
| + 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
|
| + }, |
| + |
| _classForAlert: function(alert, selected) { |
| return 'alert' + (selected ? ' selected' : ''); |
| }, |