feat: display batch parent/child relationships on Jobs page#841
Merged
Conversation
Hide child jobs from the top-level list by default (hide_children filter). Batch parent jobs show a progress badge with completed/failed/skipped counts from engine_data.batch_results. Clicking a parent row expands to reveal child jobs (lazy-loaded via parent_job_id filter). Child rows are indented with a visual indicator linking them to the parent. Backend: added parent_job_id and hide_children filters to DB queries, REST API params, and GetJobsAbility pass-through. Frontend: new fetchChildJobs API, useChildJobs query hook, rewritten JobsTable with BatchBadge, ChildRows, and JobRow components. Closes #569
Homeboy Results —
|
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
Implements batch parent/child job hierarchy on the Jobs admin page. Closes #569.
hide_childrenfilter — no more clutterengine_data.batch_results: "12/15 completed, 2 failed, 1 skipped"Changes
Backend (3 files)
JobsOperations.php— Addedparent_job_idandhide_childrenWHERE clauses to bothget_jobs_for_list_table()andget_jobs_count()Jobs.php(REST API) — Registeredparent_job_id(integer) andhide_children(boolean) params onGET /jobs, passed through inhandle_get_jobs()GetJobsAbility.php— Pass-through for both new filters into the DB layerFrontend (4 files)
api/jobs.js—fetchJobs()now sendshide_children=1by default; newfetchChildJobs(parentJobId)functionqueries/jobs.js— NewuseChildJobs(parentJobId)hook with lazy loading (enabled: !!parentJobId), newchildrenquery keyJobsTable.jsx— Rewritten withJobRow,BatchBadge,ChildRowscomponents. Batch parents are clickable with expand/collapse state. Child rows render indented with statusjobs-page.css— Batch badge styles (complete/warning/progress variants), child row indentation, expand/collapse visual statesTechnical Notes
parent_job_idcolumn is already indexed (KEY parent_job_id)engine_data.batchandengine_data.batch_resultsare set byPipelineBatchScheduler— no changes needed therehide_childrenfilter uses(parent_job_id IS NULL OR parent_job_id = 0)to handle both NULL and zero values