ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atk...@apache.org
Subject ambari git commit: AMBARI-13537 ATS & JHS HA: UI changes are needed for QuickLink for JHS points to ViP. (atkach)
Date Fri, 23 Oct 2015 09:48:44 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 4e2f5f860 -> e7f77b6b2


AMBARI-13537 ATS & JHS HA: UI changes are needed for QuickLink for JHS points to ViP.
(atkach)


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

Branch: refs/heads/trunk
Commit: e7f77b6b25fb3b29ca7fff40994e5f7a79c0025d
Parents: 4e2f5f8
Author: Andrii Tkach <atkach@hortonworks.com>
Authored: Fri Oct 23 12:48:31 2015 +0300
Committer: Andrii Tkach <atkach@hortonworks.com>
Committed: Fri Oct 23 12:48:31 2015 +0300

----------------------------------------------------------------------
 ambari-web/app/models/quick_links.js                | 8 ++++----
 ambari-web/app/views/common/quick_view_link_view.js | 5 +++++
 2 files changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/e7f77b6b/ambari-web/app/models/quick_links.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/quick_links.js b/ambari-web/app/models/quick_links.js
index 8fe6be6..1aac608 100644
--- a/ambari-web/app/models/quick_links.js
+++ b/ambari-web/app/models/quick_links.js
@@ -229,7 +229,7 @@ App.QuickLinks.FIXTURES = [
     label:'JobHistory UI',
     url:'%@://%@:%@',
     service_id: 'MAPREDUCE2',
-    template:'%@://%@:%@',
+    template:'%@://%@',
     http_config: 'mapreduce.jobhistory.webapp.address',
     https_config: 'mapreduce.jobhistory.webapp.https.address',
     site: 'mapred-site',
@@ -241,7 +241,7 @@ App.QuickLinks.FIXTURES = [
     label:'JobHistory logs',
     url:'%@://%@:%@/logs',
     service_id: 'MAPREDUCE2',
-    template:'%@://%@:%@/logs',
+    template:'%@://%@/logs',
     http_config: 'mapreduce.jobhistory.webapp.address',
     https_config: 'mapreduce.jobhistory.webapp.https.address',
     site: 'mapred-site',
@@ -253,7 +253,7 @@ App.QuickLinks.FIXTURES = [
     label:'JobHistory JMX',
     url:'%@://%@:%@/jmx',
     service_id: 'MAPREDUCE2',
-    template:'%@://%@:%@/jmx',
+    template:'%@://%@/jmx',
     http_config: 'mapreduce.jobhistory.webapp.address',
     https_config: 'mapreduce.jobhistory.webapp.https.address',
     site: 'mapred-site',
@@ -265,7 +265,7 @@ App.QuickLinks.FIXTURES = [
     label:'Thread Stacks',
     url:'%@://%@:%@/stacks',
     service_id: 'MAPREDUCE2',
-    template:'%@://%@:%@/stacks',
+    template:'%@://%@/stacks',
     http_config: 'mapreduce.jobhistory.webapp.address',
     https_config: 'mapreduce.jobhistory.webapp.https.address',
     site: 'mapred-site',

http://git-wip-us.apache.org/repos/asf/ambari/blob/e7f77b6b/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 5421e67..89b855e 100644
--- a/ambari-web/app/views/common/quick_view_link_view.js
+++ b/ambari-web/app/views/common/quick_view_link_view.js
@@ -143,10 +143,15 @@ App.QuickViewLinks = Em.View.extend({
 
       quickLinks = this.get('content.quickLinks').map(function (item) {
         var protocol = self.setProtocol(item.get('service_id'), self.get('configProperties'),
self.ambariProperties(), item);
+        var siteConfigs = {};
+
         if (item.get('template')) {
           var port = item.get('http_config') && self.setPort(item, protocol);
           if (['FALCON', 'OOZIE', 'ATLAS'].contains(item.get('service_id'))) {
             item.set('url', item.get('template').fmt(protocol, hosts[0], port, App.router.get('loginName')));
+          } 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 {
             item.set('url', item.get('template').fmt(protocol, hosts[0], port));
           }


Mime
View raw message