|
|
@ -614,6 +614,9 @@ class GraphCtrl extends MetricsPanelCtrl { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private async _getDatasourceByName(name: string) { |
|
|
|
private async _getDatasourceByName(name: string) { |
|
|
|
|
|
|
|
if(name === null) { |
|
|
|
|
|
|
|
throw new Error('Trying to get datasource with NULL name'); |
|
|
|
|
|
|
|
} |
|
|
|
if(this._datasources[name] === undefined) { |
|
|
|
if(this._datasources[name] === undefined) { |
|
|
|
const datasource = await this.backendSrv.get(`/api/datasources/name/${name}`); |
|
|
|
const datasource = await this.backendSrv.get(`/api/datasources/name/${name}`); |
|
|
|
return datasource; |
|
|
|
return datasource; |
|
|
|