diff --git a/public/app/plugins/datasource/stackdriver/config_ctrl.ts b/public/app/plugins/datasource/stackdriver/config_ctrl.ts index 7c5b1fd29e7..f72677b467a 100644 --- a/public/app/plugins/datasource/stackdriver/config_ctrl.ts +++ b/public/app/plugins/datasource/stackdriver/config_ctrl.ts @@ -15,6 +15,8 @@ export class StackdriverConfigCtrl { this.datasourceSrv = datasourceSrv; this.current.jsonData = this.current.jsonData || {}; this.current.secureJsonData = this.current.secureJsonData || {}; + this.current.secureJsonFields = this.current.secureJsonFields || {}; + console.log(this.current.secureJsonFields.privateKey); this.defaultProject = this.current.jsonData.defaultProject; this.projects = []; } @@ -74,6 +76,10 @@ export class StackdriverConfigCtrl { this.jsonText = ''; this.loadingProjects = false; this.projectsError = ''; + + this.current.jsonData = {}; + this.current.secureJsonData = {}; + this.current.secureJsonFields = {}; } async displayProjects() { diff --git a/public/app/plugins/datasource/stackdriver/partials/config.html b/public/app/plugins/datasource/stackdriver/partials/config.html index b3a8d55b5ef..138f69e7b1e 100644 --- a/public/app/plugins/datasource/stackdriver/partials/config.html +++ b/public/app/plugins/datasource/stackdriver/partials/config.html @@ -1,44 +1,59 @@ -