Commit a2fbaf63 authored by aroben@apple.com's avatar aroben@apple.com

Update TestFailures's title and header immediately upon navigation

Fixes <http://webkit.org/b/64125> TestFailures page seems slow to react on link clicks

Reviewed by Daniel Bates.

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js:
(ViewController.prototype.loaded): Create and store an h1 element for displaying the page's
title.
(ViewController.prototype._displayBuilder): Set the page's title and clear out any old
content immediately instead of waiting for the first set of results for the history
analyzer. As we receive new results from the analyzer we'll just clear out the main content
area and replace it with the new info.
(ViewController.prototype._displayTesters): Set the page's title and clear out any old
content immediately instead of waiting for the list of testers from the buildbot. Sprinkled
in a little use of our removeAllChildren helper, too.
(ViewController.prototype._setTitle): Added. Set's the page's title and the header text.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@90594 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 7b104dcd
......@@ -36,6 +36,8 @@ function ViewController(buildbot, bugzilla, trac) {
ViewController.prototype = {
loaded: function() {
this._header = document.createElement('h1');
document.body.appendChild(this._header);
this._mainContentElement = document.createElement('div');
document.body.appendChild(this._mainContentElement);
document.body.appendChild(this._domForAuxiliaryUIElements());
......@@ -54,7 +56,11 @@ ViewController.prototype = {
},
_displayBuilder: function(builder) {
this._setTitle(builder.name);
this._mainContentElement.removeAllChildren();
var navigationID = this._navigationID;
var self = this;
(new LayoutTestHistoryAnalyzer(builder)).start(function(data, stillFetchingData) {
if (self._navigationID !== navigationID) {
......@@ -99,11 +105,7 @@ ViewController.prototype = {
item.appendChild(self._domForNewAndExistingBugs(builder, buildName, passingBuildName, failingTestNames));
});
var header = document.createElement('h1');
header.appendChild(document.createTextNode(builder.name));
self._mainContentElement.innerHTML = '';
document.title = builder.name;
self._mainContentElement.appendChild(header);
self._mainContentElement.removeAllChildren();
self._mainContentElement.appendChild(list);
self._mainContentElement.appendChild(self._domForPossiblyFlakyTests(builder, data.possiblyFlaky));
......@@ -115,15 +117,18 @@ ViewController.prototype = {
},
_displayTesters: function() {
var navigationID = this._navigationID;
this._setTitle('Testers');
this._mainContentElement.removeAllChildren();
var list = document.createElement('ul');
this._mainContentElement.appendChild(list);
var latestBuildInfos = [];
var navigationID = this._navigationID;
function updateList() {
latestBuildInfos.sort(function(a, b) { return a.tester.name.localeCompare(b.tester.name) });
while (list.firstChild)
list.removeChild(list.firstChild);
list.removeAllChildren();
latestBuildInfos.forEach(function(buildInfo) {
var link = document.createElement('a');
link.href = '#/' + buildInfo.tester.name;
......@@ -161,10 +166,6 @@ ViewController.prototype = {
});
});
});
self._mainContentElement.innerHTML = '';
document.title = 'Testers';
self._mainContentElement.appendChild(list);
});
},
......@@ -520,4 +521,9 @@ ViewController.prototype = {
return result;
},
_setTitle: function(title) {
document.title = title;
this._header.textContent = title;
},
};
2011-07-07 Adam Roben <aroben@apple.com>
Update TestFailures's title and header immediately upon navigation
Fixes <http://webkit.org/b/64125> TestFailures page seems slow to react on link clicks
Reviewed by Daniel Bates.
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js:
(ViewController.prototype.loaded): Create and store an h1 element for displaying the page's
title.
(ViewController.prototype._displayBuilder): Set the page's title and clear out any old
content immediately instead of waiting for the first set of results for the history
analyzer. As we receive new results from the analyzer we'll just clear out the main content
area and replace it with the new info.
(ViewController.prototype._displayTesters): Set the page's title and clear out any old
content immediately instead of waiting for the list of testers from the buildbot. Sprinkled
in a little use of our removeAllChildren helper, too.
(ViewController.prototype._setTitle): Added. Set's the page's title and the header text.
2011-07-07 Adam Roben <aroben@apple.com>
Make Checkout use SCM's Executive instead of conjuring up its own
......
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