Repository: tez Updated Branches: refs/heads/master a02a5ea9d -> 96efae01f
TEZ-1988. Tez UI: does not work when using file:// in a browser (pramachandran) Project: http://git-wip-us.apache.org/repos/asf/tez/repo Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/96efae01 Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/96efae01 Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/96efae01 Branch: refs/heads/master Commit: 96efae01f5e7e2847e78a0b7a7a2dc458e3ff9bc Parents: a02a5ea Author: Prakash Ramachandran <[email protected]> Authored: Fri May 1 13:26:46 2015 +0530 Committer: Prakash Ramachandran <[email protected]> Committed: Fri May 1 13:26:46 2015 +0530 ---------------------------------------------------------------------- CHANGES.txt | 1 + .../main/webapp/app/scripts/default-configs.js | 23 +++++++++++++------- 2 files changed, 16 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tez/blob/96efae01/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 5a5c21f..e7079bf 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -155,6 +155,7 @@ Release 0.6.1: Unreleased INCOMPATIBLE CHANGES ALL CHANGES: + TEZ-1988. Tez UI: does not work when using file:// in a browser TEZ-2390. tez-tools swimlane tool fails to parse large jobs >8K containers TEZ-2256. Avoid use of BufferTooSmallException to signal end of buffer in UnorderedPartitionedKVWriter TEZ-2380. Disable fall back to reading from timeline if timeline disabled. http://git-wip-us.apache.org/repos/asf/tez/blob/96efae01/tez-ui/src/main/webapp/app/scripts/default-configs.js ---------------------------------------------------------------------- diff --git a/tez-ui/src/main/webapp/app/scripts/default-configs.js b/tez-ui/src/main/webapp/app/scripts/default-configs.js index e438bad..d0ffa97 100644 --- a/tez-ui/src/main/webapp/app/scripts/default-configs.js +++ b/tez-ui/src/main/webapp/app/scripts/default-configs.js @@ -16,18 +16,25 @@ * limitations under the License. */ +function constructDefaultUrl(location, port) { + var protocol, + hostname; + if (App.env.isStandalone && location.protocol != 'file:') { + protocol = location.protocol; + hostname = location.hostname; + } else { + protocol = 'http:'; + hostname = 'localhost'; + } + return '%@//%@:%@'.fmt(protocol, hostname, port); +} + var getDefaultTimelineUrl = function() { - var location = window.location; - var protocol = App.env.isStandalone ? location.protocol : 'http:'; - var hostname = App.env.isStandalone ? location.hostname : 'localhost'; - return '%@//%@:8188'.fmt(protocol, hostname); + return constructDefaultUrl(window.location, 8188); }; var getDefaultRMWebUrl = function() { - var location = window.location; - var protocol = App.env.isStandalone ? location.protocol : 'http:'; - var hostname = App.env.isStandalone ? location.hostname : 'localhost'; - return '%@//%@:8088'.fmt(protocol, hostname); + return constructDefaultUrl(window.location, 8088); }; $.extend(true, App.Configs, {
