Explorar o código

AMBARI-3639. Reassign wizard "Assign Master": on HA enabled cluster, button next is disabled without explanation. (akovalenko)

Aleksandr Kovalenko %!s(int64=11) %!d(string=hai) anos
pai
achega
e524a02977

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

@@ -1098,6 +1098,8 @@ Em.I18n.translations = {
     'for cluster downtime when reassigning {0}.</b>',
 
   'services.reassign.step2.header':'Assign Master',
+  'services.reassign.step2.body':'Assign {0} to new host.',
+  'services.reassign.step2.body.namenodeHA':'Assign {0} to new host. You can reassign only one master component at a time.',
   'services.reassign.step3.header':'Review',
   'services.reassign.step3.body':'Please review the changes you made',
   'services.reassign.step3.targetHost':'Target Host:',

+ 1 - 1
ambari-web/app/templates/wizard/step5.hbs

@@ -18,7 +18,7 @@
 
 <h2>{{title}}</h2>
 <div class="alert alert-info">
-  {{t installer.step5.body}}
+  {{view.body}}
   {{#if hasHiveServer}}
     <br>
     {{t installer.step5.body.hive}}

+ 8 - 1
ambari-web/app/views/main/service/reassign/step2_view.js

@@ -19,4 +19,11 @@
 
 var App = require('app');
 
-App.ReassignMasterWizardStep2View = App.WizardStep5View.extend();
+App.ReassignMasterWizardStep2View = App.WizardStep5View.extend({
+  body: function () {
+    if (this.get('controller.content.reassign.component_name') === 'NAMENODE' && !App.HostComponent.find().someProperty('componentName', 'SECONDARY_NAMENODE')) {
+      return Em.I18n.t('services.reassign.step2.body.namenodeHA').format(this.get('controller.content.reassign.display_name'));
+    }
+    return Em.I18n.t('services.reassign.step2.body').format(this.get('controller.content.reassign.display_name'));
+  }.property('controller.content.reassign.component_name', 'controller.content.reassign.display_name')
+});

+ 3 - 1
ambari-web/app/views/wizard/step5_view.js

@@ -26,7 +26,9 @@ App.WizardStep5View = Em.View.extend({
 
   didInsertElement:function () {
     this.get('controller').loadStep();
-  }
+  },
+
+  body: Em.I18n.t('installer.step5.body')
 
 });