You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ab...@apache.org on 2015/12/09 14:54:03 UTC
ambari git commit: AMBARI-14290 Save button is enabled without any
config changes (on YARN and MAPREDUCE2). (ababiichuk)
Repository: ambari
Updated Branches:
refs/heads/branch-2.2 0a213f70f -> 05f5c6278
AMBARI-14290 Save button is enabled without any config changes (on YARN and MAPREDUCE2). (ababiichuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/05f5c627
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/05f5c627
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/05f5c627
Branch: refs/heads/branch-2.2
Commit: 05f5c6278442b2580a3ae7dda4199eb73f83cd83
Parents: 0a213f7
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Wed Dec 9 15:43:18 2015 +0200
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Wed Dec 9 15:47:24 2015 +0200
----------------------------------------------------------------------
ambari-web/app/controllers/main/service/info/configs.js | 4 ++--
.../models/configs/objects/service_config_property.js | 6 +++---
.../configs/objects/service_config_property_test.js | 11 +++++++++++
3 files changed, 16 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/05f5c627/ambari-web/app/controllers/main/service/info/configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/info/configs.js b/ambari-web/app/controllers/main/service/info/configs.js
index 30ef4b9..0447392 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -156,8 +156,8 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ConfigsLoader, A
* @type {boolean}
*/
isPropertiesChanged: function(){
- return this.get('stepConfigs').someProperty('isPropertiesChanged', true);
- }.property('stepConfigs.@each.isPropertiesChanged'),
+ return this.get('selectedService.isPropertiesChanged');
+ }.property('selectedService.isPropertiesChanged'),
/**
* Filter text will be located here
http://git-wip-us.apache.org/repos/asf/ambari/blob/05f5c627/ambari-web/app/models/configs/objects/service_config_property.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/configs/objects/service_config_property.js b/ambari-web/app/models/configs/objects/service_config_property.js
index 0172156..dcc7a1e 100644
--- a/ambari-web/app/models/configs/objects/service_config_property.js
+++ b/ambari-web/app/models/configs/objects/service_config_property.js
@@ -247,10 +247,10 @@ App.ServiceConfigProperty = Em.Object.extend({
}.property('isUserProperty', 'isOriginalSCP', 'overrides.length'),
init: function () {
- if (this.get('value') == '') {
- if (this.get('savedValue')) {
+ if (Em.isNone(this.get('value'))) {
+ if (!Em.isNone(this.get('savedValue'))) {
this.set('value', this.get('savedValue'));
- } else if (this.get('recommendedValue')) {
+ } else if (!Em.isNone(this.get('recommendedValue'))) {
this.set('value', this.get('recommendedValue'));
}
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/05f5c627/ambari-web/test/models/configs/objects/service_config_property_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/models/configs/objects/service_config_property_test.js b/ambari-web/test/models/configs/objects/service_config_property_test.js
index 58e7eaa..2902566 100644
--- a/ambari-web/test/models/configs/objects/service_config_property_test.js
+++ b/ambari-web/test/models/configs/objects/service_config_property_test.js
@@ -190,6 +190,17 @@ var serviceConfigProperty,
recommendedValue: 'recommended'
},
result: {
+ value: '',
+ recommendedValue: 'recommended'
+ }
+ },
+ {
+ initial: {
+ value: null,
+ savedValue: 'default',
+ recommendedValue: 'recommended'
+ },
+ result: {
value: 'default',
recommendedValue: 'recommended'
}