Skip to content

Commit a09c579

Browse files
UI: Fixes and minor enhacements to the Public IP Addresses section (apache#10351)
1 parent 1f09266 commit a09c579

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

ui/src/components/view/ListView.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@
149149
 
150150
<a-tag>static-nat</a-tag>
151151
</span>
152+
<span v-if="record.issystem">
153+
&nbsp;
154+
<a-tag>system</a-tag>
155+
</span>
152156
</template>
153157
<template v-if="column.key === 'ip6address'" href="javascript:;">
154158
<span>{{ ipV6Address(text, record) }}</span>
@@ -378,8 +382,8 @@
378382
<status :text="record.enabled ? record.enabled.toString() : 'false'" />
379383
{{ record.enabled ? 'Enabled' : 'Disabled' }}
380384
</template>
381-
<template v-if="['created', 'sent'].includes(column.key)">
382-
{{ $toLocaleDate(text) }}
385+
<template v-if="['created', 'sent', 'allocated'].includes(column.key)">
386+
{{ text && $toLocaleDate(text) }}
383387
</template>
384388
<template v-if="['startdate', 'enddate'].includes(column.key) && ['vm', 'vnfapp'].includes($route.path.split('/')[1])">
385389
{{ getDateAtTimeZone(text, record.timezone) }}

ui/src/config/section/network.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -840,10 +840,13 @@ export default {
840840
message: 'message.action.release.ip',
841841
docHelp: 'adminguide/networking_and_traffic.html#releasing-an-ip-address-alloted-to-a-vpc',
842842
dataView: true,
843-
show: (record) => { return record.state === 'Allocated' && !record.issourcenat },
843+
show: (record) => { return record.state === 'Allocated' && !record.issourcenat && !record.issystem },
844844
groupAction: true,
845845
popup: true,
846-
groupMap: (selection) => { return selection.map(x => { return { id: x } }) }
846+
groupMap: (selection) => { return selection.map(x => { return { id: x } }) },
847+
groupShow: (selectedIps) => {
848+
return selectedIps.every((ip) => ip.state === 'Allocated' && !ip.issourcenat && !ip.issystem)
849+
}
847850
},
848851
{
849852
api: 'reserveIpAddress',
@@ -863,7 +866,10 @@ export default {
863866
show: (record) => { return record.state === 'Reserved' },
864867
groupAction: true,
865868
popup: true,
866-
groupMap: (selection) => { return selection.map(x => { return { id: x } }) }
869+
groupMap: (selection) => { return selection.map(x => { return { id: x } }) },
870+
groupShow: (selectedIps) => {
871+
return selectedIps.every((ip) => ip.state === 'Reserved')
872+
}
867873
}
868874
]
869875
},

0 commit comments

Comments
 (0)