From 14bbb9374106701aafe2db273fdb7120619c17ae Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Sun, 1 Sep 2019 02:30:54 +0530 Subject: [PATCH] Add links in custom instance component Signed-off-by: Rohit Yadav --- ui/src/components/widgets/InstanceView.vue | 32 ++++++++++++++-------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/ui/src/components/widgets/InstanceView.vue b/ui/src/components/widgets/InstanceView.vue index 016b3b76dbd..686bdd34b15 100644 --- a/ui/src/components/widgets/InstanceView.vue +++ b/ui/src/components/widgets/InstanceView.vue @@ -19,13 +19,16 @@

ID: {{ vm.id }}
State: {{ vm.state }}
- Guest OS: {{ vm.ostypeid }}
- Guest Template: {{ vm.templatename }}
- Compute Offering: {{ vm.serviceofferingname }}
- Host: {{ vm.hostname }} ({{ vm.hypervisor }})
- Zone: {{ vm.zonename }}
+ Guest OS: {{ guestOsName }}
+ Offering: {{ vm.serviceofferingname }}
+ Template: {{ vm.templatename }}
+ Host: {{ vm.hostname }} ({{ vm.hypervisor }})
+ Zone: {{ vm.zonename }}
+ IP Addresses:

@@ -56,13 +59,16 @@ > - {{item.name}} ({{ item.type }}) + + {{ item.name }} + ({{ item.type }})

State: {{ item.state }}
+ Type: {{ item.type }}
Size: {{ (item.size / (1024 * 1024 * 1024.0)).toFixed(4) }} GB
Physical Size: {{ (item.physicalsize / (1024 * 1024 * 1024.0)).toFixed(4) }} GB
Provisioning: {{ item.provisioningtype }}
@@ -86,7 +92,7 @@

- Network: {{ item.networkname }}
+ Network: {{ item.networkname }}
Mac Address: {{ item.macaddress }}
Netmask: {{ item.netmask }}
Gateway: {{ item.gateway }}
@@ -124,7 +130,8 @@ export default { data () { return { volumes: [], - totalStorage: 0 + totalStorage: 0, + guestOsName: '' } }, watch: { @@ -134,15 +141,16 @@ export default { }, methods: { fetchData() { - this.listVolumes() - }, - listVolumes() { api('listVolumes', { 'listall': true, 'virtualmachineid': this.vm.id }).then(json => { this.volumes = json.listvolumesresponse.volume + this.totalStorage = 0 for (var volume of this.volumes) { this.totalStorage += volume.size } }) + api('listOsTypes', { 'id': this.vm.ostypeid }).then(json => { + this.guestOsName = json.listostypesresponse.ostype[0].description + }) } } }