mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-29 21:28:52 +00:00
perf: change secret push account record
This commit is contained in:
@@ -242,8 +242,7 @@ export default [
|
||||
title: i18n.t('ExecutionDetail'),
|
||||
permissions: ['accounts.view_pushaccountexecution']
|
||||
}
|
||||
}
|
||||
]
|
||||
}]
|
||||
},
|
||||
{
|
||||
path: 'account-backup',
|
||||
|
||||
@@ -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'
|
||||
],
|
||||
|
||||
@@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
],
|
||||
|
||||
@@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user