ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiw...@apache.org
Subject ambari git commit: AMBARI-13640. Ranger Quick links not working in Ranger-admin HA.(xiwang)
Date Fri, 30 Oct 2015 20:33:58 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 ed2394ef1 -> 7fb4d8cc3


AMBARI-13640. Ranger Quick links not working 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/7fb4d8cc
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7fb4d8cc
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7fb4d8cc

Branch: refs/heads/branch-2.1
Commit: 7fb4d8cc36d60304b9dfa19933a9e9e19af92892
Parents: ed2394e
Author: Xi Wang <xiwang@apache.org>
Authored: Thu Oct 29 17:49:28 2015 -0700
Committer: Xi Wang <xiwang@apache.org>
Committed: Fri Oct 30 13:33:40 2015 -0700

----------------------------------------------------------------------
 ambari-web/app/views/common/quick_view_link_view.js | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7fb4d8cc/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 89b855e..fb48cb9 100644
--- a/ambari-web/app/views/common/quick_view_link_view.js
+++ b/ambari-web/app/views/common/quick_view_link_view.js
@@ -75,7 +75,7 @@ App.QuickViewLinks = Em.View.extend({
   /**
    * list of files that contains properties for enabling/disabling ssl
    */
-  requiredSiteNames: ['hadoop-env','yarn-env','hbase-env','oozie-env','mapred-env','storm-env',
'falcon-env', 'core-site', 'hdfs-site', 'hbase-site', 'oozie-site', 'yarn-site', 'mapred-site',
'storm-site', 'spark-defaults', 'accumulo-site', 'application-properties', 'ranger-admin-site',
'ranger-site'],
+  requiredSiteNames: ['hadoop-env','yarn-env','hbase-env','oozie-env','mapred-env','storm-env',
'falcon-env', 'core-site', 'hdfs-site', 'hbase-site', 'oozie-site', 'yarn-site', 'mapred-site',
'storm-site', 'spark-defaults', 'accumulo-site', 'application-properties', 'ranger-admin-site',
'ranger-site', 'admin-properties'],
   /**
    * Get public host name by its host name.
    *
@@ -152,6 +152,15 @@ App.QuickViewLinks = Em.View.extend({
           } else if (item.get('service_id') === 'MAPREDUCE2') {
             siteConfigs = self.get('configProperties').findProperty('type', item.get('site')).properties;
             item.set('url', item.get('template').fmt(protocol, siteConfigs[item.get(protocol
+ '_config')]));
+          } else if (item.get('service_id') === 'RANGER') {
+            siteConfigs = self.get('configProperties').findProperty('type', 'admin-properties').properties;
+            if (siteConfigs['policymgr_external_url']) {
+              // external_url example: "http://c6404.ambari.apache.org:6080"
+              var hostAndPort = siteConfigs['policymgr_external_url'] && siteConfigs['policymgr_external_url'].split('://')[1];
+              item.set('url', protocol + '://' + hostAndPort);
+            } else {
+              item.set('url', item.get('template').fmt(protocol, hosts[0], port));
+            }
           } else {
             item.set('url', item.get('template').fmt(protocol, hosts[0], port));
           }


Mime
View raw message