Merge "fix: When the storage backends usage is 0 displayed error as '-'"
This commit is contained in:
commit
51d1f5322a
@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Progress from 'components/Progress';
|
import Progress from 'components/Progress';
|
||||||
|
import { isNumber } from 'lodash';
|
||||||
|
|
||||||
export const poolColumns = [
|
export const poolColumns = [
|
||||||
{
|
{
|
||||||
@ -34,7 +35,7 @@ export const poolColumns = [
|
|||||||
dataIndex: 'usedGBPercent',
|
dataIndex: 'usedGBPercent',
|
||||||
isHideable: true,
|
isHideable: true,
|
||||||
render: (value, record) =>
|
render: (value, record) =>
|
||||||
value ? (
|
isNumber(value) ? (
|
||||||
<Progress
|
<Progress
|
||||||
value={value}
|
value={value}
|
||||||
label={`${record.usedGB} / ${record.total_capacity_gb}`}
|
label={`${record.usedGB} / ${record.total_capacity_gb}`}
|
||||||
@ -43,7 +44,7 @@ export const poolColumns = [
|
|||||||
'-'
|
'-'
|
||||||
),
|
),
|
||||||
stringify: (value, record) =>
|
stringify: (value, record) =>
|
||||||
value
|
isNumber(value)
|
||||||
? `${value}% (${t('Used')}: ${record.usedGB} / ${t('Total')}: ${
|
? `${value}% (${t('Used')}: ${record.usedGB} / ${t('Total')}: ${
|
||||||
record.total_capacity_gb
|
record.total_capacity_gb
|
||||||
})`
|
})`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user