From 0cc6e039454127984a3aa5b2ba5d9151e4a72dd4 Mon Sep 17 00:00:00 2001 From: Sunil G Date: Tue, 18 Sep 2018 12:31:55 +0530 Subject: [PATCH] YARN-8726. [UI2] YARN UI2 is not accessible when config.env file failed to load. Contributed by Akhil PB. --- .../hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js | 3 +++ 1 file changed, 3 insertions(+) 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 96c8fcfff9..98d1348c84 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;