diff --git a/src/panel/graph_panel/graph_ctrl.ts b/src/panel/graph_panel/graph_ctrl.ts index f7a4df2..985b9f5 100644 --- a/src/panel/graph_panel/graph_ctrl.ts +++ b/src/panel/graph_panel/graph_ctrl.ts @@ -197,7 +197,7 @@ class GraphCtrl extends MetricsPanelCtrl { this.rebindKeys(); } - getHasticDatasource(): { url: string, name: string } | undefined { + get hasticDatasource(): { url: string, name: string } | undefined { const hasticDatasourceId = this.panel.hasticDatasource; if(hasticDatasourceId !== undefined && hasticDatasourceId !== null) { const hasticDatasource = _.find(this._hasticDatasources, { id: hasticDatasourceId }); @@ -314,7 +314,7 @@ class GraphCtrl extends MetricsPanelCtrl { this.processor = new DataProcessor(this.panel); await this._fetchHasticDatasources(); - let hasticDatasource = this.getHasticDatasource(); + let hasticDatasource = this.hasticDatasource; if(hasticDatasource === undefined) { delete this.analyticService; } else { @@ -670,7 +670,7 @@ class GraphCtrl extends MetricsPanelCtrl { datasource = await this._getDatasourceByName(this.panel.datasource); } - const hasticDatasource = this.getHasticDatasource(); + const hasticDatasource = this.hasticDatasource; let grafanaVersion = 'unknown'; if(_.has(window, 'grafanaBootData.settings.buildInfo.version')) { diff --git a/src/panel/graph_panel/partials/tab_analytics.html b/src/panel/graph_panel/partials/tab_analytics.html index 73870de..3cfcc2c 100644 --- a/src/panel/graph_panel/partials/tab_analytics.html +++ b/src/panel/graph_panel/partials/tab_analytics.html @@ -11,7 +11,7 @@
-
Hastic server at "{{ctrl.backendURL}}" is not available
+
Hastic server at "{{ctrl.hasticDatasource.url}}" is not available