diff --git a/src/router/pam/automations.js b/src/router/pam/automations.js index dbe7b4ffd..6c42d6bdb 100644 --- a/src/router/pam/automations.js +++ b/src/router/pam/automations.js @@ -242,8 +242,7 @@ export default [ title: i18n.t('ExecutionDetail'), permissions: ['accounts.view_pushaccountexecution'] } - } - ] + }] }, { path: 'account-backup', diff --git a/src/views/accounts/AccountChangeSecret/AccountChangeSecretExecution/AccountChangeSecretExecutionDetail/AccountChangeSecretRecord.vue b/src/views/accounts/AccountChangeSecret/AccountChangeSecretExecution/AccountChangeSecretExecutionDetail/AccountChangeSecretRecord.vue index c22ad9ba2..ce43794df 100644 --- a/src/views/accounts/AccountChangeSecret/AccountChangeSecretExecution/AccountChangeSecretExecutionDetail/AccountChangeSecretRecord.vue +++ b/src/views/accounts/AccountChangeSecret/AccountChangeSecretExecution/AccountChangeSecretExecutionDetail/AccountChangeSecretRecord.vue @@ -21,23 +21,13 @@ export default { RecordViewSecret, GenericListTable }, - props: { - object: { - type: Object, - required: false, - default: () => ({}) - } - }, data() { const vm = this - const url = this.object.id === undefined - ? '/api/v1/accounts/change-secret-records/' - : `/api/v1/accounts/change-secret-records/?execution_id=${this.object.id}` return { secretUrl: '', showViewSecretDialog: false, tableConfig: { - url: url, + url: '/api/v1/accounts/change-secret-records/', columns: [ 'asset', 'account', 'date_finished', 'is_success', 'error', 'actions' ], diff --git a/src/views/accounts/AccountChangeSecret/AccountChangeSecretExecution/AccountChangeSecretExecutionList.vue b/src/views/accounts/AccountChangeSecret/AccountChangeSecretExecution/AccountChangeSecretExecutionList.vue index 01f5dfa78..b0dbb9a55 100644 --- a/src/views/accounts/AccountChangeSecret/AccountChangeSecretExecution/AccountChangeSecretExecutionList.vue +++ b/src/views/accounts/AccountChangeSecret/AccountChangeSecretExecution/AccountChangeSecretExecutionList.vue @@ -12,13 +12,6 @@ export default { components: { GenericListTable }, - props: { - object: { - type: Object, - required: false, - default: () => ({}) - } - }, data() { return { tableConfig: { @@ -105,6 +98,20 @@ export default { callback: function({ row }) { window.open(`/api/v1/accounts/change-secret-executions/${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 + } + }) + } } ] } diff --git a/src/views/accounts/AccountChangeSecret/index.vue b/src/views/accounts/AccountChangeSecret/index.vue index 560629d53..f5e2bc55f 100644 --- a/src/views/accounts/AccountChangeSecret/index.vue +++ b/src/views/accounts/AccountChangeSecret/index.vue @@ -36,7 +36,7 @@ export default { }, { title: this.$t('RecordList'), - name: 'AccountPushRecord', + name: 'ChangeSecretRecord', hidden: () => !this.$hasPerm('accounts.view_changesecretrecord'), component: () => import( '@/views/accounts/AccountChangeSecret/AccountChangeSecretExecution/AccountChangeSecretExecutionDetail/AccountChangeSecretRecord.vue' diff --git a/src/views/accounts/AccountPush/AccountPushExecutionDetail/AccountPushRecord.vue b/src/views/accounts/AccountPush/AccountPushExecutionDetail/AccountPushRecord.vue index 80ef4ed0b..293b93e4b 100644 --- a/src/views/accounts/AccountPush/AccountPushExecutionDetail/AccountPushRecord.vue +++ b/src/views/accounts/AccountPush/AccountPushExecutionDetail/AccountPushRecord.vue @@ -28,14 +28,11 @@ export default { } }, data() { - const url = this.object.id === undefined - ? '/api/v1/accounts/push-account-records/' - : `/api/v1/accounts/push-account-records/?execution_id=${this.object.id}` return { secretUrl: '', showViewSecretDialog: false, tableConfig: { - url: url, + url: '/api/v1/accounts/push-account-records/', columns: [ 'asset', 'account', 'date_finished', 'is_success', 'error' ], diff --git a/src/views/accounts/AccountPush/AccountPushExecutionList.vue b/src/views/accounts/AccountPush/AccountPushExecutionList.vue index deeb2270a..9f6a38dab 100644 --- a/src/views/accounts/AccountPush/AccountPushExecutionList.vue +++ b/src/views/accounts/AccountPush/AccountPushExecutionList.vue @@ -12,13 +12,6 @@ export default { components: { GenericListTable }, - props: { - object: { - type: Object, - required: false, - default: () => ({}) - } - }, data() { return { tableConfig: { @@ -91,7 +84,6 @@ export default { { name: 'detail', title: this.$t('Detail'), - type: 'info', can: this.$hasPerm('accounts.view_pushaccountexecution'), callback: function({ row }) { return this.$router.push({ name: 'AccountPushExecutionDetail', params: { id: row.id }}) @@ -100,11 +92,24 @@ export default { { name: 'report', title: this.$t('Report'), - type: 'success', can: this.$hasPerm('accounts.view_pushaccountexecution'), callback: function({ row }) { window.open(`/api/v1/accounts/push-account-executions/${row.id}/report/`) } + }, + { + name: 'record', + title: this.$t('Record'), + can: this.$hasPerm('accounts.view_pushsecretrecord'), + callback: function({ row }) { + return this.$router.push({ + name: 'AccountPushList', + query: { + tab: 'AccountPushRecord', + execution_id: row.id + } + }) + } } ] }