From: rniwa@webkit.org Date: Fri, 21 Nov 2014 04:30:38 +0000 (+0000) Subject: Fix misc bugs and typos in app.js X-Git-Url: http://git.webkit.org/?p=WebKit-https.git;a=commitdiff_plain;h=433aa339f3cfd454e3caad10d0a45b229b3aed82 Fix misc bugs and typos in app.js https://bugs.webkit.org/show_bug.cgi?id=138946 Reviewed by Benjamin Poulain. * public/v2/app.js: (App.DashboardPaneProxyForPicker._platformOrMetricIdChanged): (App.ChartsController.init): (App.buildPopup): Renamed from App.BuildPopup. (App.InteractiveChartComponent._constructGraphIfPossible): Fixed the bug that we were calling remove() on the wrong object (an array as opposed to elements in the array). (App.InteractiveChartComponent._highlightedItemsChanged): Check the length of _highlights as _highlights is always an array and evalutes to true. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@176435 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- diff --git a/Websites/perf.webkit.org/ChangeLog b/Websites/perf.webkit.org/ChangeLog index 7a62082..3c988e8 100644 --- a/Websites/perf.webkit.org/ChangeLog +++ b/Websites/perf.webkit.org/ChangeLog @@ -1,5 +1,21 @@ 2014-11-20 Ryosuke Niwa + Fix misc bugs and typos in app.js + https://bugs.webkit.org/show_bug.cgi?id=138946 + + Reviewed by Benjamin Poulain. + + * public/v2/app.js: + (App.DashboardPaneProxyForPicker._platformOrMetricIdChanged): + (App.ChartsController.init): + (App.buildPopup): Renamed from App.BuildPopup. + (App.InteractiveChartComponent._constructGraphIfPossible): Fixed the bug that we were calling + remove() on the wrong object (an array as opposed to elements in the array). + (App.InteractiveChartComponent._highlightedItemsChanged): Check the length of _highlights as + _highlights is always an array and evalutes to true. + +2014-11-20 Ryosuke Niwa + New perf dashboard should provide UI to create a new analysis task https://bugs.webkit.org/show_bug.cgi?id=138910 diff --git a/Websites/perf.webkit.org/public/v2/app.js b/Websites/perf.webkit.org/public/v2/app.js index 6556d72..bec50a1 100755 --- a/Websites/perf.webkit.org/public/v2/app.js +++ b/Websites/perf.webkit.org/public/v2/app.js @@ -46,7 +46,7 @@ App.DashboardPaneProxyForPicker = Ember.ObjectProxy.extend({ _platformOrMetricIdChanged: function () { var self = this; - App.BuildPopup(this.get('store'), 'choosePane', this) + App.buildPopup(this.get('store'), 'choosePane', this) .then(function (platforms) { self.set('pickerData', platforms); }); }.observes('platformId', 'metricId').on('init'), paneList: function () { @@ -591,13 +591,13 @@ App.ChartsController = Ember.Controller.extend({ { this._super(); var self = this; - App.BuildPopup(this.store, 'addPaneByMetricAndPlatform').then(function (platforms) { + App.buildPopup(this.store, 'addPaneByMetricAndPlatform').then(function (platforms) { self.set('platforms', platforms); }); }, }); -App.BuildPopup = function(store, action, position) +App.buildPopup = function(store, action, position) { return App.Manifest.fetch(store).then(function () { return App.Manifest.get('platforms').map(function (platform) { @@ -920,7 +920,7 @@ App.InteractiveChartComponent = Ember.Component.extend({ this._dots.forEach(function (dot) { dots.remove(); }); this._dots = []; if (this._highlights) - this._highlights.forEach(function (highlight) { _highlights.remove(); }); + this._highlights.forEach(function (highlight) { highlight.remove(); }); this._highlights = []; this._currentTimeSeries = chartData.current.timeSeriesByCommitTime(); @@ -1430,7 +1430,7 @@ App.InteractiveChartComponent = Ember.Component.extend({ var data = this._currentTimeSeriesData.filter(function (item) { return highlightedItems[item.measurement.id()]; }); - if (this._highlights) + if (this._highlights.length) this._highlights.forEach(function (highlight) { highlight.remove(); }); this._highlights.push(this._clippedContainer