pgbus 0.2.1 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +88 -25
  3. data/app/controllers/pgbus/api/insights_controller.rb +5 -4
  4. data/app/controllers/pgbus/application_controller.rb +40 -0
  5. data/app/controllers/pgbus/insights_controller.rb +3 -2
  6. data/app/controllers/pgbus/locale_controller.rb +15 -0
  7. data/app/helpers/pgbus/application_helper.rb +67 -7
  8. data/app/views/layouts/pgbus/application.html.erb +51 -16
  9. data/app/views/pgbus/dashboard/_processes_table.html.erb +7 -7
  10. data/app/views/pgbus/dashboard/_queues_table.html.erb +9 -9
  11. data/app/views/pgbus/dashboard/_recent_failures.html.erb +7 -7
  12. data/app/views/pgbus/dashboard/_stats_cards.html.erb +10 -10
  13. data/app/views/pgbus/dashboard/show.html.erb +1 -1
  14. data/app/views/pgbus/dead_letter/_messages_table.html.erb +20 -20
  15. data/app/views/pgbus/dead_letter/index.html.erb +5 -5
  16. data/app/views/pgbus/dead_letter/show.html.erb +12 -12
  17. data/app/views/pgbus/events/index.html.erb +11 -11
  18. data/app/views/pgbus/events/show.html.erb +6 -6
  19. data/app/views/pgbus/insights/show.html.erb +41 -21
  20. data/app/views/pgbus/jobs/_enqueued_table.html.erb +20 -20
  21. data/app/views/pgbus/jobs/_failed_table.html.erb +12 -12
  22. data/app/views/pgbus/jobs/index.html.erb +5 -5
  23. data/app/views/pgbus/jobs/show.html.erb +13 -13
  24. data/app/views/pgbus/locks/index.html.erb +11 -11
  25. data/app/views/pgbus/outbox/index.html.erb +15 -15
  26. data/app/views/pgbus/processes/_processes_table.html.erb +8 -8
  27. data/app/views/pgbus/processes/index.html.erb +1 -1
  28. data/app/views/pgbus/queues/_queues_list.html.erb +15 -15
  29. data/app/views/pgbus/queues/index.html.erb +1 -1
  30. data/app/views/pgbus/queues/show.html.erb +11 -11
  31. data/app/views/pgbus/recurring_tasks/_tasks_table.html.erb +15 -15
  32. data/app/views/pgbus/recurring_tasks/index.html.erb +2 -2
  33. data/app/views/pgbus/recurring_tasks/show.html.erb +21 -21
  34. data/config/i18n-tasks.yml +41 -0
  35. data/config/locales/da.yml +348 -0
  36. data/config/locales/de.yml +348 -0
  37. data/config/locales/en.yml +348 -0
  38. data/config/locales/es.yml +348 -0
  39. data/config/locales/fi.yml +348 -0
  40. data/config/locales/fr.yml +348 -0
  41. data/config/locales/it.yml +348 -0
  42. data/config/locales/ja.yml +348 -0
  43. data/config/locales/nb.yml +348 -0
  44. data/config/locales/nl.yml +348 -0
  45. data/config/locales/pt.yml +348 -0
  46. data/config/locales/sv.yml +348 -0
  47. data/config/routes.rb +2 -0
  48. data/lib/pgbus/configuration.rb +8 -2
  49. data/lib/pgbus/engine.rb +4 -0
  50. data/lib/pgbus/version.rb +1 -1
  51. metadata +15 -1
@@ -1,42 +1,42 @@
1
- <turbo-frame id="dashboard-stats" data-auto-refresh src="<%= pgbus.root_path(frame: 'stats') %>">
1
+ <turbo-frame id="dashboard-stats" data-auto-refresh data-src="<%= pgbus.root_path(frame: 'stats') %>">
2
2
  <div class="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-6 mb-8">
3
3
  <div class="rounded-lg bg-white dark:bg-gray-800 p-5 shadow ring-1 ring-gray-200 dark:ring-gray-700">
4
- <p class="text-sm font-medium text-gray-500 dark:text-gray-400">Queues</p>
4
+ <p class="text-sm font-medium text-gray-500 dark:text-gray-400"><%= t("pgbus.dashboard.stats_cards.queues") %></p>
5
5
  <p class="mt-1 text-3xl font-semibold text-gray-900 dark:text-white"><%= @stats[:total_queues] %></p>
6
6
  </div>
7
7
 
8
8
  <div class="rounded-lg bg-white dark:bg-gray-800 p-5 shadow ring-1 ring-gray-200 dark:ring-gray-700">
9
- <p class="text-sm font-medium text-gray-500 dark:text-gray-400">Enqueued</p>
9
+ <p class="text-sm font-medium text-gray-500 dark:text-gray-400"><%= t("pgbus.dashboard.stats_cards.enqueued") %></p>
10
10
  <p class="mt-1 text-3xl font-semibold text-gray-900 dark:text-white"><%= pgbus_number(@stats[:total_depth]) %></p>
11
- <p class="text-xs text-gray-400 dark:text-gray-500"><%= pgbus_number(@stats[:total_visible]) %> visible</p>
11
+ <p class="text-xs text-gray-400 dark:text-gray-500"><%= pgbus_number(@stats[:total_visible]) %> <%= t("pgbus.dashboard.stats_cards.visible") %></p>
12
12
  </div>
13
13
 
14
14
  <div class="rounded-lg bg-white dark:bg-gray-800 p-5 shadow ring-1 ring-gray-200 dark:ring-gray-700">
15
- <p class="text-sm font-medium text-gray-500 dark:text-gray-400">Processes</p>
15
+ <p class="text-sm font-medium text-gray-500 dark:text-gray-400"><%= t("pgbus.dashboard.stats_cards.processes") %></p>
16
16
  <p class="mt-1 text-3xl font-semibold <%= @stats[:active_processes] > 0 ? 'text-green-600 dark:text-green-400' : 'text-gray-400' %>">
17
17
  <%= @stats[:active_processes] %>
18
18
  </p>
19
19
  </div>
20
20
 
21
21
  <div class="rounded-lg bg-white dark:bg-gray-800 p-5 shadow ring-1 ring-gray-200 dark:ring-gray-700">
22
- <p class="text-sm font-medium text-gray-500 dark:text-gray-400">Recurring</p>
22
+ <p class="text-sm font-medium text-gray-500 dark:text-gray-400"><%= t("pgbus.dashboard.stats_cards.recurring") %></p>
23
23
  <p class="mt-1 text-3xl font-semibold text-gray-900 dark:text-white"><%= @stats[:recurring_count] %></p>
24
24
  <p class="text-xs text-gray-400">
25
- <%= link_to "View tasks", pgbus.recurring_tasks_path, class: "text-blue-500 hover:text-blue-700 dark:text-blue-400" %>
25
+ <%= link_to t("pgbus.dashboard.stats_cards.view_tasks"), pgbus.recurring_tasks_path, class: "text-blue-500 hover:text-blue-700 dark:text-blue-400" %>
26
26
  </p>
27
27
  </div>
28
28
 
29
29
  <div class="rounded-lg bg-white dark:bg-gray-800 p-5 shadow ring-1 ring-gray-200 dark:ring-gray-700">
30
- <p class="text-sm font-medium text-gray-500 dark:text-gray-400">Failed / DLQ</p>
30
+ <p class="text-sm font-medium text-gray-500 dark:text-gray-400"><%= t("pgbus.dashboard.stats_cards.failed_dlq") %></p>
31
31
  <p class="mt-1 text-3xl font-semibold <%= (@stats[:failed_count] + @stats[:dlq_depth]) > 0 ? 'text-red-600 dark:text-red-400' : 'text-gray-900 dark:text-white' %>">
32
32
  <%= @stats[:failed_count] %> / <%= @stats[:dlq_depth] %>
33
33
  </p>
34
34
  </div>
35
35
 
36
36
  <div class="rounded-lg bg-white dark:bg-gray-800 p-5 shadow ring-1 ring-gray-200 dark:ring-gray-700">
37
- <p class="text-sm font-medium text-gray-500 dark:text-gray-400">Throughput</p>
37
+ <p class="text-sm font-medium text-gray-500 dark:text-gray-400"><%= t("pgbus.dashboard.stats_cards.throughput") %></p>
38
38
  <p class="mt-1 text-3xl font-semibold text-gray-900 dark:text-white"><%= @stats[:throughput_rate] %></p>
39
- <p class="text-xs text-gray-400">msgs/s</p>
39
+ <p class="text-xs text-gray-400"><%= t("pgbus.dashboard.stats_cards.throughput_unit") %></p>
40
40
  </div>
41
41
  </div>
42
42
  </turbo-frame>
@@ -1,4 +1,4 @@
1
- <h1 class="text-2xl font-bold text-gray-900 dark:text-white mb-6">Dashboard</h1>
1
+ <h1 class="text-2xl font-bold text-gray-900 dark:text-white mb-6"><%= t("pgbus.dashboard.show.title") %></h1>
2
2
 
3
3
  <%= render "pgbus/dashboard/stats_cards" %>
4
4
 
@@ -1,13 +1,13 @@
1
- <turbo-frame id="dlq-messages" data-auto-refresh src="<%= pgbus.dead_letter_index_path(frame: 'list') %>">
1
+ <turbo-frame id="dlq-messages" data-auto-refresh data-src="<%= pgbus.dead_letter_index_path(frame: 'list') %>">
2
2
  <div class="overflow-hidden rounded-lg bg-white dark:bg-gray-800 shadow ring-1 ring-gray-200 dark:ring-gray-700">
3
3
  <table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
4
4
  <thead class="bg-gray-50 dark:bg-gray-900">
5
5
  <tr>
6
- <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">ID</th>
7
- <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Job Class</th>
8
- <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Source Queue</th>
9
- <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Enqueued</th>
10
- <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Reads</th>
6
+ <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.dead_letter.messages_table.headers.id") %></th>
7
+ <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.dead_letter.messages_table.headers.job_class") %></th>
8
+ <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.dead_letter.messages_table.headers.source_queue") %></th>
9
+ <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.dead_letter.messages_table.headers.enqueued") %></th>
10
+ <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.dead_letter.messages_table.headers.reads") %></th>
11
11
  </tr>
12
12
  </thead>
13
13
  <tbody class="divide-y divide-gray-100 dark:divide-gray-700">
@@ -27,39 +27,39 @@
27
27
  </summary>
28
28
  <div class="px-4 pb-4 bg-gray-50 dark:bg-gray-900 border-t border-gray-100">
29
29
  <div class="flex items-center justify-between mt-3 mb-3">
30
- <span class="text-xs font-mono text-gray-400">Job ID: <%= payload["job_id"] %></span>
30
+ <span class="text-xs font-mono text-gray-400"><%= t("pgbus.dead_letter.messages_table.job_id") %> <%= payload["job_id"] %></span>
31
31
  <div class="flex space-x-2">
32
- <%= button_to "Retry", pgbus.retry_dead_letter_path(m[:msg_id], queue_name: m[:queue_name]), method: :post,
32
+ <%= button_to t("pgbus.dead_letter.messages_table.retry"), pgbus.retry_dead_letter_path(m[:msg_id], queue_name: m[:queue_name]), method: :post,
33
33
  class: "rounded-md bg-indigo-600 px-3 py-1.5 text-xs font-medium text-white hover:bg-indigo-500",
34
34
  data: { turbo_frame: "_top" } %>
35
- <%= button_to "Discard", pgbus.discard_dead_letter_path(m[:msg_id], queue_name: m[:queue_name]), method: :post,
35
+ <%= button_to t("pgbus.dead_letter.messages_table.discard"), pgbus.discard_dead_letter_path(m[:msg_id], queue_name: m[:queue_name]), method: :post,
36
36
  class: "rounded-md bg-red-600 px-3 py-1.5 text-xs font-medium text-white hover:bg-red-500",
37
- data: { turbo_confirm: "Permanently discard?", turbo_frame: "_top" } %>
37
+ data: { turbo_confirm: t("pgbus.dead_letter.messages_table.discard_confirm"), turbo_frame: "_top" } %>
38
38
  </div>
39
39
  </div>
40
40
  <div class="grid grid-cols-2 gap-4 mb-3">
41
41
  <div>
42
- <span class="text-xs font-medium text-gray-500">Arguments</span>
42
+ <span class="text-xs font-medium text-gray-500"><%= t("pgbus.dead_letter.messages_table.arguments") %></span>
43
43
  <pre class="text-xs text-gray-700 bg-white dark:bg-gray-800 rounded p-2 mt-1 overflow-x-auto max-h-40"><%= JSON.pretty_generate(payload["arguments"] || []) rescue "—" %></pre>
44
44
  </div>
45
45
  <div>
46
- <span class="text-xs font-medium text-gray-500">Metadata</span>
46
+ <span class="text-xs font-medium text-gray-500"><%= t("pgbus.dead_letter.messages_table.metadata") %></span>
47
47
  <div class="text-xs text-gray-600 bg-white dark:bg-gray-800 rounded p-2 mt-1 space-y-1">
48
- <% if payload["queue_name"] %><p><strong>Queue:</strong> <%= payload["queue_name"] %></p><% end %>
49
- <% if payload["priority"] %><p><strong>Priority:</strong> <%= payload["priority"] %></p><% end %>
50
- <% if payload["executions"] %><p><strong>Executions:</strong> <%= payload["executions"] %></p><% end %>
51
- <% if m[:vt] %><p><strong>Visible at:</strong> <%= m[:vt] %></p><% end %>
52
- <% if m[:last_read_at] %><p><strong>Last read:</strong> <%= m[:last_read_at] %></p><% end %>
48
+ <% if payload["queue_name"] %><p><strong><%= t("pgbus.dead_letter.messages_table.metadata_labels.queue") %></strong> <%= payload["queue_name"] %></p><% end %>
49
+ <% if payload["priority"] %><p><strong><%= t("pgbus.dead_letter.messages_table.metadata_labels.priority") %></strong> <%= payload["priority"] %></p><% end %>
50
+ <% if payload["executions"] %><p><strong><%= t("pgbus.dead_letter.messages_table.metadata_labels.executions") %></strong> <%= payload["executions"] %></p><% end %>
51
+ <% if m[:vt] %><p><strong><%= t("pgbus.dead_letter.messages_table.metadata_labels.visible_at") %></strong> <%= m[:vt] %></p><% end %>
52
+ <% if m[:last_read_at] %><p><strong><%= t("pgbus.dead_letter.messages_table.metadata_labels.last_read") %></strong> <%= m[:last_read_at] %></p><% end %>
53
53
  </div>
54
54
  </div>
55
55
  </div>
56
56
  <details class="mt-2">
57
- <summary class="text-xs font-medium text-gray-500 cursor-pointer hover:text-gray-700">Full JSON payload</summary>
57
+ <summary class="text-xs font-medium text-gray-500 cursor-pointer hover:text-gray-700"><%= t("pgbus.dead_letter.messages_table.full_json_payload") %></summary>
58
58
  <pre class="text-xs text-gray-600 bg-white dark:bg-gray-800 rounded p-2 mt-1 overflow-x-auto max-h-96"><%= JSON.pretty_generate(payload) rescue m[:message] %></pre>
59
59
  </details>
60
60
  <% if m[:headers] %>
61
61
  <details class="mt-2">
62
- <summary class="text-xs font-medium text-gray-500 cursor-pointer hover:text-gray-700">Headers</summary>
62
+ <summary class="text-xs font-medium text-gray-500 cursor-pointer hover:text-gray-700"><%= t("pgbus.dead_letter.messages_table.headers_section") %></summary>
63
63
  <pre class="text-xs text-gray-600 bg-white dark:bg-gray-800 rounded p-2 mt-1 overflow-x-auto"><%= JSON.pretty_generate(JSON.parse(m[:headers])) rescue m[:headers] %></pre>
64
64
  </details>
65
65
  <% end %>
@@ -69,7 +69,7 @@
69
69
  </tr>
70
70
  <% end %>
71
71
  <% if @messages.empty? %>
72
- <tr><td colspan="5" class="px-4 py-8 text-center text-sm text-gray-400">Dead letter queue is empty</td></tr>
72
+ <tr><td colspan="5" class="px-4 py-8 text-center text-sm text-gray-400"><%= t("pgbus.dead_letter.messages_table.empty") %></td></tr>
73
73
  <% end %>
74
74
  </tbody>
75
75
  </table>
@@ -1,13 +1,13 @@
1
1
  <div class="flex items-center justify-between mb-6">
2
- <h1 class="text-2xl font-bold text-gray-900 dark:text-white">Dead Letter Queue</h1>
2
+ <h1 class="text-2xl font-bold text-gray-900 dark:text-white"><%= t("pgbus.dead_letter.index.title") %></h1>
3
3
  <% if @messages.any? %>
4
4
  <div class="flex space-x-2">
5
- <%= button_to "Retry All", pgbus.retry_all_dead_letter_index_path, method: :post,
5
+ <%= button_to t("pgbus.dead_letter.index.retry_all"), pgbus.retry_all_dead_letter_index_path, method: :post,
6
6
  class: "rounded-md bg-indigo-600 px-3 py-2 text-sm font-medium text-white hover:bg-indigo-500",
7
- data: { turbo_confirm: "Retry all DLQ messages?" } %>
8
- <%= button_to "Discard All", pgbus.discard_all_dead_letter_index_path, method: :post,
7
+ data: { turbo_confirm: t("pgbus.dead_letter.index.retry_all_confirm") } %>
8
+ <%= button_to t("pgbus.dead_letter.index.discard_all"), pgbus.discard_all_dead_letter_index_path, method: :post,
9
9
  class: "rounded-md bg-red-600 px-3 py-2 text-sm font-medium text-white hover:bg-red-500",
10
- data: { turbo_confirm: "Permanently discard all DLQ messages?" } %>
10
+ data: { turbo_confirm: t("pgbus.dead_letter.index.discard_all_confirm") } %>
11
11
  </div>
12
12
  <% end %>
13
13
  </div>
@@ -1,52 +1,52 @@
1
1
  <div class="mb-6">
2
- <%= link_to "&larr; Back to DLQ".html_safe, pgbus.dead_letter_index_path, class: "text-sm text-indigo-600 hover:text-indigo-500" %>
2
+ <%= link_to "\u2190 #{t("pgbus.dead_letter.show.back")}", pgbus.dead_letter_index_path, class: "text-sm text-indigo-600 hover:text-indigo-500" %>
3
3
  </div>
4
4
 
5
5
  <% if @message %>
6
- <h1 class="text-2xl font-bold text-gray-900 dark:text-white mb-6">DLQ Message #<%= @message[:msg_id] %></h1>
6
+ <h1 class="text-2xl font-bold text-gray-900 dark:text-white mb-6"><%= t("pgbus.dead_letter.show.title", id: @message[:msg_id]) %></h1>
7
7
 
8
8
  <div class="rounded-lg bg-white dark:bg-gray-800 shadow ring-1 ring-gray-200 dark:ring-gray-700 p-6 mb-6">
9
9
  <dl class="grid grid-cols-1 gap-4 sm:grid-cols-2">
10
10
  <div>
11
- <dt class="text-sm font-medium text-gray-500">Source Queue</dt>
11
+ <dt class="text-sm font-medium text-gray-500"><%= t("pgbus.dead_letter.show.labels.source_queue") %></dt>
12
12
  <dd class="text-sm text-gray-900 dark:text-white"><%= @message[:queue_name] %></dd>
13
13
  </div>
14
14
  <div>
15
- <dt class="text-sm font-medium text-gray-500">Enqueued At</dt>
15
+ <dt class="text-sm font-medium text-gray-500"><%= t("pgbus.dead_letter.show.labels.enqueued_at") %></dt>
16
16
  <dd class="text-sm text-gray-900 dark:text-white"><%= @message[:enqueued_at] %></dd>
17
17
  </div>
18
18
  <div>
19
- <dt class="text-sm font-medium text-gray-500">Read Count</dt>
19
+ <dt class="text-sm font-medium text-gray-500"><%= t("pgbus.dead_letter.show.labels.read_count") %></dt>
20
20
  <dd class="text-sm text-gray-900 dark:text-white"><%= @message[:read_ct] %></dd>
21
21
  </div>
22
22
  <div>
23
- <dt class="text-sm font-medium text-gray-500">Visibility Timeout</dt>
23
+ <dt class="text-sm font-medium text-gray-500"><%= t("pgbus.dead_letter.show.labels.visibility_timeout") %></dt>
24
24
  <dd class="text-sm text-gray-900 dark:text-white"><%= @message[:vt] %></dd>
25
25
  </div>
26
26
  </dl>
27
27
  </div>
28
28
 
29
29
  <div class="rounded-lg bg-white dark:bg-gray-800 shadow ring-1 ring-gray-200 dark:ring-gray-700 p-6 mb-6">
30
- <h2 class="text-sm font-medium text-gray-500 mb-2">Payload</h2>
30
+ <h2 class="text-sm font-medium text-gray-500 mb-2"><%= t("pgbus.dead_letter.show.payload") %></h2>
31
31
  <pre class="text-xs text-gray-600 bg-gray-50 dark:bg-gray-900 rounded p-4 overflow-x-auto"><%= JSON.pretty_generate(JSON.parse(@message[:message])) rescue @message[:message] %></pre>
32
32
  </div>
33
33
 
34
34
  <% if @message[:headers] %>
35
35
  <div class="rounded-lg bg-white dark:bg-gray-800 shadow ring-1 ring-gray-200 dark:ring-gray-700 p-6 mb-6">
36
- <h2 class="text-sm font-medium text-gray-500 mb-2">Headers</h2>
36
+ <h2 class="text-sm font-medium text-gray-500 mb-2"><%= t("pgbus.dead_letter.show.headers") %></h2>
37
37
  <pre class="text-xs text-gray-600 bg-gray-50 dark:bg-gray-900 rounded p-4 overflow-x-auto"><%= JSON.pretty_generate(JSON.parse(@message[:headers])) rescue @message[:headers] %></pre>
38
38
  </div>
39
39
  <% end %>
40
40
 
41
41
  <div class="flex space-x-2">
42
- <%= button_to "Retry", pgbus.retry_dead_letter_path(@message[:msg_id], queue_name: @message[:queue_name]), method: :post,
42
+ <%= button_to t("pgbus.dead_letter.show.retry"), pgbus.retry_dead_letter_path(@message[:msg_id], queue_name: @message[:queue_name]), method: :post,
43
43
  class: "rounded-md bg-indigo-600 px-4 py-2 text-sm font-medium text-white hover:bg-indigo-500" %>
44
- <%= button_to "Discard", pgbus.discard_dead_letter_path(@message[:msg_id], queue_name: @message[:queue_name]), method: :post,
44
+ <%= button_to t("pgbus.dead_letter.show.discard"), pgbus.discard_dead_letter_path(@message[:msg_id], queue_name: @message[:queue_name]), method: :post,
45
45
  class: "rounded-md bg-red-600 px-4 py-2 text-sm font-medium text-white hover:bg-red-500",
46
- data: { turbo_confirm: "Permanently discard?" } %>
46
+ data: { turbo_confirm: t("pgbus.dead_letter.show.discard_confirm") } %>
47
47
  </div>
48
48
  <% else %>
49
49
  <div class="text-center py-12">
50
- <p class="text-gray-400">Message not found</p>
50
+ <p class="text-gray-400"><%= t("pgbus.dead_letter.show.not_found") %></p>
51
51
  </div>
52
52
  <% end %>
@@ -1,15 +1,15 @@
1
- <h1 class="text-2xl font-bold text-gray-900 dark:text-white mb-6">Events</h1>
1
+ <h1 class="text-2xl font-bold text-gray-900 dark:text-white mb-6"><%= t("pgbus.events.index.title") %></h1>
2
2
 
3
3
  <!-- Registered Subscribers -->
4
4
  <div class="mb-8">
5
- <h2 class="text-lg font-semibold text-gray-900 dark:text-white mb-3">Registered Subscribers</h2>
5
+ <h2 class="text-lg font-semibold text-gray-900 dark:text-white mb-3"><%= t("pgbus.events.index.subscribers_title") %></h2>
6
6
  <div class="overflow-hidden rounded-lg bg-white dark:bg-gray-800 shadow ring-1 ring-gray-200 dark:ring-gray-700">
7
7
  <table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
8
8
  <thead class="bg-gray-50 dark:bg-gray-900">
9
9
  <tr>
10
- <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Pattern</th>
11
- <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Handler</th>
12
- <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Queue</th>
10
+ <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.events.index.subscribers_headers.pattern") %></th>
11
+ <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.events.index.subscribers_headers.handler") %></th>
12
+ <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.events.index.subscribers_headers.queue") %></th>
13
13
  </tr>
14
14
  </thead>
15
15
  <tbody class="divide-y divide-gray-100 dark:divide-gray-700">
@@ -21,7 +21,7 @@
21
21
  </tr>
22
22
  <% end %>
23
23
  <% if @subscribers.empty? %>
24
- <tr><td colspan="3" class="px-4 py-8 text-center text-sm text-gray-400">No subscribers registered</td></tr>
24
+ <tr><td colspan="3" class="px-4 py-8 text-center text-sm text-gray-400"><%= t("pgbus.events.index.subscribers_empty") %></td></tr>
25
25
  <% end %>
26
26
  </tbody>
27
27
  </table>
@@ -30,14 +30,14 @@
30
30
 
31
31
  <!-- Processed Events (Audit Trail) -->
32
32
  <div>
33
- <h2 class="text-lg font-semibold text-gray-900 dark:text-white mb-3">Processed Events</h2>
33
+ <h2 class="text-lg font-semibold text-gray-900 dark:text-white mb-3"><%= t("pgbus.events.index.processed_title") %></h2>
34
34
  <div class="overflow-hidden rounded-lg bg-white dark:bg-gray-800 shadow ring-1 ring-gray-200 dark:ring-gray-700">
35
35
  <table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
36
36
  <thead class="bg-gray-50 dark:bg-gray-900">
37
37
  <tr>
38
- <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Event ID</th>
39
- <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Handler</th>
40
- <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Processed At</th>
38
+ <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.events.index.processed_headers.event_id") %></th>
39
+ <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.events.index.processed_headers.handler") %></th>
40
+ <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.events.index.processed_headers.processed_at") %></th>
41
41
  </tr>
42
42
  </thead>
43
43
  <tbody class="divide-y divide-gray-100 dark:divide-gray-700">
@@ -49,7 +49,7 @@
49
49
  </tr>
50
50
  <% end %>
51
51
  <% if @events.empty? %>
52
- <tr><td colspan="3" class="px-4 py-8 text-center text-sm text-gray-400">No events processed yet</td></tr>
52
+ <tr><td colspan="3" class="px-4 py-8 text-center text-sm text-gray-400"><%= t("pgbus.events.index.processed_empty") %></td></tr>
53
53
  <% end %>
54
54
  </tbody>
55
55
  </table>
@@ -1,28 +1,28 @@
1
1
  <div class="mb-6">
2
- <%= link_to "&larr; Back to Events".html_safe, pgbus.events_path, class: "text-sm text-indigo-600 hover:text-indigo-500" %>
2
+ <%= link_to "\u2190 #{t("pgbus.events.show.back")}", pgbus.events_path, class: "text-sm text-indigo-600 hover:text-indigo-500" %>
3
3
  </div>
4
4
 
5
5
  <% if @event %>
6
- <h1 class="text-2xl font-bold text-gray-900 dark:text-white mb-6">Event <%= @event["event_id"] %></h1>
6
+ <h1 class="text-2xl font-bold text-gray-900 dark:text-white mb-6"><%= t("pgbus.events.show.title", event_id: @event["event_id"]) %></h1>
7
7
 
8
8
  <div class="rounded-lg bg-white dark:bg-gray-800 shadow ring-1 ring-gray-200 dark:ring-gray-700 p-6">
9
9
  <dl class="grid grid-cols-1 gap-4 sm:grid-cols-2">
10
10
  <div>
11
- <dt class="text-sm font-medium text-gray-500">Event ID</dt>
11
+ <dt class="text-sm font-medium text-gray-500"><%= t("pgbus.events.show.labels.event_id") %></dt>
12
12
  <dd class="text-sm font-mono text-gray-900 dark:text-white"><%= @event["event_id"] %></dd>
13
13
  </div>
14
14
  <div>
15
- <dt class="text-sm font-medium text-gray-500">Handler</dt>
15
+ <dt class="text-sm font-medium text-gray-500"><%= t("pgbus.events.show.labels.handler") %></dt>
16
16
  <dd class="text-sm text-gray-900 dark:text-white"><%= @event["handler_class"] %></dd>
17
17
  </div>
18
18
  <div>
19
- <dt class="text-sm font-medium text-gray-500">Processed At</dt>
19
+ <dt class="text-sm font-medium text-gray-500"><%= t("pgbus.events.show.labels.processed_at") %></dt>
20
20
  <dd class="text-sm text-gray-900 dark:text-white"><%= @event["processed_at"] %></dd>
21
21
  </div>
22
22
  </dl>
23
23
  </div>
24
24
  <% else %>
25
25
  <div class="text-center py-12">
26
- <p class="text-gray-400">Event not found</p>
26
+ <p class="text-gray-400"><%= t("pgbus.events.show.not_found") %></p>
27
27
  </div>
28
28
  <% end %>
@@ -1,32 +1,52 @@
1
- <div class="mb-6">
2
- <h1 class="text-2xl font-bold text-gray-900 dark:text-white">Insights</h1>
3
- <p class="mt-1 text-sm text-gray-500 dark:text-gray-400">Job performance metrics for the last hour</p>
1
+ <div class="mb-6 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3">
2
+ <div>
3
+ <h1 class="text-2xl font-bold text-gray-900 dark:text-white"><%= t("pgbus.insights.show.title") %></h1>
4
+ <p class="mt-1 text-sm text-gray-500 dark:text-gray-400"><%= t("pgbus.insights.show.description_html", range: pgbus_time_range_label(@minutes)) %></p>
5
+ </div>
6
+ <nav class="inline-flex rounded-lg shadow-sm" role="group" aria-label="Time range">
7
+ <% ranges = [["1h", 60], ["24h", 1440], ["7d", 10_080], ["30d", 43_200]] %>
8
+ <% ranges.each_with_index do |(label, mins), i| %>
9
+ <%
10
+ active = @minutes == mins
11
+ base = "px-3 py-1.5 text-xs font-medium border border-gray-300 dark:border-gray-600 focus:z-10 focus:outline-none"
12
+ colors = active ?
13
+ "bg-indigo-600 text-white border-indigo-600 dark:border-indigo-500" :
14
+ "bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700"
15
+ rounded = case i
16
+ when 0 then "rounded-l-lg"
17
+ when ranges.length - 1 then "rounded-r-lg"
18
+ else "-ml-px"
19
+ end
20
+ %>
21
+ <%= link_to label, pgbus.insights_path(minutes: mins), class: "#{base} #{colors} #{rounded}" %>
22
+ <% end %>
23
+ </nav>
4
24
  </div>
5
25
 
6
26
  <!-- Summary cards -->
7
27
  <div class="grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-6 mb-8">
8
28
  <div class="rounded-lg bg-white dark:bg-gray-800 p-4 shadow ring-1 ring-gray-200 dark:ring-gray-700">
9
- <dt class="text-xs font-medium uppercase text-gray-500 dark:text-gray-400">Total Jobs</dt>
29
+ <dt class="text-xs font-medium uppercase text-gray-500 dark:text-gray-400"><%= t("pgbus.insights.show.summary.total_jobs") %></dt>
10
30
  <dd class="mt-1 text-2xl font-semibold text-gray-900 dark:text-white"><%= pgbus_number(@summary[:total]) %></dd>
11
31
  </div>
12
32
  <div class="rounded-lg bg-white dark:bg-gray-800 p-4 shadow ring-1 ring-gray-200 dark:ring-gray-700">
13
- <dt class="text-xs font-medium uppercase text-gray-500 dark:text-gray-400">Succeeded</dt>
33
+ <dt class="text-xs font-medium uppercase text-gray-500 dark:text-gray-400"><%= t("pgbus.insights.show.summary.succeeded") %></dt>
14
34
  <dd class="mt-1 text-2xl font-semibold text-green-600 dark:text-green-400"><%= pgbus_number(@summary[:success]) %></dd>
15
35
  </div>
16
36
  <div class="rounded-lg bg-white dark:bg-gray-800 p-4 shadow ring-1 ring-gray-200 dark:ring-gray-700">
17
- <dt class="text-xs font-medium uppercase text-gray-500 dark:text-gray-400">Failed</dt>
37
+ <dt class="text-xs font-medium uppercase text-gray-500 dark:text-gray-400"><%= t("pgbus.insights.show.summary.failed") %></dt>
18
38
  <dd class="mt-1 text-2xl font-semibold text-red-600 dark:text-red-400"><%= pgbus_number(@summary[:failed]) %></dd>
19
39
  </div>
20
40
  <div class="rounded-lg bg-white dark:bg-gray-800 p-4 shadow ring-1 ring-gray-200 dark:ring-gray-700">
21
- <dt class="text-xs font-medium uppercase text-gray-500 dark:text-gray-400">Dead Lettered</dt>
41
+ <dt class="text-xs font-medium uppercase text-gray-500 dark:text-gray-400"><%= t("pgbus.insights.show.summary.dead_lettered") %></dt>
22
42
  <dd class="mt-1 text-2xl font-semibold text-orange-600 dark:text-orange-400"><%= pgbus_number(@summary[:dead_lettered]) %></dd>
23
43
  </div>
24
44
  <div class="rounded-lg bg-white dark:bg-gray-800 p-4 shadow ring-1 ring-gray-200 dark:ring-gray-700">
25
- <dt class="text-xs font-medium uppercase text-gray-500 dark:text-gray-400">Avg Duration</dt>
45
+ <dt class="text-xs font-medium uppercase text-gray-500 dark:text-gray-400"><%= t("pgbus.insights.show.summary.avg_duration") %></dt>
26
46
  <dd class="mt-1 text-2xl font-semibold text-gray-900 dark:text-white"><%= pgbus_ms_duration(@summary[:avg_duration_ms]) %></dd>
27
47
  </div>
28
48
  <div class="rounded-lg bg-white dark:bg-gray-800 p-4 shadow ring-1 ring-gray-200 dark:ring-gray-700">
29
- <dt class="text-xs font-medium uppercase text-gray-500 dark:text-gray-400">Max Duration</dt>
49
+ <dt class="text-xs font-medium uppercase text-gray-500 dark:text-gray-400"><%= t("pgbus.insights.show.summary.max_duration") %></dt>
30
50
  <dd class="mt-1 text-2xl font-semibold text-gray-900 dark:text-white"><%= pgbus_ms_duration(@summary[:max_duration_ms]) %></dd>
31
51
  </div>
32
52
  </div>
@@ -34,11 +54,11 @@
34
54
  <!-- Charts -->
35
55
  <div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8">
36
56
  <div class="rounded-lg bg-white dark:bg-gray-800 p-5 shadow ring-1 ring-gray-200 dark:ring-gray-700">
37
- <h3 class="text-sm font-medium text-gray-700 dark:text-gray-300 mb-4">Throughput (jobs/min)</h3>
57
+ <h3 class="text-sm font-medium text-gray-700 dark:text-gray-300 mb-4"><%= t("pgbus.insights.show.charts.throughput") %></h3>
38
58
  <div id="throughput-chart" style="height: 280px;"></div>
39
59
  </div>
40
60
  <div class="rounded-lg bg-white dark:bg-gray-800 p-5 shadow ring-1 ring-gray-200 dark:ring-gray-700">
41
- <h3 class="text-sm font-medium text-gray-700 dark:text-gray-300 mb-4">Status Distribution</h3>
61
+ <h3 class="text-sm font-medium text-gray-700 dark:text-gray-300 mb-4"><%= t("pgbus.insights.show.charts.status_distribution") %></h3>
42
62
  <div id="status-chart" style="height: 280px;"></div>
43
63
  </div>
44
64
  </div>
@@ -46,15 +66,15 @@
46
66
  <!-- Slowest job classes -->
47
67
  <div class="rounded-lg bg-white dark:bg-gray-800 shadow ring-1 ring-gray-200 dark:ring-gray-700">
48
68
  <div class="px-5 py-4 border-b border-gray-200 dark:border-gray-700">
49
- <h3 class="text-sm font-medium text-gray-700 dark:text-gray-300">Slowest Job Classes (avg duration)</h3>
69
+ <h3 class="text-sm font-medium text-gray-700 dark:text-gray-300"><%= t("pgbus.insights.show.slowest.title") %></h3>
50
70
  </div>
51
71
  <table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
52
72
  <thead class="bg-gray-50 dark:bg-gray-900">
53
73
  <tr>
54
- <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500 dark:text-gray-400">Job Class</th>
55
- <th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500 dark:text-gray-400">Count</th>
56
- <th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500 dark:text-gray-400">Avg</th>
57
- <th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500 dark:text-gray-400">Max</th>
74
+ <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500 dark:text-gray-400"><%= t("pgbus.insights.show.slowest.headers.job_class") %></th>
75
+ <th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500 dark:text-gray-400"><%= t("pgbus.insights.show.slowest.headers.count") %></th>
76
+ <th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500 dark:text-gray-400"><%= t("pgbus.insights.show.slowest.headers.avg") %></th>
77
+ <th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500 dark:text-gray-400"><%= t("pgbus.insights.show.slowest.headers.max") %></th>
58
78
  </tr>
59
79
  </thead>
60
80
  <tbody class="divide-y divide-gray-100 dark:divide-gray-700">
@@ -67,7 +87,7 @@
67
87
  </tr>
68
88
  <% end %>
69
89
  <% if @slowest.empty? %>
70
- <tr><td colspan="4" class="px-4 py-8 text-center text-sm text-gray-400 dark:text-gray-500">No job stats yet</td></tr>
90
+ <tr><td colspan="4" class="px-4 py-8 text-center text-sm text-gray-400 dark:text-gray-500"><%= t("pgbus.insights.show.slowest.empty") %></td></tr>
71
91
  <% end %>
72
92
  </tbody>
73
93
  </table>
@@ -101,7 +121,7 @@
101
121
  }));
102
122
 
103
123
  throughputChart = new ApexCharts(document.querySelector('#throughput-chart'), {
104
- series: [{ name: 'Jobs/min', data: throughputData }],
124
+ series: [{ name: '<%= j(t("pgbus.insights.show.charts.series_name")) %>', data: throughputData }],
105
125
  chart: { type: 'area', height: 280, toolbar: { show: false }, background: 'transparent', foreColor: t.text },
106
126
  stroke: { curve: 'smooth', width: 2 },
107
127
  fill: { type: 'gradient', gradient: { shadeIntensity: 1, opacityFrom: 0.4, opacityTo: 0.05, stops: [0, 100] } },
@@ -137,17 +157,17 @@
137
157
  statusChart.render();
138
158
  } else {
139
159
  document.querySelector('#status-chart').innerHTML =
140
- '<p class="text-center text-sm text-gray-400 dark:text-gray-500 pt-24">No data yet</p>';
160
+ '<p class="text-center text-sm text-gray-400 dark:text-gray-500 pt-24"><%= j(t("pgbus.insights.show.charts.no_data")) %></p>';
141
161
  }
142
162
  }
143
163
 
144
164
  // Fetch data and render
145
165
  let chartData = null;
146
- fetch('<%= pgbus.api_insights_path %>')
166
+ fetch('<%= pgbus.api_insights_path(minutes: @minutes) %>')
147
167
  .then(r => r.json())
148
168
  .then(data => { chartData = data; renderCharts(data); })
149
169
  .catch(() => {
150
- const msg = '<p class="text-center text-sm text-gray-400 dark:text-gray-500 pt-24">Failed to load chart data</p>';
170
+ const msg = '<p class="text-center text-sm text-gray-400 dark:text-gray-500 pt-24"><%= j(t("pgbus.insights.show.charts.failed_to_load")) %></p>';
151
171
  document.querySelector('#throughput-chart').innerHTML = msg;
152
172
  document.querySelector('#status-chart').innerHTML = msg;
153
173
  });
@@ -1,15 +1,15 @@
1
- <turbo-frame id="jobs-enqueued" data-auto-refresh src="<%= pgbus.jobs_path(request.query_parameters.merge(frame: 'enqueued')) %>">
1
+ <turbo-frame id="jobs-enqueued" data-auto-refresh data-src="<%= pgbus.jobs_path(request.query_parameters.merge(frame: 'enqueued')) %>">
2
2
  <div>
3
- <h2 class="text-lg font-semibold text-gray-900 dark:text-white mb-3">Enqueued Jobs</h2>
3
+ <h2 class="text-lg font-semibold text-gray-900 dark:text-white mb-3"><%= t("pgbus.jobs.enqueued_table.title") %></h2>
4
4
  <div class="overflow-hidden rounded-lg bg-white dark:bg-gray-800 shadow ring-1 ring-gray-200 dark:ring-gray-700">
5
5
  <table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
6
6
  <thead class="bg-gray-50 dark:bg-gray-900">
7
7
  <tr>
8
- <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">ID</th>
9
- <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Job Class</th>
10
- <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Queue</th>
11
- <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Enqueued</th>
12
- <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Reads</th>
8
+ <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.jobs.enqueued_table.headers.id") %></th>
9
+ <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.jobs.enqueued_table.headers.job_class") %></th>
10
+ <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.jobs.enqueued_table.headers.queue") %></th>
11
+ <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.jobs.enqueued_table.headers.enqueued") %></th>
12
+ <th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.jobs.enqueued_table.headers.reads") %></th>
13
13
  </tr>
14
14
  </thead>
15
15
  <tbody class="divide-y divide-gray-100 dark:divide-gray-700">
@@ -27,33 +27,33 @@
27
27
  </summary>
28
28
  <div class="px-4 pb-4 bg-gray-50 dark:bg-gray-900 border-t border-gray-100">
29
29
  <div class="flex items-center mt-3 mb-3">
30
- <span class="text-xs font-mono text-gray-400">Job ID: <%= payload["job_id"] %></span>
30
+ <span class="text-xs font-mono text-gray-400"><%= t("pgbus.jobs.enqueued_table.job_id") %> <%= payload["job_id"] %></span>
31
31
  </div>
32
32
  <div class="grid grid-cols-2 gap-4 mb-3">
33
33
  <div>
34
- <span class="text-xs font-medium text-gray-500">Arguments</span>
34
+ <span class="text-xs font-medium text-gray-500"><%= t("pgbus.jobs.enqueued_table.arguments") %></span>
35
35
  <pre class="text-xs text-gray-700 bg-white dark:bg-gray-800 rounded p-2 mt-1 overflow-x-auto max-h-40"><%= JSON.pretty_generate(payload["arguments"] || []) rescue "—" %></pre>
36
36
  </div>
37
37
  <div>
38
- <span class="text-xs font-medium text-gray-500">Metadata</span>
38
+ <span class="text-xs font-medium text-gray-500"><%= t("pgbus.jobs.enqueued_table.metadata") %></span>
39
39
  <div class="text-xs text-gray-600 bg-white dark:bg-gray-800 rounded p-2 mt-1 space-y-1">
40
- <% if payload["queue_name"] %><p><strong>Queue:</strong> <%= payload["queue_name"] %></p><% end %>
41
- <% if payload["priority"] %><p><strong>Priority:</strong> <%= payload["priority"] %></p><% end %>
42
- <% if payload["locale"] %><p><strong>Locale:</strong> <%= payload["locale"] %></p><% end %>
43
- <% if payload["timezone"] %><p><strong>Timezone:</strong> <%= payload["timezone"] %></p><% end %>
44
- <% if payload["scheduled_at"] %><p><strong>Scheduled:</strong> <%= payload["scheduled_at"] %></p><% end %>
45
- <% if j[:vt] %><p><strong>Visible at:</strong> <%= j[:vt] %></p><% end %>
46
- <% if j[:last_read_at] %><p><strong>Last read:</strong> <%= j[:last_read_at] %></p><% end %>
40
+ <% if payload["queue_name"] %><p><strong><%= t("pgbus.jobs.enqueued_table.metadata_labels.queue") %></strong> <%= payload["queue_name"] %></p><% end %>
41
+ <% if payload["priority"] %><p><strong><%= t("pgbus.jobs.enqueued_table.metadata_labels.priority") %></strong> <%= payload["priority"] %></p><% end %>
42
+ <% if payload["locale"] %><p><strong><%= t("pgbus.jobs.enqueued_table.metadata_labels.locale") %></strong> <%= payload["locale"] %></p><% end %>
43
+ <% if payload["timezone"] %><p><strong><%= t("pgbus.jobs.enqueued_table.metadata_labels.timezone") %></strong> <%= payload["timezone"] %></p><% end %>
44
+ <% if payload["scheduled_at"] %><p><strong><%= t("pgbus.jobs.enqueued_table.metadata_labels.scheduled") %></strong> <%= payload["scheduled_at"] %></p><% end %>
45
+ <% if j[:vt] %><p><strong><%= t("pgbus.jobs.enqueued_table.metadata_labels.visible_at") %></strong> <%= j[:vt] %></p><% end %>
46
+ <% if j[:last_read_at] %><p><strong><%= t("pgbus.jobs.enqueued_table.metadata_labels.last_read") %></strong> <%= j[:last_read_at] %></p><% end %>
47
47
  </div>
48
48
  </div>
49
49
  </div>
50
50
  <details class="mt-2">
51
- <summary class="text-xs font-medium text-gray-500 cursor-pointer hover:text-gray-700">Full JSON payload</summary>
51
+ <summary class="text-xs font-medium text-gray-500 cursor-pointer hover:text-gray-700"><%= t("pgbus.jobs.enqueued_table.full_json_payload") %></summary>
52
52
  <pre class="text-xs text-gray-600 bg-white dark:bg-gray-800 rounded p-2 mt-1 overflow-x-auto max-h-96"><%= JSON.pretty_generate(payload) rescue j[:message] %></pre>
53
53
  </details>
54
54
  <% if j[:headers] %>
55
55
  <details class="mt-2">
56
- <summary class="text-xs font-medium text-gray-500 cursor-pointer hover:text-gray-700">Headers</summary>
56
+ <summary class="text-xs font-medium text-gray-500 cursor-pointer hover:text-gray-700"><%= t("pgbus.jobs.enqueued_table.headers_section") %></summary>
57
57
  <pre class="text-xs text-gray-600 bg-white dark:bg-gray-800 rounded p-2 mt-1 overflow-x-auto"><%= JSON.pretty_generate(JSON.parse(j[:headers])) rescue j[:headers] %></pre>
58
58
  </details>
59
59
  <% end %>
@@ -63,7 +63,7 @@
63
63
  </tr>
64
64
  <% end %>
65
65
  <% if @jobs.empty? %>
66
- <tr><td colspan="5" class="px-4 py-8 text-center text-sm text-gray-400">No enqueued jobs</td></tr>
66
+ <tr><td colspan="5" class="px-4 py-8 text-center text-sm text-gray-400"><%= t("pgbus.jobs.enqueued_table.empty") %></td></tr>
67
67
  <% end %>
68
68
  </tbody>
69
69
  </table>