mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-29 21:28:52 +00:00
Merge branch 'pam' of github.com:jumpserver/lina into pam
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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']
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -41,7 +41,7 @@ export const gatherAccountTableConfig = (vm, url) => {
|
||||
can: true,
|
||||
getRoute({ row }) {
|
||||
return {
|
||||
name: 'AccountDiscoverAccountDetail',
|
||||
name: 'DiscoverAccountDetail',
|
||||
params: { id: row.id }
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -67,6 +67,7 @@ export default {
|
||||
}
|
||||
],
|
||||
config: {
|
||||
url: '',
|
||||
hasSelection: true,
|
||||
persistSelection: false,
|
||||
hasPagination: false,
|
||||
|
||||
Reference in New Issue
Block a user