You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2012/11/06 01:07:29 UTC

[8/9] git commit: CS-16732: Show virtual router actions on VPC detail view

CS-16732: Show virtual router actions on VPC detail view


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

Branch: refs/heads/master
Commit: a7138d96659bdf15a036ea9d8899da3413067440
Parents: c91bde7
Author: Brian Federle <br...@citrix.com>
Authored: Mon Nov 5 14:52:19 2012 -0800
Committer: Brian Federle <br...@citrix.com>
Committed: Mon Nov 5 15:42:10 2012 -0800

----------------------------------------------------------------------
 ui/scripts/network.js |    1 +
 ui/scripts/system.js  |    2 +-
 ui/scripts/vpc.js     |   21 ++++++++++++++++++++-
 3 files changed, 22 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/a7138d96/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index be362ff..dae4dfb 100644
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -4068,6 +4068,7 @@
                       var item = json.listroutersresponse.router[0];
                       
                       args.response.success({
+                        actionFilter: cloudStack.sections.system.routerActionFilter,
                         data:item
                       });
                     }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/a7138d96/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index ee26964..5a84bf8 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -10353,7 +10353,7 @@
     return allowedActions;
   }
 
-  var routerActionfilter = function(args) {
+  var routerActionfilter = cloudStack.sections.system.routerActionFilter = function(args) {
     var jsonObj = args.context.item;
     var allowedActions = [];
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/a7138d96/ui/scripts/vpc.js
----------------------------------------------------------------------
diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js
index a79006e..6ce7e8b 100644
--- a/ui/scripts/vpc.js
+++ b/ui/scripts/vpc.js
@@ -251,8 +251,27 @@
     routerDetailView: function() {
       return {
         title: 'VPC router details',
+        updateContext: function(args) {
+          var router;
+          
+          $.ajax({
+            url: createURL("listRouters&listAll=true&vpcid=" +args.context.vpc[0].id),
+            dataType: "json",
+            async: false,
+            success: function(json) {
+              router = json.listroutersresponse.router[0];
+            }
+          });
+          
+          return {
+            routers: [router]
+          };
+        },
+        actions: cloudStack.sections.system.subsections.virtualRouters
+          .listView.detailView.actions,
         tabs: {
-          routerDetails: cloudStack.sections.network.sections.vpc.listView.detailView.tabs.router
+          routerDetails: cloudStack.sections.network.sections.vpc
+            .listView.detailView.tabs.router
         }
       };
     },