From 28ae0eca887f5e373df6c0d1d74f3d71dd66830b Mon Sep 17 00:00:00 2001 From: rozetko Date: Fri, 5 Apr 2019 10:45:53 +0300 Subject: [PATCH] fix (#238) --- src/panel/graph_panel/graph_ctrl.ts | 6 +++--- src/panel/graph_panel/partials/tab_analytics.html | 2 +- src/panel/graph_panel/partials/tab_webhooks.html | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) 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