<% executions.each do |execution| %>
<%= tag.div id: dom_id(execution), class: "list-group-item py-3" do %>
<%= tag.span execution.number, class: "badge bg-secondary bg-opacity-50 rounded-pill" %>
<%= tag.code link_to(execution.id, "##{dom_id(execution)}", class: "text-muted text-decoration-none small") %>
<% if execution.queue_latency %>
<%= format_duration execution.queue_latency %> in queue
<% end %>
<% if execution.runtime_latency %>
<%= format_duration execution.runtime_latency %> runtime
<% end %>
<%= tag.span relative_time(execution.last_status_at, include_seconds: true), class: "small" %>
<%= status_badge execution.status %>
<%= tag.button type: "button", class: "btn btn-sm text-muted", role: "button",
title: "Inspect",
data: { bs_toggle: "collapse", bs_target: "##{dom_id(execution, 'params')}" },
aria: { expanded: false, controls: dom_id(execution, "params") } do %>
<%= render_icon "info" %>
Inspect
<% end %>
<% end %>
<% end %>
<%= tag.div id: dom_id(execution, "params"), class: "list-group-item collapse small bg-dark text-light" do %>
<%= tag.pre JSON.pretty_generate(execution.display_serialized_params) %>
<% end %>
<% end %>