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/master
Commit: 0c8ce06f6b092dacfbd2d081ae347b9713f94e44
Parents: a1143ac
Author: Jessica Wang <[email protected]>
Authored: Mon Aug 6 16:36:35 2012 -0700
Committer: Jessica Wang <[email protected]>
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: {

Reply via email to