feat: add protocal in the port forwarding display in the floating ip list
1. Add protocal when show the port forwarding info in the floating ip list 2. Add protocal to the port forwarding info when download the floating ip list Change-Id: I7f9cea6cbfc276205c75e2ab8708124c49106ffc
This commit is contained in:
parent
afefcf6fdb
commit
bb133015a3
@ -149,6 +149,13 @@ export class FloatingIps extends Base {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getPortForwardingDetail(record, detail) {
|
||||||
|
const { floating_ip_address: fip } = record;
|
||||||
|
const { protocol, external_port, internal_ip_address, internal_port } =
|
||||||
|
detail;
|
||||||
|
return `${protocol}: ${fip}:${external_port} => ${internal_ip_address}:${internal_port}`;
|
||||||
|
}
|
||||||
|
|
||||||
getPortForwardingRender(record) {
|
getPortForwardingRender(record) {
|
||||||
const data = this.getRecordPortForwarding(record);
|
const data = this.getRecordPortForwarding(record);
|
||||||
if (!data.length) {
|
if (!data.length) {
|
||||||
@ -160,7 +167,7 @@ export class FloatingIps extends Base {
|
|||||||
<Row className={styles['popover-row']} gutter={[8, 8]}>
|
<Row className={styles['popover-row']} gutter={[8, 8]}>
|
||||||
{data.map((i, idx) => (
|
{data.map((i, idx) => (
|
||||||
<Col span={24} key={`pfw-${idx}`}>
|
<Col span={24} key={`pfw-${idx}`}>
|
||||||
{`${record.floating_ip_address}:${i.external_port} => ${i.internal_ip_address}:${i.internal_port}`}
|
{this.getPortForwardingDetail(record, i)}
|
||||||
</Col>
|
</Col>
|
||||||
))}
|
))}
|
||||||
</Row>
|
</Row>
|
||||||
@ -182,10 +189,7 @@ export class FloatingIps extends Base {
|
|||||||
if (!data.length) {
|
if (!data.length) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
const ret = data.map(
|
const ret = data.map((i) => this.getPortForwardingDetail(record, i));
|
||||||
(i) =>
|
|
||||||
`${record.floating_ip_address}:${i.external_port} => ${i.internal_ip_address}:${i.internal_port}`
|
|
||||||
);
|
|
||||||
const total = t('{number} port forwarding rules', {
|
const total = t('{number} port forwarding rules', {
|
||||||
number: data.length,
|
number: data.length,
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user