diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index 7e160fccb..96451d681 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -107,7 +107,8 @@ "Backup": "Backup", "ExecutionList": "Execution list", "Reason": "Reason", - "AccountBackup": "Account backup" + "AccountBackup": "Account backup", + "RecipientHelpText": "Currently, only email sending is supported. If both recipients A and B are set, the account key will be split into two parts: front and back" }, "DynamicUsername": "Dynamic username", "AutoCreate": "Auto create", diff --git a/src/i18n/langs/ja.json b/src/i18n/langs/ja.json index 8cdae4647..477feb6d2 100644 --- a/src/i18n/langs/ja.json +++ b/src/i18n/langs/ja.json @@ -107,7 +107,8 @@ "Backup": "バックアップ", "ExecutionList": "実行リスト", "Reason": "理由", - "AccountBackup": "アカウントのバックアップ" + "AccountBackup": "アカウントのバックアップ", + "RecipientHelpText": "現在はメール送信のみをサポートしており、受信者A Bが設定されている場合、アカウントの鍵は前後2つに分割されます" }, "DynamicUsername": "動的ユーザー名", "AutoCreate": "自動作成", diff --git a/src/i18n/langs/zh.json b/src/i18n/langs/zh.json index efa9880c2..dcd0bf4ed 100644 --- a/src/i18n/langs/zh.json +++ b/src/i18n/langs/zh.json @@ -42,7 +42,8 @@ "ExecutionList": "执行列表", "MailRecipient": "邮件收件人", "IsSuccess": "是否成功", - "Reason": "原因" + "Reason": "原因", + "RecipientHelpText": "当前只支持邮件发送, 若收件人 A B 都设置,账号的密钥将被拆分成前后两部分" }, "AccountChangeSecret": { "ParamsHelpText": "改密参数设置,目前仅对平台种类为主机的资产生效。", diff --git a/src/views/accounts/AccountBackup/AccountBackupCreateUpdate.vue b/src/views/accounts/AccountBackup/AccountBackupCreateUpdate.vue index cf53e51b1..1404964ba 100644 --- a/src/views/accounts/AccountBackup/AccountBackupCreateUpdate.vue +++ b/src/views/accounts/AccountBackup/AccountBackupCreateUpdate.vue @@ -19,7 +19,7 @@ export default { fields: [ [this.$t('common.Basic'), ['name']], [this.$t('accounts.AccountBackup.Types'), ['types']], - [this.$t('accounts.AccountBackup.Backup'), ['recipients']], + [this.$t('accounts.AccountBackup.Backup'), ['recipients_part_one', 'recipients_part_two']], [this.$t('xpack.Timer'), ['is_periodic', 'crontab', 'interval']], [this.$t('common.Other'), ['comment']] ], @@ -32,7 +32,8 @@ export default { is_periodic: fields.is_periodic, crontab: fields.crontab, interval: fields.interval, - recipients: fields.recipients, + recipients_part_one: fields.recipients_part_one, + recipients_part_two: fields.recipients_part_two, types: { component: 'el-cascader', label: this.$t('accounts.AccountBackup.Types'), diff --git a/src/views/accounts/AccountBackup/AccountBackupDetail/AccountBackupExecution/AccountBackupExecutionList.vue b/src/views/accounts/AccountBackup/AccountBackupDetail/AccountBackupExecution/AccountBackupExecutionList.vue index 092f0eb6e..59cb4c3e4 100644 --- a/src/views/accounts/AccountBackup/AccountBackupDetail/AccountBackupExecution/AccountBackupExecutionList.vue +++ b/src/views/accounts/AccountBackup/AccountBackupDetail/AccountBackupExecution/AccountBackupExecutionList.vue @@ -32,7 +32,7 @@ export default { label: this.$t('common.DisplayName'), formatter: DetailFormatter, formatterArgs: { - getTitle: ({ row }) => row.plan_snapshot.name, + getTitle: ({ row }) => row.snapshot.name, getRoute: ({ row }) => ({ name: 'AccountBackupPlanDetail', params: { id: row.plan } diff --git a/src/views/accounts/AccountBackup/AccountBackupDetail/AccountBackupInfo.vue b/src/views/accounts/AccountBackup/AccountBackupDetail/AccountBackupInfo.vue index 014ef3689..1157d04a9 100644 --- a/src/views/accounts/AccountBackup/AccountBackupDetail/AccountBackupInfo.vue +++ b/src/views/accounts/AccountBackup/AccountBackupDetail/AccountBackupInfo.vue @@ -65,7 +65,21 @@ export default { return {this.object.is_periodic ? val : ''} } }, - 'date_created', 'date_updated', 'comment' + 'date_created', 'date_updated', 'comment', + { + key: this.$t('accounts.AccountChangeSecret.Addressee') + ' A', + value: this.object.recipients_part_one, + formatter: (item, val) => { + return {val.map(item => item.name).join(', ')} + } + }, + { + key: this.$t('accounts.AccountChangeSecret.Addressee') + ' B', + value: this.object.recipients_part_two, + formatter: (item, val) => { + return {val.map(item => item.name).join(', ')} + } + } ] } }, diff --git a/src/views/accounts/AccountBackup/fields.js b/src/views/accounts/AccountBackup/fields.js index 99796d9a6..9f4f91ec6 100644 --- a/src/views/accounts/AccountBackup/fields.js +++ b/src/views/accounts/AccountBackup/fields.js @@ -9,9 +9,23 @@ const validatorInterval = (rule, value, callback) => { } function getAccountBackupFields() { - const recipients = { - label: i18n.t('accounts.AccountChangeSecret.Addressee'), - helpText: i18n.t('accounts.AccountChangeSecret.OnlyMailSend'), + const recipients_part_one = { + label: i18n.t('accounts.AccountChangeSecret.Addressee') + ' A', + helpText: i18n.t('accounts.AccountBackup.RecipientHelpText'), + el: { + value: [], + ajax: { + url: '/api/v1/users/users/?fields_size=mini', + transformOption: (item) => { + return { label: item.name + '(' + item.username + ')', value: item.id } + } + } + } + } + + const recipients_part_two = { + label: i18n.t('accounts.AccountChangeSecret.Addressee') + ' B', + helpText: i18n.t('accounts.AccountBackup.RecipientHelpText'), el: { value: [], ajax: { @@ -52,7 +66,8 @@ function getAccountBackupFields() { is_periodic: is_periodic, crontab: crontab, interval: interval, - recipients: recipients + recipients_part_one: recipients_part_one, + recipients_part_two: recipients_part_two } }