File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818<template >
1919 <a-spin :spinning =" fetchLoading" >
2020 <a-list size =" small" >
21- <a-list-item >
21+ <a-list-item v-if = " host.hypervisorversion || (host.details && host.details['Host.OS']) " >
2222 <div >
2323 <strong >{{ $t('label.hypervisorversion') }}</strong >
2424 <div >
2525 {{ host.hypervisor }}
2626 <span v-if =" host.hypervisorversion" >
2727 {{ host.hypervisorversion }}
2828 </span >
29- <span v-else-if =" host.details" >
29+ <span v-else-if =" host.details && host.details['Host.OS'] " >
3030 {{ host.details['Host.OS'] + ' ' + host.details['Host.OS.Version'] }}
3131 </span >
32- <span v-else >
33- {{ host.version }}
34- </span >
3532 </div >
3633 </div >
3734 </a-list-item >
@@ -130,15 +127,16 @@ export default {
130127 },
131128 watch: {
132129 resource (newItem , oldItem ) {
133- if (this .resource && this .resource .id && newItem && newItem .id !== oldItem .id ) {
134- this .fetchData ()
130+ if (this .resource ) {
131+ this .host = this .resource
132+ if (this .resource .id && newItem && newItem .id !== oldItem .id ) {
133+ this .fetchData ()
134+ }
135135 }
136136 }
137137 },
138138 methods: {
139139 fetchData () {
140- this .dataSource = []
141- this .itemCount = 0
142140 this .fetchLoading = true
143141 api (' listHosts' , { id: this .resource .id }).then (json => {
144142 this .host = json .listhostsresponse .host [0 ]
You can’t perform that action at this time.
0 commit comments