+2014-11-17 Ryosuke Niwa <rniwa@webkit.org>
+
+ App.Manifest shouldn't use App.__container__.lookup
+ https://bugs.webkit.org/show_bug.cgi?id=138768
+
+ Reviewed by Andreas Kling.
+
+ Removed the hack to find the store object via App.__container__.lookup.
+ Pass around the store object instead.
+
+ * public/v2/app.js:
+ (App.DashboardRow._createPane): Add "store" property to the pane.
+ (App.DashboardPaneProxyForPicker._platformOrMetricIdChanged): Ditto.
+ (App.IndexController.gridChanged): Ditto.
+ (App.IndexController.actions.addRow): Ditto.
+ (App.IndexController.init): Ditto.
+ (App.Pane._fetch): Ditto.
+ (App.ChartsController._parsePaneList): Ditto.
+ (App.ChartsController._updateQueryString): Ditto.
+ (App.ChartsController.actions.addPaneByMetricAndPlatform): Ditto.
+ (App.BuildPopup): Ditto.
+ (App.AnalysisTaskRoute.model): Ditto.
+ (App.AnalysisTaskViewModel._taskUpdated): Ditto.
+
+ * public/v2/manifest.js:
+ (App.Manifest.fetch): Removed the code to find the store object.
+
2014-11-08 Ryosuke Niwa <rniwa@webkit.org>
Fix Ember.js warnings the new perf dashboard
paneInfo = null;
var pane = App.Pane.create({
+ store: this.get('store'),
platformId: paneInfo ? paneInfo[0] : null,
metricId: paneInfo ? paneInfo[1] : null,
});
_platformOrMetricIdChanged: function ()
{
var self = this;
- App.BuildPopup('choosePane', this)
+ App.BuildPopup(this.get('store'), 'choosePane', this)
.then(function (platforms) { self.set('pickerData', platforms); });
}.observes('platformId', 'metricId').on('init'),
paneList: function () {
return {label:name, index: index};
}));
+ var store = this.store;
this.set('rows', table.slice(1).map(function (rowParam) {
return App.DashboardRow.create({
+ store: store,
header: rowParam[0],
cellsInfo: rowParam.slice(1),
columnCount: columnCount,
addRow: function ()
{
this.get('rows').pushObject(App.DashboardRow.create({
+ store: this.store,
header: this.get('newRowHeader'),
columnCount: this.get('columnCount'),
}));
init: function ()
{
this._super();
- App.Manifest.fetch();
+ App.Manifest.fetch(this.get('store'));
}
});
else {
var self = this;
- App.Manifest.fetchRunsWithPlatformAndMetric(this.store, platformId, metricId).then(function (result) {
+ App.Manifest.fetchRunsWithPlatformAndMetric(this.get('store'), platformId, metricId).then(function (result) {
self.set('platform', result.platform);
self.set('metric', result.metric);
self.set('chartData', result.runs);
}
}
return App.Pane.create({
+ store: self.store,
info: paneInfo,
platformId: paneInfo[0],
metricId: paneInfo[1],
addPaneByMetricAndPlatform: function (param)
{
this.addPane(App.Pane.create({
+ store, this.store,
platformId: param.platform.get('id'),
metricId: param.metric.get('id'),
showingDetails: false
{
this._super();
var self = this;
- App.BuildPopup('addPaneByMetricAndPlatform').then(function (platforms) {
+ App.BuildPopup(this.store, 'addPaneByMetricAndPlatform').then(function (platforms) {
self.set('platforms', platforms);
});
},
});
-App.BuildPopup = function(action, position)
+App.BuildPopup = function(store, action, position)
{
- return App.Manifest.fetch().then(function () {
+ return App.Manifest.fetch(store).then(function () {
return App.Manifest.get('platforms').map(function (platform) {
return App.PlatformProxyForPopup.create({content: platform,
action: action, position: position});
App.AnalysisTaskRoute = Ember.Route.extend({
model: function (param) {
- var store = this.store;
- return this.store.find('analysisTask', param.taskId).then(function (task) {
- return App.AnalysisTaskViewModel.create({content: task});
+ return store.find('analysisTask', param.taskId).then(function (task) {
+ return App.AnalysisTaskViewModel.create({content: task, store: store});
});
},
});
{
var platformId = this.get('platform').get('id');
var metricId = this.get('metric').get('id');
- App.Manifest.fetchRunsWithPlatformAndMetric(this.store, platformId, metricId).then(this._fetchedRuns.bind(this));
+ App.Manifest.fetchRunsWithPlatformAndMetric(this.get('store'), platformId, metricId).then(this._fetchedRuns.bind(this));
}.observes('platform', 'metric').on('init'),
_fetchedRuns: function (data) {
var runs = data.runs;