mirror of https://github.com/apache/cloudstack.git
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:
parent
dcea0a70f9
commit
a36fc7a9fa
|
|
@ -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';
|
||||
|
|
|
|||
Loading…
Reference in New Issue