Skip to content

Commit

Permalink
Merge pull request #13558 from openshift-cherrypick-robot/cherry-pick…
Browse files Browse the repository at this point in the history
…-13542-to-release-4.14

[release-4.14] OCPBUGS-28746:  fix bug where Expand PVC modal assumes pvc.spec.resou…
  • Loading branch information
openshift-merge-bot[bot] committed Apr 2, 2024
2 parents 95d769c + c7478bc commit e50f3d4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/public/components/modals/expand-pvc-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ import {
validate,
withHandlePromise,
HandlePromiseProps,
convertToBaseValue,
humanizeBinaryBytesWithoutB,
} from '../utils';
import { k8sPatch, referenceFor, K8sKind, K8sResourceKind } from '../../module/k8s/';
import { getRequestedPVCSize } from '@console/shared';

// Modal for expanding persistent volume claims
const ExpandPVCModal = withHandlePromise((props: ExpandPVCModalProps) => {
const defaultSize = validate.split(getRequestedPVCSize(props.resource));
const baseValue = convertToBaseValue(getRequestedPVCSize(props.resource));
const defaultSize = validate.split(humanizeBinaryBytesWithoutB(baseValue).string);
const [requestSizeValue, setRequestSizeValue] = React.useState(defaultSize[0] || '');
const [requestSizeUnit, setRequestSizeUnit] = React.useState(defaultSize[1] || 'Gi');
const [errorMessage, setErrorMessage] = React.useState<string>();
Expand Down

0 comments on commit e50f3d4

Please sign in to comment.