+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
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')]; })
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;