Commit 9aaf2526 authored by timothy@apple.com's avatar timothy@apple.com

Properly sort iterations in the Dashboard by revision for out-of-order queues.

https://bugs.webkit.org/show_bug.cgi?id=122196

Reviewed by Brent Fulgham.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
(BuildbotIteration):
(BuildbotIteration.prototype.update):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js:
(BuildbotQueue.prototype.update):
(BuildbotQueue.prototype.sortIterations):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156752 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e8dfefaf
......@@ -35,6 +35,9 @@ BuildbotIteration = function(queue, id, finished)
this.loaded = false;
this.openSourceRevision = null;
this.internalRevision = null;
this.layoutTestResults = null;
this.javascriptTestResults = null;
this.pythonTestResults = null;
......@@ -174,6 +177,9 @@ BuildbotIteration.prototype = {
if (!data.currentStep)
this.finished = true;
// Update the sorting since it is based on the revisions we just loaded.
this.queue.sortIterations();
this.dispatchEventToListeners(BuildbotIteration.Event.Updated);
}.bind(this));
}
......
......@@ -156,15 +156,28 @@ BuildbotQueue.prototype = {
this._knownIterations[iteration.id] = iteration;
}
function sortIterationsById(a, b)
{
return b.id > a.id;
}
this.iterations.sort(sortIterationsById);
this.sortIterations();
if (newIterations.length)
this.dispatchEventToListeners(BuildbotQueue.Event.IterationsAdded, {addedIterations: newIterations});
}.bind(this));
},
sortIterations: function()
{
function compareIterations(a, b)
{
var result = b.openSourceRevision - a.openSourceRevision;
if (result)
return result;
result = b.internalRevision - a.internalRevision;
if (result)
return result;
return b.id - a.id;
}
this.iterations.sort(compareIterations);
}
};
2013-10-01 Timothy Hatcher <timothy@apple.com>
Properly sort iterations in the Dashboard by revision for out-of-order queues.
https://bugs.webkit.org/show_bug.cgi?id=122196
Reviewed by Brent Fulgham.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
(BuildbotIteration):
(BuildbotIteration.prototype.update):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js:
(BuildbotQueue.prototype.update):
(BuildbotQueue.prototype.sortIterations):
2013-10-01 Timothy Hatcher <timothy@apple.com>
Fix some exceptions seen in the Buildbot Dashboard when looking at unloaded iterations.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment