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

Unified Diff: appengine/trooper_o_matic/model/patch-summary-list.html

Issue 845963005: trooper-o-matic: Add patch attempt timeline view to CQ graphs (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@+addAlternateBuildViews
Patch Set: Review changes Created 5 years, 11 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 | « appengine/trooper_o_matic/model/patch-summary.html ('k') | appengine/trooper_o_matic/ui/tom-cq-graph.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/trooper_o_matic/model/patch-summary-list.html
diff --git a/appengine/trooper_o_matic/model/patch-summary-list.html b/appengine/trooper_o_matic/model/patch-summary-list.html
index 7ceb5c3474edc36206855add08e02d546c6602dd..f068a744b227d1a85010856bd4450186d2028053 100644
--- a/appengine/trooper_o_matic/model/patch-summary-list.html
+++ b/appengine/trooper_o_matic/model/patch-summary-list.html
@@ -10,12 +10,46 @@ found in the LICENSE file.
(function() {
this.PatchSummaryList = function PatchSummaryList(unit) {
- this.begin = null;
- this.end = null;
- this.list = [];
+ this.graphInterval = {
+ begin: null,
+ end: null,
+ };
+ this.dataInterval = {
+ begin: null,
+ end: null,
+ };
this.unit = unit;
+
+ this._list = [];
};
+PatchSummaryList.prototype.set = function(begin, end, patchSummaries) {
+ this.graphInterval = {
+ begin: begin,
+ end: end,
+ };
+ this.dataInterval = {
+ begin: begin,
+ end: end,
+ };
+ this._list = patchSummaries;
+
+ for (var patchSummary of patchSummaries) {
+ patchSummary.list = this;
+ var self = this;
+ patchSummary.getSummary().then(function(summary) {
+ self.dataInterval.begin = Math.min(self.dataInterval.begin, summary.begin);
+ if (summary.end) {
+ self.dataInterval.end = Math.max(self.dataInterval.end, summary.end);
+ }
+ });
+ }
+}
+
+PatchSummaryList.prototype.clear = function() {
+ this._list = [];
+}
+
PatchSummaryList.viewMenu = new MultiMenu(null, null, [
new MultiMenu('jobs', 'Jobs', [
new MultiMenu('flaky', 'Flaky'),
@@ -23,6 +57,10 @@ PatchSummaryList.viewMenu = new MultiMenu(null, null, [
new MultiMenu('passed', 'Passed'),
new MultiMenu('all', 'All'),
]),
+ new MultiMenu('timeline', 'Attempts Timeline', [
+ new MultiMenu('graphInterval', 'Show Graph Interval'),
+ new MultiMenu('dataInterval', 'Show All Data'),
+ ]),
new MultiMenu('summary', 'Summary'),
]);
« no previous file with comments | « appengine/trooper_o_matic/model/patch-summary.html ('k') | appengine/trooper_o_matic/ui/tom-cq-graph.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698