Updated Branches:
  refs/heads/trunk b27fa4bde -> 8fa171913

AMBARI-2660. Host checks say pass when all hosts failed to register. (srimanth)


Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/8fa17191
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/8fa17191
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/8fa17191

Branch: refs/heads/trunk
Commit: 8fa171913549813fe84ed0af93278234e5c659e1
Parents: b27fa4b
Author: Srimanth Gunturi <[email protected]>
Authored: Tue Jul 16 11:38:54 2013 -0700
Committer: Srimanth Gunturi <[email protected]>
Committed: Tue Jul 16 11:38:54 2013 -0700

----------------------------------------------------------------------
 ambari-web/app/messages.js                |  1 +
 ambari-web/app/views/wizard/step3_view.js | 12 ++++++++----
 2 files changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/8fa17191/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index cec7d8e..0a606f4 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -372,6 +372,7 @@ Em.I18n.translations = {
   'installer.step3.warnings.noWarnings':'All host checks passed on {0} 
registered hosts.',
   'installer.step3.warnings.fails':'Some warnings were encountered while 
performing checks against the {0} registered hosts above',
   'installer.step3.warnings.someWarnings':'All host checks passed on {0} 
registered hosts. Note: Host checks were skipped on {1} 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.failed':'Host Checks update failed',
   'installer.step3.removeSelected':'Remove Selected',

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/8fa17191/ambari-web/app/views/wizard/step3_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/step3_view.js 
b/ambari-web/app/views/wizard/step3_view.js
index aae545e..d4f8e0a 100644
--- a/ambari-web/app/views/wizard/step3_view.js
+++ b/ambari-web/app/views/wizard/step3_view.js
@@ -51,10 +51,14 @@ App.WizardStep3View = Em.View.extend({
       if (failedHosts == 0) {
         // all are ok
         this.set('message', 
Em.I18n.t('installer.step3.warnings.noWarnings').format(hosts.length));
-      }
-      else {
-          // some failed
-          this.set('message', 
Em.I18n.t('installer.step3.warnings.someWarnings').format(hosts.length, 
failedHosts));
+      } else if (failedHosts == hosts.length) {
+        // all failed
+        this.set('status', 'alert-warn');
+        this.set('linkText', '');
+        this.set('message', 
Em.I18n.t('installer.step3.warnings.allFailed').format(failedHosts));
+      } else {
+        // some failed
+        this.set('message', 
Em.I18n.t('installer.step3.warnings.someWarnings').format((hosts.length-failedHosts),
 failedHosts));
       }
     }
   }.observes('controller.isHostHaveWarnings', 
'[email protected]')

Reply via email to