You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by is...@apache.org on 2017/11/01 10:54:49 UTC
ambari git commit: AMBARI-22344. Change Bulk delete host message.
(Ishan Bhatt)
Repository: ambari
Updated Branches:
refs/heads/trunk a1da9934f -> 8a8d48fde
AMBARI-22344. Change Bulk delete host message. (Ishan Bhatt)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8a8d48fd
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8a8d48fd
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8a8d48fd
Branch: refs/heads/trunk
Commit: 8a8d48fde61b3f4fbfc623dfb72d5c3ab5a7950a
Parents: a1da993
Author: Ishan Bhatt <is...@gmail.com>
Authored: Tue Oct 31 15:20:42 2017 -0700
Committer: Ishan Bhatt <is...@gmail.com>
Committed: Tue Oct 31 15:20:42 2017 -0700
----------------------------------------------------------------------
.../main/host/bulk_operations_controller.js | 14 +++++++++++---
ambari-web/app/messages.js | 1 +
2 files changed, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/8a8d48fd/ambari-web/app/controllers/main/host/bulk_operations_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/host/bulk_operations_controller.js b/ambari-web/app/controllers/main/host/bulk_operations_controller.js
index bcd0af0..94894dc 100644
--- a/ambari-web/app/controllers/main/host/bulk_operations_controller.js
+++ b/ambari-web/app/controllers/main/host/bulk_operations_controller.js
@@ -1187,9 +1187,17 @@ App.BulkOperationsController = Em.Controller.extend({
hostNamesSkipped = this._getSkippedForPassiveStateHosts(hosts);
}
- var message = operationData.componentNameFormatted ?
- Em.I18n.t('hosts.bulkOperation.confirmation.hostComponents').format(operationData.message, operationData.componentNameFormatted, hostNames.length) :
- Em.I18n.t('hosts.bulkOperation.confirmation.hosts').format(operationData.message, hostNames.length);
+ var message = "";
+ if (operationData.componentNameFormatted) {
+ message = Em.I18n.t('hosts.bulkOperation.confirmation.hostComponents').format(operationData.message, operationData.componentNameFormatted, hostNames.length);
+ } else {
+ if (operationData.action == 'DELETE') {
+ message = Em.I18n.t('hosts.bulkOperation.confirmation.delete.hosts').format(hostNames.length);
+ } else {
+ message = Em.I18n.t('hosts.bulkOperation.confirmation.hosts').format(operationData.message, hostNames.length);
+ }
+ }
+
return App.ModalPopup.show({
header: Em.I18n.t('hosts.bulkOperation.confirmation.header'),
http://git-wip-us.apache.org/repos/asf/ambari/blob/8a8d48fd/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index ebf2f8a..bee581a 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -2605,6 +2605,7 @@ Em.I18n.translations = {
'hosts.bulkOperation.confirmation.header':'Confirm Bulk Operation',
'hosts.bulkOperation.confirmation.hosts':'Are you sure you want to <strong>{0}</strong> on the following {1} hosts?',
+ 'hosts.bulkOperation.confirmation.delete.hosts':'Are you sure you want to delete the following {0} hosts?',
'hosts.bulkOperation.confirmation.hostComponents':'Are you sure you want to <strong>{0} {1}</strong> on the following {2} hosts?',
'hosts.bulkOperation.passiveState.nothingToDo.body':'All hosts that you selected are already in Maintenance Mode.',
'hosts.bulkOperation.warningInfo.body':'Components on these hosts are stopped so decommission will be skipped.',