ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [45/50] [abbrv] git commit: AMBARI-7641. Jobs View proxy does not apply all URL query params (alejandro)
Date Sat, 04 Oct 2014 03:17:28 GMT
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/branch-alerts-dev
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