|
|
@ -197,7 +197,7 @@ class GraphCtrl extends MetricsPanelCtrl { |
|
|
|
this.rebindKeys(); |
|
|
|
this.rebindKeys(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
getHasticDatasource(): { url: string, name: string } | undefined { |
|
|
|
get hasticDatasource(): { url: string, name: string } | undefined { |
|
|
|
const hasticDatasourceId = this.panel.hasticDatasource; |
|
|
|
const hasticDatasourceId = this.panel.hasticDatasource; |
|
|
|
if(hasticDatasourceId !== undefined && hasticDatasourceId !== null) { |
|
|
|
if(hasticDatasourceId !== undefined && hasticDatasourceId !== null) { |
|
|
|
const hasticDatasource = _.find(this._hasticDatasources, { id: hasticDatasourceId }); |
|
|
|
const hasticDatasource = _.find(this._hasticDatasources, { id: hasticDatasourceId }); |
|
|
@ -314,7 +314,7 @@ class GraphCtrl extends MetricsPanelCtrl { |
|
|
|
this.processor = new DataProcessor(this.panel); |
|
|
|
this.processor = new DataProcessor(this.panel); |
|
|
|
|
|
|
|
|
|
|
|
await this._fetchHasticDatasources(); |
|
|
|
await this._fetchHasticDatasources(); |
|
|
|
let hasticDatasource = this.getHasticDatasource(); |
|
|
|
let hasticDatasource = this.hasticDatasource; |
|
|
|
if(hasticDatasource === undefined) { |
|
|
|
if(hasticDatasource === undefined) { |
|
|
|
delete this.analyticService; |
|
|
|
delete this.analyticService; |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -670,7 +670,7 @@ class GraphCtrl extends MetricsPanelCtrl { |
|
|
|
datasource = await this._getDatasourceByName(this.panel.datasource); |
|
|
|
datasource = await this._getDatasourceByName(this.panel.datasource); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const hasticDatasource = this.getHasticDatasource(); |
|
|
|
const hasticDatasource = this.hasticDatasource; |
|
|
|
|
|
|
|
|
|
|
|
let grafanaVersion = 'unknown'; |
|
|
|
let grafanaVersion = 'unknown'; |
|
|
|
if(_.has(window, 'grafanaBootData.settings.buildInfo.version')) { |
|
|
|
if(_.has(window, 'grafanaBootData.settings.buildInfo.version')) { |
|
|
|