mirror of
https://github.com/jumpserver/lina.git
synced 2025-07-31 06:42:26 +00:00
fix: 主机详情显示资产硬件信息
This commit is contained in:
parent
2ded71fa90
commit
2c2fac2ac1
@ -2,7 +2,8 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="14" :sm="24">
|
||||
<AutoDetailCard v-bind="detailBasicConfig" />
|
||||
<AutoDetailCard v-if="detailSpecificConfig.show" v-bind="detailSpecificConfig" />
|
||||
<AutoDetailCard v-if="detailSpecInfoConfig.show" v-bind="detailSpecInfoConfig" />
|
||||
<AutoDetailCard v-if="detailInfoConfig.show" v-bind="detailInfoConfig" />
|
||||
</el-col>
|
||||
<el-col :md="10" :sm="24">
|
||||
<QuickActions :actions="quickActions" type="primary" />
|
||||
@ -172,13 +173,20 @@ export default {
|
||||
'is_active', 'date_created', 'created_by', 'comment'
|
||||
]
|
||||
},
|
||||
detailSpecificConfig: {
|
||||
detailSpecInfoConfig: {
|
||||
show: Object.keys(this.object['spec_info']).length > 0,
|
||||
title: this.$t('common.SpecificInfo'),
|
||||
url: `/api/v1/assets/assets/${this.object.id}/spec-info/`,
|
||||
object: this.object.spec_info,
|
||||
showUndefine: false,
|
||||
excludes: ['spec_info.script']
|
||||
},
|
||||
detailInfoConfig: {
|
||||
show: this.object.category.value === 'host' && Object.keys(this.object['info']).length > 0,
|
||||
url: `/api/v1/assets/hosts/${this.object.id}/info/`,
|
||||
title: this.$t('assets.HardwareInfo'),
|
||||
object: this.object.info,
|
||||
showUndefine: false
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user