tech(lodash): began migration work

This commit is contained in:
Torkel Ödegaard
2016-09-13 22:10:44 +02:00
parent 2146e69a11
commit 0fa0066cd9
35 changed files with 62 additions and 6854 deletions

View File

@@ -81,7 +81,7 @@ export class DataSourceEditCtrl {
this.hasDashboards = false;
return this.backendSrv.get('/api/plugins/' + this.current.type + '/settings').then(pluginInfo => {
this.datasourceMeta = pluginInfo;
this.hasDashboards = _.findWhere(pluginInfo.includes, {type: 'dashboard'});
this.hasDashboards = _.find(pluginInfo.includes, {type: 'dashboard'});
});
}

View File

@@ -51,7 +51,7 @@ export class PluginEditCtrl {
this.tabIndex = 1;
this.tabs.push('Config');
this.hasDashboards = _.findWhere(result.includes, {type: 'dashboard'});
this.hasDashboards = _.find(result.includes, {type: 'dashboard'});
if (this.hasDashboards) {
this.tabs.push('Dashboards');
}

View File

@@ -24,7 +24,7 @@ export class AppPageCtrl {
initPage(app) {
this.appModel = app;
this.page = _.findWhere(app.includes, {slug: this.$routeParams.slug});
this.page = _.find(app.includes, {slug: this.$routeParams.slug});
this.appLogoUrl = app.info.logos.small;
pluginInfoCache[this.pluginId] = app;