diff --git a/src/components/view/DetailsTab.vue b/src/components/view/DetailsTab.vue index 806bbb87f..418f4ef60 100644 --- a/src/components/view/DetailsTab.vue +++ b/src/components/view/DetailsTab.vue @@ -28,6 +28,11 @@ {{ service.name }} : {{ service.provider[0].name }} +
+
+ {{ volume.type }} - {{ volume.path }} ({{ parseFloat(volume.size / (1024.0 * 1024.0 * 1024.0)).toFixed(1) }} GB) +
+
{{ resource[item] }}
diff --git a/src/components/view/InfoCard.vue b/src/components/view/InfoCard.vue index 35a609ac8..516188f7f 100644 --- a/src/components/view/InfoCard.vue +++ b/src/components/view/InfoCard.vue @@ -29,7 +29,7 @@

- {{ resource.displayname || resource.displaytext || resource.name || resource.hostname || resource.username || resource.ipaddress }} + {{ resource.displayname || resource.displaytext || resource.name || resource.hostname || resource.username || resource.ipaddress || resource.virtualmachinename }}

@@ -214,8 +214,8 @@
{{ $t('disksize') }}
- {{ (resource.volumes.reduce((total, item) => total += item.size, 0) / (1024 * 1024 * 1024.0)).toFixed(2) }} GB Storage - {{ resource.sizegb }} + {{ (resource.volumes.reduce((total, item) => total += item.size, 0) / (1024 * 1024 * 1024.0)).toFixed(2) }} GB Storage + {{ resource.sizegb || (resource.size/1024.0) }}
Read {{ toSize(resource.diskkbsread) }} @@ -332,6 +332,17 @@ {{ resource.vpcname || resource.vpcid }}
+
+
{{ $t('affinitygroup') }}
+ + + {{ group.name }} + , + +
{{ $t('serviceofferingname') }}
@@ -353,6 +364,11 @@ {{ resource.diskofferingname || resource.diskofferingid }}
+
+
{{ $t('backupofferingid') }}
+ + {{ resource.backupofferingname || resource.backupofferingid }} +
{{ $t('networkofferingid') }}
@@ -441,16 +457,6 @@ {{ resource.created }}
-
- - - {{ group.name }} - , - -
diff --git a/src/config/section/compute.js b/src/config/section/compute.js index 8da60c8d2..6d56fb035 100644 --- a/src/config/section/compute.js +++ b/src/config/section/compute.js @@ -45,6 +45,10 @@ export default { name: 'vmsnapshot', title: 'VM Snapshots', param: 'virtualmachineid' + }, { + name: 'backup', + title: 'Backups', + param: 'virtualmachineid' }, { name: 'affinitygroup', title: 'Affinity Groups', @@ -125,6 +129,61 @@ export default { } } }, + { + api: 'assignVirtualMachineToBackupOffering', + icon: 'folder-add', + label: 'Assign VM to Backup Offering', + dataView: true, + args: ['virtualmachineid', 'backupofferingid'], + show: (record) => { return !record.backupofferingid }, + mapping: { + virtualmachineid: { + value: (record, params) => { return record.id } + } + } + }, + { + api: 'createBackup', + icon: 'cloud-upload', + label: 'Create Backup', + dataView: true, + args: ['virtualmachineid'], + show: (record) => { return record.backupofferingid }, + mapping: { + virtualmachineid: { + value: (record, params) => { return record.id } + } + } + }, + { + api: 'createBackupSchedule', + icon: 'schedule', + label: 'Configure Backup Schedule', + dataView: true, + args: ['virtualmachineid', 'intervaltype', 'schedule', 'timezone'], + show: (record) => { return record.backupofferingid }, + mapping: { + virtualmachineid: { + value: (record, params) => { return record.id } + }, + intervaltype: { + options: ['HOURLY', 'DAILY', 'WEEKLY', 'MONTHLY'] + } + } + }, + { + api: 'removeVirtualMachineFromBackupOffering', + icon: 'scissor', + label: 'Remove VM from Backup Offering', + dataView: true, + args: ['virtualmachineid', 'forced'], + show: (record) => { return record.backupofferingid }, + mapping: { + virtualmachineid: { + value: (record, params) => { return record.id } + } + } + }, { api: 'attachIso', icon: 'paper-clip', diff --git a/src/config/section/offering.js b/src/config/section/offering.js index 09e3780d2..263b467db 100644 --- a/src/config/section/offering.js +++ b/src/config/section/offering.js @@ -132,6 +132,26 @@ export default { dataView: true }] }, + { + name: 'backupoffering', + title: 'Backup Offerings', + icon: 'cloud-upload', + permission: ['listBackupOfferings'], + columns: ['name', 'description', 'zoneid'], + details: ['name', 'id', 'description', 'externalid', 'zone', 'created'], + actions: [{ + api: 'importBackupOffering', + icon: 'plus', + label: 'Import Offering', + listView: true, + args: ['name', 'description', 'zoneid', 'externalid'] + }, { + api: 'deleteBackupOffering', + icon: 'delete', + label: 'Delete Offering', + dataView: true + }] + }, { name: 'networkoffering', title: 'Network Offerings', diff --git a/src/config/section/storage.js b/src/config/section/storage.js index f2aa43b70..85ae4d534 100644 --- a/src/config/section/storage.js +++ b/src/config/section/storage.js @@ -251,6 +251,58 @@ export default { } } ] + }, + { + name: 'backup', + title: 'Backups', + icon: 'cloud-upload', + permission: ['listBackups'], + columns: [{ name: (record) => { return record.virtualmachinename } }, 'status', 'type', 'created', 'account', 'zone'], + details: ['virtualmachinename', 'id', 'type', 'externalid', 'size', 'virtualsize', 'volumes', 'backupofferingname', 'zone', 'account', 'domain', 'created'], + actions: [ + { + api: 'restoreBackup', + icon: 'sync', + label: 'Restore Backup', + dataView: true + }, + { + api: 'restoreVolumeFromBackupAndAttachToVM', + icon: 'paper-clip', + label: 'Restore Volume and Attach', + dataView: true, + args: ['backupid', 'virtualmachineid', 'volumeid'], + mapping: { + backupid: { + value: (record) => { return record.id } + }, + volumeid: { + options: ['todo: handle custom volume ID'] + } + } + }, + { + api: 'removeVirtualMachineFromBackupOffering', + icon: 'scissor', + label: 'Expunge Offering Assignment and Delete Backups', + dataView: true, + args: ['forced', 'virtualmachineid'], + mapping: { + forced: { + value: (record) => { return true } + }, + virtualmachineid: { + value: (record) => { return record.virtualmachineid } + } + } + }, + { + api: 'deleteBackup', + icon: 'delete', + label: 'Delete Backup', + dataView: true + } + ] } ] } diff --git a/src/locales/en.json b/src/locales/en.json index 7bfecb713..3301eab18 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -74,6 +74,7 @@ "add-scaleUpcondition": "Add", "address": "Address", "admin": "Domain Admin", +"affinitygroup": "Affinity Group", "agentPassword": "Agent Password", "agentPort": "Agent Port", "agentUsername": "Agent Username", @@ -95,6 +96,7 @@ "baremetalCpuCores": "# of CPU Cores", "baremetalMAC": "Host MAC", "baremetalMemory": "Memory (in MB)", +"backupofferingid": "Backup Offering", "bcfdeviceid": "ID", "bladeid": "Blade ID", "bootable": "Bootable", @@ -1035,7 +1037,7 @@ "volumegroup": "Volume Group", "volumeids": "Volumes to be deleted", "volumename": "Volume Name", -"volumes": "Volumes to be deleted", +"volumes": "Volumes", "volumetotal": "Volume", "volume.volumeFileUpload.description": "Click or drag file to this area to upload", "vpcLimit": "VPC limits",