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"
|
protip: "Tip: Hold the {alternateLabel} key while clicking action to bypass this confirmation"
|
||||||
stop:
|
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:
|
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:
|
promptRemove:
|
||||||
title: "Delete {type}"
|
title: "Delete {type}"
|
||||||
warningMessage: "Deleting the selected {type} permanently removes all resources on {thisOrThese} {type}. This action is irreversible. Do you want to continue?"
|
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'
|
tip: 'Upload an icon to replace the Harvester favicon in the browser tab. Max file size is 20KB'
|
||||||
productLabel: 'Harvester'
|
productLabel: 'Harvester'
|
||||||
modal:
|
modal:
|
||||||
|
|
||||||
backup:
|
backup:
|
||||||
success: 'Backup { backUpName } has been initiated.'
|
success: 'Backup { backUpName } has been initiated.'
|
||||||
addBackup: Add Backup
|
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>.
|
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.
|
checkReady: I have read and understood the upgrade instructions related to this Harvester version.
|
||||||
pending: Pending
|
pending: Pending
|
||||||
upload:
|
upload:
|
||||||
duplicatedFile: The file you are trying to upload already exists.
|
duplicatedFile: The file you are trying to upload already exists.
|
||||||
repoInfo:
|
repoInfo:
|
||||||
upgradeStatus: Upgrade Status
|
upgradeStatus: Upgrade Status
|
||||||
|
|||||||
@ -131,11 +131,12 @@ export default class VirtVm extends HarvesterResource {
|
|||||||
label: this.t('harvester.action.unpause')
|
label: this.t('harvester.action.unpause')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
action: 'restartVM',
|
action: 'restartVM',
|
||||||
enabled: !!this.actions?.restart,
|
enabled: !!this.actions?.restart,
|
||||||
icon: 'icon icon-refresh',
|
icon: 'icon icon-refresh',
|
||||||
label: this.t('harvester.action.restart'),
|
label: this.t('harvester.action.restart'),
|
||||||
bulkable: true
|
bulkable: true,
|
||||||
|
bulkAction: 'restartVM'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
action: 'softrebootVM',
|
action: 'softrebootVM',
|
||||||
@ -312,12 +313,22 @@ export default class VirtVm extends HarvesterResource {
|
|||||||
this.metadata.annotations[HCI_ANNOTATIONS.VOLUME_CLAIM_TEMPLATE] = JSON.stringify(deleteDataSource);
|
this.metadata.annotations[HCI_ANNOTATIONS.VOLUME_CLAIM_TEMPLATE] = JSON.stringify(deleteDataSource);
|
||||||
}
|
}
|
||||||
|
|
||||||
restartVM() {
|
restartVM(resources = this) {
|
||||||
this.doActionGrowl('restart', {});
|
this.$dispatch('promptModal', {
|
||||||
|
resources,
|
||||||
|
action: 'restart',
|
||||||
|
warningMessageKey: 'dialog.confirmExecution.restart.message',
|
||||||
|
component: 'ConfirmExecutionDialog'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
softrebootVM() {
|
softrebootVM(resources = this) {
|
||||||
this.doActionGrowl('softreboot', {});
|
this.$dispatch('promptModal', {
|
||||||
|
resources,
|
||||||
|
action: 'softreboot',
|
||||||
|
warningMessageKey: 'dialog.confirmExecution.softreboot.message',
|
||||||
|
component: 'ConfirmExecutionDialog'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
openLogs() {
|
openLogs() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user