mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2025-12-13 13:11:43 +00: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:
parent
29b1ab2fb9
commit
feddcd247a
@ -49,9 +49,13 @@ dialog:
|
||||
}
|
||||
protip: "Tip: Hold the {alternateLabel} key while clicking action to bypass this confirmation"
|
||||
stop:
|
||||
message: "Are you sure you want to continue stop the {type} {names}?"
|
||||
message: "Are you sure you want to stop the {type} {names}?"
|
||||
pause:
|
||||
message: "Are you sure you want to continue pause the {type} {names}?"
|
||||
message: "Are you sure you want to pause the {type} {names}?"
|
||||
restart:
|
||||
message: "Are you sure you want to restart the {type} {names}?"
|
||||
softreboot:
|
||||
message: "Are you sure you want to soft reboot the {type} {names}?"
|
||||
promptRemove:
|
||||
title: "Delete {type}"
|
||||
warningMessage: "Deleting the selected {type} permanently removes all resources on {thisOrThese} {type}. This action is irreversible. Do you want to continue?"
|
||||
@ -66,7 +70,6 @@ harvester:
|
||||
tip: 'Upload an icon to replace the Harvester favicon in the browser tab. Max file size is 20KB'
|
||||
productLabel: 'Harvester'
|
||||
modal:
|
||||
|
||||
backup:
|
||||
success: 'Backup { backUpName } has been initiated.'
|
||||
addBackup: Add Backup
|
||||
@ -897,7 +900,7 @@ harvester:
|
||||
releaseTip: Please read the upgrade documentation carefully. You can view details on the <a href="{url}" target="_blank">Harvester Release Notes</a>.
|
||||
checkReady: I have read and understood the upgrade instructions related to this Harvester version.
|
||||
pending: Pending
|
||||
upload:
|
||||
upload:
|
||||
duplicatedFile: The file you are trying to upload already exists.
|
||||
repoInfo:
|
||||
upgradeStatus: Upgrade Status
|
||||
|
||||
@ -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() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user