ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject git commit: AMBARI-3248. Installer wizard: Relogging in shows error message on welcome page. (Andrii Babiichuk via yusaku)
Date Mon, 16 Sep 2013 17:58:42 GMT
Updated Branches:
  refs/heads/trunk 99983453b -> fce0467e9


AMBARI-3248. Installer wizard: Relogging in shows error message on welcome page. (Andrii Babiichuk
via yusaku)


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

Branch: refs/heads/trunk
Commit: fce0467e9617a628ef1e1ffc997c299d477e3b3d
Parents: 9998345
Author: Yusaku Sako <yusaku@hortonworks.com>
Authored: Mon Sep 16 10:57:58 2013 -0700
Committer: Yusaku Sako <yusaku@hortonworks.com>
Committed: Mon Sep 16 10:58:32 2013 -0700

----------------------------------------------------------------------
 ambari-web/app/controllers/wizard/step0_controller.js | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/fce0467e/ambari-web/app/controllers/wizard/step0_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step0_controller.js b/ambari-web/app/controllers/wizard/step0_controller.js
index 445c656..fbf167e 100644
--- a/ambari-web/app/controllers/wizard/step0_controller.js
+++ b/ambari-web/app/controllers/wizard/step0_controller.js
@@ -25,19 +25,15 @@ App.WizardStep0Controller = Em.Controller.extend({
 
   loadStep: function () {
     this.set('hasSubmitted',false);
+    this.set('clusterNameError', '');
   },
   /**
    * validate cluster name
    * set clusterNameError if validation fails
    */
   invalidClusterName : function(){
-    if(!this.get('hasSubmitted')){
-      this.set('clusterNameError', '');
-      return false;
-    }
-
     var clusterName = this.get('content.cluster.name');
-    if (clusterName == '') {
+    if (clusterName == '' && this.get('hasSubmitted')) {
       this.set('clusterNameError', Em.I18n.t('installer.step0.clusterName.error.required'));
       return true;
     } else if (/\s/.test(clusterName)) {
@@ -50,7 +46,7 @@ App.WizardStep0Controller = Em.Controller.extend({
       this.set('clusterNameError', '');
       return false;
     }
-  }.property('hasSubmitted', 'content.cluster.name').cacheable(),
+  }.property('hasSubmitted', 'content.cluster.name'),
 
   /**
    * calculates by <code>invalidClusterName</code> property


Mime
View raw message