UI: Fixes and minor enhacements to the Public IP Addresses section (#10351)

This commit is contained in:
Bernardo De Marco Gonçalves 2025-02-26 05:44:29 -03:00 committed by GitHub
parent 1f09266764
commit a09c579b5b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 5 deletions

View File

@ -149,6 +149,10 @@
 
<a-tag>static-nat</a-tag>
</span>
<span v-if="record.issystem">
&nbsp;
<a-tag>system</a-tag>
</span>
</template>
<template v-if="column.key === 'ip6address'" href="javascript:;">
<span>{{ ipV6Address(text, record) }}</span>
@ -378,8 +382,8 @@
<status :text="record.enabled ? record.enabled.toString() : 'false'" />
{{ record.enabled ? 'Enabled' : 'Disabled' }}
</template>
<template v-if="['created', 'sent'].includes(column.key)">
{{ $toLocaleDate(text) }}
<template v-if="['created', 'sent', 'allocated'].includes(column.key)">
{{ text && $toLocaleDate(text) }}
</template>
<template v-if="['startdate', 'enddate'].includes(column.key) && ['vm', 'vnfapp'].includes($route.path.split('/')[1])">
{{ getDateAtTimeZone(text, record.timezone) }}

View File

@ -840,10 +840,13 @@ export default {
message: 'message.action.release.ip',
docHelp: 'adminguide/networking_and_traffic.html#releasing-an-ip-address-alloted-to-a-vpc',
dataView: true,
show: (record) => { return record.state === 'Allocated' && !record.issourcenat },
show: (record) => { return record.state === 'Allocated' && !record.issourcenat && !record.issystem },
groupAction: true,
popup: true,
groupMap: (selection) => { return selection.map(x => { return { id: x } }) }
groupMap: (selection) => { return selection.map(x => { return { id: x } }) },
groupShow: (selectedIps) => {
return selectedIps.every((ip) => ip.state === 'Allocated' && !ip.issourcenat && !ip.issystem)
}
},
{
api: 'reserveIpAddress',
@ -863,7 +866,10 @@ export default {
show: (record) => { return record.state === 'Reserved' },
groupAction: true,
popup: true,
groupMap: (selection) => { return selection.map(x => { return { id: x } }) }
groupMap: (selection) => { return selection.map(x => { return { id: x } }) },
groupShow: (selectedIps) => {
return selectedIps.every((ip) => ip.state === 'Reserved')
}
}
]
},