From 873a2661c47b84a71097691fbf338a1913cf6f94 Mon Sep 17 00:00:00 2001 From: olavtar <94576904+olavtar@users.noreply.github.com> Date: Fri, 11 Oct 2024 13:30:35 -0700 Subject: [PATCH] fix: RHOAIENG-14037 - added another line of helper text and removed 'Mi' option (#3318) Signed-off-by: Olga Lavtar --- .../screens/projects/NIMServiceModal/NIMPVCSizeSection.tsx | 5 +++++ frontend/src/pages/projects/components/PVSizeField.tsx | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/modelServing/screens/projects/NIMServiceModal/NIMPVCSizeSection.tsx b/frontend/src/pages/modelServing/screens/projects/NIMServiceModal/NIMPVCSizeSection.tsx index 30cb1e231a..a919049323 100644 --- a/frontend/src/pages/modelServing/screens/projects/NIMServiceModal/NIMPVCSizeSection.tsx +++ b/frontend/src/pages/modelServing/screens/projects/NIMServiceModal/NIMPVCSizeSection.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { HelperText, HelperTextItem, StackItem } from '@patternfly/react-core'; import PVSizeField from '~/pages/projects/components/PVSizeField'; +import { MEMORY_UNITS_FOR_SELECTION } from '~/utilities/valueUnits'; type NIMPVCSizeSectionProps = { pvcSize: string; @@ -14,12 +15,16 @@ const NIMPVCSizeSection: React.FC = ({ pvcSize, setPvcSi size={pvcSize} setSize={(value: string) => setPvcSize(value)} label="NVIDIA NIM storage size" + options={MEMORY_UNITS_FOR_SELECTION.filter((option) => option.unit !== 'Mi')} // Filtering out 'Mi' /> Specify the size of the cluster storage instance that will be created to store the downloaded NVIDIA NIM. + + Make sure your storage size is greater than the NIM size specified by NVIDIA. + ); diff --git a/frontend/src/pages/projects/components/PVSizeField.tsx b/frontend/src/pages/projects/components/PVSizeField.tsx index 51e3136685..34c348fb2b 100644 --- a/frontend/src/pages/projects/components/PVSizeField.tsx +++ b/frontend/src/pages/projects/components/PVSizeField.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import { FormGroup, FormHelperText, HelperText, HelperTextItem } from '@patternfly/react-core'; import { ExclamationTriangleIcon } from '@patternfly/react-icons'; import ValueUnitField from '~/components/ValueUnitField'; -import { MEMORY_UNITS_FOR_SELECTION } from '~/utilities/valueUnits'; +import { MEMORY_UNITS_FOR_SELECTION, UnitOption } from '~/utilities/valueUnits'; type PVSizeFieldProps = { fieldID: string; @@ -11,6 +11,7 @@ type PVSizeFieldProps = { setSize: (size: string) => void; currentSize?: string; label?: string; + options?: UnitOption[]; }; const PVSizeField: React.FC = ({ @@ -20,6 +21,7 @@ const PVSizeField: React.FC = ({ setSize, currentSize, label = 'Persistent storage size', + options = MEMORY_UNITS_FOR_SELECTION, }) => ( = ({ menuAppendTo={menuAppendTo} onChange={(value) => setSize(value)} validated={currentSize ? 'warning' : 'default'} - options={MEMORY_UNITS_FOR_SELECTION} + options={options} value={size} /> {currentSize && (