adonisjs-server-stats 1.10.3 → 1.11.1

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 (89) hide show
  1. package/dist/core/field-resolvers.d.ts +64 -0
  2. package/dist/core/formatters.d.ts +15 -0
  3. package/dist/core/index.d.ts +1 -1
  4. package/dist/core/index.js +208 -203
  5. package/dist/react/CacheSection-BYN53kYO.js +135 -0
  6. package/dist/react/CacheStatsBar-CRodCOeP.js +27 -0
  7. package/dist/react/CacheTab-DOhuK05d.js +106 -0
  8. package/dist/react/{ConfigSection-DGgqjAal.js → ConfigSection-B9EHh4Rp.js} +1 -1
  9. package/dist/react/{ConfigTab-H3OnYqmK.js → ConfigTab-C8kriE2b.js} +1 -1
  10. package/dist/react/CustomPaneTab-CvzQS_Wh.js +99 -0
  11. package/dist/react/EmailPreviewOverlay-BmXOAvqG.js +58 -0
  12. package/dist/react/EmailsSection-BJyFJf7A.js +226 -0
  13. package/dist/react/EmailsTab-Ch8jp10B.js +110 -0
  14. package/dist/react/{EventsSection-C7RQW_LY.js → EventsSection-DJPwHeT8.js} +27 -26
  15. package/dist/react/EventsTab-B-FoehXC.js +58 -0
  16. package/dist/react/{InternalsContent-DBzsI0CG.js → InternalsContent-O8ino9oM.js} +133 -109
  17. package/dist/react/InternalsSection-B6VlVx5f.js +22 -0
  18. package/dist/react/InternalsTab-CkEKpRMU.js +17 -0
  19. package/dist/react/JobStatsBar-C7RslAFE.js +30 -0
  20. package/dist/react/JobsSection-DWF4i1t_.js +167 -0
  21. package/dist/react/JobsTab-DqnifQXV.js +129 -0
  22. package/dist/react/LogEntryRow-CMMkqA9M.js +43 -0
  23. package/dist/react/LogsSection-C1xC5aP4.js +198 -0
  24. package/dist/react/LogsTab-CS4sLfLw.js +79 -0
  25. package/dist/react/{OverviewSection-ABP9ueBo.js → OverviewSection-CxvfOR0v.js} +70 -80
  26. package/dist/react/QueriesSection-CrMdU5Ax.js +458 -0
  27. package/dist/react/{QueriesTab-BQzcxEiW.js → QueriesTab-x85PjkyS.js} +22 -21
  28. package/dist/react/RequestsSection-DETN9oZb.js +321 -0
  29. package/dist/react/{RoutesSection-BRhxrtjZ.js → RoutesSection-CmorkJeC.js} +1 -1
  30. package/dist/react/{RoutesTab-CpYH5lUw.js → RoutesTab-CbzBOzpc.js} +12 -12
  31. package/dist/react/SplitPaneWrapper-BiIgT4ND.js +49 -0
  32. package/dist/react/TimeAgoCell-o3KigGfM.js +8 -0
  33. package/dist/react/{TimelineTab-DjLR35Ce.js → TimelineTab-Ue9tUD_n.js} +71 -91
  34. package/dist/react/{index-CsImORX6.js → index-DwDK-4oX.js} +4 -4
  35. package/dist/react/index.js +6 -6
  36. package/dist/react/react/components/shared/CacheStatsBar.d.ts +13 -0
  37. package/dist/react/react/components/shared/EmailPreviewOverlay.d.ts +29 -0
  38. package/dist/react/react/components/shared/JobStatsBar.d.ts +12 -0
  39. package/dist/react/react/components/shared/LogEntryRow.d.ts +9 -0
  40. package/dist/react/react/components/shared/RelatedLogs.d.ts +2 -2
  41. package/dist/react/react/components/shared/SplitPaneWrapper.d.ts +7 -0
  42. package/dist/react/react/components/shared/TimeAgoCell.d.ts +17 -0
  43. package/dist/react/react/hooks/useDiagnosticsData.d.ts +14 -0
  44. package/dist/react/style.css +1 -1
  45. package/dist/src/edge/client/dashboard.js +2 -2
  46. package/dist/src/edge/client/debug-panel-deferred.js +1 -1
  47. package/dist/src/edge/client-vue/dashboard.js +3 -3
  48. package/dist/src/edge/client-vue/debug-panel-deferred.js +4 -4
  49. package/dist/src/styles/components.css +67 -0
  50. package/dist/src/styles/dashboard.css +5 -15
  51. package/dist/src/styles/debug-panel.css +1 -22
  52. package/dist/src/styles/utilities.css +3 -1
  53. package/dist/vue/{CacheSection-ITqvpfH5.js → CacheSection-DT2Mwf_s.js} +1 -1
  54. package/dist/vue/{ConfigSection-DTn3GslE.js → ConfigSection-BwKwS9lh.js} +1 -1
  55. package/dist/vue/CustomPaneTab-Hr1IBHfz.js +172 -0
  56. package/dist/vue/{EmailsSection-DtLJ4XoS.js → EmailsSection-B65g0FVS.js} +1 -1
  57. package/dist/vue/{EventsSection-BOYYz0Ty.js → EventsSection-CxqtVF-o.js} +1 -1
  58. package/dist/vue/{JobsSection-BazTxcJL.js → JobsSection-rMIyMb-g.js} +1 -1
  59. package/dist/vue/{LogsSection-D55PjTKX.js → LogsSection-DmmZVJ7D.js} +1 -1
  60. package/dist/vue/{OverviewSection-1uBKo-Tu.js → OverviewSection-BMabyqw-.js} +49 -50
  61. package/dist/vue/{QueriesSection-rpoZ4ogd.js → QueriesSection-BfDFwGqH.js} +44 -45
  62. package/dist/vue/{QueriesTab-C8_7oprC.js → QueriesTab-DuTG7cpC.js} +30 -31
  63. package/dist/vue/RelatedLogs.vue_vue_type_script_setup_true_lang-Py1iu9GU.js +77 -0
  64. package/dist/vue/{RequestsSection-x7LvT0MC.js → RequestsSection-CTu4jPZ_.js} +143 -147
  65. package/dist/vue/{RoutesSection-CCD0zZqQ.js → RoutesSection-zQZDedL7.js} +1 -1
  66. package/dist/vue/TimelineTab-DHfXsX7t.js +334 -0
  67. package/dist/vue/components/shared/RelatedLogs.vue.d.ts +1 -4
  68. package/dist/vue/{index-C8MxnS7Q.js → index-CM3yNVUR.js} +2 -2
  69. package/dist/vue/index.js +1 -1
  70. package/dist/vue/style.css +1 -1
  71. package/package.json +7 -7
  72. package/dist/react/CacheSection-baMZotSn.js +0 -146
  73. package/dist/react/CacheTab-2cw_rMzj.js +0 -117
  74. package/dist/react/CustomPaneTab-B6r7ha0u.js +0 -98
  75. package/dist/react/EmailsSection-C-UZISG-.js +0 -262
  76. package/dist/react/EmailsTab-DbK4Eobn.js +0 -139
  77. package/dist/react/EventsTab-CfVr7AiM.js +0 -57
  78. package/dist/react/InternalsSection-t7ihcWO-.js +0 -32
  79. package/dist/react/InternalsTab-Oij0A2fN.js +0 -30
  80. package/dist/react/JobsSection-CQHNK_Ls.js +0 -187
  81. package/dist/react/JobsTab-znzf6jzk.js +0 -153
  82. package/dist/react/LogsSection-Dmm3rE2B.js +0 -233
  83. package/dist/react/LogsTab-D8unMV5P.js +0 -108
  84. package/dist/react/QueriesSection-CnmSkznA.js +0 -461
  85. package/dist/react/RelatedLogs-3A8RuGKH.js +0 -52
  86. package/dist/react/RequestsSection-kW79_M7k.js +0 -341
  87. package/dist/vue/CustomPaneTab-BJxT5Dp7.js +0 -172
  88. package/dist/vue/RelatedLogs.vue_vue_type_script_setup_true_lang-CB2_TzYW.js +0 -84
  89. package/dist/vue/TimelineTab-zj5Z5OdT.js +0 -338
@@ -0,0 +1,321 @@
1
+ import { jsx as s, jsxs as r, Fragment as B } from "react/jsx-runtime";
2
+ import { useMemo as $, useState as g, useEffect as E, useCallback as L } from "react";
3
+ import { normalizeTraceFields as P, resolveStatusCode as j, resolveDuration as W, durationClassName as z, resolveSpanCount as G, resolveWarningCount as I, resolveTimestamp as U } from "adonisjs-server-stats/core";
4
+ import { T as Y } from "./TimeAgoCell-o3KigGfM.js";
5
+ import { u as K } from "./useApiClient-BVtNCmnL.js";
6
+ import { a as V, M as D, S as R } from "./index-DwDK-4oX.js";
7
+ import { S as H, R as J } from "./SplitPaneWrapper-BiIgT4ND.js";
8
+ import { D as Q } from "./DataTable-YyShr5B-.js";
9
+ import { F as X } from "./FilterBar-CQ7bD669.js";
10
+ import { P as Z } from "./Pagination-BkmzUDY8.js";
11
+ const F = {
12
+ request: "#1e3a5f",
13
+ middleware: "rgba(30, 58, 95, 0.7)",
14
+ db: "#6d28d9",
15
+ view: "#0e7490",
16
+ mail: "#059669",
17
+ event: "#b45309",
18
+ custom: "var(--ss-dim)"
19
+ }, ee = {
20
+ request: "Request",
21
+ middleware: "Middleware",
22
+ db: "DB",
23
+ mail: "Mail",
24
+ event: "Event",
25
+ view: "View",
26
+ custom: "Custom"
27
+ };
28
+ function T({
29
+ spans: c,
30
+ totalDuration: h,
31
+ className: v = "",
32
+ warnings: n
33
+ }) {
34
+ const p = c || [], o = $(
35
+ () => [...p].sort((e, l) => e.startOffset - l.startOffset),
36
+ [p]
37
+ ), x = $(() => {
38
+ const e = {};
39
+ for (const l of o)
40
+ e[l.id] = l.parentId ? (e[l.parentId] || 0) + 1 : 0;
41
+ return e;
42
+ }, [o]);
43
+ return p.length === 0 ? /* @__PURE__ */ s("div", { className: "ss-dash-empty", children: "No spans recorded" }) : /* @__PURE__ */ r("div", { className: `ss-dash-tl-waterfall ${v}`, children: [
44
+ /* @__PURE__ */ s("div", { className: "ss-dash-tl-legend", children: Object.entries(ee).map(([e, l]) => /* @__PURE__ */ r("div", { className: "ss-dash-tl-legend-item", children: [
45
+ /* @__PURE__ */ s(
46
+ "span",
47
+ {
48
+ className: "ss-dash-tl-legend-dot",
49
+ style: {
50
+ background: F[e] || F.custom
51
+ }
52
+ }
53
+ ),
54
+ /* @__PURE__ */ s("span", { children: l })
55
+ ] }, e)) }),
56
+ o.map((e) => {
57
+ const l = h > 0 ? e.startOffset / h * 100 : 0, f = h > 0 ? Math.max(e.duration / h * 100, 0.5) : 1, b = x[e.id] || 0, C = e.label.length > 50 ? e.label.slice(0, 50) + "..." : e.label, m = e.category === "db" ? "DB" : e.category, y = e.category === "db" ? "purple" : e.category === "mail" ? "green" : e.category === "event" ? "amber" : e.category === "view" ? "blue" : "muted", i = e.metadata ? Object.entries(e.metadata).filter(([, u]) => u != null).map(([u, N]) => `${u}=${N}`).join(", ") : "", w = i ? `${e.label} (${e.duration.toFixed(2)}ms)
58
+ ${i}` : `${e.label} (${e.duration.toFixed(2)}ms)`;
59
+ return /* @__PURE__ */ r("div", { className: "ss-dash-tl-row", children: [
60
+ /* @__PURE__ */ r(
61
+ "div",
62
+ {
63
+ className: "ss-dash-tl-label",
64
+ title: w,
65
+ style: { paddingLeft: 8 + b * 16 + "px" },
66
+ children: [
67
+ /* @__PURE__ */ s(
68
+ "span",
69
+ {
70
+ className: `ss-dash-badge ss-dash-badge-${y}`,
71
+ style: { fontSize: "9px", marginRight: "4px" },
72
+ children: m
73
+ }
74
+ ),
75
+ C
76
+ ]
77
+ }
78
+ ),
79
+ /* @__PURE__ */ s("div", { className: "ss-dash-tl-track", children: /* @__PURE__ */ s(
80
+ "div",
81
+ {
82
+ className: `ss-dash-tl-bar ss-dash-tl-bar-${e.category || "custom"}`,
83
+ style: {
84
+ left: `${l}%`,
85
+ width: `${f}%`
86
+ },
87
+ title: w
88
+ }
89
+ ) }),
90
+ /* @__PURE__ */ r("span", { className: "ss-dash-tl-dur", children: [
91
+ e.duration.toFixed(2),
92
+ "ms"
93
+ ] })
94
+ ] }, e.id);
95
+ }),
96
+ n && n.length > 0 && /* @__PURE__ */ r("div", { className: "ss-dash-tl-warnings", children: [
97
+ /* @__PURE__ */ r("div", { className: "ss-dash-tl-warnings-title", children: [
98
+ "Warnings (",
99
+ n.length,
100
+ ")"
101
+ ] }),
102
+ n.map((e, l) => /* @__PURE__ */ s("div", { className: "ss-dash-tl-warning", children: e }, l))
103
+ ] })
104
+ ] });
105
+ }
106
+ function he({ options: c = {} }) {
107
+ const [h, v] = g(1), [n, p] = g(""), [o, x] = g("createdAt"), [e, l] = g("desc"), [f, b] = g(null), [C, m] = g(!1);
108
+ E(() => v(1), [n]);
109
+ const { data: y, meta: i, isLoading: w, error: u } = V("requests", {
110
+ ...c,
111
+ page: h,
112
+ search: n,
113
+ sort: o,
114
+ sortDir: e
115
+ }), N = K(c.baseUrl || "", c.authToken), A = L(
116
+ (t) => {
117
+ const a = t.id;
118
+ m(!0);
119
+ const d = c.dashboardEndpoint || "/__stats/api";
120
+ N().fetch(`${d}/requests/${a}`).then((k) => {
121
+ const S = k, q = S.trace;
122
+ if (q) {
123
+ const _ = { ...S, ...q, logs: S.logs };
124
+ b(_);
125
+ } else
126
+ b(k);
127
+ m(!1);
128
+ }).catch(() => {
129
+ m(!1);
130
+ });
131
+ },
132
+ [N, c.dashboardEndpoint]
133
+ ), O = L(
134
+ (t) => {
135
+ o === t ? l((a) => a === "asc" ? "desc" : "asc") : (x(t), l("desc"));
136
+ },
137
+ [o]
138
+ ), M = y || [];
139
+ if (f) {
140
+ const t = P(f), a = t.logs.length > 0;
141
+ return /* @__PURE__ */ r("div", { children: [
142
+ /* @__PURE__ */ r("div", { className: "ss-dash-tl-detail-header", children: [
143
+ /* @__PURE__ */ s("button", { type: "button", className: "ss-dash-btn", onClick: () => b(null), children: "← Back to Requests" }),
144
+ /* @__PURE__ */ s(D, { method: t.method }),
145
+ /* @__PURE__ */ s("span", { style: { color: "var(--ss-text)" }, children: t.url }),
146
+ /* @__PURE__ */ s(R, { code: t.statusCode }),
147
+ /* @__PURE__ */ r("span", { className: "ss-dash-tl-meta", children: [
148
+ t.totalDuration.toFixed(1),
149
+ "ms · ",
150
+ t.spanCount,
151
+ " spans"
152
+ ] })
153
+ ] }),
154
+ a ? /* @__PURE__ */ r(H, { storageKey: "ss-requests-split", children: [
155
+ /* @__PURE__ */ s(
156
+ T,
157
+ {
158
+ spans: t.spans,
159
+ totalDuration: t.totalDuration,
160
+ warnings: t.warnings
161
+ }
162
+ ),
163
+ /* @__PURE__ */ s(J, { logs: t.logs })
164
+ ] }) : /* @__PURE__ */ s(
165
+ T,
166
+ {
167
+ spans: t.spans,
168
+ totalDuration: t.totalDuration,
169
+ warnings: t.warnings
170
+ }
171
+ )
172
+ ] });
173
+ }
174
+ return C ? /* @__PURE__ */ r("div", { children: [
175
+ /* @__PURE__ */ s("div", { className: "ss-dash-tl-detail-header", children: /* @__PURE__ */ s("button", { type: "button", className: "ss-dash-btn", onClick: () => m(!1), children: "← Back to Requests" }) }),
176
+ /* @__PURE__ */ s("div", { className: "ss-dash-empty", children: "Loading request detail..." })
177
+ ] }) : /* @__PURE__ */ r("div", { children: [
178
+ /* @__PURE__ */ s(
179
+ X,
180
+ {
181
+ search: n,
182
+ onSearchChange: p,
183
+ placeholder: "Filter requests...",
184
+ summary: `${i?.total ?? 0} requests`
185
+ }
186
+ ),
187
+ u && /* @__PURE__ */ s("div", { className: "ss-dash-empty", children: "Failed to load requests" }),
188
+ w && !y ? /* @__PURE__ */ s("div", { className: "ss-dash-empty", children: "Loading requests..." }) : /* @__PURE__ */ r(B, { children: [
189
+ /* @__PURE__ */ s("div", { className: "ss-dash-table-wrap", children: /* @__PURE__ */ s(
190
+ Q,
191
+ {
192
+ columns: [
193
+ {
194
+ key: "id",
195
+ label: "#",
196
+ width: "40px",
197
+ render: (t) => /* @__PURE__ */ s("span", { style: { color: "var(--ss-dim)" }, children: t })
198
+ },
199
+ {
200
+ key: "method",
201
+ label: "Method",
202
+ width: "70px",
203
+ sortable: !0,
204
+ render: (t) => /* @__PURE__ */ s(D, { method: t })
205
+ },
206
+ {
207
+ key: "url",
208
+ label: "URL",
209
+ sortable: !0,
210
+ render: (t) => /* @__PURE__ */ s(
211
+ "span",
212
+ {
213
+ style: {
214
+ color: "var(--ss-text)",
215
+ overflow: "hidden",
216
+ textOverflow: "ellipsis",
217
+ whiteSpace: "nowrap"
218
+ },
219
+ title: t,
220
+ children: t
221
+ }
222
+ )
223
+ },
224
+ {
225
+ key: "statusCode",
226
+ label: "Status",
227
+ width: "60px",
228
+ sortable: !0,
229
+ render: (t, a) => {
230
+ const d = j(a);
231
+ return /* @__PURE__ */ s(R, { code: d });
232
+ }
233
+ },
234
+ {
235
+ key: "duration",
236
+ label: "Duration",
237
+ width: "80px",
238
+ sortable: !0,
239
+ render: (t, a) => {
240
+ const d = W(a);
241
+ return /* @__PURE__ */ r(
242
+ "span",
243
+ {
244
+ className: `ss-dash-duration ${z(d)}`,
245
+ children: [
246
+ d.toFixed(1),
247
+ "ms"
248
+ ]
249
+ }
250
+ );
251
+ }
252
+ },
253
+ {
254
+ key: "spanCount",
255
+ label: "Spans",
256
+ width: "50px",
257
+ render: (t, a) => {
258
+ const d = G(a);
259
+ return /* @__PURE__ */ s("span", { style: { color: "var(--ss-muted)", textAlign: "center" }, children: d });
260
+ }
261
+ },
262
+ {
263
+ key: "warningCount",
264
+ label: "⚠",
265
+ width: "40px",
266
+ render: (t, a) => {
267
+ const d = I(a);
268
+ return d > 0 ? /* @__PURE__ */ s(
269
+ "span",
270
+ {
271
+ style: {
272
+ color: "var(--ss-amber-fg)",
273
+ textAlign: "center",
274
+ display: "block"
275
+ },
276
+ children: d
277
+ }
278
+ ) : /* @__PURE__ */ s(
279
+ "span",
280
+ {
281
+ style: { color: "var(--ss-dim)", textAlign: "center", display: "block" },
282
+ children: "-"
283
+ }
284
+ );
285
+ }
286
+ },
287
+ {
288
+ key: "createdAt",
289
+ label: "Time",
290
+ width: "80px",
291
+ sortable: !0,
292
+ render: (t, a) => {
293
+ const d = U(a) ?? "";
294
+ return /* @__PURE__ */ s(Y, { ts: d, className: "ss-dash-event-time" });
295
+ }
296
+ }
297
+ ],
298
+ data: M,
299
+ sort: o,
300
+ sortDir: e,
301
+ onSort: O,
302
+ onRowClick: A,
303
+ emptyMessage: "No requests recorded yet"
304
+ }
305
+ ) }),
306
+ i && /* @__PURE__ */ s(
307
+ Z,
308
+ {
309
+ page: i.page,
310
+ lastPage: i.lastPage,
311
+ total: i.total,
312
+ onPageChange: v
313
+ }
314
+ )
315
+ ] })
316
+ ] });
317
+ }
318
+ export {
319
+ he as RequestsSection,
320
+ he as default
321
+ };
@@ -1,6 +1,6 @@
1
1
  import { jsxs as m, jsx as r, Fragment as p } from "react/jsx-runtime";
2
2
  import { useState as y } from "react";
3
- import { a as u, M as f } from "./index-CsImORX6.js";
3
+ import { a as u, M as f } from "./index-DwDK-4oX.js";
4
4
  import { D as w } from "./DataTable-YyShr5B-.js";
5
5
  import { F as b } from "./FilterBar-CQ7bD669.js";
6
6
  function A({ options: n = {} }) {
@@ -1,23 +1,23 @@
1
1
  import { jsx as e, jsxs as d } from "react/jsx-runtime";
2
2
  import { useState as g, useMemo as p } from "react";
3
- import { u as b } from "./index-CsImORX6.js";
4
- import { u as f } from "./useResizableTable-CNJmACdt.js";
5
- import { F as w } from "./FilterBar-CQ7bD669.js";
6
- function $({ options: i, currentPath: n }) {
7
- const { data: o, isLoading: h, error: c } = b("routes", i), [a, m] = g(""), l = p(() => {
8
- const s = o?.routes || [];
3
+ import { u as b, M as f } from "./index-DwDK-4oX.js";
4
+ import { u as w } from "./useResizableTable-CNJmACdt.js";
5
+ import { F as N } from "./FilterBar-CQ7bD669.js";
6
+ function R({ options: o, currentPath: n }) {
7
+ const { data: i, isLoading: h, error: c } = b("routes", o), [a, m] = g(""), l = p(() => {
8
+ const s = i?.routes || [];
9
9
  if (!a) return s;
10
10
  const r = a.toLowerCase();
11
11
  return s.filter(
12
12
  (t) => t.pattern.toLowerCase().includes(r) || t.handler.toLowerCase().includes(r) || t.method.toLowerCase().includes(r) || t.name && t.name.toLowerCase().includes(r)
13
13
  );
14
- }, [o, a]), u = f([l]);
15
- return h && !o ? /* @__PURE__ */ e("div", { className: "ss-dbg-empty", children: "Loading routes..." }) : c ? /* @__PURE__ */ d("div", { className: "ss-dbg-empty", children: [
14
+ }, [i, a]), u = w([l]);
15
+ return h && !i ? /* @__PURE__ */ e("div", { className: "ss-dbg-empty", children: "Loading routes..." }) : c ? /* @__PURE__ */ d("div", { className: "ss-dbg-empty", children: [
16
16
  "Error: ",
17
17
  c.message
18
18
  ] }) : /* @__PURE__ */ d("div", { children: [
19
19
  /* @__PURE__ */ e(
20
- w,
20
+ N,
21
21
  {
22
22
  search: a,
23
23
  onSearchChange: m,
@@ -49,7 +49,7 @@ function $({ options: i, currentPath: n }) {
49
49
  {
50
50
  className: t ? "ss-dbg-current-route" : "",
51
51
  children: [
52
- /* @__PURE__ */ e("td", { children: /* @__PURE__ */ e("span", { className: `ss-dbg-method ss-dbg-method-${s.method.toLowerCase()}`, children: s.method }) }),
52
+ /* @__PURE__ */ e("td", { children: /* @__PURE__ */ e(f, { method: s.method, classPrefix: "ss-dbg" }) }),
53
53
  /* @__PURE__ */ e("td", { className: "ss-dbg-c-text", children: s.pattern }),
54
54
  /* @__PURE__ */ e("td", { className: "ss-dbg-c-muted", children: s.name || "-" }),
55
55
  /* @__PURE__ */ e("td", { className: "ss-dbg-c-sql", children: s.handler }),
@@ -63,6 +63,6 @@ function $({ options: i, currentPath: n }) {
63
63
  ] });
64
64
  }
65
65
  export {
66
- $ as RoutesTab,
67
- $ as default
66
+ R as RoutesTab,
67
+ R as default
68
68
  };
@@ -0,0 +1,49 @@
1
+ import { jsxs as c, jsx as l } from "react/jsx-runtime";
2
+ import { useState as d, useRef as o, useEffect as u } from "react";
3
+ import { L as p } from "./LogEntryRow-CMMkqA9M.js";
4
+ import { initSplitPane as f } from "adonisjs-server-stats/core";
5
+ function v({ logs: n, onReqIdClick: a }) {
6
+ const [t, s] = d(null);
7
+ return n.length === 0 ? null : /* @__PURE__ */ c("div", { children: [
8
+ /* @__PURE__ */ c("div", { className: "ss-related-logs-title", children: [
9
+ "Related Logs",
10
+ /* @__PURE__ */ c("span", { className: "ss-related-logs-count", children: [
11
+ "(",
12
+ n.length,
13
+ ")"
14
+ ] })
15
+ ] }),
16
+ /* @__PURE__ */ l("div", { style: { overflow: "auto" }, children: n.map((r, e) => /* @__PURE__ */ l(
17
+ p,
18
+ {
19
+ log: r,
20
+ index: e,
21
+ expanded: t === e,
22
+ onToggleExpand: (i) => s(t === i ? null : i),
23
+ onReqIdClick: a
24
+ },
25
+ r.id || e
26
+ )) })
27
+ ] });
28
+ }
29
+ function N({ children: n, storageKey: a }) {
30
+ const t = o(null), s = o(null), r = o(null), e = o(null);
31
+ return u(() => {
32
+ if (t.current && s.current && r.current && e.current)
33
+ return f({
34
+ container: t.current,
35
+ handle: s.current,
36
+ topPane: r.current,
37
+ bottomPane: e.current,
38
+ storageKey: a
39
+ });
40
+ }, [a]), /* @__PURE__ */ c("div", { ref: t, className: "ss-split-container", children: [
41
+ /* @__PURE__ */ l("div", { ref: r, className: "ss-split-top", children: n[0] }),
42
+ /* @__PURE__ */ l("div", { ref: s, className: "ss-split-handle" }),
43
+ /* @__PURE__ */ l("div", { ref: e, className: "ss-split-bottom", children: n[1] })
44
+ ] });
45
+ }
46
+ export {
47
+ v as R,
48
+ N as S
49
+ };
@@ -0,0 +1,8 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { timeAgo as n, formatTime as m } from "adonisjs-server-stats/core";
3
+ function p({ ts: r, className: i, style: o }) {
4
+ return r ? /* @__PURE__ */ e("span", { className: i, style: o, title: m(r), children: n(r) }) : /* @__PURE__ */ e("span", { className: i, style: o, children: "-" });
5
+ }
6
+ export {
7
+ p as T
8
+ };