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

View File

@ -88,6 +88,9 @@ function updateConfigs(application) {
var hostname = window.location.hostname; var hostname = window.location.hostname;
var rmhost = hostname + (window.location.port ? ':' + window.location.port: '') + skipTrailingSlash(window.location.pathname); 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) { if(!ENV.hosts.rmWebAddress) {
ENV.hosts.rmWebAddress = rmhost; ENV.hosts.rmWebAddress = rmhost;
ENV.hosts.protocolScheme = window.location.protocol; ENV.hosts.protocolScheme = window.location.protocol;