Merge "feat: add protocal in the port forwarding display in the floating ip list"
This commit is contained in:
commit
6d50017ea2
@ -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