diff --git a/src/API/REST.api.ts b/src/API/REST.api.ts index 1156e821..fa193a08 100644 --- a/src/API/REST.api.ts +++ b/src/API/REST.api.ts @@ -30,7 +30,6 @@ import { getFlowPairPATH, getSitePairPATH, getProcessGroupPairPATH, - getServicesByProcessPATH, getFlowPairsPATH, getRoutersPATH, geProcessesPATH, @@ -142,14 +141,6 @@ export const RESTApi = { return getApiResults(data); }, - fetchServicesByProcess: async (id: string, options?: RequestOptions): Promise => { - const data = await axiosFetch>(getServicesByProcessPATH(id), { - params: options ? mapOptionsToQueryParams(options) : null - }); - - return getApiResults(data); - }, - // HOST APIs fetchHosts: async (options?: RequestOptions): Promise => { const data = await axiosFetch>(getHostsPATH(), { diff --git a/src/API/REST.paths.ts b/src/API/REST.paths.ts index 7d89f8fd..36176da7 100644 --- a/src/API/REST.paths.ts +++ b/src/API/REST.paths.ts @@ -36,7 +36,6 @@ export const getLinkPATH = (id: string) => `${LINKS_PATH}${id}`; const PROCESSES_PATH = `${COLLECTOR_URL}/processes/`; export const geProcessesPATH = () => PROCESSES_PATH; export const geProcessPATH = (id: string) => `${PROCESSES_PATH}${id}`; -export const getServicesByProcessPATH = (id: string) => `${PROCESSES_PATH}${id}/addresses`; // PROCESS_GROUPS const PROCESS_GROUPS_PATH = `${COLLECTOR_URL}/processgroups/`; diff --git a/src/pages/Processes/components/Details.tsx b/src/pages/Processes/components/Details.tsx index 909af4f4..e823c839 100644 --- a/src/pages/Processes/components/Details.tsx +++ b/src/pages/Processes/components/Details.tsx @@ -16,22 +16,19 @@ import { Tooltip, Truncate } from '@patternfly/react-core'; -import { useQuery } from '@tanstack/react-query'; import { Link } from 'react-router-dom'; -import { RESTApi } from '@API/REST.api'; import ResourceIcon from '@core/components/ResourceIcon'; import { timeAgo } from '@core/utils/timeAgo'; import { ProcessGroupsRoutesPaths } from '@pages/ProcessGroups/ProcessGroups.enum'; import { ServicesRoutesPaths } from '@pages/Services/Services.enum'; import { SitesRoutesPaths } from '@pages/Sites/Sites.enum'; -import { ProcessesLabels, QueriesProcesses } from '../Processes.enum'; +import { ProcessesLabels } from '../Processes.enum'; import { DetailsProps } from '../Processes.interfaces'; const Details: FC = function ({ process, title }) { const { - identity: processId, parent, parentName, imageName, @@ -40,14 +37,10 @@ const Details: FC = function ({ process, title }) { sourceHost, hostName, startTime, - processBinding + processBinding, + addresses } = process; - const { data: services } = useQuery({ - queryKey: [QueriesProcesses.GetServicesByProcessId, processId], - queryFn: () => RESTApi.fetchServicesByProcess(processId) - }); - return ( {title && ( @@ -124,20 +117,16 @@ const Details: FC = function ({ process, title }) { - {!!services?.length && ( + {!!addresses?.length && ( {ProcessesLabels.Services} - {services.map((service) => ( -
+ {addresses.map((service) => ( +
- - {service.name} - + {service.split('@')[0]}
))}