diff --git a/nezha-fronted/src/components/common/language/cn.js b/nezha-fronted/src/components/common/language/cn.js index 437a8454e..5bc0cb2b5 100644 --- a/nezha-fronted/src/components/common/language/cn.js +++ b/nezha-fronted/src/components/common/language/cn.js @@ -533,7 +533,8 @@ const cn = { }, tip: { confirmDelete: '确认删除吗?', - confirmOvertime: '确定关闭吗?', // Are you sure you want to delete? + confirmExpired: '确认失效吗?', + confirmOvertime: '确定关闭吗?', // Are you sure you want to delete? killTerm: '确认关闭 terminal 吗?', confirmBatchDelete: '确定删除这{0}条数据吗?', assetConfirmDelete: '关联的Endpoint和告警将会被删除,确认删除吗?', diff --git a/nezha-fronted/src/components/common/language/en.js b/nezha-fronted/src/components/common/language/en.js index 97bd7c9bf..93edef8c4 100644 --- a/nezha-fronted/src/components/common/language/en.js +++ b/nezha-fronted/src/components/common/language/en.js @@ -540,6 +540,7 @@ const en = { }, tip: { confirmDelete: 'Are you sure you want to delete?', // Are you sure you want to delete? + confirmExpired: 'Are you sure you want to expired?', confirmOvertime: "Are you sure it's off?", killTerm: 'Are you sure you want to kill terminal?', confirmBatchDelete: 'Are you sure to delete these {0} pieces of data', diff --git a/nezha-fronted/src/components/page/alert/alertSilence.vue b/nezha-fronted/src/components/page/alert/alertSilence.vue index 72c8c743d..8e5bd13e3 100644 --- a/nezha-fronted/src/components/page/alert/alertSilence.vue +++ b/nezha-fronted/src/components/page/alert/alertSilence.vue @@ -194,6 +194,23 @@ export default { } }) }, + del (row) { + this.$confirm(this.$t('tip.confirmExpired'), { + confirmButtonText: this.$t('tip.yes'), + cancelButtonText: this.$t('tip.no'), + type: 'warning' + }).then(() => { + this.$delete(this.url + '?ids=' + row.id + '&state=' + this.state).then(response => { + if (response.code === 200) { + this.delFlag = true + this.$message({ duration: 2000, type: 'success', message: this.$t('tip.deleteSuccess') }) + this.getTableData() + } else { + this.$message.error(response.msg) + } + }) + }) + }, } }