perf: change secret push account record

This commit is contained in:
feng
2025-01-26 17:25:59 +08:00
committed by feng626
parent 0a96331218
commit 7524b6f895
6 changed files with 32 additions and 34 deletions

View File

@@ -242,8 +242,7 @@ export default [
title: i18n.t('ExecutionDetail'),
permissions: ['accounts.view_pushaccountexecution']
}
}
]
}]
},
{
path: 'account-backup',

View File

@@ -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'
],

View File

@@ -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
}
})
}
}
]
}

View File

@@ -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'

View File

@@ -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'
],

View File

@@ -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
}
})
}
}
]
}