فهرست منبع

AMBARI-2952. Installer wizard: Host check label says all hosts passed when all hosts are deleted by user. (Andrii Babiichuk via yusaku)

Yusaku Sako 12 سال پیش
والد
کامیت
fb20eab51a
2فایلهای تغییر یافته به همراه7 افزوده شده و 3 حذف شده
  1. 1 0
      ambari-web/app/messages.js
  2. 6 3
      ambari-web/app/views/wizard/step3_view.js

+ 1 - 0
ambari-web/app/messages.js

@@ -389,6 +389,7 @@ Em.I18n.translations = {
   'installer.step3.warnings.allFailed':'Host checks were skipped on {0} hosts that failed to register.',
   'installer.step3.warnings.allFailed':'Host checks were skipped on {0} hosts that failed to register.',
   'installer.step3.warnings.updateChecks.success':'Host Checks successfully updated',
   'installer.step3.warnings.updateChecks.success':'Host Checks successfully updated',
   'installer.step3.warnings.updateChecks.failed':'Host Checks update failed',
   'installer.step3.warnings.updateChecks.failed':'Host Checks update failed',
+  'installer.step3.warnings.missingHosts':'There is no registered host',
   'installer.step3.removeSelected':'Remove Selected',
   'installer.step3.removeSelected':'Remove Selected',
   'installer.step3.retryFailed':'Retry Failed',
   'installer.step3.retryFailed':'Retry Failed',
   'installer.step3.hosts.status.registering':'Registering',
   'installer.step3.hosts.status.registering':'Registering',

+ 6 - 3
ambari-web/app/views/wizard/step3_view.js

@@ -40,12 +40,15 @@ App.WizardStep3View = Em.View.extend({
         failedHosts++;
         failedHosts++;
       }
       }
     });
     });
-    if (this.get('controller.isHostHaveWarnings')) {
+    if (hosts.length==0) {
+      this.set('status', 'alert-warn');
+      this.set('linkText', '');
+      this.set('message', Em.I18n.t('installer.step3.warnings.missingHosts'));
+    } else if (this.get('controller.isHostHaveWarnings')) {
       this.set('status', 'alert-warn');
       this.set('status', 'alert-warn');
       this.set('linkText', Em.I18n.t('installer.step3.warnings.linkText'));
       this.set('linkText', Em.I18n.t('installer.step3.warnings.linkText'));
       this.set('message', Em.I18n.t('installer.step3.warnings.fails').format(hosts.length, failedHosts));
       this.set('message', Em.I18n.t('installer.step3.warnings.fails').format(hosts.length, failedHosts));
-    }
-    else {
+    } else {
       this.set('status', 'alert-success');
       this.set('status', 'alert-success');
       this.set('linkText', Em.I18n.t('installer.step3.noWarnings.linkText'));
       this.set('linkText', Em.I18n.t('installer.step3.noWarnings.linkText'));
       if (failedHosts == 0) {
       if (failedHosts == 0) {