Skip to content

Commit a4f2b8b

Browse files
bernardodemarcojschoiRR
authored andcommitted
UI: Fixes and minor enhacements to the Public IP Addresses section (apache#10351)
1 parent 7595ed5 commit a4f2b8b

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

ui/src/components/view/ListView.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@
166166
 
167167
<a-tag>static-nat</a-tag>
168168
</span>
169+
<span v-if="record.issystem">
170+
&nbsp;
171+
<a-tag>system</a-tag>
172+
</span>
169173
</template>
170174
<template v-if="column.key === 'ip6address'" href="javascript:;">
171175
<span>{{ ipV6Address(text, record) }}</span>
@@ -433,7 +437,7 @@
433437
<status :text="record.enabled ? record.enabled.toString() : 'false'" />
434438
{{ record.enabled ? 'Enabled' : 'Disabled' }}
435439
</template>
436-
<template v-if="['created', 'sent', 'removed', 'effectiveDate', 'endDate'].includes(column.key) || (['startdate'].includes(column.key) && ['webhook'].includes($route.path.split('/')[1])) || (column.key === 'allocated' && ['asnumbers', 'publicip', 'ipv4subnets'].includes($route.meta.name) && text)">
440+
<template v-if="['created', 'sent', 'removed', 'effectiveDate', 'endDate', 'allocated'].includes(column.key) || (['startdate'].includes(column.key) && ['webhook'].includes($route.path.split('/')[1])) || (column.key === 'allocated' && ['asnumbers', 'publicip', 'ipv4subnets'].includes($route.meta.name) && text)">
437441
{{ $toLocaleDate(text) }}
438442
</template>
439443
<template v-if="['startdate', 'enddate'].includes(column.key) && ['vm', 'vnfapp'].includes($route.path.split('/')[1])">

ui/src/config/section/network.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -835,10 +835,13 @@ export default {
835835
message: 'message.action.release.ip',
836836
docHelp: 'adminguide/networking_and_traffic.html#releasing-an-ip-address-alloted-to-a-vpc',
837837
dataView: true,
838-
show: (record) => { return record.state === 'Allocated' && !record.issourcenat },
838+
show: (record) => { return record.state === 'Allocated' && !record.issourcenat && !record.issystem },
839839
groupAction: true,
840840
popup: true,
841-
groupMap: (selection) => { return selection.map(x => { return { id: x } }) }
841+
groupMap: (selection) => { return selection.map(x => { return { id: x } }) },
842+
groupShow: (selectedIps) => {
843+
return selectedIps.every((ip) => ip.state === 'Allocated' && !ip.issourcenat && !ip.issystem)
844+
}
842845
},
843846
{
844847
api: 'reserveIpAddress',
@@ -858,7 +861,10 @@ export default {
858861
show: (record) => { return record.state === 'Reserved' },
859862
groupAction: true,
860863
popup: true,
861-
groupMap: (selection) => { return selection.map(x => { return { id: x } }) }
864+
groupMap: (selection) => { return selection.map(x => { return { id: x } }) },
865+
groupShow: (selectedIps) => {
866+
return selectedIps.every((ip) => ip.state === 'Reserved')
867+
}
862868
}
863869
]
864870
},

0 commit comments

Comments
 (0)