This is an automated email from the ASF dual-hosted git repository.

atkach pushed a commit to branch branch-2.6
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-2.6 by this push:
     new c0fcea8  AMBARI-23312 Regression : Adding Atlas Metadata server' for 
HA on an host takes forever.
c0fcea8 is described below

commit c0fcea8925a35be406c37a388b781dedf92996c5
Author: Andrii Tkach <[email protected]>
AuthorDate: Wed Mar 21 15:15:51 2018 +0200

    AMBARI-23312 Regression : Adding Atlas Metadata server' for HA on an host 
takes forever.
---
 ambari-web/app/controllers/main/host/details.js      | 20 ++++++++++++++++++++
 .../test/controllers/main/host/details_test.js       | 18 ++++++++++++++++++
 2 files changed, 38 insertions(+)

diff --git a/ambari-web/app/controllers/main/host/details.js 
b/ambari-web/app/controllers/main/host/details.js
index 49fdb19..cae84b1 100644
--- a/ambari-web/app/controllers/main/host/details.js
+++ b/ambari-web/app/controllers/main/host/details.js
@@ -109,6 +109,7 @@ App.MainHostDetailsController = 
Em.Controller.extend(App.SupportClientConfigsDow
     'ATLAS_SERVER': {
       deletePropertyName: 'deleteAtlasServer',
       hostPropertyName: 'atlasServer',
+      configTagsCallbackName: 'loadAtlasConfigs',
       configsCallbackName: 'onLoadAtlasConfigs'
     },
     'RANGER_KMS_SERVER': {
@@ -985,6 +986,25 @@ App.MainHostDetailsController = 
Em.Controller.extend(App.SupportClientConfigsDow
   },
 
   /**
+   * Success callback for Atlas load configs request
+   * @param {object} data
+   * @param {object} opt
+   * @param {object} params
+   * @method loadAtlasConfigs
+   */
+  loadAtlasConfigs: function (data, opt, params) {
+    var request = App.ajax.send({
+      name: 'admin.get.all_configurations',
+      sender: this,
+      data: {
+        urlParams: '(type=application-properties&tag=' + 
data.Clusters.desired_configs['application-properties'].tag + ')'
+      },
+      success: params.callback
+    });
+    this.trackRequest(request);
+  },
+
+  /**
    * Update zk configs
    * @param {object} configs
    * @method updateZkConfigs
diff --git a/ambari-web/test/controllers/main/host/details_test.js 
b/ambari-web/test/controllers/main/host/details_test.js
index eeb16af..fe8477c 100644
--- a/ambari-web/test/controllers/main/host/details_test.js
+++ b/ambari-web/test/controllers/main/host/details_test.js
@@ -677,6 +677,24 @@ describe('App.MainHostDetailsController', function () {
     });
   });
 
+  describe("#loadAtlasConfigs()", function() {
+    it("valid request is sent", function() {
+      controller.loadAtlasConfigs({Clusters: {
+        desired_configs: {
+          'application-properties': {
+            tag: 'tag'
+          }
+        }
+      }}, null, {});
+      var args = testHelpers.findAjaxRequest('name', 
'admin.get.all_configurations');
+      expect(args[0]).exists;
+      expect(args[0].sender).to.be.eql(controller);
+      expect(args[0].data).to.be.eql({
+        urlParams: '(type=application-properties&tag=tag)'
+      });
+    });
+  });
+
   describe("#loadRangerConfigs()", function() {
     it("valid request is sent", function() {
       controller.loadRangerConfigs({Clusters: {

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to