Skip to content

Commit 04a2deb

Browse files
committed
Initial UI form
1 parent f98da37 commit 04a2deb

File tree

5 files changed

+3045
-0
lines changed

5 files changed

+3045
-0
lines changed

api/src/main/java/org/apache/cloudstack/api/command/user/vm/CreateVMFromBackupCmd.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public void create() {
6868
setEntityUuid(vm.getUuid());
6969
}
7070
} catch (Exception e) {
71+
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create vm due to exception: " + e.getMessage());
7172
}
7273
}
7374

ui/public/locales/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2620,6 +2620,7 @@
26202620
"label.bucket.policy": "Bucket Policy",
26212621
"label.usersecretkey": "Secret Key",
26222622
"label.create.bucket": "Create Bucket",
2623+
"label.create.instance.from.backup": "Create new instance from backup",
26232624
"message.acquire.ip.failed": "Failed to acquire IP.",
26242625
"message.action.acquire.ip": "Please confirm that you want to acquire new IP.",
26252626
"message.action.cancel.maintenance": "Your host has been successfully canceled for maintenance. This process can take up to several minutes.",

ui/src/config/section/storage.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,17 @@ export default {
433433
columns: [{ name: (record) => { return record.virtualmachinename } }, 'status', 'size', 'virtualsize', 'type', 'created', 'account', 'domain', 'zone'],
434434
details: ['virtualmachinename', 'id', 'type', 'externalid', 'size', 'virtualsize', 'volumes', 'backupofferingname', 'zone', 'account', 'domain', 'created'],
435435
actions: [
436+
{
437+
api: 'createVMFromBackup',
438+
icon: 'plus-outlined',
439+
docHelp: 'adminguide/virtual_machines.html#restoring-vm-backups',
440+
label: 'label.create.instance.from.backup',
441+
message: 'message.backup.restore',
442+
dataView: true,
443+
popup: true,
444+
show: (record) => { return record.state !== 'Destroyed' },
445+
component: shallowRef(defineAsyncComponent(() => import('@/views/storage/CreateVMFromBackup.vue')))
446+
},
436447
{
437448
api: 'restoreBackup',
438449
icon: 'sync-outlined',

0 commit comments

Comments
 (0)