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

AMBARI-12328 Background operations popup window does not use service display name for restart operations. (Sangeeta Ravindran via ababiichuk)

aBabiichuk 10 éve
szülő
commit
13ffc4d203

+ 2 - 2
ambari-web/app/controllers/main/service/info/configs.js

@@ -625,13 +625,13 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ConfigsLoader, A
       App.router.get('mainServiceItemController').checkNnLastCheckpointTime(function () {
         return App.showConfirmationFeedBackPopup(function (query) {
           var selectedService = self.get('content.id');
-          batchUtils.restartAllServiceHostComponents(selectedService, true, query);
+          batchUtils.restartAllServiceHostComponents(serviceDisplayName, selectedService, true, query);
         }, bodyMessage);
       });
     } else {
       return App.showConfirmationFeedBackPopup(function (query) {
         var selectedService = self.get('content.id');
-        batchUtils.restartAllServiceHostComponents(selectedService, true, query);
+        batchUtils.restartAllServiceHostComponents(serviceDisplayName, selectedService, true, query);
       }, bodyMessage);
     }
   },

+ 2 - 2
ambari-web/app/controllers/main/service/item.js

@@ -613,12 +613,12 @@ App.MainServiceItemController = Em.Controller.extend(App.SupportClientConfigsDow
       this.get('content.hostComponents').filterProperty('componentName', 'NAMENODE').someProperty('workStatus', App.HostComponentStatus.started)) {
       this.checkNnLastCheckpointTime(function () {
         return App.showConfirmationFeedBackPopup(function(query, runMmOperation) {
-          batchUtils.restartAllServiceHostComponents(serviceName, false, query, runMmOperation);
+          batchUtils.restartAllServiceHostComponents(serviceDisplayName, serviceName, false, query, runMmOperation);
         }, bodyMessage);
       });
     } else {
       return App.showConfirmationFeedBackPopup(function(query, runMmOperation) {
-        batchUtils.restartAllServiceHostComponents(serviceName, false, query, runMmOperation);
+        batchUtils.restartAllServiceHostComponents(serviceDisplayName, serviceName, false, query, runMmOperation);
       }, bodyMessage);
     }
   },

+ 3 - 2
ambari-web/app/utils/batch_scheduled_requests.js

@@ -65,14 +65,15 @@ module.exports = {
 
   /**
    * Facade-function for restarting host components of specific service
+   * @param {String} serviceDisplayName for which service hostComponents should be restarted
    * @param {String} serviceName for which service hostComponents should be restarted
    * @param {bool} staleConfigsOnly restart only hostComponents with <code>staleConfig</code> true
    * @param {Object} query
    * @param {bool} runMmOperation
    */
-  restartAllServiceHostComponents: function(serviceName, staleConfigsOnly, query, runMmOperation) {
+  restartAllServiceHostComponents: function(serviceDisplayName, serviceName, staleConfigsOnly, query, runMmOperation) {
     var self = this;
-    var context = staleConfigsOnly ? Em.I18n.t('rollingrestart.context.allWithStaleConfigsForSelectedService').format(serviceName) : Em.I18n.t('rollingrestart.context.allForSelectedService').format(serviceName);
+    var context = staleConfigsOnly ? Em.I18n.t('rollingrestart.context.allWithStaleConfigsForSelectedService').format(serviceDisplayName) : Em.I18n.t('rollingrestart.context.allForSelectedService').format(serviceDisplayName);
 
     if (runMmOperation) {
       this.turnOnOffPassiveRequest('ON', Em.I18n.t('passiveState.turnOnFor').format(serviceName), serviceName);

+ 2 - 2
ambari-web/app/views/main/service/info/summary.js

@@ -348,13 +348,13 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, {
       App.router.get('mainServiceItemController').checkNnLastCheckpointTime(function () {
         return App.showConfirmationFeedBackPopup(function (query) {
           var selectedService = self.get('service.id');
-          batchUtils.restartAllServiceHostComponents(selectedService, true, query);
+          batchUtils.restartAllServiceHostComponents(serviceDisplayName, selectedService, true, query);
         }, bodyMessage);
       });
     } else {
       return App.showConfirmationFeedBackPopup(function (query) {
         var selectedService = self.get('service.id');
-        batchUtils.restartAllServiceHostComponents(selectedService, true, query);
+        batchUtils.restartAllServiceHostComponents(serviceDisplayName, selectedService, true, query);
       }, bodyMessage);
     }
   },