You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by on...@apache.org on 2013/12/30 15:02:30 UTC
git commit: AMBARI-4196. Install Wizard: Service Config Group popup
text does not show the service name prefix. (onechiporenko)
Updated Branches:
refs/heads/branch-1.4.3 125890c1a -> 7b974f0e5
AMBARI-4196. Install Wizard: Service Config Group popup text does not show the service name prefix. (onechiporenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7b974f0e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7b974f0e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7b974f0e
Branch: refs/heads/branch-1.4.3
Commit: 7b974f0e5f2482d929f5568e476fca24e44e9b0f
Parents: 125890c
Author: Oleg Nechiporenko <on...@apache.org>
Authored: Mon Dec 30 16:00:14 2013 +0200
Committer: Oleg Nechiporenko <on...@apache.org>
Committed: Mon Dec 30 16:00:14 2013 +0200
----------------------------------------------------------------------
ambari-web/app/messages.js | 10 ++++----
.../common/configs/selectCreateConfigGroup.hbs | 24 ++++++++------------
ambari-web/app/utils/config.js | 22 +++++++++++-------
3 files changed, 29 insertions(+), 27 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/7b974f0e/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index e7a7200..3f97220 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1733,14 +1733,14 @@ Em.I18n.translations = {
'contact.administrator': 'Contact System Administrator for more information!',
'config.group.selection.dialog.title': '{0} Configuration Group',
- 'config.group.selection.dialog.subtitle': 'Select or create a {{serviceName}} Configuration Group where the configuration value will be overridden.',
- 'config.group.selection.dialog.option.select': 'Select an existing {{serviceName}} Configuration Group',
+ 'config.group.selection.dialog.subtitle': 'Select or create a {0} Configuration Group where the configuration value will be overridden.',
+ 'config.group.selection.dialog.option.select': 'Select an existing {0} Configuration Group',
'config.group.selection.dialog.option.select.msg': 'Overridden property will be changed for hosts belonging to the selected group.',
- 'config.group.selection.dialog.option.create': 'Create a new {{serviceName}} Configuration Group',
- 'config.group.selection.dialog.option.create.msg': 'A new {{serviceName}} Configuration Group will be created with the given name. Initially there will be no hosts in the group, with only the selected property overridden.',
+ 'config.group.selection.dialog.option.create': 'Create a new {0} Configuration Group',
+ 'config.group.selection.dialog.option.create.msg': 'A new {0} Configuration Group will be created with the given name. Initially there will be no hosts in the group, with only the selected property overridden.',
'config.group.selection.dialog.err.name.exists': 'Configuration Group with given name already exists',
'config.group.selection.dialog.err.create': 'Error creating new Configuration Group [{0}]',
- 'config.group.selection.dialog.no.groups': 'There are no existing {{serviceName}} Configuration Groups.',
+ 'config.group.selection.dialog.no.groups': 'There are no existing {0} Configuration Groups.',
'config.group.host.switch.dialog.title': 'Change Group',
'config.group.save.confirmation.header': 'Save Configuration Group',
http://git-wip-us.apache.org/repos/asf/ambari/blob/7b974f0e/ambari-web/app/templates/common/configs/selectCreateConfigGroup.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/selectCreateConfigGroup.hbs b/ambari-web/app/templates/common/configs/selectCreateConfigGroup.hbs
index 9c192a9..0954be0 100644
--- a/ambari-web/app/templates/common/configs/selectCreateConfigGroup.hbs
+++ b/ambari-web/app/templates/common/configs/selectCreateConfigGroup.hbs
@@ -17,20 +17,16 @@
}}
<div id="config-group-select-create-dialog">
<div class="alert alert-info">
- {{t config.group.selection.dialog.subtitle serviceNameBinding="selectedService.displayName"}}
+ {{view.parentView.subTitle}}
</div>
<div class="text-warning">
- {{#if view.parentView.warningMessage}}
{{view.parentView.warningMessage}}
- {{else}}
-
- {{/if}}
- </div>
- <label class="radio">
- {{view view.selectConfigGroupRadioButton}}
- <span {{bindAttr class="view.parentView.hasExistedGroups::message"}}>{{t config.group.selection.dialog.option.select serviceNameBinding="selectedService.displayName"}}</span>
- </label>
- {{#if view.parentView.availableConfigGroups.length}}
+ </div>
+ <label class="radio">
+ {{view view.selectConfigGroupRadioButton}}
+ <span {{bindAttr class="view.parentView.hasExistedGroups::message"}}>{{view.parentView.selectExistingGroupLabel}}</span>
+ </label>
+ {{#if view.parentView.availableConfigGroups.length}}
<div class="select-create-config-group-div">
<span class="btn-group">
<button class="btn" {{bindAttr disabled="view.parentView.optionCreateConfigGroup"}}>{{view.parentView.selectedConfigGroup.name}}</button>
@@ -52,16 +48,16 @@
</div>
{{else}}
<div class="select-create-config-group-div">
- <div class="alert alert-block">{{t config.group.selection.dialog.no.groups serviceNameBinding="selectedService.displayName"}}</div>
+ <div class="alert alert-block">{{view.parentView.noGroups}}</div>
</div>
{{/if}}
<label class="radio">
{{view view.createConfigGroupRadioButton}}
- {{t config.group.selection.dialog.option.create serviceNameBinding="selectedService.displayName"}}
+ {{view.parentView.createNewGroupLabel}}
</label>
<div class="select-create-config-group-div">
{{view Ember.TextField valueBinding="view.parentView.newConfigGroupName"
disabledBinding="view.parentView.optionSelectConfigGroup" maxlength="255" class="span5"}}
- <div class="message">{{t config.group.selection.dialog.option.create.msg serviceNameBinding="selectedService.displayName"}}</div>
+ <div class="message">{{view.parentView.createNewGroupDescription}}</div>
</div>
</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/7b974f0e/ambari-web/app/utils/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index 10ffd82..2d4654c 100644
--- a/ambari-web/app/utils/config.js
+++ b/ambari-web/app/utils/config.js
@@ -1049,12 +1049,17 @@ App.config = Em.Object.create({
availableConfigGroups = result;
var selectedConfigGroup = availableConfigGroups && availableConfigGroups.length > 0 ?
availableConfigGroups[0] : null;
+ var serviceName = App.Service.DisplayNames[serviceId];
App.ModalPopup.show({
classNames: [ 'sixty-percent-width-modal' ],
- header: Em.I18n.t('config.group.selection.dialog.title').format(App.Service.DisplayNames[serviceId]),
- primary: Em.I18n.t('ok'),
- secondary: Em.I18n.t('common.cancel'),
- warningMessage: null,
+ header: Em.I18n.t('config.group.selection.dialog.title').format(serviceName),
+ subTitle: Em.I18n.t('config.group.selection.dialog.subtitle').format(serviceName),
+ selectExistingGroupLabel: Em.I18n.t('config.group.selection.dialog.option.select').format(serviceName),
+ noGroups: Em.I18n.t('config.group.selection.dialog.no.groups').format(serviceName),
+ createNewGroupLabel: Em.I18n.t('config.group.selection.dialog.option.create').format(serviceName),
+ createNewGroupDescription: Em.I18n.t('config.group.selection.dialog.option.create.msg').format(serviceName),
+ warningMessage: ' ',
+ isWarning: false,
optionSelectConfigGroup: true,
optionCreateConfigGroup: function(){
return !this.get('optionSelectConfigGroup');
@@ -1066,7 +1071,7 @@ App.config = Em.Object.create({
selectedConfigGroup: selectedConfigGroup,
newConfigGroupName: '',
enablePrimary: function () {
- return this.get('optionSelectConfigGroup') || (this.get('newConfigGroupName').trim().length > 0 && !this.get('warningMessage'));
+ return this.get('optionSelectConfigGroup') || (this.get('newConfigGroupName').trim().length > 0 && !this.get('isWarning'));
}.property('newConfigGroupName', 'optionSelectConfigGroup', 'warningMessage'),
onPrimary: function () {
if (!this.get('enablePrimary')) {
@@ -1102,15 +1107,18 @@ App.config = Em.Object.create({
this.set('selectedConfigGroup', configGroup);
},
validate: function () {
- var msg = null;
+ var msg = ' ';
+ var isWarning = false;
var optionSelect = this.get('optionSelectConfigGroup');
if (!optionSelect) {
var nn = this.get('newConfigGroupName');
if (nn && configGroups.mapProperty('name').contains(nn)) {
msg = Em.I18n.t("config.group.selection.dialog.err.name.exists");
+ isWarning = true;
}
}
this.set('warningMessage', msg);
+ this.set('isWarning', isWarning);
}.observes('newConfigGroupName', 'optionSelectConfigGroup'),
bodyClass: Ember.View.extend({
templateName: require('templates/common/configs/selectCreateConfigGroup'),
@@ -1158,8 +1166,6 @@ App.config = Em.Object.create({
var self = this;
App.ModalPopup.show({
header: Em.I18n.t('config.group.host.switch.dialog.title'),
- primary: Em.I18n.t('ok'),
- secondary: Em.I18n.t('common.cancel'),
configGroups: configGroups,
selectedConfigGroup: selectedGroup,
enablePrimary: function () {