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.
- checksums.yaml +4 -4
- data/Rakefile +88 -25
- data/app/controllers/pgbus/api/insights_controller.rb +5 -4
- data/app/controllers/pgbus/application_controller.rb +40 -0
- data/app/controllers/pgbus/insights_controller.rb +3 -2
- data/app/controllers/pgbus/locale_controller.rb +15 -0
- data/app/helpers/pgbus/application_helper.rb +67 -7
- data/app/views/layouts/pgbus/application.html.erb +51 -16
- data/app/views/pgbus/dashboard/_processes_table.html.erb +7 -7
- data/app/views/pgbus/dashboard/_queues_table.html.erb +9 -9
- data/app/views/pgbus/dashboard/_recent_failures.html.erb +7 -7
- data/app/views/pgbus/dashboard/_stats_cards.html.erb +10 -10
- data/app/views/pgbus/dashboard/show.html.erb +1 -1
- data/app/views/pgbus/dead_letter/_messages_table.html.erb +20 -20
- data/app/views/pgbus/dead_letter/index.html.erb +5 -5
- data/app/views/pgbus/dead_letter/show.html.erb +12 -12
- data/app/views/pgbus/events/index.html.erb +11 -11
- data/app/views/pgbus/events/show.html.erb +6 -6
- data/app/views/pgbus/insights/show.html.erb +41 -21
- data/app/views/pgbus/jobs/_enqueued_table.html.erb +20 -20
- data/app/views/pgbus/jobs/_failed_table.html.erb +12 -12
- data/app/views/pgbus/jobs/index.html.erb +5 -5
- data/app/views/pgbus/jobs/show.html.erb +13 -13
- data/app/views/pgbus/locks/index.html.erb +11 -11
- data/app/views/pgbus/outbox/index.html.erb +15 -15
- data/app/views/pgbus/processes/_processes_table.html.erb +8 -8
- data/app/views/pgbus/processes/index.html.erb +1 -1
- data/app/views/pgbus/queues/_queues_list.html.erb +15 -15
- data/app/views/pgbus/queues/index.html.erb +1 -1
- data/app/views/pgbus/queues/show.html.erb +11 -11
- data/app/views/pgbus/recurring_tasks/_tasks_table.html.erb +15 -15
- data/app/views/pgbus/recurring_tasks/index.html.erb +2 -2
- data/app/views/pgbus/recurring_tasks/show.html.erb +21 -21
- data/config/i18n-tasks.yml +41 -0
- data/config/locales/da.yml +348 -0
- data/config/locales/de.yml +348 -0
- data/config/locales/en.yml +348 -0
- data/config/locales/es.yml +348 -0
- data/config/locales/fi.yml +348 -0
- data/config/locales/fr.yml +348 -0
- data/config/locales/it.yml +348 -0
- data/config/locales/ja.yml +348 -0
- data/config/locales/nb.yml +348 -0
- data/config/locales/nl.yml +348 -0
- data/config/locales/pt.yml +348 -0
- data/config/locales/sv.yml +348 -0
- data/config/routes.rb +2 -0
- data/lib/pgbus/configuration.rb +8 -2
- data/lib/pgbus/engine.rb +4 -0
- data/lib/pgbus/version.rb +1 -1
- metadata +15 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
<turbo-frame id="jobs-failed" data-auto-refresh src="<%= pgbus.jobs_path(frame: 'failed') %>">
|
|
1
|
+
<turbo-frame id="jobs-failed" data-auto-refresh data-src="<%= pgbus.jobs_path(frame: 'failed') %>">
|
|
2
2
|
<div class="mb-8">
|
|
3
|
-
<h2 class="text-lg font-semibold text-gray-900 dark:text-white mb-3"
|
|
3
|
+
<h2 class="text-lg font-semibold text-gray-900 dark:text-white mb-3"><%= t("pgbus.jobs.failed_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"
|
|
9
|
-
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"
|
|
10
|
-
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"
|
|
11
|
-
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"
|
|
12
|
-
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"
|
|
13
|
-
<th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500"
|
|
8
|
+
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.jobs.failed_table.headers.id") %></th>
|
|
9
|
+
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.jobs.failed_table.headers.queue") %></th>
|
|
10
|
+
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.jobs.failed_table.headers.error") %></th>
|
|
11
|
+
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.jobs.failed_table.headers.retries") %></th>
|
|
12
|
+
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.jobs.failed_table.headers.failed") %></th>
|
|
13
|
+
<th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500"><%= t("pgbus.jobs.failed_table.headers.actions") %></th>
|
|
14
14
|
</tr>
|
|
15
15
|
</thead>
|
|
16
16
|
<tbody class="divide-y divide-gray-100 dark:divide-gray-700">
|
|
@@ -26,17 +26,17 @@
|
|
|
26
26
|
<td class="px-4 py-3 text-sm text-gray-500"><%= f["retry_count"] %></td>
|
|
27
27
|
<td class="px-4 py-3 text-sm text-gray-500"><%= pgbus_time_ago(f["failed_at"]) %></td>
|
|
28
28
|
<td class="px-4 py-3 text-sm text-right space-x-2">
|
|
29
|
-
<%= button_to "
|
|
29
|
+
<%= button_to t("pgbus.jobs.failed_table.retry"), pgbus.retry_job_path(f["id"]), method: :post,
|
|
30
30
|
class: "text-xs text-indigo-600 hover:text-indigo-800 font-medium",
|
|
31
31
|
data: { turbo_frame: "_top" } %>
|
|
32
|
-
<%= button_to "
|
|
32
|
+
<%= button_to t("pgbus.jobs.failed_table.discard"), pgbus.discard_job_path(f["id"]), method: :post,
|
|
33
33
|
class: "text-xs text-red-600 hover:text-red-800 font-medium",
|
|
34
|
-
data: { turbo_confirm: "
|
|
34
|
+
data: { turbo_confirm: t("pgbus.jobs.failed_table.discard_confirm"), turbo_frame: "_top" } %>
|
|
35
35
|
</td>
|
|
36
36
|
</tr>
|
|
37
37
|
<% end %>
|
|
38
38
|
<% if @failed.empty? %>
|
|
39
|
-
<tr><td colspan="6" class="px-4 py-8 text-center text-sm text-gray-400"
|
|
39
|
+
<tr><td colspan="6" class="px-4 py-8 text-center text-sm text-gray-400"><%= t("pgbus.jobs.failed_table.empty") %></td></tr>
|
|
40
40
|
<% end %>
|
|
41
41
|
</tbody>
|
|
42
42
|
</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"
|
|
2
|
+
<h1 class="text-2xl font-bold text-gray-900 dark:text-white"><%= t("pgbus.jobs.index.title") %></h1>
|
|
3
3
|
<% if @failed.any? %>
|
|
4
4
|
<div class="flex space-x-2">
|
|
5
|
-
<%= button_to "
|
|
5
|
+
<%= button_to t("pgbus.jobs.index.retry_all"), pgbus.retry_all_jobs_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: "
|
|
8
|
-
<%= button_to "
|
|
7
|
+
data: { turbo_confirm: t("pgbus.jobs.index.retry_all_confirm") } %>
|
|
8
|
+
<%= button_to t("pgbus.jobs.index.discard_all"), pgbus.discard_all_jobs_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: "
|
|
10
|
+
data: { turbo_confirm: t("pgbus.jobs.index.discard_all_confirm") } %>
|
|
11
11
|
</div>
|
|
12
12
|
<% end %>
|
|
13
13
|
</div>
|
|
@@ -1,57 +1,57 @@
|
|
|
1
1
|
<div class="mb-6">
|
|
2
|
-
<%= link_to "
|
|
2
|
+
<%= link_to "\u2190 #{t("pgbus.jobs.show.back")}", pgbus.jobs_path, class: "text-sm text-indigo-600 hover:text-indigo-500" %>
|
|
3
3
|
</div>
|
|
4
4
|
|
|
5
5
|
<% if @job %>
|
|
6
|
-
<h1 class="text-2xl font-bold text-gray-900 dark:text-white mb-6"
|
|
6
|
+
<h1 class="text-2xl font-bold text-gray-900 dark:text-white mb-6"><%= t("pgbus.jobs.show.title", id: @job["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"
|
|
11
|
+
<dt class="text-sm font-medium text-gray-500"><%= t("pgbus.jobs.show.labels.queue") %></dt>
|
|
12
12
|
<dd class="text-sm text-gray-900 dark:text-white"><%= @job["queue_name"] %></dd>
|
|
13
13
|
</div>
|
|
14
14
|
<div>
|
|
15
|
-
<dt class="text-sm font-medium text-gray-500"
|
|
15
|
+
<dt class="text-sm font-medium text-gray-500"><%= t("pgbus.jobs.show.labels.failed_at") %></dt>
|
|
16
16
|
<dd class="text-sm text-gray-900 dark:text-white"><%= @job["failed_at"] %></dd>
|
|
17
17
|
</div>
|
|
18
18
|
<div>
|
|
19
|
-
<dt class="text-sm font-medium text-gray-500"
|
|
19
|
+
<dt class="text-sm font-medium text-gray-500"><%= t("pgbus.jobs.show.labels.error_class") %></dt>
|
|
20
20
|
<dd class="text-sm text-red-600 font-medium"><%= @job["error_class"] %></dd>
|
|
21
21
|
</div>
|
|
22
22
|
<div>
|
|
23
|
-
<dt class="text-sm font-medium text-gray-500"
|
|
23
|
+
<dt class="text-sm font-medium text-gray-500"><%= t("pgbus.jobs.show.labels.retry_count") %></dt>
|
|
24
24
|
<dd class="text-sm text-gray-900 dark:text-white"><%= @job["retry_count"] %></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"
|
|
30
|
+
<h2 class="text-sm font-medium text-gray-500 mb-2"><%= t("pgbus.jobs.show.error_message") %></h2>
|
|
31
31
|
<p class="text-sm text-red-700"><%= @job["error_message"] %></p>
|
|
32
32
|
</div>
|
|
33
33
|
|
|
34
34
|
<% if @job["backtrace"].present? %>
|
|
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"
|
|
36
|
+
<h2 class="text-sm font-medium text-gray-500 mb-2"><%= t("pgbus.jobs.show.backtrace") %></h2>
|
|
37
37
|
<pre class="text-xs text-gray-600 bg-gray-50 dark:bg-gray-900 rounded p-4 overflow-x-auto max-h-96"><%= @job["backtrace"] %></pre>
|
|
38
38
|
</div>
|
|
39
39
|
<% end %>
|
|
40
40
|
|
|
41
41
|
<div class="rounded-lg bg-white dark:bg-gray-800 shadow ring-1 ring-gray-200 dark:ring-gray-700 p-6 mb-6">
|
|
42
|
-
<h2 class="text-sm font-medium text-gray-500 mb-2"
|
|
42
|
+
<h2 class="text-sm font-medium text-gray-500 mb-2"><%= t("pgbus.jobs.show.payload") %></h2>
|
|
43
43
|
<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(@job["payload"])) rescue @job["payload"] %></pre>
|
|
44
44
|
</div>
|
|
45
45
|
|
|
46
46
|
<div class="flex space-x-2">
|
|
47
|
-
<%= button_to "
|
|
47
|
+
<%= button_to t("pgbus.jobs.show.retry"), pgbus.retry_job_path(@job["id"]), method: :post,
|
|
48
48
|
class: "rounded-md bg-indigo-600 px-4 py-2 text-sm font-medium text-white hover:bg-indigo-500" %>
|
|
49
|
-
<%= button_to "
|
|
49
|
+
<%= button_to t("pgbus.jobs.show.discard"), pgbus.discard_job_path(@job["id"]), method: :post,
|
|
50
50
|
class: "rounded-md bg-red-600 px-4 py-2 text-sm font-medium text-white hover:bg-red-500",
|
|
51
|
-
data: { turbo_confirm: "
|
|
51
|
+
data: { turbo_confirm: t("pgbus.jobs.show.discard_confirm") } %>
|
|
52
52
|
</div>
|
|
53
53
|
<% else %>
|
|
54
54
|
<div class="text-center py-12">
|
|
55
|
-
<p class="text-gray-400"
|
|
55
|
+
<p class="text-gray-400"><%= t("pgbus.jobs.show.not_found") %></p>
|
|
56
56
|
</div>
|
|
57
57
|
<% end %>
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<div class="mb-6">
|
|
2
|
-
<h1 class="text-2xl font-bold text-gray-900 dark:text-white"
|
|
3
|
-
<p class="mt-1 text-sm text-gray-500 dark:text-gray-400"
|
|
2
|
+
<h1 class="text-2xl font-bold text-gray-900 dark:text-white"><%= t("pgbus.locks.index.title") %></h1>
|
|
3
|
+
<p class="mt-1 text-sm text-gray-500 dark:text-gray-400"><%= t("pgbus.locks.index.description") %></p>
|
|
4
4
|
</div>
|
|
5
5
|
|
|
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 dark:text-gray-400"
|
|
11
|
-
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500 dark:text-gray-400"
|
|
12
|
-
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500 dark:text-gray-400"
|
|
13
|
-
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500 dark:text-gray-400"
|
|
14
|
-
<th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500 dark:text-gray-400"
|
|
15
|
-
<th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500 dark:text-gray-400"
|
|
10
|
+
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500 dark:text-gray-400"><%= t("pgbus.locks.index.headers.lock_key") %></th>
|
|
11
|
+
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500 dark:text-gray-400"><%= t("pgbus.locks.index.headers.job_class") %></th>
|
|
12
|
+
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500 dark:text-gray-400"><%= t("pgbus.locks.index.headers.state") %></th>
|
|
13
|
+
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500 dark:text-gray-400"><%= t("pgbus.locks.index.headers.owner") %></th>
|
|
14
|
+
<th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500 dark:text-gray-400"><%= t("pgbus.locks.index.headers.age") %></th>
|
|
15
|
+
<th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500 dark:text-gray-400"><%= t("pgbus.locks.index.headers.expires") %></th>
|
|
16
16
|
</tr>
|
|
17
17
|
</thead>
|
|
18
18
|
<tbody class="divide-y divide-gray-100 dark:divide-gray-700">
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
<td class="px-4 py-3 text-sm text-gray-700 dark:text-gray-300"><%= lock[:job_class] %></td>
|
|
23
23
|
<td class="px-4 py-3 text-sm">
|
|
24
24
|
<% if lock[:state] == "executing" %>
|
|
25
|
-
<span class="inline-flex items-center rounded-full bg-blue-100 dark:bg-blue-900/50 px-2.5 py-0.5 text-xs font-medium text-blue-800 dark:text-blue-300"
|
|
25
|
+
<span class="inline-flex items-center rounded-full bg-blue-100 dark:bg-blue-900/50 px-2.5 py-0.5 text-xs font-medium text-blue-800 dark:text-blue-300"><%= t("pgbus.locks.index.executing") %></span>
|
|
26
26
|
<% else %>
|
|
27
|
-
<span class="inline-flex items-center rounded-full bg-yellow-100 dark:bg-yellow-900/50 px-2.5 py-0.5 text-xs font-medium text-yellow-800 dark:text-yellow-300"
|
|
27
|
+
<span class="inline-flex items-center rounded-full bg-yellow-100 dark:bg-yellow-900/50 px-2.5 py-0.5 text-xs font-medium text-yellow-800 dark:text-yellow-300"><%= t("pgbus.locks.index.queued") %></span>
|
|
28
28
|
<% end %>
|
|
29
29
|
</td>
|
|
30
30
|
<td class="px-4 py-3 text-sm text-gray-500 dark:text-gray-400">
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
</tr>
|
|
47
47
|
<% end %>
|
|
48
48
|
<% if @locks.empty? %>
|
|
49
|
-
<tr><td colspan="6" class="px-4 py-8 text-center text-sm text-gray-400 dark:text-gray-500"
|
|
49
|
+
<tr><td colspan="6" class="px-4 py-8 text-center text-sm text-gray-400 dark:text-gray-500"><%= t("pgbus.locks.index.empty") %></td></tr>
|
|
50
50
|
<% end %>
|
|
51
51
|
</tbody>
|
|
52
52
|
</table>
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
<div class="mb-6">
|
|
2
|
-
<h1 class="text-2xl font-bold text-gray-900 dark:text-white"
|
|
3
|
-
<p class="mt-1 text-sm text-gray-500"
|
|
2
|
+
<h1 class="text-2xl font-bold text-gray-900 dark:text-white"><%= t("pgbus.outbox.index.title") %></h1>
|
|
3
|
+
<p class="mt-1 text-sm text-gray-500"><%= t("pgbus.outbox.index.description") %></p>
|
|
4
4
|
</div>
|
|
5
5
|
|
|
6
6
|
<div class="mb-6 grid grid-cols-3 gap-4">
|
|
7
7
|
<div class="rounded-lg bg-white dark:bg-gray-800 p-4 shadow ring-1 ring-gray-200 dark:ring-gray-700">
|
|
8
|
-
<dt class="text-xs font-medium uppercase text-gray-500"
|
|
8
|
+
<dt class="text-xs font-medium uppercase text-gray-500"><%= t("pgbus.outbox.index.stats.unpublished") %></dt>
|
|
9
9
|
<dd class="mt-1 text-2xl font-semibold text-gray-900 dark:text-white"><%= pgbus_number(@stats[:unpublished]) %></dd>
|
|
10
10
|
</div>
|
|
11
11
|
<div class="rounded-lg bg-white dark:bg-gray-800 p-4 shadow ring-1 ring-gray-200 dark:ring-gray-700">
|
|
12
|
-
<dt class="text-xs font-medium uppercase text-gray-500"
|
|
12
|
+
<dt class="text-xs font-medium uppercase text-gray-500"><%= t("pgbus.outbox.index.stats.total") %></dt>
|
|
13
13
|
<dd class="mt-1 text-2xl font-semibold text-gray-900 dark:text-white"><%= pgbus_number(@stats[:total]) %></dd>
|
|
14
14
|
</div>
|
|
15
15
|
<div class="rounded-lg bg-white dark:bg-gray-800 p-4 shadow ring-1 ring-gray-200 dark:ring-gray-700">
|
|
16
|
-
<dt class="text-xs font-medium uppercase text-gray-500"
|
|
17
|
-
<dd class="mt-1 text-2xl font-semibold text-gray-900 dark:text-white"><%= @stats[:oldest_unpublished_age] ? "
|
|
16
|
+
<dt class="text-xs font-medium uppercase text-gray-500"><%= t("pgbus.outbox.index.stats.oldest_unpublished") %></dt>
|
|
17
|
+
<dd class="mt-1 text-2xl font-semibold text-gray-900 dark:text-white"><%= @stats[:oldest_unpublished_age] ? t("pgbus.outbox.index.stats.oldest_age", seconds: @stats[:oldest_unpublished_age]) : t("pgbus.outbox.index.stats.no_age") %></dd>
|
|
18
18
|
</div>
|
|
19
19
|
</div>
|
|
20
20
|
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
|
|
23
23
|
<thead class="bg-gray-50 dark:bg-gray-900">
|
|
24
24
|
<tr>
|
|
25
|
-
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"
|
|
26
|
-
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"
|
|
27
|
-
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"
|
|
28
|
-
<th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500"
|
|
29
|
-
<th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500"
|
|
30
|
-
<th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500"
|
|
25
|
+
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.outbox.index.headers.id") %></th>
|
|
26
|
+
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.outbox.index.headers.queue_topic") %></th>
|
|
27
|
+
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.outbox.index.headers.payload") %></th>
|
|
28
|
+
<th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500"><%= t("pgbus.outbox.index.headers.priority") %></th>
|
|
29
|
+
<th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500"><%= t("pgbus.outbox.index.headers.status") %></th>
|
|
30
|
+
<th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500"><%= t("pgbus.outbox.index.headers.created") %></th>
|
|
31
31
|
</tr>
|
|
32
32
|
</thead>
|
|
33
33
|
<tbody class="divide-y divide-gray-100 dark:divide-gray-700">
|
|
@@ -39,16 +39,16 @@
|
|
|
39
39
|
<td class="px-4 py-3 text-sm text-right text-gray-500"><%= entry.priority %></td>
|
|
40
40
|
<td class="px-4 py-3 text-sm text-right">
|
|
41
41
|
<% if entry.published_at %>
|
|
42
|
-
<span class="inline-flex items-center rounded-full bg-green-100 px-2 py-0.5 text-xs font-medium text-green-800"
|
|
42
|
+
<span class="inline-flex items-center rounded-full bg-green-100 px-2 py-0.5 text-xs font-medium text-green-800"><%= t("pgbus.outbox.index.published") %></span>
|
|
43
43
|
<% else %>
|
|
44
|
-
<span class="inline-flex items-center rounded-full bg-yellow-100 px-2 py-0.5 text-xs font-medium text-yellow-800"
|
|
44
|
+
<span class="inline-flex items-center rounded-full bg-yellow-100 px-2 py-0.5 text-xs font-medium text-yellow-800"><%= t("pgbus.outbox.index.pending") %></span>
|
|
45
45
|
<% end %>
|
|
46
46
|
</td>
|
|
47
47
|
<td class="px-4 py-3 text-sm text-right text-gray-500"><%= pgbus_time_ago(entry.created_at) %></td>
|
|
48
48
|
</tr>
|
|
49
49
|
<% end %>
|
|
50
50
|
<% if @entries.empty? %>
|
|
51
|
-
<tr><td colspan="6" class="px-4 py-8 text-center text-sm text-gray-400"
|
|
51
|
+
<tr><td colspan="6" class="px-4 py-8 text-center text-sm text-gray-400"><%= t("pgbus.outbox.index.empty") %></td></tr>
|
|
52
52
|
<% end %>
|
|
53
53
|
</tbody>
|
|
54
54
|
</table>
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
<turbo-frame id="processes-list" data-auto-refresh src="<%= pgbus.processes_path(frame: 'list') %>">
|
|
1
|
+
<turbo-frame id="processes-list" data-auto-refresh data-src="<%= pgbus.processes_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"
|
|
7
|
-
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"
|
|
8
|
-
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"
|
|
9
|
-
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"
|
|
10
|
-
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"
|
|
11
|
-
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"
|
|
6
|
+
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.processes.processes_table.headers.kind") %></th>
|
|
7
|
+
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.processes.processes_table.headers.hostname") %></th>
|
|
8
|
+
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.processes.processes_table.headers.pid") %></th>
|
|
9
|
+
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.processes.processes_table.headers.status") %></th>
|
|
10
|
+
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.processes.processes_table.headers.last_heartbeat") %></th>
|
|
11
|
+
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.processes.processes_table.headers.metadata") %></th>
|
|
12
12
|
</tr>
|
|
13
13
|
</thead>
|
|
14
14
|
<tbody class="divide-y divide-gray-100 dark:divide-gray-700">
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
</tr>
|
|
30
30
|
<% end %>
|
|
31
31
|
<% if @processes.empty? %>
|
|
32
|
-
<tr><td colspan="6" class="px-4 py-8 text-center text-sm text-gray-400"
|
|
32
|
+
<tr><td colspan="6" class="px-4 py-8 text-center text-sm text-gray-400"><%= t("pgbus.processes.processes_table.empty") %></td></tr>
|
|
33
33
|
<% end %>
|
|
34
34
|
</tbody>
|
|
35
35
|
</table>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
<turbo-frame id="queues-list" data-auto-refresh src="<%= pgbus.queues_path(frame: 'list') %>">
|
|
1
|
+
<turbo-frame id="queues-list" data-auto-refresh data-src="<%= pgbus.queues_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"
|
|
7
|
-
<th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500"
|
|
8
|
-
<th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500"
|
|
9
|
-
<th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500"
|
|
10
|
-
<th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500"
|
|
11
|
-
<th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500"
|
|
12
|
-
<th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500"
|
|
6
|
+
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.queues.queues_list.headers.queue") %></th>
|
|
7
|
+
<th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500"><%= t("pgbus.queues.queues_list.headers.depth") %></th>
|
|
8
|
+
<th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500"><%= t("pgbus.queues.queues_list.headers.visible") %></th>
|
|
9
|
+
<th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500"><%= t("pgbus.queues.queues_list.headers.oldest") %></th>
|
|
10
|
+
<th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500"><%= t("pgbus.queues.queues_list.headers.newest") %></th>
|
|
11
|
+
<th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500"><%= t("pgbus.queues.queues_list.headers.total_ever") %></th>
|
|
12
|
+
<th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500"><%= t("pgbus.queues.queues_list.headers.actions") %></th>
|
|
13
13
|
</tr>
|
|
14
14
|
</thead>
|
|
15
15
|
<tbody class="divide-y divide-gray-100 dark:divide-gray-700">
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<%= link_to q[:name], pgbus.queue_path(name: q[:name]), class: "font-medium text-indigo-600 hover:text-indigo-500", data: { turbo_frame: "_top" } %>
|
|
20
20
|
<%= pgbus_queue_badge(q[:name]) %>
|
|
21
21
|
<% if q[:paused] %>
|
|
22
|
-
<span class="inline-flex items-center rounded-full bg-yellow-100 px-2 py-0.5 text-xs font-medium text-yellow-800"
|
|
22
|
+
<span class="inline-flex items-center rounded-full bg-yellow-100 px-2 py-0.5 text-xs font-medium text-yellow-800"><%= t("pgbus.queues.queues_list.paused") %></span>
|
|
23
23
|
<% end %>
|
|
24
24
|
</td>
|
|
25
25
|
<td class="px-4 py-3 text-sm text-right font-mono text-gray-700"><%= pgbus_number(q[:queue_length]) %></td>
|
|
@@ -29,25 +29,25 @@
|
|
|
29
29
|
<td class="px-4 py-3 text-sm text-right text-gray-500"><%= pgbus_number(q[:total_messages]) %></td>
|
|
30
30
|
<td class="px-4 py-3 text-sm text-right space-x-2">
|
|
31
31
|
<% if q[:paused] %>
|
|
32
|
-
<%= button_to "
|
|
32
|
+
<%= button_to t("pgbus.queues.queues_list.resume"), pgbus.resume_queue_path(name: q[:name]),
|
|
33
33
|
method: :post,
|
|
34
34
|
class: "text-xs text-green-600 hover:text-green-800 font-medium",
|
|
35
35
|
data: { turbo_frame: "_top" } %>
|
|
36
36
|
<% else %>
|
|
37
|
-
<%= button_to "
|
|
37
|
+
<%= button_to t("pgbus.queues.queues_list.pause"), pgbus.pause_queue_path(name: q[:name]),
|
|
38
38
|
method: :post,
|
|
39
39
|
class: "text-xs text-yellow-600 hover:text-yellow-800 font-medium",
|
|
40
|
-
data: { turbo_confirm: "
|
|
40
|
+
data: { turbo_confirm: t("pgbus.queues.queues_list.pause_confirm", name: q[:name]), turbo_frame: "_top" } %>
|
|
41
41
|
<% end %>
|
|
42
|
-
<%= button_to "
|
|
42
|
+
<%= button_to t("pgbus.queues.queues_list.purge"), pgbus.purge_queue_path(name: q[:name]),
|
|
43
43
|
method: :post,
|
|
44
44
|
class: "text-xs text-red-600 hover:text-red-800 font-medium",
|
|
45
|
-
data: { turbo_confirm: "
|
|
45
|
+
data: { turbo_confirm: t("pgbus.queues.queues_list.purge_confirm", name: q[:name]), turbo_frame: "_top" } %>
|
|
46
46
|
</td>
|
|
47
47
|
</tr>
|
|
48
48
|
<% end %>
|
|
49
49
|
<% if @queues.empty? %>
|
|
50
|
-
<tr><td colspan="7" class="px-4 py-8 text-center text-sm text-gray-400"
|
|
50
|
+
<tr><td colspan="7" class="px-4 py-8 text-center text-sm text-gray-400"><%= t("pgbus.queues.queues_list.empty") %></td></tr>
|
|
51
51
|
<% end %>
|
|
52
52
|
</tbody>
|
|
53
53
|
</table>
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
<h1 class="text-2xl font-bold text-gray-900 dark:text-white"><%= @queue&.dig(:name) || params[:name] %></h1>
|
|
4
4
|
<% if @queue %>
|
|
5
5
|
<p class="text-sm text-gray-500 mt-1">
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
<%= t("pgbus.queues.show.depth") %> <span class="font-mono"><%= @queue[:queue_length] %></span> |
|
|
7
|
+
<%= t("pgbus.queues.show.visible") %> <span class="font-mono"><%= @queue[:queue_visible_length] %></span> |
|
|
8
|
+
<%= t("pgbus.queues.show.total") %> <span class="font-mono"><%= pgbus_number(@queue[:total_messages]) %></span>
|
|
9
9
|
</p>
|
|
10
10
|
<% end %>
|
|
11
11
|
</div>
|
|
12
12
|
<div class="flex space-x-2">
|
|
13
|
-
<%= button_to "
|
|
13
|
+
<%= button_to t("pgbus.queues.show.purge_queue"), pgbus.purge_queue_path(name: params[:name]),
|
|
14
14
|
method: :post,
|
|
15
15
|
class: "rounded-md bg-red-600 px-3 py-2 text-sm font-medium text-white hover:bg-red-500",
|
|
16
|
-
data: { turbo_confirm: "
|
|
16
|
+
data: { turbo_confirm: t("pgbus.queues.show.purge_confirm") } %>
|
|
17
17
|
</div>
|
|
18
18
|
</div>
|
|
19
19
|
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
|
|
23
23
|
<thead class="bg-gray-50 dark:bg-gray-900">
|
|
24
24
|
<tr>
|
|
25
|
-
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"
|
|
26
|
-
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"
|
|
27
|
-
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"
|
|
28
|
-
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"
|
|
29
|
-
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"
|
|
25
|
+
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.queues.show.headers.id") %></th>
|
|
26
|
+
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.queues.show.headers.enqueued") %></th>
|
|
27
|
+
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.queues.show.headers.reads") %></th>
|
|
28
|
+
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.queues.show.headers.vt") %></th>
|
|
29
|
+
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"><%= t("pgbus.queues.show.headers.payload") %></th>
|
|
30
30
|
</tr>
|
|
31
31
|
</thead>
|
|
32
32
|
<tbody class="divide-y divide-gray-100 dark:divide-gray-700">
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
</tr>
|
|
43
43
|
<% end %>
|
|
44
44
|
<% if @messages.empty? %>
|
|
45
|
-
<tr><td colspan="5" class="px-4 py-8 text-center text-sm text-gray-400"
|
|
45
|
+
<tr><td colspan="5" class="px-4 py-8 text-center text-sm text-gray-400"><%= t("pgbus.queues.show.empty") %></td></tr>
|
|
46
46
|
<% end %>
|
|
47
47
|
</tbody>
|
|
48
48
|
</table>
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
<turbo-frame id="recurring-tasks" data-auto-refresh src="<%= pgbus.recurring_tasks_path(frame: 'recurring_tasks') %>">
|
|
1
|
+
<turbo-frame id="recurring-tasks" data-auto-refresh data-src="<%= pgbus.recurring_tasks_path(frame: 'recurring_tasks') %>">
|
|
2
2
|
<div class="rounded-lg bg-white dark:bg-gray-800 shadow ring-1 ring-gray-200 dark:ring-gray-700">
|
|
3
3
|
<% if @recurring_tasks.empty? %>
|
|
4
4
|
<div class="p-8 text-center text-gray-500">
|
|
5
|
-
<p class="text-lg font-medium"
|
|
6
|
-
<p class="mt-1 text-sm"
|
|
5
|
+
<p class="text-lg font-medium"><%= t("pgbus.recurring_tasks.tasks_table.empty_title") %></p>
|
|
6
|
+
<p class="mt-1 text-sm"><%= t("pgbus.recurring_tasks.tasks_table.empty_hint") %></p>
|
|
7
7
|
</div>
|
|
8
8
|
<% else %>
|
|
9
9
|
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
|
|
10
10
|
<thead class="bg-gray-50 dark:bg-gray-900">
|
|
11
11
|
<tr>
|
|
12
|
-
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"
|
|
13
|
-
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"
|
|
14
|
-
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"
|
|
15
|
-
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"
|
|
16
|
-
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"
|
|
17
|
-
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"
|
|
18
|
-
<th class="px-4 py-3 text-right text-xs font-medium text-gray-500 uppercase"
|
|
12
|
+
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"><%= t("pgbus.recurring_tasks.tasks_table.headers.task") %></th>
|
|
13
|
+
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"><%= t("pgbus.recurring_tasks.tasks_table.headers.schedule") %></th>
|
|
14
|
+
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"><%= t("pgbus.recurring_tasks.tasks_table.headers.queue") %></th>
|
|
15
|
+
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"><%= t("pgbus.recurring_tasks.tasks_table.headers.last_run") %></th>
|
|
16
|
+
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"><%= t("pgbus.recurring_tasks.tasks_table.headers.next_run") %></th>
|
|
17
|
+
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"><%= t("pgbus.recurring_tasks.tasks_table.headers.status") %></th>
|
|
18
|
+
<th class="px-4 py-3 text-right text-xs font-medium text-gray-500 uppercase"><%= t("pgbus.recurring_tasks.tasks_table.headers.actions") %></th>
|
|
19
19
|
</tr>
|
|
20
20
|
</thead>
|
|
21
21
|
<tbody class="divide-y divide-gray-200 dark:divide-gray-700">
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
<% end %>
|
|
39
39
|
</td>
|
|
40
40
|
<td class="px-4 py-3 text-sm text-gray-600">
|
|
41
|
-
<%= task[:queue_name] || "
|
|
41
|
+
<%= task[:queue_name] || t("pgbus.recurring_tasks.tasks_table.default_queue") %>
|
|
42
42
|
</td>
|
|
43
43
|
<td class="px-4 py-3 text-sm text-gray-600">
|
|
44
|
-
<%= task[:last_run_at] ? pgbus_time_ago(task[:last_run_at]) : "
|
|
44
|
+
<%= task[:last_run_at] ? pgbus_time_ago(task[:last_run_at]) : t("pgbus.recurring_tasks.tasks_table.never") %>
|
|
45
45
|
</td>
|
|
46
46
|
<td class="px-4 py-3 text-sm text-gray-600">
|
|
47
47
|
<% if task[:enabled] && task[:next_run_at] %>
|
|
@@ -55,17 +55,17 @@
|
|
|
55
55
|
<%= pgbus_recurring_health_badge(task) %>
|
|
56
56
|
<% else %>
|
|
57
57
|
<span class="inline-flex items-center rounded-full bg-gray-100 px-2.5 py-0.5 text-xs font-medium text-gray-600">
|
|
58
|
-
|
|
58
|
+
<%= t("pgbus.recurring_tasks.tasks_table.disabled") %>
|
|
59
59
|
</span>
|
|
60
60
|
<% end %>
|
|
61
61
|
</td>
|
|
62
62
|
<td class="px-4 py-3 text-right space-x-1">
|
|
63
|
-
<%= button_to task[:enabled] ? "
|
|
63
|
+
<%= button_to task[:enabled] ? t("pgbus.recurring_tasks.tasks_table.disable") : t("pgbus.recurring_tasks.tasks_table.enable"),
|
|
64
64
|
pgbus.toggle_recurring_task_path(task[:id]),
|
|
65
65
|
class: "inline-flex items-center rounded px-2 py-1 text-xs font-medium " \
|
|
66
66
|
"#{task[:enabled] ? 'bg-yellow-100 text-yellow-700 hover:bg-yellow-200' : 'bg-green-100 text-green-700 hover:bg-green-200'}" %>
|
|
67
67
|
<% if task[:enabled] %>
|
|
68
|
-
<%= button_to "
|
|
68
|
+
<%= button_to t("pgbus.recurring_tasks.tasks_table.run_now"),
|
|
69
69
|
pgbus.enqueue_recurring_task_path(task[:id]),
|
|
70
70
|
class: "inline-flex items-center rounded bg-blue-100 px-2 py-1 text-xs font-medium text-blue-700 hover:bg-blue-200" %>
|
|
71
71
|
<% end %>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<div class="flex items-center justify-between mb-6">
|
|
2
|
-
<h1 class="text-2xl font-bold text-gray-900 dark:text-white"
|
|
3
|
-
<span class="text-sm text-gray-500"><%= @recurring_tasks.size
|
|
2
|
+
<h1 class="text-2xl font-bold text-gray-900 dark:text-white"><%= t("pgbus.recurring_tasks.index.title") %></h1>
|
|
3
|
+
<span class="text-sm text-gray-500"><%= t("pgbus.recurring_tasks.index.task_count", count: @recurring_tasks.size) %></span>
|
|
4
4
|
</div>
|
|
5
5
|
|
|
6
6
|
<%= render "pgbus/recurring_tasks/tasks_table" %>
|