Переглянути джерело

AMBARI-4092 Need tooltip showing error why local repo is bad 2.(ababiichuk)

aBabiichuk 11 роки тому
батько
коміт
7a93855069
1 змінених файлів з 3 додано та 1 видалено
  1. 3 1
      ambari-web/app/controllers/installer.js

+ 3 - 1
ambari-web/app/controllers/installer.js

@@ -374,6 +374,8 @@ App.InstallerController = App.WizardController.extend({
       this.set('validationCnt', selectedStack.get('operatingSystems').filterProperty('selected', true).length);
       this.set('invalidCnt', 0);
       selectedStack.operatingSystems.forEach(function (os) {
+        os.errorTitle = null;
+        os.errorContent = null;
         if (os.skipValidation) {
           this.set('validationCnt', 0);
         }
@@ -430,7 +432,7 @@ App.InstallerController = App.WizardController.extend({
       var os = selectedStack.operatingSystems.findProperty('osType', osType);
       os.validation = 'icon-exclamation-sign';
       os.errorTitle = request.status + ":" + request.statusText;
-      os.errorContent = $.parseJSON(request.responseText).message;
+      os.errorContent = $.parseJSON(request.responseText) ? $.parseJSON(request.responseText).message : "";
       selectedStack.set('reload', !selectedStack.get('reload'));
       this.set('validationCnt', this.get('validationCnt') - 1);
       this.set('invalidCnt', this.get('invalidCnt') + 1);