Bläddra i källkod

AMBARI-6274 During upgrade to HDP 2.1 from 2.0 with NN HA enable, ha.zookeeper.quorum is missing in core-site.xml (Adding new Services reverts global and core-site configurations). (atkach)

atkach 11 år sedan
förälder
incheckning
b19009e398

+ 13 - 11
ambari-web/app/controllers/wizard/step7_controller.js

@@ -99,6 +99,16 @@ App.WizardStep7Controller = Em.Controller.extend({
    */
   isAdvancedConfigLoaded: true,
 
+  /**
+   * Are applied to service configs loaded
+   * @type {bool}
+   */
+  isAppliedConfigLoaded: true,
+
+  isConfigsLoaded: function () {
+    return (this.get('isAdvancedConfigLoaded') && this.get('isAppliedConfigLoaded'));
+  }.property('isAdvancedConfigLoaded', 'isAppliedConfigLoaded'),
+
   /**
    * Should Next-button be disabled
    * @type {bool}
@@ -178,7 +188,6 @@ App.WizardStep7Controller = Em.Controller.extend({
   /**
    * Clear controller's properties:
    *  <ul>
-   *    <li>serviceConfigTags</li>
    *    <li>stepConfigs</li>
    *    <li>filter</li>
    *  </ul>
@@ -186,7 +195,6 @@ App.WizardStep7Controller = Em.Controller.extend({
    * @method clearStep
    */
   clearStep: function () {
-    this.get('serviceConfigTags').clear();
     this.get('stepConfigs').clear();
     this.set('filter', '');
     this.get('filterColumns').setEach('selected', false);
@@ -621,20 +629,13 @@ App.WizardStep7Controller = Em.Controller.extend({
     }
   },
 
-  checkConfigLoad: function() {
-    if (this.get('wizardController.name') === 'addServiceController') {
-      this.set('isAdvancedConfigLoaded', false);
-    }
-  },
-
   /**
    * On load function
    * @method loadStep
    */
   loadStep: function () {
     console.log("TRACE: Loading step7: Configure Services");
-    if (!this.get('isAdvancedConfigLoaded')) {
-      this.getConfigTags();
+    if (!this.get('isConfigsLoaded')) {
       return;
     }
     this.clearStep();
@@ -747,6 +748,7 @@ App.WizardStep7Controller = Em.Controller.extend({
    * @method getConfigTags
    */
   getConfigTags: function () {
+    this.set('isAppliedConfigLoaded', false);
     return App.ajax.send({
       name: 'config.tags',
       sender: this,
@@ -781,7 +783,7 @@ App.WizardStep7Controller = Em.Controller.extend({
       }
     }
     this.set('serviceConfigTags', serviceConfigTags);
-    this.set('isAdvancedConfigLoaded', true);
+    this.set('isAppliedConfigLoaded', true);
   },
 
   /**

+ 1 - 0
ambari-web/app/routes/add_service_routes.js

@@ -188,6 +188,7 @@ module.exports = App.WizardRoute.extend({
         var wizardStep7Controller = router.get('wizardStep7Controller');
         controller.loadAllPriorSteps();
         controller.loadAdvancedConfigs(wizardStep7Controller);
+        wizardStep7Controller.getConfigTags();
         wizardStep7Controller.set('wizardController', controller);
         controller.connectOutlet('wizardStep7', controller.get('content'));
       })

+ 1 - 1
ambari-web/app/templates/wizard/step7.hbs

@@ -23,7 +23,7 @@
     {{t installer.step7.body}}
   </div>
 
-  {{#if isAdvancedConfigLoaded}}
+  {{#if isConfigsLoaded}}
     {{view App.ServicesConfigView}}
   {{else}}
     <div class="spinner"></div>

+ 1 - 7
ambari-web/app/views/wizard/step7_view.js

@@ -20,11 +20,5 @@
 var App = require('app');
 
 App.WizardStep7View = Em.View.extend({
-
-  templateName: require('templates/wizard/step7'),
-
-  willInsertElement: function () {
-    this.get('controller').checkConfigLoad();
-  }
-
+  templateName: require('templates/wizard/step7')
 });