diff --git a/src/components/AccountListTable/AccountList.vue b/src/components/AccountListTable/AccountList.vue index 9914ccd2e..5c70864a3 100644 --- a/src/components/AccountListTable/AccountList.vue +++ b/src/components/AccountListTable/AccountList.vue @@ -192,16 +192,16 @@ export default { } }, { - name: 'RemoveSecret', - title: this.$t('common.RemoveSecret'), + name: 'ClearSecret', + title: this.$t('common.ClearSecret'), can: this.$hasPerm('accounts.change_account'), type: 'primary', callback: ({ row }) => { this.$axios.patch( - `/api/v1/accounts/accounts/remove-secret/`, + `/api/v1/accounts/accounts/clear-secret/`, { account_ids: [row.id] } ).then(() => { - this.$message.success(this.$tc('common.RemoveSuccessMsg')) + this.$message.success(this.$tc('common.ClearSuccessMsg')) }) } }, @@ -306,8 +306,8 @@ export default { ], extraMoreActions: [ { - name: 'RemoveSecrets', - title: this.$t('common.RemoveSecret'), + name: 'ClearSecrets', + title: this.$t('common.ClearSecret'), type: 'primary', can: ({ selectedRows }) => { return selectedRows.length > 0 && vm.$hasPerm('accounts.change_account') @@ -315,11 +315,11 @@ export default { callback: function({ selectedRows }) { const ids = selectedRows.map(v => { return v.id }) this.$axios.patch( - '/api/v1/accounts/accounts/remove-secret/', + '/api/v1/accounts/accounts/clear-secret/', { account_ids: ids }).then(() => { - this.$message.success(this.$tc('common.RemoveSuccessMsg')) + this.$message.success(this.$tc('common.ClearSuccessMsg')) }).catch(err => { - this.$message.error(this.$tc('common.bulkRemoveErrorMsg' + ' ' + err)) + this.$message.error(this.$tc('common.bulkClearErrorMsg' + ' ' + err)) }) }.bind(this) } diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index 448d85ff4..7b41e0398 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -497,7 +497,10 @@ "MFAVerify": "Verify MFA", "CurrentUserVerify": "Verify Current User", "ViewSecret": "View secret", - "RemoveSecret": "Remove secret", + "ClearSecret": "Clear secret", + "ClearSuccessMsg": "Clear success", + "bulkClearErrorMsg": "Bulk clear error:", + "Clear": "Clear", "ConnectWebSocketError": "Connect Websocket failed", "Nothing": "Nothing", "Action": "Action", diff --git a/src/i18n/langs/ja.json b/src/i18n/langs/ja.json index 44333c6d3..9a1c37bac 100644 --- a/src/i18n/langs/ja.json +++ b/src/i18n/langs/ja.json @@ -494,7 +494,8 @@ "MFAVerify": "MFAの検証", "CurrentUserVerify": "現在のユーザー検証", "ViewSecret": "暗号文の表示", - "RemoveSecret": "暗号文の削除", + "ClearSecret": "暗号文の削除", + "Clear": "クリア", "ConnectWebSocketError": "Webソケット接続に失敗しました", "Action": "アクション", "RequestTickets": "ワークオーダーを申請する", @@ -583,6 +584,8 @@ "QuickUpdate": "クイックアップデート", "QuickSelect": "クイック選択", "RemoveSuccessMsg": "削除に成功しました", + "ClearSuccessMsg": "クリアに成功しました", + "bulkClearErrorMsg": "クリアに失敗しました: ", "Reset": "リセット", "Search": "検索", "Select": "選択", diff --git a/src/i18n/langs/zh.json b/src/i18n/langs/zh.json index b92d31c69..7a2e27b0f 100644 --- a/src/i18n/langs/zh.json +++ b/src/i18n/langs/zh.json @@ -505,7 +505,8 @@ "MFAVerify": "验证 MFA", "CurrentUserVerify": "验证当前用户", "ViewSecret": "查看密文", - "RemoveSecret": "移除密文", + "ClearSecret": "清除密文", + "Clear": "清除", "ConnectWebSocketError": "连接 WebSocket 失败", "Action": "动作", "RequestTickets": "申请工单", @@ -598,6 +599,8 @@ "QuickUpdate": "快速更新", "QuickSelect": "快速选择", "RemoveSuccessMsg": "移除成功", + "ClearSuccessMsg": "清除成功", + "bulkClearErrorMsg": "批量清除失败:", "SyncSuccessMsg": "同步成功", "Reset": "重置", "Search": "搜索", diff --git a/src/views/accounts/Account/AccountDetail/Detail.vue b/src/views/accounts/Account/AccountDetail/Detail.vue index bca9e9367..4bf641b6f 100644 --- a/src/views/accounts/Account/AccountDetail/Detail.vue +++ b/src/views/accounts/Account/AccountDetail/Detail.vue @@ -143,19 +143,19 @@ export default { }) }, { - title: this.$t('common.RemoveSecret'), + title: this.$t('common.ClearSecret'), attrs: { type: 'primary', - label: this.$t('users.Remove'), + label: this.$t('common.Clear'), disabled: !vm.$hasPerm('accounts.change_account') }, callbacks: Object.freeze({ click: () => { this.$axios.patch( - '/api/v1/accounts/accounts/remove-secret/', + '/api/v1/accounts/accounts/clear-secret/', { account_ids: [this.object.id] } ).then(() => { - this.$message.success(this.$tc('common.RemoveSuccessMsg')) + this.$message.success(this.$tc('common.ClearSuccessMsg')) }) } })