Updated Branches:
  refs/heads/trunk f0fcead3e -> 1ea82541b

AMBARI-3227. NameNode HA Wizard: Nameservice ID validation error does not show 
up.


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

Branch: refs/heads/trunk
Commit: 1ea82541bda549894e27027357e339711785de10
Parents: f0fcead
Author: Alex Antonenko <[email protected]>
Authored: Fri Sep 13 20:52:31 2013 +0300
Committer: Alex Antonenko <[email protected]>
Committed: Fri Sep 13 20:52:31 2013 +0300

----------------------------------------------------------------------
 ambari-web/app/messages.js                                     | 1 +
 ambari-web/app/templates/main/admin/highAvailability/step1.hbs | 3 +++
 ambari-web/app/views/main/admin/highAvailability/step1_view.js | 2 +-
 3 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/1ea82541/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 9173f06..6aba592 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -663,6 +663,7 @@ Em.I18n.translations = {
   
'admin.highAvailability.wizard.step1.nameserviceid.tooltip.title':'Nameservice 
ID',
   'admin.highAvailability.wizard.step1.nameserviceid.tooltip.content':'This 
will be the ID for the NameNode HA cluster. For example, if you set Nameservice 
ID to <b>mycluster</b>, the logical URI for HDFS will be 
<b>hdfs://mycluster</b>.',
   'admin.highAvailability.wizard.step1.nameserviceid':'Nameservice ID',
+  'admin.highAvailability.wizard.step1.nameserviceid.error':'Must consist of 
letters, numbers, and hyphens. Cannot begin or end with a hyphen.',
   'admin.highAvailability.wizard.step2.header':'Select Hosts',
   'admin.highAvailability.wizard.step3.header':'Review',
   'admin.highAvailability.wizard.step4.header':'Create Checkpoint',

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/1ea82541/ambari-web/app/templates/main/admin/highAvailability/step1.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/highAvailability/step1.hbs 
b/ambari-web/app/templates/main/admin/highAvailability/step1.hbs
index 0fcb327..18aaefd 100644
--- a/ambari-web/app/templates/main/admin/highAvailability/step1.hbs
+++ b/ambari-web/app/templates/main/admin/highAvailability/step1.hbs
@@ -31,6 +31,9 @@
 
     <div class="controls">
       {{view Ember.TextField valueBinding="content.nameServiceId"}}
+      <span  {{bindAttr class=":help-inline view.showInputError::hidden"}}>
+        {{t admin.highAvailability.wizard.step1.nameserviceid.error}}
+      </span>
     </div>
   </div>
   <div class="btn-area">

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/1ea82541/ambari-web/app/views/main/admin/highAvailability/step1_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/highAvailability/step1_view.js 
b/ambari-web/app/views/main/admin/highAvailability/step1_view.js
index 7dc8bea..ad464eb 100644
--- a/ambari-web/app/views/main/admin/highAvailability/step1_view.js
+++ b/ambari-web/app/views/main/admin/highAvailability/step1_view.js
@@ -29,7 +29,7 @@ App.HighAvailabilityWizardStep1View = Em.View.extend({
   },
 
   showInputError: function () {
-    return !this.get('controller.isNameServiceIdValid') && 
this.get('controller.content.nameServiceId').length;
+    return !this.get('controller.isNameServiceIdValid') && 
this.get('controller.content.nameServiceId').length != 0 ;
   }.property('controller.isNameServiceIdValid', 'controller.nameServiceId')
 
 });

Reply via email to