Unreviewed build fixes.
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Mar 2015 22:36:43 +0000 (22:36 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Mar 2015 22:36:43 +0000 (22:36 +0000)
* public/include/manifest.php:
(Manifest::generate): These should be {} instead of [] when they're empty.
* public/v2/data.js:
(Measurement.prototype.formattedRevisions): Don't assume previousRevisions[repositoryId] exits.
* public/v2/manifest.js:
(App.Metric.fullName): Fixed the typo.
* tests/admin-regenerate-manifest.js: Fixed the test.

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

Websites/perf.webkit.org/ChangeLog
Websites/perf.webkit.org/public/include/manifest.php
Websites/perf.webkit.org/public/v2/data.js
Websites/perf.webkit.org/public/v2/manifest.js
Websites/perf.webkit.org/tests/admin-regenerate-manifest.js

index c09beb3..3ba42b7 100644 (file)
@@ -1,3 +1,15 @@
+2015-03-19  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Unreviewed build fixes.
+
+        * public/include/manifest.php:
+        (Manifest::generate): These should be {} instead of [] when they're empty.
+        * public/v2/data.js:
+        (Measurement.prototype.formattedRevisions): Don't assume previousRevisions[repositoryId] exits.
+        * public/v2/manifest.js:
+        (App.Metric.fullName): Fixed the typo.
+        * tests/admin-regenerate-manifest.js: Fixed the test.
+
 2015-02-20  Ryosuke Niwa  <rniwa@webkit.org>
 
         Commit the erroneously reverted change.
index 538410a..d36763b 100644 (file)
@@ -27,14 +27,14 @@ class ManifestGenerator {
             $row = $row['commit_repository'];
 
         $this->manifest = array(
-            'tests' => $this->tests(),
-            'metrics' => $this->metrics(),
-            'all' => $this->platforms($config_table, $platform_table, false),
-            'dashboard' => $this->platforms($config_table, $platform_table, true),
-            'repositories' => $this->repositories($repositories_table, $repositories_with_commit),
-            'builders' => $this->builders(),
-            'bugTrackers' => $this->bug_trackers($repositories_table),
-            'dashboards' => config('dashboards'),
+            'tests' => (object)$this->tests(),
+            'metrics' => (object)$this->metrics(),
+            'all' => (object)$this->platforms($config_table, $platform_table, false),
+            'dashboard' => (object)$this->platforms($config_table, $platform_table, true),
+            'repositories' => (object)$this->repositories($repositories_table, $repositories_with_commit),
+            'builders' => (object)$this->builders(),
+            'bugTrackers' => (object)$this->bug_trackers($repositories_table),
+            'dashboards' => (object)config('dashboards'),
         );
 
         $this->manifest['elapsedTime'] = (microtime(true) - $start_time) * 1000;
index f2ee899..a6e4af6 100755 (executable)
@@ -173,7 +173,7 @@ Measurement.prototype.formattedRevisions = function (previousMeasurement)
     var formattedRevisions = {};
     for (var repositoryId in revisions) {
         var currentRevision = revisions[repositoryId][0];
-        var previousRevision = previousRevisions ? previousRevisions[repositoryId][0] : null;
+        var previousRevision = previousRevisions && previousRevisions[repositoryId] ? previousRevisions[repositoryId][0] : null;
         var formatttedRevision = Measurement.formatRevisionRange(currentRevision, previousRevision);
         formattedRevisions[repositoryId] = formatttedRevision;
     }
index 9d03bf2..4059b2f 100755 (executable)
@@ -34,7 +34,7 @@ App.Metric = App.NameLabelModel.extend({
     }.property('name', 'test'),
     fullName: function ()
     {
-        return this.get('path').join(' \u220b ') /* &in; */
+        return this.get('path').join(' \u220b ') /* &ni; */
             + ' : ' + this.get('label');
     }.property('path', 'label'),
 });
index f4dc6ae..6f8928a 100644 (file)
@@ -8,14 +8,15 @@ describe("/admin/regenerate-manifest", function () {
                 var manifest = JSON.parse(response.responseText);
                 delete manifest.defaultDashboard;
                 delete manifest.dashboards;
+                delete manifest.elapsedTime;
                 assert.deepEqual(manifest, {
-                    all: [],
-                    bugTrackers: [],
-                    builders: [],
-                    dashboard: [],
-                    metrics: [],
-                    repositories: [],
-                    tests: []});
+                    all: {},
+                    bugTrackers: {},
+                    builders: {},
+                    dashboard: {},
+                    metrics: {},
+                    repositories: {},
+                    tests: {}});
                 notifyDone();
             });
         });