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

Unified Diff: Tools/GardeningServer/model/ct-failure-group.html

Issue 476903003: Add a "Link Bug" button to associate a bug with a failure (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebasd Created 6 years, 4 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 | Tools/GardeningServer/model/test/ct-failure-group-tests.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/GardeningServer/model/ct-failure-group.html
diff --git a/Tools/GardeningServer/model/ct-failure-group.html b/Tools/GardeningServer/model/ct-failure-group.html
index bf6b63e8f2b38fe3e067e6b75fbafffcac6e652d..819e9145f36fb0adaf75a346ca7b853a4bd35e2b 100644
--- a/Tools/GardeningServer/model/ct-failure-group.html
+++ b/Tools/GardeningServer/model/ct-failure-group.html
@@ -10,7 +10,7 @@ found in the LICENSE file.
function CTFailureGroup(key, failures, annotation) {
this.key = key;
this.failures = failures;
- this.annotation = annotation || {};
+ this._annotation = annotation || {};
this._computeProperties();
}
@@ -30,14 +30,28 @@ CTFailureGroup.prototype.commitList = function(commits) {
return new CTCommitList(this, commits);
};
+CTFailureGroup.prototype.setBug = function(bug) {
+ if (/^[0-9]+$/.test(bug))
+ bug = 'http://crbug.com/' + bug;
+ return this._annotate({
+ bug: bug,
+ });
+};
+
CTFailureGroup.prototype._computeProperties = function() {
- this.isSnoozed = Date.now() < this.annotation.snoozeTime;
+ this.isSnoozed = Date.now() < this._annotation.snoozeTime;
if (this.isSnoozed) {
this.category = 'snoozed';
} else {
// FIXME: crbug.com/400397 Split into: Whole step failure, Tree closer, Test failure, Flaky tests
this.category = 'default';
}
+
+ this.bug = this._annotation.bug;
+ if (this.bug !== undefined)
+ this.bugLabel = 'Bug ' + /([0-9]{3,})/.exec(this.bug)[0];
+ else
+ this.bugLabel = undefined;
};
CTFailureGroup.prototype._annotate = function(newAnnotation) {
@@ -61,7 +75,7 @@ CTFailureGroup.prototype._annotate = function(newAnnotation) {
localStorage.CTFailureGroupAnnotations = JSON.stringify(annotations);
- this.annotation = annotation;
+ this._annotation = annotation;
this._computeProperties();
}.bind(this));
};
« no previous file with comments | « no previous file | Tools/GardeningServer/model/test/ct-failure-group-tests.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698