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

Side by Side 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 unified diff | Download patch
OLDNEW
1 <!-- 1 <!--
2 Copyright 2014 The Chromium Authors. All rights reserved. 2 Copyright 2014 The Chromium Authors. All rights reserved.
3 Use of this source code is governed by a BSD-style license that can be 3 Use of this source code is governed by a BSD-style license that can be
4 found in the LICENSE file. 4 found in the LICENSE file.
5 --> 5 -->
6 6
7 <link rel="import" href="./multi-menu.html"> 7 <link rel="import" href="./multi-menu.html">
8 8
9 <script> 9 <script>
10 (function() { 10 (function() {
11 11
12 this.PatchSummaryList = function PatchSummaryList(unit) { 12 this.PatchSummaryList = function PatchSummaryList(unit) {
13 this.begin = null; 13 this.graphInterval = {
14 this.end = null; 14 begin: null,
15 this.list = []; 15 end: null,
16 };
17 this.dataInterval = {
18 begin: null,
19 end: null,
20 };
16 this.unit = unit; 21 this.unit = unit;
22
23 this._list = [];
17 }; 24 };
18 25
26 PatchSummaryList.prototype.set = function(begin, end, patchSummaries) {
27 this.graphInterval = {
28 begin: begin,
29 end: end,
30 };
31 this.dataInterval = {
32 begin: begin,
33 end: end,
34 };
35 this._list = patchSummaries;
36
37 for (var patchSummary of patchSummaries) {
38 patchSummary.list = this;
39 var self = this;
40 patchSummary.getSummary().then(function(summary) {
41 self.dataInterval.begin = Math.min(self.dataInterval.begin, summary.begin) ;
42 if (summary.end) {
43 self.dataInterval.end = Math.max(self.dataInterval.end, summary.end);
44 }
45 });
46 }
47 }
48
49 PatchSummaryList.prototype.clear = function() {
50 this._list = [];
51 }
52
19 PatchSummaryList.viewMenu = new MultiMenu(null, null, [ 53 PatchSummaryList.viewMenu = new MultiMenu(null, null, [
20 new MultiMenu('jobs', 'Jobs', [ 54 new MultiMenu('jobs', 'Jobs', [
21 new MultiMenu('flaky', 'Flaky'), 55 new MultiMenu('flaky', 'Flaky'),
22 new MultiMenu('failed', 'Failed'), 56 new MultiMenu('failed', 'Failed'),
23 new MultiMenu('passed', 'Passed'), 57 new MultiMenu('passed', 'Passed'),
24 new MultiMenu('all', 'All'), 58 new MultiMenu('all', 'All'),
25 ]), 59 ]),
60 new MultiMenu('timeline', 'Attempts Timeline', [
61 new MultiMenu('graphInterval', 'Show Graph Interval'),
62 new MultiMenu('dataInterval', 'Show All Data'),
63 ]),
26 new MultiMenu('summary', 'Summary'), 64 new MultiMenu('summary', 'Summary'),
27 ]); 65 ]);
28 66
29 })(); 67 })();
30 </script> 68 </script>
OLDNEW
« 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