import React from "react"; import { Server, Info } from "lucide-react"; import { useTranslation } from "react-i18next"; import type { ServerMetrics } from "@/ui/main-axios.ts"; interface SystemWidgetProps { metrics: ServerMetrics | null; metricsHistory: ServerMetrics[]; } export function SystemWidget({ metrics }: SystemWidgetProps) { const { t } = useTranslation(); const metricsWithSystem = metrics as ServerMetrics & { system?: { hostname?: string; os?: string; kernel?: string; }; }; const system = metricsWithSystem?.system; return (
{t("serverStats.hostname")}
{system?.hostname || "N/A"}
{t("serverStats.operatingSystem")}
{system?.os || "N/A"}
{t("serverStats.kernel")}
{system?.kernel || "N/A"}