From 381e4a51cdff92de9672667b865aed2efaa28765 Mon Sep 17 00:00:00 2001 From: Arve Knudsen Date: Mon, 19 Apr 2021 10:30:29 +0200 Subject: [PATCH] SQL data sources: Fix configuration UI (#33110) * fix frontend mssql/postgres * fix frontend Co-authored-by: Ying WANG --- public/app/plugins/datasource/mssql/config_ctrl.ts | 1 + public/app/plugins/datasource/postgres/config_ctrl.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/public/app/plugins/datasource/mssql/config_ctrl.ts b/public/app/plugins/datasource/mssql/config_ctrl.ts index 26c04cfb1a6..af84f70c9c6 100644 --- a/public/app/plugins/datasource/mssql/config_ctrl.ts +++ b/public/app/plugins/datasource/mssql/config_ctrl.ts @@ -16,6 +16,7 @@ export class MssqlConfigCtrl { /** @ngInject */ constructor($scope: any) { + this.current = $scope.ctrl.current; this.current.jsonData.encrypt = this.current.jsonData.encrypt || 'false'; this.current.jsonData.authenticationType = this.current.jsonData.authenticationType || 'SQL Server Authentication'; this.onPasswordReset = createResetHandler(this, PasswordFieldEnum.Password); diff --git a/public/app/plugins/datasource/postgres/config_ctrl.ts b/public/app/plugins/datasource/postgres/config_ctrl.ts index c13dcfdf791..9881229f2a6 100644 --- a/public/app/plugins/datasource/postgres/config_ctrl.ts +++ b/public/app/plugins/datasource/postgres/config_ctrl.ts @@ -19,6 +19,7 @@ export class PostgresConfigCtrl { /** @ngInject */ constructor($scope: any, datasourceSrv: DatasourceSrv) { + this.current = $scope.ctrl.current; this.datasourceSrv = datasourceSrv; this.current.jsonData.sslmode = this.current.jsonData.sslmode || 'verify-full'; this.current.jsonData.tlsConfigurationMethod = this.current.jsonData.tlsConfigurationMethod || 'file-path';