Title: [160744] trunk/Tools
- Revision
- 160744
- Author
- [email protected]
- Date
- 2013-12-17 19:25:51 -0800 (Tue, 17 Dec 2013)
Log Message
Botwatcher's dashboard ceases to update itself after a while
https://bugs.webkit.org/show_bug.cgi?id=125885
Reviewed by Timothy Hatcher.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js:
Removed code that checked for the view being hidden. It's none of model's business.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:
(BuildbotQueueView): Find out what platform the view is for. Initlialize update timer.
(BuildbotQueueView.prototype._updateHiddenState): Start or stop update timer as appropriate.
We now stop the timer for hidden views.
(BuildbotQueueView.prototype._updateQueues): Removed the logic for ignoring some updates.
Modified Paths
Diff
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js (160743 => 160744)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js 2013-12-18 02:16:15 UTC (rev 160743)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js 2013-12-18 03:25:51 UTC (rev 160744)
@@ -131,10 +131,6 @@
update: function(iterationsToLoad)
{
- var hiddenPlatforms = settings.getObject("hiddenPlatforms");
- if (hiddenPlatforms && hiddenPlatforms.contains(this.platform))
- return;
-
JSON.load(this.baseURL, function(data) {
if (!(data.cachedBuilds instanceof Array))
return;
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js (160743 => 160744)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js 2013-12-18 02:16:15 UTC (rev 160743)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js 2013-12-18 03:25:51 UTC (rev 160744)
@@ -35,16 +35,24 @@
this.element.__queueView = this;
this.releaseQueues.forEach(function(queue) {
+ if (this.platform && this.platform != queue.platform)
+ throw "A buildbot view may not contain queues for multiple platforms."
+ else
+ this.platform = queue.platform;
queue.addEventListener(BuildbotQueue.Event.IterationsAdded, this._queueIterationsAdded, this);
}.bind(this));
this.debugQueues.forEach(function(queue) {
+ if (this.platform && this.platform != queue.platform)
+ throw "A buildbot view may not contain queues for multiple platforms."
+ else
+ this.platform = queue.platform;
queue.addEventListener(BuildbotQueue.Event.IterationsAdded, this._queueIterationsAdded, this);
}.bind(this));
- this.lastUpdate = 0;
- setTimeout(this._updateQueues.bind(this), BuildbotQueueView.UpdateInterval);
- settings.addSettingListener("hiddenPlatforms", this._updateQueues.bind(this));
+ this.updateTimer = null;
+ this._updateHiddenState();
+ settings.addSettingListener("hiddenPlatforms", this._updateHiddenState.bind(this));
};
BaseObject.addConstructorFunctions(BuildbotQueueView);
@@ -105,15 +113,24 @@
return fragment;
},
+ _updateHiddenState: function()
+ {
+ var hiddenPlatforms = settings.getObject("hiddenPlatforms");
+ var wasHidden = !this.updateTimer;
+ var isHidden = hiddenPlatforms && hiddenPlatforms.contains(this.platform);
+
+ if (wasHidden && !isHidden)
+ this.updateTimer = setInterval(this._updateQueues.bind(this), BuildbotQueueView.UpdateInterval);
+ else if (!wasHidden && isHidden) {
+ clearInterval(this.updateTimer);
+ this.updateTimer = null;
+ }
+ },
+
_updateQueues: function()
{
- var now = Date.now();
- if (now - this.lastUpdate < BuildbotQueueView.UpdateInterval)
- return;
this.releaseQueues.forEach(function(queue) { queue.update(); });
this.debugQueues.forEach(function(queue) { queue.update(); });
- this.lastUpdate = now;
- setTimeout(this._updateQueues.bind(this), BuildbotQueueView.UpdateInterval);
},
_queueIterationsAdded: function(event)
Modified: trunk/Tools/ChangeLog (160743 => 160744)
--- trunk/Tools/ChangeLog 2013-12-18 02:16:15 UTC (rev 160743)
+++ trunk/Tools/ChangeLog 2013-12-18 03:25:51 UTC (rev 160744)
@@ -1,3 +1,19 @@
+2013-12-17 Alexey Proskuryakov <[email protected]>
+
+ Botwatcher's dashboard ceases to update itself after a while
+ https://bugs.webkit.org/show_bug.cgi?id=125885
+
+ Reviewed by Timothy Hatcher.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js:
+ Removed code that checked for the view being hidden. It's none of model's business.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:
+ (BuildbotQueueView): Find out what platform the view is for. Initlialize update timer.
+ (BuildbotQueueView.prototype._updateHiddenState): Start or stop update timer as appropriate.
+ We now stop the timer for hidden views.
+ (BuildbotQueueView.prototype._updateQueues): Removed the logic for ignoring some updates.
+
2013-12-17 Anders Carlsson <[email protected]>
Fix the 32-bit build.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes