mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-13 12:58:17 +03:00
M #-: Add size to image card (#3031)
* Image cards in FireEdge now display the size attribute Signed-off-by: Victor Hansson <vhansson@opennebula.io>
This commit is contained in:
parent
4eb464cfdd
commit
f75ab3784e
@ -61,6 +61,11 @@ const COLUMNS = [
|
||||
accessor: 'RUNNING_VMS',
|
||||
sortType: 'number',
|
||||
},
|
||||
{
|
||||
Header: 'Size',
|
||||
accessor: 'SIZE',
|
||||
sortType: 'number',
|
||||
},
|
||||
]
|
||||
|
||||
COLUMNS.noFilterIds = ['id', 'name', 'type', 'label']
|
||||
|
@ -38,6 +38,7 @@ import {
|
||||
getUniqueLabels,
|
||||
getColorFromString,
|
||||
} from 'client/models/Helper'
|
||||
import { prettyBytes } from 'client/utils'
|
||||
|
||||
import * as ImageModel from 'client/models/Image'
|
||||
import * as Helper from 'client/models/Helper'
|
||||
@ -55,6 +56,7 @@ const Row = ({ original, value, onClickLabel, ...props }) => {
|
||||
PERSISTENT,
|
||||
locked,
|
||||
DATASTORE,
|
||||
SIZE,
|
||||
RUNNING_VMS,
|
||||
label: LABELS = [],
|
||||
} = value
|
||||
@ -138,6 +140,9 @@ const Row = ({ original, value, onClickLabel, ...props }) => {
|
||||
<ModernTv />
|
||||
<span>{`${RUNNING_VMS}`}</span>
|
||||
</span>
|
||||
<span title={`${T.Size}: ${SIZE}`}>
|
||||
<span>{`${prettyBytes(+SIZE ?? 0)}`}</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className={classes.secondary}></div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user