Skip to content

Commit

Permalink
B #6746: Always display DS limit if set (#3259)
Browse files Browse the repository at this point in the history
Signed-off-by: Victor Hansson <vhansson@opennebula.io>
Co-authored-by: Tino Vázquez <cvazquez@opennebula.io>
  • Loading branch information
vichansson and tinova authored Oct 10, 2024
1 parent 32805d4 commit b379fb9
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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)
Expand Down

0 comments on commit b379fb9

Please sign in to comment.