cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [3/4] git commit: updated refs/heads/ui-vpc-redesign to 2eb29a5
Date Fri, 10 May 2013 22:42:32 GMT
Add tier detail view


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

Branch: refs/heads/ui-vpc-redesign
Commit: daf392685ae5cb4afb5ade906e7eed0a088d2817
Parents: 55ac9c1
Author: Brian Federle <brian.federle@citrix.com>
Authored: Fri May 10 15:41:44 2013 -0700
Committer: Brian Federle <brian.federle@citrix.com>
Committed: Fri May 10 15:41:44 2013 -0700

----------------------------------------------------------------------
 ui/modules/vpc/vpc.js |   24 +++++++++++++++++++++++-
 1 files changed, 23 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/daf39268/ui/modules/vpc/vpc.js
----------------------------------------------------------------------
diff --git a/ui/modules/vpc/vpc.js b/ui/modules/vpc/vpc.js
index ac59626..cb712bc 100644
--- a/ui/modules/vpc/vpc.js
+++ b/ui/modules/vpc/vpc.js
@@ -2,13 +2,15 @@
   var elems = {
     tier: function(args) {
       var tier = args.tier;
+      var context = args.context;
       var dashboardItems = args.dashboardItems;
       var $tier = $('<div>').addClass('tier-item');
       var $header = $('<div>').addClass('header');
       var $title = $('<div>').addClass('title').append($('<span>'));
       var $content = $('<div>').addClass('content');
+      var $browser = $('#browser .container');
       var $dashboard = elems.dashboard({
-        context: args.context,
+        context: context,
         dashboardItems: dashboardItems
       });
       var $detailLink = $('<div>').addClass('detail-link');
@@ -16,6 +18,24 @@
       var $cidrLabel = $('<span>').addClass('cidr-label');
       var $cidr = $('<span>').addClass('cidr');
 
+      $detailLink.click(function() {
+        $browser.cloudBrowser('addPanel', {
+          title: tier.displayname ? tier.displayname : tier.name,
+          complete: function($panel) {
+            var $detailView = $('<div>').detailView(
+              $.extend(true, {}, cloudStack.vpc.tiers.detailView, {
+                $browser: $browser,
+                context: $.extend(true, {}, context, {
+                  networks: [tier]
+                })
+              })
+            );
+
+            $detailView.appendTo($panel);
+          }
+        });
+      });
+
       $cidrLabel.html('CIDR: ');
       $cidr.html(tier.cidr);
       $title.find('span').html(tier.displayname ? tier.displayname : tier.name);
@@ -104,7 +124,9 @@
       var vpcItem = context.vpc[0];
       var $chart = $('<div>').addClass('vpc-network-chart');
       var $tiers = $('<div>').addClass('tiers');
+      var $toolbar = $('<div>').addClass('toolbar');
 
+      $toolbar.appendTo($chart);
       $tiers.appendTo($chart);
       
       // Get tiers


Mime
View raw message