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:09:27 UTC
git commit: cloudstack 3.0 UI - infrastructure - zone detail -
network service providers - VPC Virtual Router - Instances tab - detailView -
add Reboot action.
Updated Branches:
refs/heads/vpc a5f979355 -> a1143acf8
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/vpc
Commit: a1143acf8555982217142de8b63e8a3d66db899b
Parents: a5f9793
Author: Jessica Wang <je...@citrix.com>
Authored: Mon Aug 6 16:28:23 2012 -0700
Committer: Jessica Wang <je...@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())