prefect icon indicating copy to clipboard operation
prefect copied to clipboard

New flow run path to reflect notifications path provided by the API

Open nicolascribbles opened this issue 3 years ago • 3 comments

Problem

Solves Issue #7250

  • The API notifications was providing a route to /flow-runs/flow-run/:id and 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 /runs route

What Changed

  • /runs is 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 Runs navigation link is now active when we are on an individual flow run and its radar.

Example

screen-capture (35).webm

  {
    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

nicolascribbles avatar Oct 19 '22 18:10 nicolascribbles

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...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] avatar Oct 19 '22 18:10 netlify[bot]

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.

zhen0 avatar Oct 19 '22 20:10 zhen0

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.

zhen0 avatar Oct 25 '22 18:10 zhen0