mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-01 03:36:04 +08:00
feat: add confirmation modal for vm soft reboot and restart (#327)
* feat: add confirmation for vm softreboot and restart Signed-off-by: Yi-Ya Chen <yiya.chen@suse.com> * refactor: update wordings Signed-off-by: Yi-Ya Chen <yiya.chen@suse.com> * feat: handle bulk action Signed-off-by: Yi-Ya Chen <yiya.chen@suse.com> --------- Signed-off-by: Yi-Ya Chen <yiya.chen@suse.com>
This commit is contained in:
@@ -131,11 +131,12 @@ export default class VirtVm extends HarvesterResource {
|
||||
label: this.t('harvester.action.unpause')
|
||||
},
|
||||
{
|
||||
action: 'restartVM',
|
||||
enabled: !!this.actions?.restart,
|
||||
icon: 'icon icon-refresh',
|
||||
label: this.t('harvester.action.restart'),
|
||||
bulkable: true
|
||||
action: 'restartVM',
|
||||
enabled: !!this.actions?.restart,
|
||||
icon: 'icon icon-refresh',
|
||||
label: this.t('harvester.action.restart'),
|
||||
bulkable: true,
|
||||
bulkAction: 'restartVM'
|
||||
},
|
||||
{
|
||||
action: 'softrebootVM',
|
||||
@@ -312,12 +313,22 @@ export default class VirtVm extends HarvesterResource {
|
||||
this.metadata.annotations[HCI_ANNOTATIONS.VOLUME_CLAIM_TEMPLATE] = JSON.stringify(deleteDataSource);
|
||||
}
|
||||
|
||||
restartVM() {
|
||||
this.doActionGrowl('restart', {});
|
||||
restartVM(resources = this) {
|
||||
this.$dispatch('promptModal', {
|
||||
resources,
|
||||
action: 'restart',
|
||||
warningMessageKey: 'dialog.confirmExecution.restart.message',
|
||||
component: 'ConfirmExecutionDialog'
|
||||
});
|
||||
}
|
||||
|
||||
softrebootVM() {
|
||||
this.doActionGrowl('softreboot', {});
|
||||
softrebootVM(resources = this) {
|
||||
this.$dispatch('promptModal', {
|
||||
resources,
|
||||
action: 'softreboot',
|
||||
warningMessageKey: 'dialog.confirmExecution.softreboot.message',
|
||||
component: 'ConfirmExecutionDialog'
|
||||
});
|
||||
}
|
||||
|
||||
openLogs() {
|
||||
|
||||
Reference in New Issue
Block a user