diff --git a/src/components/IOC/IOCManage/IOCManage.jsx b/src/components/IOC/IOCManage/IOCManage.jsx index c0557e3e0d035b3798ee88b4353644ddfad0f2c2..05186c805aecf9ea136c0a8fd826b052f5c789bc 100644 --- a/src/components/IOC/IOCManage/IOCManage.jsx +++ b/src/components/IOC/IOCManage/IOCManage.jsx @@ -154,7 +154,7 @@ export const IOCManage = ({ ioc }) => { allowedRoles={["DeploymentToolAdmin", "DeploymentToolIntegrator"]} renderNoAccess={() => <></>} > - <JobSection /> + <JobSection ioc={ioc} /> <DeployIOC open={deployDialogOpen} setOpen={setDeployDialogOpen} diff --git a/src/components/IOC/IOCManage/JobSection.tsx b/src/components/IOC/IOCManage/JobSection.tsx index 3deef686606b9e603f4fd7378876dab8d005e4ea..df425ac634ebbbae65957c8fd8539cd3e4fd09e7 100644 --- a/src/components/IOC/IOCManage/JobSection.tsx +++ b/src/components/IOC/IOCManage/JobSection.tsx @@ -1,12 +1,16 @@ import { useEffect } from "react"; import { Stack, Typography } from "@mui/material"; import { usePagination } from "@ess-ics/ce-ui-common"; -import { useListJobsQuery } from "../../../store/deployApi"; +import { useListJobsQuery, IocDetails } from "../../../store/deployApi"; import { initRequestParams } from "../../common/Helper"; import { ROWS_PER_PAGE } from "../../../constants"; import { JobTable } from "../../Job"; -export const JobSection = () => { +interface JobSectionProps { + ioc: IocDetails; +} + +export const JobSection = ({ ioc }: JobSectionProps) => { const { pagination, setPagination } = usePagination({ rowsPerPageOptions: ROWS_PER_PAGE, initLimit: ROWS_PER_PAGE[0], @@ -14,7 +18,10 @@ export const JobSection = () => { }); const { data: jobs, isLoading } = useListJobsQuery( - initRequestParams(pagination), + { + ...initRequestParams(pagination), + iocId: ioc.id + }, { pollingInterval: 5000 } );