Fix crash when backend has no rrSCParity property (#2826)
This commit is contained in:
@@ -285,33 +285,21 @@ const BasicDashboard = ({ usage }: IDashboardProps) => {
|
|||||||
<TimeStatItem
|
<TimeStatItem
|
||||||
icon={<StorageIcon />}
|
icon={<StorageIcon />}
|
||||||
label={"Backend type"}
|
label={"Backend type"}
|
||||||
value={
|
value={usage?.backend?.backendType ?? "Unknown"}
|
||||||
usage?.backend?.backendType
|
|
||||||
? usage.backend.backendType
|
|
||||||
: "Unknown"
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item xs={4}>
|
<Grid item xs={4}>
|
||||||
<TimeStatItem
|
<TimeStatItem
|
||||||
icon={<FormatDrivesIcon />}
|
icon={<FormatDrivesIcon />}
|
||||||
label={"Standard storage class parity"}
|
label={"Standard storage class parity"}
|
||||||
value={
|
value={usage?.backend?.standardSCParity?.toString() ?? "n/a"}
|
||||||
usage?.backend?.standardSCParity
|
|
||||||
? usage.backend.standardSCParity.toString()
|
|
||||||
: "n/a"
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item xs={4}>
|
<Grid item xs={4}>
|
||||||
<TimeStatItem
|
<TimeStatItem
|
||||||
icon={<FormatDrivesIcon />}
|
icon={<FormatDrivesIcon />}
|
||||||
label={"Reduced redundancy storage class parity"}
|
label={"Reduced redundancy storage class parity"}
|
||||||
value={
|
value={usage?.backend?.rrSCParity?.toString() ?? "n/a"}
|
||||||
usage?.backend?.standardSCParity
|
|
||||||
? usage.backend.rrSCParity.toString()
|
|
||||||
: "n/a"
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
Reference in New Issue
Block a user