feat: added cron job to remove healthcheck logs older than 12h

This commit is contained in:
charles-gauthereau
2026-03-25 21:11:09 +01:00
parent a9d6481193
commit 7a4af4e1e0
6 changed files with 74 additions and 20 deletions
@@ -3,6 +3,7 @@
import {useMemo} from "react"
import {Card} from "@/components/ui/card"
import {HealthcheckLog} from "@/db/schema/15_healthcheck-log"
import {useIsMobile} from "@/hooks/use-mobile";
type HealthStatus = "healthy" | "degraded" | "down" | "unknown"
@@ -105,11 +106,12 @@ export const HealthCheckGraph = ({logs}: Props) => {
return buildTimeSeries(logs)
}, [logs])
const isMobile = useIsMobile()
const hourLabels = useMemo(() => {
if (data.length === 0) return []
const isMobile = window.innerWidth <= 768
return data
.map((item, index) => ({ item, index }))