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