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 2015/05/05 23:40:31 UTC
ambari git commit: AMBARI-10942. change confirmation message for
Delete widget confirmation popup. (jaimin)
Repository: ambari
Updated Branches:
refs/heads/trunk c6a69c0ef -> eaefe6d30
AMBARI-10942. change confirmation message for Delete widget confirmation popup. (jaimin)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/eaefe6d3
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/eaefe6d3
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/eaefe6d3
Branch: refs/heads/trunk
Commit: eaefe6d304110c0d9a3f74536f4d0a1a79f40f37
Parents: c6a69c0
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Tue May 5 14:40:12 2015 -0700
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Tue May 5 14:40:18 2015 -0700
----------------------------------------------------------------------
.../controllers/main/service/info/summary.js | 10 +++-----
ambari-web/app/messages.js | 7 ++++-
.../modal_popups/confirmation_feedback.hbs | 2 +-
.../modal_popups/widget_browser_footer.hbs | 27 ++++++++++++++++++++
4 files changed, 37 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/eaefe6d3/ambari-web/app/controllers/main/service/info/summary.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/info/summary.js b/ambari-web/app/controllers/main/service/info/summary.js
index 58c0605..3545d92 100644
--- a/ambari-web/app/controllers/main/service/info/summary.js
+++ b/ambari-web/app/controllers/main/service/info/summary.js
@@ -517,8 +517,9 @@ App.MainServiceInfoSummaryController = Em.Controller.extend(App.WidgetSectionMix
deleteWidget: function (event) {
var widget = event.context;
var self = this;
+ var confirmMsg = widget.get('isShared') ? Em.I18n.t('dashboard.widgets.browser.action.delete.shared.bodyMsg').format(widget.widgetName) : Em.I18n.t('dashboard.widgets.browser.action.delete.mine.bodyMsg').format(widget.widgetName);
var bodyMessage = Em.Object.create({
- confirmMsg: Em.I18n.t('dashboard.widgets.browser.action.delete.bodyMsg').format(widget.displayName),
+ confirmMsg: confirmMsg,
confirmButton: Em.I18n.t('dashboard.widgets.browser.action.delete.btnMsg')
});
return App.showConfirmationFeedBackPopup(function (query) {
@@ -609,16 +610,11 @@ App.MainServiceInfoSummaryController = Em.Controller.extend(App.WidgetSectionMix
autoHeight: false,
isHideBodyScroll: false,
footerClass: Ember.View.extend({
- template: Ember.Handlebars.compile('<div class="modal-footer">' +
- '<label id="footer-checkbox">' +
- '{{view Ember.Checkbox classNames="checkbox" checkedBinding="view.parentView.isShowMineOnly"}} ' +
- '{{t dashboard.widgets.browser.footer.checkbox}}</label>'+
- '<button class="btn btn-success" {{action onPrimary target="view"}}>{{t common.close}}</button></div>'),
+ templateName: require('templates/common/modal_popups/widget_browser_footer'),
isShowMineOnly: false,
onPrimary: function() {
this.get('parentView').onPrimary();
}
-
}),
isShowMineOnly: false,
bodyClass: Ember.View.extend({
http://git-wip-us.apache.org/repos/asf/ambari/blob/eaefe6d3/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 31a7a52..552e7f2 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -2297,7 +2297,12 @@ Em.I18n.translations = {
'dashboard.widgets.browser.action.share': 'Share',
'dashboard.widgets.browser.action.share.confirmation': 'You are about to make this a shared widget. All cluster operators will be able to modify or delete this widget. Are you sure you want to share this widget?',
'dashboard.widgets.browser.shareIcon.tooltip': 'Shared',
- 'dashboard.widgets.browser.action.delete.bodyMsg': 'You are about to permanently delete widget: {0}. You can add it back through creating new widget.',
+ 'dashboard.widgets.browser.action.delete.shared.bodyMsg': 'You are about to permanently delete the <b>{0}</b> widget. ' +
+ 'This widget is a shared and this operation will delete the widget from the shared widget library and remove the ' +
+ 'widget from all users.<br /> <br /> <b>Are you sure you wish to permanently delete this shared widget?</b>',
+ 'dashboard.widgets.browser.action.delete.mine.bodyMsg': 'You are about to permanently delete the <b>{0}</b> widget. ' +
+ 'This operation will delete the widget from your widget library.<br /><br /><b>Are you sure you wish to permanently ' +
+ 'delete this widget?</b>',
'dashboard.widgets.browser.action.delete.btnMsg': 'Confirm Delete',
'dashboard.widgets.NameNodeHeap': 'NameNode Heap',
http://git-wip-us.apache.org/repos/asf/ambari/blob/eaefe6d3/ambari-web/app/templates/common/modal_popups/confirmation_feedback.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/modal_popups/confirmation_feedback.hbs b/ambari-web/app/templates/common/modal_popups/confirmation_feedback.hbs
index bda28b8..d99d2a3 100644
--- a/ambari-web/app/templates/common/modal_popups/confirmation_feedback.hbs
+++ b/ambari-web/app/templates/common/modal_popups/confirmation_feedback.hbs
@@ -16,7 +16,7 @@
* limitations under the License.
}}
<div>
- {{view.parentView.statusMessage}}
+ {{{view.parentView.statusMessage}}}
</div>
{{#if view.parentView.additionalWarningMsg}}
<br />
http://git-wip-us.apache.org/repos/asf/ambari/blob/eaefe6d3/ambari-web/app/templates/common/modal_popups/widget_browser_footer.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/modal_popups/widget_browser_footer.hbs b/ambari-web/app/templates/common/modal_popups/widget_browser_footer.hbs
new file mode 100644
index 0000000..72c2d80
--- /dev/null
+++ b/ambari-web/app/templates/common/modal_popups/widget_browser_footer.hbs
@@ -0,0 +1,27 @@
+{{!
+* 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 class="modal-footer">
+ {{#isAccessible ADMIN}}
+ <label id="footer-checkbox">
+ {{view Ember.Checkbox classNames="checkbox" checkedBinding="view.parentView.isShowMineOnly"}}
+ {{t dashboard.widgets.browser.footer.checkbox}}
+ </label>
+ {{/isAccessible}}
+ <button class="btn btn-success" {{action onPrimary target="view"}}>{{t common.close}}</button>
+</div>
\ No newline at end of file