fix new setting default value handling.

This commit is contained in:
Ramiro Morales 2018-10-15 21:40:40 -03:00
parent d859a6aeb8
commit 90de703ef2
3 changed files with 12 additions and 5 deletions

View File

@ -0,0 +1,10 @@
export class MssqlConfigCtrl {
static templateUrl = 'partials/config.html';
current: any;
/** @ngInject */
constructor($scope) {
this.current.jsonData.encrypt = this.current.jsonData.encrypt || 'false';
}
}

View File

@ -1,9 +1,6 @@
import { MssqlDatasource } from './datasource';
import { MssqlQueryCtrl } from './query_ctrl';
class MssqlConfigCtrl {
static templateUrl = 'partials/config.html';
}
import { MssqlConfigCtrl } from './config_ctrl';
const defaultQuery = `SELECT
<time_column> as time,

View File

@ -31,7 +31,7 @@
<div class="gf-form">
<label class="gf-form-label width-7">Encrypt</label>
<div class="gf-form-select-wrapper max-width-15 gf-form-select-wrapper--has-help-icon">
<select class="gf-form-input" ng-model="ctrl.current.jsondata.encrypt" ng-options="mode for mode in ['disable', 'false', 'true']" ng-init="ctrl.current.jsondata.encrypt"></select>
<select class="gf-form-input" ng-model="ctrl.current.jsonData.encrypt" ng-options="mode for mode in ['disable', 'false', 'true']" ng-init="ctrl.current.jsonData.encrypt"></select>
<info-popover mode="right-absolute">
Determines whether or to which extent a secure SSL TCP/IP connection will be negotiated with the server.
<ul>