Open-source status page, incident response and uptime monitoring
TypeScript alertingincident-managementmcpmcp-servermonitoringmonitoring-as-codeobservabilityon-callopen-sourcesrestatus-pagestatuspagesynthetic-monitoringterraformtinybirdtursouptimeuptime-checkeruptime-monitor
fix: status page (#542)
Maximilian Kaske01ecf286680d
diff --git a/apps/web/src/app/status-page/[domain]/layout.tsx b/apps/web/src/app/status-page/[domain]/layout.tsxindex 2bdb73219..e03fb098f 100644--- a/apps/web/src/app/status-page/[domain]/layout.tsx+++ b/apps/web/src/app/status-page/[domain]/layout.tsx@@ -44,10 +44,10 @@ export default async function StatusPageLayout({ children, params }: Props) {<Shell className="mx-auto flex items-center justify-between gap-4 p-2 px-2 md:p-3"><div className="relative sm:w-[100px]">{page?.icon ? (- <div className="bg-muted border-border h-10 w-10 overflow-hidden rounded-full border">+ <div className="bg-muted border-border h-7 w-7 overflow-hidden rounded-full border"><Image- height={40}- width={40}+ height={28}+ width={28}src={page.icon}alt={page.title}objectFit="cover"diff --git a/apps/web/src/components/status-page/incident-list.tsx b/apps/web/src/components/status-page/incident-list.tsxindex b7f326563..a57c95a50 100644--- a/apps/web/src/components/status-page/incident-list.tsx+++ b/apps/web/src/components/status-page/incident-list.tsx@@ -68,7 +68,7 @@ export const IncidentList = ({<Buttonvariant="ghost"size="icon"- className="hidden h-7 w-7 group-hover:inline-flex"+ className="invisible h-7 w-7 group-hover:visible"asChild><Linkdiff --git a/apps/web/src/components/tracker.tsx b/apps/web/src/components/tracker.tsxindex 3be4819ee..188d2fbd4 100644--- a/apps/web/src/components/tracker.tsx+++ b/apps/web/src/components/tracker.tsx@@ -22,9 +22,9 @@ import {TooltipTrigger,} from "@openstatus/ui";-import useWindowSize from "@/hooks/use-window-size";import {addBlackListInfo,+ areDatesEqualByDayMonthYear,getStatus,getTotalUptimeString,} from "@/lib/tracker";@@ -70,13 +70,8 @@ export function Tracker({description,reports,}: TrackerProps) {- // TODO: remove the isMobile, maxSize, and _placeholder as status_timezone__v0 already returns the last 45 days- const { isMobile } = useWindowSize();- const maxSize = React.useMemo(() => (isMobile ? 35 : 45), [isMobile]);const uptime = getTotalUptimeString(data);-const _data = addBlackListInfo(data);- const _placeholder = Array.from({ length: maxSize - _data.length });return (<div className="flex flex-col">@@ -98,17 +93,17 @@ export function Tracker({)?.[0];if (!firstStatusReportUpdate) return false;- const d = firstStatusReportUpdate.date;- d.setHours(0, 0, 0); // set date to midnight as cronTimestamp is midnight- return d.getTime() === new Date(props.day).getTime();++ return areDatesEqualByDayMonthYear(+ firstStatusReportUpdate.date,+ new Date(props.day),+ );});+return (<Bar key={i} context={context} reports={dateReports} {...props} />);})}- {_placeholder.map((_, i) => {- return <div key={i} className={tracker({ variant: "empty" })} />;- })}</div></div></div>diff --git a/apps/web/src/content/changelog/individual-status-report-page.mdx b/apps/web/src/content/changelog/individual-status-report-page.mdxindex 6619ec78a..87344668c 100644--- a/apps/web/src/content/changelog/individual-status-report-page.mdx+++ b/apps/web/src/content/changelog/individual-status-report-page.mdx@@ -7,3 +7,6 @@ image: /assets/changelog/individual-status-report-page.pngEvery created status report now has its own page. That will make it easier toshare the status report with your team and across your users.++Additionally, we've addded a neutral blue color to the tracker whenever a status+report has been published.diff --git a/apps/web/src/lib/tracker.ts b/apps/web/src/lib/tracker.tsindex b2dd0e0c2..13a71b099 100644--- a/apps/web/src/lib/tracker.ts+++ b/apps/web/src/lib/tracker.ts@@ -42,7 +42,7 @@ export const getStatus = (ratio: number): GetStatusReturnType => {* @param date2* @returns*/-function areDatesEqualByDayMonthYear(date1: Date, date2: Date) {+export function areDatesEqualByDayMonthYear(date1: Date, date2: Date) {date1.setDate(date1.getDate());date1.setHours(0, 0, 0, 0);