ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [05/22] ambari git commit: AMBARI-20926. Ranger Quick links not showing load balancer in Ranger-admin HA.(xiwang)
Date Mon, 08 May 2017 14:02:56 GMT
AMBARI-20926. Ranger Quick links not showing load balancer in Ranger-admin HA.(xiwang)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0971f413
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0971f413
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0971f413

Branch: refs/heads/branch-feature-AMBARI-12556
Commit: 0971f413934a1acc38266f7fcf4c34554a6ac1d8
Parents: b0d7f00
Author: Xi Wang <xiwang@apache.org>
Authored: Wed May 3 16:07:42 2017 -0700
Committer: Xi Wang <xiwang@apache.org>
Committed: Wed May 3 17:41:40 2017 -0700

----------------------------------------------------------------------
 ambari-web/app/views/common/quick_view_link_view.js  | 7 ++++++-
 ambari-web/test/views/common/quick_link_view_test.js | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0971f413/ambari-web/app/views/common/quick_view_link_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/quick_view_link_view.js b/ambari-web/app/views/common/quick_view_link_view.js
index 94cc2d3..47958f4 100644
--- a/ambari-web/app/views/common/quick_view_link_view.js
+++ b/ambari-web/app/views/common/quick_view_link_view.js
@@ -187,7 +187,7 @@ App.QuickLinksView = Em.View.extend({
     if (!Em.isNone(quickLinksConfig)) {
       var protocolConfig = Em.get(quickLinksConfig, 'protocol');
       var checks = Em.get(protocolConfig, 'checks');
-      var sites = ['core-site', 'hdfs-site'];
+      var sites = ['core-site', 'hdfs-site', 'admin-properties'];
       if (checks) {
         checks.forEach(function (check) {
           var protocolConfigSiteProp = Em.get(check, 'site');
@@ -359,6 +359,11 @@ App.QuickLinksView = Em.View.extend({
           host = hostObj.Hosts.public_host_name;
         }
       }
+    } else if (serviceName === 'RANGER') {
+      var siteConfigs = this.get('configProperties').findProperty('type', 'admin-properties').properties;
+      if (siteConfigs['policymgr_external_url']) {
+        host = siteConfigs['policymgr_external_url'].split('://')[1].split(':')[0];
+      }
     }
 
     var linkPort = this.setPort(Em.get(link, 'port'), protocol, configProperties);

http://git-wip-us.apache.org/repos/asf/ambari/blob/0971f413/ambari-web/test/views/common/quick_link_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/common/quick_link_view_test.js b/ambari-web/test/views/common/quick_link_view_test.js
index fbdb711..48cdb28 100644
--- a/ambari-web/test/views/common/quick_link_view_test.js
+++ b/ambari-web/test/views/common/quick_link_view_test.js
@@ -205,7 +205,7 @@ describe('App.QuickViewLinks', function () {
       quickViewLinks.set('content.serviceName', 'YARN');
       mock.returns(quickLinksConfigYARN);
       quickViewLinks.loadQuickLinksConfigSuccessCallback({items: []});
-      expect(quickViewLinks.get('requiredSiteNames')).to.be.eql(["core-site", "hdfs-site",
"hbase-site", "yarn-site"]);
+      expect(quickViewLinks.get('requiredSiteNames')).to.be.eql(["core-site", "hdfs-site",
"admin-properties", "hbase-site", "yarn-site"]);
     });
   });
 


Mime
View raw message