Skip to content

Commit

Permalink
Merge pull request #2136 from metalice/CNV-46752-restore-pvc-link
Browse files Browse the repository at this point in the history
CNV-46752: Restore pvc link
  • Loading branch information
openshift-merge-bot[bot] authored Aug 21, 2024
2 parents aeb79a2 + 250e8d6 commit aa8c707
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/utils/resources/vm/utils/disk/rowData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,13 @@ export const getDiskRowDataLayout = (
const pvcSize = device?.pvc?.spec?.resources?.requests?.storage;
const dataVolumeCustomSize =
device?.dataVolumeTemplate?.spec?.storage?.resources?.requests?.storage;
const size = humanizeBinaryBytes(convertToBaseValue(dataVolumeCustomSize || pvcSize));

if (device?.dataVolumeTemplate && (dataVolumeCustomSize || pvcSize)) {
diskRowDataObject.size = humanizeBinaryBytes(
convertToBaseValue(dataVolumeCustomSize || pvcSize),
).string;

return diskRowDataObject;
}
diskRowDataObject.size = size.value === 0 ? NO_DATA_DASH : size.string;

if (device?.pvc) {
diskRowDataObject.source = device?.pvc?.metadata?.name;
diskRowDataObject.sourceStatus = device?.pvc?.status?.phase;
diskRowDataObject.size = humanizeBinaryBytes(convertToBaseValue(pvcSize)).string;
diskRowDataObject.storageClass = device?.pvc?.spec?.storageClassName;
}

Expand Down

0 comments on commit aa8c707

Please sign in to comment.