bunqueue-dashboard 0.0.14
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/CHANGELOG.md +315 -0
- package/LICENSE +21 -0
- package/README.md +287 -0
- package/agent/db.ts +491 -0
- package/agent/dbQueryWorker.ts +21 -0
- package/agent/index.ts +47 -0
- package/agent/logger.ts +23 -0
- package/agent/manager.ts +262 -0
- package/agent/server.ts +213 -0
- package/dist/.vite/manifest.json +578 -0
- package/dist/assets/AddJob-DOtZrwc-.js +3 -0
- package/dist/assets/AreaChart-DzUXW8u3.js +1 -0
- package/dist/assets/Benchmark-BKVE509y.js +1 -0
- package/dist/assets/CopilotPanel-Bn8gPZx_.js +152 -0
- package/dist/assets/CopyButton-CSjndiY7.js +1 -0
- package/dist/assets/Cron-DzeoQTpD.js +1 -0
- package/dist/assets/CronManager-CI6wTFbe.js +1 -0
- package/dist/assets/Database-Bjkl_O9n.js +3 -0
- package/dist/assets/Diagnostics-BUeDbexv.js +1 -0
- package/dist/assets/Dlq-BzwhitJI.js +1 -0
- package/dist/assets/DlqControl-BUCut0SS.js +1 -0
- package/dist/assets/DlqPro-HoeGdD-B.js +1 -0
- package/dist/assets/Flows-D9sVq4vd.js +1 -0
- package/dist/assets/JobInspector-dB68adRz.js +2 -0
- package/dist/assets/Jobs-CAHFY5qa.js +1 -0
- package/dist/assets/JobsPro-BqIHonV6.js +1 -0
- package/dist/assets/Logs-DjNLXK_r.js +1 -0
- package/dist/assets/LogsPro-BPWf8AAv.js +1 -0
- package/dist/assets/McpServer-BVxK5LwU.js +22 -0
- package/dist/assets/Metrics-Bm_pwxzy.js +1 -0
- package/dist/assets/MetricsPro-DTsnXQVd.js +1 -0
- package/dist/assets/Overview-O67Y-R5x.js +1 -0
- package/dist/assets/Pagination-B-nfZjQZ.js +1 -0
- package/dist/assets/QueueControl-BrHXeXPc.js +1 -0
- package/dist/assets/QueueDetail-D-C5SXxB.js +1 -0
- package/dist/assets/Queues-5tq1o_1I.js +1 -0
- package/dist/assets/QueuesOverview-ClZM34rT.js +1 -0
- package/dist/assets/S3Backup-BZfckRKX.js +1 -0
- package/dist/assets/S3BackupPro-CteU25_J.js +1 -0
- package/dist/assets/ServerControl-BSLX2WeV.js +3 -0
- package/dist/assets/Settings-BAELEgud.js +1 -0
- package/dist/assets/Usage-B_8T34Sp.js +1 -0
- package/dist/assets/UsagePro-BhhM0H05.js +1 -0
- package/dist/assets/Webhooks-B_qJ0bx1.js +1 -0
- package/dist/assets/Workers-N6qIdxg1.js +1 -0
- package/dist/assets/WorkersPro-DzjKVhCO.js +1 -0
- package/dist/assets/cn-CMFYpumL.js +1 -0
- package/dist/assets/connectionStore-DI-LYcct.js +1 -0
- package/dist/assets/form-PtDLk33Z.js +1 -0
- package/dist/assets/index-ChJpSdwV.js +8 -0
- package/dist/assets/index-DNaP_bi8.css +1 -0
- package/dist/assets/install-BvB40Zk0.js +3 -0
- package/dist/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
- package/dist/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
- package/dist/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
- package/dist/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
- package/dist/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
- package/dist/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
- package/dist/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
- package/dist/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
- package/dist/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
- package/dist/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
- package/dist/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- package/dist/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
- package/dist/assets/jobActions-CuOdMglt.js +1 -0
- package/dist/assets/react-vendor-CHIHtdAC.js +11 -0
- package/dist/favicon.svg +27 -0
- package/dist/index.html +30 -0
- package/package.json +90 -0
- package/scripts/embedded.gen.ts +122 -0
- package/scripts/serve.ts +92 -0
|
@@ -0,0 +1,578 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_AreaChart-DzUXW8u3.js": {
|
|
3
|
+
"file": "assets/AreaChart-DzUXW8u3.js",
|
|
4
|
+
"name": "AreaChart",
|
|
5
|
+
"imports": [
|
|
6
|
+
"_cn-CMFYpumL.js",
|
|
7
|
+
"_react-vendor-CHIHtdAC.js"
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
"_CopyButton-CSjndiY7.js": {
|
|
11
|
+
"file": "assets/CopyButton-CSjndiY7.js",
|
|
12
|
+
"name": "CopyButton",
|
|
13
|
+
"imports": [
|
|
14
|
+
"_cn-CMFYpumL.js",
|
|
15
|
+
"_react-vendor-CHIHtdAC.js",
|
|
16
|
+
"index.html"
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"_Pagination-B-nfZjQZ.js": {
|
|
20
|
+
"file": "assets/Pagination-B-nfZjQZ.js",
|
|
21
|
+
"name": "Pagination",
|
|
22
|
+
"imports": [
|
|
23
|
+
"_cn-CMFYpumL.js",
|
|
24
|
+
"_react-vendor-CHIHtdAC.js",
|
|
25
|
+
"index.html"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"_cn-CMFYpumL.js": {
|
|
29
|
+
"file": "assets/cn-CMFYpumL.js",
|
|
30
|
+
"name": "cn"
|
|
31
|
+
},
|
|
32
|
+
"_connectionStore-DI-LYcct.js": {
|
|
33
|
+
"file": "assets/connectionStore-DI-LYcct.js",
|
|
34
|
+
"name": "connectionStore",
|
|
35
|
+
"imports": [
|
|
36
|
+
"_cn-CMFYpumL.js",
|
|
37
|
+
"_react-vendor-CHIHtdAC.js"
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"_form-PtDLk33Z.js": {
|
|
41
|
+
"file": "assets/form-PtDLk33Z.js",
|
|
42
|
+
"name": "form",
|
|
43
|
+
"imports": [
|
|
44
|
+
"_cn-CMFYpumL.js",
|
|
45
|
+
"_react-vendor-CHIHtdAC.js"
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"_jobActions-CuOdMglt.js": {
|
|
49
|
+
"file": "assets/jobActions-CuOdMglt.js",
|
|
50
|
+
"name": "jobActions"
|
|
51
|
+
},
|
|
52
|
+
"_react-vendor-CHIHtdAC.js": {
|
|
53
|
+
"file": "assets/react-vendor-CHIHtdAC.js",
|
|
54
|
+
"name": "react-vendor",
|
|
55
|
+
"imports": [
|
|
56
|
+
"_cn-CMFYpumL.js"
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
"index.html": {
|
|
60
|
+
"file": "assets/index-ChJpSdwV.js",
|
|
61
|
+
"name": "index",
|
|
62
|
+
"src": "index.html",
|
|
63
|
+
"isEntry": true,
|
|
64
|
+
"imports": [
|
|
65
|
+
"_cn-CMFYpumL.js",
|
|
66
|
+
"_react-vendor-CHIHtdAC.js",
|
|
67
|
+
"_connectionStore-DI-LYcct.js"
|
|
68
|
+
],
|
|
69
|
+
"dynamicImports": [
|
|
70
|
+
"src/components/copilot/CopilotPanel.tsx",
|
|
71
|
+
"src/pages/control/AddJob.tsx",
|
|
72
|
+
"src/pages/control/Benchmark.tsx",
|
|
73
|
+
"src/pages/control/CronManager.tsx",
|
|
74
|
+
"src/pages/control/Database.tsx",
|
|
75
|
+
"src/pages/control/Diagnostics.tsx",
|
|
76
|
+
"src/pages/control/DlqControl.tsx",
|
|
77
|
+
"src/pages/control/DlqPro.tsx",
|
|
78
|
+
"src/pages/control/Flows.tsx",
|
|
79
|
+
"src/pages/control/JobInspector.tsx",
|
|
80
|
+
"src/pages/control/JobsPro.tsx",
|
|
81
|
+
"src/pages/control/LogsPro.tsx",
|
|
82
|
+
"src/pages/control/McpServer.tsx",
|
|
83
|
+
"src/pages/control/MetricsPro.tsx",
|
|
84
|
+
"src/pages/control/QueueControl.tsx",
|
|
85
|
+
"src/pages/control/QueuesOverview.tsx",
|
|
86
|
+
"src/pages/control/S3BackupPro.tsx",
|
|
87
|
+
"src/pages/control/ServerControl.tsx",
|
|
88
|
+
"src/pages/control/UsagePro.tsx",
|
|
89
|
+
"src/pages/control/Webhooks.tsx",
|
|
90
|
+
"src/pages/control/WorkersPro.tsx",
|
|
91
|
+
"src/pages/Cron.tsx",
|
|
92
|
+
"src/pages/Dlq.tsx",
|
|
93
|
+
"src/pages/Jobs.tsx",
|
|
94
|
+
"src/pages/Logs.tsx",
|
|
95
|
+
"src/pages/Metrics.tsx",
|
|
96
|
+
"src/pages/Overview.tsx",
|
|
97
|
+
"src/pages/QueueDetail.tsx",
|
|
98
|
+
"src/pages/Queues.tsx",
|
|
99
|
+
"src/pages/S3Backup.tsx",
|
|
100
|
+
"src/pages/Settings.tsx",
|
|
101
|
+
"src/pages/Usage.tsx",
|
|
102
|
+
"src/pages/Workers.tsx",
|
|
103
|
+
"src/lib/demo/install.ts"
|
|
104
|
+
],
|
|
105
|
+
"css": [
|
|
106
|
+
"assets/index-DNaP_bi8.css"
|
|
107
|
+
],
|
|
108
|
+
"assets": [
|
|
109
|
+
"assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2",
|
|
110
|
+
"assets/inter-cyrillic-wght-normal-DqGufNeO.woff2",
|
|
111
|
+
"assets/inter-greek-ext-wght-normal-DlzME5K_.woff2",
|
|
112
|
+
"assets/inter-greek-wght-normal-CkhJZR-_.woff2",
|
|
113
|
+
"assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2",
|
|
114
|
+
"assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2",
|
|
115
|
+
"assets/inter-latin-wght-normal-Dx4kXJAl.woff2",
|
|
116
|
+
"assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2",
|
|
117
|
+
"assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2",
|
|
118
|
+
"assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2",
|
|
119
|
+
"assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2",
|
|
120
|
+
"assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2"
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
"node_modules/@fontsource-variable/inter/files/inter-cyrillic-ext-wght-normal.woff2": {
|
|
124
|
+
"file": "assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2",
|
|
125
|
+
"src": "node_modules/@fontsource-variable/inter/files/inter-cyrillic-ext-wght-normal.woff2"
|
|
126
|
+
},
|
|
127
|
+
"node_modules/@fontsource-variable/inter/files/inter-cyrillic-wght-normal.woff2": {
|
|
128
|
+
"file": "assets/inter-cyrillic-wght-normal-DqGufNeO.woff2",
|
|
129
|
+
"src": "node_modules/@fontsource-variable/inter/files/inter-cyrillic-wght-normal.woff2"
|
|
130
|
+
},
|
|
131
|
+
"node_modules/@fontsource-variable/inter/files/inter-greek-ext-wght-normal.woff2": {
|
|
132
|
+
"file": "assets/inter-greek-ext-wght-normal-DlzME5K_.woff2",
|
|
133
|
+
"src": "node_modules/@fontsource-variable/inter/files/inter-greek-ext-wght-normal.woff2"
|
|
134
|
+
},
|
|
135
|
+
"node_modules/@fontsource-variable/inter/files/inter-greek-wght-normal.woff2": {
|
|
136
|
+
"file": "assets/inter-greek-wght-normal-CkhJZR-_.woff2",
|
|
137
|
+
"src": "node_modules/@fontsource-variable/inter/files/inter-greek-wght-normal.woff2"
|
|
138
|
+
},
|
|
139
|
+
"node_modules/@fontsource-variable/inter/files/inter-latin-ext-wght-normal.woff2": {
|
|
140
|
+
"file": "assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2",
|
|
141
|
+
"src": "node_modules/@fontsource-variable/inter/files/inter-latin-ext-wght-normal.woff2"
|
|
142
|
+
},
|
|
143
|
+
"node_modules/@fontsource-variable/inter/files/inter-latin-wght-normal.woff2": {
|
|
144
|
+
"file": "assets/inter-latin-wght-normal-Dx4kXJAl.woff2",
|
|
145
|
+
"src": "node_modules/@fontsource-variable/inter/files/inter-latin-wght-normal.woff2"
|
|
146
|
+
},
|
|
147
|
+
"node_modules/@fontsource-variable/inter/files/inter-vietnamese-wght-normal.woff2": {
|
|
148
|
+
"file": "assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2",
|
|
149
|
+
"src": "node_modules/@fontsource-variable/inter/files/inter-vietnamese-wght-normal.woff2"
|
|
150
|
+
},
|
|
151
|
+
"node_modules/@fontsource-variable/jetbrains-mono/files/jetbrains-mono-cyrillic-wght-normal.woff2": {
|
|
152
|
+
"file": "assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2",
|
|
153
|
+
"src": "node_modules/@fontsource-variable/jetbrains-mono/files/jetbrains-mono-cyrillic-wght-normal.woff2"
|
|
154
|
+
},
|
|
155
|
+
"node_modules/@fontsource-variable/jetbrains-mono/files/jetbrains-mono-greek-wght-normal.woff2": {
|
|
156
|
+
"file": "assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2",
|
|
157
|
+
"src": "node_modules/@fontsource-variable/jetbrains-mono/files/jetbrains-mono-greek-wght-normal.woff2"
|
|
158
|
+
},
|
|
159
|
+
"node_modules/@fontsource-variable/jetbrains-mono/files/jetbrains-mono-latin-ext-wght-normal.woff2": {
|
|
160
|
+
"file": "assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2",
|
|
161
|
+
"src": "node_modules/@fontsource-variable/jetbrains-mono/files/jetbrains-mono-latin-ext-wght-normal.woff2"
|
|
162
|
+
},
|
|
163
|
+
"node_modules/@fontsource-variable/jetbrains-mono/files/jetbrains-mono-latin-wght-normal.woff2": {
|
|
164
|
+
"file": "assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2",
|
|
165
|
+
"src": "node_modules/@fontsource-variable/jetbrains-mono/files/jetbrains-mono-latin-wght-normal.woff2"
|
|
166
|
+
},
|
|
167
|
+
"node_modules/@fontsource-variable/jetbrains-mono/files/jetbrains-mono-vietnamese-wght-normal.woff2": {
|
|
168
|
+
"file": "assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2",
|
|
169
|
+
"src": "node_modules/@fontsource-variable/jetbrains-mono/files/jetbrains-mono-vietnamese-wght-normal.woff2"
|
|
170
|
+
},
|
|
171
|
+
"src/components/copilot/CopilotPanel.tsx": {
|
|
172
|
+
"file": "assets/CopilotPanel-Bn8gPZx_.js",
|
|
173
|
+
"name": "CopilotPanel",
|
|
174
|
+
"src": "src/components/copilot/CopilotPanel.tsx",
|
|
175
|
+
"isDynamicEntry": true,
|
|
176
|
+
"imports": [
|
|
177
|
+
"_cn-CMFYpumL.js",
|
|
178
|
+
"_react-vendor-CHIHtdAC.js",
|
|
179
|
+
"index.html",
|
|
180
|
+
"_form-PtDLk33Z.js"
|
|
181
|
+
]
|
|
182
|
+
},
|
|
183
|
+
"src/lib/demo/install.ts": {
|
|
184
|
+
"file": "assets/install-BvB40Zk0.js",
|
|
185
|
+
"name": "install",
|
|
186
|
+
"src": "src/lib/demo/install.ts",
|
|
187
|
+
"isDynamicEntry": true
|
|
188
|
+
},
|
|
189
|
+
"src/pages/Cron.tsx": {
|
|
190
|
+
"file": "assets/Cron-DzeoQTpD.js",
|
|
191
|
+
"name": "Cron",
|
|
192
|
+
"src": "src/pages/Cron.tsx",
|
|
193
|
+
"isDynamicEntry": true,
|
|
194
|
+
"imports": [
|
|
195
|
+
"_cn-CMFYpumL.js",
|
|
196
|
+
"_react-vendor-CHIHtdAC.js",
|
|
197
|
+
"index.html",
|
|
198
|
+
"_Pagination-B-nfZjQZ.js"
|
|
199
|
+
]
|
|
200
|
+
},
|
|
201
|
+
"src/pages/Dlq.tsx": {
|
|
202
|
+
"file": "assets/Dlq-BzwhitJI.js",
|
|
203
|
+
"name": "Dlq",
|
|
204
|
+
"src": "src/pages/Dlq.tsx",
|
|
205
|
+
"isDynamicEntry": true,
|
|
206
|
+
"imports": [
|
|
207
|
+
"_cn-CMFYpumL.js",
|
|
208
|
+
"_react-vendor-CHIHtdAC.js",
|
|
209
|
+
"index.html",
|
|
210
|
+
"_form-PtDLk33Z.js",
|
|
211
|
+
"_Pagination-B-nfZjQZ.js"
|
|
212
|
+
]
|
|
213
|
+
},
|
|
214
|
+
"src/pages/Jobs.tsx": {
|
|
215
|
+
"file": "assets/Jobs-CAHFY5qa.js",
|
|
216
|
+
"name": "Jobs",
|
|
217
|
+
"src": "src/pages/Jobs.tsx",
|
|
218
|
+
"isDynamicEntry": true,
|
|
219
|
+
"imports": [
|
|
220
|
+
"_cn-CMFYpumL.js",
|
|
221
|
+
"_react-vendor-CHIHtdAC.js",
|
|
222
|
+
"index.html",
|
|
223
|
+
"_form-PtDLk33Z.js"
|
|
224
|
+
]
|
|
225
|
+
},
|
|
226
|
+
"src/pages/Logs.tsx": {
|
|
227
|
+
"file": "assets/Logs-DjNLXK_r.js",
|
|
228
|
+
"name": "Logs",
|
|
229
|
+
"src": "src/pages/Logs.tsx",
|
|
230
|
+
"isDynamicEntry": true,
|
|
231
|
+
"imports": [
|
|
232
|
+
"_cn-CMFYpumL.js",
|
|
233
|
+
"_react-vendor-CHIHtdAC.js",
|
|
234
|
+
"index.html",
|
|
235
|
+
"_form-PtDLk33Z.js",
|
|
236
|
+
"_Pagination-B-nfZjQZ.js"
|
|
237
|
+
]
|
|
238
|
+
},
|
|
239
|
+
"src/pages/Metrics.tsx": {
|
|
240
|
+
"file": "assets/Metrics-Bm_pwxzy.js",
|
|
241
|
+
"name": "Metrics",
|
|
242
|
+
"src": "src/pages/Metrics.tsx",
|
|
243
|
+
"isDynamicEntry": true,
|
|
244
|
+
"imports": [
|
|
245
|
+
"_react-vendor-CHIHtdAC.js",
|
|
246
|
+
"index.html"
|
|
247
|
+
]
|
|
248
|
+
},
|
|
249
|
+
"src/pages/Overview.tsx": {
|
|
250
|
+
"file": "assets/Overview-O67Y-R5x.js",
|
|
251
|
+
"name": "Overview",
|
|
252
|
+
"src": "src/pages/Overview.tsx",
|
|
253
|
+
"isDynamicEntry": true,
|
|
254
|
+
"imports": [
|
|
255
|
+
"_react-vendor-CHIHtdAC.js",
|
|
256
|
+
"index.html"
|
|
257
|
+
]
|
|
258
|
+
},
|
|
259
|
+
"src/pages/QueueDetail.tsx": {
|
|
260
|
+
"file": "assets/QueueDetail-D-C5SXxB.js",
|
|
261
|
+
"name": "QueueDetail",
|
|
262
|
+
"src": "src/pages/QueueDetail.tsx",
|
|
263
|
+
"isDynamicEntry": true,
|
|
264
|
+
"imports": [
|
|
265
|
+
"_cn-CMFYpumL.js",
|
|
266
|
+
"_react-vendor-CHIHtdAC.js",
|
|
267
|
+
"index.html",
|
|
268
|
+
"_form-PtDLk33Z.js"
|
|
269
|
+
]
|
|
270
|
+
},
|
|
271
|
+
"src/pages/Queues.tsx": {
|
|
272
|
+
"file": "assets/Queues-5tq1o_1I.js",
|
|
273
|
+
"name": "Queues",
|
|
274
|
+
"src": "src/pages/Queues.tsx",
|
|
275
|
+
"isDynamicEntry": true,
|
|
276
|
+
"imports": [
|
|
277
|
+
"_cn-CMFYpumL.js",
|
|
278
|
+
"_react-vendor-CHIHtdAC.js",
|
|
279
|
+
"index.html",
|
|
280
|
+
"_Pagination-B-nfZjQZ.js"
|
|
281
|
+
]
|
|
282
|
+
},
|
|
283
|
+
"src/pages/S3Backup.tsx": {
|
|
284
|
+
"file": "assets/S3Backup-BZfckRKX.js",
|
|
285
|
+
"name": "S3Backup",
|
|
286
|
+
"src": "src/pages/S3Backup.tsx",
|
|
287
|
+
"isDynamicEntry": true,
|
|
288
|
+
"imports": [
|
|
289
|
+
"_react-vendor-CHIHtdAC.js",
|
|
290
|
+
"index.html"
|
|
291
|
+
]
|
|
292
|
+
},
|
|
293
|
+
"src/pages/Settings.tsx": {
|
|
294
|
+
"file": "assets/Settings-BAELEgud.js",
|
|
295
|
+
"name": "Settings",
|
|
296
|
+
"src": "src/pages/Settings.tsx",
|
|
297
|
+
"isDynamicEntry": true,
|
|
298
|
+
"imports": [
|
|
299
|
+
"_cn-CMFYpumL.js",
|
|
300
|
+
"_react-vendor-CHIHtdAC.js",
|
|
301
|
+
"_connectionStore-DI-LYcct.js",
|
|
302
|
+
"index.html",
|
|
303
|
+
"_form-PtDLk33Z.js"
|
|
304
|
+
]
|
|
305
|
+
},
|
|
306
|
+
"src/pages/Usage.tsx": {
|
|
307
|
+
"file": "assets/Usage-B_8T34Sp.js",
|
|
308
|
+
"name": "Usage",
|
|
309
|
+
"src": "src/pages/Usage.tsx",
|
|
310
|
+
"isDynamicEntry": true,
|
|
311
|
+
"imports": [
|
|
312
|
+
"_react-vendor-CHIHtdAC.js",
|
|
313
|
+
"index.html"
|
|
314
|
+
]
|
|
315
|
+
},
|
|
316
|
+
"src/pages/Workers.tsx": {
|
|
317
|
+
"file": "assets/Workers-N6qIdxg1.js",
|
|
318
|
+
"name": "Workers",
|
|
319
|
+
"src": "src/pages/Workers.tsx",
|
|
320
|
+
"isDynamicEntry": true,
|
|
321
|
+
"imports": [
|
|
322
|
+
"_cn-CMFYpumL.js",
|
|
323
|
+
"_react-vendor-CHIHtdAC.js",
|
|
324
|
+
"index.html",
|
|
325
|
+
"_Pagination-B-nfZjQZ.js"
|
|
326
|
+
]
|
|
327
|
+
},
|
|
328
|
+
"src/pages/control/AddJob.tsx": {
|
|
329
|
+
"file": "assets/AddJob-DOtZrwc-.js",
|
|
330
|
+
"name": "AddJob",
|
|
331
|
+
"src": "src/pages/control/AddJob.tsx",
|
|
332
|
+
"isDynamicEntry": true,
|
|
333
|
+
"imports": [
|
|
334
|
+
"_cn-CMFYpumL.js",
|
|
335
|
+
"_react-vendor-CHIHtdAC.js",
|
|
336
|
+
"index.html",
|
|
337
|
+
"_form-PtDLk33Z.js"
|
|
338
|
+
]
|
|
339
|
+
},
|
|
340
|
+
"src/pages/control/Benchmark.tsx": {
|
|
341
|
+
"file": "assets/Benchmark-BKVE509y.js",
|
|
342
|
+
"name": "Benchmark",
|
|
343
|
+
"src": "src/pages/control/Benchmark.tsx",
|
|
344
|
+
"isDynamicEntry": true,
|
|
345
|
+
"imports": [
|
|
346
|
+
"_cn-CMFYpumL.js",
|
|
347
|
+
"_react-vendor-CHIHtdAC.js",
|
|
348
|
+
"index.html",
|
|
349
|
+
"_form-PtDLk33Z.js",
|
|
350
|
+
"_AreaChart-DzUXW8u3.js",
|
|
351
|
+
"_CopyButton-CSjndiY7.js"
|
|
352
|
+
]
|
|
353
|
+
},
|
|
354
|
+
"src/pages/control/CronManager.tsx": {
|
|
355
|
+
"file": "assets/CronManager-CI6wTFbe.js",
|
|
356
|
+
"name": "CronManager",
|
|
357
|
+
"src": "src/pages/control/CronManager.tsx",
|
|
358
|
+
"isDynamicEntry": true,
|
|
359
|
+
"imports": [
|
|
360
|
+
"_cn-CMFYpumL.js",
|
|
361
|
+
"_react-vendor-CHIHtdAC.js",
|
|
362
|
+
"index.html",
|
|
363
|
+
"_form-PtDLk33Z.js",
|
|
364
|
+
"_Pagination-B-nfZjQZ.js"
|
|
365
|
+
]
|
|
366
|
+
},
|
|
367
|
+
"src/pages/control/Database.tsx": {
|
|
368
|
+
"file": "assets/Database-Bjkl_O9n.js",
|
|
369
|
+
"name": "Database",
|
|
370
|
+
"src": "src/pages/control/Database.tsx",
|
|
371
|
+
"isDynamicEntry": true,
|
|
372
|
+
"imports": [
|
|
373
|
+
"_cn-CMFYpumL.js",
|
|
374
|
+
"_react-vendor-CHIHtdAC.js",
|
|
375
|
+
"index.html",
|
|
376
|
+
"_form-PtDLk33Z.js",
|
|
377
|
+
"_Pagination-B-nfZjQZ.js",
|
|
378
|
+
"_CopyButton-CSjndiY7.js"
|
|
379
|
+
]
|
|
380
|
+
},
|
|
381
|
+
"src/pages/control/Diagnostics.tsx": {
|
|
382
|
+
"file": "assets/Diagnostics-BUeDbexv.js",
|
|
383
|
+
"name": "Diagnostics",
|
|
384
|
+
"src": "src/pages/control/Diagnostics.tsx",
|
|
385
|
+
"isDynamicEntry": true,
|
|
386
|
+
"imports": [
|
|
387
|
+
"_cn-CMFYpumL.js",
|
|
388
|
+
"_react-vendor-CHIHtdAC.js",
|
|
389
|
+
"index.html"
|
|
390
|
+
]
|
|
391
|
+
},
|
|
392
|
+
"src/pages/control/DlqControl.tsx": {
|
|
393
|
+
"file": "assets/DlqControl-BUCut0SS.js",
|
|
394
|
+
"name": "DlqControl",
|
|
395
|
+
"src": "src/pages/control/DlqControl.tsx",
|
|
396
|
+
"isDynamicEntry": true,
|
|
397
|
+
"imports": [
|
|
398
|
+
"_cn-CMFYpumL.js",
|
|
399
|
+
"_react-vendor-CHIHtdAC.js",
|
|
400
|
+
"index.html",
|
|
401
|
+
"_form-PtDLk33Z.js",
|
|
402
|
+
"_Pagination-B-nfZjQZ.js"
|
|
403
|
+
]
|
|
404
|
+
},
|
|
405
|
+
"src/pages/control/DlqPro.tsx": {
|
|
406
|
+
"file": "assets/DlqPro-HoeGdD-B.js",
|
|
407
|
+
"name": "DlqPro",
|
|
408
|
+
"src": "src/pages/control/DlqPro.tsx",
|
|
409
|
+
"isDynamicEntry": true,
|
|
410
|
+
"imports": [
|
|
411
|
+
"_cn-CMFYpumL.js",
|
|
412
|
+
"_react-vendor-CHIHtdAC.js",
|
|
413
|
+
"index.html",
|
|
414
|
+
"_form-PtDLk33Z.js",
|
|
415
|
+
"_Pagination-B-nfZjQZ.js"
|
|
416
|
+
]
|
|
417
|
+
},
|
|
418
|
+
"src/pages/control/Flows.tsx": {
|
|
419
|
+
"file": "assets/Flows-D9sVq4vd.js",
|
|
420
|
+
"name": "Flows",
|
|
421
|
+
"src": "src/pages/control/Flows.tsx",
|
|
422
|
+
"isDynamicEntry": true,
|
|
423
|
+
"imports": [
|
|
424
|
+
"_cn-CMFYpumL.js",
|
|
425
|
+
"_react-vendor-CHIHtdAC.js",
|
|
426
|
+
"index.html"
|
|
427
|
+
]
|
|
428
|
+
},
|
|
429
|
+
"src/pages/control/JobInspector.tsx": {
|
|
430
|
+
"file": "assets/JobInspector-dB68adRz.js",
|
|
431
|
+
"name": "JobInspector",
|
|
432
|
+
"src": "src/pages/control/JobInspector.tsx",
|
|
433
|
+
"isDynamicEntry": true,
|
|
434
|
+
"imports": [
|
|
435
|
+
"_cn-CMFYpumL.js",
|
|
436
|
+
"_react-vendor-CHIHtdAC.js",
|
|
437
|
+
"index.html",
|
|
438
|
+
"_form-PtDLk33Z.js",
|
|
439
|
+
"_CopyButton-CSjndiY7.js",
|
|
440
|
+
"_jobActions-CuOdMglt.js"
|
|
441
|
+
]
|
|
442
|
+
},
|
|
443
|
+
"src/pages/control/JobsPro.tsx": {
|
|
444
|
+
"file": "assets/JobsPro-BqIHonV6.js",
|
|
445
|
+
"name": "JobsPro",
|
|
446
|
+
"src": "src/pages/control/JobsPro.tsx",
|
|
447
|
+
"isDynamicEntry": true,
|
|
448
|
+
"imports": [
|
|
449
|
+
"_cn-CMFYpumL.js",
|
|
450
|
+
"_react-vendor-CHIHtdAC.js",
|
|
451
|
+
"index.html",
|
|
452
|
+
"_form-PtDLk33Z.js",
|
|
453
|
+
"_Pagination-B-nfZjQZ.js",
|
|
454
|
+
"_jobActions-CuOdMglt.js"
|
|
455
|
+
]
|
|
456
|
+
},
|
|
457
|
+
"src/pages/control/LogsPro.tsx": {
|
|
458
|
+
"file": "assets/LogsPro-BPWf8AAv.js",
|
|
459
|
+
"name": "LogsPro",
|
|
460
|
+
"src": "src/pages/control/LogsPro.tsx",
|
|
461
|
+
"isDynamicEntry": true,
|
|
462
|
+
"imports": [
|
|
463
|
+
"_cn-CMFYpumL.js",
|
|
464
|
+
"_react-vendor-CHIHtdAC.js",
|
|
465
|
+
"index.html",
|
|
466
|
+
"_form-PtDLk33Z.js",
|
|
467
|
+
"_Pagination-B-nfZjQZ.js"
|
|
468
|
+
]
|
|
469
|
+
},
|
|
470
|
+
"src/pages/control/McpServer.tsx": {
|
|
471
|
+
"file": "assets/McpServer-BVxK5LwU.js",
|
|
472
|
+
"name": "McpServer",
|
|
473
|
+
"src": "src/pages/control/McpServer.tsx",
|
|
474
|
+
"isDynamicEntry": true,
|
|
475
|
+
"imports": [
|
|
476
|
+
"_react-vendor-CHIHtdAC.js",
|
|
477
|
+
"index.html",
|
|
478
|
+
"_CopyButton-CSjndiY7.js"
|
|
479
|
+
]
|
|
480
|
+
},
|
|
481
|
+
"src/pages/control/MetricsPro.tsx": {
|
|
482
|
+
"file": "assets/MetricsPro-DTsnXQVd.js",
|
|
483
|
+
"name": "MetricsPro",
|
|
484
|
+
"src": "src/pages/control/MetricsPro.tsx",
|
|
485
|
+
"isDynamicEntry": true,
|
|
486
|
+
"imports": [
|
|
487
|
+
"_cn-CMFYpumL.js",
|
|
488
|
+
"_react-vendor-CHIHtdAC.js",
|
|
489
|
+
"index.html",
|
|
490
|
+
"_Pagination-B-nfZjQZ.js",
|
|
491
|
+
"_AreaChart-DzUXW8u3.js"
|
|
492
|
+
]
|
|
493
|
+
},
|
|
494
|
+
"src/pages/control/QueueControl.tsx": {
|
|
495
|
+
"file": "assets/QueueControl-BrHXeXPc.js",
|
|
496
|
+
"name": "QueueControl",
|
|
497
|
+
"src": "src/pages/control/QueueControl.tsx",
|
|
498
|
+
"isDynamicEntry": true,
|
|
499
|
+
"imports": [
|
|
500
|
+
"_cn-CMFYpumL.js",
|
|
501
|
+
"_react-vendor-CHIHtdAC.js",
|
|
502
|
+
"index.html",
|
|
503
|
+
"_form-PtDLk33Z.js"
|
|
504
|
+
]
|
|
505
|
+
},
|
|
506
|
+
"src/pages/control/QueuesOverview.tsx": {
|
|
507
|
+
"file": "assets/QueuesOverview-ClZM34rT.js",
|
|
508
|
+
"name": "QueuesOverview",
|
|
509
|
+
"src": "src/pages/control/QueuesOverview.tsx",
|
|
510
|
+
"isDynamicEntry": true,
|
|
511
|
+
"imports": [
|
|
512
|
+
"_cn-CMFYpumL.js",
|
|
513
|
+
"_react-vendor-CHIHtdAC.js",
|
|
514
|
+
"index.html",
|
|
515
|
+
"_Pagination-B-nfZjQZ.js"
|
|
516
|
+
]
|
|
517
|
+
},
|
|
518
|
+
"src/pages/control/S3BackupPro.tsx": {
|
|
519
|
+
"file": "assets/S3BackupPro-CteU25_J.js",
|
|
520
|
+
"name": "S3BackupPro",
|
|
521
|
+
"src": "src/pages/control/S3BackupPro.tsx",
|
|
522
|
+
"isDynamicEntry": true,
|
|
523
|
+
"imports": [
|
|
524
|
+
"_cn-CMFYpumL.js",
|
|
525
|
+
"_react-vendor-CHIHtdAC.js",
|
|
526
|
+
"_connectionStore-DI-LYcct.js",
|
|
527
|
+
"index.html",
|
|
528
|
+
"_form-PtDLk33Z.js"
|
|
529
|
+
]
|
|
530
|
+
},
|
|
531
|
+
"src/pages/control/ServerControl.tsx": {
|
|
532
|
+
"file": "assets/ServerControl-BSLX2WeV.js",
|
|
533
|
+
"name": "ServerControl",
|
|
534
|
+
"src": "src/pages/control/ServerControl.tsx",
|
|
535
|
+
"isDynamicEntry": true,
|
|
536
|
+
"imports": [
|
|
537
|
+
"_cn-CMFYpumL.js",
|
|
538
|
+
"_react-vendor-CHIHtdAC.js",
|
|
539
|
+
"index.html",
|
|
540
|
+
"_form-PtDLk33Z.js",
|
|
541
|
+
"_CopyButton-CSjndiY7.js"
|
|
542
|
+
]
|
|
543
|
+
},
|
|
544
|
+
"src/pages/control/UsagePro.tsx": {
|
|
545
|
+
"file": "assets/UsagePro-BhhM0H05.js",
|
|
546
|
+
"name": "UsagePro",
|
|
547
|
+
"src": "src/pages/control/UsagePro.tsx",
|
|
548
|
+
"isDynamicEntry": true,
|
|
549
|
+
"imports": [
|
|
550
|
+
"_react-vendor-CHIHtdAC.js",
|
|
551
|
+
"index.html"
|
|
552
|
+
]
|
|
553
|
+
},
|
|
554
|
+
"src/pages/control/Webhooks.tsx": {
|
|
555
|
+
"file": "assets/Webhooks-B_qJ0bx1.js",
|
|
556
|
+
"name": "Webhooks",
|
|
557
|
+
"src": "src/pages/control/Webhooks.tsx",
|
|
558
|
+
"isDynamicEntry": true,
|
|
559
|
+
"imports": [
|
|
560
|
+
"_cn-CMFYpumL.js",
|
|
561
|
+
"_react-vendor-CHIHtdAC.js",
|
|
562
|
+
"index.html",
|
|
563
|
+
"_form-PtDLk33Z.js",
|
|
564
|
+
"_Pagination-B-nfZjQZ.js"
|
|
565
|
+
]
|
|
566
|
+
},
|
|
567
|
+
"src/pages/control/WorkersPro.tsx": {
|
|
568
|
+
"file": "assets/WorkersPro-DzjKVhCO.js",
|
|
569
|
+
"name": "WorkersPro",
|
|
570
|
+
"src": "src/pages/control/WorkersPro.tsx",
|
|
571
|
+
"isDynamicEntry": true,
|
|
572
|
+
"imports": [
|
|
573
|
+
"_cn-CMFYpumL.js",
|
|
574
|
+
"_react-vendor-CHIHtdAC.js",
|
|
575
|
+
"index.html"
|
|
576
|
+
]
|
|
577
|
+
}
|
|
578
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{r as e}from"./cn-CMFYpumL.js";import{m as t,t as n}from"./react-vendor-CHIHtdAC.js";import{D as r,E as i,T as a,g as o,j as s,v as c}from"./index-ChJpSdwV.js";import{n as l,o as u,t as d}from"./form-PtDLk33Z.js";var f=e(t(),1),p=n();function m(){let{data:e}=s(()=>o.queues(),[],{intervalMs:3e4}),[t,n]=(0,f.useState)(``),[u,m]=(0,f.useState)(`{
|
|
2
|
+
"hello": "world"
|
|
3
|
+
}`),[g,_]=(0,f.useState)(`1`),[v,y]=(0,f.useState)(``),[b,x]=(0,f.useState)(``),[S,C]=(0,f.useState)(``),[w,T]=(0,f.useState)(``),[E,D]=(0,f.useState)(``),[O,k]=(0,f.useState)(``),[A,j]=(0,f.useState)(!1),[M,N]=(0,f.useState)(!1),[P,F]=(0,f.useState)(!1),[I,L]=(0,f.useState)(!1),[R,z]=(0,f.useState)(!1),[B,V]=(0,f.useState)(null),[H,U]=(0,f.useState)(null),W=e=>{let t=Number(e);return e.trim()!==``&&Number.isFinite(t)?t:void 0},G=async()=>{if(V(null),U(null),!t.trim()){V({ok:!1,msg:`Choose a queue`});return}let e;try{e=JSON.parse(u)}catch(e){U(`Invalid JSON: ${e.message}`);return}let n={data:e,priority:W(v),delay:W(b),maxAttempts:W(S),backoff:W(w),timeout:W(E),jobId:O.trim()||void 0,removeOnComplete:A||void 0,removeOnFail:M||void 0,durable:P||void 0,lifo:I||void 0},r=W(g)??1;if(!Number.isInteger(r)||r<1){V({ok:!1,msg:`Count must be an integer of at least 1`});return}if(r>1e4){V({ok:!1,msg:`Count must be 10000 or fewer`});return}z(!0);try{if(r===1)V({ok:!0,msg:`Created job ${(await o.addJob(t,n)).id}`});else{let e=await o.addJobsBulk(t,Array.from({length:r},()=>n)),i=new Set(e.ids).size;V({ok:!0,msg:`Created ${i} job${i===1?``:`s`}`})}}catch(e){V({ok:!1,msg:e.message})}finally{z(!1)}};return(0,p.jsxs)(`div`,{children:[(0,p.jsx)(c,{title:`Add Job`,description:`Enqueue a job with full options.`}),(0,p.jsxs)(`form`,{className:`grid grid-cols-1 gap-6 lg:grid-cols-2`,onSubmit:e=>{e.preventDefault(),G()},children:[(0,p.jsxs)(a,{children:[(0,p.jsx)(i,{title:`Job`}),(0,p.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,p.jsxs)(d,{label:`Queue`,children:[(0,p.jsx)(l,{list:`queue-options`,value:t,onChange:e=>n(e.target.value),placeholder:`queue name (existing or new)`}),(0,p.jsx)(`datalist`,{id:`queue-options`,children:(e?.queues??[]).map(e=>(0,p.jsx)(`option`,{value:e.name},e.name))})]}),(0,p.jsxs)(`div`,{children:[(0,p.jsx)(d,{label:`Data (JSON)`,children:(0,p.jsx)(`textarea`,{value:u,onChange:e=>m(e.target.value),spellCheck:!1,rows:7,className:`w-full rounded-lg border border-line bg-surface-2 p-3 font-mono text-sm text-fg focus:border-accent/60 focus:outline-none focus:ring-2 focus:ring-accent/30`})}),H&&(0,p.jsx)(`p`,{className:`mt-2 text-xs text-danger`,children:H})]})]})]}),(0,p.jsxs)(a,{children:[(0,p.jsx)(i,{title:`Options`}),(0,p.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 md:grid-cols-3`,children:[(0,p.jsx)(d,{label:`Priority`,children:(0,p.jsx)(l,{type:`number`,value:v,onChange:e=>y(e.target.value),placeholder:`0`})}),(0,p.jsx)(d,{label:`Delay (ms)`,children:(0,p.jsx)(l,{type:`number`,min:0,value:b,onChange:e=>x(e.target.value),placeholder:`0`})}),(0,p.jsx)(d,{label:`Max attempts`,children:(0,p.jsx)(l,{type:`number`,min:1,value:S,onChange:e=>C(e.target.value),placeholder:`3`})}),(0,p.jsx)(d,{label:`Backoff (ms)`,children:(0,p.jsx)(l,{type:`number`,min:0,value:w,onChange:e=>T(e.target.value),placeholder:`1000`})}),(0,p.jsx)(d,{label:`Timeout (ms)`,children:(0,p.jsx)(l,{type:`number`,min:0,value:E,onChange:e=>D(e.target.value),placeholder:`—`})}),(0,p.jsx)(d,{label:`Custom job ID`,children:(0,p.jsx)(l,{value:O,onChange:e=>k(e.target.value),placeholder:`idempotency key`})})]}),(0,p.jsxs)(`div`,{className:`mt-4 flex flex-wrap gap-6`,children:[(0,p.jsx)(h,{label:`removeOnComplete`,checked:A,onChange:j}),(0,p.jsx)(h,{label:`removeOnFail`,checked:M,onChange:N}),(0,p.jsx)(h,{label:`durable`,checked:P,onChange:F}),(0,p.jsx)(h,{label:`lifo`,checked:I,onChange:L})]})]}),(0,p.jsxs)(`div`,{className:`flex flex-wrap items-end gap-3 lg:col-span-2`,children:[(0,p.jsx)(`div`,{className:`w-28`,children:(0,p.jsx)(d,{label:`Count`,children:(0,p.jsx)(l,{type:`number`,min:1,value:g,onChange:e=>_(e.target.value)})})}),(0,p.jsx)(r,{type:`submit`,variant:`accent`,disabled:R,children:R?`Adding…`:`Add job`}),B&&(0,p.jsx)(`span`,{className:B.ok?`text-sm text-success`:`text-sm text-danger`,children:B.msg})]})]})]})}function h({label:e,checked:t,onChange:n}){return(0,p.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,p.jsx)(u,{checked:t,onChange:n,label:e}),(0,p.jsx)(`span`,{className:`font-mono text-xs text-muted`,children:e})]})}export{m as AddJob};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./cn-CMFYpumL.js";import{m as t,t as n}from"./react-vendor-CHIHtdAC.js";var r=e(t(),1),i=n();function a({series:e,height:t=180,xLabels:n,ariaLabel:a=`throughput chart`}){let o=(0,r.useId)().replace(/:/g,``),s=t,c=e=>Number.isFinite(e)?e:0,l=Math.max(1,...e.map(e=>e.points.length)),u=Math.max(1,...e.flatMap(e=>e.points.map(c))),d=e=>l<=1?0:e/(l-1)*600,f=e=>s-10-c(e)/u*(s-20),p=[0,.25,.5,.75,1].map(e=>10+e*(s-20));return(0,i.jsxs)(`div`,{className:`w-full`,children:[(0,i.jsxs)(`svg`,{viewBox:`0 0 600 ${s}`,preserveAspectRatio:`none`,className:`w-full`,style:{height:t},role:`img`,"aria-label":a,children:[(0,i.jsx)(`defs`,{children:e.map((e,t)=>(0,i.jsxs)(`linearGradient`,{id:`${o}-g${t}`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,i.jsx)(`stop`,{offset:`0%`,stopColor:e.color,stopOpacity:`0.28`}),(0,i.jsx)(`stop`,{offset:`100%`,stopColor:e.color,stopOpacity:`0`})]},e.label))}),p.map(e=>(0,i.jsx)(`line`,{x1:`0`,y1:e,x2:600,y2:e,stroke:`var(--line)`,strokeWidth:`1`},e)),e.map((e,t)=>{if(e.points.length===0)return null;let n=e.points.length===1?`M0,${f(e.points[0])} L600,${f(e.points[0])}`:e.points.map((e,t)=>`${t===0?`M`:`L`}${d(t)},${f(e)}`).join(` `),r=e.points.length===1?`${n} L600,${s} L0,${s} Z`:`${n} L${d(e.points.length-1)},${s} L${d(0)},${s} Z`;return(0,i.jsxs)(`g`,{children:[e.area&&(0,i.jsx)(`path`,{d:r,fill:`url(#${o}-g${t})`}),(0,i.jsx)(`path`,{d:n,fill:`none`,stroke:e.color,strokeWidth:`2`,strokeLinejoin:`round`,vectorEffect:`non-scaling-stroke`})]},e.label)})]}),n&&(0,i.jsx)(`div`,{className:`mt-1 flex justify-between px-1 font-mono text-[10px] text-faint`,children:n.map(e=>(0,i.jsx)(`span`,{children:e},e))})]})}export{a as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,t}from"./cn-CMFYpumL.js";import{m as n,t as r}from"./react-vendor-CHIHtdAC.js";import{D as i,E as a,T as o,U as s,W as c,_ as l,c as u,g as d,j as f,r as p,s as m,v as h}from"./index-ChJpSdwV.js";import{i as g,n as _,o as v,t as y}from"./form-PtDLk33Z.js";import{t as b}from"./AreaChart-DzUXW8u3.js";import{t as x}from"./CopyButton-CSjndiY7.js";var S=e(n(),1),C={total:1e6,batch:5e3,producers:64,payload:65536,workers:64,workerBatch:1e3,processMs:6e4,durationS:600},w={queue:`benchmark`,mode:`count`,total:5e3,durationS:30,batch:100,producers:4,payload:128,workers:4,workerBatch:100,processMs:5,durable:!1,removeOnComplete:!0},T={Smoke:{mode:`count`,total:200,batch:50,producers:2,workers:1,workerBatch:50,processMs:0},Standard:{mode:`count`,total:5e3,batch:100,producers:4,workers:4,workerBatch:100,processMs:5},Stress:{mode:`count`,total:5e4,batch:500,producers:16,workers:16,workerBatch:200,processMs:0},Soak:{mode:`duration`,durationS:30,batch:100,producers:4,workers:8,workerBatch:100,processMs:10}},E=(e,t,n)=>Number.isFinite(e)?Math.max(t,Math.min(n,Math.floor(e))):t,D=(e,t)=>e.length?e[Math.min(e.length-1,Math.floor(t/100*e.length))]:0,O=(e,t,n,r,i)=>Array.from({length:t},(t,a)=>({data:{i:e+a,blob:n},durable:r,removeOnComplete:i})),k=e=>new Promise(t=>setTimeout(t,e)),A=async(e,t)=>{let n=performance.now()+e;for(;t()&&performance.now()<n;)await k(Math.min(100,Math.max(0,n-performance.now())))},j=e=>e instanceof Error?e.message:String(e),M=e=>e>=1e6?`${(e/1e6).toFixed(2)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:`${Math.round(e)}`,N=r();function P({history:e,onClear:t}){if(!e.length)return null;let n=JSON.stringify(e,null,2);return(0,N.jsxs)(o,{padded:!1,className:`mt-6 overflow-hidden`,children:[(0,N.jsxs)(`div`,{className:`flex items-center justify-between border-b border-line px-5 py-3`,children:[(0,N.jsx)(`h3`,{className:`text-base font-semibold text-fg`,children:`Run history`}),(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(x,{value:n}),(0,N.jsx)(i,{size:`sm`,variant:`ghost`,onClick:()=>{let e=new Blob([n],{type:`application/json`}),t=URL.createObjectURL(e),r=document.createElement(`a`);r.href=t,r.download=`benchmark-history-${Date.now()}.json`,r.click(),URL.revokeObjectURL(t)},children:`Export JSON`}),(0,N.jsx)(i,{size:`sm`,variant:`ghost`,onClick:t,children:`Clear`})]})]}),(0,N.jsx)(`div`,{className:`overflow-x-auto`,children:(0,N.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,N.jsx)(`thead`,{children:(0,N.jsxs)(`tr`,{className:`border-b border-line text-left text-[11px] uppercase tracking-wider text-faint`,children:[(0,N.jsx)(`th`,{className:`px-5 py-2 font-medium`,children:`Mode`}),(0,N.jsx)(`th`,{className:`px-5 py-2 text-right font-medium`,children:`Prod`}),(0,N.jsx)(`th`,{className:`px-5 py-2 text-right font-medium`,children:`Wkr`}),(0,N.jsx)(`th`,{className:`px-5 py-2 text-right font-medium`,children:`Pushed`}),(0,N.jsx)(`th`,{className:`px-5 py-2 text-right font-medium`,children:`Done`}),(0,N.jsx)(`th`,{className:`px-5 py-2 text-right font-medium`,children:`Push/s`}),(0,N.jsx)(`th`,{className:`px-5 py-2 text-right font-medium`,children:`Done/s`}),(0,N.jsx)(`th`,{className:`px-5 py-2 text-right font-medium`,children:`p95`}),(0,N.jsx)(`th`,{className:`px-5 py-2 text-right font-medium`,children:`Dur`})]})}),(0,N.jsx)(`tbody`,{children:e.map(e=>(0,N.jsxs)(`tr`,{className:`border-b border-line last:border-0 hover:bg-surface-2/40`,children:[(0,N.jsx)(`td`,{className:`px-5 py-2 capitalize text-muted`,children:e.mode}),(0,N.jsx)(`td`,{className:`px-5 py-2 text-right tnum text-muted`,children:e.producers}),(0,N.jsx)(`td`,{className:`px-5 py-2 text-right tnum text-muted`,children:e.workers}),(0,N.jsx)(`td`,{className:`px-5 py-2 text-right tnum text-fg`,children:u(e.pushed)}),(0,N.jsx)(`td`,{className:`px-5 py-2 text-right tnum text-success`,children:u(e.completed)}),(0,N.jsxs)(`td`,{className:`px-5 py-2 text-right tnum text-accent`,children:[M(e.pushPerSec),`/s`]}),(0,N.jsxs)(`td`,{className:`px-5 py-2 text-right tnum text-success`,children:[M(e.donePerSec),`/s`]}),(0,N.jsx)(`td`,{className:`px-5 py-2 text-right tnum text-muted`,children:m(e.p95)}),(0,N.jsx)(`td`,{className:`px-5 py-2 text-right tnum text-muted`,children:m(e.durationMs)})]},e.id))})]})})]})}var F={pushed:0,completed:0,pushFailed:0,ackFailed:0,bytes:0,elapsedMs:0,pushPerSec:0,donePerSec:0,activeWorkers:0,pushSeries:[],doneSeries:[],etaMs:null,error:null},I=()=>({pushed:0,completed:0,pushFailed:0,ackFailed:0,bytes:0,assigned:0,startedAt:0,pushLat:[],activeWorkers:0,error:null,lastAt:0,lastPushed:0,lastDone:0,pushSeries:[],doneSeries:[]}),L=0;function R(){let[e,t]=(0,S.useState)(`idle`),[n,r]=(0,S.useState)(F),[i,a]=(0,S.useState)(null),[o,s]=(0,S.useState)([]),[c,l]=(0,S.useState)(null),u=(0,S.useRef)(!1),f=(0,S.useRef)(!1),p=(0,S.useRef)(!1),m=(0,S.useRef)(null),h=(0,S.useRef)(`idle`);h.current=e;let g=(0,S.useRef)(I());return(0,S.useEffect)(()=>()=>{u.current=!0},[]),(0,S.useEffect)(()=>{if(e!==`running`&&e!==`draining`)return;let t=setInterval(()=>{let e=g.current,t=performance.now(),n=t-e.startedAt,i=(t-e.lastAt)/1e3,a=i>0?Math.max(0,(e.pushed-e.lastPushed)/i):0,o=i>0?Math.max(0,(e.completed-e.lastDone)/i):0;e.lastAt=t,e.lastPushed=e.pushed,e.lastDone=e.completed,e.pushSeries=[...e.pushSeries,a].slice(-60),e.doneSeries=[...e.doneSeries,o].slice(-60);let s=null,c=m.current;if(c&&c.mode===`count`){let t=E(c.total,1,C.total);if(h.current===`draining`){let r=e.doneSeries.slice(-10),i=r.length?r.reduce((e,t)=>e+t,0)/r.length:0;i<=0&&n>0&&(i=e.completed/(n/1e3)),i>0&&(s=Math.max(0,t-e.completed)/i*1e3)}else a>0&&(s=Math.max(0,t-e.pushed)/a*1e3)}else c&&c.mode===`duration`&&(s=Math.max(0,E(c.durationS,1,C.durationS)*1e3-n));r({pushed:e.pushed,completed:e.completed,pushFailed:e.pushFailed,ackFailed:e.ackFailed,bytes:e.bytes,elapsedMs:n,pushPerSec:a,donePerSec:o,activeWorkers:e.activeWorkers,pushSeries:e.pushSeries,doneSeries:e.doneSeries,etaMs:s,error:e.error})},200);return()=>clearInterval(t)},[e]),{phase:e,live:n,summary:i,history:o,runCfg:c,run:async e=>{if(!f.current){f.current=!0;try{a(null);let n=e.queue.trim();if(!n){r({...F,error:`Queue name is required.`}),t(`error`);return}try{await d.overview()}catch(e){r({...F,error:`Server unreachable — start it on the Server page first. (${j(e)})`}),t(`error`);return}let i=E(e.total,1,C.total),o=E(e.durationS,1,C.durationS)*1e3,c=E(e.batch,1,C.batch),f=E(e.producers,e.mode===`duration`?0:1,C.producers),_=E(e.payload,0,C.payload),v=E(e.workers,0,C.workers),y=E(e.workerBatch,1,C.workerBatch),b=E(e.processMs,0,C.processMs);u.current=!1,p.current=!1,m.current=e,l(e),g.current=I(),g.current.startedAt=performance.now(),g.current.lastAt=performance.now(),r({...F}),t(`running`);let x=`x`.repeat(_),S=performance.now()+o,w=async()=>{for(;!u.current;){let t;if(e.mode===`count`){if(g.current.assigned>=i)break;t=Math.min(c,i-g.current.assigned)}else{if(performance.now()>=S)break;t=c}let r=g.current.assigned;g.current.assigned+=t;let a=O(r,t,x,e.durable,e.removeOnComplete),o=performance.now();try{await d.addJobsBulk(n,a),g.current.pushed+=t,g.current.bytes+=t*_}catch(e){g.current.pushFailed+=t,g.current.error??=j(e)}g.current.pushLat.push(performance.now()-o)}},T=async()=>{for(;!u.current&&!(e.mode===`duration`&&performance.now()>=S||e.mode===`count`&&g.current.completed>=i);){g.current.activeWorkers++;let t=[];try{try{t=(await d.pullBatch(n,y)).jobs??[]}catch(e){g.current.error??=j(e)}if(t.length>0){b>0&&await A(b,()=>!u.current);try{await d.ackBatch(t.map(e=>e.id)),g.current.completed+=t.length}catch(e){g.current.ackFailed+=t.length,g.current.error??=j(e)}}}finally{g.current.activeWorkers--}if(t.length===0){if(e.mode===`count`&&p.current)break;await k(50)}}},M=Array.from({length:f},w),N=Array.from({length:v},T),P=Promise.all(M).then(()=>{p.current=!0,!u.current&&e.mode===`count`&&v>0&&h.current===`running`&&t(`draining`)});await Promise.all([P,...N]);let R=g.current,z=performance.now()-R.startedAt,B=z/1e3||1,V=[...R.pushLat].sort((e,t)=>e-t),H={pushed:R.pushed,completed:R.completed,pushFailed:R.pushFailed,ackFailed:R.ackFailed,bytes:R.bytes,durationMs:z,pushPerSec:R.pushed/B,donePerSec:R.completed/B,mbPerSec:R.bytes/B,avg:V.length?V.reduce((e,t)=>e+t,0)/V.length:0,p50:D(V,50),p95:D(V,95),p99:D(V,99),max:V.length?V[V.length-1]:0,error:R.error};a(H),r(e=>({...e,pushed:R.pushed,completed:R.completed,elapsedMs:z,pushPerSec:0,donePerSec:0,activeWorkers:0,etaMs:0})),s(t=>[{...H,id:++L,at:Date.now(),mode:e.mode,producers:f,workers:v},...t].slice(0,12)),t(u.current?`stopped`:`done`)}finally{f.current=!1}}},stop:()=>{u.current=!0,(h.current===`running`||h.current===`draining`)&&t(`stopping`)},reset:()=>{u.current=!0,a(null),r(F),t(`idle`)},clearHistory:()=>s([])}}var z=[`count`,`duration`],B=[`total`,`durationS`,`batch`,`producers`,`payload`,`workers`,`workerBatch`,`processMs`],V=e=>({...e,total:String(e.total),durationS:String(e.durationS),batch:String(e.batch),producers:String(e.producers),payload:String(e.payload),workers:String(e.workers),workerBatch:String(e.workerBatch),processMs:String(e.processMs)}),H=e=>({...e,total:Number(e.total),durationS:Number(e.durationS),batch:Number(e.batch),producers:Number(e.producers),payload:Number(e.payload),workers:Number(e.workers),workerBatch:Number(e.workerBatch),processMs:Number(e.processMs)});function U(){let[e,n]=(0,S.useState)(()=>V(w)),r=R(),{phase:x,live:D,summary:O,history:k}=r,A=x===`running`||x===`draining`||x===`stopping`,j=(e,t)=>n(n=>({...n,[e]:t})),F=e=>t=>j(e,t.target.value),I=e=>n(t=>{let n={...t};for(let[t,r]of Object.entries(e))n[t]=B.includes(t)?String(r):r;return n}),[L,U]=(0,S.useState)(w.queue);(0,S.useEffect)(()=>{let t=setTimeout(()=>U(e.queue.trim()||w.queue),400);return()=>clearTimeout(t)},[e.queue]);let{data:ee,error:te}=f(()=>d.counts(L),[L],{intervalMs:1e3}),K=ee?.counts??null,[q,J]=(0,S.useState)(!1),[Y,X]=(0,S.useState)(null),ne=async()=>{let t=e.queue.trim();if(!(q||!t||!window.confirm(`Remove benchmark jobs from "${t}"?`))){J(!0),X(null);try{for(let e of[`waiting`,`completed`,`failed`,`delayed`])try{await d.clean(t,{state:e,limit:C.total})}catch{}X({remaining:(await d.counts(t).catch(()=>null))?.counts?.active??0})}finally{J(!1)}}},Z=r.runCfg??H(e),Q=E(Z.total,1,C.total),$=E(Z.workers,0,C.workers),re=Z.mode===`count`&&(A||O)?Math.min(100,D.pushed/Q*100):0,ie=Z.mode===`count`&&(A||O)?Math.min(100,D.completed/Q*100):0,ae=Z.mode===`duration`?Math.min(100,D.elapsedMs/(E(Z.durationS,1,C.durationS)*1e3)*100):0,oe=x===`running`?Z.mode===`duration`?`Running…`:`Producing…`:x===`draining`?`Draining…`:x===`stopping`?`Stopping…`:x===`error`?`Error`:O?`Result`:`Ready`,se=(x===`running`||x===`draining`)&&D.etaMs!=null?D.etaMs>0?`ETA ${m(D.etaMs)}`:`finishing…`:x===`stopped`?`stopped early`:x===`done`?`complete`:``;return(0,N.jsxs)(`div`,{children:[(0,N.jsx)(h,{title:`Benchmark`,description:`Drive real load against the server — producers bulk-enqueue jobs while simulated workers pull, process and ack them. Throughput is measured client-side; the queue genuinely fills and drains.`,actions:x===`stopping`?(0,N.jsxs)(i,{variant:`warning`,size:`sm`,disabled:!0,children:[(0,N.jsx)(s,{className:`size-3.5`}),` Stopping…`]}):A?(0,N.jsxs)(i,{variant:`warning`,size:`sm`,onClick:r.stop,children:[(0,N.jsx)(s,{className:`size-3.5`}),` Stop`]}):(0,N.jsxs)(i,{variant:`success`,size:`sm`,onClick:()=>r.run(H(e)),children:[(0,N.jsx)(c,{className:`size-3.5`}),` Run benchmark`]})}),D.error&&(0,N.jsx)(`div`,{className:`mb-4 rounded-lg border border-red-500/20 bg-red-500/5 px-4 py-2 text-sm text-danger`,children:D.error}),(0,N.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center gap-2`,children:[(0,N.jsx)(`span`,{className:`text-xs font-medium uppercase tracking-wider text-faint`,children:`Presets`}),Object.keys(T).map(e=>(0,N.jsx)(`button`,{type:`button`,disabled:A,onClick:()=>I(T[e]),className:`rounded-md border border-line bg-surface-2 px-2.5 py-1 text-xs text-muted transition-colors hover:border-line-strong hover:text-fg disabled:opacity-40`,children:e},e))]}),(0,N.jsxs)(`div`,{className:`grid grid-cols-1 gap-6 lg:grid-cols-3`,children:[(0,N.jsxs)(o,{className:`lg:col-span-1`,children:[(0,N.jsx)(a,{title:`Configuration`}),(0,N.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,N.jsx)(y,{label:`Queue`,hint:`Jobs are enqueued here (created on first push).`,children:(0,N.jsx)(_,{value:e.queue,disabled:A,onChange:e=>j(`queue`,e.target.value)})}),(0,N.jsx)(y,{label:`Mode`,hint:e.mode===`count`?`Push a fixed number of jobs.`:`Run producers + workers for a fixed time.`,children:(0,N.jsx)(g,{options:z,value:e.mode,onChange:e=>j(`mode`,e),disabled:A})}),e.mode===`count`?(0,N.jsx)(y,{label:`Total jobs`,hint:`max ${u(C.total)}`,children:(0,N.jsx)(_,{type:`number`,min:1,max:C.total,value:e.total,disabled:A,onChange:F(`total`)})}):(0,N.jsx)(y,{label:`Duration (s)`,hint:`max ${C.durationS}s`,children:(0,N.jsx)(_,{type:`number`,min:1,max:C.durationS,value:e.durationS,disabled:A,onChange:F(`durationS`)})}),(0,N.jsx)(`div`,{className:`mt-1 text-[11px] font-semibold uppercase tracking-wider text-faint`,children:`Producers`}),(0,N.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,N.jsx)(y,{label:`Producers`,hint:`parallel, max ${C.producers}`,children:(0,N.jsx)(_,{type:`number`,min:e.mode===`duration`?0:1,max:C.producers,value:e.producers,disabled:A,onChange:F(`producers`)})}),(0,N.jsx)(y,{label:`Push batch`,hint:`jobs/req, max ${C.batch}`,children:(0,N.jsx)(_,{type:`number`,min:1,max:C.batch,value:e.batch,disabled:A,onChange:F(`batch`)})}),(0,N.jsx)(y,{label:`Payload`,hint:`bytes/job, max ${u(C.payload)}`,children:(0,N.jsx)(_,{type:`number`,min:0,max:C.payload,value:e.payload,disabled:A,onChange:F(`payload`)})})]}),(0,N.jsx)(`div`,{className:`mt-1 text-[11px] font-semibold uppercase tracking-wider text-faint`,children:`Workers (simulated)`}),(0,N.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,N.jsx)(y,{label:`Workers`,hint:`0 = produce only, max ${C.workers}`,children:(0,N.jsx)(_,{type:`number`,min:0,max:C.workers,value:e.workers,disabled:A,onChange:F(`workers`)})}),(0,N.jsx)(y,{label:`Pull batch`,hint:`jobs/pull, max ${C.workerBatch}`,children:(0,N.jsx)(_,{type:`number`,min:1,max:C.workerBatch,value:e.workerBatch,disabled:A,onChange:F(`workerBatch`)})}),(0,N.jsx)(y,{label:`Process (ms)`,hint:`simulated work per pull`,children:(0,N.jsx)(_,{type:`number`,min:0,max:C.processMs,value:e.processMs,disabled:A,onChange:F(`processMs`)})})]}),(0,N.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2`,children:[(0,N.jsx)(v,{checked:e.durable,onChange:e=>j(`durable`,e),disabled:A}),(0,N.jsx)(`span`,{className:`text-sm text-muted`,children:`Durable (fsync each job)`})]}),(0,N.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2`,children:[(0,N.jsx)(v,{checked:e.removeOnComplete,onChange:e=>j(`removeOnComplete`,e),disabled:A}),(0,N.jsx)(`span`,{className:`text-sm text-muted`,children:`Remove on complete`})]}),(0,N.jsxs)(`div`,{className:`flex items-center gap-3 pt-1`,children:[(0,N.jsx)(i,{variant:`ghost`,size:`sm`,disabled:A||q,onClick:ne,children:q?`Cleaning…`:`Clean queue`}),Y&&(0,N.jsx)(`span`,{className:t(`text-xs`,Y.remaining>0?`text-warning`:`text-success`),children:Y.remaining>0?`Cleaned — ${u(Y.remaining)} active job(s) remain (requeued after the stall timeout)`:`Cleaned — 0 jobs remain`})]})]})]}),(0,N.jsxs)(`div`,{className:`flex flex-col gap-6 lg:col-span-2`,children:[(0,N.jsxs)(o,{children:[(0,N.jsxs)(`div`,{className:`mb-3 flex items-center justify-between`,children:[(0,N.jsx)(`h3`,{className:`text-base font-semibold text-fg`,children:oe}),(0,N.jsx)(`span`,{className:`text-xs text-faint`,children:se})]}),(0,N.jsx)(W,{label:Z.mode===`duration`?`Elapsed`:`Produced`,pct:Z.mode===`duration`?ae:re,tone:`accent`}),$>0&&Z.mode===`count`&&(0,N.jsx)(W,{label:`Completed`,pct:ie,tone:`emerald`}),(0,N.jsxs)(`div`,{className:`mt-4 grid grid-cols-2 gap-4 md:grid-cols-4`,children:[(0,N.jsx)(l,{label:`Pushed`,value:u(D.pushed),tone:`accent`,compact:!0}),(0,N.jsx)(l,{label:`Completed`,value:u(D.completed),tone:`green`,compact:!0}),(0,N.jsx)(l,{label:`Push/sec`,value:M(D.pushPerSec),compact:!0}),(0,N.jsx)(l,{label:`Done/sec`,value:M(D.donePerSec),tone:`green`,compact:!0}),(0,N.jsx)(l,{label:`Elapsed`,value:m(D.elapsedMs),compact:!0}),(0,N.jsx)(l,{label:`Active workers`,value:`${D.activeWorkers}/${$}`,tone:`blue`,compact:!0}),(0,N.jsx)(l,{label:`Data`,value:p(O?.bytes??D.bytes),compact:!0}),(0,N.jsx)(l,{label:`Errors`,value:u((O?.pushFailed??D.pushFailed)+(O?.ackFailed??D.ackFailed)),tone:D.pushFailed+D.ackFailed?`red`:`default`,compact:!0})]})]}),(0,N.jsxs)(o,{children:[(0,N.jsx)(a,{title:`Throughput`}),(0,N.jsx)(`p`,{className:`-mt-3 mb-4 text-xs text-faint`,children:`Enqueue (client → server) vs completion (workers) per second`}),(0,N.jsx)(b,{series:[{label:`Push/sec`,color:`#38bdf8`,points:D.pushSeries,area:!0},{label:`Done/sec`,color:`#34d399`,points:D.doneSeries,area:!0}]}),(0,N.jsxs)(`div`,{className:`mt-2 flex items-center gap-4 font-mono text-[11px] text-faint`,children:[(0,N.jsx)(G,{color:`#38bdf8`,label:`Push/sec`,value:D.pushPerSec}),(0,N.jsx)(G,{color:`#34d399`,label:`Done/sec`,value:D.donePerSec})]})]})]})]}),O&&(0,N.jsxs)(o,{className:`mt-6`,children:[(0,N.jsx)(a,{title:`Summary`}),(0,N.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 md:grid-cols-4 xl:grid-cols-8`,children:[(0,N.jsx)(l,{label:`Pushed`,value:u(O.pushed),tone:`accent`,compact:!0}),(0,N.jsx)(l,{label:`Completed`,value:u(O.completed),tone:`green`,compact:!0}),(0,N.jsx)(l,{label:`Duration`,value:m(O.durationMs),compact:!0}),(0,N.jsx)(l,{label:`Avg push/s`,value:M(O.pushPerSec),tone:`accent`,compact:!0}),(0,N.jsx)(l,{label:`Avg done/s`,value:M(O.donePerSec),tone:`green`,compact:!0}),(0,N.jsx)(l,{label:`Data rate`,value:`${p(O.mbPerSec)}/s`,compact:!0}),(0,N.jsx)(l,{label:`Push p95`,value:m(O.p95),compact:!0}),(0,N.jsx)(l,{label:`Push p99`,value:m(O.p99),compact:!0})]}),(0,N.jsxs)(`p`,{className:`mt-3 text-xs text-faint`,children:[`Push-batch latency avg `,m(O.avg),` · p50 `,m(O.p50),` · p95`,` `,m(O.p95),` · p99 `,m(O.p99),` · max `,m(O.max),`.`,O.error?` First error: ${O.error}`:``]})]}),(0,N.jsxs)(o,{className:`mt-6`,children:[(0,N.jsx)(a,{title:`Server queue: ${L}`,action:te?(0,N.jsx)(`span`,{className:`text-xs font-medium text-warning`,children:`stale — server unreachable`}):void 0}),(0,N.jsx)(`p`,{className:`-mt-3 mb-4 text-xs text-faint`,children:`Live counts from the server (poll 1s).`}),K?(0,N.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 md:grid-cols-5`,children:[(0,N.jsx)(l,{label:`Waiting`,value:u(K.waiting??0),tone:`amber`,compact:!0}),(0,N.jsx)(l,{label:`Active`,value:u(K.active??0),tone:`blue`,compact:!0}),(0,N.jsx)(l,{label:`Completed`,value:u(K.completed??0),tone:`green`,compact:!0}),(0,N.jsx)(l,{label:`Failed`,value:u(K.failed??0),tone:K.failed?`red`:`default`,compact:!0}),(0,N.jsx)(l,{label:`Delayed`,value:u(K.delayed??0),compact:!0})]}):(0,N.jsx)(`p`,{className:`text-sm text-faint`,children:`No counts yet — waiting for the server to answer for this queue.`})]}),(0,N.jsx)(P,{history:k,onClear:r.clearHistory})]})}function W({label:e,pct:n,tone:r}){return(0,N.jsxs)(`div`,{className:`mb-2`,children:[(0,N.jsxs)(`div`,{className:`mb-1 flex items-center justify-between text-[11px] text-faint`,children:[(0,N.jsx)(`span`,{children:e}),(0,N.jsxs)(`span`,{className:`tnum`,children:[n.toFixed(0),`%`]})]}),(0,N.jsx)(`div`,{className:`h-1.5 overflow-hidden rounded-full bg-surface-2`,children:(0,N.jsx)(`div`,{className:t(`h-full rounded-full transition-all`,r===`accent`?`bg-accent`:`bg-emerald-500`),style:{width:`${n}%`}})})]})}function G({color:e,label:t,value:n}){return(0,N.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,N.jsx)(`span`,{className:`size-2 rounded-full`,style:{background:e}}),t,` `,(0,N.jsxs)(`span`,{className:`text-fg`,children:[M(n),`/s`]})]})}export{U as Benchmark};
|