Skip to content

Commit

Permalink
fix(view): show unknown for disk vendor on multi-disk view
Browse files Browse the repository at this point in the history
  • Loading branch information
MauriceNino committed Feb 1, 2023
1 parent e5b9670 commit 93c7b1a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions apps/view/src/widgets/storage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export const StorageChart: FC<StorageChartProps> = ({
}
tooltipRenderer={x => {
const value = x.payload?.[0]?.payload as
| typeof usageArr[0]
| (typeof usageArr)[0]
| undefined;

if (!value) {
Expand Down Expand Up @@ -336,7 +336,10 @@ export const StorageWidget: FC<StorageWidgetProps> = ({
return layout.map(s => {
const brand = s.virtual
? s.brands[0]
: removeDuplicates(s.brands.map((b, i) => `${b} ${s.types[i]}`));
: removeDuplicates(
s.brands.map((b, i) => `${b || 'Unknown'} ${s.types[i]}`)
);
console.log('Brand', brand);
const size = s.size;
const raidGroup = s.raidGroup;

Expand Down

0 comments on commit 93c7b1a

Please sign in to comment.