Skip to content

fix: preserve query string filters after delete/retry/purge - #188

Open
raphyabak wants to merge 1 commit into
romanzipp:masterfrom
raphyabak:fix/preserve-filters-after-action
Open

fix: preserve query string filters after delete/retry/purge#188
raphyabak wants to merge 1 commit into
romanzipp:masterfrom
raphyabak:fix/preserve-filters-after-action

Conversation

@raphyabak

Copy link
Copy Markdown

Summary

DeleteMonitorController, RetryMonitorController, and PurgeMonitorsController all redirected to the bare queue-monitor::index route after their action, dropping any active status/queue/name filters from the URL. Deleting a single failed job while filtered to "Failed" silently reset the view back to unfiltered — matches #169.

Redirect back() to wherever the request came from instead, so the filtered URL survives the action. Falls back to the index route when there's no referer (e.g. a non-browser client hitting these endpoints directly).

Fixes #169

Test plan

  • Added testDeletePreservesQueryStringFilters, testPurgePreservesQueryStringFilters, testRetryPreservesQueryStringFilters — each simulates a request from a filtered index URL (via the referer header) and asserts the redirect preserves it.
  • Verified each new test fails without the fix and passes with it.
  • Existing testDeleteEnabled/testPurgeEnabled/testRetryEnabled (no referer set) still pass unchanged, since back() falls back to queue-monitor::index in that case.
  • Full suite passes (59 tests, 2 pre-existing skips unrelated to this change).
  • Ran the project's php-cs-fixer config against the changed files.

DeleteMonitorController, RetryMonitorController, and PurgeMonitorsController
all redirected to the bare queue-monitor::index route after their action,
dropping any active status/queue/name filters from the URL. Deleting a
single failed job while filtered to "Failed" would silently reset the view
back to unfiltered.

Redirect back to wherever the request came from instead, falling back to
the index route when there's no referer (e.g. a non-browser client).

Fixes romanzipp#169
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deleting job wipes filters

1 participant