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/04/24 01:19:03 UTC
svn commit: r1471205 - in /incubator/ambari/trunk: CHANGES.txt
ambari-web/app/controllers/main/host/details.js ambari-web/app/messages.js
Author: yusaku
Date: Tue Apr 23 23:19:03 2013
New Revision: 1471205
URL: http://svn.apache.org/r1471205
Log:
AMBARI-2005. When adding a component to a host (after cluster deployment), UI should warn that nagios server need to be restarted. (yusaku)
Modified:
incubator/ambari/trunk/CHANGES.txt
incubator/ambari/trunk/ambari-web/app/controllers/main/host/details.js
incubator/ambari/trunk/ambari-web/app/messages.js
Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1471205&r1=1471204&r2=1471205&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Tue Apr 23 23:19:03 2013
@@ -269,6 +269,9 @@ Trunk (unreleased changes):
IMPROVEMENTS
+ AMBARI-2005. When adding a component to a host (after cluster deployment),
+ UI should warn that nagios server need to be restarted. (yusaku)
+
AMBARI-2004. Background Operation Popup needs label/styling fixes.
(yusaku)
Modified: incubator/ambari/trunk/ambari-web/app/controllers/main/host/details.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/main/host/details.js?rev=1471205&r1=1471204&r2=1471205&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/main/host/details.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/main/host/details.js Tue Apr 23 23:19:03 2013
@@ -216,57 +216,70 @@ App.MainHostDetailsController = Em.Contr
var component = event.context;
var componentName = component.get('componentName').toUpperCase().toString();
- App.showConfirmationPopup(function() {
-
- self.sendCommandToServer('/hosts?Hosts/host_name=' + self.get('content.hostName'),{
- RequestInfo : {
- "context" : Em.I18n.t('requestInfo.installHostComponent') + " " + componentName
- },
- Body:{
- host_components: [{
- HostRoles:{
- component_name: componentName
+ App.ModalPopup.show({
+ primary: Em.I18n.t('yes'),
+ secondary: Em.I18n.t('no'),
+ header: Em.I18n.t('popup.confirmation.commonHeader'),
+ bodyClass: Ember.View.extend({
+ template: Ember.Handlebars.compile([
+ '{{t hosts.delete.popup.body}}<br><br>',
+ '{{t hosts.host.addComponent.note}}'
+ ].join(''))
+ }),
+ onPrimary: function () {
+ this.hide();
+ self.sendCommandToServer('/hosts?Hosts/host_name=' + self.get('content.hostName'), {
+ RequestInfo: {
+ "context": Em.I18n.t('requestInfo.installHostComponent') + " " + componentName
+ },
+ Body: {
+ host_components: [
+ {
+ HostRoles: {
+ component_name: componentName
+ }
+ }
+ ]
}
- }]
- }
- },
- 'POST',
- function(requestId){
+ },
+ 'POST',
+ function (requestId) {
- console.log('Send request for ADDING NEW COMPONENT successfully');
+ console.log('Send request for ADDING NEW COMPONENT successfully');
- self.sendCommandToServer('/host_components?HostRoles/host_name=' + self.get('content.hostName') + '\&HostRoles/component_name=' + componentName + '\&HostRoles/state=INIT',{
- RequestInfo : {
- "context" : Em.I18n.t('requestInfo.installNewHostComponent')+ " " + componentName
+ self.sendCommandToServer('/host_components?HostRoles/host_name=' + self.get('content.hostName') + '\&HostRoles/component_name=' + componentName + '\&HostRoles/state=INIT', {
+ RequestInfo: {
+ "context": Em.I18n.t('requestInfo.installNewHostComponent') + " " + componentName
+ },
+ Body: {
+ HostRoles: {
+ state: 'INSTALLED'
+ }
+ }
},
- Body:{
- HostRoles:{
- state: 'INSTALLED'
+ 'PUT',
+ function (requestId) {
+ if (!requestId) {
+ return;
}
- }
- },
- 'PUT',
- function(requestId){
- if(!requestId){
- return;
- }
- console.log('Send request for INSTALLING NEW COMPONENT successfully');
+ console.log('Send request for INSTALLING NEW COMPONENT successfully');
- if (App.testMode) {
- component.set('workStatus', App.HostComponentStatus.installing);
- setTimeout(function(){
- component.set('workStatus', App.HostComponentStatus.stopped);
- },App.testModeDelayForActions);
- } else {
- App.router.get('clusterController').loadUpdatedStatus();
- }
+ if (App.testMode) {
+ component.set('workStatus', App.HostComponentStatus.installing);
+ setTimeout(function () {
+ component.set('workStatus', App.HostComponentStatus.stopped);
+ }, App.testModeDelayForActions);
+ } else {
+ App.router.get('clusterController').loadUpdatedStatus();
+ }
- App.router.get('backgroundOperationsController').showPopup();
+ App.router.get('backgroundOperationsController').showPopup();
- });
- return;
- });
+ });
+ return;
+ });
+ }
});
},
/**
Modified: incubator/ambari/trunk/ambari-web/app/messages.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/messages.js?rev=1471205&r1=1471204&r2=1471205&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/messages.js (original)
+++ incubator/ambari/trunk/ambari-web/app/messages.js Tue Apr 23 23:19:03 2013
@@ -849,6 +849,7 @@ Em.I18n.translations = {
'host.host.componentFilter.master':'Master Components',
'host.host.componentFilter.slave':'Slave Components',
'host.host.componentFilter.client':'Client Components',
+ '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.alert.noAlerts':'No alerts',
'hosts.host.alert.noAlerts.message':'There are no alerts for this host.',