diff --git a/web/ui/mantine-ui/src/pages/AlertsPage.tsx b/web/ui/mantine-ui/src/pages/AlertsPage.tsx index 4ce42d9059..18325350b6 100644 --- a/web/ui/mantine-ui/src/pages/AlertsPage.tsx +++ b/web/ui/mantine-ui/src/pages/AlertsPage.tsx @@ -164,7 +164,7 @@ export default function AlertsPage() { const [debouncedSearch] = useDebouncedValue(searchFilter.trim(), 250); const [showEmptyGroups, setShowEmptyGroups] = useLocalStorage({ key: "alertsPage.showEmptyGroups", - defaultValue: true, + defaultValue: false, }); const { alertGroupsPerPage } = useSettings(); diff --git a/web/ui/mantine-ui/src/pages/service-discovery/ServiceDiscoveryPoolsList.tsx b/web/ui/mantine-ui/src/pages/service-discovery/ServiceDiscoveryPoolsList.tsx index 6aec62fcc5..0501fd6788 100644 --- a/web/ui/mantine-ui/src/pages/service-discovery/ServiceDiscoveryPoolsList.tsx +++ b/web/ui/mantine-ui/src/pages/service-discovery/ServiceDiscoveryPoolsList.tsx @@ -25,9 +25,8 @@ import { } from "../../state/serviceDiscoveryPageSlice"; import CustomInfiniteScroll from "../../components/CustomInfiniteScroll"; -import { useDebouncedValue } from "@mantine/hooks"; +import { useDebouncedValue, useLocalStorage } from "@mantine/hooks"; import { targetPoolDisplayLimit } from "./ServiceDiscoveryPage"; -import { BooleanParam, useQueryParam, withDefault } from "use-query-params"; import { LabelBadges } from "../../components/LabelBadges"; type TargetLabels = { @@ -154,10 +153,10 @@ const ScrapePoolList: FC = ({ searchFilter, }) => { const dispatch = useAppDispatch(); - const [showEmptyPools, setShowEmptyPools] = useQueryParam( - "showEmptyPools", - withDefault(BooleanParam, true) - ); + const [showEmptyPools, setShowEmptyPools] = useLocalStorage({ + key: "serviceDiscoveryPage.showEmptyPools", + defaultValue: false, + }); // Based on the selected pool (if any), load the list of targets. const { diff --git a/web/ui/mantine-ui/src/pages/targets/ScrapePoolsList.tsx b/web/ui/mantine-ui/src/pages/targets/ScrapePoolsList.tsx index 80eb58540c..c444747724 100644 --- a/web/ui/mantine-ui/src/pages/targets/ScrapePoolsList.tsx +++ b/web/ui/mantine-ui/src/pages/targets/ScrapePoolsList.tsx @@ -167,7 +167,7 @@ const ScrapePoolList: FC = ({ const dispatch = useAppDispatch(); const [showEmptyPools, setShowEmptyPools] = useLocalStorage({ key: "targetsPage.showEmptyPools", - defaultValue: true, + defaultValue: false, }); const { collapsedPools, showLimitAlert } = useAppSelector(