You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2013/11/30 19:30:17 UTC

git commit: AMBARI-3937. Revise Config Group Management copy to be more descriptive. (yusaku)

Updated Branches:
  refs/heads/trunk 4059a69ed -> a9f8f3b69


AMBARI-3937. Revise Config Group Management copy to be more descriptive. (yusaku)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a9f8f3b6
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a9f8f3b6
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a9f8f3b6

Branch: refs/heads/trunk
Commit: a9f8f3b69aec76c4b04b2fca4d9eb301c490ddb2
Parents: 4059a69
Author: Yusaku Sako <yu...@hortonworks.com>
Authored: Fri Nov 29 22:14:19 2013 -0800
Committer: Yusaku Sako <yu...@hortonworks.com>
Committed: Fri Nov 29 22:14:19 2013 -0800

----------------------------------------------------------------------
 ambari-web/app/controllers/main/service/item.js |  1 +
 .../service/manage_config_groups_controller.js  |  2 +-
 ambari-web/app/messages.js                      | 22 ++++++++++----------
 .../templates/common/configs/overrideWindow.hbs |  2 +-
 .../common/configs/selectCreateConfigGroup.hbs  | 10 ++++-----
 .../manage_configuration_groups_popup.hbs       |  4 ++--
 ambari-web/app/utils/config.js                  |  2 +-
 .../app/views/common/configs/services_config.js |  6 +++++-
 8 files changed, 27 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/a9f8f3b6/ambari-web/app/controllers/main/service/item.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/item.js b/ambari-web/app/controllers/main/service/item.js
index eaf8f02..beb2858 100644
--- a/ambari-web/app/controllers/main/service/item.js
+++ b/ambari-web/app/controllers/main/service/item.js
@@ -235,6 +235,7 @@ App.MainServiceItemController = Em.Controller.extend({
       header: Em.I18n.t('services.service.config_groups_popup.header').format(displayName),
       bodyClass: App.MainServiceManageConfigGroupView.extend({
         serviceName: serviceName,
+        displayName: displayName,
         usedConfigGroupNames: (controller && controller.get('usedConfigGroupNames')),
         controllerBinding: (!!controller) ? 'App.router.installerManageConfigGroupsController' : 'App.router.manageConfigGroupsController'
       }),

http://git-wip-us.apache.org/repos/asf/ambari/blob/a9f8f3b6/ambari-web/app/controllers/main/service/manage_config_groups_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/manage_config_groups_controller.js b/ambari-web/app/controllers/main/service/manage_config_groups_controller.js
index 8e516cf..5e12222 100644
--- a/ambari-web/app/controllers/main/service/manage_config_groups_controller.js
+++ b/ambari-web/app/controllers/main/service/manage_config_groups_controller.js
@@ -201,7 +201,7 @@ App.ManageConfigGroupsController = Em.Controller.extend({
     var availableHosts = this.get('selectedConfigGroup.availableHosts');
     var popupDescription = {
       header: Em.I18n.t('hosts.selectHostsDialog.title'),
-      dialogMessage: Em.I18n.t('hosts.selectHostsDialog.message')
+      dialogMessage: Em.I18n.t('hosts.selectHostsDialog.message').format(App.Service.DisplayNames[this.get('serviceName')])
     };
     hostsManagement.launchHostsSelectionDialog(availableHosts, [], false, this.get('componentsForFilter'), this.addHostsCallback.bind(this), popupDescription);
   },

http://git-wip-us.apache.org/repos/asf/ambari/blob/a9f8f3b6/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index d6fc19b..2701b32 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1122,8 +1122,8 @@ Em.I18n.translations = {
   'services.service.startAll':'Start All',
   'services.service.stopAll':'Stop All',
   'services.service.config_groups_popup.header':'Manage {0} Configuration Groups',
-  'services.service.config_groups_popup.notice':'Manage configuration groups of this service. Groups can be created, renamed and deleted and from here. Host memberships can also be changed. A host can belong to only one configuration group.',
-  'services.service.config_groups_popup.config_groups':'Configuration Groups',
+  'services.service.config_groups_popup.notice':'You can apply different sets of {{serviceName}} configurations to groups of hosts by managing {{serviceName}} Configuration Groups and their host membership.  Hosts belonging to a {{serviceName}} Configuration Group have the same set of configurations for {{serviceName}}. Each host belongs to one {{serviceName}} Configuration Group.',
+  'services.service.config_groups_popup.config_groups':'{{serviceName}} Configuration Groups',
   'services.service.config_groups_popup.rename':'Rename',
   'services.service.config_groups_popup.duplicate':'Duplicate',
   'services.service.config_groups_popup.group_name_lable':'Name',
@@ -1282,7 +1282,7 @@ Em.I18n.translations = {
   'hosts.table.noHosts':'No hosts to display',
   
   'hosts.selectHostsDialog.title': 'Select Configuration Group Hosts',
-  'hosts.selectHostsDialog.message': 'Select hosts that should belong to this configuration group. Configurations for these hosts will be overridden from the default values.',
+  'hosts.selectHostsDialog.message': 'Select hosts that should belong to this {0} Configuration Group.  All hosts belonging to this group will have the same set of {0} configurations.',
   'hosts.selectHostsDialog.filter.placeHolder': 'Filter...',
   'hosts.selectHostsDialog.selectedHostsLink': '{0} out of {1} hosts selected',
 
@@ -1709,15 +1709,15 @@ Em.I18n.translations = {
 
   'contact.administrator': 'Contact System Administrator for more information!',
 
-  'config.group.selection.dialog.title': 'Configuration Group',
-  'config.group.selection.dialog.subtitle': 'Select or create a configuration group where the configuration value can be overridden',
-  'config.group.selection.dialog.option.select': 'Select existing configuration group',
+  '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.option.select.msg': 'Overridden property will be changed for hosts belonging to the selected group.',
-  'config.group.selection.dialog.option.create': 'Create new configuration group',
-  'config.group.selection.dialog.option.create.msg': 'A new 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 Configuration Groups to select for this service',
+  '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.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.host.switch.dialog.title': 'Change Group',
 
   'utils.ajax.errorMessage': 'Error message'

http://git-wip-us.apache.org/repos/asf/ambari/blob/a9f8f3b6/ambari-web/app/templates/common/configs/overrideWindow.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/overrideWindow.hbs b/ambari-web/app/templates/common/configs/overrideWindow.hbs
index 48199c3..6998b96 100644
--- a/ambari-web/app/templates/common/configs/overrideWindow.hbs
+++ b/ambari-web/app/templates/common/configs/overrideWindow.hbs
@@ -19,7 +19,7 @@
 {{! #with view.categoryConfigProperty}}
   <form class="form-horizontal" autocomplete="off">
       <div class="override-controls">
-        <h4 class="message">{{view.parentView.dialogMessage}}</h4>
+        <div class="alert alert-info">{{view.parentView.dialogMessage}}</div>
         {{#if view.parentView.warningMessage}}
 	        <div class="text-warning">
 	          {{view.parentView.warningMessage}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/a9f8f3b6/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 1ad1782..15a50b0 100644
--- a/ambari-web/app/templates/common/configs/selectCreateConfigGroup.hbs
+++ b/ambari-web/app/templates/common/configs/selectCreateConfigGroup.hbs
@@ -17,7 +17,7 @@
 }}
 <div id="config-group-select-create-dialog">
   <div class="alert alert-info">
-    {{t config.group.selection.dialog.subtitle}}
+    {{t config.group.selection.dialog.subtitle serviceNameBinding="selectedService.displayName"}}
   </div>
   <div class="text-warning">
   {{#if view.parentView.warningMessage}}
@@ -28,7 +28,7 @@
     </div>
     <label class="radio">
       {{view view.selectConfigGroupRadioButton}}
-      {{t config.group.selection.dialog.option.select}}
+      {{t config.group.selection.dialog.option.select serviceNameBinding="selectedService.displayName"}}
     </label>
     {{#if view.parentView.availableConfigGroups.length}}
     <div class="select-create-config-group-div">
@@ -52,16 +52,16 @@
     </div>
   {{else}}
     <div class="select-create-config-group-div">
-      <div class="alert alert-block">{{t config.group.selection.dialog.no.groups}}</div>
+      <div class="alert alert-block">{{t config.group.selection.dialog.no.groups serviceNameBinding="selectedService.displayName"}}</div>
     </div>
   {{/if}}
   <label class="radio">
     {{view view.createConfigGroupRadioButton}}
-    {{t config.group.selection.dialog.option.create}}
+    {{t config.group.selection.dialog.option.create serviceNameBinding="selectedService.displayName"}}
   </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}}</div>
+    <div class="message">{{t config.group.selection.dialog.option.create.msg serviceNameBinding="selectedService.displayName"}}</div>
   </div>
 </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/a9f8f3b6/ambari-web/app/templates/main/service/manage_configuration_groups_popup.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/manage_configuration_groups_popup.hbs b/ambari-web/app/templates/main/service/manage_configuration_groups_popup.hbs
index 4accc70..21071c1 100644
--- a/ambari-web/app/templates/main/service/manage_configuration_groups_popup.hbs
+++ b/ambari-web/app/templates/main/service/manage_configuration_groups_popup.hbs
@@ -15,10 +15,10 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 }}
-<div class="alert alert-info">{{t services.service.config_groups_popup.notice}}</div>
+<div class="alert alert-info">{{t services.service.config_groups_popup.notice serviceNameBinding="view.displayName"}}</div>
 <div class="row-fluid  manage-configuration-group-content">
   <div class="span12">
-    {{t services.service.config_groups_popup.config_groups}}
+    {{t services.service.config_groups_popup.config_groups  serviceNameBinding="view.displayName"}}
     <div class="row-fluid">
       <div class="span5">
         {{view Em.Select

http://git-wip-us.apache.org/repos/asf/ambari/blob/a9f8f3b6/ambari-web/app/utils/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index 065e2c1..74bf6dd 100644
--- a/ambari-web/app/utils/config.js
+++ b/ambari-web/app/utils/config.js
@@ -1005,7 +1005,7 @@ App.config = Em.Object.create({
         availableConfigGroups[0] : null;
     App.ModalPopup.show({
       classNames: [ 'sixty-percent-width-modal' ],
-      header: Em.I18n.t('config.group.selection.dialog.title'),
+      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,

http://git-wip-us.apache.org/repos/asf/ambari/blob/a9f8f3b6/ambari-web/app/views/common/configs/services_config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/services_config.js b/ambari-web/app/views/common/configs/services_config.js
index 005977d..41a50d3 100644
--- a/ambari-web/app/views/common/configs/services_config.js
+++ b/ambari-web/app/views/common/configs/services_config.js
@@ -584,6 +584,10 @@ App.ServiceConfigsByCategoryView = Ember.View.extend({
      * we ask for a normalized array back.
      */
     var validComponents = this.get('controller.getCurrentServiceComponents');
+    var popupDescription = {
+      header: Em.I18n.t('hosts.selectHostsDialog.title'),
+      dialogMessage: Em.I18n.t('hosts.selectHostsDialog.message').format(App.Service.DisplayNames[this.get('service.serviceName')])
+    };
     hostsUtils.launchHostsSelectionDialog(availableHosts, selectedHosts,
         false, validComponents, function(newSelectedHosts){
       if (newSelectedHosts!=null) {
@@ -599,7 +603,7 @@ App.ServiceConfigsByCategoryView = Ember.View.extend({
           overrides.removeObject(serviceConfigProperty);
         }
       }
-    });
+    }, popupDescription);
   }
 });