From 621f86a9f1f24142aa62b1e0d50b7c8576aa1408 Mon Sep 17 00:00:00 2001 From: Sharon Gratch Date: Tue, 19 Nov 2024 20:58:30 +0200 Subject: [PATCH] For VDDK help text - replace the example with a format Reference: https://issues.redhat.com/browse/MTV-1552 To avoid users from using the URL example which was provided for the Vsphere's VDDK help text field, replace it with a format suggestion. This is relevant for the create, edit, tooltip fields for all validaiton statuses (error, success, default). Signed-off-by: Sharon Gratch --- .../validators/provider/vsphere/validateVDDKImage.ts | 8 ++++---- .../provider/vsphere/vsphereProviderValidator.ts | 2 +- .../DetailsSection/components/VDDKDetailsItem.tsx | 2 -- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/forklift-console-plugin/src/modules/Providers/utils/validators/provider/vsphere/validateVDDKImage.ts b/packages/forklift-console-plugin/src/modules/Providers/utils/validators/provider/vsphere/validateVDDKImage.ts index e1f979019..2d49bee62 100644 --- a/packages/forklift-console-plugin/src/modules/Providers/utils/validators/provider/vsphere/validateVDDKImage.ts +++ b/packages/forklift-console-plugin/src/modules/Providers/utils/validators/provider/vsphere/validateVDDKImage.ts @@ -4,7 +4,7 @@ export const validateVDDKImage = (vddkImage: string | number): ValidationMsg => // For a newly opened form where the field is not set yet, set the validation type to default. if (vddkImage === undefined) return { - msg: 'The VDDK image is empty, it is recommended to provide an image, for example: quay.io/kubev2v/vddk:latest .', + msg: 'The VDDK image is empty. It is recommended to provide an image in the format of /vddk: .', type: 'default', }; @@ -18,19 +18,19 @@ export const validateVDDKImage = (vddkImage: string | number): ValidationMsg => if (trimmedVddkImage === '') return { - msg: 'The VDDK image is empty, it is recommended to provide an image, for example: quay.io/kubev2v/vddk:latest .', + msg: 'The VDDK image is empty. It is recommended to provide an image in the format of /vddk: .', type: 'error', }; if (!isValidTrimmedVddkImage) { return { type: 'error', - msg: 'The VDDK image is invalid. VDDK image should be a valid container image, for example: quay.io/kubev2v/vddk:latest .', + msg: 'The VDDK image is invalid. VDDK image should be a valid container image in the format of /vddk: .', }; } return { type: 'success', - msg: 'VMware Virtual Disk Development Kit (VDDK) image, for example: quay.io/kubev2v/vddk:latest .', + msg: 'VMware Virtual Disk Development Kit (VDDK) image in the format of /vddk: .', }; }; diff --git a/packages/forklift-console-plugin/src/modules/Providers/utils/validators/provider/vsphere/vsphereProviderValidator.ts b/packages/forklift-console-plugin/src/modules/Providers/utils/validators/provider/vsphere/vsphereProviderValidator.ts index 3cf3893d1..6447e6064 100644 --- a/packages/forklift-console-plugin/src/modules/Providers/utils/validators/provider/vsphere/vsphereProviderValidator.ts +++ b/packages/forklift-console-plugin/src/modules/Providers/utils/validators/provider/vsphere/vsphereProviderValidator.ts @@ -22,7 +22,7 @@ export function vsphereProviderValidator(provider: V1beta1Provider): ValidationM if (emptyVddkInitImage === 'yes' && vddkInitImage === '') { return { - msg: 'The VDDK image is empty, it is recommended to provide an image, for example: quay.io/kubev2v/vddk:latest .', + msg: 'The VDDK image is empty. It is recommended to provide an image in the format of /vddk: .', type: 'warning', }; } diff --git a/packages/forklift-console-plugin/src/modules/Providers/views/details/components/DetailsSection/components/VDDKDetailsItem.tsx b/packages/forklift-console-plugin/src/modules/Providers/views/details/components/DetailsSection/components/VDDKDetailsItem.tsx index 2af09ca90..e3906d3ac 100644 --- a/packages/forklift-console-plugin/src/modules/Providers/views/details/components/DetailsSection/components/VDDKDetailsItem.tsx +++ b/packages/forklift-console-plugin/src/modules/Providers/views/details/components/DetailsSection/components/VDDKDetailsItem.tsx @@ -26,8 +26,6 @@ export const VDDKDetailsItem: React.FC = ({ valid container image path in the format of{' '} registry_route_or_server_path/vddk:‹tag›.

- For example: quay.io/kubev2v/example:latest.
-
It is strongly recommended to specify a VDDK init image to accelerate migrations. );