Refactor to add event listeners and start periodic updates for all trac instances.
authorjmarcell@apple.com <jmarcell@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Feb 2016 17:01:56 +0000 (17:01 +0000)
committerjmarcell@apple.com <jmarcell@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Feb 2016 17:01:56 +0000 (17:01 +0000)
https://bugs.webkit.org/show_bug.cgi?id=153609

Reviewed by Darin Adler.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:
(BuildbotQueueView): Adding event listeners for all trac instances.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js: Starting periodic updates
for all trac instances.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@195961 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js
Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js
Tools/ChangeLog

index 8b5f0b9..0109844 100644 (file)
@@ -38,9 +38,12 @@ BuildbotQueueView = function(queues)
         queue.addEventListener(BuildbotQueue.Event.UnauthorizedAccess, this._unauthorizedAccess, this);
     }.bind(this));
 
-    Dashboard.Repository.OpenSource.trac.addEventListener(Trac.Event.CommitsUpdated, this._newCommitsRecorded, this);
-    if (typeof Dashboard.Repository.Internal.trac != "undefined")
-        Dashboard.Repository.Internal.trac.addEventListener(Trac.Event.CommitsUpdated, this._newCommitsRecorded, this);
+    var sortedRepositories = Dashboard.sortedRepositories;
+    for (var i = 0; i < sortedRepositories.length; i++) {
+        var trac = sortedRepositories[i].trac;
+        if (trac)
+            trac.addEventListener(Trac.Event.CommitsUpdated, this._newCommitsRecorded, this);
+    }
 };
 
 BaseObject.addConstructorFunctions(BuildbotQueueView);
index 30e2172..913be1c 100644 (file)
@@ -323,8 +323,11 @@ function documentReady()
     }
 }
 
-Dashboard.Repository.OpenSource.trac.startPeriodicUpdates();
-if (typeof Dashboard.Repository.Internal.trac !== "undefined")
-    Dashboard.Repository.Internal.trac.startPeriodicUpdates();
+var sortedRepositories = Dashboard.sortedRepositories;
+for (var i = 0; i < sortedRepositories.length; ++i) {
+    var trac = sortedRepositories[i].trac;
+    if (typeof trac !== "undefined")
+        trac.startPeriodicUpdates();
+}
 
 document.addEventListener("DOMContentLoaded", documentReady);
index f7b88eb..a9910cc 100644 (file)
@@ -1,3 +1,15 @@
+2016-02-01  Jason Marcell  <jmarcell@apple.com>
+
+        Refactor to add event listeners and start periodic updates for all trac instances.
+        https://bugs.webkit.org/show_bug.cgi?id=153609
+
+        Reviewed by Darin Adler.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:
+        (BuildbotQueueView): Adding event listeners for all trac instances.
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js: Starting periodic updates
+        for all trac instances.
+
 2016-01-31  Darin Adler  <darin@apple.com>
 
         Replace CaseFoldingHash with ASCIICaseInsensitiveHash