Merge branch 'pam' of github.com:jumpserver/lina into pam

This commit is contained in:
ibuler
2025-03-07 10:23:32 +08:00
9 changed files with 21 additions and 18 deletions

View File

@@ -6,7 +6,12 @@
v-bind="$attrs"
>
<template v-slot:default="slotProps">
<CardPanel :object="slotProps.item" :table-config="tableConfig" v-bind="subComponentProps" />
<CardPanel
:object="slotProps.item"
:table-config="tableConfig"
v-bind="subComponentProps"
@refresh="reloadTable"
/>
</template>
</CardTable>
</template>

View File

@@ -115,7 +115,8 @@ export default {
drawerTitle = this.formatterArgs.getTitle({
col: this.col,
row: this.row,
cellValue: this.cellValue
cellValue: this.cellValue,
index: this.index
})
}
let title = this.cellValue?.name || drawerTitle

View File

@@ -119,17 +119,17 @@ export default {
// },
{
name: 'delete_remote',
label: this.$t('Delete remote account'),
label: this.$t('DeleteRemoteAccount'),
has: this.row.remote_present
},
{
name: 'add_account',
label: this.$t('Add account'),
label: this.$t('AddAccount'),
has: !this.row.present
},
{
name: 'change_password_add',
label: this.$t('Add account after changing password'),
label: this.$t('AddAccountAfterChangingPassword'),
has: !this.row.present
}
]

View File

@@ -85,10 +85,10 @@ export default [
{
path: 'account/:id',
component: () => import('@/views/accounts/AccountDiscover/AccountDetail/index.vue'),
name: 'AccountDiscoverAccountDetail',
name: 'DiscoverAccountDetail',
hidden: true,
meta: {
title: i18n.t('AccountDiscoverAccountDetail'),
title: i18n.t('DiscoverAccountDetail'),
permissions: ['accounts.view_gatheraccountsexecution']
}
}

View File

@@ -228,12 +228,7 @@ export default {
],
formatters: {
asset: (item, value) => {
const route = {
name: 'AssetDetail',
params: { id: this.object.asset.id }
}
return <router-link to={route}>{value?.name}</router-link>
return <span>{ value?.name }</span>
},
su_from: (item, value) => {
return <span>{value?.name ? value?.name + `(${value?.username})` : ''}</span>

View File

@@ -41,7 +41,7 @@ export const gatherAccountTableConfig = (vm, url) => {
can: true,
getRoute({ row }) {
return {
name: 'AccountDiscoverAccountDetail',
name: 'DiscoverAccountDetail',
params: { id: row.id }
}
},

View File

@@ -68,13 +68,13 @@ export default {
fieldsMeta: {},
performSubmit(validValues) {
let url = this.url
const { id = '' } = vm.meta
const { id = '', action } = vm.meta
const values = _.cloneDeep(validValues)
let submitMethod = id ? 'put' : 'post'
if (values.nodes && values.nodes.length === 0) {
delete values['nodes']
}
if (id) {
if (action === 'update') {
url = getUpdateObjURL(url, id)
delete values['accounts']
} else {

View File

@@ -217,8 +217,9 @@ export default {
},
methods: {
async updateOrCloneAsset(row, action) {
this.$route.params.id = row.id
this.$route.params.action = action
if (action === 'update') {
this.$route.params.id = row.id
}
const meta = {
action: action,
id: row.id,

View File

@@ -67,6 +67,7 @@ export default {
}
],
config: {
url: '',
hasSelection: true,
persistSelection: false,
hasPagination: false,