Fix missing actions on Guest IP ranges for networks (#8777)

* Fix missing actions on Guest IP ranges for networks

* Show success and error pop on deleting guest ip ranges
This commit is contained in:
Vishesh 2024-03-27 11:52:44 +05:30 committed by GitHub
parent 08d9d06d45
commit 31301f56f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 1 deletions

View File

@ -36,14 +36,16 @@
:rowKey="item => item.id"
:pagination="false" >
<template #action="{ record }">
<template #bodyCell="{ column, record }">
<tooltip-button
v-if="column.key === 'actions'"
tooltipPlacement="bottom"
:tooltip="$t('label.edit')"
type="primary"
@click="() => { handleUpdateIpRangeModal(record) }"
icon="swap-outlined" />
<a-popconfirm
v-if="column.key === 'actions'"
:title="$t('message.confirm.remove.ip.range')"
@confirm="removeIpRange(record.id)"
:okText="$t('label.yes')"
@ -226,6 +228,10 @@ export default {
},
removeIpRange (id) {
api('deleteVlanIpRange', { id: id }).then(json => {
const message = `${this.$t('message.success.delete')} ${this.$t('label.ip.range')}`
this.$message.success(message)
}).catch((error) => {
this.$notifyError(error)
}).finally(() => {
this.fetchData()
})