Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CNV-18014: Update text in Add volume modal #1056

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions locales/en/plugin__kubevirt-plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"--- Select {{ dsLabel }} name ---": "--- Select {{ dsLabel }} name ---",
"--- Select {{dsLabel}} project ---": "--- Select {{dsLabel}} project ---",
"--- Select network interface ---": "--- Select network interface ---",
"--- Select PersistentVolumeClaim name ---": "--- Select PersistentVolumeClaim name ---",
"--- Select PersistentVolumeClaim project ---": "--- Select PersistentVolumeClaim project ---",
"--- Select project ---": "--- Select project ---",
"--- Select PVC name ---": "--- Select PVC name ---",
"--- Select PVC project ---": "--- Select PVC project ---",
"--- Select secret ---": "--- Select secret ---",
"--- Select sysprep ---": "--- Select sysprep ---",
", {{prefferedQualifiedNodesSize}} matching preferred Nodes found": ", {{prefferedQualifiedNodesSize}} matching preferred Nodes found",
Expand Down Expand Up @@ -309,8 +309,7 @@
"Decrement": "Decrement",
"Dedicated resources": "Dedicated resources",
"Default": "Default",
"Default Instancetype": "Default Instancetype",
"Default preference": "Default preference",
"Default InstanceType": "Default InstanceType",
"Default Templates": "Default Templates",
"Default value for this parameter": "Default value for this parameter",
"Default value type": "Default value type",
Expand Down Expand Up @@ -395,6 +394,7 @@
"Edit secret": "Edit secret",
"Edit the disk or contact your cluster admin for further details.": "Edit the disk or contact your cluster admin for further details.",
"Edit the disk or contact your cluster admin for further details._plural": "Edit the disk or contact your cluster admin for further details.",
"Edit volume parameters": "Edit volume parameters",
"Edit workload profile": "Edit workload profile",
"Edit YAML": "Edit YAML",
"Editing the DataSource will affect <2>all templates</2> that are currently using this DataSource.": "Editing the DataSource will affect <2>all templates</2> that are currently using this DataSource.",
Expand Down Expand Up @@ -481,7 +481,7 @@
"Info": "Info",
"installation iso of Microsoft Windows 10 ": "installation iso of Microsoft Windows 10 ",
"Installed version": "Installed version",
"Instancetype": "Instancetype",
"InstanceType": "InstanceType",
"InstanceTypes": "InstanceTypes",
"Interface": "Interface",
"Interface Type": "Interface Type",
Expand All @@ -500,7 +500,6 @@
"Label selectors let you select Nodes based on the value of one or more labels.": "Label selectors let you select Nodes based on the value of one or more labels.",
"Labels": "Labels",
"Labels cannot be edited for Red Hat templates": "Labels cannot be edited for Red Hat templates",
"Labels for the bootable volume": "Labels for the bootable volume",
"Labels help you organize and select resources. Adding labels below will let you query for objects that have similar, overlapping or dissimilar labels.": "Labels help you organize and select resources. Adding labels below will let you query for objects that have similar, overlapping or dissimilar labels.",
"large": "large",
"Last {{count}} days' trend": "Last {{count}} days' trend",
Expand Down Expand Up @@ -537,6 +536,7 @@
"Loading ...": "Loading ...",
"Loading Templates with available boot source": "Loading Templates with available boot source",
"Local storage (LSO)": "Local storage (LSO)",
"Location of the existing PVC": "Location of the existing PVC",
"M Series": "M Series",
"m1": "m1",
"MAC address": "MAC address",
Expand Down Expand Up @@ -603,6 +603,7 @@
"N/A": "N/A",
"n1": "n1",
"Name": "Name",
"Name given to the cloned PVC": "Name given to the cloned PVC",
"Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. ": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. ",
"Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. ": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. ",
"Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: <2>http://kubernetes.io/docs/user-guide/identifiers#names</2><3><0>Template</0><1>metadata</1><2>name</2></3>": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: <2>http://kubernetes.io/docs/user-guide/identifiers#names</2><3><0>Template</0><1>metadata</1><2>name</2></3>",
Expand Down Expand Up @@ -722,9 +723,7 @@
"Persistent Hotplug": "Persistent Hotplug",
"Persistent Volume Claim creation": "Persistent Volume Claim creation",
"Persistent Volume Claim has been created and your data source is now being uploaded to it. Once the uploading is completed the Persistent Volume Claim will become available": "Persistent Volume Claim has been created and your data source is now being uploaded to it. Once the uploading is completed the Persistent Volume Claim will become available",
"Persistent Volume Claim name": "Persistent Volume Claim name",
"Persistent Volume Claim Name": "Persistent Volume Claim Name",
"Persistent Volume Claim project": "Persistent Volume Claim project",
"Persistent Volume Claim size": "Persistent Volume Claim size",
"pick an operating system": "pick an operating system",
"Please <2>try again</2>.": "Please <2>try again</2>.",
Expand Down Expand Up @@ -755,6 +754,8 @@
"PVC (clone PVC)": "PVC (clone PVC)",
"PVC (creates PVC)": "PVC (creates PVC)",
"PVC auto import (use DataSource)": "PVC auto import (use DataSource)",
"PVC name": "PVC name",
"PVC project": "PVC project",
"Quick create error": "Quick create error",
"Quick create VirtualMachine": "Quick create VirtualMachine",
"Quick Starts": "Quick Starts",
Expand Down Expand Up @@ -834,12 +835,12 @@
"Select a resource": "Select a resource",
"Select an available secret": "Select an available secret",
"Select an existing persistent volume claim already available on the cluster and clone it.": "Select an existing persistent volume claim already available on the cluster and clone it.",
"Select an option from which to create a VirtualMachine.": "Select an option from which to create a VirtualMachine.",
"Select an option to create a VirtualMachine": "Select an option to create a VirtualMachine",
"Select an option to create a VirtualMachine from.": "Select an option to create a VirtualMachine from.",
"Select boot source": "Select boot source",
"Select console type": "Select console type",
"Select DataSource to use for automatic image upload.": "Select DataSource to use for automatic image upload.",
"Select Instancetype": "Select Instancetype",
"Select InstanceType": "Select InstanceType",
"Select Nodes that must have all the following expressions.": "Select Nodes that must have all the following expressions.",
"Select StorageClass": "Select StorageClass",
"Select volume to boot from": "Select volume to boot from",
Expand Down Expand Up @@ -944,7 +945,7 @@
"Terms": "Terms",
"The changes you have made require this VirtualMachine to be restarted.": "The changes you have made require this VirtualMachine to be restarted.",
"The channel to track and receive the updates from.": "The channel to track and receive the updates from.",
"The cloned copy of this PersistentVolumeClaim will be moved to the destination project": "The cloned copy of this PersistentVolumeClaim will be moved to the destination project",
"The cloned copy of this PVC will be moved to the destination project": "The cloned copy of this PVC will be moved to the destination project",
"The cloud-init service is enabled by default in Fedora and RHEL images.": "The cloud-init service is enabled by default in Fedora and RHEL images.",
"The DataImportCron polls disk images and imports them as PersistentVolumeClaims. You can configure the image source and other settings on the DataImportCron details page.": "The DataImportCron polls disk images and imports them as PersistentVolumeClaims. You can configure the image source and other settings on the DataImportCron details page.",
"The Descheduler can be used to evict a running VirtualMachine so that the VirtualMachine can be rescheduled onto a more suitable Node via a live migration.": "The Descheduler can be used to evict a running VirtualMachine so that the VirtualMachine can be rescheduled onto a more suitable Node via a live migration.",
Expand Down Expand Up @@ -1018,7 +1019,8 @@
"Upload error": "Upload error",
"Upload finished": "Upload finished",
"Upload new file using the \"Upload data to Persistent Volume Claim\" page": "Upload new file using the \"Upload data to Persistent Volume Claim\" page",
"Upload new image": "Upload new image",
"Upload PVC image": "Upload PVC image",
"Upload volume": "Upload volume",
"Uploading": "Uploading",
"Uploading data to Persistent Volume Claim": "Uploading data to Persistent Volume Claim",
"URL": "URL",
Expand All @@ -1028,7 +1030,7 @@
"Use an existing PVC": "Use an existing PVC",
"Use BIOS when bootloading the guest OS (Default)": "Use BIOS when bootloading the guest OS (Default)",
"Use commas to separate between IP addresses": "Use commas to separate between IP addresses",
"Use existing PVC": "Use existing PVC",
"Use existing volume": "Use existing volume",
"Use optimized access mode & volume mode settings from StorageProfile resource.": "Use optimized access mode & volume mode settings from StorageProfile resource.",
"Use our collection of resources to help you get started with virtualization.": "Use our collection of resources to help you get started with virtualization.",
"Use template size PVC": "Use template size PVC",
Expand Down Expand Up @@ -1102,6 +1104,7 @@
"Volume mode": "Volume mode",
"Volume Mode": "Volume Mode",
"Volume name": "Volume name",
"Volume parameters": "Volume parameters",
"Volumes project": "Volumes project",
"Volumes to boot from": "Volumes to boot from",
"Warning": "Warning",
Expand All @@ -1127,6 +1130,7 @@
"You can customize the Templates storage by overriding the original parameters": "You can customize the Templates storage by overriding the original parameters",
"You can edit the boot order in the <1>{t('Disks tab')}</1>": "You can edit the boot order in the <1>{t('Disks tab')}</1>",
"You can select the boot source in the <2>Disks</2> tab.": "You can select the boot source in the <2>Disks</2> tab.",
"You can upload a new volume or use an existing PersistentVolumeClaim (PVC)": "You can upload a new volume or use an existing PersistentVolumeClaim (PVC)",
"You can use cloud-init to initialize the operating system with a specific configuration when the VirtualMachine is started.": "You can use cloud-init to initialize the operating system with a specific configuration when the VirtualMachine is started.",
"You're in view-only mode": "You're in view-only mode"
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const DiskSourcePVCSelectName: React.FC<DiskSourcePVCSelectNameProps> = ({
const fieldId = 'pvc-name-select';

return (
<FormGroup label={t('Persistent Volume Claim name')} fieldId={fieldId} id={fieldId} isRequired>
<FormGroup label={t('PVC name')} fieldId={fieldId} id={fieldId} isRequired>
{pvcsLoaded ? (
<Select
menuAppendTo="parent"
Expand All @@ -52,7 +52,7 @@ const DiskSourcePVCSelectName: React.FC<DiskSourcePVCSelectNameProps> = ({
hasInlineFilter
selections={pvcNameSelected}
onFilter={FilterPVCSelect(pvcNames)}
placeholderText={t('--- Select PersistentVolumeClaim name ---')}
placeholderText={t('--- Select PVC name ---')}
isDisabled={isDisabled}
maxHeight={400}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ const DiskSourcePVCSelectNamespace: React.FC<DiskSourcePVCSelectNamespaceProps>

return (
<FormGroup
label={t('Persistent Volume Claim project')}
label={t('PVC project')}
fieldId={fieldId}
id={fieldId}
isRequired
className="pvc-selection-formgroup"
helperText={t('Location of the existing PVC')}
>
{projectsLoaded ? (
<Select
Expand All @@ -55,7 +56,7 @@ const DiskSourcePVCSelectNamespace: React.FC<DiskSourcePVCSelectNamespaceProps>
onFilter={FilterPVCSelect(projectsName)}
hasInlineFilter
selections={selectedProject}
placeholderText={t('--- Select PersistentVolumeClaim project ---')}
placeholderText={t('--- Select PVC project ---')}
isDisabled={isDisabled}
maxHeight={400}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ type DiskSourceUploadPVCProps = {
uploadFile: File | string;
setUploadFileName: (name: string) => void;
setUploadFile: (file: File | string) => void;
label?: string;
};

const DiskSourceUploadPVC: React.FC<DiskSourceUploadPVCProps> = ({
Expand All @@ -20,12 +21,13 @@ const DiskSourceUploadPVC: React.FC<DiskSourceUploadPVCProps> = ({
uploadFileName,
setUploadFile,
setUploadFileName,
label,
}) => {
const { t } = useKubevirtTranslation();

return (
<>
<FormGroup label={t('Upload data')} fieldId="disk-source-upload" isRequired>
<FormGroup label={label || t('Upload data')} fieldId="disk-source-upload" isRequired>
<FileUpload
id="simple-file"
data-test-id="disk-source-upload-pvc-file"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ const EditBootableVolumesModal: FC<EditBootableVolumesModalProps> = ({
obj={dataSource}
isOpen={isOpen}
onClose={onClose}
headerText={t('Edit')}
headerText={t('Edit volume parameters')}
onSubmit={changeBootableVolumeMetadata(dataSource, initialMetadata, metadata)}
>
<Form>
<FormGroup label={t('Default preference')} isRequired>
<FormGroup label={t('Preference')} isRequired>
<FilterSelect
selected={metadata?.labels?.[DEFAULT_PREFERENCE_LABEL]}
setSelected={setBootableVolumeMetadata('labels', DEFAULT_PREFERENCE_LABEL)}
Expand All @@ -73,13 +73,13 @@ const EditBootableVolumesModal: FC<EditBootableVolumesModalProps> = ({
optionLabelText={t('preference')}
/>
</FormGroup>
<FormGroup label={t('Default Instancetype')}>
<FormGroup label={t('Default InstanceType')}>
<FilterSelect
selected={metadata?.labels?.[DEFAULT_INSTANCETYPE_LABEL]}
setSelected={setBootableVolumeMetadata('labels', DEFAULT_INSTANCETYPE_LABEL)}
options={instanceTypesNames}
groupVersionKind={VirtualMachineClusterInstancetypeModelGroupVersionKind}
optionLabelText={t('Instancetype')}
optionLabelText={t('InstanceType')}
/>
</FormGroup>
<FormGroup label={t('Description')}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const CreateFromInstanceType: FC = () => {
</SectionListItem>
<Divider inset={{ default: 'insetLg' }} />
<SectionListItem
headerText={t('Select Instancetype')}
headerText={t('Select InstanceType')}
sectionKey={INSTANCE_TYPES_SECTIONS.SELECT_INSTANCE_TYPE}
sectionState={sectionState}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const AddBootableVolumeModal: FC<AddBootableVolumeModalProps> = ({
const [formSelection, setFormSelection] = useState<RADIO_FORM_SELECTION>(
RADIO_FORM_SELECTION.UPLOAD_IMAGE,
);
const [cloneExistingPVC, setCloneExistingPVC] = useState(true);
const cloneExistingPVC = true; // we want to clone the existing PVC by default, may change in the future versions
const { upload, uploadData } = useCDIUpload();

const [bootableVolume, setBootableVolume] = useState<AddBootableVolumeState>(
Expand Down Expand Up @@ -136,18 +136,18 @@ const AddBootableVolumeModal: FC<AddBootableVolumeModalProps> = ({
}
onClose();
}}
submitBtnText={t('Add')}
submitBtnText={t('Upload')}
isDisabled={!labels?.[DEFAULT_PREFERENCE_LABEL]}
>
{t('You can upload a new volume or use an existing PersistentVolumeClaim (PVC)')}
<Form>
<FormGroup>{/* Spacer */}</FormGroup>
<FormGroup>
<FormSelectionRadio formSelection={formSelection} setFormSelection={setFormSelection} />
</FormGroup>
<VolumeSource
bootableVolume={bootableVolume}
setBootableVolumeField={setBootableVolumeField}
cloneExistingPVC={cloneExistingPVC}
setCloneExistingPVC={setCloneExistingPVC}
isUploadForm={isUploadForm}
upload={upload}
/>
Expand All @@ -164,7 +164,11 @@ const AddBootableVolumeModal: FC<AddBootableVolumeModalProps> = ({
/>
</>
)}
<FormGroup label={t('Name')} isRequired>
<FormGroup
label={t('Volume name')}
isRequired
helperText={t('Name given to the cloned PVC')}
>
<TextInput
id="name"
type="text"
Expand All @@ -180,8 +184,11 @@ const AddBootableVolumeModal: FC<AddBootableVolumeModalProps> = ({
value={OPENSHIFT_OS_IMAGES_NS}
/>
</FormGroup>
<Title headingLevel="h4">{t('Labels for the bootable volume')}</Title>
<FormGroup label={t('Default preference')} isRequired>

<FormGroup>{/* Spacer */}</FormGroup>

<Title headingLevel="h4">{t('Volume parameters')}</Title>
<FormGroup label={t('Preference')} isRequired>
<FilterSelect
selected={labels?.[DEFAULT_PREFERENCE_LABEL]}
setSelected={setBootableVolumeField('labels', DEFAULT_PREFERENCE_LABEL)}
Expand All @@ -190,13 +197,13 @@ const AddBootableVolumeModal: FC<AddBootableVolumeModalProps> = ({
optionLabelText={t('preference')}
/>
</FormGroup>
<FormGroup label={t('Default Instancetype')}>
<FormGroup label={t('Default InstanceType')}>
<FilterSelect
selected={labels?.[DEFAULT_INSTANCETYPE_LABEL]}
setSelected={setBootableVolumeField('labels', DEFAULT_INSTANCETYPE_LABEL)}
options={instanceTypesNames}
groupVersionKind={VirtualMachineClusterInstancetypeModelGroupVersionKind}
optionLabelText={t('Instancetype')}
optionLabelText={t('InstanceType')}
/>
</FormGroup>
<FormGroup label={t('Description')}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const FormSelectionRadio: FC<FormSelectionRadioProps> = ({ formSelection, setFor
isChecked={formSelection === RADIO_FORM_SELECTION.UPLOAD_IMAGE}
id={RADIO_FORM_SELECTION.UPLOAD_IMAGE}
name="form-selection"
label={t('Upload new image')}
label={t('Upload volume')}
onClick={() => setFormSelection(RADIO_FORM_SELECTION.UPLOAD_IMAGE)}
/>
</SplitItem>
Expand All @@ -27,7 +27,7 @@ const FormSelectionRadio: FC<FormSelectionRadioProps> = ({ formSelection, setFor
isChecked={formSelection === RADIO_FORM_SELECTION.USE_EXISTING_PVC}
id={RADIO_FORM_SELECTION.USE_EXISTING_PVC}
name="form-selection"
label={t('Use existing PVC')}
label={t('Use existing volume')}
onClick={() => setFormSelection(RADIO_FORM_SELECTION.USE_EXISTING_PVC)}
/>
</SplitItem>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.icon-size-small {
font-size: var(--pf-global--FontSize--sm);
}
Loading