From a36fc7a9fa53836eff04cc3c0da7675bb7564b65 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Mon, 16 Jul 2012 13:49:07 -0700 Subject: [PATCH] =?UTF-8?q?cloudstack=203.0=20UI=20-=20IP=20Address=20page?= =?UTF-8?q?=20=E2=80=93=20if=20it=20comes=20from=20Guest=20Network=20secti?= =?UTF-8?q?on=20and=20it=E2=80=99s=20a=20VPC=20network,=20remove=20?= =?UTF-8?q?=E2=80=9CAcquire=20IP=E2=80=9D=20button.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/scripts/network.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ui/scripts/network.js b/ui/scripts/network.js index 4e559acaae6..a517c570f8a 100644 --- a/ui/scripts/network.js +++ b/ui/scripts/network.js @@ -1050,7 +1050,18 @@ actions: { add: { label: 'label.acquire.new.ip', - addRow: 'true', + 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; + else //if it's a VPC network, hide Acquire IP button + return false; + } + else { //from VPC section + return true; //show Acquire IP button + } + }, messages: { confirm: function(args) { return 'message.acquire.new.ip';