1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-21 18:03:38 +03:00

B OpenNebula/one#6746: Always display DS limit if set (#3259)

Signed-off-by: Victor Hansson <vhansson@opennebula.io>
Co-authored-by: Tino Vázquez <cvazquez@opennebula.io>
This commit is contained in:
vichansson 2024-10-10 15:38:14 +03:00 committed by GitHub
parent 32805d4130
commit b379fb95f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,7 +21,6 @@ import { StatusChip, LinearProgressWithLabel } from 'client/components/Status'
import { List } from 'client/components/Tabs/Common'
import { getState, getType, getCapacityInfo } from 'client/models/Datastore'
import { stringToBoolean } from 'client/models/Helper'
import { prettyBytes } from 'client/utils'
import { T, Datastore, DATASTORE_ACTIONS, DS_THRESHOLD } from 'client/constants'
@ -38,11 +37,9 @@ const InformationPanel = ({ datastore = {}, actions }) => {
const { ID, NAME, BASE_PATH, TEMPLATE } = datastore
const isShared = stringToBoolean(TEMPLATE.SHARED)
const limit =
!isShared && TEMPLATE.LIMIT_MB
? prettyBytes(TEMPLATE.LIMIT_MB, 'MB', 1)
: '-'
const limit = TEMPLATE.LIMIT_MB
? prettyBytes(TEMPLATE.LIMIT_MB, 'MB', 1)
: '-'
const { percentOfUsed, percentLabel } = getCapacityInfo(datastore)
const { color: stateColor, name: stateName } = getState(datastore)