You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2021/03/11 07:36:36 UTC

[cloudstack] branch 4.15 updated: ui: Show vm name in info card in deployvm (#4786)

This is an automated email from the ASF dual-hosted git repository.

rohit 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 8510344  ui: Show vm name in info card in deployvm (#4786)
8510344 is described below

commit 85103441295835bcb3410e596225d4fd8756c9f0
Author: davidjumani <dj...@gmail.com>
AuthorDate: Thu Mar 11 13:04:28 2021 +0530

    ui: Show vm name in info card in deployvm (#4786)
---
 ui/src/components/view/InfoCard.vue | 9 ++++++---
 ui/src/views/compute/DeployVM.vue   | 2 +-
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/ui/src/components/view/InfoCard.vue b/ui/src/components/view/InfoCard.vue
index 8200b81..2229f8e 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 bee2a38..b2a5fee 100644
--- a/ui/src/views/compute/DeployVM.vue
+++ b/ui/src/views/compute/DeployVM.vue
@@ -603,7 +603,7 @@
       </a-col>
       <a-col :md="24" :lg="7" v-if="!isMobile()">
         <a-affix :offsetTop="75">
-          <info-card class="vm-info-card" :resource="vm" :title="vm.name ? this.$t('label.yourinstance') + ' : ' + vm.name : this.$t('label.yourinstance')" />
+          <info-card class="vm-info-card" :resource="vm" :title="this.$t('label.yourinstance')" />
         </a-affix>
       </a-col>
     </a-row>