Skip to content

Commit

Permalink
perf: 基本完成框架
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuler committed Oct 14, 2024
1 parent 7ff1da7 commit e8cf834
Show file tree
Hide file tree
Showing 6 changed files with 345 additions and 333 deletions.
3 changes: 2 additions & 1 deletion src/components/Apps/AccountCreateUpdateForm/const.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ export const accountFieldsMeta = (vm) => {
!automation.ansible_enabled ||
!vm.$hasPerm('accounts.push_account') ||
(formValue.secret_type === 'ssh_key' && vm.iPlatform.type.value === 'windows') ||
vm.addTemplate
vm.addTemplate ||
!formValue.secret_reset
}
},
params: {
Expand Down
3 changes: 2 additions & 1 deletion src/components/Apps/AccountCreateUpdateForm/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ export default {
[this.$t('Basic'), ['assets', 'name', 'username', 'privileged', 'su_from', 'su_from_username']],
[this.$t('Secret'), [
'secret_type', 'password', 'ssh_key', 'token',
'access_key', 'passphrase', 'api_key'
'access_key', 'passphrase', 'api_key',
'secret_reset'
]],
[this.$t('Other'), ['push_now', 'params', 'on_invalid', 'is_active', 'comment']]
],
Expand Down
19 changes: 14 additions & 5 deletions src/components/Apps/AccountListTable/AccountList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export default {
formatter: () => {
// Todo: 通用的 formatter, 点击后 10s 后还原为 *
return (
<span class='secret'>
<span class='secret-col'>
<i class='fa fa-clone'/> ******
</span>
)
Expand All @@ -189,8 +189,8 @@ export default {
formatter: () => {
return (
<span class='connect'>
<el-button type='primary' size='mini'>
<i class='fa fa-terminal'/>
<el-button type='primary' size='mini' plain>
<i class='fa fa-desktop'/>
</el-button>
</span>
)
Expand Down Expand Up @@ -248,7 +248,7 @@ export default {
formatterArgs: {
hasUpdate: false, // can set function(row, value)
hasDelete: false, // can set function(row, value)
hasClone: this.hasClone,
hasClone: false,
canClone: true,
moreActionsTitle: this.$t('More'),
extraActions: [
Expand Down Expand Up @@ -287,7 +287,7 @@ export default {
},
{
name: 'Test',
title: this.$t('验证密码'),
title: this.$t('验证密文'),
can: ({ row }) =>
!this.$store.getters.currentOrgIsRoot &&
this.$hasPerm('accounts.verify_account') &&
Expand Down Expand Up @@ -330,6 +330,11 @@ export default {
name: 'MoveToOther',
title: '移动到其他资产',
type: 'primary'
},
{
name: 'Clone',
title: this.$t('Duplicate'),
divided: true
}
]
}
Expand Down Expand Up @@ -558,4 +563,8 @@ export default {
.cell a {
color: var(--color-info);
}
.secret-col {
cursor: pointer;
}
</style>
Loading

0 comments on commit e8cf834

Please sign in to comment.