mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
tech(lodash): began migration work
This commit is contained in:
@@ -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'});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user