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 2013/12/05 18:09:39 UTC
git commit: AMBARI-3991 Manage config group links needed in save
config-group confirmation
Updated Branches:
refs/heads/trunk e449076dd -> 796eab5e5
AMBARI-3991 Manage config group links needed in save config-group confirmation
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/796eab5e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/796eab5e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/796eab5e
Branch: refs/heads/trunk
Commit: 796eab5e5c794c5c192fc93c5fdfbd404a19e20f
Parents: e449076
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Thu Dec 5 19:05:37 2013 +0200
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Thu Dec 5 19:05:51 2013 +0200
----------------------------------------------------------------------
ambari-web/app/messages.js | 6 ++++++
ambari-web/app/styles/application.less | 7 +++++++
.../common/configs/saveConfigGroup.hbs | 21 ++++++++++++++++++++
ambari-web/app/utils/config.js | 19 ++++++++++++++++++
4 files changed, 53 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/796eab5e/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 6dab8aa..2958b10 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1722,5 +1722,11 @@ Em.I18n.translations = {
'config.group.selection.dialog.no.groups': 'There are no existing {{serviceName}} Configuration Groups.',
'config.group.host.switch.dialog.title': 'Change Group',
+ 'config.group.save.confirmation.header': 'Save Configuration Group',
+ 'config.group.save.confirmation.msg': 'Click <em>Manage Hosts</em> to manage host membership to the configuration group',
+ 'config.group.save.confirmation.configGroup': 'Configuration Group',
+ 'config.group.save.confirmation.saved': 'has been successfully saved',
+ 'config.group.save.confirmation.manage.button': 'Manage Hosts',
+
'utils.ajax.errorMessage': 'Error message'
};
http://git-wip-us.apache.org/repos/asf/ambari/blob/796eab5e/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index 0bf3e1e..e3cf1bd 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -4955,6 +4955,13 @@ i.icon-asterisks {
}
}
+#config-group-confirm-save {
+ .message{
+ color: #777;
+ padding-left: 10px;
+ }
+}
+
.manage-configuration-group-popup {
.modal{
max-height: 600px;
http://git-wip-us.apache.org/repos/asf/ambari/blob/796eab5e/ambari-web/app/templates/common/configs/saveConfigGroup.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/saveConfigGroup.hbs b/ambari-web/app/templates/common/configs/saveConfigGroup.hbs
new file mode 100644
index 0000000..f2b839e
--- /dev/null
+++ b/ambari-web/app/templates/common/configs/saveConfigGroup.hbs
@@ -0,0 +1,21 @@
+{{!
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+}}
+<div id="config-group-confirm-save">
+ <div class="alert alert-success">{{t config.group.save.confirmation.configGroup}} <em>{{groupName}}</em> {{t config.group.save.confirmation.saved}}</div>
+ <div class="message">{{t config.group.save.confirmation.msg}}</div>
+</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/796eab5e/ambari-web/app/utils/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index f998974..c09e526 100644
--- a/ambari-web/app/utils/config.js
+++ b/ambari-web/app/utils/config.js
@@ -986,6 +986,23 @@ App.config = Em.Object.create({
* @param callback Callback function which is invoked when dialog
* is closed, cancelled or OK is pressed.
*/
+
+ saveGroupConfirmationPopup: function(groupName,isInstaller) {
+ App.ModalPopup.show({
+ header: Em.I18n.t('config.group.save.confirmation.header'),
+ secondary: Em.I18n.t('config.group.save.confirmation.manage.button'),
+ groupName: groupName,
+ bodyClass: Ember.View.extend({
+ templateName: require('templates/common/configs/saveConfigGroup')
+ }),
+ onSecondary: function() {
+ var controller = isInstaller ? App.router.get('wizardStep7Controller') : undefined;
+ App.router.get('mainServiceInfoConfigsController').manageConfigurationGroups(controller);
+ this.hide();
+ }
+ });
+ },
+
launchConfigGroupSelectionCreationDialog : function(serviceId, configGroups, usedConfigGroupNames, configProperty, callback, isInstaller) {
var self = this;
var availableConfigGroups = configGroups.slice();
@@ -1026,6 +1043,7 @@ App.config = Em.Object.create({
if (this.get('optionSelectConfigGroup')) {
var selectedConfigGroup = this.get('selectedConfigGroup');
this.hide();
+ self.saveGroupConfirmationPopup(selectedConfigGroup,isInstaller);
callback(selectedConfigGroup);
} else {
var newConfigGroupName = this.get('newConfigGroupName').trim();
@@ -1034,6 +1052,7 @@ App.config = Em.Object.create({
newConfigGroup.set('parentConfigGroup', configGroups.findProperty('isDefault'));
configGroups.pushObject(newConfigGroup);
this.hide();
+ self.saveGroupConfirmationPopup(newConfigGroupName,isInstaller);
callback(newConfigGroup);
}
}