diff --git a/ui/src/components/widgets/DataView.vue b/ui/src/components/widgets/DataView.vue
new file mode 100644
index 00000000000..a1af7a7acce
--- /dev/null
+++ b/ui/src/components/widgets/DataView.vue
@@ -0,0 +1,44 @@
+
+
+
+
+ Name
+ {{ resource.name }}
+
+
+
+
+ ID
+ {{ resource.id }}
+
+
+
+
+ {{ key }}
+ {{ value }}
+
+
+
+
+
+
+
+
diff --git a/ui/src/components/widgets/InstanceView.vue b/ui/src/components/widgets/InstanceView.vue
new file mode 100644
index 00000000000..016b3b76dbd
--- /dev/null
+++ b/ui/src/components/widgets/InstanceView.vue
@@ -0,0 +1,152 @@
+
+
+
+
+ {{ vm.displayname }} ({{ vm.name }})
+
+
+
+
+
+
+ {{ vm.instancename }}
+
+
+
+
+
+
+ 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 }}
+ IP Addresses:
+
+
+
+
+
+ CPU: {{ vm.cpunumber }} x {{ vm.cpuspeed }} Mhz
+
+ Memory: {{ vm.memory }} MiB
+
+ Storage: {{ (totalStorage / (1024 * 1024 * 1024.0)).toFixed(2) }} GiB
+
+
+
+
+
+
+
+ {{ vm.cpunumber }} CPU(s) x {{ vm.cpuspeed }} Mhz
+
+
+ Total Memory: {{ vm.memory }} MiB
Free Memory: {{ vm.memoryintfreekbs }} kBs
+
+
+
+
+
+ {{item.name}} ({{ item.type }})
+
+
+
+
+
+ State: {{ item.state }}
+ Size: {{ (item.size / (1024 * 1024 * 1024.0)).toFixed(4) }} GB
+ Physical Size: {{ (item.physicalsize / (1024 * 1024 * 1024.0)).toFixed(4) }} GB
+ Provisioning: {{ item.provisioningtype }}
+ Storage Pool: {{ item.storage }} ({{ item.storagetype }})
+
+
+
+
+
+
+
+
+
+
+ {{item.ipaddress}} (Default)
+
+
+
+
+
+ Network: {{ item.networkname }}
+ Mac Address: {{ item.macaddress }}
+ Netmask: {{ item.netmask }}
+ Gateway: {{ item.gateway }}
+ Broadcast URI: {{ item.broadcasturi }}
+ Isolation URI: {{ item.isolationuri }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ui/src/config/section/compute.js b/ui/src/config/section/compute.js
index ebb6f3dc47b..ae06a31f197 100644
--- a/ui/src/config/section/compute.js
+++ b/ui/src/config/section/compute.js
@@ -10,7 +10,8 @@ export default {
permission: [ 'listVirtualMachinesMetrics', 'listVirtualMachines' ],
component: () => import('@/components/CloudMonkey/Resource.vue'),
columns: [
- 'displayname', 'state', 'instancename', { 'ipaddress': (record) => { return record.nic[0].ipaddress } }, 'account', 'zonename',
+ { 'name': (record) => { return record.displayname } }, 'state', 'instancename',
+ { 'ipaddress': (record) => { return record.nic[0].ipaddress } }, 'account', 'zonename',
'cpunumber', 'cpuused', 'cputotal', 'memoryintfreekbs', 'memorytotal',
'networkread', 'networkwrite', 'diskkbsread', 'diskkbswrite', 'diskiopstotal'
],
@@ -24,33 +25,56 @@ export default {
listView: true
},
{
- api: 'startVirtualMachine',
- icon: 'right-square',
- label: 'View Console',
+ api: 'updateVirtualMachine',
+ icon: 'edit',
+ label: 'Update VM',
dataView: true
},
-
{
api: 'startVirtualMachine',
icon: 'caret-right',
label: 'Start VM',
- params: ['name', 'zoneid', 'diskofferingid'],
- listView: true,
- dataView: true
+ dataView: true,
+ groupAction: true,
+ hidden: (record) => { return record.state !== 'Stopped' },
+ options: ['podid', 'clusterid', 'hostid']
},
{
api: 'stopVirtualMachine',
icon: 'stop',
label: 'Stop VM',
- params: ['name', 'zoneid', 'diskofferingid'],
- listView: true,
- dataView: true
+ dataView: true,
+ groupAction: true,
+ options: ['podid', 'clusterid', 'hostid'],
+ hidden: (record) => { return record.state !== 'Running' }
},
{
api: 'rebootVirtualMachine',
icon: 'sync',
label: 'Reboot VM',
- dataView: true
+ dataView: true,
+ hidden: (record) => { return record.state !== 'Running' },
+ },
+ {
+ api: 'restoreVirtualMachine',
+ icon: 'usb',
+ label: 'Reinstall Instance',
+ dataView: true,
+ params: ['virtualmachineid']
+ },
+ {
+ api: 'updateVMAffinityGroup',
+ icon: 'swap',
+ label: 'Update Affinity Group',
+ dataView: true,
+ params: ['id', 'serviceofferingid']
+ },
+ {
+ api: 'changeServiceForVirtualMachine',
+ icon: 'sliders',
+ label: 'Change Service Offering',
+ dataView: true,
+ params: ['id', 'serviceofferingid']
},
{
api: 'createVMSnapshot',
@@ -58,17 +82,17 @@ export default {
label: 'Create VM Snapshot',
dataView: true
},
- {
- api: 'restoreVirtualMachine',
- icon: 'to-top',
- label: 'Reinstall Instance',
- dataView: true,
- params: ['virtualmachineid']
- },
{
api: 'attachIso',
icon: 'paper-clip',
- label: 'Attach ISO to Instance',
+ label: 'Attach ISO',
+ dataView: true,
+ params: ['id', 'virtualmachineid']
+ },
+ {
+ api: 'detachIso',
+ icon: 'link',
+ label: 'Detach ISO',
dataView: true,
params: ['id', 'virtualmachineid']
},
@@ -76,7 +100,8 @@ export default {
api: 'migrateVirtualMachine',
icon: 'drag',
label: 'Migrate VM',
- dataView: true
+ dataView: true,
+ hidden: (record) => { return record.state !== 'Running' }
},
{
api: 'resetPasswordForVirtualMachine',
@@ -91,20 +116,13 @@ export default {
label: 'Reset SSH Key',
dataView: true
},
- {
- api: 'changeServiceForVirtualMachine',
- icon: 'swap',
- label: 'Change Service Offering',
- dataView: true,
- params: ['id', 'serviceofferingid']
- },
{
api: 'destroyVirtualMachine',
icon: 'delete',
label: 'Destroy VM',
params: ['id'],
- listView: true,
- dataView: true
+ dataView: true,
+ groupAction: true
}
]
},
diff --git a/ui/src/config/section/storage.js b/ui/src/config/section/storage.js
index 06de086a39b..d503484b410 100644
--- a/ui/src/config/section/storage.js
+++ b/ui/src/config/section/storage.js
@@ -33,6 +33,22 @@ export default {
params: ['@file', 'name', 'zoneid', 'format', 'checksum'],
listView: true
},
+ {
+ api: 'attachVolume',
+ icon: 'paper-clip',
+ label: 'Attach Volume',
+ params: ['id', 'virtualmachineid'],
+ dataView: true,
+ hidden: (record) => { return record.virtualmachineid }
+ },
+ {
+ api: 'detachVolume',
+ icon: 'link',
+ label: 'Detach Volume',
+ params: ['id', 'virtualmachineid'],
+ dataView: true,
+ hidden: (record) => { return !record.virtualmachineid }
+ },
{
api: 'migrateVolume',
icon: 'drag',
@@ -47,19 +63,8 @@ export default {
type: 'main',
params: ['id', 'virtualmachineid'],
dataView: true
- }, {
- api: 'attachVolume',
- icon: 'paper-clip',
- label: 'Attach Volume',
- params: ['id', 'virtualmachineid'],
- dataView: true
- }, {
- api: 'detachVolume',
- icon: 'link',
- label: 'Detach Volume',
- params: ['id', 'virtualmachineid'],
- dataView: true
- }, {
+ },
+ {
api: 'extractVolume',
icon: 'cloud-download',
label: 'Download Volume',
@@ -76,8 +81,8 @@ export default {
icon: 'delete',
label: 'Delete Volume',
params: ['id'],
- listView: true,
- dataView: true
+ dataView: true,
+ groupAction: true
}
]
},