mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-29 21:28:52 +00:00
perf: Merge More into Info and update detail page
This commit is contained in:
@@ -173,7 +173,7 @@ export default {
|
|||||||
const data = await this.$store.dispatch('common/getUrlMeta', { url: this.url })
|
const data = await this.$store.dispatch('common/getUrlMeta', { url: this.url })
|
||||||
let remoteMeta = data.actions['GET'] || {}
|
let remoteMeta = data.actions['GET'] || {}
|
||||||
if (this.nested) {
|
if (this.nested) {
|
||||||
remoteMeta = remoteMeta[this.nested]?.children || {}
|
remoteMeta = remoteMeta[this.nested]?.children || remoteMeta || {}
|
||||||
}
|
}
|
||||||
let fields = this.fields
|
let fields = this.fields
|
||||||
fields = fields || Object.keys(remoteMeta)
|
fields = fields || Object.keys(remoteMeta)
|
||||||
|
|||||||
@@ -9,14 +9,12 @@
|
|||||||
<script>
|
<script>
|
||||||
import { GenericDetailPage } from '@/layout/components'
|
import { GenericDetailPage } from '@/layout/components'
|
||||||
import Info from './info.vue'
|
import Info from './info.vue'
|
||||||
import More from './more.vue'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AccountDiscoverDetail',
|
name: 'AccountDiscoverDetail',
|
||||||
components: {
|
components: {
|
||||||
GenericDetailPage,
|
GenericDetailPage,
|
||||||
Info,
|
Info
|
||||||
More
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -32,10 +30,6 @@ export default {
|
|||||||
{
|
{
|
||||||
title: this.$t('Basic'),
|
title: this.$t('Basic'),
|
||||||
name: 'Info'
|
name: 'Info'
|
||||||
},
|
|
||||||
{
|
|
||||||
title: this.$t('More'),
|
|
||||||
name: 'More'
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
getTitle: this.getExecutionTitle
|
getTitle: this.getExecutionTitle
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<TwoCol>
|
<TwoCol>
|
||||||
<AutoDetailCard :fields="detailFields" :object="object" :url="url" />
|
<AutoDetailCard :fields="detailFields" :object="object" :url="url" />
|
||||||
|
<AutoDetailCard v-bind="moreConfig" />
|
||||||
</TwoCol>
|
</TwoCol>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -28,7 +29,14 @@ export default {
|
|||||||
'date_last_login', 'address_last_login',
|
'date_last_login', 'address_last_login',
|
||||||
'remote_present', 'present',
|
'remote_present', 'present',
|
||||||
'date_updated', 'status'
|
'date_updated', 'status'
|
||||||
]
|
],
|
||||||
|
moreConfig: {
|
||||||
|
url: `/api/v1/accounts/gathered-accounts/${this.object.id}/details/`,
|
||||||
|
title: this.$t('More'),
|
||||||
|
object: this.object,
|
||||||
|
nested: 'detail',
|
||||||
|
showUndefined: false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {}
|
computed: {}
|
||||||
|
|||||||
@@ -1,35 +0,0 @@
|
|||||||
<template>
|
|
||||||
<TwoCol>
|
|
||||||
<AutoDetailCard :object="detail" :url="url" />
|
|
||||||
</TwoCol>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import AutoDetailCard from '@/components/Cards/DetailCard/auto.vue'
|
|
||||||
import TwoCol from '@/layout/components/Page/TwoColPage.vue'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'AccountDiscoverMore',
|
|
||||||
components: {
|
|
||||||
TwoCol,
|
|
||||||
AutoDetailCard
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
object: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
url: `/api/v1/accounts/gathered-accounts/${this.object.id}/details/`,
|
|
||||||
detail: this.object?.detail
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
Reference in New Issue
Block a user