mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-01 03:36:04 +08:00
feat: add storage migration operation (#724)
- add storage migration
- add cancel storage migration
Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
This commit is contained in:
@@ -199,6 +199,18 @@ export default class VirtVm extends HarvesterResource {
|
||||
icon: 'icon icon-close',
|
||||
label: this.t('harvester.action.abortMigration')
|
||||
},
|
||||
{
|
||||
action: 'storageMigration',
|
||||
enabled: !!this.actions?.storageMigration,
|
||||
icon: 'icon icon-copy',
|
||||
label: this.t('harvester.action.storageMigration')
|
||||
},
|
||||
{
|
||||
action: 'cancelStorageMigration',
|
||||
enabled: !!this.actions?.cancelStorageMigration,
|
||||
icon: 'icon icon-close',
|
||||
label: this.t('harvester.action.cancelStorageMigration')
|
||||
},
|
||||
{
|
||||
action: 'addHotplugVolume',
|
||||
enabled: !!this.actions?.addVolume,
|
||||
@@ -368,6 +380,13 @@ export default class VirtVm extends HarvesterResource {
|
||||
});
|
||||
}
|
||||
|
||||
storageMigration(resources = this) {
|
||||
this.$dispatch('promptModal', {
|
||||
resources,
|
||||
component: 'HarvesterStorageMigrationDialog'
|
||||
});
|
||||
}
|
||||
|
||||
backupVM(resources = this) {
|
||||
this.$dispatch('promptModal', {
|
||||
resources,
|
||||
@@ -520,6 +539,10 @@ export default class VirtVm extends HarvesterResource {
|
||||
this.doActionGrowl('abortMigration', {});
|
||||
}
|
||||
|
||||
cancelStorageMigration() {
|
||||
this.doActionGrowl('cancelStorageMigration', {});
|
||||
}
|
||||
|
||||
createTemplate(resources = this) {
|
||||
this.$dispatch('promptModal', {
|
||||
resources,
|
||||
|
||||
Reference in New Issue
Block a user