Merge pull request #2723 from jumpserver/pr@dev@change_secret

perf: change secret is_active
This commit is contained in:
feng626
2023-02-21 17:55:18 +08:00
committed by GitHub
4 changed files with 13 additions and 8 deletions

View File

@@ -81,7 +81,7 @@ export default {
return <span>{this.object.is_periodic ? val : ''}</span>
}
},
'date_created', 'date_updated', 'comment'
'date_created', 'date_updated', 'comment', 'is_active'
]
}
},

View File

@@ -20,13 +20,13 @@ export default {
columnsExclude: ['password_rules'],
columns: [
'name', 'accounts', 'secret_strategy', 'is_periodic',
'periodic_display', 'executed_amount', 'actions'
'periodic_display', 'executed_amount', 'is_active', 'actions'
],
columnsShow: {
min: ['name', 'actions'],
default: [
'name', 'accounts', 'secret_strategy', 'is_periodic',
'periodic_display', 'executed_amount', 'actions'
'periodic_display', 'executed_amount', 'is_active', 'actions'
]
},
columnsMeta: {
@@ -92,8 +92,11 @@ export default {
{
title: vm.$t('xpack.Execute'),
name: 'execute',
can: this.$hasPerm('accounts.add_changesecretexection'),
can: ({ row }) => {
return row.is_active && vm.$hasPerm('accounts.add_changesecretexection')
},
type: 'info',
disabled: ({ row }) => !row.is_active,
callback: function({ row }) {
this.$axios.post(
`/api/v1/accounts/change-secret-executions/`,

View File

@@ -81,7 +81,7 @@ export default {
return <span>{this.object.is_periodic ? val : ''}</span>
}
},
'date_created', 'date_updated', 'comment'
'date_created', 'date_updated', 'comment', 'is_active'
]
}
},

View File

@@ -19,13 +19,13 @@ export default {
url: '/api/v1/accounts/push-account-automations/',
columns: [
'name', 'accounts', 'secret_strategy', 'is_periodic',
'periodic_display', 'executed_amount', 'actions'
'periodic_display', 'executed_amount', 'is_active', 'actions'
],
columnsShow: {
min: ['name', 'actions'],
default: [
'name', 'accounts', 'secret_strategy', 'is_periodic',
'periodic_display', 'executed_amount', 'actions'
'periodic_display', 'executed_amount', 'is_active', 'actions'
]
},
columnsMeta: {
@@ -96,7 +96,9 @@ export default {
{
title: vm.$t('xpack.Execute'),
name: 'execute',
can: this.$hasPerm('accounts.add_pushaccountexecution'),
can: ({ row }) => {
return row.is_active && vm.$hasPerm('accounts.add_pushaccountexecution')
},
type: 'info',
callback: function({ row }) {
this.$axios.post(