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

Unified Diff: go/src/infra/appengine/sheriff-o-matic/elements/som-app.html

Issue 2089493002: SOM: Fix key bug (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Changed _keyForAlert() to just alert.key 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: go/src/infra/appengine/sheriff-o-matic/elements/som-app.html
diff --git a/go/src/infra/appengine/sheriff-o-matic/elements/som-app.html b/go/src/infra/appengine/sheriff-o-matic/elements/som-app.html
index cc0dbb39ccbefa106e0baf2d738860af737ef73e..86353b255f750706fbebd6b139e5e59ce859bbf2 100644
--- a/go/src/infra/appengine/sheriff-o-matic/elements/som-app.html
+++ b/go/src/infra/appengine/sheriff-o-matic/elements/som-app.html
@@ -454,7 +454,7 @@
},
_computeAnnotation: function(annotations, alert) {
- let key = this._keyForAlert(alert);
+ let key = alert.key;
let ann = annotations[key];
return {
@@ -466,7 +466,7 @@
_handleAnnotation: function(evt) {
this._sendAnnotation(
- this._keyForAlert(evt.model.alert), evt.detail.type,
+ evt.model.alert.key, evt.detail.type,
evt.detail.change);
},
@@ -487,18 +487,6 @@
this.$.annotationPost.generateRequest();
},
- _keyForAlert: function(alert) {
- if (alert.extension && alert.extension.reasons &&
- alert.extension.builders) {
- return alert.extension.reasons.map(function(reason) {
- return reason.step;
- }).concat(alert.extension.builders.map(function(builder) {
- return builder.name;
- })).join('::');
- }
- return null;
- },
-
////////////////////// Bugs ///////////////////////////
_handleLinkBug: function(evt) {
@@ -518,7 +506,7 @@
_saveBug: function() {
this._sendAnnotation(
- this._keyForAlert(this._bugModel), 'add', {
+ this._bugModel.key, 'add', {
bugs: [this.$.bug.value]
});
},
@@ -537,7 +525,7 @@
_snooze: function() {
this._sendAnnotation(
- this._keyForAlert(this._snoozeModel), 'add', {
+ this._snoozeModel.key, 'add', {
snoozeTime: Date.now() + ONE_MIN_MS * this.$.snoozeTime.value
});
},
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698