Browse Source

AMBARI-13277. Provide an option to not start services in Install / Add Hosts / Add Service Wizard. Additional patch (akovalenko)

Aleksandr Kovalenko 9 years ago
parent
commit
c53cfffdd0

+ 10 - 1
ambari-web/app/controllers/wizard/step10_controller.js

@@ -211,7 +211,8 @@ App.WizardStep10Controller = Em.Controller.extend({
    * @method loadStartedServices
    */
   loadStartedServices: function () {
-    if (this.get('content.cluster.status') === 'STARTED') {
+    var status = this.get('content.cluster.status');
+    if (status === 'STARTED') {
       this.get('clusterInfo').pushObject(Em.Object.create({
         id: 3,
         color: 'text-success',
@@ -225,6 +226,14 @@ App.WizardStep10Controller = Em.Controller.extend({
         status: []
       }));
       return true;
+    } else if (status === 'START_SKIPPED') {
+      this.get('clusterInfo').pushObject(Em.Object.create({
+        id: 3,
+        color: 'text-warning',
+        displayStatement: Em.I18n.t('installer.step10.startStatus.skipped'),
+        status: []
+      }));
+      return false
     } else {
       this.get('clusterInfo').pushObject(Em.Object.create({
         id: 3,

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

@@ -892,6 +892,7 @@ Em.I18n.translations = {
   'installer.step10.installStatus.installed':'Master services installed',
   'installer.step10.master.installedOn':'{0} installed on {1}',
   'installer.step10.startStatus.failed':'Starting services failed',
+  'installer.step10.startStatus.skipped':'Starting services skipped',
   'installer.step10.startStatus.passed':'All tests passed',
   'installer.step10.startStatus.started':'All services started',
   'installer.step10.installTime.seconds':'Install and start completed in {0} seconds',

+ 2 - 2
ambari-web/app/views/wizard/step9_view.js

@@ -272,7 +272,7 @@ App.WizardStep9View = App.TableView.extend({
       this.set('resultMsg', this.get('controller.content.cluster.status') === 'START_SKIPPED' ? Em.I18n.t('installer.step9.status.skipStartSuccess') : Em.I18n.t('installer.step9.status.success'));
       this.set('resultMsgColor', 'alert-success');
     }
-  }.observes('controller.status', 'controller.startCallFailed','isHostHeartbeatLost'),
+  }.observes('controller.status', 'controller.content.cluster.status', 'controller.startCallFailed','isHostHeartbeatLost'),
 
   /**
    * Show popup with info about failed hosts
@@ -434,4 +434,4 @@ App.HostStatusView = Em.View.extend({
     });
   }
 
-});
+});

+ 8 - 1
ambari-web/test/controllers/wizard/step10_test.js

@@ -345,6 +345,13 @@ describe('App.WizardStep10Controller', function () {
           ids: [3],
           r: false
         }
+      },
+      {
+        status: 'START_SKIPPED',
+        e: {
+          ids: [3],
+          r: false
+        }
       }
     ]);
     tests.forEach(function(test) {
@@ -432,4 +439,4 @@ describe('App.WizardStep10Controller', function () {
     });
   });
 
-});
+});