pgbus 0.1.6 → 0.1.7
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/app/views/layouts/pgbus/application.html.erb +5 -6
- data/app/views/pgbus/dashboard/_processes_table.html.erb +6 -6
- data/app/views/pgbus/dashboard/_queues_table.html.erb +6 -6
- data/app/views/pgbus/dashboard/_recent_failures.html.erb +5 -5
- data/app/views/pgbus/dashboard/show.html.erb +1 -1
- data/app/views/pgbus/dead_letter/_messages_table.html.erb +12 -12
- data/app/views/pgbus/dead_letter/index.html.erb +1 -1
- data/app/views/pgbus/dead_letter/show.html.erb +10 -10
- data/app/views/pgbus/events/index.html.erb +15 -15
- data/app/views/pgbus/events/show.html.erb +5 -5
- data/app/views/pgbus/insights/show.html.erb +5 -5
- data/app/views/pgbus/jobs/_enqueued_table.html.erb +13 -13
- data/app/views/pgbus/jobs/_failed_table.html.erb +7 -7
- data/app/views/pgbus/jobs/index.html.erb +1 -1
- data/app/views/pgbus/jobs/show.html.erb +10 -10
- data/app/views/pgbus/outbox/index.html.erb +12 -12
- data/app/views/pgbus/processes/_processes_table.html.erb +6 -6
- data/app/views/pgbus/processes/index.html.erb +1 -1
- data/app/views/pgbus/queues/_queues_list.html.erb +5 -5
- data/app/views/pgbus/queues/index.html.erb +1 -1
- data/app/views/pgbus/queues/show.html.erb +7 -7
- data/app/views/pgbus/recurring_tasks/_tasks_table.html.erb +6 -6
- data/app/views/pgbus/recurring_tasks/index.html.erb +1 -1
- data/app/views/pgbus/recurring_tasks/show.html.erb +22 -22
- data/lib/pgbus/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 38d33f96cb4a6aa5255b33951818a1a975168d5d40b2b9bc391d8967e00e9854
|
|
4
|
+
data.tar.gz: 3c5dae7b2e4f31c63b81b1f11a4d6b96239f8bb5b7589a4465ae0a0834f88f8c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 97330cb59c83f37706c2a1ae5b6ce3c309ab4113287b92e077b34de05242d1fa65b4b0eda488fdc050e5bf0fb896eca0837986f85f3781dbaf0c6ff9ea3248b3
|
|
7
|
+
data.tar.gz: ea013b795cf6b677373a1ecf161c7b85633d18f2abf95e0155d2bb870fa0f6f222c499511392d21c9ea9b1ee9ade9862a561d12e38c975f58873ed1abe0f0d13
|
|
@@ -12,6 +12,11 @@
|
|
|
12
12
|
(!localStorage.getItem('pgbus-dark') && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
|
|
13
13
|
document.documentElement.classList.add('dark');
|
|
14
14
|
}
|
|
15
|
+
// Dark mode toggle — must be in non-module script for onclick access
|
|
16
|
+
function toggleDarkMode() {
|
|
17
|
+
var isDark = document.documentElement.classList.toggle('dark');
|
|
18
|
+
localStorage.setItem('pgbus-dark', isDark);
|
|
19
|
+
}
|
|
15
20
|
</script>
|
|
16
21
|
<script type="module">
|
|
17
22
|
import * as Turbo from "https://cdn.jsdelivr.net/npm/@hotwired/turbo@8/dist/turbo.es2017.esm.js";
|
|
@@ -31,12 +36,6 @@
|
|
|
31
36
|
start();
|
|
32
37
|
}
|
|
33
38
|
<% end %>
|
|
34
|
-
|
|
35
|
-
// Dark mode toggle
|
|
36
|
-
window.toggleDarkMode = function() {
|
|
37
|
-
const isDark = document.documentElement.classList.toggle('dark');
|
|
38
|
-
localStorage.setItem('pgbus-dark', isDark);
|
|
39
|
-
};
|
|
40
39
|
</script>
|
|
41
40
|
</head>
|
|
42
41
|
<body class="h-full bg-gray-50 dark:bg-gray-950 transition-colors">
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<turbo-frame id="dashboard-processes" data-auto-refresh src="<%= pgbus.root_path(frame: 'processes') %>">
|
|
2
2
|
<div>
|
|
3
|
-
<h2 class="text-lg font-semibold text-gray-900 mb-3">Active Processes</h2>
|
|
4
|
-
<div class="overflow-hidden rounded-lg bg-white shadow ring-1 ring-gray-200">
|
|
5
|
-
<table class="min-w-full divide-y divide-gray-200">
|
|
6
|
-
<thead class="bg-gray-50">
|
|
3
|
+
<h2 class="text-lg font-semibold text-gray-900 dark:text-white mb-3">Active Processes</h2>
|
|
4
|
+
<div class="overflow-hidden rounded-lg bg-white dark:bg-gray-800 shadow ring-1 ring-gray-200 dark:ring-gray-700">
|
|
5
|
+
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
|
|
6
|
+
<thead class="bg-gray-50 dark:bg-gray-900">
|
|
7
7
|
<tr>
|
|
8
8
|
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Kind</th>
|
|
9
9
|
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Host</th>
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Status</th>
|
|
12
12
|
</tr>
|
|
13
13
|
</thead>
|
|
14
|
-
<tbody class="divide-y divide-gray-100">
|
|
14
|
+
<tbody class="divide-y divide-gray-100 dark:divide-gray-700">
|
|
15
15
|
<% @processes.each do |p| %>
|
|
16
16
|
<tr>
|
|
17
|
-
<td class="px-4 py-3 text-sm font-medium text-gray-900"><%= p[:kind] %></td>
|
|
17
|
+
<td class="px-4 py-3 text-sm font-medium text-gray-900 dark:text-white"><%= p[:kind] %></td>
|
|
18
18
|
<td class="px-4 py-3 text-sm text-gray-500"><%= p[:hostname] %></td>
|
|
19
19
|
<td class="px-4 py-3 text-sm text-gray-500"><%= p[:pid] %></td>
|
|
20
20
|
<td class="px-4 py-3 text-sm"><%= pgbus_status_badge(p[:healthy]) %></td>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<turbo-frame id="dashboard-queues" data-auto-refresh src="<%= pgbus.root_path(frame: 'queues') %>">
|
|
2
2
|
<div class="mb-8">
|
|
3
3
|
<div class="flex items-center justify-between mb-3">
|
|
4
|
-
<h2 class="text-lg font-semibold text-gray-900">Queues</h2>
|
|
4
|
+
<h2 class="text-lg font-semibold text-gray-900 dark:text-white">Queues</h2>
|
|
5
5
|
<%= link_to "View all", pgbus.queues_path, class: "text-sm text-indigo-600 hover:text-indigo-500", data: { turbo_frame: "_top" } %>
|
|
6
6
|
</div>
|
|
7
7
|
|
|
8
|
-
<div class="overflow-hidden rounded-lg bg-white shadow ring-1 ring-gray-200">
|
|
9
|
-
<table class="min-w-full divide-y divide-gray-200">
|
|
10
|
-
<thead class="bg-gray-50">
|
|
8
|
+
<div class="overflow-hidden rounded-lg bg-white dark:bg-gray-800 shadow ring-1 ring-gray-200 dark:ring-gray-700">
|
|
9
|
+
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
|
|
10
|
+
<thead class="bg-gray-50 dark:bg-gray-900">
|
|
11
11
|
<tr>
|
|
12
12
|
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Queue</th>
|
|
13
13
|
<th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500">Depth</th>
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
<th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500">Total</th>
|
|
17
17
|
</tr>
|
|
18
18
|
</thead>
|
|
19
|
-
<tbody class="divide-y divide-gray-100">
|
|
19
|
+
<tbody class="divide-y divide-gray-100 dark:divide-gray-700">
|
|
20
20
|
<% @queues.each do |q| %>
|
|
21
|
-
<tr class="hover:bg-gray-50">
|
|
21
|
+
<tr class="hover:bg-gray-50 dark:hover:bg-gray-700/50 dark:bg-gray-900">
|
|
22
22
|
<td class="px-4 py-3 text-sm">
|
|
23
23
|
<%= link_to q[:name], pgbus.queue_path(name: q[:name]), class: "font-medium text-indigo-600 hover:text-indigo-500", data: { turbo_frame: "_top" } %>
|
|
24
24
|
<%= pgbus_queue_badge(q[:name]) %>
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
<turbo-frame id="dashboard-failures" data-auto-refresh src="<%= pgbus.root_path(frame: 'failures') %>">
|
|
2
2
|
<div>
|
|
3
3
|
<div class="flex items-center justify-between mb-3">
|
|
4
|
-
<h2 class="text-lg font-semibold text-gray-900">Recent Failures</h2>
|
|
4
|
+
<h2 class="text-lg font-semibold text-gray-900 dark:text-white">Recent Failures</h2>
|
|
5
5
|
<% if @recent_failures.any? %>
|
|
6
6
|
<%= link_to "View all", pgbus.jobs_path(status: "failed"), class: "text-sm text-indigo-600 hover:text-indigo-500", data: { turbo_frame: "_top" } %>
|
|
7
7
|
<% end %>
|
|
8
8
|
</div>
|
|
9
|
-
<div class="overflow-hidden rounded-lg bg-white shadow ring-1 ring-gray-200">
|
|
10
|
-
<table class="min-w-full divide-y divide-gray-200">
|
|
11
|
-
<thead class="bg-gray-50">
|
|
9
|
+
<div class="overflow-hidden rounded-lg bg-white dark:bg-gray-800 shadow ring-1 ring-gray-200 dark:ring-gray-700">
|
|
10
|
+
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
|
|
11
|
+
<thead class="bg-gray-50 dark:bg-gray-900">
|
|
12
12
|
<tr>
|
|
13
13
|
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Queue</th>
|
|
14
14
|
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Error</th>
|
|
15
15
|
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">When</th>
|
|
16
16
|
</tr>
|
|
17
17
|
</thead>
|
|
18
|
-
<tbody class="divide-y divide-gray-100">
|
|
18
|
+
<tbody class="divide-y divide-gray-100 dark:divide-gray-700">
|
|
19
19
|
<% @recent_failures.each do |f| %>
|
|
20
20
|
<tr>
|
|
21
21
|
<td class="px-4 py-3 text-sm text-gray-700"><%= f["queue_name"] %></td>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<turbo-frame id="dlq-messages" data-auto-refresh src="<%= pgbus.dead_letter_index_path(frame: 'list') %>">
|
|
2
|
-
<div class="overflow-hidden rounded-lg bg-white shadow ring-1 ring-gray-200">
|
|
3
|
-
<table class="min-w-full divide-y divide-gray-200">
|
|
4
|
-
<thead class="bg-gray-50">
|
|
2
|
+
<div class="overflow-hidden rounded-lg bg-white dark:bg-gray-800 shadow ring-1 ring-gray-200 dark:ring-gray-700">
|
|
3
|
+
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
|
|
4
|
+
<thead class="bg-gray-50 dark:bg-gray-900">
|
|
5
5
|
<tr>
|
|
6
6
|
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">ID</th>
|
|
7
7
|
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Job Class</th>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Reads</th>
|
|
11
11
|
</tr>
|
|
12
12
|
</thead>
|
|
13
|
-
<tbody class="divide-y divide-gray-100">
|
|
13
|
+
<tbody class="divide-y divide-gray-100 dark:divide-gray-700">
|
|
14
14
|
<% @messages.each do |m| %>
|
|
15
15
|
<% payload = pgbus_parse_message(m[:message]) %>
|
|
16
16
|
<% dlq_suffix = Pgbus.configuration.dead_letter_queue_suffix %>
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
<tr>
|
|
19
19
|
<td colspan="5" class="p-0">
|
|
20
20
|
<details class="group">
|
|
21
|
-
<summary class="flex cursor-pointer hover:bg-gray-50 list-none">
|
|
22
|
-
<span class="w-16 shrink-0 px-4 py-3 text-sm font-mono text-gray-900"><%= m[:msg_id] %></span>
|
|
23
|
-
<span class="flex-1 px-4 py-3 text-sm font-medium text-gray-900"><%= payload["job_class"] || "—" %></span>
|
|
21
|
+
<summary class="flex cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700/50 dark:bg-gray-900 list-none">
|
|
22
|
+
<span class="w-16 shrink-0 px-4 py-3 text-sm font-mono text-gray-900 dark:text-white"><%= m[:msg_id] %></span>
|
|
23
|
+
<span class="flex-1 px-4 py-3 text-sm font-medium text-gray-900 dark:text-white"><%= payload["job_class"] || "—" %></span>
|
|
24
24
|
<span class="w-40 shrink-0 px-4 py-3 text-sm text-gray-700"><%= source_queue %></span>
|
|
25
25
|
<span class="w-28 shrink-0 px-4 py-3 text-sm text-gray-500"><%= pgbus_time_ago(m[:enqueued_at]) %></span>
|
|
26
26
|
<span class="w-16 shrink-0 px-4 py-3 text-sm text-gray-500"><%= m[:read_ct] %></span>
|
|
27
27
|
</summary>
|
|
28
|
-
<div class="px-4 pb-4 bg-gray-50 border-t border-gray-100">
|
|
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
30
|
<span class="text-xs font-mono text-gray-400">Job ID: <%= payload["job_id"] %></span>
|
|
31
31
|
<div class="flex space-x-2">
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
<div class="grid grid-cols-2 gap-4 mb-3">
|
|
41
41
|
<div>
|
|
42
42
|
<span class="text-xs font-medium text-gray-500">Arguments</span>
|
|
43
|
-
<pre class="text-xs text-gray-700 bg-white rounded p-2 mt-1 overflow-x-auto max-h-40"><%= JSON.pretty_generate(payload["arguments"] || []) rescue "—" %></pre>
|
|
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
46
|
<span class="text-xs font-medium text-gray-500">Metadata</span>
|
|
47
|
-
<div class="text-xs text-gray-600 bg-white rounded p-2 mt-1 space-y-1">
|
|
47
|
+
<div class="text-xs text-gray-600 bg-white dark:bg-gray-800 rounded p-2 mt-1 space-y-1">
|
|
48
48
|
<% if payload["queue_name"] %><p><strong>Queue:</strong> <%= payload["queue_name"] %></p><% end %>
|
|
49
49
|
<% if payload["priority"] %><p><strong>Priority:</strong> <%= payload["priority"] %></p><% end %>
|
|
50
50
|
<% if payload["executions"] %><p><strong>Executions:</strong> <%= payload["executions"] %></p><% end %>
|
|
@@ -55,12 +55,12 @@
|
|
|
55
55
|
</div>
|
|
56
56
|
<details class="mt-2">
|
|
57
57
|
<summary class="text-xs font-medium text-gray-500 cursor-pointer hover:text-gray-700">Full JSON payload</summary>
|
|
58
|
-
<pre class="text-xs text-gray-600 bg-white rounded p-2 mt-1 overflow-x-auto max-h-96"><%= JSON.pretty_generate(payload) rescue m[:message] %></pre>
|
|
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
62
|
<summary class="text-xs font-medium text-gray-500 cursor-pointer hover:text-gray-700">Headers</summary>
|
|
63
|
-
<pre class="text-xs text-gray-600 bg-white rounded p-2 mt-1 overflow-x-auto"><%= JSON.pretty_generate(JSON.parse(m[:headers])) rescue m[:headers] %></pre>
|
|
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 %>
|
|
66
66
|
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div class="flex items-center justify-between mb-6">
|
|
2
|
-
<h1 class="text-2xl font-bold text-gray-900">Dead Letter Queue</h1>
|
|
2
|
+
<h1 class="text-2xl font-bold text-gray-900 dark:text-white">Dead Letter Queue</h1>
|
|
3
3
|
<% if @messages.any? %>
|
|
4
4
|
<div class="flex space-x-2">
|
|
5
5
|
<%= button_to "Retry All", pgbus.retry_all_dead_letter_index_path, method: :post,
|
|
@@ -3,38 +3,38 @@
|
|
|
3
3
|
</div>
|
|
4
4
|
|
|
5
5
|
<% if @message %>
|
|
6
|
-
<h1 class="text-2xl font-bold text-gray-900 mb-6">DLQ Message #<%= @message[:msg_id] %></h1>
|
|
6
|
+
<h1 class="text-2xl font-bold text-gray-900 dark:text-white mb-6">DLQ Message #<%= @message[:msg_id] %></h1>
|
|
7
7
|
|
|
8
|
-
<div class="rounded-lg bg-white shadow ring-1 ring-gray-200 p-6 mb-6">
|
|
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
11
|
<dt class="text-sm font-medium text-gray-500">Source Queue</dt>
|
|
12
|
-
<dd class="text-sm text-gray-900"><%= @message[:queue_name] %></dd>
|
|
12
|
+
<dd class="text-sm text-gray-900 dark:text-white"><%= @message[:queue_name] %></dd>
|
|
13
13
|
</div>
|
|
14
14
|
<div>
|
|
15
15
|
<dt class="text-sm font-medium text-gray-500">Enqueued At</dt>
|
|
16
|
-
<dd class="text-sm text-gray-900"><%= @message[:enqueued_at] %></dd>
|
|
16
|
+
<dd class="text-sm text-gray-900 dark:text-white"><%= @message[:enqueued_at] %></dd>
|
|
17
17
|
</div>
|
|
18
18
|
<div>
|
|
19
19
|
<dt class="text-sm font-medium text-gray-500">Read Count</dt>
|
|
20
|
-
<dd class="text-sm text-gray-900"><%= @message[:read_ct] %></dd>
|
|
20
|
+
<dd class="text-sm text-gray-900 dark:text-white"><%= @message[:read_ct] %></dd>
|
|
21
21
|
</div>
|
|
22
22
|
<div>
|
|
23
23
|
<dt class="text-sm font-medium text-gray-500">Visibility Timeout</dt>
|
|
24
|
-
<dd class="text-sm text-gray-900"><%= @message[:vt] %></dd>
|
|
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
|
-
<div class="rounded-lg bg-white shadow ring-1 ring-gray-200 p-6 mb-6">
|
|
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
30
|
<h2 class="text-sm font-medium text-gray-500 mb-2">Payload</h2>
|
|
31
|
-
<pre class="text-xs text-gray-600 bg-gray-50 rounded p-4 overflow-x-auto"><%= JSON.pretty_generate(JSON.parse(@message[:message])) rescue @message[:message] %></pre>
|
|
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
|
-
<div class="rounded-lg bg-white shadow ring-1 ring-gray-200 p-6 mb-6">
|
|
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
36
|
<h2 class="text-sm font-medium text-gray-500 mb-2">Headers</h2>
|
|
37
|
-
<pre class="text-xs text-gray-600 bg-gray-50 rounded p-4 overflow-x-auto"><%= JSON.pretty_generate(JSON.parse(@message[:headers])) rescue @message[:headers] %></pre>
|
|
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
|
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
<h1 class="text-2xl font-bold text-gray-900 mb-6">Events</h1>
|
|
1
|
+
<h1 class="text-2xl font-bold text-gray-900 dark:text-white mb-6">Events</h1>
|
|
2
2
|
|
|
3
3
|
<!-- Registered Subscribers -->
|
|
4
4
|
<div class="mb-8">
|
|
5
|
-
<h2 class="text-lg font-semibold text-gray-900 mb-3">Registered Subscribers</h2>
|
|
6
|
-
<div class="overflow-hidden rounded-lg bg-white shadow ring-1 ring-gray-200">
|
|
7
|
-
<table class="min-w-full divide-y divide-gray-200">
|
|
8
|
-
<thead class="bg-gray-50">
|
|
5
|
+
<h2 class="text-lg font-semibold text-gray-900 dark:text-white mb-3">Registered Subscribers</h2>
|
|
6
|
+
<div class="overflow-hidden rounded-lg bg-white dark:bg-gray-800 shadow ring-1 ring-gray-200 dark:ring-gray-700">
|
|
7
|
+
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
|
|
8
|
+
<thead class="bg-gray-50 dark:bg-gray-900">
|
|
9
9
|
<tr>
|
|
10
10
|
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Pattern</th>
|
|
11
11
|
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Handler</th>
|
|
12
12
|
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Queue</th>
|
|
13
13
|
</tr>
|
|
14
14
|
</thead>
|
|
15
|
-
<tbody class="divide-y divide-gray-100">
|
|
15
|
+
<tbody class="divide-y divide-gray-100 dark:divide-gray-700">
|
|
16
16
|
<% @subscribers.each do |s| %>
|
|
17
|
-
<tr class="hover:bg-gray-50">
|
|
17
|
+
<tr class="hover:bg-gray-50 dark:hover:bg-gray-700/50 dark:bg-gray-900">
|
|
18
18
|
<td class="px-4 py-3 text-sm font-mono text-indigo-600"><%= s[:pattern] %></td>
|
|
19
|
-
<td class="px-4 py-3 text-sm text-gray-900"><%= s[:handler_class] %></td>
|
|
19
|
+
<td class="px-4 py-3 text-sm text-gray-900 dark:text-white"><%= s[:handler_class] %></td>
|
|
20
20
|
<td class="px-4 py-3 text-sm text-gray-500"><%= s[:queue_name] %></td>
|
|
21
21
|
</tr>
|
|
22
22
|
<% end %>
|
|
@@ -30,20 +30,20 @@
|
|
|
30
30
|
|
|
31
31
|
<!-- Processed Events (Audit Trail) -->
|
|
32
32
|
<div>
|
|
33
|
-
<h2 class="text-lg font-semibold text-gray-900 mb-3">Processed Events</h2>
|
|
34
|
-
<div class="overflow-hidden rounded-lg bg-white shadow ring-1 ring-gray-200">
|
|
35
|
-
<table class="min-w-full divide-y divide-gray-200">
|
|
36
|
-
<thead class="bg-gray-50">
|
|
33
|
+
<h2 class="text-lg font-semibold text-gray-900 dark:text-white mb-3">Processed Events</h2>
|
|
34
|
+
<div class="overflow-hidden rounded-lg bg-white dark:bg-gray-800 shadow ring-1 ring-gray-200 dark:ring-gray-700">
|
|
35
|
+
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
|
|
36
|
+
<thead class="bg-gray-50 dark:bg-gray-900">
|
|
37
37
|
<tr>
|
|
38
38
|
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Event ID</th>
|
|
39
39
|
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Handler</th>
|
|
40
40
|
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Processed At</th>
|
|
41
41
|
</tr>
|
|
42
42
|
</thead>
|
|
43
|
-
<tbody class="divide-y divide-gray-100">
|
|
43
|
+
<tbody class="divide-y divide-gray-100 dark:divide-gray-700">
|
|
44
44
|
<% @events.each do |e| %>
|
|
45
|
-
<tr class="hover:bg-gray-50">
|
|
46
|
-
<td class="px-4 py-3 text-sm font-mono text-gray-900"><%= e["event_id"] %></td>
|
|
45
|
+
<tr class="hover:bg-gray-50 dark:hover:bg-gray-700/50 dark:bg-gray-900">
|
|
46
|
+
<td class="px-4 py-3 text-sm font-mono text-gray-900 dark:text-white"><%= e["event_id"] %></td>
|
|
47
47
|
<td class="px-4 py-3 text-sm text-gray-700"><%= e["handler_class"] %></td>
|
|
48
48
|
<td class="px-4 py-3 text-sm text-gray-500"><%= pgbus_time_ago(e["processed_at"]) %></td>
|
|
49
49
|
</tr>
|
|
@@ -3,21 +3,21 @@
|
|
|
3
3
|
</div>
|
|
4
4
|
|
|
5
5
|
<% if @event %>
|
|
6
|
-
<h1 class="text-2xl font-bold text-gray-900 mb-6">Event <%= @event["event_id"] %></h1>
|
|
6
|
+
<h1 class="text-2xl font-bold text-gray-900 dark:text-white mb-6">Event <%= @event["event_id"] %></h1>
|
|
7
7
|
|
|
8
|
-
<div class="rounded-lg bg-white shadow ring-1 ring-gray-200 p-6">
|
|
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
11
|
<dt class="text-sm font-medium text-gray-500">Event ID</dt>
|
|
12
|
-
<dd class="text-sm font-mono text-gray-900"><%= @event["event_id"] %></dd>
|
|
12
|
+
<dd class="text-sm font-mono text-gray-900 dark:text-white"><%= @event["event_id"] %></dd>
|
|
13
13
|
</div>
|
|
14
14
|
<div>
|
|
15
15
|
<dt class="text-sm font-medium text-gray-500">Handler</dt>
|
|
16
|
-
<dd class="text-sm text-gray-900"><%= @event["handler_class"] %></dd>
|
|
16
|
+
<dd class="text-sm text-gray-900 dark:text-white"><%= @event["handler_class"] %></dd>
|
|
17
17
|
</div>
|
|
18
18
|
<div>
|
|
19
19
|
<dt class="text-sm font-medium text-gray-500">Processed At</dt>
|
|
20
|
-
<dd class="text-sm text-gray-900"><%= @event["processed_at"] %></dd>
|
|
20
|
+
<dd class="text-sm text-gray-900 dark:text-white"><%= @event["processed_at"] %></dd>
|
|
21
21
|
</div>
|
|
22
22
|
</dl>
|
|
23
23
|
</div>
|
|
@@ -152,10 +152,10 @@
|
|
|
152
152
|
document.querySelector('#status-chart').innerHTML = msg;
|
|
153
153
|
});
|
|
154
154
|
|
|
155
|
-
// Re-render charts when dark mode toggles
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
155
|
+
// Re-render charts when dark mode toggles.
|
|
156
|
+
// Listen for class changes on <html> instead of wrapping the toggle function,
|
|
157
|
+
// so it works regardless of script loading order.
|
|
158
|
+
new MutationObserver(function() {
|
|
159
159
|
if (chartData) renderCharts(chartData);
|
|
160
|
-
};
|
|
160
|
+
}).observe(document.documentElement, { attributes: true, attributeFilter: ['class'] });
|
|
161
161
|
</script>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<turbo-frame id="jobs-enqueued" data-auto-refresh src="<%= pgbus.jobs_path(request.query_parameters.merge(frame: 'enqueued')) %>">
|
|
2
2
|
<div>
|
|
3
|
-
<h2 class="text-lg font-semibold text-gray-900 mb-3">Enqueued Jobs</h2>
|
|
4
|
-
<div class="overflow-hidden rounded-lg bg-white shadow ring-1 ring-gray-200">
|
|
5
|
-
<table class="min-w-full divide-y divide-gray-200">
|
|
6
|
-
<thead class="bg-gray-50">
|
|
3
|
+
<h2 class="text-lg font-semibold text-gray-900 dark:text-white mb-3">Enqueued Jobs</h2>
|
|
4
|
+
<div class="overflow-hidden rounded-lg bg-white dark:bg-gray-800 shadow ring-1 ring-gray-200 dark:ring-gray-700">
|
|
5
|
+
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
|
|
6
|
+
<thead class="bg-gray-50 dark:bg-gray-900">
|
|
7
7
|
<tr>
|
|
8
8
|
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">ID</th>
|
|
9
9
|
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Job Class</th>
|
|
@@ -12,31 +12,31 @@
|
|
|
12
12
|
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Reads</th>
|
|
13
13
|
</tr>
|
|
14
14
|
</thead>
|
|
15
|
-
<tbody class="divide-y divide-gray-100">
|
|
15
|
+
<tbody class="divide-y divide-gray-100 dark:divide-gray-700">
|
|
16
16
|
<% @jobs.each do |j| %>
|
|
17
17
|
<% payload = pgbus_parse_message(j[:message]) %>
|
|
18
18
|
<tr>
|
|
19
19
|
<td colspan="5" class="p-0">
|
|
20
20
|
<details class="group">
|
|
21
|
-
<summary class="flex cursor-pointer hover:bg-gray-50 list-none">
|
|
22
|
-
<span class="w-16 shrink-0 px-4 py-3 text-sm font-mono text-gray-900"><%= j[:msg_id] %></span>
|
|
23
|
-
<span class="flex-1 px-4 py-3 text-sm font-medium text-gray-900"><%= payload["job_class"] || "—" %></span>
|
|
21
|
+
<summary class="flex cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700/50 dark:bg-gray-900 list-none">
|
|
22
|
+
<span class="w-16 shrink-0 px-4 py-3 text-sm font-mono text-gray-900 dark:text-white"><%= j[:msg_id] %></span>
|
|
23
|
+
<span class="flex-1 px-4 py-3 text-sm font-medium text-gray-900 dark:text-white"><%= payload["job_class"] || "—" %></span>
|
|
24
24
|
<span class="w-40 shrink-0 px-4 py-3 text-sm text-gray-700"><%= j[:queue_name] %></span>
|
|
25
25
|
<span class="w-28 shrink-0 px-4 py-3 text-sm text-gray-500"><%= pgbus_time_ago(j[:enqueued_at]) %></span>
|
|
26
26
|
<span class="w-16 shrink-0 px-4 py-3 text-sm text-gray-500"><%= j[:read_ct] %></span>
|
|
27
27
|
</summary>
|
|
28
|
-
<div class="px-4 pb-4 bg-gray-50 border-t border-gray-100">
|
|
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
30
|
<span class="text-xs font-mono text-gray-400">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
34
|
<span class="text-xs font-medium text-gray-500">Arguments</span>
|
|
35
|
-
<pre class="text-xs text-gray-700 bg-white rounded p-2 mt-1 overflow-x-auto max-h-40"><%= JSON.pretty_generate(payload["arguments"] || []) rescue "—" %></pre>
|
|
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
38
|
<span class="text-xs font-medium text-gray-500">Metadata</span>
|
|
39
|
-
<div class="text-xs text-gray-600 bg-white rounded p-2 mt-1 space-y-1">
|
|
39
|
+
<div class="text-xs text-gray-600 bg-white dark:bg-gray-800 rounded p-2 mt-1 space-y-1">
|
|
40
40
|
<% if payload["queue_name"] %><p><strong>Queue:</strong> <%= payload["queue_name"] %></p><% end %>
|
|
41
41
|
<% if payload["priority"] %><p><strong>Priority:</strong> <%= payload["priority"] %></p><% end %>
|
|
42
42
|
<% if payload["locale"] %><p><strong>Locale:</strong> <%= payload["locale"] %></p><% end %>
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
</div>
|
|
50
50
|
<details class="mt-2">
|
|
51
51
|
<summary class="text-xs font-medium text-gray-500 cursor-pointer hover:text-gray-700">Full JSON payload</summary>
|
|
52
|
-
<pre class="text-xs text-gray-600 bg-white rounded p-2 mt-1 overflow-x-auto max-h-96"><%= JSON.pretty_generate(payload) rescue j[:message] %></pre>
|
|
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
56
|
<summary class="text-xs font-medium text-gray-500 cursor-pointer hover:text-gray-700">Headers</summary>
|
|
57
|
-
<pre class="text-xs text-gray-600 bg-white rounded p-2 mt-1 overflow-x-auto"><%= JSON.pretty_generate(JSON.parse(j[:headers])) rescue j[:headers] %></pre>
|
|
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 %>
|
|
60
60
|
</div>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<turbo-frame id="jobs-failed" data-auto-refresh src="<%= pgbus.jobs_path(frame: 'failed') %>">
|
|
2
2
|
<div class="mb-8">
|
|
3
|
-
<h2 class="text-lg font-semibold text-gray-900 mb-3">Failed Jobs</h2>
|
|
4
|
-
<div class="overflow-hidden rounded-lg bg-white shadow ring-1 ring-gray-200">
|
|
5
|
-
<table class="min-w-full divide-y divide-gray-200">
|
|
6
|
-
<thead class="bg-gray-50">
|
|
3
|
+
<h2 class="text-lg font-semibold text-gray-900 dark:text-white mb-3">Failed Jobs</h2>
|
|
4
|
+
<div class="overflow-hidden rounded-lg bg-white dark:bg-gray-800 shadow ring-1 ring-gray-200 dark:ring-gray-700">
|
|
5
|
+
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
|
|
6
|
+
<thead class="bg-gray-50 dark:bg-gray-900">
|
|
7
7
|
<tr>
|
|
8
8
|
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">ID</th>
|
|
9
9
|
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Queue</th>
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
<th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500">Actions</th>
|
|
14
14
|
</tr>
|
|
15
15
|
</thead>
|
|
16
|
-
<tbody class="divide-y divide-gray-100">
|
|
16
|
+
<tbody class="divide-y divide-gray-100 dark:divide-gray-700">
|
|
17
17
|
<% @failed.each do |f| %>
|
|
18
|
-
<tr class="hover:bg-gray-50">
|
|
19
|
-
<td class="px-4 py-3 text-sm font-mono text-gray-900">
|
|
18
|
+
<tr class="hover:bg-gray-50 dark:hover:bg-gray-700/50 dark:bg-gray-900">
|
|
19
|
+
<td class="px-4 py-3 text-sm font-mono text-gray-900 dark:text-white">
|
|
20
20
|
<%= link_to f["id"], pgbus.job_path(f["id"]), class: "text-indigo-600 hover:text-indigo-500", data: { turbo_frame: "_top" } %>
|
|
21
21
|
</td>
|
|
22
22
|
<td class="px-4 py-3 text-sm text-gray-700"><%= f["queue_name"] %></td>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div class="flex items-center justify-between mb-6">
|
|
2
|
-
<h1 class="text-2xl font-bold text-gray-900">Jobs</h1>
|
|
2
|
+
<h1 class="text-2xl font-bold text-gray-900 dark:text-white">Jobs</h1>
|
|
3
3
|
<% if @failed.any? %>
|
|
4
4
|
<div class="flex space-x-2">
|
|
5
5
|
<%= button_to "Retry All", pgbus.retry_all_jobs_path, method: :post,
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
</div>
|
|
4
4
|
|
|
5
5
|
<% if @job %>
|
|
6
|
-
<h1 class="text-2xl font-bold text-gray-900 mb-6">Failed Job #<%= @job["id"] %></h1>
|
|
6
|
+
<h1 class="text-2xl font-bold text-gray-900 dark:text-white mb-6">Failed Job #<%= @job["id"] %></h1>
|
|
7
7
|
|
|
8
|
-
<div class="rounded-lg bg-white shadow ring-1 ring-gray-200 p-6 mb-6">
|
|
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
11
|
<dt class="text-sm font-medium text-gray-500">Queue</dt>
|
|
12
|
-
<dd class="text-sm text-gray-900"><%= @job["queue_name"] %></dd>
|
|
12
|
+
<dd class="text-sm text-gray-900 dark:text-white"><%= @job["queue_name"] %></dd>
|
|
13
13
|
</div>
|
|
14
14
|
<div>
|
|
15
15
|
<dt class="text-sm font-medium text-gray-500">Failed At</dt>
|
|
16
|
-
<dd class="text-sm text-gray-900"><%= @job["failed_at"] %></dd>
|
|
16
|
+
<dd class="text-sm text-gray-900 dark:text-white"><%= @job["failed_at"] %></dd>
|
|
17
17
|
</div>
|
|
18
18
|
<div>
|
|
19
19
|
<dt class="text-sm font-medium text-gray-500">Error Class</dt>
|
|
@@ -21,26 +21,26 @@
|
|
|
21
21
|
</div>
|
|
22
22
|
<div>
|
|
23
23
|
<dt class="text-sm font-medium text-gray-500">Retry Count</dt>
|
|
24
|
-
<dd class="text-sm text-gray-900"><%= @job["retry_count"] %></dd>
|
|
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
|
-
<div class="rounded-lg bg-white shadow ring-1 ring-gray-200 p-6 mb-6">
|
|
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
30
|
<h2 class="text-sm font-medium text-gray-500 mb-2">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
|
-
<div class="rounded-lg bg-white shadow ring-1 ring-gray-200 p-6 mb-6">
|
|
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
36
|
<h2 class="text-sm font-medium text-gray-500 mb-2">Backtrace</h2>
|
|
37
|
-
<pre class="text-xs text-gray-600 bg-gray-50 rounded p-4 overflow-x-auto max-h-96"><%= @job["backtrace"] %></pre>
|
|
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
|
-
<div class="rounded-lg bg-white shadow ring-1 ring-gray-200 p-6 mb-6">
|
|
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
42
|
<h2 class="text-sm font-medium text-gray-500 mb-2">Payload</h2>
|
|
43
|
-
<pre class="text-xs text-gray-600 bg-gray-50 rounded p-4 overflow-x-auto"><%= JSON.pretty_generate(JSON.parse(@job["payload"])) rescue @job["payload"] %></pre>
|
|
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">
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
<div class="mb-6">
|
|
2
|
-
<h1 class="text-2xl font-bold text-gray-900">Outbox</h1>
|
|
2
|
+
<h1 class="text-2xl font-bold text-gray-900 dark:text-white">Outbox</h1>
|
|
3
3
|
<p class="mt-1 text-sm text-gray-500">Transactional outbox entries pending publication to PGMQ</p>
|
|
4
4
|
</div>
|
|
5
5
|
|
|
6
6
|
<div class="mb-6 grid grid-cols-3 gap-4">
|
|
7
|
-
<div class="rounded-lg bg-white p-4 shadow ring-1 ring-gray-200">
|
|
7
|
+
<div class="rounded-lg bg-white dark:bg-gray-800 p-4 shadow ring-1 ring-gray-200 dark:ring-gray-700">
|
|
8
8
|
<dt class="text-xs font-medium uppercase text-gray-500">Unpublished</dt>
|
|
9
|
-
<dd class="mt-1 text-2xl font-semibold text-gray-900"><%= pgbus_number(@stats[:unpublished]) %></dd>
|
|
9
|
+
<dd class="mt-1 text-2xl font-semibold text-gray-900 dark:text-white"><%= pgbus_number(@stats[:unpublished]) %></dd>
|
|
10
10
|
</div>
|
|
11
|
-
<div class="rounded-lg bg-white p-4 shadow ring-1 ring-gray-200">
|
|
11
|
+
<div class="rounded-lg bg-white dark:bg-gray-800 p-4 shadow ring-1 ring-gray-200 dark:ring-gray-700">
|
|
12
12
|
<dt class="text-xs font-medium uppercase text-gray-500">Total</dt>
|
|
13
|
-
<dd class="mt-1 text-2xl font-semibold text-gray-900"><%= pgbus_number(@stats[:total]) %></dd>
|
|
13
|
+
<dd class="mt-1 text-2xl font-semibold text-gray-900 dark:text-white"><%= pgbus_number(@stats[:total]) %></dd>
|
|
14
14
|
</div>
|
|
15
|
-
<div class="rounded-lg bg-white p-4 shadow ring-1 ring-gray-200">
|
|
15
|
+
<div class="rounded-lg bg-white dark:bg-gray-800 p-4 shadow ring-1 ring-gray-200 dark:ring-gray-700">
|
|
16
16
|
<dt class="text-xs font-medium uppercase text-gray-500">Oldest Unpublished</dt>
|
|
17
|
-
<dd class="mt-1 text-2xl font-semibold text-gray-900"><%= @stats[:oldest_unpublished_age] ? "#{@stats[:oldest_unpublished_age]}s" : "—" %></dd>
|
|
17
|
+
<dd class="mt-1 text-2xl font-semibold text-gray-900 dark:text-white"><%= @stats[:oldest_unpublished_age] ? "#{@stats[:oldest_unpublished_age]}s" : "—" %></dd>
|
|
18
18
|
</div>
|
|
19
19
|
</div>
|
|
20
20
|
|
|
21
|
-
<div class="overflow-hidden rounded-lg bg-white shadow ring-1 ring-gray-200">
|
|
22
|
-
<table class="min-w-full divide-y divide-gray-200">
|
|
23
|
-
<thead class="bg-gray-50">
|
|
21
|
+
<div class="overflow-hidden rounded-lg bg-white dark:bg-gray-800 shadow ring-1 ring-gray-200 dark:ring-gray-700">
|
|
22
|
+
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
|
|
23
|
+
<thead class="bg-gray-50 dark:bg-gray-900">
|
|
24
24
|
<tr>
|
|
25
25
|
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">ID</th>
|
|
26
26
|
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Queue / Topic</th>
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
<th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500">Created</th>
|
|
31
31
|
</tr>
|
|
32
32
|
</thead>
|
|
33
|
-
<tbody class="divide-y divide-gray-100">
|
|
33
|
+
<tbody class="divide-y divide-gray-100 dark:divide-gray-700">
|
|
34
34
|
<% @entries.each do |entry| %>
|
|
35
|
-
<tr class="hover:bg-gray-50">
|
|
35
|
+
<tr class="hover:bg-gray-50 dark:hover:bg-gray-700/50 dark:bg-gray-900">
|
|
36
36
|
<td class="px-4 py-3 text-sm font-mono text-gray-700"><%= entry.id %></td>
|
|
37
37
|
<td class="px-4 py-3 text-sm text-gray-700"><%= entry.routing_key || entry.queue_name %></td>
|
|
38
38
|
<td class="px-4 py-3 text-sm text-gray-500 max-w-xs truncate"><%= pgbus_json_preview(entry.payload) %></td>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<turbo-frame id="processes-list" data-auto-refresh src="<%= pgbus.processes_path(frame: 'list') %>">
|
|
2
|
-
<div class="overflow-hidden rounded-lg bg-white shadow ring-1 ring-gray-200">
|
|
3
|
-
<table class="min-w-full divide-y divide-gray-200">
|
|
4
|
-
<thead class="bg-gray-50">
|
|
2
|
+
<div class="overflow-hidden rounded-lg bg-white dark:bg-gray-800 shadow ring-1 ring-gray-200 dark:ring-gray-700">
|
|
3
|
+
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
|
|
4
|
+
<thead class="bg-gray-50 dark:bg-gray-900">
|
|
5
5
|
<tr>
|
|
6
6
|
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Kind</th>
|
|
7
7
|
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Hostname</th>
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Metadata</th>
|
|
12
12
|
</tr>
|
|
13
13
|
</thead>
|
|
14
|
-
<tbody class="divide-y divide-gray-100">
|
|
14
|
+
<tbody class="divide-y divide-gray-100 dark:divide-gray-700">
|
|
15
15
|
<% @processes.each do |p| %>
|
|
16
|
-
<tr class="hover:bg-gray-50">
|
|
17
|
-
<td class="px-4 py-3 text-sm font-medium text-gray-900"><%= p[:kind] %></td>
|
|
16
|
+
<tr class="hover:bg-gray-50 dark:hover:bg-gray-700/50 dark:bg-gray-900">
|
|
17
|
+
<td class="px-4 py-3 text-sm font-medium text-gray-900 dark:text-white"><%= p[:kind] %></td>
|
|
18
18
|
<td class="px-4 py-3 text-sm text-gray-700"><%= p[:hostname] %></td>
|
|
19
19
|
<td class="px-4 py-3 text-sm font-mono text-gray-700"><%= p[:pid] %></td>
|
|
20
20
|
<td class="px-4 py-3 text-sm"><%= pgbus_status_badge(p[:healthy]) %></td>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<turbo-frame id="queues-list" data-auto-refresh src="<%= pgbus.queues_path(frame: 'list') %>">
|
|
2
|
-
<div class="overflow-hidden rounded-lg bg-white shadow ring-1 ring-gray-200">
|
|
3
|
-
<table class="min-w-full divide-y divide-gray-200">
|
|
4
|
-
<thead class="bg-gray-50">
|
|
2
|
+
<div class="overflow-hidden rounded-lg bg-white dark:bg-gray-800 shadow ring-1 ring-gray-200 dark:ring-gray-700">
|
|
3
|
+
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
|
|
4
|
+
<thead class="bg-gray-50 dark:bg-gray-900">
|
|
5
5
|
<tr>
|
|
6
6
|
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Queue</th>
|
|
7
7
|
<th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500">Depth</th>
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
<th class="px-4 py-3 text-right text-xs font-medium uppercase text-gray-500">Actions</th>
|
|
13
13
|
</tr>
|
|
14
14
|
</thead>
|
|
15
|
-
<tbody class="divide-y divide-gray-100">
|
|
15
|
+
<tbody class="divide-y divide-gray-100 dark:divide-gray-700">
|
|
16
16
|
<% @queues.each do |q| %>
|
|
17
|
-
<tr class="hover:bg-gray-50">
|
|
17
|
+
<tr class="hover:bg-gray-50 dark:hover:bg-gray-700/50 dark:bg-gray-900">
|
|
18
18
|
<td class="px-4 py-3 text-sm">
|
|
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]) %>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<div class="flex items-center justify-between mb-6">
|
|
2
2
|
<div>
|
|
3
|
-
<h1 class="text-2xl font-bold text-gray-900"><%= @queue&.dig(:name) || params[:name] %></h1>
|
|
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
6
|
Depth: <span class="font-mono"><%= @queue[:queue_length] %></span> |
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
</div>
|
|
19
19
|
|
|
20
20
|
<!-- Messages in Queue -->
|
|
21
|
-
<div class="overflow-hidden rounded-lg bg-white shadow ring-1 ring-gray-200">
|
|
22
|
-
<table class="min-w-full divide-y divide-gray-200">
|
|
23
|
-
<thead class="bg-gray-50">
|
|
21
|
+
<div class="overflow-hidden rounded-lg bg-white dark:bg-gray-800 shadow ring-1 ring-gray-200 dark:ring-gray-700">
|
|
22
|
+
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
|
|
23
|
+
<thead class="bg-gray-50 dark:bg-gray-900">
|
|
24
24
|
<tr>
|
|
25
25
|
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">ID</th>
|
|
26
26
|
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Enqueued</th>
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
<th class="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">Payload</th>
|
|
30
30
|
</tr>
|
|
31
31
|
</thead>
|
|
32
|
-
<tbody class="divide-y divide-gray-100">
|
|
32
|
+
<tbody class="divide-y divide-gray-100 dark:divide-gray-700">
|
|
33
33
|
<% @messages.each do |m| %>
|
|
34
|
-
<tr class="hover:bg-gray-50">
|
|
35
|
-
<td class="px-4 py-3 text-sm font-mono text-gray-900"><%= m[:msg_id] %></td>
|
|
34
|
+
<tr class="hover:bg-gray-50 dark:hover:bg-gray-700/50 dark:bg-gray-900">
|
|
35
|
+
<td class="px-4 py-3 text-sm font-mono text-gray-900 dark:text-white"><%= m[:msg_id] %></td>
|
|
36
36
|
<td class="px-4 py-3 text-sm text-gray-500"><%= pgbus_time_ago(m[:enqueued_at]) %></td>
|
|
37
37
|
<td class="px-4 py-3 text-sm text-gray-500"><%= m[:read_ct] %></td>
|
|
38
38
|
<td class="px-4 py-3 text-sm text-gray-500"><%= pgbus_time_ago(m[:vt]) %></td>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<turbo-frame id="recurring-tasks" data-auto-refresh src="<%= pgbus.recurring_tasks_path(frame: 'recurring_tasks') %>">
|
|
2
|
-
<div class="rounded-lg bg-white shadow ring-1 ring-gray-200">
|
|
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
5
|
<p class="text-lg font-medium">No recurring tasks configured</p>
|
|
6
6
|
<p class="mt-1 text-sm">Add tasks to <code class="bg-gray-100 px-1.5 py-0.5 rounded text-xs">config/recurring.yml</code></p>
|
|
7
7
|
</div>
|
|
8
8
|
<% else %>
|
|
9
|
-
<table class="min-w-full divide-y divide-gray-200">
|
|
10
|
-
<thead class="bg-gray-50">
|
|
9
|
+
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
|
|
10
|
+
<thead class="bg-gray-50 dark:bg-gray-900">
|
|
11
11
|
<tr>
|
|
12
12
|
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Task</th>
|
|
13
13
|
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Schedule</th>
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
<th class="px-4 py-3 text-right text-xs font-medium text-gray-500 uppercase">Actions</th>
|
|
19
19
|
</tr>
|
|
20
20
|
</thead>
|
|
21
|
-
<tbody class="divide-y divide-gray-200">
|
|
21
|
+
<tbody class="divide-y divide-gray-200 dark:divide-gray-700">
|
|
22
22
|
<% @recurring_tasks.each do |task| %>
|
|
23
|
-
<tr class="hover:bg-gray-50">
|
|
23
|
+
<tr class="hover:bg-gray-50 dark:hover:bg-gray-700/50 dark:bg-gray-900">
|
|
24
24
|
<td class="px-4 py-3">
|
|
25
25
|
<div>
|
|
26
26
|
<%= link_to task[:key], pgbus.recurring_task_path(task[:id]),
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
<% end %>
|
|
33
33
|
</td>
|
|
34
34
|
<td class="px-4 py-3">
|
|
35
|
-
<div class="text-sm text-gray-900"><%= task[:schedule] %></div>
|
|
35
|
+
<div class="text-sm text-gray-900 dark:text-white"><%= task[:schedule] %></div>
|
|
36
36
|
<% if task[:human_schedule] && task[:human_schedule] != task[:schedule] %>
|
|
37
37
|
<div class="text-xs text-gray-400"><%= task[:human_schedule] %></div>
|
|
38
38
|
<% end %>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div class="flex items-center justify-between mb-6">
|
|
2
|
-
<h1 class="text-2xl font-bold text-gray-900">Recurring Tasks</h1>
|
|
2
|
+
<h1 class="text-2xl font-bold text-gray-900 dark:text-white">Recurring Tasks</h1>
|
|
3
3
|
<span class="text-sm text-gray-500"><%= @recurring_tasks.size %> task(s) configured</span>
|
|
4
4
|
</div>
|
|
5
5
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<div class="mb-6">
|
|
2
2
|
<div class="flex items-center justify-between">
|
|
3
3
|
<div>
|
|
4
|
-
<h1 class="text-2xl font-bold text-gray-900"><%= @task[:key] %></h1>
|
|
4
|
+
<h1 class="text-2xl font-bold text-gray-900 dark:text-white"><%= @task[:key] %></h1>
|
|
5
5
|
<p class="mt-1 text-sm text-gray-500"><%= @task[:class_name] || @task[:command] %></p>
|
|
6
6
|
</div>
|
|
7
7
|
<div class="flex space-x-2">
|
|
@@ -21,90 +21,90 @@
|
|
|
21
21
|
</div>
|
|
22
22
|
|
|
23
23
|
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-8">
|
|
24
|
-
<div class="rounded-lg bg-white p-5 shadow ring-1 ring-gray-200">
|
|
24
|
+
<div class="rounded-lg bg-white dark:bg-gray-800 p-5 shadow ring-1 ring-gray-200 dark:ring-gray-700">
|
|
25
25
|
<p class="text-sm font-medium text-gray-500">Schedule</p>
|
|
26
|
-
<p class="mt-1 text-lg font-semibold text-gray-900"><%= @task[:schedule] %></p>
|
|
26
|
+
<p class="mt-1 text-lg font-semibold text-gray-900 dark:text-white"><%= @task[:schedule] %></p>
|
|
27
27
|
<% if @task[:human_schedule] && @task[:human_schedule] != @task[:schedule] %>
|
|
28
28
|
<p class="text-xs text-gray-400"><%= @task[:human_schedule] %></p>
|
|
29
29
|
<% end %>
|
|
30
30
|
</div>
|
|
31
31
|
|
|
32
|
-
<div class="rounded-lg bg-white p-5 shadow ring-1 ring-gray-200">
|
|
32
|
+
<div class="rounded-lg bg-white dark:bg-gray-800 p-5 shadow ring-1 ring-gray-200 dark:ring-gray-700">
|
|
33
33
|
<p class="text-sm font-medium text-gray-500">Next Run</p>
|
|
34
34
|
<% if @task[:enabled] && @task[:next_run_at] %>
|
|
35
|
-
<p class="mt-1 text-lg font-semibold text-gray-900"><%= pgbus_time_ago_future(@task[:next_run_at]) %></p>
|
|
35
|
+
<p class="mt-1 text-lg font-semibold text-gray-900 dark:text-white"><%= pgbus_time_ago_future(@task[:next_run_at]) %></p>
|
|
36
36
|
<p class="text-xs text-gray-400"><%= @task[:next_run_at]&.strftime("%Y-%m-%d %H:%M:%S %Z") %></p>
|
|
37
37
|
<% else %>
|
|
38
38
|
<p class="mt-1 text-lg font-semibold text-gray-400">—</p>
|
|
39
39
|
<% end %>
|
|
40
40
|
</div>
|
|
41
41
|
|
|
42
|
-
<div class="rounded-lg bg-white p-5 shadow ring-1 ring-gray-200">
|
|
42
|
+
<div class="rounded-lg bg-white dark:bg-gray-800 p-5 shadow ring-1 ring-gray-200 dark:ring-gray-700">
|
|
43
43
|
<p class="text-sm font-medium text-gray-500">Status</p>
|
|
44
44
|
<p class="mt-1"><%= @task[:enabled] ? pgbus_recurring_health_badge(@task) : raw('<span class="inline-flex items-center rounded-full bg-gray-100 px-2.5 py-0.5 text-xs font-medium text-gray-600">Disabled</span>') %></p>
|
|
45
45
|
</div>
|
|
46
46
|
</div>
|
|
47
47
|
|
|
48
|
-
<div class="rounded-lg bg-white shadow ring-1 ring-gray-200 mb-8">
|
|
48
|
+
<div class="rounded-lg bg-white dark:bg-gray-800 shadow ring-1 ring-gray-200 dark:ring-gray-700 mb-8">
|
|
49
49
|
<div class="px-4 py-3 border-b border-gray-200">
|
|
50
|
-
<h2 class="text-lg font-medium text-gray-900">Configuration</h2>
|
|
50
|
+
<h2 class="text-lg font-medium text-gray-900 dark:text-white">Configuration</h2>
|
|
51
51
|
</div>
|
|
52
52
|
<div class="p-4">
|
|
53
53
|
<dl class="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
|
54
54
|
<div>
|
|
55
55
|
<dt class="text-sm font-medium text-gray-500">Job Class</dt>
|
|
56
|
-
<dd class="mt-1 text-sm text-gray-900"><%= @task[:class_name] || "—" %></dd>
|
|
56
|
+
<dd class="mt-1 text-sm text-gray-900 dark:text-white"><%= @task[:class_name] || "—" %></dd>
|
|
57
57
|
</div>
|
|
58
58
|
<% if @task[:command] %>
|
|
59
59
|
<div>
|
|
60
60
|
<dt class="text-sm font-medium text-gray-500">Command</dt>
|
|
61
|
-
<dd class="mt-1 text-sm text-gray-900 font-mono text-xs"><%= @task[:command] %></dd>
|
|
61
|
+
<dd class="mt-1 text-sm text-gray-900 dark:text-white font-mono text-xs"><%= @task[:command] %></dd>
|
|
62
62
|
</div>
|
|
63
63
|
<% end %>
|
|
64
64
|
<div>
|
|
65
65
|
<dt class="text-sm font-medium text-gray-500">Queue</dt>
|
|
66
|
-
<dd class="mt-1 text-sm text-gray-900"><%= @task[:queue_name] || "default" %></dd>
|
|
66
|
+
<dd class="mt-1 text-sm text-gray-900 dark:text-white"><%= @task[:queue_name] || "default" %></dd>
|
|
67
67
|
</div>
|
|
68
68
|
<div>
|
|
69
69
|
<dt class="text-sm font-medium text-gray-500">Priority</dt>
|
|
70
|
-
<dd class="mt-1 text-sm text-gray-900"><%= @task[:priority] %></dd>
|
|
70
|
+
<dd class="mt-1 text-sm text-gray-900 dark:text-white"><%= @task[:priority] %></dd>
|
|
71
71
|
</div>
|
|
72
72
|
<% if @task[:arguments]&.any? %>
|
|
73
73
|
<div class="sm:col-span-2">
|
|
74
74
|
<dt class="text-sm font-medium text-gray-500">Arguments</dt>
|
|
75
|
-
<dd class="mt-1 text-sm text-gray-900 font-mono text-xs"><%= @task[:arguments].inspect %></dd>
|
|
75
|
+
<dd class="mt-1 text-sm text-gray-900 dark:text-white font-mono text-xs"><%= @task[:arguments].inspect %></dd>
|
|
76
76
|
</div>
|
|
77
77
|
<% end %>
|
|
78
78
|
<% if @task[:description] %>
|
|
79
79
|
<div class="sm:col-span-2">
|
|
80
80
|
<dt class="text-sm font-medium text-gray-500">Description</dt>
|
|
81
|
-
<dd class="mt-1 text-sm text-gray-900"><%= @task[:description] %></dd>
|
|
81
|
+
<dd class="mt-1 text-sm text-gray-900 dark:text-white"><%= @task[:description] %></dd>
|
|
82
82
|
</div>
|
|
83
83
|
<% end %>
|
|
84
84
|
<div>
|
|
85
85
|
<dt class="text-sm font-medium text-gray-500">Source</dt>
|
|
86
|
-
<dd class="mt-1 text-sm text-gray-900"><%= @task[:static] ? "Config file" : "Dynamic" %></dd>
|
|
86
|
+
<dd class="mt-1 text-sm text-gray-900 dark:text-white"><%= @task[:static] ? "Config file" : "Dynamic" %></dd>
|
|
87
87
|
</div>
|
|
88
88
|
</dl>
|
|
89
89
|
</div>
|
|
90
90
|
</div>
|
|
91
91
|
|
|
92
|
-
<div class="rounded-lg bg-white shadow ring-1 ring-gray-200">
|
|
92
|
+
<div class="rounded-lg bg-white dark:bg-gray-800 shadow ring-1 ring-gray-200 dark:ring-gray-700">
|
|
93
93
|
<div class="px-4 py-3 border-b border-gray-200">
|
|
94
|
-
<h2 class="text-lg font-medium text-gray-900">Recent Executions</h2>
|
|
94
|
+
<h2 class="text-lg font-medium text-gray-900 dark:text-white">Recent Executions</h2>
|
|
95
95
|
</div>
|
|
96
96
|
<% if @task[:executions]&.any? %>
|
|
97
|
-
<table class="min-w-full divide-y divide-gray-200">
|
|
98
|
-
<thead class="bg-gray-50">
|
|
97
|
+
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
|
|
98
|
+
<thead class="bg-gray-50 dark:bg-gray-900">
|
|
99
99
|
<tr>
|
|
100
100
|
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Scheduled For</th>
|
|
101
101
|
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Enqueued At</th>
|
|
102
102
|
</tr>
|
|
103
103
|
</thead>
|
|
104
|
-
<tbody class="divide-y divide-gray-200">
|
|
104
|
+
<tbody class="divide-y divide-gray-200 dark:divide-gray-700">
|
|
105
105
|
<% @task[:executions].each do |exec| %>
|
|
106
|
-
<tr class="hover:bg-gray-50">
|
|
107
|
-
<td class="px-4 py-3 text-sm text-gray-900">
|
|
106
|
+
<tr class="hover:bg-gray-50 dark:hover:bg-gray-700/50 dark:bg-gray-900">
|
|
107
|
+
<td class="px-4 py-3 text-sm text-gray-900 dark:text-white">
|
|
108
108
|
<%= exec[:run_at]&.strftime("%Y-%m-%d %H:%M:%S %Z") %>
|
|
109
109
|
</td>
|
|
110
110
|
<td class="px-4 py-3 text-sm text-gray-600">
|
data/lib/pgbus/version.rb
CHANGED