소스 검색

AMBARI-2761. Customize Services page - Misc tab: incorrect behavior of popup window for changing user names. (Antonenko Alexander via yusaku)

Yusaku Sako 12 년 전
부모
커밋
bbb767f765
2개의 변경된 파일9개의 추가작업 그리고 8개의 파일을 삭제
  1. 4 2
      ambari-web/app/controllers/wizard/step7_controller.js
  2. 5 6
      ambari-web/app/views/common/configs/services_config.js

+ 4 - 2
ambari-web/app/controllers/wizard/step7_controller.js

@@ -40,9 +40,11 @@ App.WizardStep7Controller = Em.Controller.extend({
 
   secureConfigs: require('data/secure_mapping'),
 
+  miscModalVisible: false, //If miscConfigChange Modal is shown
+
   isSubmitDisabled: function () {
-    return !this.stepConfigs.filterProperty('showConfig', true).everyProperty('errorCount', 0);
-  }.property('stepConfigs.@each.errorCount'),
+    return (!this.stepConfigs.filterProperty('showConfig', true).everyProperty('errorCount', 0) || this.get("miscModalVisible"));
+  }.property('stepConfigs.@each.errorCount', 'miscModalVisible'),
 
   selectedServiceNames: function () {
     return this.get('content.services').filterProperty('isSelected', true).filterProperty('isInstalled', false).mapProperty('serviceName');

+ 5 - 6
ambari-web/app/views/common/configs/services_config.js

@@ -51,7 +51,6 @@ App.ServiceConfigsByCategoryView = Ember.View.extend({
   classNameBindings: ['category.name', 'isShowBlock::hidden'],
 
   content: null,
-  miscModalVisible: false, //If miscConfigChange Modal is shown
   category: null,
   service: null,
   canEdit: true, // View is editable or read-only?
@@ -180,7 +179,7 @@ App.ServiceConfigsByCategoryView = Ember.View.extend({
           );
         }
       }
-      if (this.affectedProperties.length > 0 && !this.get("miscModalVisible")) {
+      if (this.affectedProperties.length > 0 && !this.get("controller.miscModalVisible")) {
         this.newAffectedProperties = this.affectedProperties;
         var self = this;
         return App.ModalPopup.show({
@@ -192,18 +191,18 @@ App.ServiceConfigsByCategoryView = Ember.View.extend({
               self.get("controller.stepConfigs").findProperty("serviceName", item.serviceName).get("configs")
                 .findProperty("name", item.propertyName).set("value", item.newValue);
             });
-            self.set("miscModalVisible", false);
+            self.get("controller").set("miscModalVisible", false);
             this.hide();
           },
           onIgnore: function () {
-            self.set("miscModalVisible", false);
+            self.get("controller").set("miscModalVisible", false);
             this.hide();
           },
           onUndo: function () {
             var affected = self.get("newAffectedProperties").objectAt(0);
             self.get("controller.stepConfigs").findProperty("serviceName", "MISC").get("configs")
               .findProperty("name", affected.changedPropertyName).set("value", $.trim(affected.curValue));
-            self.set("miscModalVisible", false);
+            self.get("controller").set("miscModalVisible", false);
             this.hide();
           },
           footerClass: Ember.View.extend({
@@ -221,7 +220,7 @@ App.ServiceConfigsByCategoryView = Ember.View.extend({
             controller: this,
             propertyChange: self.get("newAffectedProperties"),
             didInsertElement: function () {
-              self.set("miscModalVisible", true);
+              self.get("controller").set("miscModalVisible", true);
             }
           })
         });