AMBARI-14940. Tez Ambari View: Improve host configuration logic. (SREENATH SOMARAJAPURAM via dbhowmick)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cff83481 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cff83481 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cff83481 Branch: refs/heads/branch-dev-patch-upgrade Commit: cff83481348b7e6def8403b344f83f51ef6d2d91 Parents: 268ae5b Author: Dipayan Bhowmick <dipayan.bhowm...@gmail.com> Authored: Mon Feb 8 17:56:00 2016 +0530 Committer: Dipayan Bhowmick <dipayan.bhowm...@gmail.com> Committed: Mon Feb 8 18:03:03 2016 +0530 ---------------------------------------------------------------------- .../views/tez/src/main/resources/ui/scripts/init-ambari-view.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/cff83481/contrib/views/tez/src/main/resources/ui/scripts/init-ambari-view.js ---------------------------------------------------------------------- diff --git a/contrib/views/tez/src/main/resources/ui/scripts/init-ambari-view.js b/contrib/views/tez/src/main/resources/ui/scripts/init-ambari-view.js index b45fef0..c246536 100644 --- a/contrib/views/tez/src/main/resources/ui/scripts/init-ambari-view.js +++ b/contrib/views/tez/src/main/resources/ui/scripts/init-ambari-view.js @@ -143,7 +143,10 @@ function scheduleChangeHandler(arguments) { } function setConfigs() { - var host = window.location.origin, + var host = window.location.protocol + + "//" + + window.location.hostname + + (window.location.port ? ':' + window.location.port: ''), urlParts = location.pathname.split('/'), resourcesPrefix = 'api/v1/views/%@/versions/%@/instances/%@/resources/'.fmt( urlParts[2],