diff --git a/pkg/harvester/dialog/ConfirmExecutionDialog.vue b/pkg/harvester/dialog/ConfirmExecutionDialog.vue
new file mode 100644
index 00000000..1e180c5c
--- /dev/null
+++ b/pkg/harvester/dialog/ConfirmExecutionDialog.vue
@@ -0,0 +1,173 @@
+
+
+
+
+
+
+ {{ t('dialog.confirmExecution.title') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pkg/harvester/l10n/en-us.yaml b/pkg/harvester/l10n/en-us.yaml
index db4e5040..cf9d09f9 100644
--- a/pkg/harvester/l10n/en-us.yaml
+++ b/pkg/harvester/l10n/en-us.yaml
@@ -38,6 +38,21 @@ asyncButton:
success: Restarted
waiting: Restarting…
+dialog:
+ confirmExecution:
+ title: Are you sure?
+ andOthers: |-
+ {count, plural,
+ =0 {}
+ =1 { and one other }
+ other { and {count} other }
+ }
+ 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}?"
+ pause:
+ message: "Are you sure you want to continue pause the {type} {names}?"
+
harvester:
productLabel: 'Harvester'
modal:
@@ -861,14 +876,14 @@ harvester:
doc: Read the documentation before starting the upgrade process. Ensure that you complete procedures that are relevant to your environment and the version you are upgrading to.
tip: Unmet system requirements and incorrectly performed procedures may cause complete upgrade failure and other issues that require manual workarounds.
moreNotes: For more details about the release notes, please visit -
-
+
schedule:
label: Virtual Machine Schedules
createTitle: Create Schedule
createButtonText: Create Schedule
scheduleType: Virtual Machine Schedule Type
cron: Cron Schedule
- detail:
+ detail:
namespace: Namespace
sourceVM: Source Virtual Machine
tabs:
@@ -878,12 +893,12 @@ harvester:
message:
noSetting:
suffix: before creating a backup schedule
- retain:
+ retain:
label: Retain
count: Count
- tooltip: Number of up-to-date VM backups to retain. Maximum to 250, minimum to 2.
+ tooltip: Number of up-to-date VM backups to retain. Maximum to 250, minimum to 2.
maxFailure:
- label: Max Failure
+ label: Max Failure
count: Count
tooltip: Max number of consecutive failed backups that could be tolerated. If reach this threshold, Harvester controller will suspend the schedule job. This value should less than retain count
virtualMachine:
diff --git a/pkg/harvester/models/kubevirt.io.virtualmachine.js b/pkg/harvester/models/kubevirt.io.virtualmachine.js
index 2e05d306..24b201d6 100644
--- a/pkg/harvester/models/kubevirt.io.virtualmachine.js
+++ b/pkg/harvester/models/kubevirt.io.virtualmachine.js
@@ -102,11 +102,13 @@ export default class VirtVm extends HarvesterResource {
return [
{
- action: 'stopVM',
- enabled: !!this.actions?.stop,
- icon: 'icon icon-close',
- label: this.t('harvester.action.stop'),
- bulkable: true
+ action: 'stopVM',
+ altAction: 'altStopVM',
+ enabled: !!this.actions?.stop,
+ icon: 'icon icon-close',
+ label: this.t('harvester.action.stop'),
+ bulkable: true,
+ bulkAction: 'stopVM',
},
{
action: 'forceStop',
@@ -116,10 +118,11 @@ export default class VirtVm extends HarvesterResource {
bulkable: true
},
{
- action: 'pauseVM',
- enabled: !!this.actions?.pause,
- icon: 'icon icon-pause',
- label: this.t('harvester.action.pause')
+ action: 'pauseVM',
+ altAction: 'altPauseVM',
+ enabled: !!this.actions?.pause,
+ icon: 'icon icon-pause',
+ label: this.t('harvester.action.pause')
},
{
action: 'unpauseVM',
@@ -402,7 +405,16 @@ export default class VirtVm extends HarvesterResource {
return node?.id;
}
- pauseVM() {
+ pauseVM(resources = this) {
+ this.$dispatch('promptModal', {
+ resources,
+ action: 'pause',
+ warningMessageKey: 'dialog.confirmExecution.pause.message',
+ component: 'ConfirmExecutionDialog'
+ });
+ }
+
+ altPauseVM() {
this.doActionGrowl('pause', {});
}
@@ -417,7 +429,16 @@ export default class VirtVm extends HarvesterResource {
this.doActionGrowl('unpause', {});
}
- stopVM() {
+ stopVM(resources = this) {
+ this.$dispatch('promptModal', {
+ resources,
+ action: 'stop',
+ warningMessageKey: 'dialog.confirmExecution.stop.message',
+ component: 'ConfirmExecutionDialog'
+ });
+ }
+
+ altStopVM() {
this.doActionGrowl('stop', {});
}