From 6b5b5f818bad2086903f307a4ef200eab9c1feea Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Fri, 5 Jul 2019 16:23:36 +0300 Subject: [PATCH] fix direct DB connection datasource config, closes #731 --- src/datasource-zabbix/config.controller.js | 6 ++++-- src/datasource-zabbix/partials/config.html | 10 ++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/datasource-zabbix/config.controller.js b/src/datasource-zabbix/config.controller.js index 342c4f0..926d5b0 100644 --- a/src/datasource-zabbix/config.controller.js +++ b/src/datasource-zabbix/config.controller.js @@ -29,9 +29,7 @@ export class ZabbixDSConfigController { this.current.jsonData = migrateDSConfig(this.current.jsonData); _.defaults(this.current.jsonData, defaultConfig); - this.dbConnectionEnable = this.current.jsonData.dbConnectionEnable; this.dbConnectionDatasourceId = this.current.jsonData.dbConnectionDatasourceId; - this.dbDataSources = this.getSupportedDBDataSources(); this.zabbixVersions = _.cloneDeep(zabbixVersions); this.autoDetectZabbixVersion(); @@ -81,4 +79,8 @@ export class ZabbixDSConfigController { } }); } + + onDBConnectionDatasourceChange() { + this.current.jsonData.dbConnectionDatasourceId = this.dbConnectionDatasourceId; + } } diff --git a/src/datasource-zabbix/partials/config.html b/src/datasource-zabbix/partials/config.html index 2ca3538..6b389f3 100644 --- a/src/datasource-zabbix/partials/config.html +++ b/src/datasource-zabbix/partials/config.html @@ -88,9 +88,9 @@

Direct DB Connection

+ checked="ctrl.current.jsonData.dbConnectionEnable"> -
+
Data Source @@ -103,8 +103,10 @@
-