Updated Branches: refs/heads/trunk 2559a004e -> 28b95f6fe
AMBARI-3942 Click Overview, create new accepts empty name. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/28b95f6f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/28b95f6f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/28b95f6f Branch: refs/heads/trunk Commit: 28b95f6fefe1b5952e8b74a0995f15f4e5d88081 Parents: 2559a00 Author: aBabiichuk <[email protected]> Authored: Mon Dec 2 15:03:19 2013 +0200 Committer: aBabiichuk <[email protected]> Committed: Mon Dec 2 15:03:19 2013 +0200 ---------------------------------------------------------------------- ambari-web/app/utils/config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/28b95f6f/ambari-web/app/utils/config.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js index 74bf6dd..1a76560 100644 --- a/ambari-web/app/utils/config.js +++ b/ambari-web/app/utils/config.js @@ -1017,7 +1017,7 @@ App.config = Em.Object.create({ selectedConfigGroup: selectedConfigGroup, newConfigGroupName: '', enablePrimary: function () { - return this.get('optionSelectConfigGroup') || (this.get('newConfigGroupName').length > 0 && !this.get('warningMessage')); + return this.get('optionSelectConfigGroup') || (this.get('newConfigGroupName').trim().length > 0 && !this.get('warningMessage')); }.property('newConfigGroupName', 'optionSelectConfigGroup', 'warningMessage'), onPrimary: function () { if (!this.get('enablePrimary')) { @@ -1028,7 +1028,7 @@ App.config = Em.Object.create({ this.hide(); callback(selectedConfigGroup); } else { - var newConfigGroupName = this.get('newConfigGroupName'); + var newConfigGroupName = this.get('newConfigGroupName').trim(); var newConfigGroup = self.createNewConfigurationGroup(serviceId, newConfigGroupName, isInstaller); if (newConfigGroup) { newConfigGroup.set('parentConfigGroup', configGroups.findProperty('isDefault'));
