소스 검색

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

Enrico Berti 8 년 전
부모
커밋
e3bca30
1개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  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.
 
 
-function ClusterConfig (params) {
+function ClusterConfig(params) {
   var self = this;
 
   self.clusterConfig = undefined;
@@ -40,10 +40,12 @@ function ClusterConfig (params) {
 
   huePubSub.subscribe('cluster.config.refresh.config', refreshConfig);
 
-  refreshConfig();
+  if (window.location.pathname.indexOf('/accounts/login') === -1) {
+    refreshConfig();
+  }
 
   huePubSub.subscribe('cluster.config.get.config', function () {
-    if (! self.loading) {
+    if (!self.loading) {
       huePubSub.publish('cluster.config.set.config', self.clusterConfig);
     }
   });