Browse Source

HUE-6894 [core] Remove cluster config call on login page

Enrico Berti 8 years ago
parent
commit
e3bca30
1 changed files with 5 additions and 3 deletions
  1. 5 3
      desktop/core/src/desktop/static/desktop/js/clusterConfig.js

+ 5 - 3
desktop/core/src/desktop/static/desktop/js/clusterConfig.js

@@ -15,7 +15,7 @@
 // limitations under the License.
 // limitations under the License.
 
 
 
 
-function ClusterConfig (params) {
+function ClusterConfig(params) {
   var self = this;
   var self = this;
 
 
   self.clusterConfig = undefined;
   self.clusterConfig = undefined;
@@ -40,10 +40,12 @@ function ClusterConfig (params) {
 
 
   huePubSub.subscribe('cluster.config.refresh.config', refreshConfig);
   huePubSub.subscribe('cluster.config.refresh.config', refreshConfig);
 
 
-  refreshConfig();
+  if (window.location.pathname.indexOf('/accounts/login') === -1) {
+    refreshConfig();
+  }
 
 
   huePubSub.subscribe('cluster.config.get.config', function () {
   huePubSub.subscribe('cluster.config.get.config', function () {
-    if (! self.loading) {
+    if (!self.loading) {
       huePubSub.publish('cluster.config.set.config', self.clusterConfig);
       huePubSub.publish('cluster.config.set.config', self.clusterConfig);
     }
     }
   });
   });