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 })
|
||||
let remoteMeta = data.actions['GET'] || {}
|
||||
if (this.nested) {
|
||||
remoteMeta = remoteMeta[this.nested]?.children || {}
|
||||
remoteMeta = remoteMeta[this.nested]?.children || remoteMeta || {}
|
||||
}
|
||||
let fields = this.fields
|
||||
fields = fields || Object.keys(remoteMeta)
|
||||
|
||||
@@ -9,14 +9,12 @@
|
||||
<script>
|
||||
import { GenericDetailPage } from '@/layout/components'
|
||||
import Info from './info.vue'
|
||||
import More from './more.vue'
|
||||
|
||||
export default {
|
||||
name: 'AccountDiscoverDetail',
|
||||
components: {
|
||||
GenericDetailPage,
|
||||
Info,
|
||||
More
|
||||
Info
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -32,10 +30,6 @@ export default {
|
||||
{
|
||||
title: this.$t('Basic'),
|
||||
name: 'Info'
|
||||
},
|
||||
{
|
||||
title: this.$t('More'),
|
||||
name: 'More'
|
||||
}
|
||||
],
|
||||
getTitle: this.getExecutionTitle
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<TwoCol>
|
||||
<AutoDetailCard :fields="detailFields" :object="object" :url="url" />
|
||||
<AutoDetailCard v-bind="moreConfig" />
|
||||
</TwoCol>
|
||||
</template>
|
||||
|
||||
@@ -28,7 +29,14 @@ export default {
|
||||
'date_last_login', 'address_last_login',
|
||||
'remote_present', 'present',
|
||||
'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: {}
|
||||
|
||||
@@ -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