You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by je...@apache.org on 2012/08/08 19:13:53 UTC

git commit: cloudstack 3.0 UI - infrastructure - Virtual Routers - detailView - add Reboot action to VPC Virtual Router.

Updated Branches:
  refs/heads/vpc a1143acf8 -> 0c8ce06f6


cloudstack 3.0 UI - infrastructure - Virtual Routers - detailView - add Reboot action to VPC Virtual Router.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/0c8ce06f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/0c8ce06f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/0c8ce06f

Branch: refs/heads/vpc
Commit: 0c8ce06f6b092dacfbd2d081ae347b9713f94e44
Parents: a1143ac
Author: Jessica Wang <je...@citrix.com>
Authored: Mon Aug 6 16:36:35 2012 -0700
Committer: Jessica Wang <je...@citrix.com>
Committed: Wed Aug 8 10:13:17 2012 -0700

----------------------------------------------------------------------
 ui/scripts/system.js |   38 +++++++++++++++++++++++++++++++++++++-
 1 files changed, 37 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0c8ce06f/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 1c48d08..bc6ebe3 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -4952,7 +4952,43 @@
                   poll: pollAsyncJobResult
                 }
               },
-          			  
+							
+							restart: {
+								label: 'label.action.reboot.router',
+								messages: {
+									confirm: function(args) {
+										return 'message.action.reboot.router';
+									},
+									notification: function(args) {
+										return 'label.action.reboot.router';
+									}
+								},
+								action: function(args) {
+									$.ajax({
+										url: createURL('rebootRouter&id=' + args.context.routers[0].id),
+										dataType: 'json',
+										async: true,
+										success: function(json) {
+											var jid = json.rebootrouterresponse.jobid;
+											args.response.success({
+												_custom: {
+													jobId: jid,
+													getUpdatedItem: function(json) {
+														return json.queryasyncjobresultresponse.jobresult.domainrouter;
+													},
+													getActionFilter: function() {
+														return routerActionfilter;
+													}
+												}
+											});
+										}
+									});
+								},
+								notification: {
+									poll: pollAsyncJobResult
+								}
+							},              							
+									
 							changeService: {
 								label: 'label.change.service.offering',
 								createForm: {