fix: fix for lb members subnet id params
fix for lb members subnet id params Change-Id: I875557396867938119ac1f22f3df2818b33b5a48
This commit is contained in:
parent
979fbfe6e5
commit
7cd19fe428
@ -17,7 +17,7 @@ import IPAddress from './IPAddress';
|
||||
|
||||
const Item = ({ onChange, value }) => {
|
||||
value = value || {
|
||||
ip_address: { ip: undefined, protocol_port: undefined, weight: 1 },
|
||||
ip_address: { ip: undefined, protocol_port: undefined, weight: 1, subnet_id: undefined },
|
||||
canEdit: true,
|
||||
};
|
||||
const [ip_address, setIP] = useState(value.ip_address);
|
||||
|
@ -93,12 +93,14 @@ const MemberAllocator = ({ componentProps, formItemProps }) => {
|
||||
subnet_id: i.subnet_id,
|
||||
}));
|
||||
record.currentOption = options[0].value;
|
||||
record.currentSubnetId = options[0].subnet_id;
|
||||
return (
|
||||
<Select
|
||||
style={{ minWidth: 200 }}
|
||||
options={options}
|
||||
defaultValue={options[0].value}
|
||||
onChange={(e) => {
|
||||
onChange={(e, opt) => {
|
||||
record.currentSubnetId = opt.subnet_id;
|
||||
record.currentOption = e;
|
||||
}}
|
||||
/>
|
||||
@ -131,6 +133,7 @@ const MemberAllocator = ({ componentProps, formItemProps }) => {
|
||||
protocol_port: undefined,
|
||||
weight: 1,
|
||||
name: record.server_name,
|
||||
subnet_id: record.currentSubnetId,
|
||||
},
|
||||
canEdit: false,
|
||||
});
|
||||
|
@ -129,12 +129,13 @@ export default class CreateAction extends ModalAction {
|
||||
return { weight, protocol_port, address, name, subnet_id };
|
||||
});
|
||||
extMembers.forEach((member) => {
|
||||
const { ip, protocol_port, weight, name = null } = member.ip_address;
|
||||
const { ip, protocol_port, weight, name = null, subnet_id } = member.ip_address;
|
||||
const addMember = {
|
||||
weight,
|
||||
protocol_port,
|
||||
address: ip,
|
||||
name,
|
||||
subnet_id
|
||||
};
|
||||
members.push(addMember);
|
||||
});
|
||||
|
@ -141,19 +141,21 @@ class StepCreate extends StepAction {
|
||||
memberData.push(addMember);
|
||||
});
|
||||
});
|
||||
|
||||
extMembers.forEach((member) => {
|
||||
const {
|
||||
ip,
|
||||
protocol_port,
|
||||
weight,
|
||||
name: server_name = null,
|
||||
subnet_id,
|
||||
} = member.ip_address;
|
||||
const addMember = {
|
||||
weight,
|
||||
protocol_port,
|
||||
address: ip,
|
||||
name: server_name,
|
||||
subnet_id: member.subnet,
|
||||
subnet_id,
|
||||
};
|
||||
memberData.push(addMember);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user