YARN-8726. [UI2] YARN UI2 is not accessible when config.env file failed to load. Contributed by Akhil PB.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/0cc6e039 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/0cc6e039 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/0cc6e039 Branch: refs/heads/HDFS-12943 Commit: 0cc6e039454127984a3aa5b2ba5d9151e4a72dd4 Parents: 51fda2d Author: Sunil G <[email protected]> Authored: Tue Sep 18 12:31:55 2018 +0530 Committer: Sunil G <[email protected]> Committed: Tue Sep 18 12:31:55 2018 +0530 ---------------------------------------------------------------------- .../hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/0cc6e039/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js index 96c8fcf..98d1348 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js @@ -88,6 +88,9 @@ function updateConfigs(application) { var hostname = window.location.hostname; var rmhost = hostname + (window.location.port ? ':' + window.location.port: '') + skipTrailingSlash(window.location.pathname); + window.ENV = window.ENV || {}; + window.ENV.hosts = window.ENV.hosts || {}; + if(!ENV.hosts.rmWebAddress) { ENV.hosts.rmWebAddress = rmhost; ENV.hosts.protocolScheme = window.location.protocol; --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
