mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-19 07:18:11 +00:00
[Update] 修改API-Key启/停文案
This commit is contained in:
parent
b05814d251
commit
077e7ca583
@ -170,6 +170,7 @@
|
|||||||
"Disable": "禁用",
|
"Disable": "禁用",
|
||||||
"Download": "下载",
|
"Download": "下载",
|
||||||
"Enable": "启用",
|
"Enable": "启用",
|
||||||
|
"On/Off": "启/停",
|
||||||
"EnterForSearch": "按回车进行搜索",
|
"EnterForSearch": "按回车进行搜索",
|
||||||
"Export": "导出",
|
"Export": "导出",
|
||||||
"Import": "导入",
|
"Import": "导入",
|
||||||
|
@ -171,6 +171,7 @@
|
|||||||
"Disable": "Disable",
|
"Disable": "Disable",
|
||||||
"Download": "Download",
|
"Download": "Download",
|
||||||
"Enable": "Enable",
|
"Enable": "Enable",
|
||||||
|
"On/Off": "On/Off",
|
||||||
"EnterForSearch": "Press enter to search",
|
"EnterForSearch": "Press enter to search",
|
||||||
"Export": "Export",
|
"Export": "Export",
|
||||||
"Import": "Import",
|
"Import": "Import",
|
||||||
|
@ -53,6 +53,7 @@ export default {
|
|||||||
actions: {
|
actions: {
|
||||||
prop: '',
|
prop: '',
|
||||||
formatterArgs: {
|
formatterArgs: {
|
||||||
|
hasUpdate: false,
|
||||||
onDelete: function({ row, col, cellValue, reload }) {
|
onDelete: function({ row, col, cellValue, reload }) {
|
||||||
this.$axios.delete(
|
this.$axios.delete(
|
||||||
`/api/v1/authentication/access-keys/${row.id}/`
|
`/api/v1/authentication/access-keys/${row.id}/`
|
||||||
@ -63,27 +64,34 @@ export default {
|
|||||||
this.$message.error(this.$t('common.deleteErrorMsg' + ' ' + error))
|
this.$message.error(this.$t('common.deleteErrorMsg' + ' ' + error))
|
||||||
})
|
})
|
||||||
}.bind(this),
|
}.bind(this),
|
||||||
onUpdate: function({ row, col, cellValue, reload }) {
|
extraActions: [
|
||||||
this.$axios.patch(
|
{
|
||||||
`/api/v1/authentication/access-keys/${row.id}/`,
|
name: 'Enabled',
|
||||||
{ is_active: !row.is_active }
|
title: this.$t('common.On/Off'),
|
||||||
).then(res => {
|
type: 'info',
|
||||||
this.$refs.ListTable.reloadTable()
|
callback: function({ row, col, cellValue, reload }) {
|
||||||
this.$message.success(this.$t('common.updateSuccessMsg'))
|
this.$axios.patch(
|
||||||
}).catch(error => {
|
`/api/v1/authentication/access-keys/${row.id}/`,
|
||||||
this.$message.error(this.$t('common.updateErrorMsg' + ' ' + error))
|
{ is_active: !row.is_active }
|
||||||
})
|
).then(res => {
|
||||||
}.bind(this)
|
this.$refs.ListTable.reloadTable()
|
||||||
|
this.$message.success(this.$t('common.updateSuccessMsg'))
|
||||||
|
}).catch(error => {
|
||||||
|
this.$message.error(this.$t('common.updateErrorMsg' + ' ' + error))
|
||||||
|
})
|
||||||
|
}.bind(this)
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
headerActions: {
|
headerActions: {
|
||||||
hasSearch: true,
|
hasSearch: true,
|
||||||
hasRightActions: false,
|
hasRightActions: true,
|
||||||
|
hasRefresh: true,
|
||||||
hasExport: false,
|
hasExport: false,
|
||||||
hasImport: false,
|
hasImport: false,
|
||||||
hasRefresh: true,
|
|
||||||
hasBulkDelete: false,
|
hasBulkDelete: false,
|
||||||
hasCreate: false,
|
hasCreate: false,
|
||||||
extraActions: [
|
extraActions: [
|
||||||
|
Loading…
Reference in New Issue
Block a user