Sfoglia il codice sorgente

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

(cherry picked from commit 0cc6e039454127984a3aa5b2ba5d9151e4a72dd4)
Sunil G 6 anni fa
parent
commit
8dccc4ef12

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