prefect
prefect copied to clipboard
New flow run path to reflect notifications path provided by the API
Problem
Solves Issue #7250
- The API notifications was providing a route to
/flow-runs/flow-run/:idand our URL was/flow-run/:id, so users would land on a 404 page when clicking on the URL provided by the notification. - The "Flow Runs" navigation item on the menu to the left of the dashboard was not highlighted when you traveled to an individual route because the routes are not children of the
/runsroute
What Changed
/runsis going away, redirect was created to reflect new path/flow-runs- The individual flow run is registered as a child of the flow-runs route therefore
Flow Runsnavigation link is now active when we are on an individual flow run and its radar.
Example
{
name: 'flow-runs-old',
path: '/runs',
redirect: routes.flowRuns(),
},
{
path: '/flow-runs',
children: [
{
name: 'flow-runs',
path: '',
component: FlowRunsPage,
},
{
path: 'flow-run/:id',
children: [
{
name: 'flow-run',
path: '',
component: (): RouteComponent => import('@/pages/FlowRun.vue'),
},
{
name: 'radar',
path: 'radar',
component: (): RouteComponent => import('@/pages/FlowRunRadar.vue'),
},
],
},
],
},
Checklist
- [x] This pull request references any related issue by including "closes
<link to issue>"- If no issue exists and your change is not a small fix, please create an issue first.
- [x] This pull request includes tests or only affects documentation.
- [x] This pull request includes a label categorizing the change e.g.
fix,feature,enhancement
Deploy Preview for prefect-orion ready!
| Name | Link |
|---|---|
| Latest commit | 9a16c1972646932e09bc7d253abe9c36fc12f5d3 |
| Latest deploy log | https://app.netlify.com/sites/prefect-orion/deploys/63504d5c7e36b60008399de9 |
| Deploy Preview | https://deploy-preview-7249--prefect-orion.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
Great job figuring this one out @nicolascribbles! The routing looks good to me! I'll let @pleek91 comment on whether we need to keep the old 'runs' route or if we can remove it.
We chatted this one through and agreed we should follow this pattern for flows, deployments, work queues etc to make them highlighted correctly in the sidebar.