Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- Job filtering — filter the jobs list by queue name, job class (substring), priority, and time period (1h / 24h / 7d / all) via query-param driven scopes; active filters are preserved across status tabs
- Job filter Turbo Frame — filter form and results table wrapped in a `<turbo-frame>` so applying filters reloads only the table without a full page refresh; `data-turbo-action="advance"` keeps the URL in sync; Turbo JS loaded from esm.sh CDN in the engine layout

## [0.1.0] - 2026-05-24

Expand Down
1 change: 1 addition & 0 deletions app/views/layouts/solid_stack_web/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= inline_styles %>
<script type="module" src="https://esm.sh/@hotwired/turbo@8"></script>
</head>
<body>
<header class="sqw-header">
Expand Down
8 changes: 5 additions & 3 deletions app/views/solid_stack_web/jobs/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,22 @@
<% end %>
</div>

<turbo-frame id="sqw-jobs-filter" data-turbo-action="advance">
<form class="sqw-filters" action="<%= jobs_path %>" method="get">
<%= hidden_field_tag :status, @status %>
<%= hidden_field_tag :period, @period %>
<input class="sqw-search-input" type="search" name="q" value="<%= @search %>"
placeholder="Filter by job class…" autocomplete="off" aria-label="Filter by job class">
<% if @queue_options.size > 1 %>
<select name="queue" class="sqw-select" aria-label="Filter by queue" onchange="this.form.submit()">
<select name="queue" class="sqw-select" aria-label="Filter by queue" onchange="this.form.requestSubmit()">
<option value="">All queues</option>
<% @queue_options.each do |q| %>
<option value="<%= q %>" <%= "selected" if @queue == q %>><%= q %></option>
<% end %>
</select>
<% end %>
<% if @priority_options.size > 1 %>
<select name="priority" class="sqw-select" aria-label="Filter by priority" onchange="this.form.submit()">
<select name="priority" class="sqw-select" aria-label="Filter by priority" onchange="this.form.requestSubmit()">
<option value="">All priorities</option>
<% @priority_options.each do |p| %>
<option value="<%= p %>" <%= "selected" if @priority.to_s == p.to_s %>>Priority <%= p %></option>
Expand Down Expand Up @@ -84,4 +85,5 @@
<% else %>
<%= render "empty" %>
<% end %>
</div>
</div>
</turbo-frame>