You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2015/08/28 18:04:18 UTC
ambari git commit: AMBARI-12920. “Oozie Quick links" in Ambari points to incorrect URL after enabling SSL (alexantonenko)
Repository: ambari
Updated Branches:
refs/heads/branch-2.1 d5d630fd7 -> a2ed53375
AMBARI-12920. “Oozie Quick links" in Ambari points to incorrect URL after enabling SSL (alexantonenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a2ed5337
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a2ed5337
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a2ed5337
Branch: refs/heads/branch-2.1
Commit: a2ed53375dcff1d1b74721f683aa3248611e8b59
Parents: d5d630f
Author: Alex Antonenko <hi...@gmail.com>
Authored: Fri Aug 28 19:01:10 2015 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Fri Aug 28 19:04:05 2015 +0300
----------------------------------------------------------------------
.../app/views/common/quick_view_link_view.js | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/a2ed5337/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 8eb8d7c..9fa2044 100644
--- a/ambari-web/app/views/common/quick_view_link_view.js
+++ b/ambari-web/app/views/common/quick_view_link_view.js
@@ -142,7 +142,7 @@ App.QuickViewLinks = Em.View.extend({
} else if (hosts.length == 1) {
quickLinks = this.get('content.quickLinks').map(function (item) {
- var protocol = self.setProtocol(item.get('service_id'), self.get('configProperties'), self.ambariProperties());
+ var protocol = self.setProtocol(item.get('service_id'), self.get('configProperties'), self.ambariProperties(), item);
if (item.get('template')) {
var port = item.get('http_config') && self.setPort(item, protocol);
if (['FALCON', 'OOZIE', 'ATLAS'].contains(item.get('service_id'))) {
@@ -326,7 +326,7 @@ App.QuickViewLinks = Em.View.extend({
* @returns {string} "https" or "http" only!
* @method setProtocol
*/
- setProtocol: function (service_id, configProperties, ambariProperties) {
+ setProtocol: function (service_id, configProperties, ambariProperties, item) {
var hadoopSslEnabled = false;
if (configProperties && configProperties.length > 0) {
var hdfsSite = configProperties.findProperty('type', 'hdfs-site');
@@ -380,6 +380,20 @@ App.QuickViewLinks = Em.View.extend({
}
return "http";
break;
+ case "OOZIE":
+ var site = configProperties.findProperty('type', 'oozie-site');
+ var url = site && site.properties && site.properties['oozie.base.url'];
+ var re = new RegExp(item.get('regex'));
+ var portValue = url && url.match(re);
+ var port = portValue && portValue.length && portValue[1];
+ var protocol = 'http';
+
+ if (port === '11443') {
+ protocol = 'https';
+ }
+
+ return protocol;
+ break;
case "RANGER":
var rangerProperties = configProperties && configProperties.findProperty('type', 'ranger-admin-site');
var rangerSiteProperties = configProperties && configProperties.findProperty('type', 'ranger-site');
@@ -442,6 +456,7 @@ App.QuickViewLinks = Em.View.extend({
var re = new RegExp(item.get('regex'));
var portValue = propertyValue.match(re);
+
return portValue[1];
},