mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-11-04 00:02:37 +01:00 
			
		
		
		
	ui: Show vm name in info card in deployvm (#4786)
This commit is contained in:
		
							parent
							
								
									c6e8b8c4d5
								
							
						
					
					
						commit
						8510344129
					
				@ -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 {
 | 
			
		||||
 | 
			
		||||
@ -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>
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user