Explorar o código

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

Sunil G %!s(int64=6) %!d(string=hai) anos
pai
achega
0cc6e03945

+ 3 - 0
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;