ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject ambari git commit: AMBARI-17856: quicklink url protocol type check should allow type specified as HTTP and HTTPS (dili)
Date Mon, 25 Jul 2016 14:59:42 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk e3fb0b02e -> c5b1285ef


AMBARI-17856: quicklink url protocol type check should allow type specified as HTTP and HTTPS
(dili)


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

Branch: refs/heads/trunk
Commit: c5b1285efd2902e1cff4775ba09d05cd10b44833
Parents: e3fb0b0
Author: Di Li <dili@apache.org>
Authored: Mon Jul 25 10:59:13 2016 -0400
Committer: Di Li <dili@apache.org>
Committed: Mon Jul 25 10:59:13 2016 -0400

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


http://git-wip-us.apache.org/repos/asf/ambari/blob/c5b1285e/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 17d7c04..2678c1c 100644
--- a/ambari-web/app/views/common/quick_view_link_view.js
+++ b/ambari-web/app/views/common/quick_view_link_view.js
@@ -746,6 +746,9 @@ App.QuickViewLinks = Em.View.extend({
     if ('HTTP_ONLY' === protocolType) {
       return 'http';
     }
+
+    protocolType = protocolType.toLowerCase();
+
     var count = 0;
     var checks = Em.get(protocolConfig, 'checks');
     if (!checks) {
@@ -760,6 +763,7 @@ App.QuickViewLinks = Em.View.extend({
         count++;
       }
     }, this);
+
     return count ? this.reverseType(protocolType) : protocolType;
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/c5b1285e/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 f9a52b1..e83878c 100644
--- a/ambari-web/test/views/common/quick_link_view_test.js
+++ b/ambari-web/test/views/common/quick_link_view_test.js
@@ -657,7 +657,7 @@ describe('App.QuickViewLinks', function () {
         ],
         quickLinksConfig: {
           protocol:{
-            type:"https",
+            type:"HTTPS",
             checks:
               [
                 {
@@ -737,7 +737,7 @@ describe('App.QuickViewLinks', function () {
         configProperties: [{type: 'ranger-site', properties: {'http.enabled': 'true'}}],
         quickLinksConfig: {
           protocol:{
-            type:"https",
+            type:"HTTPS",
             checks:
               [
                 {


Mime
View raw message