Implements proposal #597
This commit is contained in:
committed by
GOESSEL Guillaume
parent
b96e09cd1c
commit
9cfb7e210a
5
dist/datasource-zabbix/datasource.js
vendored
5
dist/datasource-zabbix/datasource.js
vendored
@@ -244,9 +244,8 @@ System.register(['lodash', 'app/core/utils/datemath', './utils', './migrations',
|
|||||||
this.disableReadOnlyUsersAck = jsonData.disableReadOnlyUsersAck;
|
this.disableReadOnlyUsersAck = jsonData.disableReadOnlyUsersAck;
|
||||||
|
|
||||||
// Direct DB Connection options
|
// Direct DB Connection options
|
||||||
var dbConnectionOptions = jsonData.dbConnection || {};
|
this.enableDirectDBConnection = jsonData.dbConnectionEnable || false;
|
||||||
this.enableDirectDBConnection = dbConnectionOptions.enable;
|
this.sqlDatasourceId = jsonData.dbConnectionDatasourceId;
|
||||||
this.sqlDatasourceId = dbConnectionOptions.datasourceId;
|
|
||||||
|
|
||||||
var zabbixOptions = {
|
var zabbixOptions = {
|
||||||
username: this.username,
|
username: this.username,
|
||||||
|
|||||||
2
dist/datasource-zabbix/datasource.js.map
vendored
2
dist/datasource-zabbix/datasource.js.map
vendored
File diff suppressed because one or more lines are too long
8
dist/datasource-zabbix/partials/config.html
vendored
8
dist/datasource-zabbix/partials/config.html
vendored
@@ -1,4 +1,4 @@
|
|||||||
<datasource-http-settings current="ctrl.current">
|
<datasource-http-settings current="ctrl.current" suggest-url="http://localhost/zabbix/api_jsonrpc.php">
|
||||||
</datasource-http-settings>
|
</datasource-http-settings>
|
||||||
|
|
||||||
<div class="gf-form-group">
|
<div class="gf-form-group">
|
||||||
@@ -79,9 +79,9 @@
|
|||||||
<h3 class="page-heading">Direct DB Connection</h3>
|
<h3 class="page-heading">Direct DB Connection</h3>
|
||||||
<gf-form-switch class="gf-form" label-class="width-12"
|
<gf-form-switch class="gf-form" label-class="width-12"
|
||||||
label="Enable"
|
label="Enable"
|
||||||
checked="ctrl.current.jsonData.dbConnection.enable">
|
checked="ctrl.current.jsonData.dbConnectionEnable">
|
||||||
</gf-form-switch>
|
</gf-form-switch>
|
||||||
<div ng-if="ctrl.current.jsonData.dbConnection.enable">
|
<div ng-if="ctrl.current.jsonData.dbConnectionEnable">
|
||||||
<div class="gf-form max-width-20">
|
<div class="gf-form max-width-20">
|
||||||
<span class="gf-form-label width-12">
|
<span class="gf-form-label width-12">
|
||||||
SQL Data Source
|
SQL Data Source
|
||||||
@@ -94,7 +94,7 @@
|
|||||||
</info-popover>
|
</info-popover>
|
||||||
</span>
|
</span>
|
||||||
<div class="gf-form-select-wrapper max-width-16">
|
<div class="gf-form-select-wrapper max-width-16">
|
||||||
<select class="gf-form-input" ng-model="ctrl.current.jsonData.dbConnection.datasourceId"
|
<select class="gf-form-input" ng-model="ctrl.current.jsonData.dbConnectionDatasourceId"
|
||||||
ng-options="ds.id as ds.name for ds in ctrl.sqlDataSources">
|
ng-options="ds.id as ds.name for ds in ctrl.sqlDataSources">
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -15,9 +15,7 @@ describe('ZabbixDatasource', () => {
|
|||||||
trends: true,
|
trends: true,
|
||||||
trendsFrom: '14d',
|
trendsFrom: '14d',
|
||||||
trendsRange: '7d',
|
trendsRange: '7d',
|
||||||
dbConnection: {
|
dbConnectionEnable: false
|
||||||
enabled: false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
ctx.templateSrv = {};
|
ctx.templateSrv = {};
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
2
dist/vendor/npm/tether.min.js
vendored
2
dist/vendor/npm/tether.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -52,9 +52,8 @@ class ZabbixAPIDatasource {
|
|||||||
this.disableReadOnlyUsersAck = jsonData.disableReadOnlyUsersAck;
|
this.disableReadOnlyUsersAck = jsonData.disableReadOnlyUsersAck;
|
||||||
|
|
||||||
// Direct DB Connection options
|
// Direct DB Connection options
|
||||||
let dbConnectionOptions = jsonData.dbConnection || {};
|
this.enableDirectDBConnection = jsonData.dbConnectionEnable || false;
|
||||||
this.enableDirectDBConnection = dbConnectionOptions.enable;
|
this.sqlDatasourceId = jsonData.dbConnectionDatasourceId;
|
||||||
this.sqlDatasourceId = dbConnectionOptions.datasourceId;
|
|
||||||
|
|
||||||
let zabbixOptions = {
|
let zabbixOptions = {
|
||||||
username: this.username,
|
username: this.username,
|
||||||
|
|||||||
@@ -79,9 +79,9 @@
|
|||||||
<h3 class="page-heading">Direct DB Connection</h3>
|
<h3 class="page-heading">Direct DB Connection</h3>
|
||||||
<gf-form-switch class="gf-form" label-class="width-12"
|
<gf-form-switch class="gf-form" label-class="width-12"
|
||||||
label="Enable"
|
label="Enable"
|
||||||
checked="ctrl.current.jsonData.dbConnection.enable">
|
checked="ctrl.current.jsonData.dbConnectionEnable">
|
||||||
</gf-form-switch>
|
</gf-form-switch>
|
||||||
<div ng-if="ctrl.current.jsonData.dbConnection.enable">
|
<div ng-if="ctrl.current.jsonData.dbConnectionEnable">
|
||||||
<div class="gf-form max-width-20">
|
<div class="gf-form max-width-20">
|
||||||
<span class="gf-form-label width-12">
|
<span class="gf-form-label width-12">
|
||||||
SQL Data Source
|
SQL Data Source
|
||||||
@@ -94,7 +94,7 @@
|
|||||||
</info-popover>
|
</info-popover>
|
||||||
</span>
|
</span>
|
||||||
<div class="gf-form-select-wrapper max-width-16">
|
<div class="gf-form-select-wrapper max-width-16">
|
||||||
<select class="gf-form-input" ng-model="ctrl.current.jsonData.dbConnection.datasourceId"
|
<select class="gf-form-input" ng-model="ctrl.current.jsonData.dbConnectionDatasourceId"
|
||||||
ng-options="ds.id as ds.name for ds in ctrl.sqlDataSources">
|
ng-options="ds.id as ds.name for ds in ctrl.sqlDataSources">
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -15,9 +15,7 @@ describe('ZabbixDatasource', () => {
|
|||||||
trends: true,
|
trends: true,
|
||||||
trendsFrom: '14d',
|
trendsFrom: '14d',
|
||||||
trendsRange: '7d',
|
trendsRange: '7d',
|
||||||
dbConnection: {
|
dbConnectionEnable: false
|
||||||
enabled: false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
ctx.templateSrv = {};
|
ctx.templateSrv = {};
|
||||||
|
|||||||
Reference in New Issue
Block a user