{!allNoData && (
<>
diff --git a/src/components/UptimeMiniBar.tsx b/src/components/UptimeMiniBar.tsx
index b9574054a..5baabb4dd 100644
--- a/src/components/UptimeMiniBar.tsx
+++ b/src/components/UptimeMiniBar.tsx
@@ -33,7 +33,7 @@ const barColorClass: Record
= {
good: "bg-green-500",
degraded: "bg-yellow-500",
bad: "bg-red-500",
- no_data: "bg-zinc-700"
+ no_data: "bg-neutral-200 dark:bg-neutral-700"
};
type UptimeMiniBarProps = {
@@ -61,7 +61,11 @@ export default function UptimeMiniBar({
});
const hcQuery = useQuery({
- ...orgQueries.healthCheckStatusHistory({ orgId: orgId ?? "", healthCheckId: healthCheckId ?? 0, days }),
+ ...orgQueries.healthCheckStatusHistory({
+ orgId: orgId ?? "",
+ healthCheckId: healthCheckId ?? 0,
+ days
+ }),
enabled: healthCheckId != null && siteId == null && resourceId == null,
meta: { api },
staleTime: 5 * 60 * 1000
@@ -75,22 +79,36 @@ export default function UptimeMiniBar({
});
const { data, isLoading } =
- siteId != null ? siteQuery :
- resourceId != null ? resourceQuery :
- hcQuery;
+ siteId != null
+ ? siteQuery
+ : resourceId != null
+ ? resourceQuery
+ : hcQuery;
if (isLoading) {
return (
-
+
{Array.from({ length: days }).map((_, i) => (
))}
-
—
+
+
+
);
}
@@ -101,10 +119,7 @@ export default function UptimeMiniBar({
return (
-
+
{data.days.map((day, i) => (