You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ja...@apache.org on 2014/06/26 01:41:28 UTC
git commit: AMBARI-6278. ambari web does not save empty value
properties in the configurations. (jaimin)
Repository: ambari
Updated Branches:
refs/heads/branch-1.6.1 bf3a59e84 -> edd020d94
AMBARI-6278. ambari web does not save empty value properties in the configurations. (jaimin)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/edd020d9
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/edd020d9
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/edd020d9
Branch: refs/heads/branch-1.6.1
Commit: edd020d94526e8a9943ed609d34016d421fc61f7
Parents: bf3a59e
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Wed Jun 25 16:40:49 2014 -0700
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Wed Jun 25 16:41:08 2014 -0700
----------------------------------------------------------------------
ambari-web/app/controllers/main/service/info/configs.js | 3 +--
ambari-web/app/controllers/wizard.js | 2 +-
ambari-web/app/controllers/wizard/step8_controller.js | 5 +----
ambari-web/app/data/HDP2/site_properties.js | 1 -
4 files changed, 3 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/edd020d9/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 92a2519..6e2fcfc 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -1237,10 +1237,9 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({
//storedConfigs contains custom configs as well
var serviceConfigProperties = configs.filterProperty('id', 'site property');
this.formatConfigValues(serviceConfigProperties);
- var storedConfigs = serviceConfigProperties.filterProperty('value');
var mappedConfigs = App.config.excludeUnsupportedConfigs(this.get('configMapping').all(), App.Service.find().mapProperty('serviceName'));
var allUiConfigs = this.loadUiSideConfigs(mappedConfigs);
- this.set('uiConfigs', storedConfigs.concat(allUiConfigs));
+ this.set('uiConfigs', serviceConfigProperties.concat(allUiConfigs));
},
formatConfigValues: function(serviceConfigProperties){
http://git-wip-us.apache.org/repos/asf/ambari/blob/edd020d9/ambari-web/app/controllers/wizard.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard.js b/ambari-web/app/controllers/wizard.js
index 2b93a05..45d1f13 100644
--- a/ambari-web/app/controllers/wizard.js
+++ b/ambari-web/app/controllers/wizard.js
@@ -836,7 +836,7 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, {
filename: _configProperties.get('filename'),
displayType: _configProperties.get('displayType'),
isRequiredByAgent: _configProperties.get('isRequiredByAgent'),
- isCanBeEmpty: !!_configProperties.get('isCanBeEmpty') // flag that allow saving property with empty value
+ isRequired: _configProperties.get('isRequired') // flag that allow saving property with empty value
};
serviceConfigProperties.push(configProperty);
}, this);
http://git-wip-us.apache.org/repos/asf/ambari/blob/edd020d9/ambari-web/app/controllers/wizard/step8_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step8_controller.js b/ambari-web/app/controllers/wizard/step8_controller.js
index c2b29f7..3b39f2b 100644
--- a/ambari-web/app/controllers/wizard/step8_controller.js
+++ b/ambari-web/app/controllers/wizard/step8_controller.js
@@ -346,12 +346,9 @@ App.WizardStep8Controller = Em.Controller.extend({
serviceConfigProperties.forEach(function (_config) {
_config.value = (typeof _config.value === "boolean") ? _config.value.toString() : _config.value;
});
- var storedConfigs = serviceConfigProperties.filter(function (configProperty) {
- return !!configProperty.value || configProperty.isCanBeEmpty;
- });
var mappedConfigs = App.config.excludeUnsupportedConfigs(this.get('configMapping'), this.get('selectedServices').mapProperty('serviceName'));
var uiConfigs = this.loadUiSideConfigs(mappedConfigs);
- this.set('configs', storedConfigs.concat(uiConfigs));
+ this.set('configs', serviceConfigProperties.concat(uiConfigs));
},
/**
http://git-wip-us.apache.org/repos/asf/ambari/blob/edd020d9/ambari-web/app/data/HDP2/site_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/HDP2/site_properties.js b/ambari-web/app/data/HDP2/site_properties.js
index c175b73..421179f 100644
--- a/ambari-web/app/data/HDP2/site_properties.js
+++ b/ambari-web/app/data/HDP2/site_properties.js
@@ -1742,7 +1742,6 @@ module.exports =
"isRequired": false,
"displayType": "content",
"serviceName": "FLUME",
- "isCanBeEmpty": true,
"category": "FlumeAgent",
"filename": "flume-conf.xml"
}