mirror of
https://github.com/jumpserver/lina.git
synced 2025-05-12 10:08:52 +00:00
perf: change secret
This commit is contained in:
parent
6aab902762
commit
4502375ed0
src
components/Apps/AccountListTable
views/accounts/AccountChangeSecret/Overview
@ -294,7 +294,7 @@ export default {
|
||||
type: 'primary',
|
||||
icon: 'plus',
|
||||
can: () => {
|
||||
return vm.$hasPerm('accounts.add_account') && !this.$store.getters.currentOrgIsRoot
|
||||
return vm.$hasPerm('accounts.add_account') && !vm.$store.getters.currentOrgIsRoot
|
||||
},
|
||||
callback: () => {
|
||||
setTimeout(() => {
|
||||
@ -310,7 +310,7 @@ export default {
|
||||
title: this.$t('TemplateAdd'),
|
||||
has: !(this.platform || this.asset),
|
||||
can: () => {
|
||||
return vm.$hasPerm('accounts.add_account') && !this.$store.getters.currentOrgIsRoot
|
||||
return vm.$hasPerm('accounts.add_account') && !vm.$store.getters.currentOrgIsRoot
|
||||
},
|
||||
callback: async() => {
|
||||
await this.getAssetDetail()
|
||||
|
@ -151,7 +151,7 @@ export const accountOtherActions = (vm) => [
|
||||
title: vm.$t('CopyToAsset'),
|
||||
type: 'primary',
|
||||
divided: true,
|
||||
can: () => vm.$hasPerm('accounts.create_account') && !vm.$store.getters.currentOrgIsRoot,
|
||||
can: () => vm.$hasPerm('accounts.add_account') && !vm.$store.getters.currentOrgIsRoot,
|
||||
has: () => {
|
||||
return !vm.asset
|
||||
},
|
||||
@ -167,7 +167,7 @@ export const accountOtherActions = (vm) => [
|
||||
name: 'MoveToOther',
|
||||
title: vm.$t('MoveToAsset'),
|
||||
type: 'primary',
|
||||
can: () => vm.$hasPerm('accounts.create_account') && !vm.$store.getters.currentOrgIsRoot,
|
||||
can: () => vm.$hasPerm('accounts.add_account') && !vm.$store.getters.currentOrgIsRoot,
|
||||
has: () => {
|
||||
return !vm.asset
|
||||
},
|
||||
|
@ -29,12 +29,13 @@ export default {
|
||||
data() {
|
||||
const vm = this
|
||||
return {
|
||||
url: '/api/v1/accounts/change-secret-records/dashboard/',
|
||||
showViewSecretDialog: false,
|
||||
cardConfig: {
|
||||
title: this.$tc('ChangeSecretFailAccounts')
|
||||
title: vm.$tc('ChangeSecretFailAccounts')
|
||||
},
|
||||
tableConfig: {
|
||||
url: `/api/v1/accounts/change-secret-records/dashboard/?days=${this.days}`,
|
||||
url: vm.tableUrl(),
|
||||
columns: [
|
||||
'asset', 'account', 'date_finished', 'is_success', 'error', 'actions'
|
||||
],
|
||||
@ -138,6 +139,17 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
days() {
|
||||
this.$refs.HomeCard.$refs.ListTable.tableConfig.url = this.tableUrl()
|
||||
this.$refs.HomeCard.$refs.ListTable.reloadTable()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
tableUrl() {
|
||||
return `/api/v1/accounts/change-secret-records/dashboard/?days=${this.days}`
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user