Skip to content

Commit

Permalink
Merge pull request #1459 from sgratch/replace-VDDK-image-field-hint-s…
Browse files Browse the repository at this point in the history
…ection-with-rephrased-warning-alert

Replace VDDK image hint sections with rephrased warning alert sections
  • Loading branch information
metalice authored Feb 12, 2025
2 parents 0948d16 + b8f03ac commit 38d9eed
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@
"Show archived": "Show archived",
"Show the welcome card": "Show the welcome card",
"Skip certificate validation": "Skip certificate validation",
"Skip VMware Virtual Disk Development Kit (VDDK) SDK acceleration (migration might be slow).": "Skip VMware Virtual Disk Development Kit (VDDK) SDK acceleration (migration might be slow).",
"Skip VMware Virtual Disk Development Kit (VDDK) SDK acceleration (not recommended).": "Skip VMware Virtual Disk Development Kit (VDDK) SDK acceleration (not recommended).",
"Snapshot polling interval (seconds)": "Snapshot polling interval (seconds)",
"Some VMs Failed": "Some VMs Failed",
"Something is wrong, the data was not loaded due to an error, please try to reload the page.": "Something is wrong, the data was not loaded due to an error, please try to reload the page.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useForkliftTranslation } from 'src/utils/i18n';

import { Modify, ProviderModel, V1beta1Provider } from '@kubev2v/types';
import { K8sModel } from '@openshift-console/dynamic-plugin-sdk';
import { Checkbox, Hint, HintBody, TextInput } from '@patternfly/react-core';
import { Alert, Checkbox, TextInput } from '@patternfly/react-core';

import { VDDKHelperTextShort } from '../../utils/components/VDDKHelperText';
import { validateVDDKImage } from '../../utils/validators';
Expand Down Expand Up @@ -46,21 +46,18 @@ export const EditProviderVDDKImage: React.FC<EditProviderVDDKImageProps> = (prop
};

const body = (
<Hint>
<HintBody>
<VDDKHelperTextShort />
<Checkbox
className="forklift-section-provider-edit-vddk-checkbox"
label={t(
'Skip VMware Virtual Disk Development Kit (VDDK) SDK acceleration (migration might be slow).',
)}
isChecked={isEmptyImage}
onChange={(e, v) => onChange(v, e)}
id="emptyVddkInitImage"
name="emptyVddkInitImage"
/>
</HintBody>
</Hint>
<Alert variant="warning" isInline title={<VDDKHelperTextShort />}>
<Checkbox
className="forklift-section-provider-edit-vddk-checkbox"
label={t(
'Skip VMware Virtual Disk Development Kit (VDDK) SDK acceleration (not recommended).',
)}
isChecked={isEmptyImage}
onChange={(e, v) => onChange(v, e)}
id="emptyVddkInitImage"
name="emptyVddkInitImage"
/>
</Alert>
);

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ export const VDDKHelperText: React.FC = () => (
<p>
The Migration Toolkit for Virtualization (MTV) uses the VMware Virtual Disk Development Kit
(VDDK) SDK to accelerate transferring virtual disks from VMware vSphere. Therefore, creating a
VDDK image, although optional, is highly recommended.
VDDK image, although optional, is highly recommended. Using MTV without VDDK is not
recommended and could result in significantly lower migration speeds
</p>
<br />

<p>
To accelerate migrations, we recommend to create a VDDK init image. Learn more about{' '}
To accelerate migration and reduce the risk of a plan failing, it is strongly recommended to
create a VDDK init image. Learn more about{' '}
<ExternalLink isInline href={CREATE_VDDK_HELP_LINK}>
Creating a VDDK image
</ExternalLink>
Expand All @@ -30,7 +32,8 @@ export const VDDKHelperText: React.FC = () => (
export const VDDKHelperTextShort: React.FC = () => (
<ForkliftTrans>
<p>
To accelerate migrations, we recommend to create a VDDK init image. Learn more about{' '}
It is strongly recommended to use a VDDK image. Not using a VDDK image could result in
significantly lower migration speeds or a plan failing. For more information, see{' '}
<ExternalLink isInline href={CREATE_VDDK_HELP_LINK}>
Creating a VDDK image
</ExternalLink>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 in the format of <registry_route_or_server_path>/vddk:<tag> .',
msg: 'The VDDK image is empty. It is strongly recommended to provide an image using the following format: <registry_route_or_server_path>/vddk:<tag> .',
type: 'default',
};

Expand All @@ -18,7 +18,7 @@ export const validateVDDKImage = (vddkImage: string | number): ValidationMsg =>

if (trimmedVddkImage === '')
return {
msg: 'The VDDK image is empty. It is recommended to provide an image in the format of <registry_route_or_server_path>/vddk:<tag> .',
msg: 'The VDDK image is empty. It is strongly recommended to provide an image using the following format: <registry_route_or_server_path>/vddk:<tag> .',
type: 'error',
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 in the format of <registry_route_or_server_path>/vddk:<tag> .',
msg: 'The VDDK image is empty. It is strongly recommended to provide an image using the following format: <registry_route_or_server_path>/vddk:<tag> .',
type: 'warning',
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { useForkliftTranslation } from 'src/utils/i18n';

import { FormGroupWithHelpText } from '@kubev2v/common';
import { V1beta1Provider } from '@kubev2v/types';
import { Checkbox, Form, Hint, HintBody, Popover, Radio, TextInput } from '@patternfly/react-core';
import { Alert, Checkbox, Form, Popover, Radio, TextInput } from '@patternfly/react-core';
import HelpIcon from '@patternfly/react-icons/dist/esm/icons/help-icon';
export interface EsxiProviderCreateFormProps {
provider: V1beta1Provider;
Expand Down Expand Up @@ -210,21 +210,18 @@ export const EsxiProviderCreateForm: React.FC<EsxiProviderCreateFormProps> = ({
</Popover>
}
>
<Hint>
<HintBody>
<VDDKHelperTextShort />
<Checkbox
className="forklift-section-provider-edit-vddk-checkbox"
label={t(
'Skip VMware Virtual Disk Development Kit (VDDK) SDK acceleration (migration might be slow).',
)}
isChecked={emptyVddkInitImage === 'yes'}
onChange={(e, v) => onChangEmptyVddk(v, e)}
id="emptyVddkInitImage"
name="emptyVddkInitImage"
/>
</HintBody>
</Hint>
<Alert variant="warning" isInline title={<VDDKHelperTextShort />}>
<Checkbox
className="forklift-section-provider-edit-vddk-checkbox"
label={t(
'Skip VMware Virtual Disk Development Kit (VDDK) SDK acceleration (not recommended).',
)}
isChecked={emptyVddkInitImage === 'yes'}
onChange={(e, v) => onChangEmptyVddk(v, e)}
id="emptyVddkInitImage"
name="emptyVddkInitImage"
/>
</Alert>
<div className="forklift-section-provider-edit-vddk-input">
<TextInput
spellCheck="false"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { useForkliftTranslation } from 'src/utils/i18n';

import { FormGroupWithHelpText } from '@kubev2v/common';
import { V1beta1Provider } from '@kubev2v/types';
import { Checkbox, Form, Hint, HintBody, Popover, Radio, TextInput } from '@patternfly/react-core';
import { Alert, Checkbox, Form, Popover, Radio, TextInput } from '@patternfly/react-core';
import HelpIcon from '@patternfly/react-icons/dist/esm/icons/help-icon';

export interface VCenterProviderCreateFormProps {
Expand Down Expand Up @@ -211,21 +211,19 @@ export const VCenterProviderCreateForm: React.FC<VCenterProviderCreateFormProps>
</Popover>
}
>
<Hint>
<HintBody>
<VDDKHelperTextShort />
<Checkbox
className="forklift-section-provider-edit-vddk-checkbox"
label={t(
'Skip VMware Virtual Disk Development Kit (VDDK) SDK acceleration (migration might be slow).',
)}
isChecked={emptyVddkInitImage === 'yes'}
onChange={(e, v) => onChangEmptyVddk(v, e)}
id="emptyVddkInitImage"
name="emptyVddkInitImage"
/>
</HintBody>
</Hint>
<Alert variant="warning" isInline title={<VDDKHelperTextShort />}>
<Checkbox
className="forklift-section-provider-edit-vddk-checkbox"
label={t(
'Skip VMware Virtual Disk Development Kit (VDDK) SDK acceleration (not recommended).',
)}
isChecked={emptyVddkInitImage === 'yes'}
onChange={(e, v) => onChangEmptyVddk(v, e)}
id="emptyVddkInitImage"
name="emptyVddkInitImage"
/>
</Alert>

<div className="forklift-section-provider-edit-vddk-input">
<TextInput
spellCheck="false"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export const VDDKDetailsItem: React.FC<ProviderDetailsItemProps> = ({
valid container image path in the format of{' '}
<strong>registry_route_or_server_path/vddk:&#8249;tag&#8250;</strong>.<br />
<br />
To accelerate migrations, we recommend to specify a VDDK init image.
To accelerate migration and reduce the risk of a plan failing, it is strongly recommended to
specify a VDDK init image.
</ForkliftTrans>
);

Expand Down

0 comments on commit 38d9eed

Please sign in to comment.