diff --git a/CHANGELOG.md b/CHANGELOG.md index 90c7345..9bd4b10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- Auto-refresh on the Job History page — wraps the page in a turbo-frame polled every 10 seconds, matching the jobs and processes pages; pauses when the browser tab is hidden - Job History page (`/jobs/history`) — browsable list of all finished jobs (`finished_at IS NOT NULL`) ordered by most-recent-first; columns show class name (links to job detail), queue (clickable queue filter), duration (formatted as `Xs`, `Xm Xs`, or `Xh Xm`), and finished timestamp; filterable by time period (1h / 24h / 7d), queue name, and class name search; paginated; "Done (1h)" and "Done (24h)" dashboard stat cards now link to the history page pre-filtered by period; "History" nav link added between Jobs and Failed - Throughput section on the dashboard — "Done (1h)" and "Done (24h)" stat cards show completed-job counts; a full-width "Throughput — Last 12 Hours" card displays a pure-CSS bar chart (12 hourly buckets, oldest left → newest right, tick labels every 3 bars) with no JavaScript or charting library; powered by a single `pluck(:finished_at)` query with Ruby-side grouping for DB-agnostic compatibility; seed data updated with a realistic daily-pattern distribution so the chart shows meaningful data out of the box diff --git a/README.md b/README.md index 526811f..8c04f99 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ SolidQueueWeb surfaces all of this in a browser UI available at any route you ch - **Processes** — workers, dispatchers, and supervisors with heartbeat health status; auto-refreshes every 10 seconds - **Global search** — search across all job statuses at once by class name substring; results grouped by status with match count and direct links to filtered views; native datalist autocomplete pre-populated from all known job classes; auto-submits on selection - **Targeted bulk actions** — checkboxes on the jobs and failed jobs lists for selecting individual rows; selection bar shows count and action buttons ("Discard Selected" for jobs, "Retry Selected" / "Discard Selected" for failed jobs); select-all checkbox in the table header -- **Job history** — browsable list of all finished jobs with class name, queue, duration, and finished timestamp; filterable by period (1h / 24h / 7d), queue, and class name search; Done (1h) / Done (24h) dashboard cards link directly to the filtered history view +- **Job history** — browsable list of all finished jobs with class name, queue, duration, and finished timestamp; filterable by period (1h / 24h / 7d), queue, and class name search; Done (1h) / Done (24h) dashboard cards link directly to the filtered history view; auto-refreshes every 10 seconds ## Screenshots @@ -103,7 +103,6 @@ Planned features, roughly ordered by priority: **Near-term** - Queue throughput columns on the Queues page — Completed (24h) and Failed (24h) per queue -- Auto-refresh on the Job History page - Dark mode — CSS custom properties are already structured for it; toggle persists to `localStorage` **Medium-term** diff --git a/app/views/solid_queue_web/history/index.html.erb b/app/views/solid_queue_web/history/index.html.erb index 2bc83d2..68fb22c 100644 --- a/app/views/solid_queue_web/history/index.html.erb +++ b/app/views/solid_queue_web/history/index.html.erb @@ -1,3 +1,4 @@ +<%= turbo_frame_tag "history-table", data: { controller: "refresh", refresh_interval_value: 10000 } do %>

Job History

@@ -62,4 +63,5 @@ <% if @pagy.last > 1 %> <%= @pagy.series_nav.html_safe %> +<% end %> <% end %> \ No newline at end of file