Jelajahi Sumber

AMBARI-3034 Installer wizard: Ambari web-ui breaks while sign-in after manually hitting installer step url. (atkach)

atkach 11 tahun lalu
induk
melakukan
1220239dc2
1 mengubah file dengan 11 tambahan dan 0 penghapusan
  1. 11 0
      ambari-web/app/controllers/installer.js

+ 11 - 0
ambari-web/app/controllers/installer.js

@@ -35,6 +35,7 @@ App.InstallerController = App.WizardController.extend({
     serviceConfigProperties: null,
     serviceConfigProperties: null,
     advancedServiceConfig: null,
     advancedServiceConfig: null,
     slaveGroupProperties: null,
     slaveGroupProperties: null,
+    stacks: null,
     controllerName: 'installerController'
     controllerName: 'installerController'
   }),
   }),
 
 
@@ -46,6 +47,16 @@ App.InstallerController = App.WizardController.extend({
       value: false
       value: false
     }));
     }));
   },
   },
+  /**
+   * redefined connectOutlet method to avoid view loading by unauthorized user
+   * @param view
+   * @param content
+   */
+  connectOutlet: function(view, content) {
+    if(App.db.getAuthenticated()) {
+      this._super(view, content);
+    }
+  },
 
 
   getCluster: function(){
   getCluster: function(){
     return jQuery.extend({}, this.get('clusterStatusTemplate'));
     return jQuery.extend({}, this.get('clusterStatusTemplate'));