-
+ titleColor={token.colorWhite}
+ >
+
+ {spaceSavingsPercentText}
+
+
{
);
};
From 81d9e335ca2318701f38dad0bcbf251c52e266e3 Mon Sep 17 00:00:00 2001
From: hoophalab <200652805+hoophalab@users.noreply.github.com>
Date: Wed, 9 Jul 2025 15:37:27 -0400
Subject: [PATCH 2/3] Fix typo and make stat accept text instead of children.
---
.../webui/client/src/components/Stat/index.tsx | 12 ++++++------
.../client/src/pages/IngestPage/Details/Files.tsx | 4 +---
.../client/src/pages/IngestPage/Details/Messages.tsx | 4 +---
.../src/pages/IngestPage/Details/TimeRange.tsx | 4 +---
.../pages/IngestPage/SpaceSavings/CompressedSize.tsx | 4 +---
.../IngestPage/SpaceSavings/UncompressedSize.tsx | 4 +---
.../src/pages/IngestPage/SpaceSavings/index.tsx | 6 ++----
7 files changed, 13 insertions(+), 25 deletions(-)
diff --git a/components/webui/client/src/components/Stat/index.tsx b/components/webui/client/src/components/Stat/index.tsx
index dfc8a681ed..13a00bab75 100644
--- a/components/webui/client/src/components/Stat/index.tsx
+++ b/components/webui/client/src/components/Stat/index.tsx
@@ -6,26 +6,26 @@ import {
const {Text} = Typography;
-interface StatCardProps {
- children: React.ReactNode;
+interface StatProps {
+ text: string;
fontSize?: string;
color?: string;
}
/**
- * A text component for displaying statistical values in `DashboardCard`.
+ * A text component for displaying statistical values.
*
* @param props
- * @param props.children
+ * @param props.text
* @param props.color
* @param props.fontSize
* @return
*/
-const Stat = ({children, color, fontSize}: StatCardProps) => {
+const Stat = ({text, color, fontSize}: StatProps) => {
const {token} = theme.useToken();
return (
- {children}
+ {text}
);
};
diff --git a/components/webui/client/src/pages/IngestPage/Details/Files.tsx b/components/webui/client/src/pages/IngestPage/Details/Files.tsx
index 3b3592375f..5e5b913719 100644
--- a/components/webui/client/src/pages/IngestPage/Details/Files.tsx
+++ b/components/webui/client/src/pages/IngestPage/Details/Files.tsx
@@ -23,9 +23,7 @@ const Files = ({numFiles, isLoading}: FilesProps) => {
isLoading={isLoading}
title={"Files"}
>
-
- {(numFiles ?? 0).toString()}
-
+
);
};
diff --git a/components/webui/client/src/pages/IngestPage/Details/Messages.tsx b/components/webui/client/src/pages/IngestPage/Details/Messages.tsx
index 0cb6275c1a..a43c3c2f5d 100644
--- a/components/webui/client/src/pages/IngestPage/Details/Messages.tsx
+++ b/components/webui/client/src/pages/IngestPage/Details/Messages.tsx
@@ -23,9 +23,7 @@ const Messages = ({numMessages, isLoading}: MessagesProps) => {
isLoading={isLoading}
title={"Messages"}
>
-
- {(numMessages ?? 0).toString()}
-
+
);
};
diff --git a/components/webui/client/src/pages/IngestPage/Details/TimeRange.tsx b/components/webui/client/src/pages/IngestPage/Details/TimeRange.tsx
index e0ed57b315..17315a53fa 100644
--- a/components/webui/client/src/pages/IngestPage/Details/TimeRange.tsx
+++ b/components/webui/client/src/pages/IngestPage/Details/TimeRange.tsx
@@ -34,9 +34,7 @@ const TimeRange = ({beginDate, endDate, isLoading}: TimeRangeProps) => {
isLoading={isLoading}
title={"Time Range"}
>
-
- {stat}
-
+
);
};
diff --git a/components/webui/client/src/pages/IngestPage/SpaceSavings/CompressedSize.tsx b/components/webui/client/src/pages/IngestPage/SpaceSavings/CompressedSize.tsx
index 3526c7cd8b..870a1dc9ae 100644
--- a/components/webui/client/src/pages/IngestPage/SpaceSavings/CompressedSize.tsx
+++ b/components/webui/client/src/pages/IngestPage/SpaceSavings/CompressedSize.tsx
@@ -22,9 +22,7 @@ const CompressedSize = ({compressedSize, isLoading}: CompressedSizeProps) => {
isLoading={isLoading}
title={"Compressed Size"}
>
-
- {formatSizeInBytes(compressedSize, false)}
-
+
);
};
diff --git a/components/webui/client/src/pages/IngestPage/SpaceSavings/UncompressedSize.tsx b/components/webui/client/src/pages/IngestPage/SpaceSavings/UncompressedSize.tsx
index 7351a2bacf..b6ce708cbe 100644
--- a/components/webui/client/src/pages/IngestPage/SpaceSavings/UncompressedSize.tsx
+++ b/components/webui/client/src/pages/IngestPage/SpaceSavings/UncompressedSize.tsx
@@ -22,9 +22,7 @@ const UncompressedSize = ({uncompressedSize, isLoading}: UncompressedSizeProps)
isLoading={isLoading}
title={"Uncompressed Size"}
>
-
- {formatSizeInBytes(uncompressedSize, false)}
-
+
);
};
diff --git a/components/webui/client/src/pages/IngestPage/SpaceSavings/index.tsx b/components/webui/client/src/pages/IngestPage/SpaceSavings/index.tsx
index 7e8350d11d..8cb669837d 100644
--- a/components/webui/client/src/pages/IngestPage/SpaceSavings/index.tsx
+++ b/components/webui/client/src/pages/IngestPage/SpaceSavings/index.tsx
@@ -1,8 +1,8 @@
import {useQuery} from "@tanstack/react-query";
import {theme} from "antd";
-import Stat from "../../..//components/Stat";
import {DashboardCard} from "../../../components/DashboardCard";
+import Stat from "../../../components/Stat";
import {
CLP_STORAGE_ENGINES,
SETTINGS_STORAGE_ENGINE,
@@ -68,9 +68,7 @@ const SpaceSavings = () => {
- {spaceSavingsPercentText}
-
+ text={spaceSavingsPercentText}/>