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

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: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 updateUIIfDone: function() {
355 if (this.roll === undefined || this.lastRolledRevision === undefined)
356 return;
357
358 this.appendChild(document.createElement("br"));
ojan 2014/06/04 19:46:25 Meh. I prefer it on one line to conserve vertical
Julien - ping for review 2014/06/05 00:33:51 You kinda did :-) When doing a design, it's impor
Julien - ping for review 2014/06/05 00:45:29 I am open to better suggestions to separate the 2
359 this.appendChild(document.createTextNode('Last roll is to '));
360 this.appendChild(ui.createLinkNode(trac.changesetURL(this.lastRolledRevi sion), this.lastRolledRevision));
361 this.appendChild(document.createTextNode(', current autoroll '));
362 if (this.roll) {
363 var linkText = "" + this.roll.fromRevision + ":" + this.roll.toRevis ion;
364 this.appendChild(ui.createLinkNode(this.roll.url, linkText));
365 if (this.roll.isStopped)
366 this.appendChild(document.createTextNode(' (STOPPED) '));
367 } else {
368 this.appendChild(document.createTextNode(' None'));
369 }
370 },
354 init: function() { 371 init: function() {
355 var theSpan = this; 372 var theSpan = this;
356 theSpan.appendChild(document.createTextNode('Latest revision processed b y every bot: ')); 373 theSpan.appendChild(document.createTextNode('Latest revision processed b y every bot: '));
357 374
358 var latestRevision = model.latestRevisionWithNoBuildersInFlight(); 375 var latestRevision = model.latestRevisionWithNoBuildersInFlight();
359 var latestRevisions = model.latestRevisionByBuilder(); 376 var latestRevisions = model.latestRevisionByBuilder();
360 377
361 // Get the list of builders sorted with the most recent one first. 378 // Get the list of builders sorted with the most recent one first.
362 var builders = Object.keys(latestRevisions); 379 var builders = Object.keys(latestRevisions);
363 builders.sort(function (a, b) { return parseInt(latestRevisions[b]) - pa rseInt(latestRevisions[a]);}); 380 builders.sort(function (a, b) { return parseInt(latestRevisions[b]) - pa rseInt(latestRevisions[a]);});
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 if (!revisionsNode.open) { 418 if (!revisionsNode.open) {
402 $(revisionsPopUp).removeClass("active"); 419 $(revisionsPopUp).removeClass("active");
403 } 420 }
404 }); 421 });
405 422
406 var totRevision = model.latestRevision(); 423 var totRevision = model.latestRevision();
407 theSpan.appendChild(document.createTextNode(', trunk is at ')); 424 theSpan.appendChild(document.createTextNode(', trunk is at '));
408 theSpan.appendChild(ui.createLinkNode(trac.changesetURL(totRevision), to tRevision)); 425 theSpan.appendChild(ui.createLinkNode(trac.changesetURL(totRevision), to tRevision));
409 426
410 checkout.lastBlinkRollRevision().then(function(revision) { 427 checkout.lastBlinkRollRevision().then(function(revision) {
411 theSpan.appendChild(document.createTextNode(', last roll is to ')); 428 theSpan.lastRolledRevision = revision;
412 theSpan.appendChild(ui.createLinkNode(trac.changesetURL(revision), r evision)); 429 theSpan.updateUIIfDone();
413 }, function() {}); 430 }, function() {});
414 431
415 rollbot.fetchCurrentRoll().then(function(roll) { 432 rollbot.fetchCurrentRoll().then(function(roll) {
416 theSpan.appendChild(document.createTextNode(', current autoroll ')); 433 theSpan.roll = roll;
417 if (roll) { 434 theSpan.updateUIIfDone();
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 }); 435 });
426 } 436 }
427 }); 437 });
428 438
429 })(); 439 })();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698