Skip to content

Commit

Permalink
HDDS-12042. Fix capacity count for cluster capacity card in new vs ol…
Browse files Browse the repository at this point in the history
…d UI (#7666)
  • Loading branch information
devabhishekpal authored Jan 14, 2025
1 parent 2516ea6 commit b024a6b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,12 @@ class OverviewCard extends React.Component<IOverviewCardProps> {
<div className='ant-card-percentage'>
{meta}
<div className='storage-bar'>
<StorageBar total={storageReport.capacity} used={storageReport.used} remaining={storageReport.remaining} showMeta={false} />
<StorageBar
total={storageReport.capacity}
used={storageReport.used}
remaining={storageReport.remaining}
committed={storageReport.committed}
showMeta={false} />
</div>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function getUsagePercentages(
ozoneUsedPercentage: Math.floor(used / capacity * 100),
nonOzoneUsedPercentage: Math.floor((capacity - remaining - used) / capacity * 100),
committedPercentage: Math.floor(committed / capacity * 100),
usagePercentage: Math.floor((capacity - remaining) / capacity * 100)
usagePercentage: Math.round((capacity - remaining) / capacity * 100)
}
}

Expand Down

0 comments on commit b024a6b

Please sign in to comment.