import Link from "next/link"; import { notFound } from "next/navigation"; import { ContentHeader } from "@/components/layout/ContentHeader"; import { AblaufBadge, Badge, EinkaufBadge, KeineMeldungBadge, StatusBadge, VerkaufBadge, } from "@/components/ui/Badges"; import { Card } from "@/components/ui/Card"; import { CopyableCode } from "@/components/ui/CopyableCode"; import { Tabs } from "@/components/ui/Tabs"; import { formatDatum, formatDatumZeit, formatEuro, formatUptime, formatZahl } from "@/lib/format"; import { HEUTE } from "@/mock/data"; import { PRODUKT_NAME, alertsVonHost, getHost, getKunde, hostMeldetNicht, laufzeitenVonHost, reportsVonHost, } from "@/mock/queries"; export async function generateMetadata({ params }: { params: Promise<{ id: string }> }) { const { id } = await params; return { title: getHost(id)?.hostname ?? "Host" }; } function Zeile({ bezeichnung, children }: { bezeichnung: string; children: React.ReactNode }) { return (
{bezeichnung} {children}
); } export default async function HostDetailSeite({ params }: { params: Promise<{ id: string }> }) { const { id } = await params; const host = getHost(id); if (!host) notFound(); const kunde = getKunde(host.kundeId); const standort = kunde?.standorte.find((s) => s.id === host.standortId); const laufzeiten = laufzeitenVonHost(host.id); const reports = reportsVonHost(host.id); const alerts = alertsVonHost(host.id); const keys = [...new Set(laufzeiten.map((l) => l.key))]; return ( <> } />
{alerts.length > 0 ? (
    {alerts.map((alert) => (
  • {alert.titel} {" "} {alert.beschreibung}
  • ))}
) : null}