@lunora/studio 1.0.0-alpha.4 → 1.0.0-alpha.41
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/LICENSE.md +6 -0
- package/__assets__/package-og.svg +1 -1
- package/dist/index.d.ts +33 -18
- package/dist/index.js +29 -29
- package/dist/mount.d.ts +1 -1
- package/dist/mount.js +3 -2
- package/dist/{packem_shared/ApiTab-W3no0KOj.js → packem_chunks/ApiTab.js} +5 -5
- package/dist/{packem_shared/AuditPanel-Bq4o_IqT.js → packem_chunks/AuditPanel.js} +29 -41
- package/dist/{packem_shared/ExportImportPanel-dxY56TDF.js → packem_chunks/ExportImportPanel.js} +16 -11
- package/dist/{packem_shared/FileBrowser-Dhy4zES8.js → packem_chunks/FileBrowser.js} +15 -15
- package/dist/{packem_shared/FunctionRunner--fQJRPAD.js → packem_chunks/FunctionRunner.js} +10 -10
- package/dist/{packem_shared/FunctionStatsPanel-BjRUA_G3.js → packem_chunks/FunctionStatsPanel.js} +153 -208
- package/dist/{packem_shared/HealthPanel-PxclMWmA.js → packem_chunks/HealthPanel.js} +37 -29
- package/dist/{packem_shared/InsightsPanel-CWS_C-xW.js → packem_chunks/InsightsPanel.js} +108 -69
- package/dist/{packem_shared/LogsPanel-CTW8CFcM.js → packem_chunks/LogsPanel.js} +46 -58
- package/dist/{packem_shared/MailPanel-BwkvfIHF.js → packem_chunks/MailPanel.js} +45 -139
- package/dist/{packem_shared/MetricsPanel-BLuOhZQ4.js → packem_chunks/MetricsPanel.js} +41 -322
- package/dist/{packem_shared/MigrationsPanel-DT3lnwHF.js → packem_chunks/MigrationsPanel.js} +44 -51
- package/dist/{packem_shared/PitrPanel-CdErL7EJ.js → packem_chunks/PitrPanel.js} +9 -9
- package/dist/{packem_shared/SchemaViewer-LJDcmNIO.js → packem_chunks/SchemaViewer.js} +17 -16
- package/dist/{packem_shared/SecurityAdvisorPanel-C_ETsPih.js → packem_chunks/SecurityAdvisorPanel.js} +47 -31
- package/dist/packem_chunks/SettingsPanel.js +391 -0
- package/dist/{packem_shared/sql-editor-panel-BFRpzj6r.js → packem_chunks/SqlEditorPanel.js} +158 -387
- package/dist/{packem_shared/TableEditor-ChfUOZec.js → packem_chunks/TableEditor.js} +10 -68
- package/dist/packem_chunks/analytics-panel.js +261 -0
- package/dist/packem_chunks/auth-config-panel.js +365 -0
- package/dist/packem_chunks/auth-sessions-panel.js +175 -0
- package/dist/packem_chunks/containers-panel.js +247 -0
- package/dist/packem_chunks/dashboards-panel.js +780 -0
- package/dist/packem_chunks/fanout-panel.js +482 -0
- package/dist/packem_chunks/flags-panel.js +176 -0
- package/dist/packem_chunks/kv-browser.js +1896 -0
- package/dist/packem_chunks/log-drains-panel.js +273 -0
- package/dist/packem_chunks/organizations-panel.js +3178 -0
- package/dist/packem_chunks/payments-panel.js +186 -0
- package/dist/packem_chunks/permissions-panel.js +805 -0
- package/dist/packem_chunks/queues-panel.js +1075 -0
- package/dist/packem_chunks/rls-panel.js +315 -0
- package/dist/packem_chunks/schedule-panel.js +831 -0
- package/dist/packem_chunks/sparkline.js +79 -0
- package/dist/packem_chunks/storage-rules-panel.js +140 -0
- package/dist/packem_chunks/subscriptions-panel.js +238 -0
- package/dist/packem_chunks/users-panel.js +1731 -0
- package/dist/packem_chunks/vector-browser.js +281 -0
- package/dist/packem_chunks/workflows-panel.js +562 -0
- package/dist/packem_shared/{ADMIN_FUNCTIONS-DmBqMZ-z.js → ADMIN_FUNCTIONS-BHHJi3Gb.js} +7 -0
- package/dist/packem_shared/{ApiDocsPanel-C5-yJ1p7.js → ApiDocsPanel-CBma-lnp.js} +2 -2
- package/dist/packem_shared/{ApiReferencePanel-1vubqG5s.js → ApiReferencePanel-CQM3pPN7.js} +2 -1
- package/dist/packem_shared/{CommandPalette-BtgkBzZI.js → CommandPalette-X2tkbyHk.js} +1 -1
- package/dist/packem_shared/{DataBrowser-CtBe1So9.js → DataBrowser-D2ywrdId.js} +198 -247
- package/dist/packem_shared/{GlobalDataBrowser-BTEmGrph.js → GlobalDataBrowser-BkTPLzAY.js} +37 -66
- package/dist/packem_shared/HomePanel-D1Q9LZgK.js +14 -0
- package/dist/packem_shared/{OpenRpcReferencePanel-vbcYbv3V.js → OpenRpcReferencePanel-Dno-hfDb.js} +2 -1
- package/dist/packem_shared/{ScheduledJobs-CabfKbyM.js → ScheduledJobs-Ctw4jYtU.js} +163 -60
- package/dist/packem_shared/Studio-lJhzDAze.js +16 -0
- package/dist/packem_shared/{StudioApp-CHOZA-z-.js → StudioApp-DiMkupvZ.js} +276 -11
- package/dist/packem_shared/{advisor-view-CGcfMiPq.js → advisor-view-BX8OhG0w.js} +6 -6
- package/dist/packem_shared/alert-CdAET2K_.js +68 -0
- package/dist/packem_shared/{app.d-CCmwDEVs.d.ts → app.d-CNLRTrWw.d.ts} +1 -1
- package/dist/packem_shared/{bar-chart-CzJAgqkp.js → bar-chart-DSwcWIRy.js} +5 -4
- package/dist/packem_shared/browser-storage-BTrX4y3B.js +215 -0
- package/dist/packem_shared/{cf-links-2cktDedA.js → cf-links-BZfRdxSE.js} +1 -1
- package/dist/packem_shared/{data-grid-B5CaV3wS.js → data-grid-CdXztApG.js} +1 -1
- package/dist/packem_shared/data-view-params-Cd6yRVbv.js +96 -0
- package/dist/packem_shared/error-alert-CXjqyGw9.js +114 -0
- package/dist/packem_shared/{grid-features-CzUfqgsM.js → grid-features-BF-KBDFz.js} +131 -163
- package/dist/packem_shared/home-panel-TFcRf9Ui.js +1889 -0
- package/dist/packem_shared/{internal-rXJEAhXS.js → internal-CYcbqMjX.js} +44 -3
- package/dist/packem_shared/modal-shell-hyaJvIJ6.js +100 -0
- package/dist/packem_shared/{reference-view-B4E49Lip.js → reference-view-DUiJcILV.js} +6 -45
- package/dist/packem_shared/scroll-area-DLhcy-ml.js +93 -0
- package/dist/packem_shared/select-UkNYCT3s.js +273 -0
- package/dist/packem_shared/skeleton-CGhL0p20.js +45 -0
- package/dist/packem_shared/{sparkline-10dG-_f0.js → sparkline-BnA1kC9X.js} +1 -1
- package/dist/packem_shared/studio-Dh9UlaF_.js +4015 -0
- package/dist/packem_shared/{table-_RzNvy3R.js → table-DsCa9Qp9.js} +1 -1
- package/dist/packem_shared/{table-list-sidebar-Bg7uzbvC.js → table-list-sidebar-UVIXQJdU.js} +1 -1
- package/dist/packem_shared/use-admin-query-CfHYWx5n.js +106 -0
- package/dist/packem_shared/use-async-submit-DJQiPc-_.js +91 -0
- package/dist/standalone/chunk-25AYY4H7.js +2 -0
- package/dist/standalone/chunk-2ANAF4ZM.js +1 -0
- package/dist/standalone/chunk-2K47A3P6.js +1 -0
- package/dist/standalone/chunk-2NGUNNGW.js +1 -0
- package/dist/standalone/chunk-3CJW6NWG.js +4 -0
- package/dist/standalone/chunk-3OA7PECS.js +6 -0
- package/dist/standalone/chunk-3OIHOXVV.js +1 -0
- package/dist/standalone/chunk-447TAUFD.js +1 -0
- package/dist/standalone/chunk-4QHKBC77.js +1 -0
- package/dist/standalone/chunk-5C4TSNE6.js +1 -0
- package/dist/standalone/chunk-5OIBXYZM.js +1 -0
- package/dist/standalone/chunk-6HSHEMZV.js +76 -0
- package/dist/standalone/chunk-6JIZ34MB.js +3 -0
- package/dist/standalone/chunk-6VO23MMW.js +4 -0
- package/dist/standalone/chunk-7MVSQS7B.js +1 -0
- package/dist/standalone/chunk-7TJJXVSE.js +1 -0
- package/dist/standalone/chunk-7YXOPTWI.js +1 -0
- package/dist/standalone/chunk-AHILM3ZP.js +1 -0
- package/dist/standalone/chunk-BGXOXASQ.js +1 -0
- package/dist/standalone/chunk-BJGBHGK3.js +1 -0
- package/dist/standalone/chunk-BOXSWNXZ.js +1 -0
- package/dist/standalone/chunk-BX5MKYOC.js +1 -0
- package/dist/standalone/chunk-CKSHCYGC.js +2 -0
- package/dist/standalone/chunk-DWDILV2E.js +1 -0
- package/dist/standalone/chunk-E75ANNWX.js +19 -0
- package/dist/standalone/chunk-EQZQOTJY.js +1 -0
- package/dist/standalone/chunk-GTLEWM5Y.js +1 -0
- package/dist/standalone/chunk-GTM65MVX.js +1 -0
- package/dist/standalone/chunk-GUI5GFFI.js +1 -0
- package/dist/standalone/chunk-HN6KJXYQ.js +1 -0
- package/dist/standalone/chunk-HV7G6DFP.js +5 -0
- package/dist/standalone/chunk-HYDJNCGW.js +1 -0
- package/dist/standalone/chunk-HZK5RQHG.js +1 -0
- package/dist/standalone/chunk-IN2SYVJB.js +1 -0
- package/dist/standalone/chunk-IOANPSJN.js +1 -0
- package/dist/standalone/chunk-ISDZPW3V.js +1 -0
- package/dist/standalone/chunk-IXDH4GL5.js +1 -0
- package/dist/standalone/chunk-J6J54MBP.js +1 -0
- package/dist/standalone/chunk-J73VHFCL.js +1 -0
- package/dist/standalone/chunk-JHKMUTIF.js +13 -0
- package/dist/standalone/chunk-JPRH6DPK.js +1 -0
- package/dist/standalone/chunk-JSEXCW5Q.js +1 -0
- package/dist/standalone/chunk-KA5YB3VP.js +1 -0
- package/dist/standalone/chunk-KBB75WNT.js +1 -0
- package/dist/standalone/chunk-KEGAWN6Y.js +1 -0
- package/dist/standalone/chunk-KJJ3WM6H.js +4 -0
- package/dist/standalone/chunk-KQV4NGH3.js +1 -0
- package/dist/standalone/chunk-KSKXW5PX.js +1 -0
- package/dist/standalone/chunk-KUH4P5F5.js +1 -0
- package/dist/standalone/chunk-KYJPPVGB.js +1 -0
- package/dist/standalone/chunk-KZ6INM5M.js +1 -0
- package/dist/standalone/chunk-L2TJVSDQ.js +1 -0
- package/dist/standalone/chunk-L7SK4ZZD.js +1 -0
- package/dist/standalone/chunk-LAK5VSPI.js +1 -0
- package/dist/standalone/chunk-LBN7LPVK.js +1 -0
- package/dist/standalone/chunk-LNZIB2MD.js +1 -0
- package/dist/standalone/chunk-MJWVMKQ4.js +6 -0
- package/dist/standalone/chunk-MLZYX5CQ.js +1 -0
- package/dist/standalone/chunk-N2X2OO4V.js +1 -0
- package/dist/standalone/chunk-NGKITPQP.js +13 -0
- package/dist/standalone/chunk-O3NAGRTR.js +1 -0
- package/dist/standalone/chunk-OZACQNKG.js +1 -0
- package/dist/standalone/chunk-PNDNXS5Z.js +1 -0
- package/dist/standalone/chunk-Q7DMUTUE.js +1 -0
- package/dist/standalone/chunk-QAFAJBAW.js +1 -0
- package/dist/standalone/chunk-QBAT52GB.js +1 -0
- package/dist/standalone/chunk-RHZ4M2NZ.js +1 -0
- package/dist/standalone/chunk-RRCPZMC2.js +22 -0
- package/dist/standalone/chunk-SEU5V7I6.js +1 -0
- package/dist/standalone/chunk-TAD43CG5.js +1 -0
- package/dist/standalone/chunk-TBMYIZIO.js +1 -0
- package/dist/standalone/chunk-TDZ44E5I.js +4 -0
- package/dist/standalone/chunk-THNBTMUF.js +1 -0
- package/dist/standalone/chunk-TIQISBGK.js +1 -0
- package/dist/standalone/chunk-TMYVNQ66.js +1 -0
- package/dist/standalone/chunk-TQ36RWOP.js +1 -0
- package/dist/standalone/chunk-UGUEC6BC.js +1 -0
- package/dist/standalone/chunk-UJB2LEI4.js +4 -0
- package/dist/standalone/chunk-UK64ZSUW.js +1 -0
- package/dist/standalone/chunk-UKDJ4H7I.js +1 -0
- package/dist/standalone/chunk-VLXV72QE.js +1 -0
- package/dist/standalone/chunk-VON7JUPG.js +1 -0
- package/dist/standalone/chunk-W3JK4YWR.js +1 -0
- package/dist/standalone/chunk-W3SHEIAL.js +3 -0
- package/dist/standalone/chunk-WI7GWFEG.js +1 -0
- package/dist/standalone/chunk-WIHXMNUY.js +1 -0
- package/dist/standalone/chunk-WLDVXVI2.js +1 -0
- package/dist/standalone/chunk-XLXNLJ4N.js +1 -0
- package/dist/standalone/chunk-XNJNSCLM.js +1 -0
- package/dist/standalone/chunk-YAECF5LW.js +1 -0
- package/dist/standalone/chunk-YBGC4PPD.js +1 -0
- package/dist/standalone/chunk-YJAPWSDC.js +4 -0
- package/dist/standalone/chunk-ZEJB6DXU.js +8 -0
- package/dist/standalone/chunk-ZFNBPAIZ.js +1 -0
- package/dist/standalone/chunk-ZHVTQ37P.js +1 -0
- package/dist/standalone/chunk-ZIGWVHCS.js +1 -0
- package/dist/standalone/chunk-ZPP2KOR4.js +1 -0
- package/dist/standalone/chunk-ZPUO7FNI.js +1 -0
- package/dist/standalone/studio.js +104 -246
- package/dist/styles.css +2 -2
- package/package.json +15 -13
- package/dist/packem_shared/HomePanel-Cw16stjq.js +0 -1273
- package/dist/packem_shared/SettingsPanel-C0uLRf5P.js +0 -176
- package/dist/packem_shared/SqlEditorPanel-CguV7otm.js +0 -13
- package/dist/packem_shared/Studio-DFWAlcuf.js +0 -33
- package/dist/packem_shared/studio-Bj8psK1c.js +0 -10303
- package/dist/packem_shared/use-live-admin-Dq6g3daN.js +0 -73
- package/dist/packem_shared/use-live-shard-seed-Cuk3dnH0.js +0 -76
|
@@ -0,0 +1,1075 @@
|
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
2
|
+
import { useLunora } from '@lunora/react';
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { E as ErrorAlert } from '../packem_shared/error-alert-CXjqyGw9.js';
|
|
5
|
+
import { A as Alert } from '../packem_shared/alert-CdAET2K_.js';
|
|
6
|
+
import { B as Badge } from '../packem_shared/badge-B2PKA1-5.js';
|
|
7
|
+
import { B as Button } from '../packem_shared/button-BhsN2uZH.js';
|
|
8
|
+
import { C as Card, a as CardContent } from '../packem_shared/card-DURq3ElK.js';
|
|
9
|
+
import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
|
|
10
|
+
import { I as Input } from '../packem_shared/input-XH4r1Pt1.js';
|
|
11
|
+
import { S as ScrollArea } from '../packem_shared/scroll-area-DLhcy-ml.js';
|
|
12
|
+
import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as TableBody, e as TableCell } from '../packem_shared/table-DsCa9Qp9.js';
|
|
13
|
+
import { T as Textarea } from '../packem_shared/textarea-D3gaCU_-.js';
|
|
14
|
+
import { u as useAdminQuery } from '../packem_shared/use-admin-query-CfHYWx5n.js';
|
|
15
|
+
import { useAutoRefresh } from '../packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js';
|
|
16
|
+
import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
17
|
+
import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-BHHJi3Gb.js';
|
|
18
|
+
import { c as callOptions, e as errorMessage, a as adminRef, f as fireAndForget, i as formatTimestamp } from '../packem_shared/internal-CYcbqMjX.js';
|
|
19
|
+
import { jsxDEV, Fragment } from 'react/jsx-dev-runtime';
|
|
20
|
+
|
|
21
|
+
const computeQueueReliability = (queues, messages) => {
|
|
22
|
+
const dlqTargets = new Set(queues.map((queue) => queue.deadLetterQueue).filter((name) => typeof name === "string" && name !== ""));
|
|
23
|
+
const queuesWithoutDlq = queues.filter((queue) => (queue.deadLetterQueue === void 0 || queue.deadLetterQueue === "") && !dlqTargets.has(queue.name));
|
|
24
|
+
const deadLetteredCount = messages.filter((message) => message.deadLettered).length;
|
|
25
|
+
return {
|
|
26
|
+
deadLetteredCount,
|
|
27
|
+
queuesWithoutDlq,
|
|
28
|
+
showReliabilityWarning: queuesWithoutDlq.length > 0 || deadLetteredCount > 0
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const DEFAULT_MESSAGE_LIMIT = 200;
|
|
33
|
+
const SEND_QUEUE_MESSAGE = adminRef(ADMIN_FUNCTIONS.sendQueueMessage);
|
|
34
|
+
const REPLAY_QUEUE_MESSAGE = adminRef(ADMIN_FUNCTIONS.replayQueueMessage);
|
|
35
|
+
const CLEAR_QUEUE_MESSAGES = adminRef(ADMIN_FUNCTIONS.clearQueueMessages);
|
|
36
|
+
const BODY_PREVIEW_MAX = 96;
|
|
37
|
+
const formatBody = (value) => {
|
|
38
|
+
if (value === void 0) {
|
|
39
|
+
return "—";
|
|
40
|
+
}
|
|
41
|
+
try {
|
|
42
|
+
return JSON.stringify(value);
|
|
43
|
+
} catch {
|
|
44
|
+
return "[unserializable]";
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
const truncate = (text) => text.length > BODY_PREVIEW_MAX ? `${text.slice(0, BODY_PREVIEW_MAX)}…` : text;
|
|
48
|
+
const outcomeVariant = (outcome) => {
|
|
49
|
+
if (outcome === "error") {
|
|
50
|
+
return "destructive";
|
|
51
|
+
}
|
|
52
|
+
if (outcome === "retry") {
|
|
53
|
+
return "outline";
|
|
54
|
+
}
|
|
55
|
+
return "secondary";
|
|
56
|
+
};
|
|
57
|
+
const tabLabel = (value, t) => {
|
|
58
|
+
if (value === "messages") {
|
|
59
|
+
return t("Messages");
|
|
60
|
+
}
|
|
61
|
+
if (value === "send") {
|
|
62
|
+
return t("Send");
|
|
63
|
+
}
|
|
64
|
+
return t("Declared");
|
|
65
|
+
};
|
|
66
|
+
const QueuesDeclaredTab = (t0) => {
|
|
67
|
+
const $ = c(11);
|
|
68
|
+
const {
|
|
69
|
+
loaded,
|
|
70
|
+
queues
|
|
71
|
+
} = t0;
|
|
72
|
+
const t = useT();
|
|
73
|
+
let t1;
|
|
74
|
+
if ($[0] !== t) {
|
|
75
|
+
t1 = t("Queues are declared in code with defineQueue. Enqueue from a mutation or action with ctx.queues.<name>.send(...); push consumers process batches in the worker.");
|
|
76
|
+
$[0] = t;
|
|
77
|
+
$[1] = t1;
|
|
78
|
+
} else {
|
|
79
|
+
t1 = $[1];
|
|
80
|
+
}
|
|
81
|
+
let t2;
|
|
82
|
+
if ($[2] !== t1) {
|
|
83
|
+
t2 = /* @__PURE__ */ jsxDEV("p", {
|
|
84
|
+
className: "text-sm text-muted-foreground",
|
|
85
|
+
children: t1
|
|
86
|
+
}, void 0, false);
|
|
87
|
+
$[2] = t1;
|
|
88
|
+
$[3] = t2;
|
|
89
|
+
} else {
|
|
90
|
+
t2 = $[3];
|
|
91
|
+
}
|
|
92
|
+
let t3;
|
|
93
|
+
if ($[4] !== loaded || $[5] !== queues || $[6] !== t) {
|
|
94
|
+
t3 = loaded && queues.length === 0 ? /* @__PURE__ */ jsxDEV(EmptyState, {
|
|
95
|
+
description: t("No defineQueue is declared in lunora/queues.ts in this deployment. Add one to offload async work to a Cloudflare Queue."),
|
|
96
|
+
testId: "queues-empty",
|
|
97
|
+
title: t("No queues defined")
|
|
98
|
+
}, void 0, false) : /* @__PURE__ */ jsxDEV(Card, {
|
|
99
|
+
className: "overflow-hidden py-0",
|
|
100
|
+
children: /* @__PURE__ */ jsxDEV(CardContent, {
|
|
101
|
+
className: "px-0",
|
|
102
|
+
children: /* @__PURE__ */ jsxDEV(Table, {
|
|
103
|
+
"data-testid": "queues-table",
|
|
104
|
+
children: [/* @__PURE__ */ jsxDEV(TableHeader, {
|
|
105
|
+
children: /* @__PURE__ */ jsxDEV(TableRow, {
|
|
106
|
+
children: [/* @__PURE__ */ jsxDEV(TableHead, {
|
|
107
|
+
children: t("Export")
|
|
108
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
109
|
+
children: t("Queue")
|
|
110
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
111
|
+
children: t("Mode")
|
|
112
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
113
|
+
children: t("Binding")
|
|
114
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
115
|
+
children: t("Dead-letter")
|
|
116
|
+
}, void 0, false)]
|
|
117
|
+
}, void 0, true)
|
|
118
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableBody, {
|
|
119
|
+
children: queues.map(_temp)
|
|
120
|
+
}, void 0, false)]
|
|
121
|
+
}, void 0, true)
|
|
122
|
+
}, void 0, false)
|
|
123
|
+
}, void 0, false);
|
|
124
|
+
$[4] = loaded;
|
|
125
|
+
$[5] = queues;
|
|
126
|
+
$[6] = t;
|
|
127
|
+
$[7] = t3;
|
|
128
|
+
} else {
|
|
129
|
+
t3 = $[7];
|
|
130
|
+
}
|
|
131
|
+
let t4;
|
|
132
|
+
if ($[8] !== t2 || $[9] !== t3) {
|
|
133
|
+
t4 = /* @__PURE__ */ jsxDEV("div", {
|
|
134
|
+
className: "flex flex-col gap-4",
|
|
135
|
+
"data-testid": "queues-declared",
|
|
136
|
+
children: [t2, t3]
|
|
137
|
+
}, void 0, true);
|
|
138
|
+
$[8] = t2;
|
|
139
|
+
$[9] = t3;
|
|
140
|
+
$[10] = t4;
|
|
141
|
+
} else {
|
|
142
|
+
t4 = $[10];
|
|
143
|
+
}
|
|
144
|
+
return t4;
|
|
145
|
+
};
|
|
146
|
+
const QueueLogRow = (t0) => {
|
|
147
|
+
const $ = c(67);
|
|
148
|
+
const {
|
|
149
|
+
message,
|
|
150
|
+
onReplay,
|
|
151
|
+
replayingId
|
|
152
|
+
} = t0;
|
|
153
|
+
const t = useT();
|
|
154
|
+
let T0;
|
|
155
|
+
let T1;
|
|
156
|
+
let t1;
|
|
157
|
+
let t2;
|
|
158
|
+
let t3;
|
|
159
|
+
let t4;
|
|
160
|
+
let t5;
|
|
161
|
+
let t6;
|
|
162
|
+
let t7;
|
|
163
|
+
let t8;
|
|
164
|
+
if ($[0] !== message.attempts || $[1] !== message.body || $[2] !== message.deadLettered || $[3] !== message.exportName || $[4] !== message.id || $[5] !== message.messageId || $[6] !== message.outcome || $[7] !== message.queue || $[8] !== t) {
|
|
165
|
+
const body = formatBody(message.body);
|
|
166
|
+
T1 = TableRow;
|
|
167
|
+
t4 = `queues-message-${message.id}`;
|
|
168
|
+
const t92 = message.exportName ?? message.queue;
|
|
169
|
+
if ($[19] !== t92) {
|
|
170
|
+
t5 = /* @__PURE__ */ jsxDEV(TableCell, {
|
|
171
|
+
className: "font-mono text-xs",
|
|
172
|
+
children: t92
|
|
173
|
+
}, void 0, false);
|
|
174
|
+
$[19] = t92;
|
|
175
|
+
$[20] = t5;
|
|
176
|
+
} else {
|
|
177
|
+
t5 = $[20];
|
|
178
|
+
}
|
|
179
|
+
if ($[21] !== message.messageId) {
|
|
180
|
+
t6 = /* @__PURE__ */ jsxDEV(TableCell, {
|
|
181
|
+
className: "max-w-[16ch] truncate font-mono text-xs text-muted-foreground",
|
|
182
|
+
title: message.messageId,
|
|
183
|
+
children: message.messageId
|
|
184
|
+
}, void 0, false);
|
|
185
|
+
$[21] = message.messageId;
|
|
186
|
+
$[22] = t6;
|
|
187
|
+
} else {
|
|
188
|
+
t6 = $[22];
|
|
189
|
+
}
|
|
190
|
+
if ($[23] !== message.attempts) {
|
|
191
|
+
t7 = /* @__PURE__ */ jsxDEV(TableCell, {
|
|
192
|
+
className: "font-mono text-xs tabular-nums",
|
|
193
|
+
children: message.attempts
|
|
194
|
+
}, void 0, false);
|
|
195
|
+
$[23] = message.attempts;
|
|
196
|
+
$[24] = t7;
|
|
197
|
+
} else {
|
|
198
|
+
t7 = $[24];
|
|
199
|
+
}
|
|
200
|
+
const t102 = `queues-outcome-${message.id}`;
|
|
201
|
+
let t112;
|
|
202
|
+
if ($[25] !== message.outcome) {
|
|
203
|
+
t112 = outcomeVariant(message.outcome);
|
|
204
|
+
$[25] = message.outcome;
|
|
205
|
+
$[26] = t112;
|
|
206
|
+
} else {
|
|
207
|
+
t112 = $[26];
|
|
208
|
+
}
|
|
209
|
+
let t122;
|
|
210
|
+
if ($[27] !== message.outcome || $[28] !== t102 || $[29] !== t112) {
|
|
211
|
+
t122 = /* @__PURE__ */ jsxDEV(Badge, {
|
|
212
|
+
"data-testid": t102,
|
|
213
|
+
variant: t112,
|
|
214
|
+
children: message.outcome
|
|
215
|
+
}, void 0, false);
|
|
216
|
+
$[27] = message.outcome;
|
|
217
|
+
$[28] = t102;
|
|
218
|
+
$[29] = t112;
|
|
219
|
+
$[30] = t122;
|
|
220
|
+
} else {
|
|
221
|
+
t122 = $[30];
|
|
222
|
+
}
|
|
223
|
+
let t132;
|
|
224
|
+
if ($[31] !== message.deadLettered || $[32] !== message.id || $[33] !== t) {
|
|
225
|
+
t132 = message.deadLettered && /* @__PURE__ */ jsxDEV(Badge, {
|
|
226
|
+
"data-testid": `queues-dlq-${message.id}`,
|
|
227
|
+
variant: "destructive",
|
|
228
|
+
children: t("DLQ")
|
|
229
|
+
}, void 0, false);
|
|
230
|
+
$[31] = message.deadLettered;
|
|
231
|
+
$[32] = message.id;
|
|
232
|
+
$[33] = t;
|
|
233
|
+
$[34] = t132;
|
|
234
|
+
} else {
|
|
235
|
+
t132 = $[34];
|
|
236
|
+
}
|
|
237
|
+
if ($[35] !== t122 || $[36] !== t132) {
|
|
238
|
+
t8 = /* @__PURE__ */ jsxDEV(TableCell, {
|
|
239
|
+
children: /* @__PURE__ */ jsxDEV("span", {
|
|
240
|
+
className: "inline-flex items-center gap-1",
|
|
241
|
+
children: [t122, t132]
|
|
242
|
+
}, void 0, true)
|
|
243
|
+
}, void 0, false);
|
|
244
|
+
$[35] = t122;
|
|
245
|
+
$[36] = t132;
|
|
246
|
+
$[37] = t8;
|
|
247
|
+
} else {
|
|
248
|
+
t8 = $[37];
|
|
249
|
+
}
|
|
250
|
+
T0 = TableCell;
|
|
251
|
+
t1 = "max-w-[32ch] truncate font-mono text-xs text-muted-foreground";
|
|
252
|
+
t2 = body;
|
|
253
|
+
t3 = truncate(body);
|
|
254
|
+
$[0] = message.attempts;
|
|
255
|
+
$[1] = message.body;
|
|
256
|
+
$[2] = message.deadLettered;
|
|
257
|
+
$[3] = message.exportName;
|
|
258
|
+
$[4] = message.id;
|
|
259
|
+
$[5] = message.messageId;
|
|
260
|
+
$[6] = message.outcome;
|
|
261
|
+
$[7] = message.queue;
|
|
262
|
+
$[8] = t;
|
|
263
|
+
$[9] = T0;
|
|
264
|
+
$[10] = T1;
|
|
265
|
+
$[11] = t1;
|
|
266
|
+
$[12] = t2;
|
|
267
|
+
$[13] = t3;
|
|
268
|
+
$[14] = t4;
|
|
269
|
+
$[15] = t5;
|
|
270
|
+
$[16] = t6;
|
|
271
|
+
$[17] = t7;
|
|
272
|
+
$[18] = t8;
|
|
273
|
+
} else {
|
|
274
|
+
T0 = $[9];
|
|
275
|
+
T1 = $[10];
|
|
276
|
+
t1 = $[11];
|
|
277
|
+
t2 = $[12];
|
|
278
|
+
t3 = $[13];
|
|
279
|
+
t4 = $[14];
|
|
280
|
+
t5 = $[15];
|
|
281
|
+
t6 = $[16];
|
|
282
|
+
t7 = $[17];
|
|
283
|
+
t8 = $[18];
|
|
284
|
+
}
|
|
285
|
+
let t9;
|
|
286
|
+
if ($[38] !== T0 || $[39] !== t1 || $[40] !== t2 || $[41] !== t3) {
|
|
287
|
+
t9 = /* @__PURE__ */ jsxDEV(T0, {
|
|
288
|
+
className: t1,
|
|
289
|
+
title: t2,
|
|
290
|
+
children: t3
|
|
291
|
+
}, void 0, false);
|
|
292
|
+
$[38] = T0;
|
|
293
|
+
$[39] = t1;
|
|
294
|
+
$[40] = t2;
|
|
295
|
+
$[41] = t3;
|
|
296
|
+
$[42] = t9;
|
|
297
|
+
} else {
|
|
298
|
+
t9 = $[42];
|
|
299
|
+
}
|
|
300
|
+
let t10;
|
|
301
|
+
if ($[43] !== message.capturedAt) {
|
|
302
|
+
t10 = formatTimestamp(message.capturedAt, "—");
|
|
303
|
+
$[43] = message.capturedAt;
|
|
304
|
+
$[44] = t10;
|
|
305
|
+
} else {
|
|
306
|
+
t10 = $[44];
|
|
307
|
+
}
|
|
308
|
+
let t11;
|
|
309
|
+
if ($[45] !== t10) {
|
|
310
|
+
t11 = /* @__PURE__ */ jsxDEV(TableCell, {
|
|
311
|
+
className: "text-xs text-muted-foreground tabular-nums",
|
|
312
|
+
children: t10
|
|
313
|
+
}, void 0, false);
|
|
314
|
+
$[45] = t10;
|
|
315
|
+
$[46] = t11;
|
|
316
|
+
} else {
|
|
317
|
+
t11 = $[46];
|
|
318
|
+
}
|
|
319
|
+
const t12 = `queues-replay-${message.id}`;
|
|
320
|
+
const t13 = replayingId !== null;
|
|
321
|
+
let t14;
|
|
322
|
+
if ($[47] !== message.id || $[48] !== replayingId || $[49] !== t) {
|
|
323
|
+
t14 = replayingId === message.id ? t("Replaying…") : t("Replay");
|
|
324
|
+
$[47] = message.id;
|
|
325
|
+
$[48] = replayingId;
|
|
326
|
+
$[49] = t;
|
|
327
|
+
$[50] = t14;
|
|
328
|
+
} else {
|
|
329
|
+
t14 = $[50];
|
|
330
|
+
}
|
|
331
|
+
let t15;
|
|
332
|
+
if ($[51] !== message.id || $[52] !== onReplay || $[53] !== t12 || $[54] !== t13 || $[55] !== t14) {
|
|
333
|
+
t15 = /* @__PURE__ */ jsxDEV(TableCell, {
|
|
334
|
+
children: /* @__PURE__ */ jsxDEV(Button, {
|
|
335
|
+
"data-id": message.id,
|
|
336
|
+
"data-testid": t12,
|
|
337
|
+
disabled: t13,
|
|
338
|
+
onClick: onReplay,
|
|
339
|
+
size: "xs",
|
|
340
|
+
type: "button",
|
|
341
|
+
variant: "outline",
|
|
342
|
+
children: t14
|
|
343
|
+
}, void 0, false)
|
|
344
|
+
}, void 0, false);
|
|
345
|
+
$[51] = message.id;
|
|
346
|
+
$[52] = onReplay;
|
|
347
|
+
$[53] = t12;
|
|
348
|
+
$[54] = t13;
|
|
349
|
+
$[55] = t14;
|
|
350
|
+
$[56] = t15;
|
|
351
|
+
} else {
|
|
352
|
+
t15 = $[56];
|
|
353
|
+
}
|
|
354
|
+
let t16;
|
|
355
|
+
if ($[57] !== T1 || $[58] !== t11 || $[59] !== t15 || $[60] !== t4 || $[61] !== t5 || $[62] !== t6 || $[63] !== t7 || $[64] !== t8 || $[65] !== t9) {
|
|
356
|
+
t16 = /* @__PURE__ */ jsxDEV(T1, {
|
|
357
|
+
"data-testid": t4,
|
|
358
|
+
children: [t5, t6, t7, t8, t9, t11, t15]
|
|
359
|
+
}, void 0, true);
|
|
360
|
+
$[57] = T1;
|
|
361
|
+
$[58] = t11;
|
|
362
|
+
$[59] = t15;
|
|
363
|
+
$[60] = t4;
|
|
364
|
+
$[61] = t5;
|
|
365
|
+
$[62] = t6;
|
|
366
|
+
$[63] = t7;
|
|
367
|
+
$[64] = t8;
|
|
368
|
+
$[65] = t9;
|
|
369
|
+
$[66] = t16;
|
|
370
|
+
} else {
|
|
371
|
+
t16 = $[66];
|
|
372
|
+
}
|
|
373
|
+
return t16;
|
|
374
|
+
};
|
|
375
|
+
const QueuesMessagesTab = (t0) => {
|
|
376
|
+
const $ = c(26);
|
|
377
|
+
const {
|
|
378
|
+
hasError,
|
|
379
|
+
messages,
|
|
380
|
+
onClear,
|
|
381
|
+
onReplay,
|
|
382
|
+
replayingId
|
|
383
|
+
} = t0;
|
|
384
|
+
const t = useT();
|
|
385
|
+
let t1;
|
|
386
|
+
if ($[0] !== t) {
|
|
387
|
+
t1 = t("Cloudflare Queues have no peek API, so this is what push consumers actually processed — not pending depth.");
|
|
388
|
+
$[0] = t;
|
|
389
|
+
$[1] = t1;
|
|
390
|
+
} else {
|
|
391
|
+
t1 = $[1];
|
|
392
|
+
}
|
|
393
|
+
let t2;
|
|
394
|
+
if ($[2] !== t1) {
|
|
395
|
+
t2 = /* @__PURE__ */ jsxDEV("p", {
|
|
396
|
+
className: "text-sm text-muted-foreground",
|
|
397
|
+
children: t1
|
|
398
|
+
}, void 0, false);
|
|
399
|
+
$[2] = t1;
|
|
400
|
+
$[3] = t2;
|
|
401
|
+
} else {
|
|
402
|
+
t2 = $[3];
|
|
403
|
+
}
|
|
404
|
+
const t3 = messages.length === 0;
|
|
405
|
+
let t4;
|
|
406
|
+
if ($[4] !== t) {
|
|
407
|
+
t4 = t("Clear log");
|
|
408
|
+
$[4] = t;
|
|
409
|
+
$[5] = t4;
|
|
410
|
+
} else {
|
|
411
|
+
t4 = $[5];
|
|
412
|
+
}
|
|
413
|
+
let t5;
|
|
414
|
+
if ($[6] !== onClear || $[7] !== t3 || $[8] !== t4) {
|
|
415
|
+
t5 = /* @__PURE__ */ jsxDEV(Button, {
|
|
416
|
+
className: "ml-auto",
|
|
417
|
+
"data-testid": "queues-clear",
|
|
418
|
+
disabled: t3,
|
|
419
|
+
onClick: onClear,
|
|
420
|
+
size: "sm",
|
|
421
|
+
type: "button",
|
|
422
|
+
variant: "outline",
|
|
423
|
+
children: t4
|
|
424
|
+
}, void 0, false);
|
|
425
|
+
$[6] = onClear;
|
|
426
|
+
$[7] = t3;
|
|
427
|
+
$[8] = t4;
|
|
428
|
+
$[9] = t5;
|
|
429
|
+
} else {
|
|
430
|
+
t5 = $[9];
|
|
431
|
+
}
|
|
432
|
+
let t6;
|
|
433
|
+
if ($[10] !== messages.length || $[11] !== t) {
|
|
434
|
+
t6 = messages.length > 0 && /* @__PURE__ */ jsxDEV(Badge, {
|
|
435
|
+
"data-testid": "queues-count",
|
|
436
|
+
variant: "secondary",
|
|
437
|
+
children: t("{count} messages", {
|
|
438
|
+
count: messages.length
|
|
439
|
+
})
|
|
440
|
+
}, void 0, false);
|
|
441
|
+
$[10] = messages.length;
|
|
442
|
+
$[11] = t;
|
|
443
|
+
$[12] = t6;
|
|
444
|
+
} else {
|
|
445
|
+
t6 = $[12];
|
|
446
|
+
}
|
|
447
|
+
let t7;
|
|
448
|
+
if ($[13] !== t2 || $[14] !== t5 || $[15] !== t6) {
|
|
449
|
+
t7 = /* @__PURE__ */ jsxDEV("div", {
|
|
450
|
+
className: "flex flex-wrap items-center gap-2",
|
|
451
|
+
children: [t2, t5, t6]
|
|
452
|
+
}, void 0, true);
|
|
453
|
+
$[13] = t2;
|
|
454
|
+
$[14] = t5;
|
|
455
|
+
$[15] = t6;
|
|
456
|
+
$[16] = t7;
|
|
457
|
+
} else {
|
|
458
|
+
t7 = $[16];
|
|
459
|
+
}
|
|
460
|
+
let t8;
|
|
461
|
+
if ($[17] !== hasError || $[18] !== messages || $[19] !== onReplay || $[20] !== replayingId || $[21] !== t) {
|
|
462
|
+
t8 = !hasError && messages.length === 0 ? /* @__PURE__ */ jsxDEV(EmptyState, {
|
|
463
|
+
description: t("Consumed messages appear here once a push consumer processes a batch in dev. Send one from the Send tab to see it captured."),
|
|
464
|
+
testId: "queues-messages-empty",
|
|
465
|
+
title: t("No consumed messages yet.")
|
|
466
|
+
}, void 0, false) : /* @__PURE__ */ jsxDEV(Card, {
|
|
467
|
+
className: "overflow-hidden py-0",
|
|
468
|
+
children: /* @__PURE__ */ jsxDEV(CardContent, {
|
|
469
|
+
className: "px-0",
|
|
470
|
+
children: /* @__PURE__ */ jsxDEV(ScrollArea, {
|
|
471
|
+
className: "max-h-[32rem]",
|
|
472
|
+
"data-testid": "queues-messages-scroll",
|
|
473
|
+
children: /* @__PURE__ */ jsxDEV(Table, {
|
|
474
|
+
"data-testid": "queues-messages-table",
|
|
475
|
+
children: [/* @__PURE__ */ jsxDEV(TableHeader, {
|
|
476
|
+
children: /* @__PURE__ */ jsxDEV(TableRow, {
|
|
477
|
+
children: [/* @__PURE__ */ jsxDEV(TableHead, {
|
|
478
|
+
children: t("Export")
|
|
479
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
480
|
+
children: t("Message")
|
|
481
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
482
|
+
children: t("Attempts")
|
|
483
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
484
|
+
children: t("Outcome")
|
|
485
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
486
|
+
children: t("Body")
|
|
487
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
488
|
+
children: t("Captured")
|
|
489
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {}, void 0, false)]
|
|
490
|
+
}, void 0, true)
|
|
491
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableBody, {
|
|
492
|
+
children: messages.map((message) => /* @__PURE__ */ jsxDEV(QueueLogRow, {
|
|
493
|
+
message,
|
|
494
|
+
onReplay,
|
|
495
|
+
replayingId
|
|
496
|
+
}, message.id, false))
|
|
497
|
+
}, void 0, false)]
|
|
498
|
+
}, void 0, true)
|
|
499
|
+
}, void 0, false)
|
|
500
|
+
}, void 0, false)
|
|
501
|
+
}, void 0, false);
|
|
502
|
+
$[17] = hasError;
|
|
503
|
+
$[18] = messages;
|
|
504
|
+
$[19] = onReplay;
|
|
505
|
+
$[20] = replayingId;
|
|
506
|
+
$[21] = t;
|
|
507
|
+
$[22] = t8;
|
|
508
|
+
} else {
|
|
509
|
+
t8 = $[22];
|
|
510
|
+
}
|
|
511
|
+
let t9;
|
|
512
|
+
if ($[23] !== t7 || $[24] !== t8) {
|
|
513
|
+
t9 = /* @__PURE__ */ jsxDEV("div", {
|
|
514
|
+
className: "flex flex-col gap-4",
|
|
515
|
+
"data-testid": "queues-messages",
|
|
516
|
+
children: [t7, t8]
|
|
517
|
+
}, void 0, true);
|
|
518
|
+
$[23] = t7;
|
|
519
|
+
$[24] = t8;
|
|
520
|
+
$[25] = t9;
|
|
521
|
+
} else {
|
|
522
|
+
t9 = $[25];
|
|
523
|
+
}
|
|
524
|
+
return t9;
|
|
525
|
+
};
|
|
526
|
+
const QueuesSendTab = (t0) => {
|
|
527
|
+
const $ = c(20);
|
|
528
|
+
const {
|
|
529
|
+
batchMode,
|
|
530
|
+
bodyText,
|
|
531
|
+
delayText,
|
|
532
|
+
onBatchModeChange,
|
|
533
|
+
onBodyChange,
|
|
534
|
+
onDelayChange,
|
|
535
|
+
onSelectExport,
|
|
536
|
+
onSend,
|
|
537
|
+
queues,
|
|
538
|
+
selectedExportName,
|
|
539
|
+
sending
|
|
540
|
+
} = t0;
|
|
541
|
+
const t = useT();
|
|
542
|
+
let t1;
|
|
543
|
+
if ($[0] !== t) {
|
|
544
|
+
t1 = t("Enqueue a JSON message to a declared producer to exercise its consumer. Nothing is captured until the consumer processes it.");
|
|
545
|
+
$[0] = t;
|
|
546
|
+
$[1] = t1;
|
|
547
|
+
} else {
|
|
548
|
+
t1 = $[1];
|
|
549
|
+
}
|
|
550
|
+
let t2;
|
|
551
|
+
if ($[2] !== t1) {
|
|
552
|
+
t2 = /* @__PURE__ */ jsxDEV("p", {
|
|
553
|
+
className: "text-sm text-muted-foreground",
|
|
554
|
+
children: t1
|
|
555
|
+
}, void 0, false);
|
|
556
|
+
$[2] = t1;
|
|
557
|
+
$[3] = t2;
|
|
558
|
+
} else {
|
|
559
|
+
t2 = $[3];
|
|
560
|
+
}
|
|
561
|
+
let t3;
|
|
562
|
+
if ($[4] !== batchMode || $[5] !== bodyText || $[6] !== delayText || $[7] !== onBatchModeChange || $[8] !== onBodyChange || $[9] !== onDelayChange || $[10] !== onSelectExport || $[11] !== onSend || $[12] !== queues || $[13] !== selectedExportName || $[14] !== sending || $[15] !== t) {
|
|
563
|
+
t3 = queues.length === 0 ? /* @__PURE__ */ jsxDEV(EmptyState, {
|
|
564
|
+
description: t("Declare a queue with defineQueue in lunora/queues.ts to enqueue a test message."),
|
|
565
|
+
testId: "queues-send-empty",
|
|
566
|
+
title: t("No queues to send to")
|
|
567
|
+
}, void 0, false) : /* @__PURE__ */ jsxDEV(Fragment, {
|
|
568
|
+
children: [/* @__PURE__ */ jsxDEV("div", {
|
|
569
|
+
className: "flex flex-wrap items-center gap-2",
|
|
570
|
+
children: [/* @__PURE__ */ jsxDEV("select", {
|
|
571
|
+
"aria-label": t("Queue"),
|
|
572
|
+
className: "h-8 rounded-md border border-input bg-transparent px-2.5 py-1 text-xs outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50",
|
|
573
|
+
"data-testid": "queues-send-select",
|
|
574
|
+
onChange: onSelectExport,
|
|
575
|
+
value: selectedExportName,
|
|
576
|
+
children: queues.map(_temp2)
|
|
577
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(Input, {
|
|
578
|
+
"aria-label": t("Delay (seconds)"),
|
|
579
|
+
className: "max-w-36",
|
|
580
|
+
"data-testid": "queues-send-delay",
|
|
581
|
+
min: 0,
|
|
582
|
+
onChange: onDelayChange,
|
|
583
|
+
placeholder: t("Delay (s)"),
|
|
584
|
+
type: "number",
|
|
585
|
+
value: delayText
|
|
586
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV("label", {
|
|
587
|
+
className: "flex items-center gap-1.5 text-xs text-muted-foreground",
|
|
588
|
+
htmlFor: "queues-send-batch",
|
|
589
|
+
children: [/* @__PURE__ */ jsxDEV("input", {
|
|
590
|
+
checked: batchMode,
|
|
591
|
+
"data-testid": "queues-send-batch",
|
|
592
|
+
id: "queues-send-batch",
|
|
593
|
+
onChange: onBatchModeChange,
|
|
594
|
+
type: "checkbox"
|
|
595
|
+
}, void 0, false), t("Send as batch (JSON array)")]
|
|
596
|
+
}, void 0, true), /* @__PURE__ */ jsxDEV(Button, {
|
|
597
|
+
className: "ml-auto",
|
|
598
|
+
"data-testid": "queues-send-button",
|
|
599
|
+
disabled: sending || selectedExportName === "",
|
|
600
|
+
onClick: onSend,
|
|
601
|
+
type: "button",
|
|
602
|
+
children: sending ? t("Sending…") : t("Send message")
|
|
603
|
+
}, void 0, false)]
|
|
604
|
+
}, void 0, true), /* @__PURE__ */ jsxDEV(Textarea, {
|
|
605
|
+
"aria-label": t("Message body (JSON)"),
|
|
606
|
+
className: "font-mono",
|
|
607
|
+
"data-testid": "queues-send-body",
|
|
608
|
+
onChange: onBodyChange,
|
|
609
|
+
placeholder: batchMode ? '[ { "hello": "world" } ]' : '{ "hello": "world" }',
|
|
610
|
+
value: bodyText
|
|
611
|
+
}, void 0, false)]
|
|
612
|
+
}, void 0, true);
|
|
613
|
+
$[4] = batchMode;
|
|
614
|
+
$[5] = bodyText;
|
|
615
|
+
$[6] = delayText;
|
|
616
|
+
$[7] = onBatchModeChange;
|
|
617
|
+
$[8] = onBodyChange;
|
|
618
|
+
$[9] = onDelayChange;
|
|
619
|
+
$[10] = onSelectExport;
|
|
620
|
+
$[11] = onSend;
|
|
621
|
+
$[12] = queues;
|
|
622
|
+
$[13] = selectedExportName;
|
|
623
|
+
$[14] = sending;
|
|
624
|
+
$[15] = t;
|
|
625
|
+
$[16] = t3;
|
|
626
|
+
} else {
|
|
627
|
+
t3 = $[16];
|
|
628
|
+
}
|
|
629
|
+
let t4;
|
|
630
|
+
if ($[17] !== t2 || $[18] !== t3) {
|
|
631
|
+
t4 = /* @__PURE__ */ jsxDEV("div", {
|
|
632
|
+
className: "flex flex-col gap-3",
|
|
633
|
+
"data-testid": "queues-send",
|
|
634
|
+
children: [t2, t3]
|
|
635
|
+
}, void 0, true);
|
|
636
|
+
$[17] = t2;
|
|
637
|
+
$[18] = t3;
|
|
638
|
+
$[19] = t4;
|
|
639
|
+
} else {
|
|
640
|
+
t4 = $[19];
|
|
641
|
+
}
|
|
642
|
+
return t4;
|
|
643
|
+
};
|
|
644
|
+
const QueuesPanel = (t0) => {
|
|
645
|
+
const $ = c(59);
|
|
646
|
+
const {
|
|
647
|
+
limit
|
|
648
|
+
} = t0;
|
|
649
|
+
const messageLimit = limit ?? DEFAULT_MESSAGE_LIMIT;
|
|
650
|
+
const client = useLunora();
|
|
651
|
+
const t = useT();
|
|
652
|
+
const [tab, setTab] = useState("declared");
|
|
653
|
+
const [actionError, setActionError] = useState(null);
|
|
654
|
+
let t1;
|
|
655
|
+
if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
656
|
+
t1 = {};
|
|
657
|
+
$[0] = t1;
|
|
658
|
+
} else {
|
|
659
|
+
t1 = $[0];
|
|
660
|
+
}
|
|
661
|
+
const {
|
|
662
|
+
data: queuesData,
|
|
663
|
+
error: queuesError,
|
|
664
|
+
errorSource: queuesErrorSource
|
|
665
|
+
} = useAdminQuery(ADMIN_FUNCTIONS.listQueues, t1);
|
|
666
|
+
let t2;
|
|
667
|
+
if ($[1] !== messageLimit) {
|
|
668
|
+
t2 = {
|
|
669
|
+
limit: messageLimit
|
|
670
|
+
};
|
|
671
|
+
$[1] = messageLimit;
|
|
672
|
+
$[2] = t2;
|
|
673
|
+
} else {
|
|
674
|
+
t2 = $[2];
|
|
675
|
+
}
|
|
676
|
+
const {
|
|
677
|
+
data: messagesData,
|
|
678
|
+
error: messagesError,
|
|
679
|
+
errorSource: messagesErrorSource,
|
|
680
|
+
refetch: refetchMessages
|
|
681
|
+
} = useAdminQuery(ADMIN_FUNCTIONS.getQueueMessages, t2);
|
|
682
|
+
const queues = Array.isArray(queuesData?.queues) ? [...queuesData.queues].toSorted(_temp3) : [];
|
|
683
|
+
const messages = messagesData?.entries ?? [];
|
|
684
|
+
const {
|
|
685
|
+
deadLetteredCount,
|
|
686
|
+
queuesWithoutDlq,
|
|
687
|
+
showReliabilityWarning
|
|
688
|
+
} = computeQueueReliability(queues, messages);
|
|
689
|
+
const [selectedExport, setSelectedExport] = useState("");
|
|
690
|
+
const [bodyText, setBodyText] = useState("");
|
|
691
|
+
const [delayText, setDelayText] = useState("");
|
|
692
|
+
const [batchMode, setBatchMode] = useState(false);
|
|
693
|
+
const [sending, setSending] = useState(false);
|
|
694
|
+
const [replayingId, setReplayingId] = useState(null);
|
|
695
|
+
const selectedExportName = queues.some((queue) => queue.exportName === selectedExport) ? selectedExport : queues[0]?.exportName ?? "";
|
|
696
|
+
const readError = tab === "messages" ? messagesError : queuesError;
|
|
697
|
+
const readErrorSource = tab === "messages" ? messagesErrorSource : queuesErrorSource;
|
|
698
|
+
const error = readError ?? actionError;
|
|
699
|
+
const errorSource = readError === null ? actionError : readErrorSource;
|
|
700
|
+
let t3;
|
|
701
|
+
if ($[3] !== refetchMessages) {
|
|
702
|
+
t3 = () => {
|
|
703
|
+
refetchMessages();
|
|
704
|
+
};
|
|
705
|
+
$[3] = refetchMessages;
|
|
706
|
+
$[4] = t3;
|
|
707
|
+
} else {
|
|
708
|
+
t3 = $[4];
|
|
709
|
+
}
|
|
710
|
+
useAutoRefresh(t3, tab === "messages");
|
|
711
|
+
const send = async () => {
|
|
712
|
+
setActionError(null);
|
|
713
|
+
const exportName = selectedExportName;
|
|
714
|
+
if (exportName === "") {
|
|
715
|
+
return;
|
|
716
|
+
}
|
|
717
|
+
let body = null;
|
|
718
|
+
const trimmedBody = bodyText.trim();
|
|
719
|
+
if (trimmedBody !== "") {
|
|
720
|
+
try {
|
|
721
|
+
body = JSON.parse(trimmedBody);
|
|
722
|
+
} catch {
|
|
723
|
+
setActionError(t("Body must be valid JSON."));
|
|
724
|
+
return;
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
let delaySeconds;
|
|
728
|
+
const trimmedDelay = delayText.trim();
|
|
729
|
+
if (trimmedDelay !== "") {
|
|
730
|
+
const parsed = Number(trimmedDelay);
|
|
731
|
+
if (!Number.isFinite(parsed) || parsed < 0) {
|
|
732
|
+
setActionError(t("Delay must be a non-negative number of seconds."));
|
|
733
|
+
return;
|
|
734
|
+
}
|
|
735
|
+
delaySeconds = parsed;
|
|
736
|
+
}
|
|
737
|
+
if (batchMode && !Array.isArray(body)) {
|
|
738
|
+
setActionError(t("Batch mode needs a JSON array body — each element is enqueued as one message."));
|
|
739
|
+
return;
|
|
740
|
+
}
|
|
741
|
+
setSending(true);
|
|
742
|
+
const args = batchMode ? {
|
|
743
|
+
batch: body,
|
|
744
|
+
delaySeconds,
|
|
745
|
+
exportName
|
|
746
|
+
} : {
|
|
747
|
+
body,
|
|
748
|
+
delaySeconds,
|
|
749
|
+
exportName
|
|
750
|
+
};
|
|
751
|
+
try {
|
|
752
|
+
await client.query(SEND_QUEUE_MESSAGE, args, callOptions(""));
|
|
753
|
+
refetchMessages();
|
|
754
|
+
} catch (t4) {
|
|
755
|
+
const error_ = t4;
|
|
756
|
+
setActionError(errorMessage(error_));
|
|
757
|
+
}
|
|
758
|
+
setSending(false);
|
|
759
|
+
};
|
|
760
|
+
let t5;
|
|
761
|
+
if ($[5] !== client || $[6] !== refetchMessages) {
|
|
762
|
+
t5 = async (id) => {
|
|
763
|
+
setActionError(null);
|
|
764
|
+
setReplayingId(id);
|
|
765
|
+
try {
|
|
766
|
+
await client.query(REPLAY_QUEUE_MESSAGE, {
|
|
767
|
+
id
|
|
768
|
+
}, callOptions(""));
|
|
769
|
+
refetchMessages();
|
|
770
|
+
} catch (t62) {
|
|
771
|
+
const error__0 = t62;
|
|
772
|
+
setActionError(errorMessage(error__0));
|
|
773
|
+
}
|
|
774
|
+
setReplayingId(null);
|
|
775
|
+
};
|
|
776
|
+
$[5] = client;
|
|
777
|
+
$[6] = refetchMessages;
|
|
778
|
+
$[7] = t5;
|
|
779
|
+
} else {
|
|
780
|
+
t5 = $[7];
|
|
781
|
+
}
|
|
782
|
+
const replay = t5;
|
|
783
|
+
let t6;
|
|
784
|
+
if ($[8] !== client || $[9] !== refetchMessages) {
|
|
785
|
+
t6 = async () => {
|
|
786
|
+
setActionError(null);
|
|
787
|
+
try {
|
|
788
|
+
await client.query(CLEAR_QUEUE_MESSAGES, {}, callOptions(""));
|
|
789
|
+
refetchMessages();
|
|
790
|
+
} catch (t72) {
|
|
791
|
+
const error__1 = t72;
|
|
792
|
+
setActionError(errorMessage(error__1));
|
|
793
|
+
}
|
|
794
|
+
};
|
|
795
|
+
$[8] = client;
|
|
796
|
+
$[9] = refetchMessages;
|
|
797
|
+
$[10] = t6;
|
|
798
|
+
} else {
|
|
799
|
+
t6 = $[10];
|
|
800
|
+
}
|
|
801
|
+
const clearLog = t6;
|
|
802
|
+
let t7;
|
|
803
|
+
if ($[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
804
|
+
t7 = (event) => {
|
|
805
|
+
const next = event.currentTarget.dataset.tab;
|
|
806
|
+
if (next === "declared" || next === "messages" || next === "send") {
|
|
807
|
+
setTab(next);
|
|
808
|
+
}
|
|
809
|
+
};
|
|
810
|
+
$[11] = t7;
|
|
811
|
+
} else {
|
|
812
|
+
t7 = $[11];
|
|
813
|
+
}
|
|
814
|
+
const onSelectTab = t7;
|
|
815
|
+
let t8;
|
|
816
|
+
if ($[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
817
|
+
t8 = (event_0) => {
|
|
818
|
+
setSelectedExport(event_0.currentTarget.value);
|
|
819
|
+
};
|
|
820
|
+
$[12] = t8;
|
|
821
|
+
} else {
|
|
822
|
+
t8 = $[12];
|
|
823
|
+
}
|
|
824
|
+
const onSelectExport = t8;
|
|
825
|
+
let t9;
|
|
826
|
+
if ($[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
827
|
+
t9 = (event_1) => {
|
|
828
|
+
setBodyText(event_1.currentTarget.value);
|
|
829
|
+
};
|
|
830
|
+
$[13] = t9;
|
|
831
|
+
} else {
|
|
832
|
+
t9 = $[13];
|
|
833
|
+
}
|
|
834
|
+
const onBodyChange = t9;
|
|
835
|
+
let t10;
|
|
836
|
+
if ($[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
837
|
+
t10 = (event_2) => {
|
|
838
|
+
setDelayText(event_2.currentTarget.value);
|
|
839
|
+
};
|
|
840
|
+
$[14] = t10;
|
|
841
|
+
} else {
|
|
842
|
+
t10 = $[14];
|
|
843
|
+
}
|
|
844
|
+
const onDelayChange = t10;
|
|
845
|
+
let t11;
|
|
846
|
+
if ($[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
847
|
+
t11 = (event_3) => {
|
|
848
|
+
setBatchMode(event_3.currentTarget.checked);
|
|
849
|
+
};
|
|
850
|
+
$[15] = t11;
|
|
851
|
+
} else {
|
|
852
|
+
t11 = $[15];
|
|
853
|
+
}
|
|
854
|
+
const onBatchModeChange = t11;
|
|
855
|
+
let t12;
|
|
856
|
+
if ($[16] !== send) {
|
|
857
|
+
t12 = () => {
|
|
858
|
+
fireAndForget(send());
|
|
859
|
+
};
|
|
860
|
+
$[16] = send;
|
|
861
|
+
$[17] = t12;
|
|
862
|
+
} else {
|
|
863
|
+
t12 = $[17];
|
|
864
|
+
}
|
|
865
|
+
const onSend = t12;
|
|
866
|
+
let t13;
|
|
867
|
+
if ($[18] !== replay) {
|
|
868
|
+
t13 = (event_4) => {
|
|
869
|
+
const {
|
|
870
|
+
id: id_0
|
|
871
|
+
} = event_4.currentTarget.dataset;
|
|
872
|
+
if (id_0 !== void 0) {
|
|
873
|
+
fireAndForget(replay(id_0));
|
|
874
|
+
}
|
|
875
|
+
};
|
|
876
|
+
$[18] = replay;
|
|
877
|
+
$[19] = t13;
|
|
878
|
+
} else {
|
|
879
|
+
t13 = $[19];
|
|
880
|
+
}
|
|
881
|
+
const onReplay = t13;
|
|
882
|
+
let t14;
|
|
883
|
+
if ($[20] !== clearLog) {
|
|
884
|
+
t14 = () => {
|
|
885
|
+
fireAndForget(clearLog());
|
|
886
|
+
};
|
|
887
|
+
$[20] = clearLog;
|
|
888
|
+
$[21] = t14;
|
|
889
|
+
} else {
|
|
890
|
+
t14 = $[21];
|
|
891
|
+
}
|
|
892
|
+
const onClear = t14;
|
|
893
|
+
const t15 = "flex flex-col gap-6";
|
|
894
|
+
const t16 = "lunora-queues-panel";
|
|
895
|
+
let t17;
|
|
896
|
+
if ($[22] !== t || $[23] !== tab) {
|
|
897
|
+
t17 = /* @__PURE__ */ jsxDEV("div", {
|
|
898
|
+
className: "flex items-center gap-1",
|
|
899
|
+
"data-testid": "queues-tabs",
|
|
900
|
+
role: "tablist",
|
|
901
|
+
children: ["declared", "messages", "send"].map((value) => /* @__PURE__ */ jsxDEV(Button, {
|
|
902
|
+
"aria-selected": tab === value,
|
|
903
|
+
"data-tab": value,
|
|
904
|
+
"data-testid": `queues-tab-${value}`,
|
|
905
|
+
onClick: onSelectTab,
|
|
906
|
+
role: "tab",
|
|
907
|
+
size: "sm",
|
|
908
|
+
type: "button",
|
|
909
|
+
variant: tab === value ? "secondary" : "ghost",
|
|
910
|
+
children: tabLabel(value, t)
|
|
911
|
+
}, value, false))
|
|
912
|
+
}, void 0, false);
|
|
913
|
+
$[22] = t;
|
|
914
|
+
$[23] = tab;
|
|
915
|
+
$[24] = t17;
|
|
916
|
+
} else {
|
|
917
|
+
t17 = $[24];
|
|
918
|
+
}
|
|
919
|
+
let t18;
|
|
920
|
+
if ($[25] !== error || $[26] !== errorSource) {
|
|
921
|
+
t18 = error !== null && /* @__PURE__ */ jsxDEV(ErrorAlert, {
|
|
922
|
+
error: errorSource,
|
|
923
|
+
testId: "queues-error"
|
|
924
|
+
}, void 0, false);
|
|
925
|
+
$[25] = error;
|
|
926
|
+
$[26] = errorSource;
|
|
927
|
+
$[27] = t18;
|
|
928
|
+
} else {
|
|
929
|
+
t18 = $[27];
|
|
930
|
+
}
|
|
931
|
+
const t19 = showReliabilityWarning && /* @__PURE__ */ jsxDEV(Alert, {
|
|
932
|
+
icon: /* @__PURE__ */ jsxDEV("span", {
|
|
933
|
+
"aria-hidden": "true",
|
|
934
|
+
className: "text-base leading-none",
|
|
935
|
+
children: "⚠"
|
|
936
|
+
}, void 0, false),
|
|
937
|
+
testId: "queues-dlq-warning",
|
|
938
|
+
variant: "warning",
|
|
939
|
+
children: /* @__PURE__ */ jsxDEV("div", {
|
|
940
|
+
className: "flex flex-col gap-1",
|
|
941
|
+
children: [queuesWithoutDlq.length > 0 && /* @__PURE__ */ jsxDEV(Fragment, {
|
|
942
|
+
children: [/* @__PURE__ */ jsxDEV("p", {
|
|
943
|
+
className: "font-medium",
|
|
944
|
+
children: t("No dead-letter queue on {queues}.", {
|
|
945
|
+
queues: queuesWithoutDlq.map(_temp4).join(", ")
|
|
946
|
+
})
|
|
947
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV("p", {
|
|
948
|
+
className: "text-muted-foreground",
|
|
949
|
+
children: t("Exhausted messages are dropped after retries. Add a deadLetterQueue to capture them.")
|
|
950
|
+
}, void 0, false)]
|
|
951
|
+
}, void 0, true), deadLetteredCount > 0 && /* @__PURE__ */ jsxDEV("p", {
|
|
952
|
+
className: queuesWithoutDlq.length > 0 ? "text-muted-foreground" : "font-medium",
|
|
953
|
+
children: deadLetteredCount === 1 ? t("1 message was recently dead-lettered.") : t("{count} messages were recently dead-lettered.", {
|
|
954
|
+
count: deadLetteredCount
|
|
955
|
+
})
|
|
956
|
+
}, void 0, false)]
|
|
957
|
+
}, void 0, true)
|
|
958
|
+
}, void 0, false);
|
|
959
|
+
let t20;
|
|
960
|
+
if ($[28] !== queues || $[29] !== queuesData || $[30] !== tab) {
|
|
961
|
+
t20 = tab === "declared" && /* @__PURE__ */ jsxDEV(QueuesDeclaredTab, {
|
|
962
|
+
loaded: queuesData !== void 0,
|
|
963
|
+
queues
|
|
964
|
+
}, void 0, false);
|
|
965
|
+
$[28] = queues;
|
|
966
|
+
$[29] = queuesData;
|
|
967
|
+
$[30] = tab;
|
|
968
|
+
$[31] = t20;
|
|
969
|
+
} else {
|
|
970
|
+
t20 = $[31];
|
|
971
|
+
}
|
|
972
|
+
let t21;
|
|
973
|
+
if ($[32] !== messages || $[33] !== messagesError || $[34] !== onClear || $[35] !== onReplay || $[36] !== replayingId || $[37] !== tab) {
|
|
974
|
+
t21 = tab === "messages" && /* @__PURE__ */ jsxDEV(QueuesMessagesTab, {
|
|
975
|
+
hasError: messagesError !== null,
|
|
976
|
+
messages,
|
|
977
|
+
onClear,
|
|
978
|
+
onReplay,
|
|
979
|
+
replayingId
|
|
980
|
+
}, void 0, false);
|
|
981
|
+
$[32] = messages;
|
|
982
|
+
$[33] = messagesError;
|
|
983
|
+
$[34] = onClear;
|
|
984
|
+
$[35] = onReplay;
|
|
985
|
+
$[36] = replayingId;
|
|
986
|
+
$[37] = tab;
|
|
987
|
+
$[38] = t21;
|
|
988
|
+
} else {
|
|
989
|
+
t21 = $[38];
|
|
990
|
+
}
|
|
991
|
+
let t22;
|
|
992
|
+
if ($[39] !== batchMode || $[40] !== bodyText || $[41] !== delayText || $[42] !== onBatchModeChange || $[43] !== onBodyChange || $[44] !== onDelayChange || $[45] !== onSelectExport || $[46] !== onSend || $[47] !== queues || $[48] !== selectedExportName || $[49] !== sending || $[50] !== tab) {
|
|
993
|
+
t22 = tab === "send" && /* @__PURE__ */ jsxDEV(QueuesSendTab, {
|
|
994
|
+
batchMode,
|
|
995
|
+
bodyText,
|
|
996
|
+
delayText,
|
|
997
|
+
onBatchModeChange,
|
|
998
|
+
onBodyChange,
|
|
999
|
+
onDelayChange,
|
|
1000
|
+
onSelectExport,
|
|
1001
|
+
onSend,
|
|
1002
|
+
queues,
|
|
1003
|
+
selectedExportName,
|
|
1004
|
+
sending
|
|
1005
|
+
}, void 0, false);
|
|
1006
|
+
$[39] = batchMode;
|
|
1007
|
+
$[40] = bodyText;
|
|
1008
|
+
$[41] = delayText;
|
|
1009
|
+
$[42] = onBatchModeChange;
|
|
1010
|
+
$[43] = onBodyChange;
|
|
1011
|
+
$[44] = onDelayChange;
|
|
1012
|
+
$[45] = onSelectExport;
|
|
1013
|
+
$[46] = onSend;
|
|
1014
|
+
$[47] = queues;
|
|
1015
|
+
$[48] = selectedExportName;
|
|
1016
|
+
$[49] = sending;
|
|
1017
|
+
$[50] = tab;
|
|
1018
|
+
$[51] = t22;
|
|
1019
|
+
} else {
|
|
1020
|
+
t22 = $[51];
|
|
1021
|
+
}
|
|
1022
|
+
let t23;
|
|
1023
|
+
if ($[52] !== t17 || $[53] !== t18 || $[54] !== t19 || $[55] !== t20 || $[56] !== t21 || $[57] !== t22) {
|
|
1024
|
+
t23 = /* @__PURE__ */ jsxDEV("div", {
|
|
1025
|
+
className: t15,
|
|
1026
|
+
"data-testid": t16,
|
|
1027
|
+
children: [t17, t18, t19, t20, t21, t22]
|
|
1028
|
+
}, void 0, true);
|
|
1029
|
+
$[52] = t17;
|
|
1030
|
+
$[53] = t18;
|
|
1031
|
+
$[54] = t19;
|
|
1032
|
+
$[55] = t20;
|
|
1033
|
+
$[56] = t21;
|
|
1034
|
+
$[57] = t22;
|
|
1035
|
+
$[58] = t23;
|
|
1036
|
+
} else {
|
|
1037
|
+
t23 = $[58];
|
|
1038
|
+
}
|
|
1039
|
+
return t23;
|
|
1040
|
+
};
|
|
1041
|
+
function _temp(queue) {
|
|
1042
|
+
return /* @__PURE__ */ jsxDEV(TableRow, {
|
|
1043
|
+
"data-testid": `queues-row-${queue.exportName}`,
|
|
1044
|
+
children: [/* @__PURE__ */ jsxDEV(TableCell, {
|
|
1045
|
+
className: "font-mono text-xs",
|
|
1046
|
+
children: queue.exportName
|
|
1047
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
1048
|
+
className: "font-mono text-xs text-muted-foreground",
|
|
1049
|
+
children: queue.name
|
|
1050
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
1051
|
+
className: "font-mono text-xs text-muted-foreground",
|
|
1052
|
+
children: queue.mode
|
|
1053
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
1054
|
+
className: "font-mono text-xs text-muted-foreground",
|
|
1055
|
+
children: queue.binding
|
|
1056
|
+
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
1057
|
+
className: "font-mono text-xs text-muted-foreground",
|
|
1058
|
+
children: queue.deadLetterQueue ?? "—"
|
|
1059
|
+
}, void 0, false)]
|
|
1060
|
+
}, queue.exportName, true);
|
|
1061
|
+
}
|
|
1062
|
+
function _temp2(queue) {
|
|
1063
|
+
return /* @__PURE__ */ jsxDEV("option", {
|
|
1064
|
+
value: queue.exportName,
|
|
1065
|
+
children: queue.exportName
|
|
1066
|
+
}, queue.exportName, false);
|
|
1067
|
+
}
|
|
1068
|
+
function _temp3(a, b) {
|
|
1069
|
+
return a.exportName.localeCompare(b.exportName);
|
|
1070
|
+
}
|
|
1071
|
+
function _temp4(queue_0) {
|
|
1072
|
+
return queue_0.name;
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
export { QueuesPanel as default };
|