Skip to content

Commit

Permalink
perf: change secret push account record
Browse files Browse the repository at this point in the history
  • Loading branch information
feng626 committed Jan 26, 2025
1 parent 0a96331 commit 6805e38
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 34 deletions.
3 changes: 1 addition & 2 deletions src/router/pam/automations.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,7 @@ export default [
title: i18n.t('ExecutionDetail'),
permissions: ['accounts.view_pushaccountexecution']
}
}
]
}]
},
{
path: 'account-backup',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@ export default {
components: {
GenericListTable
},
props: {
object: {
type: Object,
required: false,
default: () => ({})
}
},
data() {
return {
tableConfig: {
Expand Down Expand Up @@ -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
}
})
}
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion src/views/accounts/AccountChangeSecret/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
],
Expand Down
23 changes: 14 additions & 9 deletions src/views/accounts/AccountPush/AccountPushExecutionList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@ export default {
components: {
GenericListTable
},
props: {
object: {
type: Object,
required: false,
default: () => ({})
}
},
data() {
return {
tableConfig: {
Expand Down Expand Up @@ -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 }})
Expand All @@ -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
}
})
}
}
]
}
Expand Down

0 comments on commit 6805e38

Please sign in to comment.