mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
infra: embed host-info into details tab
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
73d8b1bb8f
commit
b0cf7773e6
@ -38,6 +38,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</a-list-item>
|
||||
<HostInfo :resource="resource" v-if="$route.meta.name === 'host' && 'listHosts' in $store.getters.apis" />
|
||||
<DedicateData :resource="resource" v-if="dedicatedSectionActive" />
|
||||
<VmwareData :resource="resource" v-if="$route.meta.name === 'zone' && 'listVmwareDcs' in $store.getters.apis" />
|
||||
</a-list>
|
||||
@ -45,12 +46,14 @@
|
||||
|
||||
<script>
|
||||
import DedicateData from './DedicateData'
|
||||
import HostInfo from '@/views/infra/HostInfo'
|
||||
import VmwareData from './VmwareData'
|
||||
|
||||
export default {
|
||||
name: 'DetailsTab',
|
||||
components: {
|
||||
DedicateData,
|
||||
HostInfo,
|
||||
VmwareData
|
||||
},
|
||||
props: {
|
||||
|
||||
@ -27,9 +27,6 @@ export default {
|
||||
tabs: [{
|
||||
name: 'details',
|
||||
component: () => import('@/components/view/DetailsTab.vue')
|
||||
}, {
|
||||
name: 'config',
|
||||
component: () => import('@/views/infra/HostInfoTab.vue')
|
||||
}],
|
||||
related: [{
|
||||
name: 'vm',
|
||||
|
||||
@ -21,9 +21,14 @@
|
||||
<a-list-item>
|
||||
<div>
|
||||
<strong>{{ $t('label.hypervisorversion') }}</strong>
|
||||
<div v-if="host.details">
|
||||
<div>
|
||||
{{ host.hypervisor }}
|
||||
<span v-if="host.details">
|
||||
{{ host.details['Host.OS'] + ' ' + host.details['Host.OS.Version'] }}
|
||||
</span>
|
||||
<span v-else>
|
||||
{{ host.version }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</a-list-item>
|
||||
@ -100,7 +105,7 @@
|
||||
import { api } from '@/api'
|
||||
|
||||
export default {
|
||||
name: 'HostInfoTab',
|
||||
name: 'HostInfo',
|
||||
props: {
|
||||
resource: {
|
||||
type: Object,
|
||||
@ -121,8 +126,8 @@ export default {
|
||||
this.fetchData()
|
||||
},
|
||||
watch: {
|
||||
loading (newData, oldData) {
|
||||
if (!newData && this.resource.id) {
|
||||
resource (newItem, oldItem) {
|
||||
if (this.resource && this.resource.id && newItem && newItem.id !== oldItem.id) {
|
||||
this.fetchData()
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user