Skip to content

Fix process filters reset on back button

Erwan Rouchet requested to merge fix-process-filters into master

Closes #1072 (closed)

When going back to the process list after clicking on a process status page, the process list filters were getting reset. This was caused by the following scenario:

  1. The selectedRun, which is part of the process status URL, changes to undefined since it is not in the parameters of the route of the process list.
  2. The process list is displayed with the filters it had before.
  3. A watcher in Process/Status/Workflow, a component that is not a router view (and therefore cannot react properly to route changes) detected the change and tried to update the route to reflect the change.
  4. The route gets updated, but to the current route (the process list, instead of the process status), with no query parameters, just the path parameters.
  5. The process list detects the URL change and updates its filters to nothing at all.

I moved the watch responsibility to Process/Status/Main, which is a view. The watcher does not trigger when leaving the route, because the component will be unmounted by then, so this no longer resets the filters or cause other weird behaviors.

Merge request reports

Loading