You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sr...@apache.org on 2014/01/17 03:01:25 UTC
git commit: AMBARI-4327. Provide Restart All action for host in
Ambari UI. (srimanth)
Updated Branches:
refs/heads/trunk 8d5c99db8 -> 53f05bebb
AMBARI-4327. Provide Restart All action for host in Ambari UI. (srimanth)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/53f05beb
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/53f05beb
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/53f05beb
Branch: refs/heads/trunk
Commit: 53f05bebb46aad3e9e4a4cf9ca6cfdd3c1c02976
Parents: 8d5c99d
Author: Srimanth Gunturi <sg...@hortonworks.com>
Authored: Thu Jan 16 16:40:18 2014 -0800
Committer: Srimanth Gunturi <sg...@hortonworks.com>
Committed: Thu Jan 16 16:40:24 2014 -0800
----------------------------------------------------------------------
ambari-web/app/controllers/main/host/details.js | 14 ++++++++++++++
ambari-web/app/messages.js | 1 +
ambari-web/app/views/main/host/details.js | 1 +
3 files changed, 16 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/53f05beb/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 6cb99c0..f93124a 100644
--- a/ambari-web/app/controllers/main/host/details.js
+++ b/ambari-web/app/controllers/main/host/details.js
@@ -793,6 +793,9 @@ App.MainHostDetailsController = Em.Controller.extend({
case "stopAllComponents":
this.doStopAllComponents();
break;
+ case "restartAllComponents":
+ this.doRestartAllComponents();
+ break;
default:
break;
}
@@ -822,6 +825,17 @@ App.MainHostDetailsController = Em.Controller.extend({
}
},
+ doRestartAllComponents: function() {
+ var self = this;
+ var components = this.get('content.hostComponents');
+ var componentsLength = components == null ? 0 : components.get('length');
+ if (componentsLength > 0) {
+ App.showConfirmationPopup(function() {
+ batchUtils.restartHostComponents(components);
+ });
+ }
+ },
+
/**
* Deletion of hosts not supported for this version
*/
http://git-wip-us.apache.org/repos/asf/ambari/blob/53f05beb/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 90382c4..30fa4d4 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1382,6 +1382,7 @@ Em.I18n.translations = {
'hosts.host.details.deleteHost':'Delete Host',
'hosts.host.details.startAllComponents':'Start All Components',
'hosts.host.details.stopAllComponents':'Stop All Components',
+ 'hosts.host.details.restartAllComponents':'Restart All Components',
'host.host.componentFilter.master':'Master Components',
'host.host.componentFilter.slave':'Slave Components',
http://git-wip-us.apache.org/repos/asf/ambari/blob/53f05beb/ambari-web/app/views/main/host/details.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/host/details.js b/ambari-web/app/views/main/host/details.js
index dde38e1..1a4be4d 100644
--- a/ambari-web/app/views/main/host/details.js
+++ b/ambari-web/app/views/main/host/details.js
@@ -30,6 +30,7 @@ App.MainHostDetailsView = Em.View.extend({
var options = [
{action: 'startAllComponents', 'label': this.t('hosts.host.details.startAllComponents')},
{action: 'stopAllComponents', 'label': this.t('hosts.host.details.stopAllComponents')},
+ {action: 'restartAllComponents', 'label': this.t('hosts.host.details.restartAllComponents')},
{action: 'deleteHost', 'label': this.t('hosts.host.details.deleteHost')}];
return options;
}.property('controller.content'),