bunqueue-dashboard 0.0.28 → 0.0.29
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.
- package/dist/.vite/manifest.json +61 -61
- package/dist/assets/{AddJob-BWQUAkBR.js → AddJob-UCSTFuum.js} +1 -1
- package/dist/assets/{Alerts-B0xnP5CV.js → Alerts-CofRabaP.js} +1 -1
- package/dist/assets/{Benchmark-Dw6Adnj6.js → Benchmark-B1VUJJLw.js} +1 -1
- package/dist/assets/{BulkAddJobs-DAdNpGRo.js → BulkAddJobs-DVgkRtrp.js} +1 -1
- package/dist/assets/{CopilotPanel-Bpxw4K9a.js → CopilotPanel-BJeJYfaz.js} +1 -1
- package/dist/assets/{Cron-CV32TamV.js → Cron-CqlZj2V5.js} +1 -1
- package/dist/assets/{CronManager-BEaa7wiR.js → CronManager-C6kjWCLE.js} +1 -1
- package/dist/assets/{Database-ehv_cEQ2.js → Database-BYZ8LJb5.js} +1 -1
- package/dist/assets/{Diagnostics-CorlmvKz.js → Diagnostics-Dk1ErNCF.js} +1 -1
- package/dist/assets/{Dlq-Ctk9zeER.js → Dlq-DANXiXsm.js} +1 -1
- package/dist/assets/{DlqControl-CIsg8otQ.js → DlqControl-DUturU7q.js} +1 -1
- package/dist/assets/{DlqPro-Bw3yQpGs.js → DlqPro-D8DOy5MI.js} +1 -1
- package/dist/assets/{Flows-rrvRgRtA.js → Flows-DP9-h7a0.js} +1 -1
- package/dist/assets/{JobInspector-C7vAErSx.js → JobInspector-BHZtkFL6.js} +1 -1
- package/dist/assets/{Jobs-5faPmBs1.js → Jobs-Bgr-HRmL.js} +1 -1
- package/dist/assets/{JobsPro-BOkJw2tF.js → JobsPro-C2Vc2iRC.js} +1 -1
- package/dist/assets/{Logs-BFVWi8D3.js → Logs-CaOn3IpL.js} +1 -1
- package/dist/assets/{LogsPro-CkwTCyHD.js → LogsPro-BpSZaHzN.js} +1 -1
- package/dist/assets/{McpServer-Bs9xBhXn.js → McpServer-MfQ0qsAI.js} +1 -1
- package/dist/assets/{Metrics-cYFyZR3N.js → Metrics-C4Dwg_DP.js} +1 -1
- package/dist/assets/{MetricsPro-DFQhOiMq.js → MetricsPro-Bt9zLjkN.js} +1 -1
- package/dist/assets/{Overview-CtPFwJ89.js → Overview-BO3xG6I0.js} +1 -1
- package/dist/assets/{Pagination-C_ycPjHn.js → Pagination-BQg6KGW1.js} +1 -1
- package/dist/assets/{QueueActions-BIJ-MHWn.js → QueueActions-Bez_iOjl.js} +1 -1
- package/dist/assets/{QueueControl-OXvmyeYT.js → QueueControl-CEXlJDkE.js} +1 -1
- package/dist/assets/{QueueDetail-DJZ30jtl.js → QueueDetail-wjRLlCYY.js} +1 -1
- package/dist/assets/QueueDetailPro-CuVyxX4Z.js +1 -0
- package/dist/assets/{Queues-j0iVmzXB.js → Queues-2W2E6e5R.js} +1 -1
- package/dist/assets/{QueuesOverview-LFhAaVxQ.js → QueuesOverview-DfRqAfS1.js} +1 -1
- package/dist/assets/{S3Backup-B02cXBEq.js → S3Backup-UQ_HKrn0.js} +1 -1
- package/dist/assets/{S3BackupPro-k_zofIyL.js → S3BackupPro-V3JNhUK8.js} +1 -1
- package/dist/assets/{ServerControl-P8h0f0HD.js → ServerControl-DXidWdsq.js} +1 -1
- package/dist/assets/{Settings-BE7LB_rx.js → Settings-0j8DZK9n.js} +1 -1
- package/dist/assets/{Usage-DRq_sm9A.js → Usage-C5DsZvR5.js} +1 -1
- package/dist/assets/{UsagePro-CaEgDStT.js → UsagePro-CbVFCD3J.js} +1 -1
- package/dist/assets/{Webhooks-DUtMCoyF.js → Webhooks-Dr0oBZr9.js} +1 -1
- package/dist/assets/{Workers-DPryLaxE.js → Workers-Bwil4zIU.js} +1 -1
- package/dist/assets/{WorkersPro-DlHDhoV4.js → WorkersPro-BRYPAhyx.js} +1 -1
- package/dist/assets/{index-BxYFC0LS.js → index-BjRjwWwc.js} +3 -3
- package/dist/assets/{useThroughputSeries-BuNc_qkH.js → useThroughputSeries-defI_JpV.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/scripts/embedded.gen.ts +106 -106
- package/dist/assets/QueueDetailPro-DwOCQfIi.js +0 -1
package/scripts/embedded.gen.ts
CHANGED
|
@@ -4,59 +4,59 @@ import f0 from "../dist/.vite/manifest.json" with { type: 'file' };
|
|
|
4
4
|
import f1 from "../dist/og.png" with { type: 'file' };
|
|
5
5
|
import f2 from "../dist/favicon.svg" with { type: 'file' };
|
|
6
6
|
import f3 from "../dist/assets/form-C-zZyKfB.js" with { type: 'file' };
|
|
7
|
-
import f4 from "../dist/assets/Benchmark-
|
|
8
|
-
import f5 from "../dist/assets/
|
|
9
|
-
import f6 from "../dist/assets/
|
|
10
|
-
import f7 from "../dist/assets/
|
|
11
|
-
import f8 from "../dist/assets/
|
|
12
|
-
import f9 from "../dist/assets/
|
|
13
|
-
import f10 from "../dist/assets/
|
|
14
|
-
import f11 from "../dist/assets/
|
|
15
|
-
import f12 from "../dist/assets/
|
|
16
|
-
import f13 from "../dist/assets/
|
|
17
|
-
import f14 from "../dist/assets/
|
|
18
|
-
import f15 from "../dist/assets/
|
|
19
|
-
import f16 from "../dist/assets/
|
|
20
|
-
import f17 from "../dist/assets/
|
|
21
|
-
import f18 from "../dist/assets/
|
|
22
|
-
import f19 from "../dist/assets/
|
|
23
|
-
import f20 from "../dist/assets/
|
|
24
|
-
import f21 from "../dist/assets/
|
|
25
|
-
import f22 from "../dist/assets/
|
|
26
|
-
import f23 from "../dist/assets/
|
|
27
|
-
import f24 from "../dist/assets/
|
|
28
|
-
import f25 from "../dist/assets/
|
|
29
|
-
import f26 from "../dist/assets/
|
|
30
|
-
import f27 from "../dist/assets/
|
|
31
|
-
import f28 from "../dist/assets/
|
|
32
|
-
import f29 from "../dist/assets/
|
|
33
|
-
import f30 from "../dist/assets/
|
|
34
|
-
import f31 from "../dist/assets/Flows-
|
|
35
|
-
import f32 from "../dist/assets/
|
|
36
|
-
import f33 from "../dist/assets/
|
|
37
|
-
import f34 from "../dist/assets/
|
|
38
|
-
import f35 from "../dist/assets/
|
|
39
|
-
import f36 from "../dist/assets/
|
|
40
|
-
import f37 from "../dist/assets/
|
|
41
|
-
import f38 from "../dist/assets/
|
|
42
|
-
import f39 from "../dist/assets/
|
|
43
|
-
import f40 from "../dist/assets/
|
|
44
|
-
import f41 from "../dist/assets/
|
|
45
|
-
import f42 from "../dist/assets/
|
|
46
|
-
import f43 from "../dist/assets/
|
|
47
|
-
import f44 from "../dist/assets/
|
|
48
|
-
import f45 from "../dist/assets/
|
|
49
|
-
import f46 from "../dist/assets/
|
|
50
|
-
import f47 from "../dist/assets/
|
|
51
|
-
import f48 from "../dist/assets/
|
|
52
|
-
import f49 from "../dist/assets/
|
|
53
|
-
import f50 from "../dist/assets/
|
|
54
|
-
import f51 from "../dist/assets/
|
|
55
|
-
import f52 from "../dist/assets/
|
|
56
|
-
import f53 from "../dist/assets/
|
|
57
|
-
import f54 from "../dist/assets/
|
|
58
|
-
import f55 from "../dist/assets/
|
|
59
|
-
import f56 from "../dist/assets/
|
|
7
|
+
import f4 from "../dist/assets/Benchmark-B1VUJJLw.js" with { type: 'file' };
|
|
8
|
+
import f5 from "../dist/assets/CronManager-C6kjWCLE.js" with { type: 'file' };
|
|
9
|
+
import f6 from "../dist/assets/DlqControl-DUturU7q.js" with { type: 'file' };
|
|
10
|
+
import f7 from "../dist/assets/BulkAddJobs-DVgkRtrp.js" with { type: 'file' };
|
|
11
|
+
import f8 from "../dist/assets/Metrics-C4Dwg_DP.js" with { type: 'file' };
|
|
12
|
+
import f9 from "../dist/assets/index-BjRjwWwc.js" with { type: 'file' };
|
|
13
|
+
import f10 from "../dist/assets/Cron-CqlZj2V5.js" with { type: 'file' };
|
|
14
|
+
import f11 from "../dist/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2" with { type: 'file' };
|
|
15
|
+
import f12 from "../dist/assets/connectionStore-B-hNUqwK.js" with { type: 'file' };
|
|
16
|
+
import f13 from "../dist/assets/Settings-0j8DZK9n.js" with { type: 'file' };
|
|
17
|
+
import f14 from "../dist/assets/ServerControl-DXidWdsq.js" with { type: 'file' };
|
|
18
|
+
import f15 from "../dist/assets/LogsPro-BpSZaHzN.js" with { type: 'file' };
|
|
19
|
+
import f16 from "../dist/assets/index-mF63w920.css" with { type: 'file' };
|
|
20
|
+
import f17 from "../dist/assets/Diagnostics-Dk1ErNCF.js" with { type: 'file' };
|
|
21
|
+
import f18 from "../dist/assets/McpServer-MfQ0qsAI.js" with { type: 'file' };
|
|
22
|
+
import f19 from "../dist/assets/AddJob-UCSTFuum.js" with { type: 'file' };
|
|
23
|
+
import f20 from "../dist/assets/AreaChart-Dl_9G6GH.js" with { type: 'file' };
|
|
24
|
+
import f21 from "../dist/assets/CopilotPanel-BJeJYfaz.js" with { type: 'file' };
|
|
25
|
+
import f22 from "../dist/assets/UsagePro-CbVFCD3J.js" with { type: 'file' };
|
|
26
|
+
import f23 from "../dist/assets/WorkersPro-BRYPAhyx.js" with { type: 'file' };
|
|
27
|
+
import f24 from "../dist/assets/jobActions-CuOdMglt.js" with { type: 'file' };
|
|
28
|
+
import f25 from "../dist/assets/MetricsPro-Bt9zLjkN.js" with { type: 'file' };
|
|
29
|
+
import f26 from "../dist/assets/Overview-BO3xG6I0.js" with { type: 'file' };
|
|
30
|
+
import f27 from "../dist/assets/QueueActions-Bez_iOjl.js" with { type: 'file' };
|
|
31
|
+
import f28 from "../dist/assets/Webhooks-Dr0oBZr9.js" with { type: 'file' };
|
|
32
|
+
import f29 from "../dist/assets/Usage-C5DsZvR5.js" with { type: 'file' };
|
|
33
|
+
import f30 from "../dist/assets/Pagination-BQg6KGW1.js" with { type: 'file' };
|
|
34
|
+
import f31 from "../dist/assets/Flows-DP9-h7a0.js" with { type: 'file' };
|
|
35
|
+
import f32 from "../dist/assets/QueueControl-CEXlJDkE.js" with { type: 'file' };
|
|
36
|
+
import f33 from "../dist/assets/Alerts-CofRabaP.js" with { type: 'file' };
|
|
37
|
+
import f34 from "../dist/assets/exportFile-tdUeW5m5.js" with { type: 'file' };
|
|
38
|
+
import f35 from "../dist/assets/DlqPro-D8DOy5MI.js" with { type: 'file' };
|
|
39
|
+
import f36 from "../dist/assets/install-DhTYJCUC.js" with { type: 'file' };
|
|
40
|
+
import f37 from "../dist/assets/Queues-2W2E6e5R.js" with { type: 'file' };
|
|
41
|
+
import f38 from "../dist/assets/cn-CMFYpumL.js" with { type: 'file' };
|
|
42
|
+
import f39 from "../dist/assets/Jobs-Bgr-HRmL.js" with { type: 'file' };
|
|
43
|
+
import f40 from "../dist/assets/react-vendor-B68RYDeC.js" with { type: 'file' };
|
|
44
|
+
import f41 from "../dist/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2" with { type: 'file' };
|
|
45
|
+
import f42 from "../dist/assets/JobInspector-BHZtkFL6.js" with { type: 'file' };
|
|
46
|
+
import f43 from "../dist/assets/QueueDetail-wjRLlCYY.js" with { type: 'file' };
|
|
47
|
+
import f44 from "../dist/assets/Logs-CaOn3IpL.js" with { type: 'file' };
|
|
48
|
+
import f45 from "../dist/assets/promisePool-Daxkc1OB.js" with { type: 'file' };
|
|
49
|
+
import f46 from "../dist/assets/QueuesOverview-DfRqAfS1.js" with { type: 'file' };
|
|
50
|
+
import f47 from "../dist/assets/JobsPro-C2Vc2iRC.js" with { type: 'file' };
|
|
51
|
+
import f48 from "../dist/assets/inter-latin-wght-normal-Dx4kXJAl.woff2" with { type: 'file' };
|
|
52
|
+
import f49 from "../dist/assets/S3Backup-UQ_HKrn0.js" with { type: 'file' };
|
|
53
|
+
import f50 from "../dist/assets/QueueDetailPro-CuVyxX4Z.js" with { type: 'file' };
|
|
54
|
+
import f51 from "../dist/assets/Database-BYZ8LJb5.js" with { type: 'file' };
|
|
55
|
+
import f52 from "../dist/assets/Dlq-DANXiXsm.js" with { type: 'file' };
|
|
56
|
+
import f53 from "../dist/assets/Workers-Bwil4zIU.js" with { type: 'file' };
|
|
57
|
+
import f54 from "../dist/assets/S3BackupPro-V3JNhUK8.js" with { type: 'file' };
|
|
58
|
+
import f55 from "../dist/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2" with { type: 'file' };
|
|
59
|
+
import f56 from "../dist/assets/useThroughputSeries-defI_JpV.js" with { type: 'file' };
|
|
60
60
|
import f57 from "../dist/index.html" with { type: 'file' };
|
|
61
61
|
|
|
62
62
|
export const ASSETS: Record<string, string> = {
|
|
@@ -64,58 +64,58 @@ export const ASSETS: Record<string, string> = {
|
|
|
64
64
|
"/og.png": f1,
|
|
65
65
|
"/favicon.svg": f2,
|
|
66
66
|
"/assets/form-C-zZyKfB.js": f3,
|
|
67
|
-
"/assets/Benchmark-
|
|
68
|
-
"/assets/
|
|
69
|
-
"/assets/
|
|
70
|
-
"/assets/
|
|
71
|
-
"/assets/
|
|
72
|
-
"/assets/
|
|
73
|
-
"/assets/
|
|
74
|
-
"/assets/
|
|
75
|
-
"/assets/
|
|
76
|
-
"/assets/
|
|
77
|
-
"/assets/
|
|
78
|
-
"/assets/
|
|
79
|
-
"/assets/
|
|
80
|
-
"/assets/
|
|
81
|
-
"/assets/
|
|
82
|
-
"/assets/
|
|
83
|
-
"/assets/
|
|
84
|
-
"/assets/
|
|
85
|
-
"/assets/
|
|
86
|
-
"/assets/
|
|
87
|
-
"/assets/
|
|
88
|
-
"/assets/
|
|
89
|
-
"/assets/
|
|
90
|
-
"/assets/
|
|
91
|
-
"/assets/
|
|
92
|
-
"/assets/
|
|
93
|
-
"/assets/
|
|
94
|
-
"/assets/Flows-
|
|
95
|
-
"/assets/
|
|
96
|
-
"/assets/
|
|
97
|
-
"/assets/
|
|
98
|
-
"/assets/
|
|
99
|
-
"/assets/
|
|
100
|
-
"/assets/
|
|
101
|
-
"/assets/
|
|
102
|
-
"/assets/
|
|
103
|
-
"/assets/
|
|
104
|
-
"/assets/
|
|
105
|
-
"/assets/
|
|
106
|
-
"/assets/
|
|
107
|
-
"/assets/
|
|
108
|
-
"/assets/
|
|
109
|
-
"/assets/
|
|
110
|
-
"/assets/
|
|
111
|
-
"/assets/
|
|
112
|
-
"/assets/
|
|
113
|
-
"/assets/
|
|
114
|
-
"/assets/
|
|
115
|
-
"/assets/
|
|
116
|
-
"/assets/
|
|
117
|
-
"/assets/
|
|
118
|
-
"/assets/
|
|
119
|
-
"/assets/
|
|
67
|
+
"/assets/Benchmark-B1VUJJLw.js": f4,
|
|
68
|
+
"/assets/CronManager-C6kjWCLE.js": f5,
|
|
69
|
+
"/assets/DlqControl-DUturU7q.js": f6,
|
|
70
|
+
"/assets/BulkAddJobs-DVgkRtrp.js": f7,
|
|
71
|
+
"/assets/Metrics-C4Dwg_DP.js": f8,
|
|
72
|
+
"/assets/index-BjRjwWwc.js": f9,
|
|
73
|
+
"/assets/Cron-CqlZj2V5.js": f10,
|
|
74
|
+
"/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2": f11,
|
|
75
|
+
"/assets/connectionStore-B-hNUqwK.js": f12,
|
|
76
|
+
"/assets/Settings-0j8DZK9n.js": f13,
|
|
77
|
+
"/assets/ServerControl-DXidWdsq.js": f14,
|
|
78
|
+
"/assets/LogsPro-BpSZaHzN.js": f15,
|
|
79
|
+
"/assets/index-mF63w920.css": f16,
|
|
80
|
+
"/assets/Diagnostics-Dk1ErNCF.js": f17,
|
|
81
|
+
"/assets/McpServer-MfQ0qsAI.js": f18,
|
|
82
|
+
"/assets/AddJob-UCSTFuum.js": f19,
|
|
83
|
+
"/assets/AreaChart-Dl_9G6GH.js": f20,
|
|
84
|
+
"/assets/CopilotPanel-BJeJYfaz.js": f21,
|
|
85
|
+
"/assets/UsagePro-CbVFCD3J.js": f22,
|
|
86
|
+
"/assets/WorkersPro-BRYPAhyx.js": f23,
|
|
87
|
+
"/assets/jobActions-CuOdMglt.js": f24,
|
|
88
|
+
"/assets/MetricsPro-Bt9zLjkN.js": f25,
|
|
89
|
+
"/assets/Overview-BO3xG6I0.js": f26,
|
|
90
|
+
"/assets/QueueActions-Bez_iOjl.js": f27,
|
|
91
|
+
"/assets/Webhooks-Dr0oBZr9.js": f28,
|
|
92
|
+
"/assets/Usage-C5DsZvR5.js": f29,
|
|
93
|
+
"/assets/Pagination-BQg6KGW1.js": f30,
|
|
94
|
+
"/assets/Flows-DP9-h7a0.js": f31,
|
|
95
|
+
"/assets/QueueControl-CEXlJDkE.js": f32,
|
|
96
|
+
"/assets/Alerts-CofRabaP.js": f33,
|
|
97
|
+
"/assets/exportFile-tdUeW5m5.js": f34,
|
|
98
|
+
"/assets/DlqPro-D8DOy5MI.js": f35,
|
|
99
|
+
"/assets/install-DhTYJCUC.js": f36,
|
|
100
|
+
"/assets/Queues-2W2E6e5R.js": f37,
|
|
101
|
+
"/assets/cn-CMFYpumL.js": f38,
|
|
102
|
+
"/assets/Jobs-Bgr-HRmL.js": f39,
|
|
103
|
+
"/assets/react-vendor-B68RYDeC.js": f40,
|
|
104
|
+
"/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2": f41,
|
|
105
|
+
"/assets/JobInspector-BHZtkFL6.js": f42,
|
|
106
|
+
"/assets/QueueDetail-wjRLlCYY.js": f43,
|
|
107
|
+
"/assets/Logs-CaOn3IpL.js": f44,
|
|
108
|
+
"/assets/promisePool-Daxkc1OB.js": f45,
|
|
109
|
+
"/assets/QueuesOverview-DfRqAfS1.js": f46,
|
|
110
|
+
"/assets/JobsPro-C2Vc2iRC.js": f47,
|
|
111
|
+
"/assets/inter-latin-wght-normal-Dx4kXJAl.woff2": f48,
|
|
112
|
+
"/assets/S3Backup-UQ_HKrn0.js": f49,
|
|
113
|
+
"/assets/QueueDetailPro-CuVyxX4Z.js": f50,
|
|
114
|
+
"/assets/Database-BYZ8LJb5.js": f51,
|
|
115
|
+
"/assets/Dlq-DANXiXsm.js": f52,
|
|
116
|
+
"/assets/Workers-Bwil4zIU.js": f53,
|
|
117
|
+
"/assets/S3BackupPro-V3JNhUK8.js": f54,
|
|
118
|
+
"/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2": f55,
|
|
119
|
+
"/assets/useThroughputSeries-defI_JpV.js": f56,
|
|
120
120
|
"/index.html": f57,
|
|
121
121
|
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,t}from"./cn-CMFYpumL.js";import{d as n,h as r,r as i,t as a,u as o}from"./react-vendor-B68RYDeC.js";import{A as s,C as c,M as l,P as u,S as d,T as f,_ as p,b as m,c as h,h as g,l as _,m as v,n as y,nt as b,o as x,rt as S,v as C,w,x as T}from"./index-BxYFC0LS.js";import{t as E}from"./AreaChart-Dl_9G6GH.js";import{t as D}from"./useThroughputSeries-BuNc_qkH.js";import{i as O,n as k,r as A,t as ee}from"./QueueActions-BIJ-MHWn.js";var j=e(r(),1),M=a(),N=[`waiting`,`active`,`completed`,`failed`,`delayed`,`paused`],P=[`active`,`waiting`,`completed`,`failed`,`delayed`],F=2e3;function I(){let{name:e=``}=n(),r=o(),[a,I]=(0,j.useState)(!1),[z,B]=(0,j.useState)(null),{data:V,error:H,loading:U,refetch:W}=s((0,j.useCallback)(async()=>{if(!e)return null;let[t,n,r,i]=await Promise.all([b.queueDetail(e,!1),b.getStallConfig(e).catch(()=>null),b.getDlqConfig(e).catch(()=>null),b.jobsList(e,P,12).catch(()=>({ok:!1,jobs:[]}))]);return{queue:e,detail:t,stall:n?.config??null,dlq:r?.config??null,jobs:i.jobs??[]}},[e]),[e]),G=V&&V.queue===e?V:null,[K,q]=(0,j.useState)([]),J=(0,j.useRef)(null);(0,j.useEffect)(()=>{let e=G?.detail?.counts;e&&(J.current=(e.waiting??0)+(e.active??0)+(e.delayed??0))},[G]),(0,j.useEffect)(()=>{J.current=null,q([]);let e=setInterval(()=>{let e=J.current;e!=null&&q(t=>[...t,e].slice(-40))},F);return()=>clearInterval(e)},[e]);let Y=(t,n,r)=>{r&&!window.confirm(r)||(I(!0),B(null),n().then(n=>{let r=n?.count,i=`${t}${r==null?` ✓`:`: ${r}`}`;B({ok:!0,text:i}),S.success(i,e),W()}).catch(e=>{let n=e.message;B({ok:!1,text:n}),S.error(`${t} failed`,n)}).finally(()=>I(!1)))},X=()=>{window.confirm(`Obliterate "${e}"? This removes the queue and all its jobs.`)&&(I(!0),b.obliterate(e).then(()=>{S.success(`Queue obliterated`,e),r(`/queues`)}).catch(e=>{let t=e.message;B({ok:!1,text:t}),S.error(`Obliterate failed`,t),I(!1)}))},Z=G?.detail,Q=Z?.counts,te=Q?y(Q.completed??0,Q.failed??0)??0:0,$=D(K);return(0,M.jsxs)(`div`,{children:[(0,M.jsx)(g,{title:(0,M.jsx)(`span`,{className:`font-mono`,children:e}),description:`Full per-queue operations and live backlog.`,live:!0,back:(0,M.jsx)(f,{"aria-label":`Back to queues`,onClick:()=>r(`/queues`),children:(0,M.jsx)(u,{className:`size-4`})}),actions:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(i,{to:`/jobs?queue=${encodeURIComponent(e)}`,className:`flex items-center gap-1 rounded-lg border border-line px-3 py-1.5 text-sm text-muted hover:bg-surface-2 hover:text-fg`,children:[`Jobs `,(0,M.jsx)(l,{className:`size-3.5`})]}),(0,M.jsxs)(i,{to:`/dlq?queue=${encodeURIComponent(e)}`,className:`flex items-center gap-1 rounded-lg border border-line px-3 py-1.5 text-sm text-muted hover:bg-surface-2 hover:text-fg`,children:[`DLQ `,(0,M.jsx)(l,{className:`size-3.5`})]}),(0,M.jsx)(w,{variant:`danger`,size:`sm`,disabled:a,onClick:X,children:`Obliterate`})]})}),H&&(0,M.jsx)(T,{onRetry:W}),U&&!G&&!H?(0,M.jsx)(m,{label:`Loading ${e}…`}):!Z||!Q?!H&&(0,M.jsx)(C,{title:`Queue not found`,hint:`No queue named "${e}" exists — it may have been obliterated, or the link is stale.`,action:(0,M.jsx)(i,{to:`/queues`,className:`rounded-lg border border-line px-3 py-1.5 text-sm text-muted hover:bg-surface-2 hover:text-fg`,children:`Back to queues`})}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`div`,{className:`mb-6 flex flex-wrap items-center gap-3`,children:[(0,M.jsx)(p,{label:Z.paused?`Paused`:`Active`,tone:Z.paused?`amber`:`green`}),z&&(0,M.jsx)(`span`,{role:`status`,className:z.ok?`text-xs text-success`:`text-xs text-danger`,children:z.text})]}),(0,M.jsx)(`div`,{className:`mb-6 grid grid-cols-2 gap-3 md:grid-cols-3 xl:grid-cols-6`,children:N.map(e=>(0,M.jsx)(v,{label:e,value:h(Q[e]),tone:e===`failed`&&Q.failed?`red`:`default`,compact:!0},e))}),(0,M.jsx)(L,{counts:Z.priorityCounts}),(0,M.jsxs)(d,{className:`mb-6`,children:[(0,M.jsx)(c,{title:`Backlog depth`,action:(0,M.jsx)(`span`,{className:t(`rounded-full px-2 py-0.5 text-[11px] font-medium`,$.draining?`bg-emerald-500/10 text-success`:$.label===`accumulating`?`bg-red-500/10 text-danger`:`bg-surface-2 text-muted`),children:$.label})}),K.length<2?(0,M.jsx)(`p`,{className:`py-6 text-center text-xs text-faint`,children:`Sampling… the backlog trend appears after a few polls.`}):(0,M.jsx)(E,{height:140,ariaLabel:`${e} backlog depth`,series:[{label:`depth`,color:`var(--accent)`,points:K,area:!0}]}),(0,M.jsxs)(`div`,{className:`mt-1 flex items-center justify-between text-xs text-faint`,children:[(0,M.jsx)(`span`,{children:`waiting + active + delayed`}),(0,M.jsxs)(`span`,{className:`tnum`,children:[`Error rate `,_(te)]})]})]}),(0,M.jsx)(ee,{queue:e,paused:Z.paused,busy:a,run:Y}),(0,M.jsx)(k,{queue:e,busy:a,run:Y}),(0,M.jsxs)(`div`,{className:`mb-6 grid grid-cols-1 gap-6 lg:grid-cols-2`,children:[G.stall?(0,M.jsx)(O,{queue:e,config:G.stall,onSaved:()=>{B({ok:!0,text:`Stall config saved ✓`}),S.success(`Stall config saved`,e)}},e):(0,M.jsx)(R,{title:`Stall detection`,onRetry:W}),G.dlq?(0,M.jsx)(A,{queue:e,config:G.dlq,onSaved:()=>{B({ok:!0,text:`DLQ config saved ✓`}),S.success(`DLQ config saved`,e)}},e):(0,M.jsx)(R,{title:`DLQ policy`,onRetry:W})]}),(0,M.jsxs)(d,{padded:!1,children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-between px-5 py-3`,children:[(0,M.jsx)(`h2`,{className:`text-base font-semibold text-fg`,children:`Recent jobs`}),(0,M.jsxs)(i,{to:`/jobs?queue=${encodeURIComponent(e)}`,className:`flex items-center gap-1 text-sm text-muted hover:text-fg`,children:[`View all `,(0,M.jsx)(l,{className:`size-3.5`})]})]}),(0,M.jsx)(`div`,{className:`overflow-x-auto border-t border-line`,children:(0,M.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,M.jsx)(`thead`,{children:(0,M.jsxs)(`tr`,{className:`border-b border-line text-left text-[11px] uppercase tracking-wider text-faint`,children:[(0,M.jsx)(`th`,{scope:`col`,className:`px-5 py-3 font-medium`,children:`ID`}),(0,M.jsx)(`th`,{scope:`col`,className:`px-5 py-3 font-medium`,children:`State`}),(0,M.jsx)(`th`,{scope:`col`,className:`px-5 py-3 text-right font-medium`,children:`Attempts`}),(0,M.jsx)(`th`,{scope:`col`,className:`px-5 py-3 text-right font-medium`,children:`Duration`})]})}),(0,M.jsx)(`tbody`,{children:G.jobs.length===0?(0,M.jsx)(`tr`,{children:(0,M.jsx)(`td`,{colSpan:4,className:`px-5 py-10 text-center text-sm text-faint`,children:`No recent jobs.`})}):G.jobs.map(e=>(0,M.jsxs)(`tr`,{className:`border-b border-line last:border-0 hover:bg-surface-2/40`,children:[(0,M.jsx)(`td`,{className:`px-5 py-3`,children:(0,M.jsx)(i,{to:`/job?id=${encodeURIComponent(e.id)}`,className:`font-mono text-xs text-accent hover:underline`,children:e.id})}),(0,M.jsx)(`td`,{className:`px-5 py-3 text-muted`,children:e.state??`—`}),(0,M.jsxs)(`td`,{className:`px-5 py-3 text-right tnum text-muted`,children:[e.attempts??0,` / `,e.maxAttempts??`?`]}),(0,M.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-muted`,children:x(e.startedAt&&e.completedAt?e.completedAt-e.startedAt:void 0)})]},e.id))})]})})]})]})]})}function L({counts:e}){let t=Object.entries(e??{}).map(([e,t])=>[Number(e),t]).filter(([,e])=>e>0).sort((e,t)=>t[0]-e[0]);if(t.length===0)return null;let n=Math.max(...t.map(([,e])=>e));return(0,M.jsxs)(d,{className:`mb-6`,children:[(0,M.jsx)(c,{title:`Jobs by priority`}),(0,M.jsx)(`div`,{className:`flex flex-col gap-2`,children:t.map(([e,t])=>(0,M.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,M.jsxs)(`span`,{className:`w-16 shrink-0 text-right font-mono text-xs text-muted`,children:[`p`,e]}),(0,M.jsx)(`div`,{className:`h-4 flex-1 overflow-hidden rounded bg-surface-2`,children:(0,M.jsx)(`div`,{className:`h-full rounded bg-accent`,style:{width:`${Math.max(2,t/n*100)}%`}})}),(0,M.jsx)(`span`,{className:`w-14 shrink-0 tnum text-xs text-fg`,children:h(t)})]},e))}),(0,M.jsx)(`p`,{className:`mt-2 text-xs text-faint`,children:`Higher p = higher priority. Waiting jobs only.`})]})}function R({title:e,onRetry:t}){return(0,M.jsxs)(d,{children:[(0,M.jsx)(c,{title:e}),(0,M.jsx)(`p`,{className:`mb-3 text-sm text-muted`,children:`Couldn't load this queue's config.`}),(0,M.jsx)(w,{size:`sm`,onClick:t,children:`Retry`})]})}export{I as QueueDetailPro};
|