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 }) => {
|
const Item = ({ onChange, value }) => {
|
||||||
value = 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,
|
canEdit: true,
|
||||||
};
|
};
|
||||||
const [ip_address, setIP] = useState(value.ip_address);
|
const [ip_address, setIP] = useState(value.ip_address);
|
||||||
|
@ -93,12 +93,14 @@ const MemberAllocator = ({ componentProps, formItemProps }) => {
|
|||||||
subnet_id: i.subnet_id,
|
subnet_id: i.subnet_id,
|
||||||
}));
|
}));
|
||||||
record.currentOption = options[0].value;
|
record.currentOption = options[0].value;
|
||||||
|
record.currentSubnetId = options[0].subnet_id;
|
||||||
return (
|
return (
|
||||||
<Select
|
<Select
|
||||||
style={{ minWidth: 200 }}
|
style={{ minWidth: 200 }}
|
||||||
options={options}
|
options={options}
|
||||||
defaultValue={options[0].value}
|
defaultValue={options[0].value}
|
||||||
onChange={(e) => {
|
onChange={(e, opt) => {
|
||||||
|
record.currentSubnetId = opt.subnet_id;
|
||||||
record.currentOption = e;
|
record.currentOption = e;
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
@ -131,6 +133,7 @@ const MemberAllocator = ({ componentProps, formItemProps }) => {
|
|||||||
protocol_port: undefined,
|
protocol_port: undefined,
|
||||||
weight: 1,
|
weight: 1,
|
||||||
name: record.server_name,
|
name: record.server_name,
|
||||||
|
subnet_id: record.currentSubnetId,
|
||||||
},
|
},
|
||||||
canEdit: false,
|
canEdit: false,
|
||||||
});
|
});
|
||||||
|
@ -129,12 +129,13 @@ export default class CreateAction extends ModalAction {
|
|||||||
return { weight, protocol_port, address, name, subnet_id };
|
return { weight, protocol_port, address, name, subnet_id };
|
||||||
});
|
});
|
||||||
extMembers.forEach((member) => {
|
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 = {
|
const addMember = {
|
||||||
weight,
|
weight,
|
||||||
protocol_port,
|
protocol_port,
|
||||||
address: ip,
|
address: ip,
|
||||||
name,
|
name,
|
||||||
|
subnet_id
|
||||||
};
|
};
|
||||||
members.push(addMember);
|
members.push(addMember);
|
||||||
});
|
});
|
||||||
|
@ -141,19 +141,21 @@ class StepCreate extends StepAction {
|
|||||||
memberData.push(addMember);
|
memberData.push(addMember);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
extMembers.forEach((member) => {
|
extMembers.forEach((member) => {
|
||||||
const {
|
const {
|
||||||
ip,
|
ip,
|
||||||
protocol_port,
|
protocol_port,
|
||||||
weight,
|
weight,
|
||||||
name: server_name = null,
|
name: server_name = null,
|
||||||
|
subnet_id,
|
||||||
} = member.ip_address;
|
} = member.ip_address;
|
||||||
const addMember = {
|
const addMember = {
|
||||||
weight,
|
weight,
|
||||||
protocol_port,
|
protocol_port,
|
||||||
address: ip,
|
address: ip,
|
||||||
name: server_name,
|
name: server_name,
|
||||||
subnet_id: member.subnet,
|
subnet_id,
|
||||||
};
|
};
|
||||||
memberData.push(addMember);
|
memberData.push(addMember);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user