<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[184784] trunk/Tools</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/184784">184784</a></dd>
<dt>Author</dt> <dd>ap@apple.com</dd>
<dt>Date</dt> <dd>2015-05-22 12:03:54 -0700 (Fri, 22 May 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>build.webkit.org/dashboard: Simplify BuildbotQueueView creation code
https://bugs.webkit.org/show_bug.cgi?id=145297

Reviewed by Tim Horton.

This is a refactoring to simplify code, and to make it more logical.

It is up to the view to decide how to present the queues, and whether to split
them into debug and release, or in some different way.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotBuilderQueueView.js:
(BuildbotBuilderQueueView.filterQueues):
(BuildbotBuilderQueueView):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotLeaksQueueView.js:
(BuildbotLeaksQueueView):
(BuildbotLeaksQueueView.prototype.update):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotPerformanceQueueView.js:
(BuildbotPerformanceQueueView):
(BuildbotPerformanceQueueView.prototype.update):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:
(BuildbotQueueView):
(BuildbotQueueView.prototype._updateQueues):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js:
(BuildbotTesterQueueView):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js:
(documentReady):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkToolsBuildSlaveSupportbuildwebkitorgconfigpublic_htmldashboardScriptsBuildbotBuilderQueueViewjs">trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotBuilderQueueView.js</a></li>
<li><a href="#trunkToolsBuildSlaveSupportbuildwebkitorgconfigpublic_htmldashboardScriptsBuildbotLeaksQueueViewjs">trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotLeaksQueueView.js</a></li>
<li><a href="#trunkToolsBuildSlaveSupportbuildwebkitorgconfigpublic_htmldashboardScriptsBuildbotPerformanceQueueViewjs">trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotPerformanceQueueView.js</a></li>
<li><a href="#trunkToolsBuildSlaveSupportbuildwebkitorgconfigpublic_htmldashboardScriptsBuildbotQueueViewjs">trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js</a></li>
<li><a href="#trunkToolsBuildSlaveSupportbuildwebkitorgconfigpublic_htmldashboardScriptsBuildbotTesterQueueViewjs">trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js</a></li>
<li><a href="#trunkToolsBuildSlaveSupportbuildwebkitorgconfigpublic_htmldashboardScriptsMainjs">trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkToolsBuildSlaveSupportbuildwebkitorgconfigpublic_htmldashboardScriptsBuildbotBuilderQueueViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotBuilderQueueView.js (184783 => 184784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotBuilderQueueView.js        2015-05-22 18:57:05 UTC (rev 184783)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotBuilderQueueView.js        2015-05-22 19:03:54 UTC (rev 184784)
</span><span class="lines">@@ -23,25 +23,25 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-BuildbotBuilderQueueView = function(debugQueues, releaseQueues)
</del><ins>+BuildbotBuilderQueueView = function(queues)
</ins><span class="cx"> {
</span><del>-    BuildbotQueueView.call(this, debugQueues, releaseQueues);
</del><ins>+    BuildbotQueueView.call(this, queues);
</ins><span class="cx"> 
</span><del>-    function filterQueuesByArchitecture(architecture, queue)
</del><ins>+    function filterQueues(architecture, debug, queue)
</ins><span class="cx">     {
</span><del>-        return queue.architecture === architecture;
</del><ins>+        return queue.architecture === architecture &amp;&amp; queue.debug === debug;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    this.universalReleaseQueues = this.releaseQueues.filter(filterQueuesByArchitecture.bind(this, Buildbot.BuildArchitecture.Universal));
-    this.sixtyFourBitReleaseQueues = this.releaseQueues.filter(filterQueuesByArchitecture.bind(this, Buildbot.BuildArchitecture.SixtyFourBit));
-    this.thirtyTwoBitReleaseQueues = this.releaseQueues.filter(filterQueuesByArchitecture.bind(this, Buildbot.BuildArchitecture.ThirtyTwoBit));
</del><ins>+    this.universalReleaseQueues = this.queues.filter(filterQueues.bind(this, Buildbot.BuildArchitecture.Universal, false));
+    this.sixtyFourBitReleaseQueues = this.queues.filter(filterQueues.bind(this, Buildbot.BuildArchitecture.SixtyFourBit, false));
+    this.thirtyTwoBitReleaseQueues = this.queues.filter(filterQueues.bind(this, Buildbot.BuildArchitecture.ThirtyTwoBit, false));
</ins><span class="cx"> 
</span><del>-    this.universalDebugQueues = this.debugQueues.filter(filterQueuesByArchitecture.bind(this, Buildbot.BuildArchitecture.Universal));
-    this.sixtyFourBitDebugQueues = this.debugQueues.filter(filterQueuesByArchitecture.bind(this, Buildbot.BuildArchitecture.SixtyFourBit));
-    this.thirtyTwoBitDebugQueues = this.debugQueues.filter(filterQueuesByArchitecture.bind(this, Buildbot.BuildArchitecture.ThirtyTwoBit));
</del><ins>+    this.universalDebugQueues = this.queues.filter(filterQueues.bind(this, Buildbot.BuildArchitecture.Universal, true));
+    this.sixtyFourBitDebugQueues = this.queues.filter(filterQueues.bind(this, Buildbot.BuildArchitecture.SixtyFourBit, true));
+    this.thirtyTwoBitDebugQueues = this.queues.filter(filterQueues.bind(this, Buildbot.BuildArchitecture.ThirtyTwoBit, true));
</ins><span class="cx"> 
</span><del>-    this.hasMultipleReleaseBuilds = this.releaseQueues.length &gt; 1;
-    this.hasMultipleDebugBuilds = this.debugQueues.length &gt; 1;
</del><ins>+    this.hasMultipleReleaseBuilds = this.universalReleaseQueues.length + this.sixtyFourBitReleaseQueues.length + this.thirtyTwoBitReleaseQueues.length &gt; 1;
+    this.hasMultipleDebugBuilds = this.universalDebugQueues.length + this.sixtyFourBitDebugQueues.length + this.thirtyTwoBitDebugQueues.length &gt; 1;
</ins><span class="cx"> 
</span><span class="cx">     this.update();
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkToolsBuildSlaveSupportbuildwebkitorgconfigpublic_htmldashboardScriptsBuildbotLeaksQueueViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotLeaksQueueView.js (184783 => 184784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotLeaksQueueView.js        2015-05-22 18:57:05 UTC (rev 184783)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotLeaksQueueView.js        2015-05-22 19:03:54 UTC (rev 184784)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> 
</span><span class="cx"> BuildbotLeaksQueueView = function(queues)
</span><span class="cx"> {
</span><del>-    BuildbotQueueView.call(this, [], queues);
</del><ins>+    BuildbotQueueView.call(this, queues);
</ins><span class="cx">     this.update();
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -84,7 +84,7 @@
</span><span class="cx">             new PopoverTracker(status.statusBubbleElement, this._presentPopoverForLeaksQueue.bind(this), iteration);
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        this.appendBuildStyle.call(this, this.releaseQueues, &quot;Leaks&quot;, appendLeaksQueueStatus);
</del><ins>+        this.appendBuildStyle.call(this, this.queues, &quot;Leaks&quot;, appendLeaksQueueStatus);
</ins><span class="cx">     },
</span><span class="cx"> 
</span><span class="cx">     addLinkToRow: function(rowElement, className, text, url)
</span></span></pre></div>
<a id="trunkToolsBuildSlaveSupportbuildwebkitorgconfigpublic_htmldashboardScriptsBuildbotPerformanceQueueViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotPerformanceQueueView.js (184783 => 184784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotPerformanceQueueView.js        2015-05-22 18:57:05 UTC (rev 184783)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotPerformanceQueueView.js        2015-05-22 19:03:54 UTC (rev 184784)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> 
</span><span class="cx"> BuildbotPerformanceQueueView = function(queues)
</span><span class="cx"> {
</span><del>-    BuildbotQueueView.call(this, [], queues);
</del><ins>+    BuildbotQueueView.call(this, queues);
</ins><span class="cx">     this.update();
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -82,7 +82,7 @@
</span><span class="cx">             new PopoverTracker(status.statusBubbleElement, this._presentPopoverForPerformanceQueue.bind(this), queue);
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        this.appendBuildStyle.call(this, this.releaseQueues, 'Release', appendPerformanceQueueStatus);
</del><ins>+        this.appendBuildStyle.call(this, this.queues, 'Release', appendPerformanceQueueStatus);
</ins><span class="cx">     },
</span><span class="cx"> 
</span><span class="cx">     addLinkToRow: function(rowElement, className, text, url)
</span></span></pre></div>
<a id="trunkToolsBuildSlaveSupportbuildwebkitorgconfigpublic_htmldashboardScriptsBuildbotQueueViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js (184783 => 184784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js        2015-05-22 18:57:05 UTC (rev 184783)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js        2015-05-22 19:03:54 UTC (rev 184784)
</span><span class="lines">@@ -23,14 +23,13 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-BuildbotQueueView = function(debugQueues, releaseQueues)
</del><ins>+BuildbotQueueView = function(queues)
</ins><span class="cx"> {
</span><span class="cx">     QueueView.call(this);
</span><span class="cx"> 
</span><del>-    this.releaseQueues = releaseQueues || [];
-    this.debugQueues = debugQueues || [];
</del><ins>+    this.queues = queues || [];
</ins><span class="cx"> 
</span><del>-    this.releaseQueues.forEach(function(queue) {
</del><ins>+    this.queues.forEach(function(queue) {
</ins><span class="cx">         if (this.platform &amp;&amp; this.platform != queue.platform)
</span><span class="cx">             throw &quot;A buildbot view may not contain queues for multiple platforms.&quot;
</span><span class="cx">         else
</span><span class="lines">@@ -39,15 +38,6 @@
</span><span class="cx">         queue.addEventListener(BuildbotQueue.Event.UnauthorizedAccess, this._unauthorizedAccess, this);
</span><span class="cx">     }.bind(this));
</span><span class="cx"> 
</span><del>-    this.debugQueues.forEach(function(queue) {
-        if (this.platform &amp;&amp; this.platform != queue.platform)
-            throw &quot;A buildbot view may not contain queues for multiple platforms.&quot;
-        else
-            this.platform = queue.platform;
-        queue.addEventListener(BuildbotQueue.Event.IterationsAdded, this._queueIterationsAdded, this);
-        queue.addEventListener(BuildbotQueue.Event.UnauthorizedAccess, this._unauthorizedAccess, this);
-    }.bind(this));
-
</del><span class="cx">     webkitTrac.addEventListener(Trac.Event.CommitsUpdated, this._newCommitsRecorded, this);
</span><span class="cx">     if (typeof internalTrac != &quot;undefined&quot;)
</span><span class="cx">         internalTrac.addEventListener(Trac.Event.CommitsUpdated, this._newCommitsRecorded, this);
</span><span class="lines">@@ -302,8 +292,7 @@
</span><span class="cx"> 
</span><span class="cx">     _updateQueues: function()
</span><span class="cx">     {
</span><del>-        this.releaseQueues.forEach(function(queue) { queue.update(); });
-        this.debugQueues.forEach(function(queue) { queue.update(); });
</del><ins>+        this.queues.forEach(function(queue) { queue.update(); });
</ins><span class="cx">     },
</span><span class="cx"> 
</span><span class="cx">     _queueIterationsAdded: function(event)
</span></span></pre></div>
<a id="trunkToolsBuildSlaveSupportbuildwebkitorgconfigpublic_htmldashboardScriptsBuildbotTesterQueueViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js (184783 => 184784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js        2015-05-22 18:57:05 UTC (rev 184783)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js        2015-05-22 19:03:54 UTC (rev 184784)
</span><span class="lines">@@ -23,10 +23,13 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-BuildbotTesterQueueView = function(debugQueues, releaseQueues)
</del><ins>+BuildbotTesterQueueView = function(queues)
</ins><span class="cx"> {
</span><del>-    BuildbotQueueView.call(this, debugQueues, releaseQueues);
</del><ins>+    BuildbotQueueView.call(this, queues);
</ins><span class="cx"> 
</span><ins>+    this.releaseQueues = this.queues.filter(function(queue) { return queue.debug === false; });
+    this.debugQueues = this.queues.filter(function(queue) { return queue.debug === true; });
+
</ins><span class="cx">     this.update();
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsBuildSlaveSupportbuildwebkitorgconfigpublic_htmldashboardScriptsMainjs"></a>
<div class="modfile"><h4>Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js (184783 => 184784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js        2015-05-22 18:57:05 UTC (rev 184783)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js        2015-05-22 19:03:54 UTC (rev 184784)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx">         if (!platform)
</span><span class="cx">             platform = categorizedQueuesByPlatformAndBuildType[queue.platform] = {};
</span><span class="cx">         if (!platform.builders)
</span><del>-            platform.builders = {};
</del><ins>+            platform.builders = [];
</ins><span class="cx"> 
</span><span class="cx">         var categoryName;
</span><span class="cx">         if (queue.builder)
</span><span class="lines">@@ -54,15 +54,9 @@
</span><span class="cx"> 
</span><span class="cx">         category = platform[categoryName];
</span><span class="cx">         if (!category)
</span><del>-            category = platform[categoryName] = {};
</del><ins>+            category = platform[categoryName] = [];
</ins><span class="cx"> 
</span><del>-        var buildType = queue.debug ? &quot;debug&quot; : &quot;release&quot;;
-
-        buildQueues = category[buildType];
-        if (!buildQueues)
-            buildQueues = category[buildType] = [];
-
-        buildQueues.push(queue);
</del><ins>+        category.push(queue);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -73,7 +67,7 @@
</span><span class="cx">         if (!platform)
</span><span class="cx">             platform = categorizedQueuesByPlatformAndBuildType[queue.platform] = {};
</span><span class="cx">         if (!platform.builders)
</span><del>-            platform.builders = {};
</del><ins>+            platform.builders = [];
</ins><span class="cx"> 
</span><span class="cx">         var categoryName = BubblesCategory;
</span><span class="cx"> 
</span><span class="lines">@@ -199,7 +193,7 @@
</span><span class="cx"> 
</span><span class="cx">         cell = document.createElement(&quot;td&quot;);
</span><span class="cx"> 
</span><del>-        var view = new BuildbotBuilderQueueView(platformQueues.builders.debug, platformQueues.builders.release);
</del><ins>+        var view = new BuildbotBuilderQueueView(platformQueues.builders);
</ins><span class="cx">         cell.appendChild(view.element);
</span><span class="cx">         row.appendChild(cell);
</span><span class="cx"> 
</span><span class="lines">@@ -208,7 +202,7 @@
</span><span class="cx"> 
</span><span class="cx">             var testerProperty = Buildbot.TestCategory[testerKey];
</span><span class="cx">             if (platformQueues[testerProperty]) {
</span><del>-                var view = new BuildbotTesterQueueView(platformQueues[testerProperty].debug, platformQueues[testerProperty].release);
</del><ins>+                var view = new BuildbotTesterQueueView(platformQueues[testerProperty]);
</ins><span class="cx">                 cell.appendChild(view.element);
</span><span class="cx">             }
</span><span class="cx"> 
</span><span class="lines">@@ -216,13 +210,13 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         var cell = document.createElement(&quot;td&quot;);
</span><del>-        if (platformQueues.performance &amp;&amp; platformQueues.performance.release) {
-            var view = new BuildbotPerformanceQueueView(platformQueues.performance.release);
</del><ins>+        if (platformQueues.performance) {
+            var view = new BuildbotPerformanceQueueView(platformQueues.performance);
</ins><span class="cx">             cell.appendChild(view.element);
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if (platformQueues.leaks &amp;&amp; platformQueues.leaks.debug) {
-            var view = new BuildbotLeaksQueueView(platformQueues.leaks.debug);
</del><ins>+        if (platformQueues.leaks) {
+            var view = new BuildbotLeaksQueueView(platformQueues.leaks);
</ins><span class="cx">             cell.appendChild(view.element);
</span><span class="cx">         }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (184783 => 184784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2015-05-22 18:57:05 UTC (rev 184783)
+++ trunk/Tools/ChangeLog        2015-05-22 19:03:54 UTC (rev 184784)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2015-05-22  Alexey Proskuryakov  &lt;ap@apple.com&gt;
+
+        build.webkit.org/dashboard: Simplify BuildbotQueueView creation code
+        https://bugs.webkit.org/show_bug.cgi?id=145297
+
+        Reviewed by Tim Horton.
+
+        This is a refactoring to simplify code, and to make it more logical.
+
+        It is up to the view to decide how to present the queues, and whether to split
+        them into debug and release, or in some different way.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotBuilderQueueView.js:
+        (BuildbotBuilderQueueView.filterQueues):
+        (BuildbotBuilderQueueView):
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotLeaksQueueView.js:
+        (BuildbotLeaksQueueView):
+        (BuildbotLeaksQueueView.prototype.update):
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotPerformanceQueueView.js:
+        (BuildbotPerformanceQueueView):
+        (BuildbotPerformanceQueueView.prototype.update):
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:
+        (BuildbotQueueView):
+        (BuildbotQueueView.prototype._updateQueues):
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js:
+        (BuildbotTesterQueueView):
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js:
+        (documentReady):
+
</ins><span class="cx"> 2015-05-22  Tim Horton  &lt;timothy_horton@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove action menu support
</span></span></pre>
</div>
</div>

</body>
</html>