cloudstack 3.0 UI - IP Address page – if it comes from Guest Network section and it’s a VPC network, remove “Acquire IP” button.

This commit is contained in:
Jessica Wang 2012-07-16 13:49:07 -07:00
parent dcea0a70f9
commit a36fc7a9fa
1 changed files with 12 additions and 1 deletions

View File

@ -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';