Title: [94198] trunk/Tools
Revision
94198
Author
aba...@webkit.org
Date
2011-08-31 09:37:58 -0700 (Wed, 31 Aug 2011)

Log Message

garden-o-matic needs a tabstrip
https://bugs.webkit.org/show_bug.cgi?id=67263

Reviewed by Dimitri Glazkov.

This patch adds a basic tabstrip to garden-o-matic.  The results
details view now opens in the "Results" tab, and the user can flip back
and forth between the Summary and the Results tab quickly.  There's
also a stub for a "Commits" tab, which is disabled.

This patch isn't the most beautiful in the world, but it gets the ball
rolling on a multi-modal UI.

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/controllers.js:
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/summary.js:
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui.js:
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/styles/common.css:
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/summary.html:

Modified Paths

Diff

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/controllers.js (94197 => 94198)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/controllers.js	2011-08-31 16:34:38 UTC (rev 94197)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/controllers.js	2011-08-31 16:37:58 UTC (rev 94198)
@@ -133,8 +133,11 @@
         var controller = new controllers.ResultsDetails(resultsView, failuresByTest);
         controller.showTest(testNameList[0]);
 
-        // FIXME: This doesn't belong here. Also, we need some way to call controller.dismiss().
-        document.body.appendChild(resultsView);
+        // FIXME: This doesn't belong here.
+        var _onebar_ = $('#onebar')[0];
+        var resultsContainer = onebar.results();
+        $(resultsContainer).empty().append(resultsView);
+        onebar.select('results');
     },
     onRollout: function(revision, testNameList)
     {

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/summary.js (94197 => 94198)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/summary.js	2011-08-31 16:34:38 UTC (rev 94197)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/summary.js	2011-08-31 16:37:58 UTC (rev 94198)
@@ -57,20 +57,25 @@
         alert('Please run "webkit-patch garden-o-matic" to enable this feature.');
     });
 
+    _onebar_ = new ui.onebar();
+    onebar.attach();
+
     var actions = new ui.notifications.Stream();
     g_unexpectedFailures = new controllers.UnexpectedFailures(actions);
 
     g_info = new ui.notifications.Stream();
     g_failingBuilders = new controllers.FailingBuilders(g_info);
 
-    document.body.insertBefore(actions, document.body.firstChild);
-    document.body.insertBefore(g_info, document.body.firstChild);
-
     // FIXME: This should be an Action object.
-    var button = document.body.insertBefore(document.createElement('button'), document.body.firstChild);
-    button.addEventListener("click", update);
-    button.textContent = 'update';
+    var updateButton = document.body.insertBefore(document.createElement('button'), document.body.firstChild);
+    updateButton.addEventListener("click", update);
+    updateButton.textContent = 'update';
 
+    var summary = onebar.summary();
+    summary.appendChild(updateButton);
+    summary.appendChild(g_info);
+    summary.appendChild(actions);
+
     update();
 });
 

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui.js (94197 => 94198)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui.js	2011-08-31 16:34:38 UTC (rev 94197)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui.js	2011-08-31 16:37:58 UTC (rev 94198)
@@ -51,6 +51,53 @@
     }).join('\n');
 }
 
+ui._onebar_ = base.extends('div', {
+    init: function()
+    {
+        this.id = 'onebar';
+        this.innerHTML =
+            '<ul>' +
+                '<li><a href="" +
+                '<li><a href="" +
+                '<li><a href="" +
+            '</ul>' +
+            '<div id="summary"></div>' +
+            '<div id="results"></div>' +
+            '<div id="commits">Coming soon...</div>';
+        this._tabNames = [
+            'summary',
+            'results',
+            'commits,'
+        ]
+        this._tabs = $(this).tabs({
+            disabled: [1, 2],
+        });
+    },
+    attach: function()
+    {
+        document.body.insertBefore(this, document.body.firstChild);
+    },
+    tabNamed: function(tabName)
+    {
+        return $('#' + tabName, this)[0];
+    },
+    summary: function()
+    {
+        return this.tabNamed('summary');
+    },
+    results: function()
+    {
+        return this.tabNamed('results');
+    },
+    select: function(tabName)
+    {
+        var tabIndex = this._tabNames.indexOf(tabName);
+        this._tabs.tabs('enable', tabIndex);
+        this._tabs.tabs('select', tabIndex);
+    }
+});
+
+// FIXME: Loading a module shouldn't set off a timer.  The controller should kick this off.
 setInterval(function() {
     Array.prototype.forEach.call(document.querySelectorAll("time.relative"), function(time) {
         time.update && time.update();

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/styles/common.css (94197 => 94198)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/styles/common.css	2011-08-31 16:34:38 UTC (rev 94197)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/styles/common.css	2011-08-31 16:37:58 UTC (rev 94198)
@@ -32,7 +32,7 @@
     color: #333;
 }
 
-button {
+.ui-widget button, button {
     font-family: 'Open Sans';
     border-radius: 2px;
     background-image: -webkit-linear-gradient(top,#f5f5f5,#f1f1f1);

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/summary.html (94197 => 94198)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/summary.html	2011-08-31 16:34:38 UTC (rev 94197)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/summary.html	2011-08-31 16:37:58 UTC (rev 94198)
@@ -30,6 +30,7 @@
 <head>
 <title>Garden-O-Matic Summary View</title>
 <link rel="stylesheet" href=""
+<link rel="stylesheet" href=""
 <link rel="stylesheet" href=""
 <link rel="stylesheet" href=""
 <link rel="stylesheet" href=""

Modified: trunk/Tools/ChangeLog (94197 => 94198)


--- trunk/Tools/ChangeLog	2011-08-31 16:34:38 UTC (rev 94197)
+++ trunk/Tools/ChangeLog	2011-08-31 16:37:58 UTC (rev 94198)
@@ -1,3 +1,24 @@
+2011-08-31  Adam Barth  <aba...@webkit.org>
+
+        garden-o-matic needs a tabstrip
+        https://bugs.webkit.org/show_bug.cgi?id=67263
+
+        Reviewed by Dimitri Glazkov.
+
+        This patch adds a basic tabstrip to garden-o-matic.  The results
+        details view now opens in the "Results" tab, and the user can flip back
+        and forth between the Summary and the Results tab quickly.  There's
+        also a stub for a "Commits" tab, which is disabled.
+
+        This patch isn't the most beautiful in the world, but it gets the ball
+        rolling on a multi-modal UI.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/controllers.js:
+        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/summary.js:
+        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui.js:
+        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/styles/common.css:
+        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/summary.html:
+
 2011-08-31  Ai Makabi  <mak...@google.com>
 
         Extract reference links from reftest test file.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to