Browse Source

AMBARI-14942 Reinstallation of a failed component should ask for Kerberos password 2. (ababiichuk)

ababiichuk 9 years ago
parent
commit
91897d9701
1 changed files with 14 additions and 11 deletions
  1. 14 11
      ambari-web/app/controllers/main/host/bulk_operations_controller.js

+ 14 - 11
ambari-web/app/controllers/main/host/bulk_operations_controller.js

@@ -233,18 +233,21 @@ App.BulkOperationsController = Em.Controller.extend({
    * @param {Ember.Enumerable} hosts - list of affected hosts
    * @param {Ember.Enumerable} hosts - list of affected hosts
    */
    */
   bulkOperationForHostsReinstall: function (operationData, hosts) {
   bulkOperationForHostsReinstall: function (operationData, hosts) {
-    return App.ajax.send({
-      name: 'common.host_components.update',
-      sender: this,
-      data: {
-        HostRoles: {
-          state: 'INSTALLED'
+    var self = this;
+    App.get('router.mainAdminKerberosController').getKDCSessionState(function () {
+      return App.ajax.send({
+        name: 'common.host_components.update',
+        sender: self,
+        data: {
+          HostRoles: {
+            state: 'INSTALLED'
+          },
+          query: 'HostRoles/host_name.in(' + hosts.mapProperty('hostName').join(',') + ')&HostRoles/state=INSTALL_FAILED',
+          context: operationData.message,
+          noOpsMessage: Em.I18n.t('hosts.host.maintainance.reinstallFailedComponents.context')
         },
         },
-        query: 'HostRoles/host_name.in(' + hosts.mapProperty('hostName').join(',') + ')&HostRoles/state=INSTALL_FAILED',
-        context: operationData.message,
-        noOpsMessage: Em.I18n.t('hosts.host.maintainance.reinstallFailedComponents.context')
-      },
-      success: 'bulkOperationForHostComponentsSuccessCallback'
+        success: 'bulkOperationForHostComponentsSuccessCallback'
+      });
     });
     });
   },
   },