Updated Branches: refs/heads/vpc 8f34776dd -> a5f979355
CS-15900:InterVlan UI - Confirmation Note on Acquisition of a Public IP Address to a VPC should mention this VPC instead of this Network Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/a5f97935 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/a5f97935 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/a5f97935 Branch: refs/heads/vpc Commit: a5f979355b4073917f8d4a3cc3d3f5deb85aac58 Parents: 8f34776 Author: Pranav Saxena <[email protected]> Authored: Wed Aug 8 20:29:27 2012 +0530 Committer: Pranav Saxena <[email protected]> Committed: Wed Aug 8 20:29:27 2012 +0530 ---------------------------------------------------------------------- ui/scripts/network.js | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/a5f97935/ui/scripts/network.js ---------------------------------------------------------------------- diff --git a/ui/scripts/network.js b/ui/scripts/network.js index c907294..fbcde8d 100644 --- a/ui/scripts/network.js +++ b/ui/scripts/network.js @@ -157,7 +157,7 @@ }; var networkOfferingObjs = []; - + var checkVpc=0; cloudStack.sections.network = { title: 'label.network', id: 'network', @@ -1094,18 +1094,24 @@ addRow: 'true', preFilter: function(args) { if('networks' in args.context) { //from Guest Network section - if(args.context.networks[0].vpcid == null) //if it's a non-VPC network, show Acquire IP button - return true; + if(args.context.networks[0].vpcid == null) { //if it's a non-VPC network, show Acquire IP button + checkVpc=0; + return true; + } else //if it's a VPC network, hide Acquire IP button return false; } else { //from VPC section + checkVpc=1; return true; //show Acquire IP button } }, messages: { confirm: function(args) { - return 'message.acquire.new.ip'; + if(checkVpc == 1) + return 'Please confirm that you would like to acquire a new IP for this VPC'; + else + return 'message.acquire.new.ip'; }, notification: function(args) { return 'label.acquire.new.ip';
