Changeset 159352 in webkit


Ignore:
Timestamp:
Nov 15, 2013 12:28:08 PM (10 years ago)
Author:
timothy_horton@apple.com
Message:

build.webkit.org/dashboard should provide a way to focus on a subset of bots
https://bugs.webkit.org/show_bug.cgi?id=122676

Reviewed by Timothy Hatcher.

Add a small 'hide' button next to every platform logo, and a 'show all'
button which only appears when at least one platform is hidden. Hidden
platforms persist using localStorage.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Initialization.js:
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js:

(updateHiddenPlatforms):
(documentReady.unhideButton):
(documentReady.hideButton):
(documentReady):

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Settings.js: Added.

(Settings.prototype.setObject):
(Settings.prototype.getObject):
(Settings.prototype.addSettingListener):
(Settings.prototype.fireSettingListener):
(Settings.prototype.toggleHiddenPlatform):
(Settings.prototype.clearHiddenPlatforms):

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:

(div.cellButton):
(div.cellButton.hide):
(.hidden):

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/index.html:
Location:
trunk/Tools
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Initialization.js

    r156736 r159352  
    2424 */
    2525
     26var settings = new Settings;
    2627var buildbot = new WebKitBuildbot;
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js

    r158151 r159352  
    7171        return a.order - b.order;
    7272    });
    73    
     73
    7474    return platforms;
     75}
     76
     77function updateHiddenPlatforms()
     78{
     79    var hiddenPlatforms = settings.getObject("hiddenPlatforms");
     80    if (!hiddenPlatforms)
     81        hiddenPlatforms = [];
     82
     83    var platformRows = document.querySelectorAll("tr.platform");
     84    for (var i = 0; i < platformRows.length; ++i)
     85        platformRows[i].classList.remove("hidden");
     86
     87    for (var i = 0; i < hiddenPlatforms.length; ++i)
     88        document.querySelector("tr.platform." + hiddenPlatforms[i]).classList.add("hidden");
     89
     90    var unhideButton = document.querySelector("div.cellButton.unhide");
     91    if (hiddenPlatforms.length)
     92        unhideButton.classList.remove("hidden");
     93    else
     94        unhideButton.classList.add("hidden");
    7595}
    7696
     
    83103    row.classList.add("headers");
    84104
    85     // Empty header for the platform logo.
    86105    var header = document.createElement("th");
     106    var unhideButton = document.createElement("div");
     107    unhideButton.addEventListener("click", function () { settings.clearHiddenPlatforms(); });
     108    unhideButton.textContent = "Show All Platforms";
     109    unhideButton.classList.add("cellButton", "unhide", "hidden");
     110    header.appendChild(unhideButton);
    87111    row.appendChild(header);
    88112
     
    123147        cell.appendChild(logoImage);
    124148
     149        var hideButton = document.createElement("div");
     150        hideButton.addEventListener("click", function (platformName) { return function () { settings.toggleHiddenPlatform(platformName); }; }(platform.name) );
     151        hideButton.textContent = "hide";
     152        hideButton.classList.add("cellButton", "hide");
     153        cell.appendChild(hideButton);
     154
    125155        row.appendChild(cell);
    126156
     
    147177
    148178    document.body.appendChild(table);
     179
     180    updateHiddenPlatforms();
     181    settings.addSettingListener("hiddenPlatforms", updateHiddenPlatforms);
    149182}
    150183
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css

    r159342 r159352  
    3737.selectable {
    3838    -webkit-user-select: all;
     39}
     40
     41div.cellButton {
     42    font-family: "HelveticaNeue-Light", sans-serif;
     43    font-size: 12px;
     44    color: rgb(185, 175, 125);
     45    cursor: pointer;
     46}
     47
     48div.cellButton.hide {
     49    position: absolute;
     50    bottom: 2px;
     51    right: 4px;
     52}
     53
     54.hidden {
     55    display: none;
    3956}
    4057
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/index.html

    r156750 r159352  
    4545    <script src="Scripts/BuildbotTesterQueueView.js"></script>
    4646    <script src="Scripts/StatusLineView.js"></script>
     47    <script src="Scripts/Settings.js"></script>
    4748    <script src="Scripts/Initialization.js"></script>
    4849    <script src="Scripts/Main.js"></script>
  • trunk/Tools/ChangeLog

    r159343 r159352  
     12013-11-15  Tim Horton  <timothy_horton@apple.com>
     2
     3        build.webkit.org/dashboard should provide a way to focus on a subset of bots
     4        https://bugs.webkit.org/show_bug.cgi?id=122676
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        Add a small 'hide' button next to every platform logo, and a 'show all'
     9        button which only appears when at least one platform is hidden. Hidden
     10        platforms persist using localStorage.
     11
     12        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Initialization.js:
     13        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js:
     14        (updateHiddenPlatforms):
     15        (documentReady.unhideButton):
     16        (documentReady.hideButton):
     17        (documentReady):
     18        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Settings.js: Added.
     19        (Settings.prototype.setObject):
     20        (Settings.prototype.getObject):
     21        (Settings.prototype.addSettingListener):
     22        (Settings.prototype.fireSettingListener):
     23        (Settings.prototype.toggleHiddenPlatform):
     24        (Settings.prototype.clearHiddenPlatforms):
     25        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:
     26        (div.cellButton):
     27        (div.cellButton.hide):
     28        (.hidden):
     29        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/index.html:
     30
    1312013-11-15  Jer Noble  <jer.noble@apple.com>
    232
Note: See TracChangeset for help on using the changeset viewer.