Changeset 176203 in webkit
- Timestamp:
- Nov 17, 2014 9:07:13 AM (9 years ago)
- Location:
- trunk/Websites/perf.webkit.org
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Websites/perf.webkit.org/ChangeLog
r175786 r176203 1 2014-11-17 Ryosuke Niwa <rniwa@webkit.org> 2 3 App.Manifest shouldn't use App.__container__.lookup 4 https://bugs.webkit.org/show_bug.cgi?id=138768 5 6 Reviewed by Andreas Kling. 7 8 Removed the hack to find the store object via App.__container__.lookup. 9 Pass around the store object instead. 10 11 * public/v2/app.js: 12 (App.DashboardRow._createPane): Add "store" property to the pane. 13 (App.DashboardPaneProxyForPicker._platformOrMetricIdChanged): Ditto. 14 (App.IndexController.gridChanged): Ditto. 15 (App.IndexController.actions.addRow): Ditto. 16 (App.IndexController.init): Ditto. 17 (App.Pane._fetch): Ditto. 18 (App.ChartsController._parsePaneList): Ditto. 19 (App.ChartsController._updateQueryString): Ditto. 20 (App.ChartsController.actions.addPaneByMetricAndPlatform): Ditto. 21 (App.BuildPopup): Ditto. 22 (App.AnalysisTaskRoute.model): Ditto. 23 (App.AnalysisTaskViewModel._taskUpdated): Ditto. 24 25 * public/v2/manifest.js: 26 (App.Manifest.fetch): Removed the code to find the store object. 27 1 28 2014-11-08 Ryosuke Niwa <rniwa@webkit.org> 2 29 -
trunk/Websites/perf.webkit.org/public/v2/app.js
r175786 r176203 34 34 35 35 var pane = App.Pane.create({ 36 store: this.get('store'), 36 37 platformId: paneInfo ? paneInfo[0] : null, 37 38 metricId: paneInfo ? paneInfo[1] : null, … … 46 47 { 47 48 var self = this; 48 App.BuildPopup( 'choosePane', this)49 App.BuildPopup(this.get('store'), 'choosePane', this) 49 50 .then(function (platforms) { self.set('pickerData', platforms); }); 50 51 }.observes('platformId', 'metricId').on('init'), … … 88 89 })); 89 90 91 var store = this.store; 90 92 this.set('rows', table.slice(1).map(function (rowParam) { 91 93 return App.DashboardRow.create({ 94 store: store, 92 95 header: rowParam[0], 93 96 cellsInfo: rowParam.slice(1), … … 171 174 { 172 175 this.get('rows').pushObject(App.DashboardRow.create({ 176 store: this.store, 173 177 header: this.get('newRowHeader'), 174 178 columnCount: this.get('columnCount'), … … 196 200 { 197 201 this._super(); 198 App.Manifest.fetch( );202 App.Manifest.fetch(this.get('store')); 199 203 } 200 204 }); … … 341 345 var self = this; 342 346 343 App.Manifest.fetchRunsWithPlatformAndMetric(this. store, platformId, metricId).then(function (result) {347 App.Manifest.fetchRunsWithPlatformAndMetric(this.get('store'), platformId, metricId).then(function (result) { 344 348 self.set('platform', result.platform); 345 349 self.set('metric', result.metric); … … 511 515 } 512 516 return App.Pane.create({ 517 store: self.store, 513 518 info: paneInfo, 514 519 platformId: paneInfo[0], … … 562 567 { 563 568 this.addPane(App.Pane.create({ 569 store, this.store, 564 570 platformId: param.platform.get('id'), 565 571 metricId: param.metric.get('id'), … … 573 579 this._super(); 574 580 var self = this; 575 App.BuildPopup( 'addPaneByMetricAndPlatform').then(function (platforms) {581 App.BuildPopup(this.store, 'addPaneByMetricAndPlatform').then(function (platforms) { 576 582 self.set('platforms', platforms); 577 583 }); … … 579 585 }); 580 586 581 App.BuildPopup = function( action, position)587 App.BuildPopup = function(store, action, position) 582 588 { 583 return App.Manifest.fetch( ).then(function () {589 return App.Manifest.fetch(store).then(function () { 584 590 return App.Manifest.get('platforms').map(function (platform) { 585 591 return App.PlatformProxyForPopup.create({content: platform, … … 1593 1599 App.AnalysisTaskRoute = Ember.Route.extend({ 1594 1600 model: function (param) { 1595 var store = this.store; 1596 return this.store.find('analysisTask', param.taskId).then(function (task) { 1597 return App.AnalysisTaskViewModel.create({content: task}); 1601 return store.find('analysisTask', param.taskId).then(function (task) { 1602 return App.AnalysisTaskViewModel.create({content: task, store: store}); 1598 1603 }); 1599 1604 }, … … 1607 1612 var platformId = this.get('platform').get('id'); 1608 1613 var metricId = this.get('metric').get('id'); 1609 App.Manifest.fetchRunsWithPlatformAndMetric(this. store, platformId, metricId).then(this._fetchedRuns.bind(this));1614 App.Manifest.fetchRunsWithPlatformAndMetric(this.get('store'), platformId, metricId).then(this._fetchedRuns.bind(this)); 1610 1615 }.observes('platform', 'metric').on('init'), 1611 1616 _fetchedRuns: function (data) { -
trunk/Websites/perf.webkit.org/public/v2/manifest.js
r175768 r176203 161 161 _repositoryById: {}, 162 162 _fetchPromise: null, 163 fetch: function () 164 { 165 if (this._fetchPromise) 166 return this._fetchPromise; 167 // FIXME: We shouldn't use DS.Store at all. 168 var store = App.__container__.lookup('store:main'); 169 var promise = store.findAll('platform'); 170 this._fetchPromise = promise.then(this._fetchedManifest.bind(this, store)); 163 fetch: function (store) 164 { 165 if (!this._fetchPromise) 166 this._fetchPromise = store.findAll('platform').then(this._fetchedManifest.bind(this, store)); 171 167 return this._fetchPromise; 172 168 },
Note: See TracChangeset
for help on using the changeset viewer.