2026-01-23 12:33:40 -08:00
|
|
|
import { useGet } from "@/Hooks/UseApi";
|
2026-01-23 19:58:37 +00:00
|
|
|
import { MonitorBasePageWithStates } from "@/Components/v2/design-elements";
|
2026-01-23 12:33:40 -08:00
|
|
|
import { type Monitor } from "@/Types/Monitor";
|
|
|
|
|
import { FilterControls } from "@/Components/v2/monitors";
|
2026-01-23 19:58:37 +00:00
|
|
|
|
|
|
|
|
const UptimeMonitorsPage = () => {
|
2026-01-23 12:33:40 -08:00
|
|
|
const {
|
|
|
|
|
data: monitors,
|
|
|
|
|
isLoading,
|
|
|
|
|
error,
|
|
|
|
|
} = useGet<Monitor[]>("/monitors/team?type=http&type=ping&type=port&type=docker");
|
|
|
|
|
|
2026-01-23 19:58:37 +00:00
|
|
|
return (
|
|
|
|
|
<MonitorBasePageWithStates
|
2026-01-23 12:33:40 -08:00
|
|
|
loading={isLoading}
|
|
|
|
|
error={error}
|
|
|
|
|
items={monitors || []}
|
2026-01-23 19:58:37 +00:00
|
|
|
page="uptime"
|
|
|
|
|
actionLink="/uptime/create"
|
|
|
|
|
>
|
2026-01-23 12:33:40 -08:00
|
|
|
<FilterControls />
|
|
|
|
|
<pre>{JSON.stringify(monitors, null, 2)}</pre>
|
2026-01-23 19:58:37 +00:00
|
|
|
</MonitorBasePageWithStates>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default UptimeMonitorsPage;
|