YARN-8726. [UI2] YARN UI2 is not accessible when config.env file failed to load. Contributed by Akhil PB.

This commit is contained in:
Sunil G 2018-09-18 12:31:55 +05:30
parent 51fda2d773
commit 0cc6e03945
1 changed files with 3 additions and 0 deletions

View File

@ -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;