Merge "fix: Make port's fixed_ip not required"
This commit is contained in:
commit
125ccd3c6d
@ -116,15 +116,19 @@ export default class CreateAction extends ModalAction {
|
|||||||
...rest
|
...rest
|
||||||
} = values;
|
} = values;
|
||||||
const data = {
|
const data = {
|
||||||
fixed_ips: fixed_ips.map((i) => {
|
...(fixed_ips && fixed_ips.length > 0
|
||||||
const ret = {
|
? {
|
||||||
subnet_id: i.subnet,
|
fixed_ips: fixed_ips.map((i) => {
|
||||||
};
|
const ret = {
|
||||||
if (i.ip_address && i.ip_address.type === 'manual') {
|
subnet_id: i.subnet,
|
||||||
ret.ip_address = i.ip_address.ip;
|
};
|
||||||
}
|
if (i.ip_address && i.ip_address.type === 'manual') {
|
||||||
return ret;
|
ret.ip_address = i.ip_address.ip;
|
||||||
}),
|
}
|
||||||
|
return ret;
|
||||||
|
}),
|
||||||
|
}
|
||||||
|
: {}),
|
||||||
network_id: network_id.selectedRowKeys[0],
|
network_id: network_id.selectedRowKeys[0],
|
||||||
...rest,
|
...rest,
|
||||||
};
|
};
|
||||||
@ -192,11 +196,10 @@ export default class CreateAction extends ModalAction {
|
|||||||
{
|
{
|
||||||
name: 'fixed_ips',
|
name: 'fixed_ips',
|
||||||
label: t('Owned Subnet'),
|
label: t('Owned Subnet'),
|
||||||
// component: <IPDistributer subnets={subnetDetails} />,
|
|
||||||
type: 'ip-distributer',
|
type: 'ip-distributer',
|
||||||
subnets: subnetDetails,
|
subnets: subnetDetails,
|
||||||
hidden: !network_id,
|
hidden: !network_id,
|
||||||
required: true,
|
// required: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'ipv6',
|
name: 'ipv6',
|
||||||
|
Loading…
Reference in New Issue
Block a user