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

Side by Side 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: Better fix (TM) with a unit test inside 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 $(this).removeClass('processing'); 344 $(this).removeClass('processing');
345 }, 345 },
346 newId: function() { 346 newId: function() {
347 var id = 'status-content-' + ++this._currentId; 347 var id = 'status-content-' + ++this._currentId;
348 this._unfinishedIds[id] = 1; 348 this._unfinishedIds[id] = 1;
349 return id; 349 return id;
350 } 350 }
351 }); 351 });
352 352
353 ui.revisionDetails = base.extends('span', { 353 ui.revisionDetails = base.extends('span', {
354 updateUI: function() {
355 this.appendChild(document.createElement("br"));
356 this.appendChild(document.createTextNode('Last roll is to '));
357 this.appendChild(ui.createLinkNode(trac.changesetURL(this.lastRolledRevi sion), this.lastRolledRevision));
358 this.appendChild(document.createTextNode(', current autoroll '));
359 if (this.roll) {
360 var linkText = "" + this.roll.fromRevision + ":" + this.roll.toRevis ion;
361 this.appendChild(ui.createLinkNode(this.roll.url, linkText));
362 if (this.roll.isStopped)
363 this.appendChild(document.createTextNode(' (STOPPED) '));
364 } else {
365 this.appendChild(document.createTextNode(' None'));
366 }
367 },
354 init: function() { 368 init: function() {
355 var theSpan = this; 369 var theSpan = this;
356 theSpan.appendChild(document.createTextNode('Latest revision processed b y every bot: ')); 370 theSpan.appendChild(document.createTextNode('Latest revision processed b y every bot: '));
357 371
358 var latestRevision = model.latestRevisionWithNoBuildersInFlight(); 372 var latestRevision = model.latestRevisionWithNoBuildersInFlight();
359 var latestRevisions = model.latestRevisionByBuilder(); 373 var latestRevisions = model.latestRevisionByBuilder();
360 374
361 // Get the list of builders sorted with the most recent one first. 375 // Get the list of builders sorted with the most recent one first.
362 var builders = Object.keys(latestRevisions); 376 var builders = Object.keys(latestRevisions);
363 builders.sort(function (a, b) { return parseInt(latestRevisions[b]) - pa rseInt(latestRevisions[a]);}); 377 builders.sort(function (a, b) { return parseInt(latestRevisions[b]) - pa rseInt(latestRevisions[a]);});
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 $(summaryLinkNode).mouseout(function(ev) { 414 $(summaryLinkNode).mouseout(function(ev) {
401 if (!revisionsNode.open) { 415 if (!revisionsNode.open) {
402 $(revisionsPopUp).removeClass("active"); 416 $(revisionsPopUp).removeClass("active");
403 } 417 }
404 }); 418 });
405 419
406 var totRevision = model.latestRevision(); 420 var totRevision = model.latestRevision();
407 theSpan.appendChild(document.createTextNode(', trunk is at ')); 421 theSpan.appendChild(document.createTextNode(', trunk is at '));
408 theSpan.appendChild(ui.createLinkNode(trac.changesetURL(totRevision), to tRevision)); 422 theSpan.appendChild(ui.createLinkNode(trac.changesetURL(totRevision), to tRevision));
409 423
410 checkout.lastBlinkRollRevision().then(function(revision) { 424 Promise.all([ checkout.lastBlinkRollRevision(), rollbot.fetchCurrentRoll () ]).then(function(results) {
ojan 2014/06/05 00:54:48 Nit: I don't know if we have an official style rul
Julien - ping for review 2014/06/05 01:51:52 Done.
411 theSpan.appendChild(document.createTextNode(', last roll is to ')); 425 theSpan.lastRolledRevision = results[0];
412 theSpan.appendChild(ui.createLinkNode(trac.changesetURL(revision), r evision)); 426 theSpan.roll = results[1];
413 }, function() {}); 427 theSpan.updateUI();
414
415 rollbot.fetchCurrentRoll().then(function(roll) {
416 theSpan.appendChild(document.createTextNode(', current autoroll '));
417 if (roll) {
418 var linkText = "" + roll.fromRevision + ":" + roll.toRevision;
419 theSpan.appendChild(ui.createLinkNode(roll.url, linkText));
420 if (roll.isStopped)
421 theSpan.appendChild(document.createTextNode(' (STOPPED) '));
422 } else {
423 theSpan.appendChild(document.createTextNode(' None'));
424 }
425 }); 428 });
426 } 429 }
427 }); 430 });
428 431
429 })(); 432 })();
OLDNEW
« no previous file with comments | « no previous file | Tools/GardeningServer/scripts/ui_unittests.js » ('j') | Tools/GardeningServer/scripts/ui_unittests.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698