Forráskód Böngészése

AMBARI-10659. Ranger Admin HA Wizard: Review step. (akovalenko)

Aleksandr Kovalenko 10 éve
szülő
commit
502d40b02a

+ 8 - 0
ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/wizard_controller.js

@@ -78,6 +78,14 @@ App.RAHighAvailabilityWizardController = App.WizardController.extend({
           return dfd.promise();
         }
       }
+    ],
+    '3': [
+      {
+        type: 'sync',
+        callback: function () {
+          this.load('raHosts');
+        }
+      }
     ]
   },
 

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

@@ -1230,6 +1230,11 @@ Em.I18n.translations = {
   'admin.ra_highAvailability.wizard.step2.header': 'Select Hosts',
   'admin.ra_highAvailability.wizard.step2.body': 'Select a host or hosts that will be running the additional Ranger Admin components',
   'admin.ra_highAvailability.wizard.step3.header': 'Review',
+  'admin.ra_highAvailability.wizard.step3.alert_message': '<b>Confirm your host selections.</b>',
+  'admin.ra_highAvailability.wizard.step3.currentRA': 'Current Ranger Admin',
+  'admin.ra_highAvailability.wizard.step3.additionalRA': 'Additional Ranger Admin',
+  'admin.rm_highAvailability.wizard.step3.configs_changes': '<b>Review Configuration Changes.</b></br>' +
+  '<i>policymgr_external_url</i> in admin-properties.xml will be changed by the Wizard to enable Ranger Admin HA',
   'admin.ra_highAvailability.wizard.step4.header': 'Install, Start and Test',
   'admin.ra_highAvailability.closePopup':'Enable Ranger Admin HA Wizard is in progress. You must allow the wizard to complete for Ambari to be in usable state. ' +
   'If you choose to quit, you must follow manual instructions to complete or revert enabling Ranger Admin HA as documented in the Ambari User Guide. Are you sure you want to exit the wizard?',

+ 14 - 2
ambari-web/app/routes/ra_high_availability_routes.js

@@ -126,6 +126,16 @@ module.exports = App.WizardRoute.extend({
       })
     },
     next: function (router) {
+      var wizardController = router.get('rAHighAvailabilityWizardController');
+      var stepController = router.get('rAHighAvailabilityWizardStep2Controller');
+      var currentRA = stepController.get('servicesMasters').filterProperty('component_name', 'RANGER_ADMIN').findProperty('isInstalled', true);
+      var additionalRAs = stepController.get('servicesMasters').filterProperty('component_name', 'RANGER_ADMIN').filterProperty('isInstalled', false);
+      var raHosts = {
+        currentRA: currentRA.get('selectedHost'),
+        additionalRA: additionalRAs.mapProperty('selectedHost')
+      };
+      wizardController.set('content.raHosts', raHosts);
+      wizardController.save('raHosts');
       router.transitionTo('step3');
     },
     back: function (router) {
@@ -139,8 +149,10 @@ module.exports = App.WizardRoute.extend({
       var controller = router.get('rAHighAvailabilityWizardController');
       controller.dataLoading().done(function () {
         controller.setCurrentStep('3');
-        controller.connectOutlet('rAHighAvailabilityWizardStep3', controller.get('content'));
-      })
+        controller.loadAllPriorSteps().done(function () {
+          controller.connectOutlet('rAHighAvailabilityWizardStep3', controller.get('content'));
+        })
+      });
     },
     next: function (router) {
       router.transitionTo('step4');

+ 31 - 0
ambari-web/app/templates/main/admin/highAvailability/rangerAdmin/step3.hbs

@@ -15,6 +15,37 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 }}
+<h2>{{t admin.ra_highAvailability.wizard.step3.header}}</h2>
+
+<div class="alert alert-info">
+  {{t admin.ra_highAvailability.wizard.step3.alert_message}}
+</div>
+
+<div id="ha-step3-content" class="well pre-scrollable">
+  <div id="step8-info">
+    <table id="ha-step3-review-table">
+      <tr>
+        <td>
+          <b>{{t admin.ra_highAvailability.wizard.step3.currentRA}}</b>:
+        </td>
+        <td>{{controller.content.raHosts.currentRA}}</td>
+        <td></td>
+      </tr>
+      {{#each host in controller.content.raHosts.additionalRA}}
+        <tr>
+          <td>
+            <b>{{t admin.ra_highAvailability.wizard.step3.additionalRA}}</b>:
+          </td>
+          <td>{{host}}</td>
+          <td><span class="to-be-installed-green"><i class="icon-plus"></i>&nbsp;{{t admin.highAvailability.wizard.step3.toBeInstalled}}</span></td>
+        </tr>
+      {{/each}}
+    </table>
+  </div>
+</div>
+<div class="alert alert-info">
+  {{{t admin.rm_highAvailability.wizard.step3.configs_changes}}}
+</div>
 <div class="btn-area">
   <a class="btn" {{action back}}>&larr; {{t common.back}}</a>
   <a class="btn btn-success pull-right" {{action next}}>{{t common.next}} &rarr;</a>