diff --git a/awx/ui_next/src/components/Schedule/Schedule.jsx b/awx/ui_next/src/components/Schedule/Schedule.jsx index 1ebd4210d2..515428473a 100644 --- a/awx/ui_next/src/components/Schedule/Schedule.jsx +++ b/awx/ui_next/src/components/Schedule/Schedule.jsx @@ -69,6 +69,19 @@ function Schedule({ }, ]; + if (!isLoading && error) { + return ( + + {error.response && error.response.status === 404 && ( + + {t`Schedule not found.`}{' '} + {t`View Schedules`} + + )} + + ); + } + if (isLoading || !schedule?.summary_fields?.unified_job_template?.id) { return ; } diff --git a/awx/ui_next/src/components/Schedule/Schedules.jsx b/awx/ui_next/src/components/Schedule/Schedules.jsx index 1928bf3a7b..6c01605b4a 100644 --- a/awx/ui_next/src/components/Schedule/Schedules.jsx +++ b/awx/ui_next/src/components/Schedule/Schedules.jsx @@ -1,6 +1,6 @@ import React from 'react'; - import { Switch, Route, useRouteMatch } from 'react-router-dom'; + import Schedule from './Schedule'; import ScheduleAdd from './ScheduleAdd'; import ScheduleList from './ScheduleList'; @@ -19,6 +19,7 @@ function Schedules({ // For some management jobs that delete data, we want to provide an additional // field on the scheduler for configuring the number of days to retain. + const hasDaysToKeepField = [ 'cleanup_activitystream', 'cleanup_jobs',