diff --git a/ui/src/components/view/InfoCard.vue b/ui/src/components/view/InfoCard.vue index 8200b8114fb..2229f8ee976 100644 --- a/ui/src/components/view/InfoCard.vue +++ b/ui/src/components/view/InfoCard.vue @@ -713,7 +713,6 @@ export default { }, data () { return { - name: '', ipaddress: '', resourceType: '', annotationType: '', @@ -769,10 +768,14 @@ export default { created () { this.setData() }, + computed: { + name () { + return this.resource.displayname || this.resource.displaytext || this.resource.name || this.resource.username || + this.resource.ipaddress || this.resource.virtualmachinename || this.resource.templatetype + } + }, methods: { setData () { - this.name = this.resource.displayname || this.resource.displaytext || this.resource.name || this.resource.username || - this.resource.ipaddress || this.resource.virtualmachinename || this.resource.templatetype if (this.resource.nic && this.resource.nic.length > 0) { this.ipaddress = this.resource.nic.filter(e => { return e.ipaddress }).map(e => { return e.ipaddress }).join(', ') } else { diff --git a/ui/src/views/compute/DeployVM.vue b/ui/src/views/compute/DeployVM.vue index bee2a386579..b2a5fee8bcb 100644 --- a/ui/src/views/compute/DeployVM.vue +++ b/ui/src/views/compute/DeployVM.vue @@ -603,7 +603,7 @@ - +