diff --git a/src/views/accounts/AccountChangeSecret/Executions/AccountChangeSecretExecutionList.vue b/src/views/accounts/AccountChangeSecret/Executions/AccountChangeSecretExecutionList.vue index 0a37736c8..09517b610 100644 --- a/src/views/accounts/AccountChangeSecret/Executions/AccountChangeSecretExecutionList.vue +++ b/src/views/accounts/AccountChangeSecret/Executions/AccountChangeSecretExecutionList.vue @@ -1,6 +1,7 @@ @@ -24,7 +25,21 @@ export default { detailRoute: 'AccountPushExecutionDetail', resource: 'pushaccountexecution', resourceLabel: this.$t('AccountPushExecution'), - detailDrawer: () => import('@/views/accounts/AccountPush/ExecutionDetail/index.vue') + detailDrawer: () => import('@/views/accounts/AccountPush/ExecutionDetail/index.vue'), + customActions: { + name: 'record', + title: this.$t('Record'), + can: this.$hasPerm('accounts.view_changesecretrecord'), + callback: function({ row }) { + return this.$router.push({ + name: 'AccountPush', + query: { + tab: 'AccountPushRecord', + execution_id: row.id + } + }) + } + } } } } diff --git a/src/views/accounts/Automation/BaseExecutionList.vue b/src/views/accounts/Automation/BaseExecutionList.vue index 24dc07782..5f1d8f43a 100644 --- a/src/views/accounts/Automation/BaseExecutionList.vue +++ b/src/views/accounts/Automation/BaseExecutionList.vue @@ -39,6 +39,10 @@ export default { resource: { type: String, required: true + }, + customActions: { + type: Object, + default: () => ({}) } }, data() { @@ -121,20 +125,6 @@ export default { vm.visible = true vm.reportUrl = `${this.url}${row.id}/report/` } - }, - { - name: 'record', - title: this.$t('Record'), - can: this.$hasPerm('accounts.view_changesecretrecord'), - callback: function({ row }) { - return this.$router.push({ - name: 'AccountChangeSecretList', - query: { - tab: 'ChangeSecretRecord', - execution_id: row.id - } - }) - } } ] } @@ -168,6 +158,15 @@ export default { if (automation_id !== undefined) { this.tableConfig.url = `${this.tableConfig.url}?automation_id=${automation_id}` } + + const defaultExtraActions = this.tableConfig.columnsMeta.actions.formatterArgs.extraActions + + if (this.customActions) { + this.tableConfig.columnsMeta.actions.formatterArgs.extraActions = [ + ...defaultExtraActions, + this.customActions + ] + } }, methods: { handleDetailCallback(row) {