ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alejan...@apache.org
Subject git commit: AMBARI-7641. Jobs View proxy does not apply all URL query params (alejandro)
Date Fri, 03 Oct 2014 21:04:15 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 30bdc96f8 -> ddabf125b


AMBARI-7641. Jobs View proxy does not apply all URL query params (alejandro)


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

Branch: refs/heads/trunk
Commit: ddabf125b5d7b0eda5d2fe6b8f56be9b5a5dc0ca
Parents: 30bdc96
Author: Alejandro Fernandez <afernandez@hortonworks.com>
Authored: Fri Oct 3 14:03:52 2014 -0700
Committer: Alejandro Fernandez <afernandez@hortonworks.com>
Committed: Fri Oct 3 14:03:52 2014 -0700

----------------------------------------------------------------------
 .../jobs/src/main/resources/ui/app/scripts/helpers/ajax.js     | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ddabf125/contrib/views/jobs/src/main/resources/ui/app/scripts/helpers/ajax.js
----------------------------------------------------------------------
diff --git a/contrib/views/jobs/src/main/resources/ui/app/scripts/helpers/ajax.js b/contrib/views/jobs/src/main/resources/ui/app/scripts/helpers/ajax.js
index 728b26a..3caecb1 100644
--- a/contrib/views/jobs/src/main/resources/ui/app/scripts/helpers/ajax.js
+++ b/contrib/views/jobs/src/main/resources/ui/app/scripts/helpers/ajax.js
@@ -138,6 +138,12 @@ var formatUrl = function (url, data) {
       }
       url = url.replace(new RegExp(key, 'g'), replace);
     });
+
+    var pattern = "/proxy?url=";
+    var index = url.indexOf(pattern);
+    if (index > -1) {
+      url = url.substring(0, index) + pattern + escape(url.substring(index + pattern.length));
+    }
   }
   return url;
 };


Mime
View raw message