diff --git a/src/components/Jobs/Jobs.js b/src/components/Jobs/Jobs.js index b212dd3be..92d09ea83 100755 --- a/src/components/Jobs/Jobs.js +++ b/src/components/Jobs/Jobs.js @@ -194,8 +194,8 @@ const Jobs = () => { }, [navigate, params.pageTab, location]) const filters = useFiltersFromSearchParams( - tabData[selectedTab]?.filtersConfig, - tabData[selectedTab]?.parseQueryParamsCallback + initialTabData[selectedTab]?.filtersConfig, + initialTabData[selectedTab]?.parseQueryParamsCallback ) return ( @@ -261,25 +261,26 @@ const Jobs = () => { { setConfirmData, setEditableItem, setJobRuns, + setJobs, setJobWizardIsOpened, setJobWizardMode, - setJobs, setScheduledJobs, setSelectedJob, tabData, terminateAbortTasksPolling, - workflowsFiltersConfig: tabData[MONITOR_WORKFLOWS_TAB].filtersConfig + workflowsFiltersConfig: initialTabData[MONITOR_WORKFLOWS_TAB].filtersConfig }} > diff --git a/src/components/Jobs/MonitorJobs/MonitorJobs.js b/src/components/Jobs/MonitorJobs/MonitorJobs.js index 0e619c196..a144a7f20 100644 --- a/src/components/Jobs/MonitorJobs/MonitorJobs.js +++ b/src/components/Jobs/MonitorJobs/MonitorJobs.js @@ -38,10 +38,11 @@ const MonitorJobs = () => { const { isStagingMode } = useMode() const { abortControllerRef, - abortJobRef, abortingJobs, - fetchJobFunctionsPromiseRef, + abortJobRef, autoRefreshPrevValue, + fetchJobFunctionsPromiseRef, + initialTabData, jobRuns, jobs, jobsFiltersConfig, @@ -54,14 +55,13 @@ const MonitorJobs = () => { setJobRuns, setJobs, setSelectedJob, - tabData, terminateAbortTasksPolling } = React.useContext(JobsContext) const jobsAreInitializedRef = useRef(false) const filters = useFiltersFromSearchParams( - tabData[MONITOR_JOBS_TAB]?.filtersConfig, - tabData[MONITOR_JOBS_TAB]?.parseQueryParamsCallback + initialTabData[MONITOR_JOBS_TAB]?.filtersConfig, + initialTabData[MONITOR_JOBS_TAB]?.parseQueryParamsCallback ) const tableContent = useMemo( diff --git a/src/components/Jobs/MonitorWorkflows/MonitorWorkflows.js b/src/components/Jobs/MonitorWorkflows/MonitorWorkflows.js index 26d973835..cfd050011 100644 --- a/src/components/Jobs/MonitorWorkflows/MonitorWorkflows.js +++ b/src/components/Jobs/MonitorWorkflows/MonitorWorkflows.js @@ -52,15 +52,15 @@ const MonitorWorkflows = ({ fetchFunctionLogs }) => { abortJobRef, dateFilter, getWorkflows, + initialTabData, requestErrorMessage, - tabData, workflowsFiltersConfig } = React.useContext(JobsContext) const workflowsAreInitializedRef = useRef(false) const filters = useFiltersFromSearchParams( - tabData[MONITOR_WORKFLOWS_TAB]?.filtersConfig, - tabData[MONITOR_WORKFLOWS_TAB]?.parseQueryParamsCallback + initialTabData[MONITOR_WORKFLOWS_TAB]?.filtersConfig, + initialTabData[MONITOR_WORKFLOWS_TAB]?.parseQueryParamsCallback ) usePods(dispatch, detailsActions.fetchJobPods, detailsActions.removePods, selectedJob) diff --git a/src/components/Jobs/ScheduledJobs/ScheduledJobs.js b/src/components/Jobs/ScheduledJobs/ScheduledJobs.js index e7b3ed98a..1364052fe 100644 --- a/src/components/Jobs/ScheduledJobs/ScheduledJobs.js +++ b/src/components/Jobs/ScheduledJobs/ScheduledJobs.js @@ -33,18 +33,18 @@ const ScheduledJobs = () => { const [dataIsLoaded, setDataIsLoaded] = useState(false) const { abortControllerRef, + initialTabData, scheduledJobs, refreshScheduled: refreshJobs, requestErrorMessage, setJobs, - scheduledFiltersConfig, - tabData + scheduledFiltersConfig } = React.useContext(JobsContext) const dispatch = useDispatch() const params = useParams() const filters = useFiltersFromSearchParams( - tabData[SCHEDULE_TAB]?.filtersConfig, - tabData[SCHEDULE_TAB]?.parseQueryParamsCallback + initialTabData[SCHEDULE_TAB]?.filtersConfig, + initialTabData[SCHEDULE_TAB]?.parseQueryParamsCallback ) useEffect(() => { diff --git a/src/components/ProjectsJobsMonitoring/JobsMonitoring/JobsMonitoring.js b/src/components/ProjectsJobsMonitoring/JobsMonitoring/JobsMonitoring.js index 09e4e18e2..06e6c3aab 100644 --- a/src/components/ProjectsJobsMonitoring/JobsMonitoring/JobsMonitoring.js +++ b/src/components/ProjectsJobsMonitoring/JobsMonitoring/JobsMonitoring.js @@ -42,6 +42,7 @@ const JobsMonitoring = () => { abortJobRef, abortingJobs, fetchJobFunctionsPromiseRef, + initialTabData, jobRuns, jobs, jobsFiltersConfig, @@ -54,14 +55,13 @@ const JobsMonitoring = () => { setJobRuns, setJobs, setSelectedJob, - tabData, terminateAbortTasksPolling } = React.useContext(ProjectJobsMonitoringContext) const jobsAreInitializedRef = useRef(false) const filters = useFiltersFromSearchParams( - tabData[JOBS_MONITORING_JOBS_TAB]?.filtersConfig, - tabData[JOBS_MONITORING_JOBS_TAB]?.parseQueryParamsCallback + initialTabData[JOBS_MONITORING_JOBS_TAB]?.filtersConfig, + initialTabData[JOBS_MONITORING_JOBS_TAB]?.parseQueryParamsCallback ) const tableContent = useMemo( diff --git a/src/components/ProjectsJobsMonitoring/ProjectsJobsMonitoring.js b/src/components/ProjectsJobsMonitoring/ProjectsJobsMonitoring.js index 15cdadca9..216ea106e 100644 --- a/src/components/ProjectsJobsMonitoring/ProjectsJobsMonitoring.js +++ b/src/components/ProjectsJobsMonitoring/ProjectsJobsMonitoring.js @@ -165,8 +165,8 @@ const ProjectsJobsMonitoring = () => { }, [getWorkflows, handleRefreshJobs, initialTabData, refreshScheduled]) const filters = useFiltersFromSearchParams( - tabData[selectedTab]?.filtersConfig, - tabData[selectedTab]?.parseQueryParamsCallback + initialTabData[selectedTab]?.filtersConfig, + initialTabData[selectedTab]?.parseQueryParamsCallback ) return ( @@ -194,7 +194,7 @@ const ProjectsJobsMonitoring = () => { !isEmpty(selectedJob) } filters={filters} - filtersConfig={tabData[selectedTab].filtersConfig} + filtersConfig={initialTabData[selectedTab].filtersConfig} handleRefresh={tabData[selectedTab].handleRefresh} hidden={Boolean(params.workflowId)} key={selectedTab} @@ -218,6 +218,7 @@ const ProjectsJobsMonitoring = () => { getWorkflows, handleMonitoring, handleRerunJob, + initialTabData, jobRuns, jobWizardIsOpened, jobWizardMode, diff --git a/src/components/ProjectsJobsMonitoring/ScheduledMonitoring/ScheduledMonitoring.js b/src/components/ProjectsJobsMonitoring/ScheduledMonitoring/ScheduledMonitoring.js index 54ef8ad52..fe8524ad4 100644 --- a/src/components/ProjectsJobsMonitoring/ScheduledMonitoring/ScheduledMonitoring.js +++ b/src/components/ProjectsJobsMonitoring/ScheduledMonitoring/ScheduledMonitoring.js @@ -31,17 +31,17 @@ const ScheduledMonitoring = () => { const [dataIsLoaded, setDataIsLoaded] = useState(false) const dispatch = useDispatch() const { + initialTabData, requestErrorMessage, refreshScheduled, scheduledFiltersConfig, scheduledJobs, - setScheduledJobs, - tabData + setScheduledJobs } = React.useContext(ProjectJobsMonitoringContext) const filters = useFiltersFromSearchParams( - tabData[JOBS_MONITORING_SCHEDULED_TAB]?.filtersConfig, - tabData[JOBS_MONITORING_SCHEDULED_TAB]?.parseQueryParamsCallback + initialTabData[JOBS_MONITORING_SCHEDULED_TAB]?.filtersConfig, + initialTabData[JOBS_MONITORING_SCHEDULED_TAB]?.parseQueryParamsCallback ) useEffect(() => { diff --git a/src/components/ProjectsJobsMonitoring/WorkflowsMonitoring/WorkflowsMonitoring.js b/src/components/ProjectsJobsMonitoring/WorkflowsMonitoring/WorkflowsMonitoring.js index 022a22cd8..feb4e50b6 100644 --- a/src/components/ProjectsJobsMonitoring/WorkflowsMonitoring/WorkflowsMonitoring.js +++ b/src/components/ProjectsJobsMonitoring/WorkflowsMonitoring/WorkflowsMonitoring.js @@ -50,12 +50,12 @@ const WorkflowsMonitoring = ({ fetchFunctionLogs }) => { const { isStagingMode } = useMode() const abortControllerRef = useRef(new AbortController()) - const { abortJobRef, getWorkflows, requestErrorMessage, workflowsFiltersConfig, tabData } = + const { abortJobRef, initialTabData, getWorkflows, requestErrorMessage, workflowsFiltersConfig } = React.useContext(ProjectJobsMonitoringContext) const filters = useFiltersFromSearchParams( - tabData[JOBS_MONITORING_WORKFLOWS_TAB]?.filtersConfig, - tabData[JOBS_MONITORING_WORKFLOWS_TAB]?.parseQueryParamsCallback + initialTabData[JOBS_MONITORING_WORKFLOWS_TAB]?.filtersConfig, + initialTabData[JOBS_MONITORING_WORKFLOWS_TAB]?.parseQueryParamsCallback ) usePods(dispatch, detailsActions.fetchJobPods, detailsActions.removePods, selectedJob)