fix: fix the hints of allocation pool
When automatically assigning ip, modify the tips based on all subnet allocation pools Change-Id: I42fa46b1bf6c3af77d69152701dfd7ff5209a5a9
This commit is contained in:
parent
6e6a6ea46d
commit
206ffc9e92
@ -299,8 +299,15 @@ export default class NetworkSelect extends React.Component {
|
|||||||
if (!item) {
|
if (!item) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
const totalAllocationPools = [];
|
||||||
|
subnets.forEach((sub) => {
|
||||||
|
const { allocation_pools: pools = [] } = sub;
|
||||||
|
pools.forEach((pool) => {
|
||||||
|
totalAllocationPools.push(pool);
|
||||||
|
});
|
||||||
|
});
|
||||||
const { allocation_pools: pools } = item;
|
const { allocation_pools: pools } = item;
|
||||||
const details = pools.map((pool, index) => (
|
const details = totalAllocationPools.map((pool, index) => (
|
||||||
<span key={`pool.start.${index}`} style={{ marginRight: 10 }}>
|
<span key={`pool.start.${index}`} style={{ marginRight: 10 }}>
|
||||||
{pool.start}--{pool.end}
|
{pool.start}--{pool.end}
|
||||||
</span>
|
</span>
|
||||||
@ -332,7 +339,7 @@ export default class NetworkSelect extends React.Component {
|
|||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
<Col span={6}>
|
<Col span={6}>
|
||||||
<Input defaultValue={ip} onChange={this.onIPChange} />
|
<Input value={ip} onChange={this.onIPChange} />
|
||||||
<Tooltip title={tips} color="white">
|
<Tooltip title={tips} color="white">
|
||||||
<QuestionCircleOutlined />
|
<QuestionCircleOutlined />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
Loading…
Reference in New Issue
Block a user