bunqueue-dashboard 0.0.23 → 0.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/dist/.vite/manifest.json +77 -75
  2. package/dist/assets/AddJob-D9r_ckWp.js +3 -0
  3. package/dist/assets/Alerts-D5HU-0Dx.js +1 -0
  4. package/dist/assets/AreaChart-Dl_9G6GH.js +1 -0
  5. package/dist/assets/Benchmark-CYC3PIii.js +1 -0
  6. package/dist/assets/BulkAddJobs-BFjzY7tK.js +5 -0
  7. package/dist/assets/{CopilotPanel-05UREVXq.js → CopilotPanel-CZCHTE8m.js} +2 -2
  8. package/dist/assets/{CopyButton-BjMe8rqo.js → CopyButton-fN1FbSIy.js} +1 -1
  9. package/dist/assets/{Cron-BVu2xGBX.js → Cron-BhZGb_DH.js} +1 -1
  10. package/dist/assets/CronManager-CU9_cil9.js +1 -0
  11. package/dist/assets/Database-DYlWeDIA.js +3 -0
  12. package/dist/assets/{Diagnostics-DbncxLB8.js → Diagnostics-BAfmoJ0e.js} +1 -1
  13. package/dist/assets/Dlq-BPUAPLUg.js +1 -0
  14. package/dist/assets/DlqControl-BjeqsueE.js +1 -0
  15. package/dist/assets/DlqPro-vuL9h-Ab.js +1 -0
  16. package/dist/assets/Flows-Czq_GBW2.js +1 -0
  17. package/dist/assets/JobInspector-BMi76I46.js +2 -0
  18. package/dist/assets/Jobs-I66fxS_x.js +1 -0
  19. package/dist/assets/JobsPro-CNgYYpHP.js +1 -0
  20. package/dist/assets/{Logs-BXITESJ-.js → Logs-QacZ07Ig.js} +1 -1
  21. package/dist/assets/LogsPro-BK6dIfm_.js +1 -0
  22. package/dist/assets/{McpServer-DaYWa4Es.js → McpServer-DCTEyxfJ.js} +2 -2
  23. package/dist/assets/{Metrics-BMGLcgiU.js → Metrics-Bo_LGDpq.js} +1 -1
  24. package/dist/assets/MetricsPro-mUantDrK.js +1 -0
  25. package/dist/assets/{Overview-Bex4G7ch.js → Overview-DRa8YOXL.js} +1 -1
  26. package/dist/assets/{Pagination-CTSsxJT4.js → Pagination-ByLXrTJL.js} +1 -1
  27. package/dist/assets/QueueActions-CPo6RJsA.js +1 -0
  28. package/dist/assets/QueueControl-DnGbiwVj.js +1 -0
  29. package/dist/assets/{QueueDetail-ZRFUt3mH.js → QueueDetail-BZQkagxC.js} +1 -1
  30. package/dist/assets/QueueDetailPro-C2faHlWj.js +1 -0
  31. package/dist/assets/{Queues-DkPMFOIm.js → Queues-DwdrD6Fs.js} +1 -1
  32. package/dist/assets/QueuesOverview-CQdc1MDE.js +1 -0
  33. package/dist/assets/{S3Backup-DDpYyr9K.js → S3Backup-9rl71zZ0.js} +1 -1
  34. package/dist/assets/S3BackupPro-BgZyvD-0.js +1 -0
  35. package/dist/assets/ServerControl-C5Rh0kip.js +3 -0
  36. package/dist/assets/Settings-DmnnURrE.js +1 -0
  37. package/dist/assets/{Usage-C50S2SA2.js → Usage-Df84EVYP.js} +1 -1
  38. package/dist/assets/{UsagePro-VGYI-JGk.js → UsagePro-xAJXeKjl.js} +1 -1
  39. package/dist/assets/Webhooks-CxKY1jum.js +1 -0
  40. package/dist/assets/{Workers-RzwwzTJK.js → Workers-C7btFQcD.js} +1 -1
  41. package/dist/assets/WorkersPro-CsGyS9Aq.js +1 -0
  42. package/dist/assets/index-CjnfFs1N.js +8 -0
  43. package/dist/assets/index-KT02j1ql.css +1 -0
  44. package/dist/assets/{useThroughputSeries-PGVgpwVj.js → useThroughputSeries-DMoDDf05.js} +1 -1
  45. package/dist/index.html +2 -2
  46. package/package.json +1 -1
  47. package/scripts/embedded.gen.ts +108 -108
  48. package/dist/assets/AddJob-C-p_fUxU.js +0 -3
  49. package/dist/assets/Alerts-DHUQoHrO.js +0 -1
  50. package/dist/assets/AreaChart-lY-mk5E1.js +0 -1
  51. package/dist/assets/Benchmark-9UTONKIr.js +0 -1
  52. package/dist/assets/BulkAddJobs-DOlzFFNp.js +0 -5
  53. package/dist/assets/CronManager-pAbkEMqi.js +0 -1
  54. package/dist/assets/Database-Q_X_NR2I.js +0 -3
  55. package/dist/assets/Dlq-Dht-XE8I.js +0 -1
  56. package/dist/assets/DlqControl-BdW51Eje.js +0 -1
  57. package/dist/assets/DlqPro-Bc5dBrfL.js +0 -1
  58. package/dist/assets/Flows-BgUrkVp9.js +0 -1
  59. package/dist/assets/JobInspector-cr-oB9MB.js +0 -2
  60. package/dist/assets/Jobs-HgcrHTuA.js +0 -1
  61. package/dist/assets/JobsPro-CHgECoqr.js +0 -1
  62. package/dist/assets/LogsPro-D0trm52t.js +0 -1
  63. package/dist/assets/MetricsPro-4SzRtKMO.js +0 -1
  64. package/dist/assets/QueueActions--MLQejui.js +0 -1
  65. package/dist/assets/QueueControl-D62X3ifm.js +0 -1
  66. package/dist/assets/QueueDetailPro-DY_XL6iK.js +0 -1
  67. package/dist/assets/QueuesOverview-BJaVSLW9.js +0 -1
  68. package/dist/assets/S3BackupPro-DD7fYduD.js +0 -1
  69. package/dist/assets/ServerControl-BzpGcDMa.js +0 -3
  70. package/dist/assets/Settings-BhNwQcDj.js +0 -1
  71. package/dist/assets/Webhooks-WT9fT_UK.js +0 -1
  72. package/dist/assets/WorkersPro-C-Rl2JGa.js +0 -1
  73. package/dist/assets/index-C2XEM9ex.css +0 -1
  74. package/dist/assets/index-DtMgfAiz.js +0 -8
@@ -1,14 +1,14 @@
1
1
  {
2
- "_AreaChart-lY-mk5E1.js": {
3
- "file": "assets/AreaChart-lY-mk5E1.js",
2
+ "_AreaChart-Dl_9G6GH.js": {
3
+ "file": "assets/AreaChart-Dl_9G6GH.js",
4
4
  "name": "AreaChart",
5
5
  "imports": [
6
6
  "_cn-CMFYpumL.js",
7
7
  "_react-vendor-B68RYDeC.js"
8
8
  ]
9
9
  },
10
- "_CopyButton-BjMe8rqo.js": {
11
- "file": "assets/CopyButton-BjMe8rqo.js",
10
+ "_CopyButton-fN1FbSIy.js": {
11
+ "file": "assets/CopyButton-fN1FbSIy.js",
12
12
  "name": "CopyButton",
13
13
  "imports": [
14
14
  "_cn-CMFYpumL.js",
@@ -16,8 +16,8 @@
16
16
  "index.html"
17
17
  ]
18
18
  },
19
- "_Pagination-CTSsxJT4.js": {
20
- "file": "assets/Pagination-CTSsxJT4.js",
19
+ "_Pagination-ByLXrTJL.js": {
20
+ "file": "assets/Pagination-ByLXrTJL.js",
21
21
  "name": "Pagination",
22
22
  "imports": [
23
23
  "_cn-CMFYpumL.js",
@@ -25,8 +25,8 @@
25
25
  "index.html"
26
26
  ]
27
27
  },
28
- "_QueueActions--MLQejui.js": {
29
- "file": "assets/QueueActions--MLQejui.js",
28
+ "_QueueActions-CPo6RJsA.js": {
29
+ "file": "assets/QueueActions-CPo6RJsA.js",
30
30
  "name": "QueueActions",
31
31
  "imports": [
32
32
  "_cn-CMFYpumL.js",
@@ -74,8 +74,8 @@
74
74
  "_cn-CMFYpumL.js"
75
75
  ]
76
76
  },
77
- "_useThroughputSeries-PGVgpwVj.js": {
78
- "file": "assets/useThroughputSeries-PGVgpwVj.js",
77
+ "_useThroughputSeries-DMoDDf05.js": {
78
+ "file": "assets/useThroughputSeries-DMoDDf05.js",
79
79
  "name": "useThroughputSeries",
80
80
  "imports": [
81
81
  "_cn-CMFYpumL.js",
@@ -84,7 +84,7 @@
84
84
  ]
85
85
  },
86
86
  "index.html": {
87
- "file": "assets/index-DtMgfAiz.js",
87
+ "file": "assets/index-CjnfFs1N.js",
88
88
  "name": "index",
89
89
  "src": "index.html",
90
90
  "isEntry": true,
@@ -133,7 +133,7 @@
133
133
  "src/lib/demo/install.ts"
134
134
  ],
135
135
  "css": [
136
- "assets/index-C2XEM9ex.css"
136
+ "assets/index-KT02j1ql.css"
137
137
  ],
138
138
  "assets": [
139
139
  "assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2",
@@ -159,7 +159,7 @@
159
159
  "src": "node_modules/@fontsource-variable/jetbrains-mono/files/jetbrains-mono-latin-wght-normal.woff2"
160
160
  },
161
161
  "src/components/copilot/CopilotPanel.tsx": {
162
- "file": "assets/CopilotPanel-05UREVXq.js",
162
+ "file": "assets/CopilotPanel-CZCHTE8m.js",
163
163
  "name": "CopilotPanel",
164
164
  "src": "src/components/copilot/CopilotPanel.tsx",
165
165
  "isDynamicEntry": true,
@@ -177,7 +177,7 @@
177
177
  "isDynamicEntry": true
178
178
  },
179
179
  "src/pages/Alerts.tsx": {
180
- "file": "assets/Alerts-DHUQoHrO.js",
180
+ "file": "assets/Alerts-D5HU-0Dx.js",
181
181
  "name": "Alerts",
182
182
  "src": "src/pages/Alerts.tsx",
183
183
  "isDynamicEntry": true,
@@ -189,7 +189,7 @@
189
189
  ]
190
190
  },
191
191
  "src/pages/Cron.tsx": {
192
- "file": "assets/Cron-BVu2xGBX.js",
192
+ "file": "assets/Cron-BhZGb_DH.js",
193
193
  "name": "Cron",
194
194
  "src": "src/pages/Cron.tsx",
195
195
  "isDynamicEntry": true,
@@ -197,11 +197,11 @@
197
197
  "_cn-CMFYpumL.js",
198
198
  "_react-vendor-B68RYDeC.js",
199
199
  "index.html",
200
- "_Pagination-CTSsxJT4.js"
200
+ "_Pagination-ByLXrTJL.js"
201
201
  ]
202
202
  },
203
203
  "src/pages/Dlq.tsx": {
204
- "file": "assets/Dlq-Dht-XE8I.js",
204
+ "file": "assets/Dlq-BPUAPLUg.js",
205
205
  "name": "Dlq",
206
206
  "src": "src/pages/Dlq.tsx",
207
207
  "isDynamicEntry": true,
@@ -210,11 +210,11 @@
210
210
  "_react-vendor-B68RYDeC.js",
211
211
  "index.html",
212
212
  "_form-C-zZyKfB.js",
213
- "_Pagination-CTSsxJT4.js"
213
+ "_Pagination-ByLXrTJL.js"
214
214
  ]
215
215
  },
216
216
  "src/pages/Jobs.tsx": {
217
- "file": "assets/Jobs-HgcrHTuA.js",
217
+ "file": "assets/Jobs-I66fxS_x.js",
218
218
  "name": "Jobs",
219
219
  "src": "src/pages/Jobs.tsx",
220
220
  "isDynamicEntry": true,
@@ -226,7 +226,7 @@
226
226
  ]
227
227
  },
228
228
  "src/pages/Logs.tsx": {
229
- "file": "assets/Logs-BXITESJ-.js",
229
+ "file": "assets/Logs-QacZ07Ig.js",
230
230
  "name": "Logs",
231
231
  "src": "src/pages/Logs.tsx",
232
232
  "isDynamicEntry": true,
@@ -235,11 +235,11 @@
235
235
  "_react-vendor-B68RYDeC.js",
236
236
  "index.html",
237
237
  "_form-C-zZyKfB.js",
238
- "_Pagination-CTSsxJT4.js"
238
+ "_Pagination-ByLXrTJL.js"
239
239
  ]
240
240
  },
241
241
  "src/pages/Metrics.tsx": {
242
- "file": "assets/Metrics-BMGLcgiU.js",
242
+ "file": "assets/Metrics-Bo_LGDpq.js",
243
243
  "name": "Metrics",
244
244
  "src": "src/pages/Metrics.tsx",
245
245
  "isDynamicEntry": true,
@@ -249,7 +249,7 @@
249
249
  ]
250
250
  },
251
251
  "src/pages/Overview.tsx": {
252
- "file": "assets/Overview-Bex4G7ch.js",
252
+ "file": "assets/Overview-DRa8YOXL.js",
253
253
  "name": "Overview",
254
254
  "src": "src/pages/Overview.tsx",
255
255
  "isDynamicEntry": true,
@@ -259,7 +259,7 @@
259
259
  ]
260
260
  },
261
261
  "src/pages/QueueDetail.tsx": {
262
- "file": "assets/QueueDetail-ZRFUt3mH.js",
262
+ "file": "assets/QueueDetail-BZQkagxC.js",
263
263
  "name": "QueueDetail",
264
264
  "src": "src/pages/QueueDetail.tsx",
265
265
  "isDynamicEntry": true,
@@ -271,7 +271,7 @@
271
271
  ]
272
272
  },
273
273
  "src/pages/Queues.tsx": {
274
- "file": "assets/Queues-DkPMFOIm.js",
274
+ "file": "assets/Queues-DwdrD6Fs.js",
275
275
  "name": "Queues",
276
276
  "src": "src/pages/Queues.tsx",
277
277
  "isDynamicEntry": true,
@@ -279,11 +279,11 @@
279
279
  "_cn-CMFYpumL.js",
280
280
  "_react-vendor-B68RYDeC.js",
281
281
  "index.html",
282
- "_Pagination-CTSsxJT4.js"
282
+ "_Pagination-ByLXrTJL.js"
283
283
  ]
284
284
  },
285
285
  "src/pages/S3Backup.tsx": {
286
- "file": "assets/S3Backup-DDpYyr9K.js",
286
+ "file": "assets/S3Backup-9rl71zZ0.js",
287
287
  "name": "S3Backup",
288
288
  "src": "src/pages/S3Backup.tsx",
289
289
  "isDynamicEntry": true,
@@ -293,7 +293,7 @@
293
293
  ]
294
294
  },
295
295
  "src/pages/Settings.tsx": {
296
- "file": "assets/Settings-BhNwQcDj.js",
296
+ "file": "assets/Settings-DmnnURrE.js",
297
297
  "name": "Settings",
298
298
  "src": "src/pages/Settings.tsx",
299
299
  "isDynamicEntry": true,
@@ -306,7 +306,7 @@
306
306
  ]
307
307
  },
308
308
  "src/pages/Usage.tsx": {
309
- "file": "assets/Usage-C50S2SA2.js",
309
+ "file": "assets/Usage-Df84EVYP.js",
310
310
  "name": "Usage",
311
311
  "src": "src/pages/Usage.tsx",
312
312
  "isDynamicEntry": true,
@@ -316,7 +316,7 @@
316
316
  ]
317
317
  },
318
318
  "src/pages/Workers.tsx": {
319
- "file": "assets/Workers-RzwwzTJK.js",
319
+ "file": "assets/Workers-C7btFQcD.js",
320
320
  "name": "Workers",
321
321
  "src": "src/pages/Workers.tsx",
322
322
  "isDynamicEntry": true,
@@ -324,11 +324,11 @@
324
324
  "_cn-CMFYpumL.js",
325
325
  "_react-vendor-B68RYDeC.js",
326
326
  "index.html",
327
- "_Pagination-CTSsxJT4.js"
327
+ "_Pagination-ByLXrTJL.js"
328
328
  ]
329
329
  },
330
330
  "src/pages/control/AddJob.tsx": {
331
- "file": "assets/AddJob-C-p_fUxU.js",
331
+ "file": "assets/AddJob-D9r_ckWp.js",
332
332
  "name": "AddJob",
333
333
  "src": "src/pages/control/AddJob.tsx",
334
334
  "isDynamicEntry": true,
@@ -340,21 +340,22 @@
340
340
  ]
341
341
  },
342
342
  "src/pages/control/Benchmark.tsx": {
343
- "file": "assets/Benchmark-9UTONKIr.js",
343
+ "file": "assets/Benchmark-CYC3PIii.js",
344
344
  "name": "Benchmark",
345
345
  "src": "src/pages/control/Benchmark.tsx",
346
346
  "isDynamicEntry": true,
347
347
  "imports": [
348
348
  "_cn-CMFYpumL.js",
349
349
  "_react-vendor-B68RYDeC.js",
350
+ "_connectionStore-B-hNUqwK.js",
350
351
  "index.html",
351
352
  "_form-C-zZyKfB.js",
352
- "_AreaChart-lY-mk5E1.js",
353
- "_CopyButton-BjMe8rqo.js"
353
+ "_AreaChart-Dl_9G6GH.js",
354
+ "_CopyButton-fN1FbSIy.js"
354
355
  ]
355
356
  },
356
357
  "src/pages/control/BulkAddJobs.tsx": {
357
- "file": "assets/BulkAddJobs-DOlzFFNp.js",
358
+ "file": "assets/BulkAddJobs-BFjzY7tK.js",
358
359
  "name": "BulkAddJobs",
359
360
  "src": "src/pages/control/BulkAddJobs.tsx",
360
361
  "isDynamicEntry": true,
@@ -366,7 +367,7 @@
366
367
  ]
367
368
  },
368
369
  "src/pages/control/CronManager.tsx": {
369
- "file": "assets/CronManager-pAbkEMqi.js",
370
+ "file": "assets/CronManager-CU9_cil9.js",
370
371
  "name": "CronManager",
371
372
  "src": "src/pages/control/CronManager.tsx",
372
373
  "isDynamicEntry": true,
@@ -375,11 +376,11 @@
375
376
  "_react-vendor-B68RYDeC.js",
376
377
  "index.html",
377
378
  "_form-C-zZyKfB.js",
378
- "_Pagination-CTSsxJT4.js"
379
+ "_Pagination-ByLXrTJL.js"
379
380
  ]
380
381
  },
381
382
  "src/pages/control/Database.tsx": {
382
- "file": "assets/Database-Q_X_NR2I.js",
383
+ "file": "assets/Database-DYlWeDIA.js",
383
384
  "name": "Database",
384
385
  "src": "src/pages/control/Database.tsx",
385
386
  "isDynamicEntry": true,
@@ -388,12 +389,12 @@
388
389
  "_react-vendor-B68RYDeC.js",
389
390
  "index.html",
390
391
  "_form-C-zZyKfB.js",
391
- "_Pagination-CTSsxJT4.js",
392
- "_CopyButton-BjMe8rqo.js"
392
+ "_Pagination-ByLXrTJL.js",
393
+ "_CopyButton-fN1FbSIy.js"
393
394
  ]
394
395
  },
395
396
  "src/pages/control/Diagnostics.tsx": {
396
- "file": "assets/Diagnostics-DbncxLB8.js",
397
+ "file": "assets/Diagnostics-BAfmoJ0e.js",
397
398
  "name": "Diagnostics",
398
399
  "src": "src/pages/control/Diagnostics.tsx",
399
400
  "isDynamicEntry": true,
@@ -404,7 +405,7 @@
404
405
  ]
405
406
  },
406
407
  "src/pages/control/DlqControl.tsx": {
407
- "file": "assets/DlqControl-BdW51Eje.js",
408
+ "file": "assets/DlqControl-BjeqsueE.js",
408
409
  "name": "DlqControl",
409
410
  "src": "src/pages/control/DlqControl.tsx",
410
411
  "isDynamicEntry": true,
@@ -413,13 +414,13 @@
413
414
  "_react-vendor-B68RYDeC.js",
414
415
  "index.html",
415
416
  "_form-C-zZyKfB.js",
416
- "_Pagination-CTSsxJT4.js",
417
- "_CopyButton-BjMe8rqo.js",
417
+ "_Pagination-ByLXrTJL.js",
418
+ "_CopyButton-fN1FbSIy.js",
418
419
  "_exportFile-tdUeW5m5.js"
419
420
  ]
420
421
  },
421
422
  "src/pages/control/DlqPro.tsx": {
422
- "file": "assets/DlqPro-Bc5dBrfL.js",
423
+ "file": "assets/DlqPro-vuL9h-Ab.js",
423
424
  "name": "DlqPro",
424
425
  "src": "src/pages/control/DlqPro.tsx",
425
426
  "isDynamicEntry": true,
@@ -428,13 +429,13 @@
428
429
  "_react-vendor-B68RYDeC.js",
429
430
  "index.html",
430
431
  "_form-C-zZyKfB.js",
431
- "_Pagination-CTSsxJT4.js",
432
+ "_Pagination-ByLXrTJL.js",
432
433
  "_exportFile-tdUeW5m5.js",
433
434
  "_promisePool-Daxkc1OB.js"
434
435
  ]
435
436
  },
436
437
  "src/pages/control/Flows.tsx": {
437
- "file": "assets/Flows-BgUrkVp9.js",
438
+ "file": "assets/Flows-Czq_GBW2.js",
438
439
  "name": "Flows",
439
440
  "src": "src/pages/control/Flows.tsx",
440
441
  "isDynamicEntry": true,
@@ -445,7 +446,7 @@
445
446
  ]
446
447
  },
447
448
  "src/pages/control/JobInspector.tsx": {
448
- "file": "assets/JobInspector-cr-oB9MB.js",
449
+ "file": "assets/JobInspector-BMi76I46.js",
449
450
  "name": "JobInspector",
450
451
  "src": "src/pages/control/JobInspector.tsx",
451
452
  "isDynamicEntry": true,
@@ -454,13 +455,13 @@
454
455
  "_react-vendor-B68RYDeC.js",
455
456
  "index.html",
456
457
  "_form-C-zZyKfB.js",
457
- "_CopyButton-BjMe8rqo.js",
458
+ "_CopyButton-fN1FbSIy.js",
458
459
  "_exportFile-tdUeW5m5.js",
459
460
  "_jobActions-CuOdMglt.js"
460
461
  ]
461
462
  },
462
463
  "src/pages/control/JobsPro.tsx": {
463
- "file": "assets/JobsPro-CHgECoqr.js",
464
+ "file": "assets/JobsPro-CNgYYpHP.js",
464
465
  "name": "JobsPro",
465
466
  "src": "src/pages/control/JobsPro.tsx",
466
467
  "isDynamicEntry": true,
@@ -469,13 +470,13 @@
469
470
  "_react-vendor-B68RYDeC.js",
470
471
  "index.html",
471
472
  "_form-C-zZyKfB.js",
472
- "_Pagination-CTSsxJT4.js",
473
+ "_Pagination-ByLXrTJL.js",
473
474
  "_exportFile-tdUeW5m5.js",
474
475
  "_jobActions-CuOdMglt.js"
475
476
  ]
476
477
  },
477
478
  "src/pages/control/LogsPro.tsx": {
478
- "file": "assets/LogsPro-D0trm52t.js",
479
+ "file": "assets/LogsPro-BK6dIfm_.js",
479
480
  "name": "LogsPro",
480
481
  "src": "src/pages/control/LogsPro.tsx",
481
482
  "isDynamicEntry": true,
@@ -484,22 +485,23 @@
484
485
  "_react-vendor-B68RYDeC.js",
485
486
  "index.html",
486
487
  "_form-C-zZyKfB.js",
487
- "_Pagination-CTSsxJT4.js"
488
+ "_Pagination-ByLXrTJL.js",
489
+ "_CopyButton-fN1FbSIy.js"
488
490
  ]
489
491
  },
490
492
  "src/pages/control/McpServer.tsx": {
491
- "file": "assets/McpServer-DaYWa4Es.js",
493
+ "file": "assets/McpServer-DCTEyxfJ.js",
492
494
  "name": "McpServer",
493
495
  "src": "src/pages/control/McpServer.tsx",
494
496
  "isDynamicEntry": true,
495
497
  "imports": [
496
498
  "_react-vendor-B68RYDeC.js",
497
499
  "index.html",
498
- "_CopyButton-BjMe8rqo.js"
500
+ "_CopyButton-fN1FbSIy.js"
499
501
  ]
500
502
  },
501
503
  "src/pages/control/MetricsPro.tsx": {
502
- "file": "assets/MetricsPro-4SzRtKMO.js",
504
+ "file": "assets/MetricsPro-mUantDrK.js",
503
505
  "name": "MetricsPro",
504
506
  "src": "src/pages/control/MetricsPro.tsx",
505
507
  "isDynamicEntry": true,
@@ -507,13 +509,13 @@
507
509
  "_cn-CMFYpumL.js",
508
510
  "_react-vendor-B68RYDeC.js",
509
511
  "index.html",
510
- "_Pagination-CTSsxJT4.js",
511
- "_AreaChart-lY-mk5E1.js",
512
- "_useThroughputSeries-PGVgpwVj.js"
512
+ "_Pagination-ByLXrTJL.js",
513
+ "_AreaChart-Dl_9G6GH.js",
514
+ "_useThroughputSeries-DMoDDf05.js"
513
515
  ]
514
516
  },
515
517
  "src/pages/control/QueueControl.tsx": {
516
- "file": "assets/QueueControl-D62X3ifm.js",
518
+ "file": "assets/QueueControl-DnGbiwVj.js",
517
519
  "name": "QueueControl",
518
520
  "src": "src/pages/control/QueueControl.tsx",
519
521
  "isDynamicEntry": true,
@@ -522,11 +524,11 @@
522
524
  "_react-vendor-B68RYDeC.js",
523
525
  "index.html",
524
526
  "_form-C-zZyKfB.js",
525
- "_QueueActions--MLQejui.js"
527
+ "_QueueActions-CPo6RJsA.js"
526
528
  ]
527
529
  },
528
530
  "src/pages/control/QueueDetailPro.tsx": {
529
- "file": "assets/QueueDetailPro-DY_XL6iK.js",
531
+ "file": "assets/QueueDetailPro-C2faHlWj.js",
530
532
  "name": "QueueDetailPro",
531
533
  "src": "src/pages/control/QueueDetailPro.tsx",
532
534
  "isDynamicEntry": true,
@@ -534,13 +536,13 @@
534
536
  "_cn-CMFYpumL.js",
535
537
  "_react-vendor-B68RYDeC.js",
536
538
  "index.html",
537
- "_AreaChart-lY-mk5E1.js",
538
- "_useThroughputSeries-PGVgpwVj.js",
539
- "_QueueActions--MLQejui.js"
539
+ "_AreaChart-Dl_9G6GH.js",
540
+ "_useThroughputSeries-DMoDDf05.js",
541
+ "_QueueActions-CPo6RJsA.js"
540
542
  ]
541
543
  },
542
544
  "src/pages/control/QueuesOverview.tsx": {
543
- "file": "assets/QueuesOverview-BJaVSLW9.js",
545
+ "file": "assets/QueuesOverview-CQdc1MDE.js",
544
546
  "name": "QueuesOverview",
545
547
  "src": "src/pages/control/QueuesOverview.tsx",
546
548
  "isDynamicEntry": true,
@@ -548,12 +550,12 @@
548
550
  "_cn-CMFYpumL.js",
549
551
  "_react-vendor-B68RYDeC.js",
550
552
  "index.html",
551
- "_Pagination-CTSsxJT4.js",
553
+ "_Pagination-ByLXrTJL.js",
552
554
  "_promisePool-Daxkc1OB.js"
553
555
  ]
554
556
  },
555
557
  "src/pages/control/S3BackupPro.tsx": {
556
- "file": "assets/S3BackupPro-DD7fYduD.js",
558
+ "file": "assets/S3BackupPro-BgZyvD-0.js",
557
559
  "name": "S3BackupPro",
558
560
  "src": "src/pages/control/S3BackupPro.tsx",
559
561
  "isDynamicEntry": true,
@@ -566,7 +568,7 @@
566
568
  ]
567
569
  },
568
570
  "src/pages/control/ServerControl.tsx": {
569
- "file": "assets/ServerControl-BzpGcDMa.js",
571
+ "file": "assets/ServerControl-C5Rh0kip.js",
570
572
  "name": "ServerControl",
571
573
  "src": "src/pages/control/ServerControl.tsx",
572
574
  "isDynamicEntry": true,
@@ -575,11 +577,11 @@
575
577
  "_react-vendor-B68RYDeC.js",
576
578
  "index.html",
577
579
  "_form-C-zZyKfB.js",
578
- "_CopyButton-BjMe8rqo.js"
580
+ "_CopyButton-fN1FbSIy.js"
579
581
  ]
580
582
  },
581
583
  "src/pages/control/UsagePro.tsx": {
582
- "file": "assets/UsagePro-VGYI-JGk.js",
584
+ "file": "assets/UsagePro-xAJXeKjl.js",
583
585
  "name": "UsagePro",
584
586
  "src": "src/pages/control/UsagePro.tsx",
585
587
  "isDynamicEntry": true,
@@ -589,7 +591,7 @@
589
591
  ]
590
592
  },
591
593
  "src/pages/control/Webhooks.tsx": {
592
- "file": "assets/Webhooks-WT9fT_UK.js",
594
+ "file": "assets/Webhooks-CxKY1jum.js",
593
595
  "name": "Webhooks",
594
596
  "src": "src/pages/control/Webhooks.tsx",
595
597
  "isDynamicEntry": true,
@@ -598,11 +600,11 @@
598
600
  "_react-vendor-B68RYDeC.js",
599
601
  "index.html",
600
602
  "_form-C-zZyKfB.js",
601
- "_Pagination-CTSsxJT4.js"
603
+ "_Pagination-ByLXrTJL.js"
602
604
  ]
603
605
  },
604
606
  "src/pages/control/WorkersPro.tsx": {
605
- "file": "assets/WorkersPro-C-Rl2JGa.js",
607
+ "file": "assets/WorkersPro-CsGyS9Aq.js",
606
608
  "name": "WorkersPro",
607
609
  "src": "src/pages/control/WorkersPro.tsx",
608
610
  "isDynamicEntry": true,
@@ -0,0 +1,3 @@
1
+ import{r as e}from"./cn-CMFYpumL.js";import{h as t,l as n,r,t as i}from"./react-vendor-B68RYDeC.js";import{C as a,T as o,h as s,k as c,nt as l,rt as u,w as d}from"./index-CjnfFs1N.js";import{n as f,o as p,t as m}from"./form-C-zZyKfB.js";var h=e(t(),1),g=i(),_=e=>e==null?``:String(e);function v(){let{data:e}=c(()=>l.queues(),[],{intervalMs:3e4}),t=n().state?.clone,i=t?.options??{},[p,v]=(0,h.useState)(t?.queue??``),[b,x]=(0,h.useState)(t?.dataText??`{
2
+ "hello": "world"
3
+ }`),[S,C]=(0,h.useState)(`1`),[w,T]=(0,h.useState)(_(i.priority)),[E,D]=(0,h.useState)(``),[O,k]=(0,h.useState)(``),[A,j]=(0,h.useState)(_(i.maxAttempts)),[M,N]=(0,h.useState)(_(i.backoff)),[P,F]=(0,h.useState)(_(i.timeout)),[I,L]=(0,h.useState)(``),[R,z]=(0,h.useState)(i.removeOnComplete??!1),[B,V]=(0,h.useState)(i.removeOnFail??!1),[H,U]=(0,h.useState)(!1),[W,G]=(0,h.useState)(!1),[K,q]=(0,h.useState)(!1),[J,Y]=(0,h.useState)(null),[X,Z]=(0,h.useState)(null),Q=e=>{let t=Number(e);return e.trim()!==``&&Number.isFinite(t)?t:void 0},$=async()=>{if(Y(null),Z(null),!p.trim()){Y({ok:!1,msg:`Choose a queue`});return}let e;try{e=JSON.parse(b)}catch(e){Z(`Invalid JSON: ${e.message}`);return}let t=Q(E);if(O.trim()){let e=new Date(O).getTime();if(!Number.isFinite(e)){Y({ok:!1,msg:`Run at is not a valid date/time`});return}t=Math.max(0,e-Date.now())}let n={data:e,priority:Q(w),delay:t,maxAttempts:Q(A),backoff:Q(M),timeout:Q(P),jobId:I.trim()||void 0,removeOnComplete:R||void 0,removeOnFail:B||void 0,durable:H||void 0,lifo:W||void 0},r=Q(S)??1;if(!Number.isInteger(r)||r<1){Y({ok:!1,msg:`Count must be an integer of at least 1`});return}if(r>1e4){Y({ok:!1,msg:`Count must be 10000 or fewer`});return}q(!0);try{if(r===1){let e=await l.addJob(p,n);Y({ok:!0,msg:`Created job ${e.id}`}),u.success(`Job created`,`${p} · ${e.id}`)}else{let e=await l.addJobsBulk(p,Array.from({length:r},()=>n)),t=new Set(e.ids).size;Y({ok:!0,msg:`Created ${t} job${t===1?``:`s`}`}),u.success(`Created ${t} job${t===1?``:`s`}`,`in ${p}`)}}catch(e){Y({ok:!1,msg:e.message}),u.error(`Add job failed`,e.message)}finally{q(!1)}};return(0,g.jsxs)(`div`,{children:[(0,g.jsx)(s,{title:`Add Job`,description:`Enqueue a job with full options.`,actions:(0,g.jsx)(r,{to:`/jobs/bulk-add`,className:`rounded-lg border border-line px-3 py-1.5 text-sm text-muted hover:bg-surface-2 hover:text-fg`,children:`Bulk import`})}),t&&(0,g.jsx)(`div`,{className:`mb-4 flex items-center gap-2 rounded-lg border border-accent/30 bg-accent/[0.06] px-4 py-2 text-sm text-accent`,children:`Pre-filled from an existing job. Review the data and options, then enqueue a fresh job.`}),(0,g.jsxs)(`form`,{className:`grid grid-cols-1 gap-6 lg:grid-cols-2`,onSubmit:e=>{e.preventDefault(),$()},children:[(0,g.jsxs)(a,{children:[(0,g.jsx)(d,{title:`Job`}),(0,g.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,g.jsxs)(m,{label:`Queue`,children:[(0,g.jsx)(f,{list:`queue-options`,value:p,onChange:e=>v(e.target.value),placeholder:`queue name (existing or new)`}),(0,g.jsx)(`datalist`,{id:`queue-options`,children:(e?.queues??[]).map(e=>(0,g.jsx)(`option`,{value:e.name},e.name))})]}),(0,g.jsxs)(`div`,{children:[(0,g.jsx)(m,{label:`Data (JSON)`,children:(0,g.jsx)(`textarea`,{value:b,onChange:e=>x(e.target.value),onBlur:()=>{try{JSON.parse(b),Z(null)}catch(e){Z(`Invalid JSON: ${e.message}`)}},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`})}),X&&(0,g.jsx)(`p`,{className:`mt-2 text-xs text-danger`,children:X})]})]})]}),(0,g.jsxs)(a,{children:[(0,g.jsx)(d,{title:`Options`}),(0,g.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 md:grid-cols-3`,children:[(0,g.jsx)(m,{label:`Priority`,children:(0,g.jsx)(f,{type:`number`,value:w,onChange:e=>T(e.target.value),placeholder:`0`})}),(0,g.jsx)(m,{label:`Delay (ms)`,children:(0,g.jsx)(f,{type:`number`,min:0,value:E,onChange:e=>D(e.target.value),placeholder:`0`,disabled:O.trim()!==``})}),(0,g.jsx)(m,{label:`Run at`,hint:O.trim()?`Overrides Delay — derived from this time (local time).`:`(local time)`,children:(0,g.jsx)(f,{type:`datetime-local`,value:O,onChange:e=>k(e.target.value)})}),(0,g.jsx)(m,{label:`Max attempts`,hint:`blank = server default`,children:(0,g.jsx)(f,{type:`number`,min:1,value:A,onChange:e=>j(e.target.value),placeholder:`3`})}),(0,g.jsx)(m,{label:`Backoff (ms)`,hint:`blank = server default`,children:(0,g.jsx)(f,{type:`number`,min:0,value:M,onChange:e=>N(e.target.value),placeholder:`1000`})}),(0,g.jsx)(m,{label:`Timeout (ms)`,children:(0,g.jsx)(f,{type:`number`,min:0,value:P,onChange:e=>F(e.target.value),placeholder:`—`})}),(0,g.jsx)(m,{label:`Custom job ID`,children:(0,g.jsx)(f,{value:I,onChange:e=>L(e.target.value),placeholder:`idempotency key`})})]}),(0,g.jsxs)(`div`,{className:`mt-4 flex flex-wrap gap-6`,children:[(0,g.jsx)(y,{label:`removeOnComplete`,checked:R,onChange:z}),(0,g.jsx)(y,{label:`removeOnFail`,checked:B,onChange:V}),(0,g.jsx)(y,{label:`durable`,checked:H,onChange:U}),(0,g.jsx)(y,{label:`lifo`,checked:W,onChange:G})]})]}),(0,g.jsxs)(`div`,{className:`flex flex-wrap items-end gap-3 lg:col-span-2`,children:[(0,g.jsx)(`div`,{className:`w-28`,children:(0,g.jsx)(m,{label:`Count`,hint:`1–10000`,children:(0,g.jsx)(f,{type:`number`,min:1,value:S,onChange:e=>C(e.target.value)})})}),(0,g.jsx)(o,{type:`submit`,variant:`accent`,disabled:K,children:K?`Adding…`:`Add job`}),J&&(0,g.jsx)(`span`,{role:`status`,className:J.ok?`text-sm text-success`:`text-sm text-danger`,children:J.msg})]})]})]})}function y({label:e,checked:t,onChange:n}){return(0,g.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,g.jsx)(p,{checked:t,onChange:n,label:e}),(0,g.jsx)(`span`,{className:`font-mono text-xs text-muted`,children:e})]})}export{v as AddJob};
@@ -0,0 +1 @@
1
+ import{r as e}from"./cn-CMFYpumL.js";import{h as t,t as n}from"./react-vendor-B68RYDeC.js";import{$ as r,C as i,E as a,M as o,Q as s,T as c,Y as l,at as u,h as d,it as f,u as p,y as m}from"./index-CjnfFs1N.js";import{a as h,n as g,o as _,t as v}from"./form-C-zZyKfB.js";var y=e(t(),1),b=n(),x=[`email`,`webhook`,`slack`],S=Object.keys(f),C=[`>=`,`>`,`<=`,`<`],w={error_rate:{unit:`% (0–100)`,placeholder:`e.g. 5`},p99_latency:{unit:`ms`,placeholder:`e.g. 250`},waiting:{unit:`jobs`,placeholder:`e.g. 100`},failed:{unit:`jobs`,placeholder:`e.g. 10`},dlq:{unit:`jobs`,placeholder:`e.g. 1`}},T=`bunqueue OSS has no delivery backend — alerts fire as in-app toast + desktop notification only`;function E(){return typeof Notification>`u`?`unsupported`:Notification.permission}function D(){let{channels:e,rules:t,addChannel:n,removeChannel:h,addRule:g,removeRule:v,toggleRule:x}=u(),S=r(e=>e.breaching),[C,w]=(0,y.useState)(!1),[D,A]=(0,y.useState)(E);return(0,b.jsxs)(`div`,{children:[(0,b.jsx)(d,{title:`Alerts`,description:`Threshold rules evaluated live in your browser.`,live:!0,actions:(0,b.jsxs)(b.Fragment,{children:[D===`granted`?(0,b.jsxs)(`span`,{className:`flex items-center gap-1.5 text-sm text-success`,children:[(0,b.jsx)(o,{className:`size-4`}),` Desktop alerts on`]}):D===`unsupported`?(0,b.jsx)(`span`,{className:`text-sm text-faint`,children:`Notifications unsupported`}):D===`denied`?(0,b.jsx)(`span`,{className:`text-sm text-faint`,children:`Desktop alerts blocked — allow notifications in browser settings`}):(0,b.jsx)(c,{size:`sm`,onClick:async()=>{A(await s())},children:`Enable desktop notifications`}),(0,b.jsx)(c,{variant:`accent`,size:`sm`,onClick:()=>w(e=>!e),children:`+ Create Alert Rule`})]})}),(0,b.jsx)(`div`,{className:`mb-6 rounded-lg border border-amber-500/20 bg-amber-500/5 px-4 py-3 text-sm text-amber-400/90`,children:`Rules are evaluated in this browser while a tab is open (even backgrounded), raising an in-app toast and — if enabled — a desktop notification. bunqueue OSS has no alerting backend, so email/webhook/slack delivery still needs your own monitoring or hosted bunqueue Cloud.`}),(0,b.jsxs)(`section`,{className:`mb-8`,children:[(0,b.jsx)(`h2`,{className:`mb-3 text-lg font-semibold text-fg`,children:`Triggered Alerts`}),S.length===0?(0,b.jsx)(m,{icon:(0,b.jsx)(o,{}),title:`No triggered alerts`,hint:t.some(e=>e.enabled)?`All enabled rules are within their thresholds.`:`No enabled rules yet. Create one below.`}):(0,b.jsx)(`div`,{className:`overflow-x-auto rounded-xl border border-danger/30 bg-red-500/5`,children:(0,b.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,b.jsx)(`thead`,{children:(0,b.jsxs)(`tr`,{className:`border-b border-line text-left text-[11px] uppercase tracking-wider text-faint`,children:[(0,b.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Rule`}),(0,b.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Condition`}),(0,b.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Queue`}),(0,b.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Current`}),(0,b.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Since`})]})}),(0,b.jsx)(`tbody`,{children:S.map(e=>(0,b.jsxs)(`tr`,{className:`border-b border-line last:border-0`,children:[(0,b.jsx)(`td`,{className:`px-5 py-3 font-medium text-danger`,children:e.ruleName}),(0,b.jsxs)(`td`,{className:`px-5 py-3 text-muted`,children:[e.metricLabel,` `,e.operator,` `,(0,b.jsx)(`span`,{className:`font-semibold text-fg`,children:e.threshold})]}),(0,b.jsx)(`td`,{className:`px-5 py-3 text-muted`,children:e.queue||`All queues`}),(0,b.jsx)(`td`,{className:`px-5 py-3 text-right tnum font-semibold text-danger`,children:Math.round(e.value*100)/100}),(0,b.jsx)(`td`,{className:`px-5 py-3 text-right text-faint`,children:p(e.at)})]},e.ruleId))})]})})]}),(0,b.jsxs)(`section`,{className:`mb-8`,children:[(0,b.jsx)(`h2`,{className:`mb-3 text-lg font-semibold text-fg`,children:`Notification Channels`}),(0,b.jsxs)(i,{children:[e.length===0?(0,b.jsx)(`p`,{className:`mb-4 text-sm text-faint`,children:`No channels yet. Add one below.`}):(0,b.jsx)(`ul`,{className:`mb-4 divide-y divide-line`,children:e.map(e=>(0,b.jsxs)(`li`,{className:`flex items-center justify-between py-2.5`,children:[(0,b.jsxs)(`div`,{children:[(0,b.jsx)(`div`,{className:`text-sm font-medium capitalize text-fg`,children:e.type}),e.target?(0,b.jsx)(`div`,{className:`font-mono text-xs text-faint`,children:e.target}):(0,b.jsx)(`div`,{className:`text-xs italic text-warning`,children:`target not persisted (secret) — remove and re-add to restore it`})]}),(0,b.jsx)(a,{"aria-label":`Remove channel`,onClick:()=>h(e.id),children:(0,b.jsx)(l,{className:`size-3.5`})})]},e.id))}),(0,b.jsx)(O,{onAdd:n})]})]}),(0,b.jsxs)(`section`,{children:[(0,b.jsx)(`h2`,{className:`mb-3 text-lg font-semibold text-fg`,children:`Alert Rules`}),C&&(0,b.jsx)(i,{className:`mb-4`,children:(0,b.jsx)(k,{onAdd:e=>{g(e),w(!1)}})}),t.length===0?(0,b.jsx)(m,{title:`No alert rules`,hint:`Create a rule to be notified when a threshold is crossed.`}):(0,b.jsx)(`div`,{className:`overflow-x-auto rounded-xl border border-line bg-surface`,children:(0,b.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,b.jsx)(`thead`,{children:(0,b.jsxs)(`tr`,{className:`border-b border-line text-left text-[11px] uppercase tracking-wider text-faint`,children:[(0,b.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Rule`}),(0,b.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Condition`}),(0,b.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Queue`}),(0,b.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Channel`}),(0,b.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Status`}),(0,b.jsx)(`th`,{className:`w-12 px-5 py-3`})]})}),(0,b.jsx)(`tbody`,{children:t.map(e=>(0,b.jsxs)(`tr`,{className:`border-b border-line last:border-0`,children:[(0,b.jsx)(`td`,{className:`px-5 py-3 font-medium text-fg`,children:e.name}),(0,b.jsxs)(`td`,{className:`px-5 py-3 text-muted`,children:[f[e.metric],` `,e.operator,` `,(0,b.jsx)(`span`,{className:`font-semibold text-accent`,children:e.threshold})]}),(0,b.jsx)(`td`,{className:`px-5 py-3 text-muted`,children:e.queue||`All queues`}),(0,b.jsxs)(`td`,{className:`px-5 py-3`,children:[(0,b.jsx)(`span`,{className:`rounded-md bg-surface-2 px-2 py-0.5 text-xs capitalize text-muted`,children:e.channel}),(0,b.jsx)(`span`,{className:`ml-1.5 text-[10px] uppercase tracking-wider text-faint`,title:T,children:`not wired`})]}),(0,b.jsx)(`td`,{className:`px-5 py-3`,children:(0,b.jsx)(_,{checked:e.enabled,onChange:()=>x(e.id),label:`Enabled`})}),(0,b.jsx)(`td`,{className:`px-5 py-3 text-right`,children:(0,b.jsx)(a,{"aria-label":`Delete rule`,onClick:()=>v(e.id),children:(0,b.jsx)(l,{className:`size-3.5`})})})]},e.id))})]})})]})]})}function O({onAdd:e}){let[t,n]=(0,y.useState)(`email`),[r,i]=(0,y.useState)(``);return(0,b.jsxs)(`div`,{className:`flex flex-wrap items-end gap-3`,children:[(0,b.jsx)(`div`,{className:`w-36`,children:(0,b.jsx)(v,{label:`Type`,children:(0,b.jsx)(h,{value:t,onChange:e=>n(e.target.value),children:x.map(e=>(0,b.jsx)(`option`,{value:e,children:e},e))})})}),(0,b.jsx)(`div`,{className:`min-w-56 flex-1`,children:(0,b.jsx)(v,{label:t===`email`?`Email address`:`URL`,children:(0,b.jsx)(g,{value:r,onChange:e=>i(e.target.value),placeholder:t===`email`?`ops@example.com`:`https://hooks…`})})}),(0,b.jsx)(c,{variant:`accent`,disabled:!r,onClick:()=>{e(t,r),i(``)},children:`Add channel`})]})}function k({onAdd:e}){let[t,n]=(0,y.useState)(``),[r,i]=(0,y.useState)(`error_rate`),[a,o]=(0,y.useState)(`>=`),[s,l]=(0,y.useState)(``),[u,d]=(0,y.useState)(``),[p,m]=(0,y.useState)(`email`);return(0,b.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 md:grid-cols-3 lg:grid-cols-6`,children:[(0,b.jsx)(v,{label:`Name`,children:(0,b.jsx)(g,{value:t,onChange:e=>n(e.target.value),placeholder:`High error rate`})}),(0,b.jsx)(v,{label:`Metric`,children:(0,b.jsx)(h,{value:r,onChange:e=>i(e.target.value),children:S.map(e=>(0,b.jsx)(`option`,{value:e,children:f[e]},e))})}),(0,b.jsx)(v,{label:`Operator`,children:(0,b.jsx)(h,{value:a,onChange:e=>o(e.target.value),children:C.map(e=>(0,b.jsx)(`option`,{value:e,children:e},e))})}),(0,b.jsx)(v,{label:`Threshold`,hint:w[r].unit,children:(0,b.jsx)(g,{type:`number`,value:s,onChange:e=>l(e.target.value),placeholder:w[r].placeholder})}),(0,b.jsx)(v,{label:`Queue (optional)`,hint:r===`p99_latency`?`global only — latency is not per queue`:void 0,children:(0,b.jsx)(g,{value:u,onChange:e=>d(e.target.value),disabled:r===`p99_latency`,placeholder:r===`p99_latency`?`Global`:`All queues`,className:`disabled:cursor-not-allowed disabled:opacity-40`})}),(0,b.jsx)(v,{label:`Channel`,hint:`delivery not wired — in-app only`,children:(0,b.jsx)(h,{value:p,onChange:e=>m(e.target.value),children:x.map(e=>(0,b.jsx)(`option`,{value:e,children:e},e))})}),(0,b.jsx)(`div`,{className:`col-span-full`,children:(0,b.jsx)(c,{variant:`accent`,disabled:!t||!s,onClick:()=>e({name:t,metric:r,operator:a,threshold:Number(s),queue:r===`p99_latency`?``:u,channel:p,enabled:!0}),children:`Save rule`})})]})}export{D as Alerts};
@@ -0,0 +1 @@
1
+ import{r as e}from"./cn-CMFYpumL.js";import{h as t,t as n}from"./react-vendor-B68RYDeC.js";var r=e(t(),1),i=n();function a({series:e,height:t=180,xLabels:n,ariaLabel:a=`throughput chart`,formatValue:o}){let s=(0,r.useId)().replace(/:/g,``),c=`${s}-desc`,l=t,u=e=>Number.isFinite(e)?e:0,d=Math.max(1,...e.map(e=>e.points.length)),f=Math.max(1,...e.flatMap(e=>e.points.map(u))),p=e=>d<=1?0:e/(d-1)*600,m=e=>l-10-u(e)/f*(l-20),h=[0,.25,.5,.75,1].map(e=>10+e*(l-20)),g=o??(e=>Number.isInteger(e)?String(e):e.toFixed(1)),_=e.some(e=>e.points.length>0),v=e.find(e=>e.points.length>0),y=v?u(v.points[v.points.length-1]):0;return(0,i.jsxs)(`div`,{className:`w-full`,children:[(0,i.jsxs)(`div`,{className:`relative`,children:[(0,i.jsxs)(`svg`,{viewBox:`0 0 600 ${l}`,preserveAspectRatio:`none`,className:`block w-full`,style:{height:t},role:`img`,"aria-label":a,"aria-describedby":c,children:[(0,i.jsx)(`defs`,{children:e.map((e,t)=>(0,i.jsxs)(`linearGradient`,{id:`${s}-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))}),h.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,${m(e.points[0])} L600,${m(e.points[0])}`:e.points.map((e,t)=>`${t===0?`M`:`L`}${p(t)},${m(e)}`).join(` `),r=e.points.length===1?`${n} L600,${l} L0,${l} Z`:`${n} L${p(e.points.length-1)},${l} L${p(0)},${l} Z`;return(0,i.jsxs)(`g`,{children:[e.area&&(0,i.jsx)(`path`,{d:r,fill:`url(#${s}-g${t})`}),(0,i.jsx)(`path`,{d:n,fill:`none`,stroke:e.color,strokeWidth:`2`,strokeLinejoin:`round`,vectorEffect:`non-scaling-stroke`})]},e.label)})]}),_&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`span`,{className:`pointer-events-none absolute left-1 -translate-y-full font-mono text-[10px] leading-none text-faint`,style:{top:10},children:g(f)}),(0,i.jsx)(`span`,{className:`pointer-events-none absolute left-1 top-1/2 -translate-y-1/2 font-mono text-[10px] leading-none text-faint`,children:g(f/2)})]})]}),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))}),(0,i.jsx)(`p`,{id:c,className:`sr-only`,children:_?`latest ${g(y)}, max ${g(f)}`:`no data yet`})]})}export{a as t};
@@ -0,0 +1 @@
1
+ import{r as e,t}from"./cn-CMFYpumL.js";import{h as n,t as r}from"./react-vendor-B68RYDeC.js";import{r as i}from"./connectionStore-B-hNUqwK.js";import{C as a,T as o,U as s,W as c,c as l,h as u,k as d,m as f,nt as p,r as m,s as h,w as g}from"./index-CjnfFs1N.js";import{i as _,n as v,o as y,t as b}from"./form-C-zZyKfB.js";import{t as x}from"./AreaChart-Dl_9G6GH.js";import{t as S}from"./CopyButton-fN1FbSIy.js";var C=e(n(),1),w={total:1e6,batch:5e3,producers:64,payload:65536,workers:64,workerBatch:1e3,processMs:6e4,durationS:600},T={queue:`benchmark`,mode:`count`,total:5e3,durationS:30,batch:100,producers:4,payload:128,workers:4,workerBatch:100,processMs:5,durable:!1,removeOnComplete:!0},E={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}},D=(e,t,n)=>Number.isFinite(e)?Math.max(t,Math.min(n,Math.floor(e))):t,O=(e,t)=>e.length?e[Math.min(e.length-1,Math.floor(t/100*e.length))]:0,k=(e,t,n,r,i)=>Array.from({length:t},(t,a)=>({data:{i:e+a,blob:n},durable:r,removeOnComplete:i})),A=e=>new Promise(t=>setTimeout(t,e)),j=async(e,t)=>{let n=performance.now()+e;for(;t()&&performance.now()<n;)await A(Math.min(100,Math.max(0,n-performance.now())))},M=e=>e instanceof Error?e.message:String(e),N=e=>e>=1e6?`${(e/1e6).toFixed(2)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:`${Math.round(e)}`,P=r();function F({history:e,onClear:t}){if(!e.length)return null;let n=JSON.stringify(e,null,2);return(0,P.jsxs)(a,{padded:!1,className:`mt-6 overflow-hidden`,children:[(0,P.jsxs)(`div`,{className:`flex items-center justify-between border-b border-line px-5 py-3`,children:[(0,P.jsx)(`h3`,{className:`text-base font-semibold text-fg`,children:`Run history`}),(0,P.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,P.jsx)(S,{value:n}),(0,P.jsx)(o,{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,P.jsx)(o,{size:`sm`,variant:`ghost`,onClick:t,children:`Clear`})]})]}),(0,P.jsx)(`div`,{className:`overflow-x-auto`,children:(0,P.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,P.jsx)(`thead`,{children:(0,P.jsxs)(`tr`,{className:`border-b border-line text-left text-[11px] uppercase tracking-wider text-faint`,children:[(0,P.jsx)(`th`,{className:`px-5 py-2 font-medium`,children:`Mode`}),(0,P.jsx)(`th`,{className:`px-5 py-2 text-right font-medium`,children:`Prod`}),(0,P.jsx)(`th`,{className:`px-5 py-2 text-right font-medium`,children:`Wkr`}),(0,P.jsx)(`th`,{className:`px-5 py-2 text-right font-medium`,children:`Pushed`}),(0,P.jsx)(`th`,{className:`px-5 py-2 text-right font-medium`,children:`Done`}),(0,P.jsx)(`th`,{className:`px-5 py-2 text-right font-medium`,children:`Push/s`}),(0,P.jsx)(`th`,{className:`px-5 py-2 text-right font-medium`,children:`Done/s`}),(0,P.jsx)(`th`,{className:`px-5 py-2 text-right font-medium`,children:`p95`}),(0,P.jsx)(`th`,{className:`px-5 py-2 text-right font-medium`,children:`Dur`})]})}),(0,P.jsx)(`tbody`,{children:e.map(e=>(0,P.jsxs)(`tr`,{className:`border-b border-line last:border-0 hover:bg-surface-2/40`,children:[(0,P.jsx)(`td`,{className:`px-5 py-2 capitalize text-muted`,children:e.mode}),(0,P.jsx)(`td`,{className:`px-5 py-2 text-right tnum text-muted`,children:e.producers}),(0,P.jsx)(`td`,{className:`px-5 py-2 text-right tnum text-muted`,children:e.workers}),(0,P.jsx)(`td`,{className:`px-5 py-2 text-right tnum text-fg`,children:l(e.pushed)}),(0,P.jsx)(`td`,{className:`px-5 py-2 text-right tnum text-success`,children:l(e.completed)}),(0,P.jsxs)(`td`,{className:`px-5 py-2 text-right tnum text-accent`,children:[N(e.pushPerSec),`/s`]}),(0,P.jsxs)(`td`,{className:`px-5 py-2 text-right tnum text-success`,children:[N(e.donePerSec),`/s`]}),(0,P.jsx)(`td`,{className:`px-5 py-2 text-right tnum text-muted`,children:h(e.p95)}),(0,P.jsx)(`td`,{className:`px-5 py-2 text-right tnum text-muted`,children:h(e.durationMs)})]},e.id))})]})})]})}var I={pushed:0,completed:0,pushFailed:0,ackFailed:0,bytes:0,elapsedMs:0,pushPerSec:0,donePerSec:0,activeWorkers:0,pushSeries:[],doneSeries:[],etaMs:null,error:null},L=()=>({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:[]}),R=0;function z(){let[e,t]=(0,C.useState)(`idle`),[n,r]=(0,C.useState)(I),[i,a]=(0,C.useState)(null),[o,s]=(0,C.useState)([]),[c,l]=(0,C.useState)(null),u=(0,C.useRef)(!1),d=(0,C.useRef)(!1),f=(0,C.useRef)(!1),m=(0,C.useRef)(null),h=(0,C.useRef)(`idle`);h.current=e;let g=(0,C.useRef)(L());return(0,C.useEffect)(()=>()=>{u.current=!0},[]),(0,C.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=D(c.total,1,w.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,D(c.durationS,1,w.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(!d.current){d.current=!0;try{a(null);let n=e.queue.trim();if(!n){r({...I,error:`Queue name is required.`}),t(`error`);return}try{await p.overview()}catch(e){r({...I,error:`Server unreachable — start it on the Server page first. (${M(e)})`}),t(`error`);return}let i=D(e.total,1,w.total),o=D(e.durationS,1,w.durationS)*1e3,c=D(e.batch,1,w.batch),d=D(e.producers,e.mode===`duration`?0:1,w.producers),_=D(e.payload,0,w.payload),v=D(e.workers,0,w.workers),y=D(e.workerBatch,1,w.workerBatch),b=D(e.processMs,0,w.processMs);u.current=!1,f.current=!1,m.current=e,l(e),g.current=L(),g.current.startedAt=performance.now(),g.current.lastAt=performance.now(),r({...I}),t(`running`);let x=`x`.repeat(_),S=performance.now()+o,C=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=k(r,t,x,e.durable,e.removeOnComplete),o=performance.now();try{await p.addJobsBulk(n,a),g.current.pushed+=t,g.current.bytes+=t*_}catch(e){g.current.pushFailed+=t,g.current.error??=M(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 p.pullBatch(n,y)).jobs??[]}catch(e){g.current.error??=M(e)}if(t.length>0){b>0&&await j(b,()=>!u.current);try{await p.ackBatch(t.map(e=>e.id)),g.current.completed+=t.length}catch(e){g.current.ackFailed+=t.length,g.current.error??=M(e)}}}finally{g.current.activeWorkers--}if(t.length===0){if(e.mode===`count`&&f.current)break;await A(50)}}},E=Array.from({length:d},C),N=Array.from({length:v},T),P=Promise.all(E).then(()=>{f.current=!0,!u.current&&e.mode===`count`&&v>0&&h.current===`running`&&t(`draining`)});await Promise.all([P,...N]);let F=g.current,z=performance.now()-F.startedAt,B=z/1e3||1,V=[...F.pushLat].sort((e,t)=>e-t),H={pushed:F.pushed,completed:F.completed,pushFailed:F.pushFailed,ackFailed:F.ackFailed,bytes:F.bytes,durationMs:z,pushPerSec:F.pushed/B,donePerSec:F.completed/B,mbPerSec:F.bytes/B,avg:V.length?V.reduce((e,t)=>e+t,0)/V.length:0,p50:O(V,50),p95:O(V,95),p99:O(V,99),max:V.length?V[V.length-1]:0,error:F.error};a(H),r(e=>({...e,pushed:F.pushed,completed:F.completed,elapsedMs:z,pushPerSec:0,donePerSec:0,activeWorkers:0,etaMs:0})),s(t=>[{...H,id:++R,at:Date.now(),mode:e.mode,producers:d,workers:v},...t].slice(0,12)),t(u.current?`stopped`:`done`)}finally{d.current=!1}}},stop:()=>{u.current=!0,(h.current===`running`||h.current===`draining`)&&t(`stopping`)},reset:()=>{u.current=!0,a(null),r(I),t(`idle`)},clearHistory:()=>s([])}}var B=[`count`,`duration`],V=[`total`,`durationS`,`batch`,`producers`,`payload`,`workers`,`workerBatch`,`processMs`],H=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)}),U=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 W(){let[e,n]=(0,C.useState)(()=>H(T)),r=z(),{phase:S,live:O,summary:k,history:A}=r,j=S===`running`||S===`draining`||S===`stopping`,M=(e,t)=>n(n=>({...n,[e]:t})),I=e=>t=>M(e,t.target.value),L=e=>n(t=>{let n={...t};for(let[t,r]of Object.entries(e))n[t]=V.includes(t)?String(r):r;return n}),[R,W]=(0,C.useState)(T.queue);(0,C.useEffect)(()=>{let t=setTimeout(()=>W(e.queue.trim()||T.queue),400);return()=>clearTimeout(t)},[e.queue]);let{data:ee,error:te}=d(()=>p.counts(R),[R],{intervalMs:1e3}),q=ee?.counts??null,[J,Y]=(0,C.useState)(!1),[X,Z]=(0,C.useState)(null),ne=async()=>{let t=e.queue.trim();if(J||!t)return;let n=q&&R===t?` Currently ${l(q.waiting??0)} waiting / ${l(q.completed??0)} completed.`:``;if(window.confirm(`Remove benchmark jobs from "${t}"?${n}`)){Y(!0),Z(null);try{let e=null;for(let n of[`waiting`,`completed`,`failed`,`delayed`])try{await p.clean(t,{state:n,limit:w.total})}catch(t){e=t.message}let n=await p.counts(t).catch(t=>(e=t.message,null));Z(n==null?{error:e??`server unreachable — could not verify`}:{remaining:n.counts?.active??0})}finally{Y(!1)}}},Q=r.runCfg??U(e),$=D(Q.total,1,w.total),re=D(Q.workers,0,w.workers),ie=Q.mode===`count`&&(j||k)?Math.min(100,O.pushed/$*100):0,ae=Q.mode===`count`&&(j||k)?Math.min(100,O.completed/$*100):0,oe=Q.mode===`duration`?Math.min(100,O.elapsedMs/(D(Q.durationS,1,w.durationS)*1e3)*100):0,se=S===`running`?Q.mode===`duration`?`Running…`:`Producing…`:S===`draining`?`Draining…`:S===`stopping`?`Stopping…`:S===`error`?`Error`:k?`Result`:`Ready`,ce=(S===`running`||S===`draining`)&&O.etaMs!=null?O.etaMs>0?`ETA ${h(O.etaMs)}`:`finishing…`:S===`stopped`?`stopped early`:S===`done`?`complete`:``;return(0,P.jsxs)(`div`,{children:[(0,P.jsx)(u,{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:S===`stopping`?(0,P.jsxs)(o,{variant:`warning`,size:`sm`,disabled:!0,children:[(0,P.jsx)(s,{className:`size-3.5`}),` Stopping…`]}):j?(0,P.jsxs)(o,{variant:`warning`,size:`sm`,onClick:r.stop,children:[(0,P.jsx)(s,{className:`size-3.5`}),` Stop`]}):(0,P.jsxs)(o,{variant:`success`,size:`sm`,onClick:()=>{let t=U(e),n=t.queue.trim()||T.queue;window.confirm(`Enqueue real jobs into "${n}" on ${i()}?`)&&r.run(t)},children:[(0,P.jsx)(c,{className:`size-3.5`}),` Run benchmark`]})}),O.error&&(0,P.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:O.error}),(0,P.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center gap-2`,children:[(0,P.jsx)(`span`,{className:`text-xs font-medium uppercase tracking-wider text-faint`,children:`Presets`}),Object.keys(E).map(e=>(0,P.jsx)(`button`,{type:`button`,disabled:j,onClick:()=>L(E[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,P.jsxs)(`div`,{className:`grid grid-cols-1 gap-6 lg:grid-cols-3`,children:[(0,P.jsxs)(a,{className:`lg:col-span-1`,children:[(0,P.jsx)(g,{title:`Configuration`}),(0,P.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,P.jsx)(b,{label:`Queue`,hint:`Jobs are enqueued here (created on first push).`,children:(0,P.jsx)(v,{value:e.queue,disabled:j,onChange:e=>M(`queue`,e.target.value)})}),(0,P.jsx)(b,{label:`Mode`,hint:e.mode===`count`?`Push a fixed number of jobs.`:`Run producers + workers for a fixed time.`,children:(0,P.jsx)(_,{options:B,value:e.mode,onChange:e=>M(`mode`,e),disabled:j})}),e.mode===`count`?(0,P.jsx)(b,{label:`Total jobs`,hint:`max ${l(w.total)}`,children:(0,P.jsx)(v,{type:`number`,min:1,max:w.total,value:e.total,disabled:j,onChange:I(`total`)})}):(0,P.jsx)(b,{label:`Duration (s)`,hint:`max ${w.durationS}s`,children:(0,P.jsx)(v,{type:`number`,min:1,max:w.durationS,value:e.durationS,disabled:j,onChange:I(`durationS`)})}),(0,P.jsx)(`div`,{className:`mt-1 text-[11px] font-semibold uppercase tracking-wider text-faint`,children:`Producers`}),(0,P.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,P.jsx)(b,{label:`Producers`,hint:`parallel, max ${w.producers}`,children:(0,P.jsx)(v,{type:`number`,min:e.mode===`duration`?0:1,max:w.producers,value:e.producers,disabled:j,onChange:I(`producers`)})}),(0,P.jsx)(b,{label:`Push batch`,hint:`jobs/req, max ${w.batch}`,children:(0,P.jsx)(v,{type:`number`,min:1,max:w.batch,value:e.batch,disabled:j,onChange:I(`batch`)})}),(0,P.jsx)(b,{label:`Payload`,hint:`bytes/job, max ${l(w.payload)}`,children:(0,P.jsx)(v,{type:`number`,min:0,max:w.payload,value:e.payload,disabled:j,onChange:I(`payload`)})})]}),(0,P.jsx)(`div`,{className:`mt-1 text-[11px] font-semibold uppercase tracking-wider text-faint`,children:`Workers (simulated)`}),(0,P.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,P.jsx)(b,{label:`Workers`,hint:`0 = produce only, max ${w.workers}`,children:(0,P.jsx)(v,{type:`number`,min:0,max:w.workers,value:e.workers,disabled:j,onChange:I(`workers`)})}),(0,P.jsx)(b,{label:`Pull batch`,hint:`jobs/pull, max ${w.workerBatch}`,children:(0,P.jsx)(v,{type:`number`,min:1,max:w.workerBatch,value:e.workerBatch,disabled:j,onChange:I(`workerBatch`)})}),(0,P.jsx)(b,{label:`Process (ms)`,hint:`simulated work per pull`,children:(0,P.jsx)(v,{type:`number`,min:0,max:w.processMs,value:e.processMs,disabled:j,onChange:I(`processMs`)})})]}),(0,P.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2`,children:[(0,P.jsx)(y,{checked:e.durable,onChange:e=>M(`durable`,e),disabled:j}),(0,P.jsx)(`span`,{className:`text-sm text-muted`,children:`Durable (fsync each job)`})]}),(0,P.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2`,children:[(0,P.jsx)(y,{checked:e.removeOnComplete,onChange:e=>M(`removeOnComplete`,e),disabled:j}),(0,P.jsx)(`span`,{className:`text-sm text-muted`,children:`Remove on complete`})]}),(0,P.jsxs)(`div`,{className:`flex items-center gap-3 pt-1`,children:[(0,P.jsx)(o,{variant:`ghost`,size:`sm`,disabled:j||J,onClick:ne,children:J?`Cleaning…`:`Clean queue`}),X&&(`error`in X?(0,P.jsxs)(`span`,{className:`text-xs text-danger`,children:[`Clean unverified — `,X.error]}):(0,P.jsx)(`span`,{className:t(`text-xs`,X.remaining>0?`text-warning`:`text-success`),children:X.remaining>0?`Cleaned — ${l(X.remaining)} active job(s) remain (requeued after the stall timeout)`:`Cleaned — 0 jobs remain`}))]})]})]}),(0,P.jsxs)(`div`,{className:`flex flex-col gap-6 lg:col-span-2`,children:[(0,P.jsxs)(a,{children:[(0,P.jsxs)(`div`,{className:`mb-3 flex items-center justify-between`,children:[(0,P.jsx)(`h3`,{className:`text-base font-semibold text-fg`,children:se}),(0,P.jsx)(`span`,{className:`text-xs text-faint`,children:ce})]}),(0,P.jsx)(G,{label:Q.mode===`duration`?`Elapsed`:`Produced`,pct:Q.mode===`duration`?oe:ie,tone:`accent`}),re>0&&Q.mode===`count`&&(0,P.jsx)(G,{label:`Completed`,pct:ae,tone:`emerald`}),(0,P.jsxs)(`div`,{className:`mt-4 grid grid-cols-2 gap-4 md:grid-cols-4`,children:[(0,P.jsx)(f,{label:`Pushed`,value:l(O.pushed),tone:`accent`,compact:!0}),(0,P.jsx)(f,{label:`Completed`,value:l(O.completed),tone:`green`,compact:!0}),(0,P.jsx)(f,{label:`Push/sec`,value:N(O.pushPerSec),compact:!0}),(0,P.jsx)(f,{label:`Done/sec`,value:N(O.donePerSec),tone:`green`,compact:!0}),(0,P.jsx)(f,{label:`Elapsed`,value:h(O.elapsedMs),compact:!0}),(0,P.jsx)(f,{label:`Active workers`,value:`${O.activeWorkers}/${re}`,tone:`blue`,compact:!0}),(0,P.jsx)(f,{label:`Data`,value:m(k?.bytes??O.bytes),compact:!0}),(0,P.jsx)(f,{label:`Errors`,value:l((k?.pushFailed??O.pushFailed)+(k?.ackFailed??O.ackFailed)),tone:O.pushFailed+O.ackFailed?`red`:`default`,compact:!0})]})]}),(0,P.jsxs)(a,{children:[(0,P.jsx)(g,{title:`Throughput`}),(0,P.jsx)(`p`,{className:`-mt-3 mb-4 text-xs text-faint`,children:`Enqueue (client → server) vs completion (workers) per second`}),(0,P.jsx)(x,{series:[{label:`Push/sec`,color:`#38bdf8`,points:O.pushSeries,area:!0},{label:`Done/sec`,color:`#34d399`,points:O.doneSeries,area:!0}]}),(0,P.jsxs)(`div`,{className:`mt-2 flex items-center gap-4 font-mono text-[11px] text-faint`,children:[(0,P.jsx)(K,{color:`#38bdf8`,label:`Push/sec`,value:O.pushPerSec}),(0,P.jsx)(K,{color:`#34d399`,label:`Done/sec`,value:O.donePerSec})]})]})]})]}),k&&(0,P.jsxs)(a,{className:`mt-6`,children:[(0,P.jsx)(g,{title:`Summary`}),(0,P.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 md:grid-cols-4 xl:grid-cols-8`,children:[(0,P.jsx)(f,{label:`Pushed`,value:l(k.pushed),tone:`accent`,compact:!0}),(0,P.jsx)(f,{label:`Completed`,value:l(k.completed),tone:`green`,compact:!0}),(0,P.jsx)(f,{label:`Duration`,value:h(k.durationMs),compact:!0}),(0,P.jsx)(f,{label:`Avg push/s`,value:N(k.pushPerSec),tone:`accent`,compact:!0}),(0,P.jsx)(f,{label:`Avg done/s`,value:N(k.donePerSec),tone:`green`,compact:!0}),(0,P.jsx)(f,{label:`Data rate`,value:`${m(k.mbPerSec)}/s`,compact:!0}),(0,P.jsx)(f,{label:`Push p95`,value:h(k.p95),compact:!0}),(0,P.jsx)(f,{label:`Push p99`,value:h(k.p99),compact:!0})]}),(0,P.jsxs)(`p`,{className:`mt-3 text-xs text-faint`,children:[`Push-batch latency avg `,h(k.avg),` · p50 `,h(k.p50),` · p95`,` `,h(k.p95),` · p99 `,h(k.p99),` · max `,h(k.max),`.`,k.error?` First error: ${k.error}`:``]})]}),(0,P.jsxs)(a,{className:`mt-6`,children:[(0,P.jsx)(g,{title:`Server queue: ${R}`,action:te?(0,P.jsx)(`span`,{className:`text-xs font-medium text-warning`,children:`stale — server unreachable`}):void 0}),(0,P.jsx)(`p`,{className:`-mt-3 mb-4 text-xs text-faint`,children:`Live counts from the server (poll 1s).`}),q?(0,P.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 md:grid-cols-5`,children:[(0,P.jsx)(f,{label:`Waiting`,value:l(q.waiting??0),tone:`amber`,compact:!0}),(0,P.jsx)(f,{label:`Active`,value:l(q.active??0),tone:`blue`,compact:!0}),(0,P.jsx)(f,{label:`Completed`,value:l(q.completed??0),tone:`green`,compact:!0}),(0,P.jsx)(f,{label:`Failed`,value:l(q.failed??0),tone:q.failed?`red`:`default`,compact:!0}),(0,P.jsx)(f,{label:`Delayed`,value:l(q.delayed??0),compact:!0})]}):(0,P.jsx)(`p`,{className:`text-sm text-faint`,children:`No counts yet — waiting for the server to answer for this queue.`})]}),(0,P.jsx)(F,{history:A,onClear:r.clearHistory})]})}function G({label:e,pct:n,tone:r}){return(0,P.jsxs)(`div`,{className:`mb-2`,children:[(0,P.jsxs)(`div`,{className:`mb-1 flex items-center justify-between text-[11px] text-faint`,children:[(0,P.jsx)(`span`,{children:e}),(0,P.jsxs)(`span`,{className:`tnum`,children:[n.toFixed(0),`%`]})]}),(0,P.jsx)(`div`,{className:`h-1.5 overflow-hidden rounded-full bg-surface-2`,children:(0,P.jsx)(`div`,{className:t(`h-full rounded-full transition-all`,r===`accent`?`bg-accent`:`bg-emerald-500`),style:{width:`${n}%`}})})]})}function K({color:e,label:t,value:n}){return(0,P.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,P.jsx)(`span`,{className:`size-2 rounded-full`,style:{background:e}}),t,` `,(0,P.jsxs)(`span`,{className:`text-fg`,children:[N(n),`/s`]})]})}export{W as Benchmark};
@@ -0,0 +1,5 @@
1
+ import{r as e}from"./cn-CMFYpumL.js";import{h as t,t as n}from"./react-vendor-B68RYDeC.js";import{C as r,T as i,h as a,k as o,nt as s,rt as c,w as l}from"./index-CjnfFs1N.js";import{i as u,n as d,t as f}from"./form-C-zZyKfB.js";var p=e(t(),1),m=n(),h=1e4,g=`[
2
+ { "data": { "to": "a@example.com", "template": "welcome" }, "priority": 1 },
3
+ { "data": { "to": "b@example.com", "template": "welcome" } }
4
+ ]`,_=e=>{let t=Number(e);return e.trim()!==``&&Number.isFinite(t)?t:void 0},v=e=>typeof e==`number`&&Number.isFinite(e)?e:void 0,y=e=>typeof e==`boolean`?e:void 0,b=e=>typeof e==`string`&&e!==``?e:void 0;function x(e,t,n){if(n===`spec`&&e&&typeof e==`object`&&!Array.isArray(e)&&`data`in e){let n=e;return{data:n.data,priority:v(n.priority)??t.priority,delay:v(n.delay),maxAttempts:v(n.maxAttempts)??t.maxAttempts,backoff:v(n.backoff)??t.backoff,timeout:v(n.timeout)??t.timeout,jobId:b(n.jobId),removeOnComplete:y(n.removeOnComplete),removeOnFail:y(n.removeOnFail),durable:y(n.durable),lifo:y(n.lifo),ttl:v(n.ttl),uniqueKey:b(n.uniqueKey)}}return{data:e,...t}}var S=new Set([`data`,`priority`,`delay`,`maxAttempts`,`backoff`,`timeout`,`jobId`,`removeOnComplete`,`removeOnFail`,`durable`,`lifo`,`ttl`,`uniqueKey`]);function C(e){return e.some(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`data`in e&&Object.keys(e).some(e=>!S.has(e)))}function w(e){let t=e.trim();if(!t)return{items:[],error:null};try{let e=JSON.parse(t);return Array.isArray(e)?{items:e,error:null}:{items:[e],error:null}}catch{}let n=[],r=t.split(`
5
+ `);for(let e=0;e<r.length;e++){let t=r[e].trim();if(t)try{n.push(JSON.parse(t))}catch(t){return{items:[],error:`Line ${e+1}: ${t.message}`}}}return{items:n,error:null}}function T(){let{data:e}=o(()=>s.queues(),[],{intervalMs:3e4}),[t,n]=(0,p.useState)(``),[v,y]=(0,p.useState)(``),[b,S]=(0,p.useState)(`spec`),[T,E]=(0,p.useState)(``),[D,O]=(0,p.useState)(``),[k,A]=(0,p.useState)(``),[j,M]=(0,p.useState)(``),[N,P]=(0,p.useState)(!1),[F,I]=(0,p.useState)(null),{items:L,error:R}=(0,p.useMemo)(()=>w(v),[v]),z=b===`spec`&&!R&&C(L);return(0,m.jsxs)(`div`,{children:[(0,m.jsx)(a,{title:`Bulk Add Jobs`,description:`Import many distinct jobs at once from a JSON array, NDJSON, or a file.`}),(0,m.jsxs)(`div`,{className:`grid grid-cols-1 gap-6 lg:grid-cols-3`,children:[(0,m.jsxs)(r,{className:`lg:col-span-2`,children:[(0,m.jsx)(l,{title:`Jobs`,action:(0,m.jsxs)(`label`,{className:`cursor-pointer rounded-lg border border-line px-3 py-1.5 text-xs text-muted hover:bg-surface-2 hover:text-fg`,children:[`Upload file`,(0,m.jsx)(`input`,{type:`file`,accept:`.json,.ndjson,.txt,application/json`,onChange:e=>{let t=e.target.files?.[0];if(!t)return;if(v.trim()!==``&&!window.confirm(`Replace the current input with "${t.name}"?`)){e.target.value=``;return}let n=new FileReader;n.onload=()=>y(String(n.result??``)),n.onerror=()=>I({ok:!1,msg:`Could not read file`}),n.readAsText(t),e.target.value=``},className:`hidden`})]})}),(0,m.jsx)(`textarea`,{value:v,onChange:e=>y(e.target.value),spellCheck:!1,rows:16,placeholder:g,"aria-label":`Jobs JSON`,className:`w-full rounded-lg border border-line bg-surface-2 p-3 font-mono text-xs text-fg placeholder:text-faint focus:border-accent/60 focus:outline-none focus:ring-2 focus:ring-accent/30`}),(0,m.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center gap-3`,children:[(0,m.jsx)(`span`,{className:`text-xs font-medium text-faint`,children:`Interpret each item as`}),(0,m.jsx)(u,{options:[`spec`,`raw`],value:b,onChange:S}),(0,m.jsx)(`span`,{className:`text-xs text-faint`,children:b===`spec`?`job spec: an object with a "data" key sets options from its sibling fields.`:`raw data: the whole item becomes the job payload, untouched.`})]}),(0,m.jsx)(`p`,{className:`mt-2 text-xs text-faint`,children:`Accepts a JSON array, a single object, or newline-delimited JSON.`}),(0,m.jsx)(`div`,{className:`mt-2 text-sm`,children:R?(0,m.jsx)(`span`,{className:`text-danger`,children:R}):L.length>0?(0,m.jsxs)(`span`,{className:`text-success`,children:[L.length,` job(s) parsed ✓`]}):(0,m.jsx)(`span`,{className:`text-faint`,children:`Nothing parsed yet.`})}),z&&(0,m.jsx)(`p`,{className:`mt-2 text-xs text-warning`,children:`Some items carry keys beyond the known job options — in “spec” mode those keys are dropped. Switch to “raw” to keep every field as the job's data.`})]}),(0,m.jsxs)(r,{children:[(0,m.jsx)(l,{title:`Target & defaults`}),(0,m.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,m.jsxs)(f,{label:`Queue`,children:[(0,m.jsx)(d,{list:`bulk-queue-options`,value:t,onChange:e=>n(e.target.value),placeholder:`queue name (existing or new)`}),(0,m.jsx)(`datalist`,{id:`bulk-queue-options`,children:(e?.queues??[]).map(e=>(0,m.jsx)(`option`,{value:e.name},e.name))})]}),(0,m.jsx)(`p`,{className:`-mt-2 text-xs text-faint`,children:`Defaults below fill any field an item omits.`}),(0,m.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,m.jsx)(f,{label:`Priority`,children:(0,m.jsx)(d,{type:`number`,value:T,onChange:e=>E(e.target.value),placeholder:`0`})}),(0,m.jsx)(f,{label:`Max attempts`,children:(0,m.jsx)(d,{type:`number`,min:0,value:D,onChange:e=>O(e.target.value),placeholder:`3`})}),(0,m.jsx)(f,{label:`Backoff (ms)`,children:(0,m.jsx)(d,{type:`number`,min:0,value:k,onChange:e=>A(e.target.value),placeholder:`1000`})}),(0,m.jsx)(f,{label:`Timeout (ms)`,children:(0,m.jsx)(d,{type:`number`,min:0,value:j,onChange:e=>M(e.target.value),placeholder:`—`})})]}),(0,m.jsx)(`div`,{className:`flex items-center gap-3`,children:(0,m.jsx)(i,{variant:`accent`,disabled:N||L.length===0||R!=null,onClick:async()=>{if(I(null),!t.trim()){I({ok:!1,msg:`Choose a queue`});return}if(R){I({ok:!1,msg:R});return}if(L.length===0){I({ok:!1,msg:`Nothing to enqueue — paste a JSON array or NDJSON.`});return}if(L.length>h){I({ok:!1,msg:`Too many jobs (${L.length}). Limit is ${h}.`});return}let e=e=>e!=null&&e<0?0:e,n={priority:_(T),maxAttempts:e(_(D)),backoff:e(_(k)),timeout:e(_(j))},r=L.map(e=>x(e,n,b));P(!0);try{let e=await s.addJobsBulk(t,r),n=new Set(e.ids).size,i=`Created ${n} job${n===1?``:`s`} in ${t}`;I({ok:!0,msg:i}),c.success(i)}catch(e){let t=e.message;I({ok:!1,msg:t}),c.error(`Bulk import failed`,t)}finally{P(!1)}},children:N?`Importing…`:`Import ${L.length||``}`})}),F&&(0,m.jsx)(`span`,{role:`status`,className:F.ok?`text-sm text-success`:`text-sm text-danger`,children:F.msg})]})]})]})]})}export{T as BulkAddJobs};