Title: [112824] trunk
Revision
112824
Author
rn...@webkit.org
Date
2012-04-01 19:12:17 -0700 (Sun, 01 Apr 2012)

Log Message

Admin page should lexicologically sort tests
https://bugs.webkit.org/show_bug.cgi?id=82849

Rubber-stamped by Hajime Morita.

* Websites/webkit-perf.appspot.com/js/admin.js:
* Websites/webkit-perf.appspot.com/js/config.js:
(sortProperties):
(fetchDashboardManifest):

Modified Paths

Diff

Modified: trunk/ChangeLog (112823 => 112824)


--- trunk/ChangeLog	2012-04-02 01:55:00 UTC (rev 112823)
+++ trunk/ChangeLog	2012-04-02 02:12:17 UTC (rev 112824)
@@ -1,5 +1,17 @@
 2012-04-01  Ryosuke Niwa  <rn...@webkit.org>
 
+        Admin page should lexicologically sort tests
+        https://bugs.webkit.org/show_bug.cgi?id=82849
+
+        Rubber-stamped by Hajime Morita.
+
+        * Websites/webkit-perf.appspot.com/js/admin.js:
+        * Websites/webkit-perf.appspot.com/js/config.js:
+        (sortProperties):
+        (fetchDashboardManifest):
+
+2012-04-01  Ryosuke Niwa  <rn...@webkit.org>
+
         Revert an inadvertently committed change.
 
         * Websites/webkit-perf.appspot.com/app.yaml:

Modified: trunk/Websites/webkit-perf.appspot.com/js/admin.js (112823 => 112824)


--- trunk/Websites/webkit-perf.appspot.com/js/admin.js	2012-04-02 01:55:00 UTC (rev 112823)
+++ trunk/Websites/webkit-perf.appspot.com/js/admin.js	2012-04-02 02:12:17 UTC (rev 112824)
@@ -23,10 +23,11 @@
 
 function createKeyNameReloader(name, visibilityAction, callback) {
     return function () {
-        $.getJSON(name, function (platforms) {
+        $.getJSON(name, function (entries) {
             var list = $('#' + name + ' ul');
-            removeNonFormListItems(list);
-            $.each(platforms, function (key, values) {
+            entries = sortProperties(entries);
+
+            $.each(entries, function (key, values) {
                 var label = key == values['name'] ? key : key + ' : ' + values['name'];
                 list.append('<li><h3 id="' + key + '">' + label + '</h3></li>');
                 var item = list[0].lastChild;

Modified: trunk/Websites/webkit-perf.appspot.com/js/config.js (112823 => 112824)


--- trunk/Websites/webkit-perf.appspot.com/js/config.js	2012-04-02 01:55:00 UTC (rev 112823)
+++ trunk/Websites/webkit-perf.appspot.com/js/config.js	2012-04-02 02:12:17 UTC (rev 112824)
@@ -79,6 +79,14 @@
                '&verbose=on';
 }
 
+function sortProperties(object) {
+    var tests = Object.keys(object).sort();
+    var sortedObject = {};
+    for (var i = 0; i < tests.length; i++)
+        sortedObject[tests[i]] = object[tests[i]];
+    return sortedObject;
+}
+
 // FIXME move this back to dashboard.js once the bug 718925 is fixed
 function fetchDashboardManifest(callback)
 {
@@ -90,12 +98,7 @@
     });
 
     $.getJSON(SERVER + '/api/test/dashboard', function (dashboardManifest) {
-        var testToId = dashboardManifest['testToId'];
-        var tests = Object.keys(testToId).sort();
-        var sortedTestToId = {};
-        for (var i = 0; i < tests.length; i++)
-            sortedTestToId[tests[i]] = testToId[tests[i]];
-        dashboardManifest['testToId'] = sortedTestToId;
+        dashboardManifest['testToId'] = sortProperties(dashboardManifest['testToId']);
         callback(dashboardManifest);
     });
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to