From 908d96fcab6e4ea085996bb32b3b1714fd2a180f Mon Sep 17 00:00:00 2001 From: Francesco Torchia Date: Tue, 5 Nov 2024 12:24:16 +0100 Subject: [PATCH 1/5] Add longhorn support message in VM clone dialog Signed-off-by: Francesco Torchia (cherry picked from commit d4c845206051f63389f20c847952e187758afd38) --- pkg/harvester/dialog/CloneVmDialog.vue | 26 ++++++++++++------- pkg/harvester/l10n/en-us.yaml | 2 ++ .../models/kubevirt.io.virtualmachine.js | 9 ++----- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/pkg/harvester/dialog/CloneVmDialog.vue b/pkg/harvester/dialog/CloneVmDialog.vue index a93de39dc20..6930319f241 100644 --- a/pkg/harvester/dialog/CloneVmDialog.vue +++ b/pkg/harvester/dialog/CloneVmDialog.vue @@ -91,15 +91,22 @@ export default {
@@ -109,6 +116,7 @@ export default { support the clone action. exportImage: title: Export to Image name: Name diff --git a/pkg/harvester/models/kubevirt.io.virtualmachine.js b/pkg/harvester/models/kubevirt.io.virtualmachine.js index ee01a8816d4..616d134d8b3 100644 --- a/pkg/harvester/models/kubevirt.io.virtualmachine.js +++ b/pkg/harvester/models/kubevirt.io.virtualmachine.js @@ -91,16 +91,11 @@ export default class VirtVm extends HarvesterResource { get availableActions() { let out = super._availableActions; - // VM attached with Longhorn V2 volume doesn't support clone feature - if (this.longhornV2Volumes.length > 0) { - out = out.filter(action => action.action !== 'goToClone'); - } else { - const clone = out.find(action => action.action === 'goToClone'); + const clone = out.find(action => action.action === 'goToClone'); if (clone) { clone.action = 'goToCloneVM'; - } - } + } return [ { From ceb33f16e2b51931fbfa41cf1430dfd93e96d651 Mon Sep 17 00:00:00 2001 From: Francesco Torchia Date: Thu, 14 Nov 2024 16:11:57 +0100 Subject: [PATCH 2/5] Add longhorn support message in Volumes Export,Snapshot,Clone dialogs Signed-off-by: Francesco Torchia (cherry picked from commit 0b09c4bf3e66032bbcb7ad800551f2715346db43) --- .../dialog/HarvesterExportImageDialog.vue | 50 +++++++++++-------- pkg/harvester/dialog/SnapshotDialog.vue | 6 ++- pkg/harvester/dialog/VolumeCloneDialog.vue | 24 ++++++--- pkg/harvester/l10n/en-us.yaml | 7 +++ .../models/harvester/persistentvolumeclaim.js | 21 ++------ 5 files changed, 62 insertions(+), 46 deletions(-) diff --git a/pkg/harvester/dialog/HarvesterExportImageDialog.vue b/pkg/harvester/dialog/HarvesterExportImageDialog.vue index 1e4a3797fcc..e48e779cb70 100644 --- a/pkg/harvester/dialog/HarvesterExportImageDialog.vue +++ b/pkg/harvester/dialog/HarvesterExportImageDialog.vue @@ -141,27 +141,34 @@ export default {
@@ -171,6 +178,7 @@ export default {