REGRESSION: commit logs are not shown sometimes on the new dashboard UI
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 27 Oct 2014 23:13:24 +0000 (23:13 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 27 Oct 2014 23:13:24 +0000 (23:13 +0000)
https://bugs.webkit.org/show_bug.cgi?id=138099

Reviewed by Benjamin Poulain.

The bug was caused by _currentItemChanged not passing the previous point in the list of points and also
_showDetails inverting the order of the current and old measurements.

* public/v2/app.js:
(App.PaneController._currentItemChanged): Pass in the previous point to _showDetails when there is one.
(App.PaneController._showDetails): Since points are ordered chronologically, the last point is the
current (latest) measurement and the first point is the oldest measurement.
(App.CommitsViewerComponent.commitsChanged): Don't show a single measurement as a range for clarity.

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

Websites/perf.webkit.org/ChangeLog
Websites/perf.webkit.org/public/v2/app.js

index b90e787..af11ed5 100644 (file)
@@ -1,3 +1,19 @@
+2014-10-27  Ryosuke Niwa  <rniwa@webkit.org>
+
+        REGRESSION: commit logs are not shown sometimes on the new dashboard UI
+        https://bugs.webkit.org/show_bug.cgi?id=138099
+
+        Reviewed by Benjamin Poulain.
+
+        The bug was caused by _currentItemChanged not passing the previous point in the list of points and also
+        _showDetails inverting the order of the current and old measurements.
+
+        * public/v2/app.js:
+        (App.PaneController._currentItemChanged): Pass in the previous point to _showDetails when there is one.
+        (App.PaneController._showDetails): Since points are ordered chronologically, the last point is the
+        current (latest) measurement and the first point is the oldest measurement.
+        (App.CommitsViewerComponent.commitsChanged): Don't show a single measurement as a range for clarity.
+
 2014-10-18  Ryosuke Niwa  <rniwa@webkit.org>
 
         Perf dashboard should provide a way to associate bugs with a test run
index ee7dd3e..309dd0f 100755 (executable)
@@ -769,14 +769,16 @@ App.PaneController = Ember.ObjectController.extend({
         var point = this.get('currentItem');
         if (!point || !point.measurement)
             this.set('details', null);
-        else
-            this._showDetails([point]);
+        else {
+            var previousPoint = point.series.previousPoint(point);
+            this._showDetails(previousPoint ? [previousPoint, point] : [point]);
+        }
     }.observes('currentItem'),
     _showDetails: function (points)
     {
         var isShowingEndPoint = !this._hasRange;
-        var currentMeasurement = points[0].measurement;
-        var oldMeasurement = points[points.length - 1].measurement;
+        var currentMeasurement = points[points.length - 1].measurement;
+        var oldMeasurement = points[0].measurement;
         var formattedRevisions = currentMeasurement.formattedRevisions(oldMeasurement);
         var revisions = App.Manifest.get('repositories')
             .filter(function (repository) { return formattedRevisions[repository.get('id')]; })
@@ -1538,7 +1540,7 @@ App.CommitsViewerComponent = Ember.Component.extend({
         var revisionInfo = this.get('revisionInfo');
 
         var to = revisionInfo.get('currentRevision');
-        var from = revisionInfo.get('previousRevision') || to;
+        var from = revisionInfo.get('previousRevision');
         var repository = this.get('repository');
         if (!from || !repository || !repository.get('hasReportedCommits'))
             return;