From bd248518fde99cdb1b0b8354710b2ef753cda13c Mon Sep 17 00:00:00 2001 From: Alex Freska Date: Wed, 27 Nov 2024 15:36:48 -0500 Subject: [PATCH] fix(hostd): home metrics graph width --- .changeset/green-baboons-sip.md | 5 ++ .changeset/spotty-chefs-hang.md | 5 ++ apps/hostd/components/Home/HomeBandwidth.tsx | 4 +- apps/hostd/components/Home/HomeOperations.tsx | 74 +++++++++---------- apps/hostd/components/Home/HomeStorage.tsx | 4 +- libs/design-system/src/core/ScrollArea.tsx | 8 +- 6 files changed, 56 insertions(+), 44 deletions(-) create mode 100644 .changeset/green-baboons-sip.md create mode 100644 .changeset/spotty-chefs-hang.md diff --git a/.changeset/green-baboons-sip.md b/.changeset/green-baboons-sip.md new file mode 100644 index 000000000..b117d9813 --- /dev/null +++ b/.changeset/green-baboons-sip.md @@ -0,0 +1,5 @@ +--- +'hostd': patch +--- + +Fixed an issue where the metrics graphs were much wider than the screen. Closes https://github.com/SiaFoundation/hostd/issues/500 diff --git a/.changeset/spotty-chefs-hang.md b/.changeset/spotty-chefs-hang.md new file mode 100644 index 000000000..4bb2a045a --- /dev/null +++ b/.changeset/spotty-chefs-hang.md @@ -0,0 +1,5 @@ +--- +'@siafoundation/design-system': patch +--- + +Fixed a bug with ScrollArea where it would adopt its contents width. diff --git a/apps/hostd/components/Home/HomeBandwidth.tsx b/apps/hostd/components/Home/HomeBandwidth.tsx index 7cfcb2c36..171dd1743 100644 --- a/apps/hostd/components/Home/HomeBandwidth.tsx +++ b/apps/hostd/components/Home/HomeBandwidth.tsx @@ -11,9 +11,9 @@ import { useMetrics } from '../../contexts/metrics' export function HomeBandwidth() { const { bandwidth } = useMetrics() return ( -
+
Bandwidth - + -
- Operations - - - - - + Operations + + - - Operations - - - } + enabledModes={['total', 'average', 'latest']} + valueFormat={humanNumber} /> -
+ +
+ + + Operations + + + } + />
) } diff --git a/apps/hostd/components/Home/HomeStorage.tsx b/apps/hostd/components/Home/HomeStorage.tsx index ced69c69f..d982e9f34 100644 --- a/apps/hostd/components/Home/HomeStorage.tsx +++ b/apps/hostd/components/Home/HomeStorage.tsx @@ -11,9 +11,9 @@ import { useMetrics } from '../../contexts/metrics' export function HomeStorage() { const { storage } = useMetrics() return ( -
+
Storage - + {children}