mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	infra: embed host-info into details tab
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
		
							parent
							
								
									73d8b1bb8f
								
							
						
					
					
						commit
						b0cf7773e6
					
				| @ -38,6 +38,7 @@ | |||||||
|         </div> |         </div> | ||||||
|       </div> |       </div> | ||||||
|     </a-list-item> |     </a-list-item> | ||||||
|  |     <HostInfo :resource="resource" v-if="$route.meta.name === 'host' && 'listHosts' in $store.getters.apis" /> | ||||||
|     <DedicateData :resource="resource" v-if="dedicatedSectionActive" /> |     <DedicateData :resource="resource" v-if="dedicatedSectionActive" /> | ||||||
|     <VmwareData :resource="resource" v-if="$route.meta.name === 'zone' && 'listVmwareDcs' in $store.getters.apis" /> |     <VmwareData :resource="resource" v-if="$route.meta.name === 'zone' && 'listVmwareDcs' in $store.getters.apis" /> | ||||||
|   </a-list> |   </a-list> | ||||||
| @ -45,12 +46,14 @@ | |||||||
| 
 | 
 | ||||||
| <script> | <script> | ||||||
| import DedicateData from './DedicateData' | import DedicateData from './DedicateData' | ||||||
|  | import HostInfo from '@/views/infra/HostInfo' | ||||||
| import VmwareData from './VmwareData' | import VmwareData from './VmwareData' | ||||||
| 
 | 
 | ||||||
| export default { | export default { | ||||||
|   name: 'DetailsTab', |   name: 'DetailsTab', | ||||||
|   components: { |   components: { | ||||||
|     DedicateData, |     DedicateData, | ||||||
|  |     HostInfo, | ||||||
|     VmwareData |     VmwareData | ||||||
|   }, |   }, | ||||||
|   props: { |   props: { | ||||||
|  | |||||||
| @ -27,9 +27,6 @@ export default { | |||||||
|   tabs: [{ |   tabs: [{ | ||||||
|     name: 'details', |     name: 'details', | ||||||
|     component: () => import('@/components/view/DetailsTab.vue') |     component: () => import('@/components/view/DetailsTab.vue') | ||||||
|   }, { |  | ||||||
|     name: 'config', |  | ||||||
|     component: () => import('@/views/infra/HostInfoTab.vue') |  | ||||||
|   }], |   }], | ||||||
|   related: [{ |   related: [{ | ||||||
|     name: 'vm', |     name: 'vm', | ||||||
|  | |||||||
| @ -21,9 +21,14 @@ | |||||||
|       <a-list-item> |       <a-list-item> | ||||||
|         <div> |         <div> | ||||||
|           <strong>{{ $t('label.hypervisorversion') }}</strong> |           <strong>{{ $t('label.hypervisorversion') }}</strong> | ||||||
|           <div v-if="host.details"> |           <div> | ||||||
|             {{ host.hypervisor }} |             {{ host.hypervisor }} | ||||||
|             {{ host.details['Host.OS'] + ' ' + host.details['Host.OS.Version'] }} |             <span v-if="host.details"> | ||||||
|  |               {{ host.details['Host.OS'] + ' ' + host.details['Host.OS.Version'] }} | ||||||
|  |             </span> | ||||||
|  |             <span v-else> | ||||||
|  |               {{ host.version }} | ||||||
|  |             </span> | ||||||
|           </div> |           </div> | ||||||
|         </div> |         </div> | ||||||
|       </a-list-item> |       </a-list-item> | ||||||
| @ -100,7 +105,7 @@ | |||||||
| import { api } from '@/api' | import { api } from '@/api' | ||||||
| 
 | 
 | ||||||
| export default { | export default { | ||||||
|   name: 'HostInfoTab', |   name: 'HostInfo', | ||||||
|   props: { |   props: { | ||||||
|     resource: { |     resource: { | ||||||
|       type: Object, |       type: Object, | ||||||
| @ -121,8 +126,8 @@ export default { | |||||||
|     this.fetchData() |     this.fetchData() | ||||||
|   }, |   }, | ||||||
|   watch: { |   watch: { | ||||||
|     loading (newData, oldData) { |     resource (newItem, oldItem) { | ||||||
|       if (!newData && this.resource.id) { |       if (this.resource && this.resource.id && newItem && newItem.id !== oldItem.id) { | ||||||
|         this.fetchData() |         this.fetchData() | ||||||
|       } |       } | ||||||
|     } |     } | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user