You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2021/08/11 14:23:27 UTC
[cloudstack] branch 4.15 updated: ui: fix display host
hypervisorversion (#5301)
This is an automated email from the ASF dual-hosted git repository.
dahn pushed a commit to branch 4.15
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.15 by this push:
new fb0dedc ui: fix display host hypervisorversion (#5301)
fb0dedc is described below
commit fb0dedc896a602d210a0ae88216b2a7b7675c426
Author: Abhishek Kumar <ab...@gmail.com>
AuthorDate: Wed Aug 11 19:53:08 2021 +0530
ui: fix display host hypervisorversion (#5301)
---
ui/src/views/infra/HostInfo.vue | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/ui/src/views/infra/HostInfo.vue b/ui/src/views/infra/HostInfo.vue
index e867956..4ab73b5 100644
--- a/ui/src/views/infra/HostInfo.vue
+++ b/ui/src/views/infra/HostInfo.vue
@@ -18,7 +18,7 @@
<template>
<a-spin :spinning="fetchLoading">
<a-list size="small">
- <a-list-item>
+ <a-list-item v-if="host.hypervisorversion || (host.details && host.details['Host.OS'])">
<div>
<strong>{{ $t('label.hypervisorversion') }}</strong>
<div>
@@ -26,12 +26,9 @@
<span v-if="host.hypervisorversion">
{{ host.hypervisorversion }}
</span>
- <span v-else-if="host.details">
+ <span v-else-if="host.details && host.details['Host.OS']">
{{ host.details['Host.OS'] + ' ' + host.details['Host.OS.Version'] }}
</span>
- <span v-else>
- {{ host.version }}
- </span>
</div>
</div>
</a-list-item>
@@ -130,15 +127,16 @@ export default {
},
watch: {
resource (newItem, oldItem) {
- if (this.resource && this.resource.id && newItem && newItem.id !== oldItem.id) {
- this.fetchData()
+ if (this.resource) {
+ this.host = this.resource
+ if (this.resource.id && newItem && newItem.id !== oldItem.id) {
+ this.fetchData()
+ }
}
}
},
methods: {
fetchData () {
- this.dataSource = []
- this.itemCount = 0
this.fetchLoading = true
api('listHosts', { id: this.resource.id }).then(json => {
this.host = json.listhostsresponse.host[0]