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