From 5ff964de72fe07eec2970ac7e68f7406dc60dfbd Mon Sep 17 00:00:00 2001 From: Brian Federle Date: Fri, 10 Aug 2012 12:58:17 -0700 Subject: [PATCH] VPC UI: New ACL flow -Remove the ACL action from the tier chart item -Adds an ACL overview list view under the VPC configure menu which displays each tier and their total # of ACLs. -Add ACL edit to tier detail view - (misc) Also add IP address tab to tier detail view --- ui/css/cloudstack3.css | 37 ++++++ ui/scripts/ui-custom/vpc.js | 144 ++++++++++++++++++---- ui/scripts/ui/widgets/multiEdit.js | 1 + ui/scripts/vpc.js | 190 +++++++++++++++++++++++++---- 4 files changed, 324 insertions(+), 48 deletions(-) diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css index 2f5afa747d7..65df2fc4f9c 100644 --- a/ui/css/cloudstack3.css +++ b/ui/css/cloudstack3.css @@ -9695,6 +9695,43 @@ div.panel.ui-dialog div.list-view div.fixed-header { max-width: 184px !important; } +div.ui-dialog div.acl div.multi-edit table.multi-edit thead tr th, +div.ui-dialog div.acl div.multi-edit table.multi-edit tbody tr td { + min-width: 75px; +} + +div.ui-dialog div.acl div.multi-edit div.data div.data-body div.data-item table tbody tr td { + width: 100%; + min-width: 77px; +} + +.detail-view .acl .multi-edit { +} + +.detail-view .acl .multi-edit th, +.detail-view .acl .multi-edit td { + padding-right: 0px !important; + min-width: 25px !important; +} + +.detail-view .acl .multi-edit th { + font-size: 10px; +} + +.detail-view .acl .multi-edit input { + width: 50px; +} + +.detail-view .acl .multi-edit .add-vm { + width: 51px; + text-indent: 0px; + padding-right: 0px; +} + +.detail-view .acl .multi-edit td.multi-actions { + width: 65px; +} + /*Autoscaler*/ .ui-dialog div.autoscaler { overflow: auto; diff --git a/ui/scripts/ui-custom/vpc.js b/ui/scripts/ui-custom/vpc.js index 5e4a5580f33..5d3a5dc5e11 100644 --- a/ui/scripts/ui-custom/vpc.js +++ b/ui/scripts/ui-custom/vpc.js @@ -10,21 +10,53 @@ // limitations under the License. (function($, cloudStack) { var elems = { + aclDialog: function(args) { + var isDialog = args.isDialog; + var actionArgs = args.actionArgs; + var context = args.context; + var $acl = $('
').addClass('acl').multiEdit( + $.extend(true, {}, actionArgs.multiEdit, { + context: context + }) + ); + + // Show ACL dialog + if (isDialog) { + $acl.dialog({ + title: 'Configure ACL', + dialogClass: 'configure-acl', + width: 900, + height: 600, + buttons: { + 'Done': function() { + $(':ui-dialog').remove(); + $('.overlay').remove(); + } + } + }); + } + + return $acl; + }, vpcConfigureTooltip: function(args) { + var context = args.context; var $browser = args.$browser; var $chart = args.$chart; var ipAddresses = args.ipAddresses; + var acl = args.acl; var gateways = args.gateways; var siteToSiteVPN = args.siteToSiteVPN; var links = { 'ip-addresses': 'IP Addresses', 'gateways': 'Private Gateway', - 'site-to-site-vpn': 'Site-to-site VPN' + 'site-to-site-vpn': 'Site-to-site VPN', + 'network-acls': 'ACLs' }; var $links = $('