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

Unified Diff: Tools/GardeningServer/scripts/ui.js

Issue 314913002: [GOM] Improve the display of the roll information (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed Ojan's comments. Created 6 years, 6 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/scripts/ui_unittests.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/GardeningServer/scripts/ui.js
diff --git a/Tools/GardeningServer/scripts/ui.js b/Tools/GardeningServer/scripts/ui.js
index 19e3d6d35038e420d25b626e1ab49e9444c7af22..7907b37d682c271365fc66f49d025c065807528f 100644
--- a/Tools/GardeningServer/scripts/ui.js
+++ b/Tools/GardeningServer/scripts/ui.js
@@ -351,6 +351,20 @@ ui.StatusArea = base.extends('div', {
});
ui.revisionDetails = base.extends('span', {
+ updateUI: function() {
+ this.appendChild(document.createElement("br"));
+ this.appendChild(document.createTextNode('Last roll is to '));
+ this.appendChild(ui.createLinkNode(trac.changesetURL(this.lastRolledRevision), this.lastRolledRevision));
+ this.appendChild(document.createTextNode(', current autoroll '));
+ if (this.roll) {
+ var linkText = "" + this.roll.fromRevision + ":" + this.roll.toRevision;
+ this.appendChild(ui.createLinkNode(this.roll.url, linkText));
+ if (this.roll.isStopped)
+ this.appendChild(document.createTextNode(' (STOPPED) '));
+ } else {
+ this.appendChild(document.createTextNode(' None'));
+ }
+ },
init: function() {
var theSpan = this;
theSpan.appendChild(document.createTextNode('Latest revision processed by every bot: '));
@@ -407,21 +421,10 @@ ui.revisionDetails = base.extends('span', {
theSpan.appendChild(document.createTextNode(', trunk is at '));
theSpan.appendChild(ui.createLinkNode(trac.changesetURL(totRevision), totRevision));
- checkout.lastBlinkRollRevision().then(function(revision) {
- theSpan.appendChild(document.createTextNode(', last roll is to '));
- theSpan.appendChild(ui.createLinkNode(trac.changesetURL(revision), revision));
- }, function() {});
-
- rollbot.fetchCurrentRoll().then(function(roll) {
- theSpan.appendChild(document.createTextNode(', current autoroll '));
- if (roll) {
- var linkText = "" + roll.fromRevision + ":" + roll.toRevision;
- theSpan.appendChild(ui.createLinkNode(roll.url, linkText));
- if (roll.isStopped)
- theSpan.appendChild(document.createTextNode(' (STOPPED) '));
- } else {
- theSpan.appendChild(document.createTextNode(' None'));
- }
+ Promise.all([checkout.lastBlinkRollRevision(), rollbot.fetchCurrentRoll()]).then(function(results) {
+ theSpan.lastRolledRevision = results[0];
+ theSpan.roll = results[1];
+ theSpan.updateUI();
});
}
});
« no previous file with comments | « no previous file | Tools/GardeningServer/scripts/ui_unittests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698