From 835f1d788e1f767bb788a781f7c0bb98c1edcaae Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Wed, 10 Oct 2018 11:01:02 +0200 Subject: [PATCH] stackdriver: display error message if project name is not present in jwt file --- public/app/plugins/datasource/stackdriver/config_ctrl.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/app/plugins/datasource/stackdriver/config_ctrl.ts b/public/app/plugins/datasource/stackdriver/config_ctrl.ts index 13dba26ba86..9649a8772e9 100644 --- a/public/app/plugins/datasource/stackdriver/config_ctrl.ts +++ b/public/app/plugins/datasource/stackdriver/config_ctrl.ts @@ -45,6 +45,10 @@ export class StackdriverConfigCtrl { this.validationErrors.push('Client Email field missing in JWT file.'); } + if (!jwt.project_id || jwt.project_id.length === 0) { + this.validationErrors.push('Project Id field missing in JWT file.'); + } + if (this.validationErrors.length === 0) { this.inputDataValid = true; return true;