Browse Source

stackdriver: display error message if project name is not present in jwt file

Erik Sundell 7 năm trước cách đây
mục cha
commit
835f1d788e
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      public/app/plugins/datasource/stackdriver/config_ctrl.ts

+ 4 - 0
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;