Skip to content

Commit

Permalink
v2 volume: display v2 volume actual size
Browse files Browse the repository at this point in the history
Longhorn 5947
Longhorn 7524

Signed-off-by: Derek Su <derek.su@suse.com>
  • Loading branch information
derekbit authored and David Ko committed Jan 3, 2024
1 parent be24085 commit 7813023
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/routes/volume/VolumeList.js
Expand Up @@ -300,10 +300,9 @@ function list({
sorter: (a, b) => sortTableActualSize(a, b),
render: (text, record) => {
let size = record?.controllers && record.controllers[0] && record.controllers[0].actualSize ? parseInt(record.controllers[0].actualSize, 10) : 0
let isV2Volume = record?.dataEngine === 'v2'
return (
<div>
<div>{!isV2Volume ? formatMib(size) : ''}</div>
<div>{formatMib(size)}</div>
</div>
)
},
Expand Down
4 changes: 2 additions & 2 deletions src/routes/volume/detail/VolumeInfo.js
Expand Up @@ -310,10 +310,10 @@ function VolumeInfo({ selectedVolume, snapshotModalState, engineImages, hosts, c
{/* {formatMib(selectedVolume.size)} */}
{volumeSizeEle()}
</div>
{selectedVolume?.dataEngine !== 'v2' && <div className={styles.row}>
<div className={styles.row}>
<span className={styles.label}>Actual Size:</span>
{state ? formatMib(computeActualSize) : 'Unknown'}
</div>}
</div>
<div className={styles.row}>
<span className={styles.label}>Data Locality:</span>
{selectedVolume.dataLocality}
Expand Down

0 comments on commit 7813023

Please sign in to comment.