Skip to content

Commit

Permalink
fix: renterd lost sector alert
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfreska committed Mar 22, 2024
1 parent 9fdea39 commit afc6f04
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/red-ways-decide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'renterd': minor
---

The lost sector alert now shows the number of lost sectors. Closes https://github.com/SiaFoundation/renterd/issues/1080
16 changes: 16 additions & 0 deletions apps/renterd/contexts/alerts/data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
Tooltip,
ValueCopyable,
ValueMenu,
ValueNum,
ValueSc,
} from '@siafoundation/design-system'
import { useHost, useSlabObjects } from '@siafoundation/react-renterd'
Expand Down Expand Up @@ -302,6 +303,21 @@ export const dataFields: Record<
</div>
),
},
lostSectors: {
render: ({ value }: { value: number }) => (
<div className="flex justify-between w-full gap-2">
<Text size="12" color="subtle" ellipsis>
lost sectors
</Text>
<ValueNum
size="12"
variant="value"
value={new BigNumber(value)}
format={(value) => value.toString()}
/>
</div>
),
},
}

function ContractSetChange({
Expand Down

0 comments on commit afc6f04

Please sign in to comment.