From af52df0ba0161fc1933aa3051184ba93c585a41c Mon Sep 17 00:00:00 2001 From: Andy Lee Date: Fri, 15 May 2026 12:03:20 +0800 Subject: [PATCH] fix: add alternative action for VM restart and soft reboot (#868) * fix: add alternative action for VM restart and soft reboot Signed-off-by: Andy Lee * refactor: fix alignment Signed-off-by: Andy Lee --------- Signed-off-by: Andy Lee --- pkg/harvester/models/kubevirt.io.virtualmachine.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pkg/harvester/models/kubevirt.io.virtualmachine.js b/pkg/harvester/models/kubevirt.io.virtualmachine.js index fa7b1af1..18337e28 100644 --- a/pkg/harvester/models/kubevirt.io.virtualmachine.js +++ b/pkg/harvester/models/kubevirt.io.virtualmachine.js @@ -164,6 +164,7 @@ export default class VirtVm extends HarvesterResource { }, { action: 'restartVM', + altAction: 'altRestartVM', enabled: !!this.actions?.restart, icon: 'icon icon-refresh', label: this.t('harvester.action.restart'), @@ -171,10 +172,11 @@ export default class VirtVm extends HarvesterResource { bulkAction: 'restartVM' }, { - action: 'softrebootVM', - enabled: !!this.actions?.softreboot, - icon: 'icon icon-pipeline', - label: this.t('harvester.action.softreboot') + action: 'softrebootVM', + altAction: 'doSoftReboot', + enabled: !!this.actions?.softreboot, + icon: 'icon icon-pipeline', + label: this.t('harvester.action.softreboot') }, { action: 'startVM', @@ -371,6 +373,10 @@ export default class VirtVm extends HarvesterResource { this.metadata.annotations[HCI_ANNOTATIONS.VOLUME_CLAIM_TEMPLATE] = JSON.stringify(deleteDataSource); } + altRestartVM() { + this.doActionGrowl('restart', {}); + } + restartVM(resources = this) { this.$dispatch('promptModal', { resources,