Skip to content

Commit f1197a1

Browse files
committed
refactor(status): share uptime history strip
1 parent 6e48191 commit f1197a1

6 files changed

Lines changed: 536 additions & 493 deletions

File tree

apps/dashboard/app/(main)/home/_components/monitors-section.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function HomeMonitorHeatmap({
4141
getDateLabel={(d) => formatDateOnly(d)}
4242
interactive={false}
4343
isActive={isActive}
44-
stripClassName="mt-1.5 flex h-5 w-full items-end gap-[2px]"
44+
stripClassName="mt-1.5 grid h-1.5 w-full gap-x-px"
4545
tooltipHasData={(day) => day.hasData && isActive}
4646
/>
4747
);

apps/dashboard/components/monitors/monitor-row.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ function MiniHeatmap({
322322
getDateLabel={(d) => formatDateOnly(d)}
323323
interactive={false}
324324
isActive={isActive}
325-
stripClassName="flex h-5 w-32 items-end gap-[1.5px] lg:w-44"
325+
stripClassName="grid h-1.5 w-32 gap-x-px lg:w-44"
326326
/>
327327
<span
328328
className={cn(

apps/dashboard/lib/uptime/uptime-heatmap.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ export function UptimeHeatmap({
7070

7171
<div className="p-4">
7272
{isLoading ? (
73-
<div className="flex h-16 w-full gap-[2px] sm:gap-1">
73+
<div className="grid h-1.5 w-full gap-x-px sm:gap-x-[2px]">
7474
{Array.from({ length: days }).map((_, i) => (
7575
<div
76-
className="h-full flex-1 animate-pulse rounded-sm bg-secondary"
76+
className="h-full animate-pulse rounded-full bg-secondary"
7777
key={i}
7878
/>
7979
))}
@@ -85,7 +85,6 @@ export function UptimeHeatmap({
8585
getDateLabel={(d) => dayjs(d).format("MMM D, YYYY")}
8686
interactive
8787
isActive
88-
stripClassName="flex h-16 w-full gap-[2px] sm:gap-1"
8988
/>
9089
)}
9190
</div>

apps/status/app/[slug]/_components/status-page.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,34 +36,34 @@ const STATUS_CONFIG = {
3636
shortLabel: "Operational",
3737
description: "We're not aware of any issues affecting these services.",
3838
sectionClass:
39-
"border-[#00cc414d] bg-[#e5fbeb] dark:border-[#28442f] dark:bg-[#19251c]",
39+
"border-[#00cc414d] bg-[#e5fbeb] dark:border-[#3f8f55] dark:bg-[#17291d]",
4040
headerClass:
41-
"bg-[#00bd3c] text-white dark:bg-[#1d3f26] dark:text-foreground/75",
42-
lineClass: "bg-[#28e163]",
43-
textClass: "text-[#5b8368] dark:text-[#5b8368]",
41+
"bg-[#00bd3c] text-white dark:bg-[#1f5f33] dark:text-[#d7ffe4]",
42+
lineClass: "bg-[#28e163] dark:bg-[#4da868]",
43+
textClass: "text-[#5b8368] dark:text-[#8bcf9d]",
4444
},
4545
degraded: {
4646
title: "Some Systems Degraded",
4747
shortLabel: "Degraded",
4848
description:
4949
"One or more services are degraded. We're tracking the impact.",
5050
sectionClass:
51-
"border-[#cc99004d] bg-[#fff9e7] dark:border-[#383523] dark:bg-[#252319]",
51+
"border-[#cc99004d] bg-[#fff9e7] dark:border-[#a8822e] dark:bg-[#2f2918]",
5252
headerClass:
53-
"bg-[#ffbe3d] text-[#332600] dark:bg-[#3d381c] dark:text-foreground/75",
54-
lineClass: "bg-[#ffbe3d]",
55-
textClass: "text-[#7f725e] dark:text-[#7c7252]",
53+
"bg-[#ffbe3d] text-[#332600] dark:bg-[#4f3d17] dark:text-[#ffe7ad]",
54+
lineClass: "bg-[#ffbe3d] dark:bg-[#f0ba4d]",
55+
textClass: "text-[#7f725e] dark:text-[#f0cf7a]",
5656
},
5757
outage: {
5858
title: "Service Disruption",
5959
shortLabel: "Outage",
6060
description: "An outage is affecting one or more services.",
6161
sectionClass:
62-
"border-[#cc00034d] bg-[#ffe8e8] dark:border-[#382327] dark:bg-[#25191b]",
62+
"border-[#cc00034d] bg-[#ffe8e8] dark:border-[#b85563] dark:bg-[#321c20]",
6363
headerClass:
64-
"bg-[#e1282a] text-white dark:bg-[#291519] dark:text-foreground/75",
65-
lineClass: "bg-[#e1282a]",
66-
textClass: "text-[#915a5a] dark:text-[#915a5a]",
64+
"bg-[#e1282a] text-white dark:bg-[#622630] dark:text-[#ffe1e5]",
65+
lineClass: "bg-[#e1282a] dark:bg-[#cf6675]",
66+
textClass: "text-[#915a5a] dark:text-[#ee9b9b]",
6767
},
6868
} as const;
6969

0 commit comments

Comments
 (0)