From eadda2a18b198c430fd0e8527ef5b79c8217329b Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Tue, 21 Jul 2026 11:07:48 +0800 Subject: [PATCH] refactor: extract access mode strings to static ACCESS_MODE constant (#1039) * refactor: extract access mode strings to static ACCESS_MODE constant Signed-off-by: Andy Lee * refactor: destructure ACCESS_MODE variables in CDISettings.vue accessModeOptions * refactor: destructure ACCESS_MODE at top level in all consumer files * fix(lint): reorder imports to top of module in CDISettings, harvesterhci.io.volume, and VirtualMachineVolume --------- Signed-off-by: Andy Lee Co-authored-by: Andy Lee Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> --- pkg/harvester/config/types.js | 7 +++++++ .../edit/harvesterhci.io.storage/CDISettings.vue | 14 +++++++++----- pkg/harvester/edit/harvesterhci.io.volume.vue | 12 +++++++----- .../VirtualMachineVolume/index.vue | 6 ++++-- .../VirtualMachineVolume/type/volume.vue | 8 +++++--- pkg/harvester/mixins/harvester-vm/index.js | 10 ++++++---- 6 files changed, 38 insertions(+), 19 deletions(-) diff --git a/pkg/harvester/config/types.js b/pkg/harvester/config/types.js index 956e26b4..62799a10 100644 --- a/pkg/harvester/config/types.js +++ b/pkg/harvester/config/types.js @@ -15,6 +15,13 @@ export const VOLUME_MODE = { FILE_SYSTEM: 'Filesystem' }; +export const ACCESS_MODE = { + READ_WRITE_MANY: 'ReadWriteMany', + READ_WRITE_ONCE: 'ReadWriteOnce', + READ_ONLY_MANY: 'ReadOnlyMany', + READ_WRITE_ONCE_POD: 'ReadWriteOncePod', +}; + export const NETWORK_PROTOCOL = { IPv4: 'IPv4', IPv6: 'IPv6', diff --git a/pkg/harvester/edit/harvesterhci.io.storage/CDISettings.vue b/pkg/harvester/edit/harvesterhci.io.storage/CDISettings.vue index 86de61c2..e4fb0cb7 100644 --- a/pkg/harvester/edit/harvesterhci.io.storage/CDISettings.vue +++ b/pkg/harvester/edit/harvesterhci.io.storage/CDISettings.vue @@ -1,5 +1,5 @@