Skip to content

Commit

Permalink
PMM-12378 Fix link from nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
matejkubinec committed Sep 8, 2023
1 parent 054e8bf commit 2a91570
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions public/app/percona/inventory/Tabs/Services.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { useLocalStorage } from 'react-use';
import { locationService } from '@grafana/runtime';
import { Button, HorizontalGroup, Icon, InlineSwitch, Tooltip, useStyles2 } from '@grafana/ui';
import { OldPage } from 'app/core/components/Page/Page';
import { useQueryParams } from 'app/core/hooks/useQueryParams';
import { FeatureLoader } from 'app/percona/shared/components/Elements/FeatureLoader';
import { ReadMoreLink } from 'app/percona/shared/components/Elements/TechnicalPreview/TechnicalPreview';
import { useCancelToken } from 'app/percona/shared/components/hooks/cancelToken.hook';
Expand Down Expand Up @@ -50,6 +51,7 @@ export const Services = () => {
[fetchedServices]
);
const [showClusters, setShowClusters] = useLocalStorage('pmm-organize-by-clusters', false);
const [params] = useQueryParams();

const loadData = useCallback(async () => {
try {
Expand All @@ -70,6 +72,10 @@ export const Services = () => {

useEffect(() => {
loadData();

// Reset when linking from nodes
setShowClusters(params['search-select'] !== 'serviceId');

// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

Expand Down

0 comments on commit 2a91570

Please sign in to comment.