mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-13 11:24:17 +00:00
Fixed: Execution Record
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<BaseExecutionList
|
||||
:automation-route="automationRoute"
|
||||
:custom-actions="customActions"
|
||||
:detail-route="detailRoute"
|
||||
:resource="resource"
|
||||
:url="url"
|
||||
@@ -21,7 +22,21 @@ export default {
|
||||
url: `/api/v1/accounts/change-secret-executions/?${params}`,
|
||||
detailRoute: 'AccountChangeSecretExecutionDetail',
|
||||
automationRoute: 'AccountChangeSecretDetail',
|
||||
resource: 'changesecretexecution'
|
||||
resource: 'changesecretexecution',
|
||||
customActions: {
|
||||
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
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<template>
|
||||
<BaseExecutionList
|
||||
:automation-route="automationRoute"
|
||||
:resource-label="resourceLabel"
|
||||
:custom-actions="customActions"
|
||||
:detail-drawer="detailDrawer"
|
||||
:detail-route="detailRoute"
|
||||
:resource="resource"
|
||||
:resource-label="resourceLabel"
|
||||
:url="url"
|
||||
/>
|
||||
</template>
|
||||
@@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user