Bladeren bron

AMBARI-2791. NameNode HA Wizard: Review page. (Antonenko Alexander via yusaku)

Yusaku Sako 12 jaren geleden
bovenliggende
commit
6909d11086

+ 3 - 1
ambari-web/app/controllers/main/admin/highAvailability/step3_controller.js

@@ -18,5 +18,7 @@
 
 var App = require('app');
 
-App.HighAvailabilityWizardStep3Controller = Em.Controller.extend();
+App.HighAvailabilityWizardStep3Controller = Em.Controller.extend({
+  name:"highAvailabilityWizardStep3Controller"
+});
 

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

@@ -645,6 +645,12 @@ Em.I18n.translations = {
   'admin.highAvailability.wizard.step3.header':'Review',
   'admin.highAvailability.wizard.step4.header':'Apply',
 
+  'admin.highAvailability.wizard.step3.nn1':'Current NameNode is on {0}.',
+  'admin.highAvailability.wizard.step3.nn2':'Additional NameNode will be installed on {0}.',
+  'admin.highAvailability.wizard.step3.sn':'Existing Secondary NameNode on {0} will be disabled.',
+  'admin.highAvailability.wizard.step3.jn':'JournalNode will be installed on following hosts:',
+
+  'admin.highAvailability.wizard.step3.body':'Confirm your host selection and click Deploy to activate NameNode HA.',
   'admin.highAvailability.wizard.step2.body':'Select a host that will be running an additional NameNode.<br/> In addition,' +
   ' select 3 hosts that will be running JournalNodes to store NameNode edit logs in a fault tolerant maner.',
   'admin.highAvailability.wizard.step1.body':'We will walk you through enabling NameNode HA with this wizard.<br/>' +

+ 23 - 2
ambari-web/app/templates/main/admin/highAvailability/step3.hbs

@@ -16,7 +16,28 @@
 * limitations under the License.
 }}
 
+
 <h2>{{t admin.highAvailability.wizard.step3.header}}</h2>
-<div class="btn-area">
-  <a class="btn btn-success pull-right" {{action next}}>{{t common.next}} &rarr;</a>
+
+<div class="alert alert-info">
+  {{t admin.highAvailability.wizard.step3.body}}
+</div>
+
+<div id="step8-content" class="well pre-scrollable">
+  <div id="step8-info">
+    {{view.curNameNode}} <br/>
+    {{view.addNameNode}} <br/>
+    {{view.secondaryNameNode}} <br/>
+    {{t admin.highAvailability.wizard.step3.jn}} <br/>
+    <ul>
+      {{#each item in view.journalNodes}}
+        <li>{{item.hostName}}</li>
+      {{/each}}
+    </ul>
+  </div>
 </div>
+
+
+ <div class="btn-area">
+   <a class="btn btn-success pull-right" {{action next}}>{{t common.next}} &rarr;</a>
+ </div>

+ 17 - 1
ambari-web/app/views/main/admin/highAvailability/step3_view.js

@@ -21,6 +21,22 @@ var App = require('app');
 
 App.HighAvailabilityWizardStep3View = Em.View.extend({
 
-  templateName: require('templates/main/admin/highAvailability/step3')
+  templateName: require('templates/main/admin/highAvailability/step3'),
+
+  curNameNode: function () {
+    var nN = this.get('controller.content.masterComponentHosts').findProperty('isCurNameNode', true);
+    return Em.I18n.t('admin.highAvailability.wizard.step3.nn1').format(nN.hostName);
+  }.property('controller.content.masterComponentHosts'),
+  addNameNode: function () {
+    var addNN = this.get('controller.content.masterComponentHosts').findProperty('isAddNameNode', true);
+    return Em.I18n.t('admin.highAvailability.wizard.step3.nn2').format(addNN.hostName);
+  }.property('controller.content.masterComponentHosts'),
+  secondaryNameNode: function () {
+    var sn = this.get('controller.content.masterComponentHosts').findProperty('component', "SECONDARY_NAMENODE");
+    return Em.I18n.t('admin.highAvailability.wizard.step3.sn').format(sn.hostName);
+  }.property('controller.content.masterComponentHosts'),
+  journalNodes: function () {
+    return this.get('controller.content.masterComponentHosts').filterProperty('component', "JOURNALNODE");
+  }.property('controller.content.masterComponentHosts')
 
 });