You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by xi...@apache.org on 2014/03/12 21:40:44 UTC
git commit: AMBARI-5044. Host Details: when deleting a component,
show a message saying Nagios needs to be restarted.(xiwang)
Repository: ambari
Updated Branches:
refs/heads/trunk b7f2d16a8 -> af7a889bb
AMBARI-5044. Host Details: when deleting a component, show a message saying Nagios needs to be restarted.(xiwang)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/af7a889b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/af7a889b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/af7a889b
Branch: refs/heads/trunk
Commit: af7a889bb051f2bfffe92927125a08922421a61f
Parents: b7f2d16
Author: Xi Wang <xi...@apache.org>
Authored: Tue Mar 11 16:10:07 2014 -0700
Committer: Xi Wang <xi...@apache.org>
Committed: Wed Mar 12 13:38:06 2014 -0700
----------------------------------------------------------------------
ambari-web/app/controllers/main/host/details.js | 18 +++++++++++++-----
ambari-web/app/messages.js | 9 ++++++---
.../main/host/details/addComponentPopup.hbs | 2 +-
.../main/host/details/deleteComponentPopup.hbs | 3 ++-
.../main/host/details/installComponentPopup.hbs | 2 +-
5 files changed, 23 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/af7a889b/ambari-web/app/controllers/main/host/details.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js
index 1761b93..d47abc1 100644
--- a/ambari-web/app/controllers/main/host/details.js
+++ b/ambari-web/app/controllers/main/host/details.js
@@ -177,6 +177,7 @@ App.MainHostDetailsController = Em.Controller.extend({
var isLastComponent = (App.HostComponent.find().filterProperty('componentName', componentName).get('length') === 1);
App.ModalPopup.show({
header: Em.I18n.t('popup.confirmation.commonHeader'),
+ primary: Em.I18n.t('hosts.host.deleteComponent.popup.confirm'),
bodyClass: Ember.View.extend({
templateName: require('templates/main/host/details/deleteComponentPopup')
}),
@@ -193,8 +194,11 @@ App.MainHostDetailsController = Em.Controller.extend({
lastComponentError: Em.View.extend({
template: Ember.Handlebars.compile(Em.I18n.t('hosts.host.deleteComponent.popup.warning').format(displayName))
}),
+ restartNagiosMsg: Em.View.extend({
+ template: Ember.Handlebars.compile(Em.I18n.t('hosts.host.deleteComponent.popup.msg2').format(displayName))
+ }),
deleteComponentMsg: function() {
- return Em.I18n.t('hosts.host.deleteComponent.popup.msg').format(displayName);
+ return Em.I18n.t('hosts.host.deleteComponent.popup.msg1').format(displayName);
}.property(),
onPrimary: function () {
if (!this.get('enablePrimary')) return;
@@ -413,8 +417,7 @@ App.MainHostDetailsController = Em.Controller.extend({
dn += " ("+dns.join(", ")+")";
}
App.ModalPopup.show({
- primary: Em.I18n.t('yes'),
- secondary: Em.I18n.t('no'),
+ primary: Em.I18n.t('hosts.host.addComponent.popup.confirm'),
header: Em.I18n.t('popup.confirmation.commonHeader'),
addComponentMsg: function() {
return Em.I18n.t('hosts.host.addComponent.msg').format(dn);
@@ -422,6 +425,9 @@ App.MainHostDetailsController = Em.Controller.extend({
bodyClass: Ember.View.extend({
templateName: require('templates/main/host/details/addComponentPopup')
}),
+ restartNagiosMsg : Em.View.extend({
+ template: Ember.Handlebars.compile(Em.I18n.t('hosts.host.addComponent.note').format(dn))
+ }),
onPrimary: function () {
this.hide();
if (component.get('componentName') === 'CLIENTS') {
@@ -620,12 +626,14 @@ App.MainHostDetailsController = Em.Controller.extend({
var displayName = component.get('displayName');
App.ModalPopup.show({
- primary: Em.I18n.t('yes'),
- secondary: Em.I18n.t('no'),
+ primary: Em.I18n.t('hosts.host.addComponent.popup.confirm'),
header: Em.I18n.t('popup.confirmation.commonHeader'),
installComponentMessage: function(){
return Em.I18n.t('hosts.host.installComponent.msg').format(displayName);
}.property(),
+ restartNagiosMsg : Em.View.extend({
+ template: Ember.Handlebars.compile(Em.I18n.t('hosts.host.addComponent.note').format(displayName))
+ }),
bodyClass: Ember.View.extend({
templateName: require('templates/main/host/details/installComponentPopup')
}),
http://git-wip-us.apache.org/repos/asf/ambari/blob/af7a889b/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index a78511d..ccc3db4 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -638,7 +638,7 @@ Em.I18n.translations = {
'installer.step10.header':'Summary',
'installer.step10.body':'Here is the summary of the install process.',
- 'installer.step10.nagiosRestartRequired':'<b>Important!</b> Restarting Nagios service is required for alerts and notifications to work properly. After clicking on the Complete button to dismiss this wizard, go to Services -> Nagios to restart the Nagios service.',
+ 'installer.step10.nagiosRestartRequired':'<b>Important!</b> Restarting Nagios service is required for alerts and notifications to work properly. After clicking on the Complete button to dismiss this wizard, go to <i>Services -> Nagios</i> to restart the Nagios service.',
'installer.step10.hostsSummary':'The cluster consists of {0} hosts',
'installer.step10.servicesSummary':'Installed and started services successfully on {0} new ',
'installer.step10.warnings':' warnings',
@@ -1480,14 +1480,17 @@ Em.I18n.translations = {
'host.host.componentFilter.master':'Master Components',
'host.host.componentFilter.slave':'Slave Components',
'host.host.componentFilter.client':'Client Components',
- 'hosts.host.deleteComponent.popup.msg':'Are you sure you want to delete {0}?',
+ 'hosts.host.deleteComponent.popup.msg1':'Are you sure you want to delete {0}?',
+ 'hosts.host.deleteComponent.popup.msg2':'<b>Important:</b> After this <i>{0}</i> is deleted, go to <i>Services -> Nagios</i> to restart the Nagios service. This is required for the alerts and notifications to work properly.',
'hosts.host.deleteComponent.popup.warning':'<b>WARNING!</b> Delete the last <i>{0}</i> component in the cluster?</br>Deleting the last component in the cluster could result in permanent loss of service data.',
+ 'hosts.host.deleteComponent.popup.confirm':'Confirm Delete',
'hosts.host.installComponent.msg':'Are you sure you want to install {0}?',
'hosts.host.addComponent.msg':'Are you sure you want to add {0}?',
'hosts.host.addComponent.addZooKeeper':'Adding ZooKeeper Server may reconfigure such properties:<ul><li>ha.zookeeper.quorum</li><li>hbase.zookeeper.quorum</li><li>templeton.zookeeper.hosts</li></ul>',
'hosts.host.addComponent.deleteHostWithZooKeeper':'Deleting host with ZooKeeper Server may reconfigure such properties:<ul><li>ha.zookeeper.quorum</li><li>hbase.zookeeper.quorum</li><li>templeton.zookeeper.hosts</li></ul>',
- 'hosts.host.addComponent.note':'Note: After this component is installed, go to Services -> Nagios to restart the Nagios service. This is required for the alerts and notifications to work properly.',
+ 'hosts.host.addComponent.note':'<b>Important:</b> After this <i>{0}</i> is installed, go to <i>Services -> Nagios</i> to restart the Nagios service. This is required for the alerts and notifications to work properly.',
'hosts.host.addComponent.securityNote':'You are running your cluster in secure mode. You must set up the keytab for {0} on {1} before you proceed. Otherwise, the component will not be able to start properly.',
+ 'hosts.host.addComponent.popup.confirm':'Confirm Add',
'hosts.host.datanode.decommission':'Decommission DataNode',
'hosts.host.datanode.recommission':'Recommission DataNode',
'hosts.host.nodemanager.decommission':'Decommission NodeManager',
http://git-wip-us.apache.org/repos/asf/ambari/blob/af7a889b/ambari-web/app/templates/main/host/details/addComponentPopup.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/host/details/addComponentPopup.hbs b/ambari-web/app/templates/main/host/details/addComponentPopup.hbs
index d8b6645..e3129d9 100644
--- a/ambari-web/app/templates/main/host/details/addComponentPopup.hbs
+++ b/ambari-web/app/templates/main/host/details/addComponentPopup.hbs
@@ -17,4 +17,4 @@
}}
{{addComponentMsg}}<br /><br />
-{{t hosts.host.addComponent.note}}
\ No newline at end of file
+<div class='alert'>{{view restartNagiosMsg}}</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/af7a889b/ambari-web/app/templates/main/host/details/deleteComponentPopup.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/host/details/deleteComponentPopup.hbs b/ambari-web/app/templates/main/host/details/deleteComponentPopup.hbs
index b50ec51..235b49f 100644
--- a/ambari-web/app/templates/main/host/details/deleteComponentPopup.hbs
+++ b/ambari-web/app/templates/main/host/details/deleteComponentPopup.hbs
@@ -22,4 +22,5 @@
<div class='tinyspan tinyoffset'>{{view Ember.Checkbox checkedBinding="enablePrimary"}}</div>
<div class='span10'>{{view lastComponentError}}</div>
</div>
-{{/if}}
\ No newline at end of file
+{{/if}}
+<div class='alert'>{{view restartNagiosMsg}}</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/af7a889b/ambari-web/app/templates/main/host/details/installComponentPopup.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/host/details/installComponentPopup.hbs b/ambari-web/app/templates/main/host/details/installComponentPopup.hbs
index a8241bb..cc3be3f 100644
--- a/ambari-web/app/templates/main/host/details/installComponentPopup.hbs
+++ b/ambari-web/app/templates/main/host/details/installComponentPopup.hbs
@@ -17,4 +17,4 @@
}}
{{installComponentMessage}}<br /><br />
-{{t hosts.host.addComponent.note}}
\ No newline at end of file
+<div class='alert'>{{view restartNagiosMsg}}</div>
\ No newline at end of file