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

Unified Diff: dashboard/dashboard/elements/speed-releasing-table.html

Issue 2684813002: Handles milestones. Needs to be broken up. (Closed)
Patch Set: Created 3 years, 10 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 | dashboard/dashboard/elements/speed-releasing-table-test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dashboard/dashboard/elements/speed-releasing-table.html
diff --git a/dashboard/dashboard/elements/speed-releasing-table.html b/dashboard/dashboard/elements/speed-releasing-table.html
index d28902974c11ce95ffdf9b8822de525cdaf9de68..f24b7c9bbf03ed621eb233dc0570b5737bc8aa9d 100644
--- a/dashboard/dashboard/elements/speed-releasing-table.html
+++ b/dashboard/dashboard/elements/speed-releasing-table.html
@@ -7,6 +7,7 @@ found in the LICENSE file.
<link type="text/css" rel="stylesheet" href="/dashboard/static/base.css">
+<link rel="import" href="/components/iron-icons/iron-icons.html">
<link rel="import" href="/components/paper-button/paper-button.html">
<link rel="import" href="/components/paper-dropdown-menu/paper-dropdown-menu.html">
<link rel="import" href="/components/paper-item/paper-item.html">
@@ -57,6 +58,10 @@ found in the LICENSE file.
<template is="dom-repeat" items="{{tableConfig.bots}}" as="bot">
<p>{{tableConfig.name}}</p>
<p>{{bot}}</p>
+ <p>
+ M{{tableConfig.milestoneLabels.0}} ->
+ M{{tableConfig.milestoneLabels.1}}
+ </p>
<table id="speed-releasing">
<thead>
<tr>
@@ -89,7 +94,18 @@ found in the LICENSE file.
<td>{{getDifference(bot, test, 'true')}}</td>
</tr>
</template>
- </table> <br>
+ </table>
+ <br>
+ </template>
+ <paper-button on-click="prevMilestone">
+ <iron-icon icon="chevron-left"></iron-icon>
+ {{getPrevMilestone()}}
+ </paper-button>
+ <template is="dom-if" if="{{getNextMilestone()}}">
+ <paper-button on-click="nextMilestone">
+ {{getNextMilestone()}}
+ <iron-icon icon="chevron-right"></iron-icon>
+ </paper-button>
</template>
</div>
</template>
@@ -131,6 +147,30 @@ found in the LICENSE file.
return index ? 'Reference' : 'Current';
},
+ getPrevMilestone: function() {
+ return this.tableConfig.milestoneLabels[0] - 1;
+ },
+
+ getNextMilestone: function() {
+ if (this.tableConfig.milestoneLabels[1] ===
+ this.tableConfig.currentMilestone + 1)
+ // SO we don't show an arrow past the current milestone.
+ return 0;
+ return this.tableConfig.milestoneLabels[1];
+ },
+
+ prevMilestone: function() {
+ this.navigateMilestones(this.tableConfig.milestoneLabels[0] - 1);
+ },
+
+ nextMilestone: function() {
+ this.navigateMilestones(this.tableConfig.milestoneLabels[1]);
+ },
+
+ navigateMilestones: function(newMilestone) {
+ window.location.href = window.location.pathname + '?m=' + newMilestone;
+ },
+
/**
* Gets the specified value given a rev, bot, test.
*/
@@ -209,6 +249,10 @@ found in the LICENSE file.
if (revB) {
params['revB'] = revB;
}
+ var m = uri.getParameter('m');
+ if (m) {
+ params['m'] = m;
+ }
var path = this.tableName;
this.loading = true;
simple_xhr.send('/speed_releasing/' + path, params,
@@ -223,6 +267,8 @@ found in the LICENSE file.
this.tableConfig.units = response['units'];
this.tableConfig.categories = response['categories'];
this.tableConfig.displayRevisions = response['display_revisions'];
+ this.tableConfig.milestoneLabels = response['milestones'];
+ this.tableConfig.currentMilestone = response['current_milestone'];
this.loading = false;
}.bind(this),
function(msg) {
« no previous file with comments | « no previous file | dashboard/dashboard/elements/speed-releasing-table-test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698