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

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

Issue 476903004: [sheriff-o-matic]: Basic trooper display for sheriff-o-matic. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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 | « Tools/GardeningServer/lib/chart-loader.html ('k') | Tools/GardeningServer/model/ct-failures.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 0f0b249b30638d800a846d46d614e1990e644082..60fc5578c1690a93348c65613b9bf121a40ed74c 100644
--- a/Tools/GardeningServer/model/ct-failure-group.html
+++ b/Tools/GardeningServer/model/ct-failure-group.html
@@ -7,16 +7,17 @@ found in the LICENSE file.
<link rel="import" href="ct-commit-list.html">
<script>
-function CTFailureGroup(key, failures, commitList) {
+function CTFailureGroup(key, data) {
this.key = key;
- this.failures = failures;
- this.commitList = commitList;
- this._annotation = CTFailureGroup._mergeAnnotations(failures.map(function(failure) {
- return failure.annotations();
- }).flatten());
+ this.data = data;
+ this._annotation = CTFailureGroup._mergeAnnotations(data.getAnnotations());
this._computeProperties();
}
+CTFailureGroup.prototype.dataToExamine = function() {
+ return this.data.dataToExamine();
+}
+
CTFailureGroup.prototype.snoozeUntil = function(time) {
return this._annotate({
snoozeTime: time,
@@ -60,12 +61,6 @@ CTFailureGroup.prototype._computeProperties = function() {
this.bugLabel = undefined;
};
-CTFailureGroup.prototype.failureKeys = function() {
- return this.failures.map(function(failure) {
- return failure.keys();
- }).flatten();
-};
-
CTFailureGroup._mergeAnnotations = function(failureAnnotations) {
// FIXME: This should be a union of all bugs.
var bug = failureAnnotations.map('bug').compact().first();
@@ -89,7 +84,7 @@ CTFailureGroup.prototype._annotate = function(newAnnotation) {
var failureAnnotations = [];
// FIXME: Post the new annotation to frontend rather than storing locally.
return CTFailureGroup.fetchAnnotations().then(function(annotations) {
- this.failureKeys().forEach(function(failureKey) {
+ this.data.failureKeys().forEach(function(failureKey) {
var annotation = annotations[failureKey] || {};
Object.keys(newAnnotation, function(key, value) {
« no previous file with comments | « Tools/GardeningServer/lib/chart-loader.html ('k') | Tools/GardeningServer/model/ct-failures.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698