فهرست منبع

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

Erik Sundell 7 سال پیش
والد
کامیت
835f1d788e
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  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;