Enable find jobs by fleet_id in backoffice - #2474
Open
Alberto Vilches (avilches) wants to merge 11 commits into
Open
Enable find jobs by fleet_id in backoffice#2474Alberto Vilches (avilches) wants to merge 11 commits into
Alberto Vilches (avilches) wants to merge 11 commits into
Conversation
…Fleet Id as a code chip
…when there is none
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reworks every column of the job list in the admin backoffice, and lets its search box match by fleet_id and by compute profile (with a background index on fleet_id so that search stays fast). Clicking a value reloads the job list with the search box filled in with that value, so the visible search field always says what you are looking at.
Column by column:
Details and comments
fleet_id had no index before, so the migration uses PostgreSQL's CREATE INDEX CONCURRENTLY to avoid locking api_job while it builds. It falls back to a plain index on non-PostgreSQL backends, since the test suite runs against SQLite.
The clickable values fill in the changelist's own search box (
?q=...) rather than an exact-match filter, so they are covered bysearch_fields(addedstatus,instance_crn,program__provider__nameandcompute_profile_fk__compute_profile_idon top of the existing ones). An end-to-end test hits the real changelist with each of these search terms and checks the job is still in the results.