import { ActionIcon, Alert, Box, Card, Group, Select, Skeleton, Stack, Table, Text, } from "@mantine/core"; import { IconBell, IconBellOff, IconInfoCircle, IconLayoutNavbarCollapse, IconLayoutNavbarExpand, IconSearch, } from "@tabler/icons-react"; import { Suspense } from "react"; import { useAppDispatch, useAppSelector } from "../state/hooks"; import { ArrayParam, StringParam, useQueryParam, withDefault, } from "use-query-params"; import ErrorBoundary from "../components/ErrorBoundary"; import ScrapePoolList from "./ServiceDiscoveryPoolsList"; import { useSuspenseAPIQuery } from "../api/api"; import { ScrapePoolsResult } from "../api/responseTypes/scrapePools"; import { setCollapsedPools, setShowLimitAlert, } from "../state/serviceDiscoveryPageSlice"; import { StateMultiSelect } from "../components/StateMultiSelect"; import badgeClasses from "../Badge.module.css"; import { AlertmanagersResult } from "../api/responseTypes/alertmanagers"; import EndpointLink from "../components/EndpointLink"; export const targetPoolDisplayLimit = 20; export default function AlertmanagerDiscoveryPage() { // Load the list of all available scrape pools. const { data: { data: { activeAlertmanagers, droppedAlertmanagers }, }, } = useSuspenseAPIQuery({ path: `/alertmanagers`, }); return ( Active Alertmanagers {activeAlertmanagers.length === 0 ? ( }> No active alertmanagers found. ) : ( {activeAlertmanagers.map((alertmanager) => ( ))}
)}
Dropped Alertmanagers {droppedAlertmanagers.length === 0 ? ( }> No dropped alertmanagers found. ) : ( {droppedAlertmanagers.map((alertmanager) => ( ))}
)}
); }