Redirect system path to management on jobs URL

When user attempts to access `/jobs/system/66` redirect to
`/jobs/management/66`.

This will catch management jobs notifications, for instance, and redirect to
the proper URL.

See:#11113
This commit is contained in:
nixocio 2021-09-28 10:23:57 -04:00
parent 87105a654c
commit 4398c7c777

View File

@ -28,6 +28,7 @@ export const JOB_URL_SEGMENT_MAP = {
playbook: 'job',
project: 'project_update',
management: 'system_job',
system: 'system_job',
inventory: 'inventory_update',
command: 'ad_hoc_command',
workflow: 'workflow_job',
@ -148,6 +149,7 @@ function Job({ setBreadcrumb }) {
<Card>
<RoutedTabs tabsArray={tabsArray} />
<Switch>
<Redirect from="/jobs/system/:id" to="/jobs/management/:id" exact />
<Redirect
from="/jobs/:typeSegment/:id"
to="/jobs/:typeSegment/:id/output"