You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by at...@apache.org on 2018/07/24 10:36:57 UTC

[ambari] branch trunk updated: AMBARI-24269 All input fields are disabled after validation - cancel - filter for something on advanced tab

This is an automated email from the ASF dual-hosted git repository.

atkach pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
     new aee53c1  AMBARI-24269 All input fields are disabled after validation - cancel - filter for something on advanced tab
aee53c1 is described below

commit aee53c14b814c447cb4270c12fc121a4cf9db299
Author: Andrii Tkach <at...@apache.org>
AuthorDate: Mon Jul 23 18:28:39 2018 +0300

    AMBARI-24269 All input fields are disabled after validation - cancel - filter for something on advanced tab
---
 ambari-web/app/controllers/main/service/info/configs.js    | 7 +++++++
 ambari-web/app/views/common/configs/service_config_view.js | 2 --
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ambari-web/app/controllers/main/service/info/configs.js b/ambari-web/app/controllers/main/service/info/configs.js
index 49ec591..54fd484 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -363,6 +363,13 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.AddSecurityConfi
       self.trackRequest(self.loadServiceConfigVersions());
     }));
   },
+  
+  saveConfigs: function() {
+    const newVersionToBeCreated = Math.max.apply(null, App.ServiceConfigVersion.find().mapProperty('version')) + 1;
+    const isDefault = this.get('selectedConfigGroup.name') === App.ServiceConfigGroup.defaultGroupName;
+    this.set('currentDefaultVersion', isDefault ? newVersionToBeCreated : this.get('currentDefaultVersion'));
+    this._super();
+  },
 
   /**
    * Generate "finger-print" for current <code>stepConfigs[0]</code>
diff --git a/ambari-web/app/views/common/configs/service_config_view.js b/ambari-web/app/views/common/configs/service_config_view.js
index 4051206..523ee7e 100644
--- a/ambari-web/app/views/common/configs/service_config_view.js
+++ b/ambari-web/app/views/common/configs/service_config_view.js
@@ -128,11 +128,9 @@ App.ServiceConfigView = Em.View.extend({
       secondary: Em.I18n.t('common.cancel'),
       onSave: function () {
         const newVersionToBeCreated = Math.max.apply(null, App.ServiceConfigVersion.find().mapProperty('version')) + 1;
-        const isDefault = controller.get('selectedConfigGroup.name') === App.ServiceConfigGroup.defaultGroupName;
         controller.setProperties({
           saveConfigsFlag: true,
           serviceConfigVersionNote: this.get('serviceConfigNote'),
-          currentDefaultVersion: isDefault ? newVersionToBeCreated : controller.get('currentDefaultVersion'),
           preSelectedConfigVersion: Em.Object.create({
             version: newVersionToBeCreated,
             serviceName: controller.get('content.serviceName'),