cloudstack 3.0 UI - infrastructure - zone detail - network service providers - VPC Virtual Router - Instances tab - detailView - add Reboot action.
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/a1143acf Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/a1143acf Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/a1143acf Branch: refs/heads/master Commit: a1143acf8555982217142de8b63e8a3d66db899b Parents: a5f9793 Author: Jessica Wang <jessica.w...@citrix.com> Authored: Mon Aug 6 16:28:23 2012 -0700 Committer: Jessica Wang <jessica.w...@citrix.com> Committed: Wed Aug 8 10:08:38 2012 -0700 ---------------------------------------------------------------------- ui/scripts/system.js | 49 +++++++++++++++++++++++++++++++++++++------- 1 files changed, 41 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/a1143acf/ui/scripts/system.js ---------------------------------------------------------------------- diff --git a/ui/scripts/system.js b/ui/scripts/system.js index db8e62d..1c48d08 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -2543,7 +2543,43 @@ notification: { 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', @@ -4916,8 +4952,7 @@ poll: pollAsyncJobResult } }, - - //??? + changeService: { label: 'label.change.service.offering', createForm: { @@ -4973,8 +5008,7 @@ args.complete(); } } - }, - //??? + }, migrate: { label: 'label.action.migrate.router', @@ -9615,10 +9649,9 @@ if (jsonObj.state == 'Running') { allowedActions.push("stop"); - allowedActions.push("restart"); - + if(jsonObj.vpcid != null) - allowedActions.push("changeService"); + allowedActions.push("restart"); allowedActions.push("viewConsole"); if (isAdmin())