Browse Source

AMBARI-9968. Request for Kerberos service check must be changed (alexantonenko)

Alex Antonenko 10 years ago
parent
commit
d451aced80

+ 5 - 1
ambari-web/app/controllers/main/admin/kerberos/step3_controller.js

@@ -78,7 +78,11 @@ App.KerberosWizardStep3Controller = App.KerberosProgressPageController.extend({
       'data': {
       'data': {
         'serviceName': this.serviceName,
         'serviceName': this.serviceName,
         'displayName': App.format.role(this.serviceName),
         'displayName': App.format.role(this.serviceName),
-        'actionName': this.serviceName + '_SERVICE_CHECK'
+        'actionName': this.serviceName + '_SERVICE_CHECK',
+        'operationLevel': {
+          "level": "CLUSTER",
+          "cluster_name": App.get('clusterName')
+        }
       }
       }
     });
     });
   },
   },

+ 11 - 7
ambari-web/app/utils/ajax/ajax.js

@@ -477,15 +477,19 @@ var urls = {
     'real': '/clusters/{clusterName}/requests',
     'real': '/clusters/{clusterName}/requests',
     'mock': '/data/wizard/deploy/poll_1.json',
     'mock': '/data/wizard/deploy/poll_1.json',
     'format': function (data) {
     'format': function (data) {
+      var requestData = {
+        "RequestInfo": {
+          "context": data.displayName + " Service Check",
+          "command": data.actionName
+        },
+        "Requests/resource_filters": [{"service_name": data.serviceName}]
+      };
+      if (data.operationLevel) {
+        requestData.RequestInfo.operation_level = data.operationLevel;
+      }
       return {
       return {
         'type': 'POST',
         'type': 'POST',
-        data: JSON.stringify({
-          "RequestInfo": {
-            "context": data.displayName + " Service Check",
-            "command": data.actionName
-          },
-          "Requests/resource_filters": [{"service_name": data.serviceName}]
-        })
+        data: JSON.stringify(requestData)
       };
       };
     }
     }
   },
   },