adonisjs-server-stats 1.11.6 → 1.11.7

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 (62) hide show
  1. package/README.md +13 -0
  2. package/dist/core/types-diagnostics.d.ts +2 -0
  3. package/dist/react/{CacheSection-BYN53kYO.js → CacheSection-DOUnyUrw.js} +1 -1
  4. package/dist/react/{CacheTab-DOhuK05d.js → CacheTab-D9o6bsPc.js} +1 -1
  5. package/dist/react/{ConfigSection-B9EHh4Rp.js → ConfigSection-DzNC7pOJ.js} +1 -1
  6. package/dist/react/{ConfigTab-C8kriE2b.js → ConfigTab-CT-Tu-ct.js} +1 -1
  7. package/dist/react/{CustomPaneTab-CvzQS_Wh.js → CustomPaneTab-CvIPe7NP.js} +1 -1
  8. package/dist/react/{EmailsSection-BJyFJf7A.js → EmailsSection-B1LT7Nx3.js} +1 -1
  9. package/dist/react/{EmailsTab-Ch8jp10B.js → EmailsTab-DKxK322z.js} +1 -1
  10. package/dist/react/{EventsSection-DJPwHeT8.js → EventsSection-D3AK0mhw.js} +1 -1
  11. package/dist/react/{EventsTab-B-FoehXC.js → EventsTab-BRRSW6RI.js} +1 -1
  12. package/dist/react/InternalsContent-BNOnSoi9.js +393 -0
  13. package/dist/react/{InternalsSection-B6VlVx5f.js → InternalsSection-BwrTfpjA.js} +1 -1
  14. package/dist/react/{InternalsTab-CkEKpRMU.js → InternalsTab--RD-L1dX.js} +1 -1
  15. package/dist/react/{JobsSection-DWF4i1t_.js → JobsSection-BMvj5886.js} +1 -1
  16. package/dist/react/{JobsTab-DqnifQXV.js → JobsTab-CQXWCrl8.js} +1 -1
  17. package/dist/react/{LogEntryRow-CMMkqA9M.js → LogEntryRow-DFI52ZEw.js} +1 -1
  18. package/dist/react/{LogsSection-C1xC5aP4.js → LogsSection-CW2hQ976.js} +2 -2
  19. package/dist/react/{LogsTab-CS4sLfLw.js → LogsTab-CV4Gf_yb.js} +2 -2
  20. package/dist/react/{OverviewSection-CxvfOR0v.js → OverviewSection-CxF9cabq.js} +1 -1
  21. package/dist/react/{QueriesSection-CrMdU5Ax.js → QueriesSection-CZJ-imAb.js} +117 -101
  22. package/dist/react/{QueriesTab-x85PjkyS.js → QueriesTab-CQHa1ck3.js} +23 -14
  23. package/dist/react/{RequestsSection-DETN9oZb.js → RequestsSection-Cb5YeqvI.js} +2 -2
  24. package/dist/react/{RoutesSection-CmorkJeC.js → RoutesSection-B43olD9v.js} +1 -1
  25. package/dist/react/{RoutesTab-CbzBOzpc.js → RoutesTab-RfhCUbkx.js} +1 -1
  26. package/dist/react/{SplitPaneWrapper-BiIgT4ND.js → SplitPaneWrapper-B05Mg6Sg.js} +1 -1
  27. package/dist/react/{TimelineTab-Ue9tUD_n.js → TimelineTab-Dx4686Ti.js} +2 -2
  28. package/dist/react/components/Dashboard/shared/DataTable.d.ts +1 -1
  29. package/dist/react/{index-DwDK-4oX.js → index-C4EMJrkH.js} +2 -2
  30. package/dist/react/index.js +1 -1
  31. package/dist/react/style.css +1 -1
  32. package/dist/src/collectors/db_pool_collector.js +17 -23
  33. package/dist/src/edge/client/dashboard.js +2 -2
  34. package/dist/src/edge/client/debug-panel-deferred.js +1 -1
  35. package/dist/src/edge/client-vue/dashboard.js +3 -3
  36. package/dist/src/edge/client-vue/debug-panel-deferred.js +2 -2
  37. package/dist/src/provider/diagnostics.d.ts +3 -0
  38. package/dist/src/provider/diagnostics.js +1 -0
  39. package/dist/src/provider/server_stats_provider.d.ts +7 -0
  40. package/dist/src/provider/server_stats_provider.js +36 -0
  41. package/dist/src/styles/components.css +16 -0
  42. package/dist/src/styles/dashboard.css +20 -12
  43. package/dist/vue/{CacheSection-DT2Mwf_s.js → CacheSection-BAotiuQq.js} +1 -1
  44. package/dist/vue/{ConfigSection-BwKwS9lh.js → ConfigSection-JZjK5E5F.js} +1 -1
  45. package/dist/vue/{EmailsSection-B65g0FVS.js → EmailsSection-BLwyQO7B.js} +1 -1
  46. package/dist/vue/{EventsSection-CxqtVF-o.js → EventsSection-BUEwO-0A.js} +1 -1
  47. package/dist/vue/{InternalsSection-BJUXE-5F.js → InternalsSection-jhTCuK3j.js} +149 -130
  48. package/dist/vue/{InternalsTab-DEMjqtlw.js → InternalsTab-521fxYYj.js} +152 -133
  49. package/dist/vue/{JobsSection-rMIyMb-g.js → JobsSection-21A0yQMq.js} +1 -1
  50. package/dist/vue/{LogsSection-DmmZVJ7D.js → LogsSection-BmOx8SNa.js} +1 -1
  51. package/dist/vue/{OverviewSection-BMabyqw-.js → OverviewSection-BRDK3Ony.js} +1 -1
  52. package/dist/vue/QueriesSection-D2WGsuR4.js +444 -0
  53. package/dist/vue/QueriesTab-6D_xfi7Q.js +114 -0
  54. package/dist/vue/{RequestsSection-CTu4jPZ_.js → RequestsSection-DLrjCfcE.js} +1 -1
  55. package/dist/vue/{RoutesSection-zQZDedL7.js → RoutesSection-CPr9w42B.js} +1 -1
  56. package/dist/vue/{index-CM3yNVUR.js → index-CYaqRGIT.js} +2 -2
  57. package/dist/vue/index.js +1 -1
  58. package/dist/vue/style.css +1 -1
  59. package/package.json +1 -1
  60. package/dist/react/InternalsContent-O8ino9oM.js +0 -370
  61. package/dist/vue/QueriesSection-BfDFwGqH.js +0 -428
  62. package/dist/vue/QueriesTab-DuTG7cpC.js +0 -106
package/README.md CHANGED
@@ -97,6 +97,19 @@ export default defineConfig({
97
97
  })
98
98
  ```
99
99
 
100
+ > **Tip: Enable query capture** -- Lucid only emits `db:query` events when `debug: true` is set on the connection. Without it, the Queries panel will be empty.
101
+ >
102
+ > ```ts
103
+ > // config/database.ts
104
+ > connections: {
105
+ > postgres: {
106
+ > client: 'pg',
107
+ > debug: app.inDev, // ← enables query capture in development
108
+ > connection: { ... },
109
+ > },
110
+ > }
111
+ > ```
112
+
100
113
  **Full control** -- override auto-detection with explicit collectors:
101
114
 
102
115
  ```ts
@@ -69,6 +69,8 @@ export interface DiagnosticsResponse {
69
69
  available?: boolean;
70
70
  mode?: string;
71
71
  }>;
72
+ /** Lucid connections that have debug: true. Empty means no query events will be emitted. */
73
+ lucidDebugConnections?: string[];
72
74
  storage: {
73
75
  ready: boolean;
74
76
  dbPath: string;
@@ -1,7 +1,7 @@
1
1
  import { jsxs as o, jsx as t } from "react/jsx-runtime";
2
2
  import { useState as c, useCallback as k } from "react";
3
3
  import { formatCacheSize as x, formatTtl as D } from "adonisjs-server-stats/core";
4
- import { a as N, J as V } from "./index-DwDK-4oX.js";
4
+ import { a as N, J as V } from "./index-C4EMJrkH.js";
5
5
  import { C as L } from "./CacheStatsBar-CRodCOeP.js";
6
6
  import { D as F } from "./DataTable-YyShr5B-.js";
7
7
  import { F as T } from "./FilterBar-CQ7bD669.js";
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
2
  import { useState as u, useMemo as T, useCallback as z } from "react";
3
3
  import { formatTtl as K, formatCacheSize as L } from "adonisjs-server-stats/core";
4
4
  import { u as R } from "./useDashboardApiBase-Bi36pJ2L.js";
5
- import { u as $, J as j } from "./index-DwDK-4oX.js";
5
+ import { u as $, J as j } from "./index-C4EMJrkH.js";
6
6
  import { u as A } from "./useResizableTable-CNJmACdt.js";
7
7
  import { C as F } from "./CacheStatsBar-CRodCOeP.js";
8
8
  import { F as D } from "./FilterBar-CQ7bD669.js";
@@ -1,5 +1,5 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { a as i } from "./index-DwDK-4oX.js";
2
+ import { a as i } from "./index-C4EMJrkH.js";
3
3
  import { C as n } from "./ConfigContent-CnsEI4j3.js";
4
4
  function m({ options: o = {} }) {
5
5
  const { data: a, isLoading: s } = i("config", o);
@@ -1,6 +1,6 @@
1
1
  import { jsxs as i, jsx as n } from "react/jsx-runtime";
2
2
  import { u as f } from "./useDashboardApiBase-Bi36pJ2L.js";
3
- import { u as m } from "./index-DwDK-4oX.js";
3
+ import { u as m } from "./index-C4EMJrkH.js";
4
4
  import { C as d } from "./ConfigContent-CnsEI4j3.js";
5
5
  function b({ options: r, dashboardPath: o }) {
6
6
  const { resolvedOptions: a } = f(o, r), { data: e, isLoading: t, error: s } = m("config", a);
@@ -1,7 +1,7 @@
1
1
  import { jsxs as l, jsx as r } from "react/jsx-runtime";
2
2
  import { useState as w, useMemo as f } from "react";
3
3
  import { compactPreview as k, formatDuration as x, durationClassName as M } from "adonisjs-server-stats/core";
4
- import { u as L, B as A, M as B } from "./index-DwDK-4oX.js";
4
+ import { u as L, B as A, M as B } from "./index-C4EMJrkH.js";
5
5
  import { T as b } from "./TimeAgoCell-o3KigGfM.js";
6
6
  import { u as D } from "./useResizableTable-CNJmACdt.js";
7
7
  import { F as P } from "./FilterBar-CQ7bD669.js";
@@ -2,7 +2,7 @@ import { jsx as s, jsxs as y, Fragment as P } from "react/jsx-runtime";
2
2
  import { useState as l, useEffect as T, useCallback as j } from "react";
3
3
  import { resolveCcAddr as N, resolveToAddr as f, resolveFromAddr as b, resolveAttachmentCount as F, resolveTimestamp as _ } from "adonisjs-server-stats/core";
4
4
  import { T as $ } from "./TimeAgoCell-o3KigGfM.js";
5
- import { a as D } from "./index-DwDK-4oX.js";
5
+ import { a as D } from "./index-C4EMJrkH.js";
6
6
  import { D as E } from "./DataTable-YyShr5B-.js";
7
7
  import { F as O } from "./FilterBar-CQ7bD669.js";
8
8
  import { E as B } from "./EmailPreviewOverlay-BmXOAvqG.js";
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as r } from "react/jsx-runtime";
2
2
  import { useState as c, useMemo as f, useCallback as w } from "react";
3
3
  import { resolveTimestamp as k } from "adonisjs-server-stats/core";
4
4
  import { T as E } from "./TimeAgoCell-o3KigGfM.js";
5
- import { u as S } from "./index-DwDK-4oX.js";
5
+ import { u as S } from "./index-C4EMJrkH.js";
6
6
  import { u as j } from "./useResizableTable-CNJmACdt.js";
7
7
  import { F as q } from "./FilterBar-CQ7bD669.js";
8
8
  import { E as $ } from "./EmailPreviewOverlay-BmXOAvqG.js";
@@ -2,7 +2,7 @@ import { jsxs as i, jsx as e, Fragment as g } from "react/jsx-runtime";
2
2
  import { useState as m, useEffect as f } from "react";
3
3
  import { resolveEventName as y, resolveTimestamp as u } from "adonisjs-server-stats/core";
4
4
  import { T as w } from "./TimeAgoCell-o3KigGfM.js";
5
- import { a as b, J as N } from "./index-DwDK-4oX.js";
5
+ import { a as b, J as N } from "./index-C4EMJrkH.js";
6
6
  import { D as x } from "./DataTable-YyShr5B-.js";
7
7
  import { F as P } from "./FilterBar-CQ7bD669.js";
8
8
  import { P as k } from "./Pagination-BkmzUDY8.js";
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
2
  import { useState as p, useMemo as u } from "react";
3
3
  import { resolveTimestamp as g } from "adonisjs-server-stats/core";
4
4
  import { T as b } from "./TimeAgoCell-o3KigGfM.js";
5
- import { u as f, J as v } from "./index-DwDK-4oX.js";
5
+ import { u as f, J as v } from "./index-C4EMJrkH.js";
6
6
  import { u as w } from "./useResizableTable-CNJmACdt.js";
7
7
  import { F as y } from "./FilterBar-CQ7bD669.js";
8
8
  function E({ options: c }) {
@@ -0,0 +1,393 @@
1
+ import { useState as f, useRef as T, useCallback as x, useEffect as M } from "react";
2
+ import { UnauthorizedError as E, formatConfigVal as I, isSecretKey as C, formatUptime as R, timeAgo as N, getTimerLabel as j, formatDuration as w, getIntegrationLabel as z, TAB_ICONS as y, classifyStatus as D } from "adonisjs-server-stats/core";
3
+ import { u as B } from "./useApiClient-BVtNCmnL.js";
4
+ import { jsx as e, jsxs as n, Fragment as $ } from "react/jsx-runtime";
5
+ function H(t = {}) {
6
+ const {
7
+ baseUrl: c = "",
8
+ debugEndpoint: s = "/admin/api/debug",
9
+ authToken: i,
10
+ refreshInterval: d = 3e3
11
+ } = t, [u, b] = f(null), [v, g] = f(!0), [S, r] = f(null), l = T(null), a = B(c, i), h = x(async () => {
12
+ try {
13
+ const A = await a().get(`${s}/diagnostics`);
14
+ b(A), r(null), g(!1);
15
+ } catch (o) {
16
+ if (o instanceof E) {
17
+ r(o), g(!1), l.current && (clearInterval(l.current), l.current = null);
18
+ return;
19
+ }
20
+ r(o instanceof Error ? o : new Error(String(o))), g(!1);
21
+ }
22
+ }, [s, a]);
23
+ return M(() => (g(!0), r(null), h(), l.current = setInterval(h, d), () => {
24
+ l.current && (clearInterval(l.current), l.current = null);
25
+ }), [h, d]), { data: u, isLoading: v, error: S };
26
+ }
27
+ function p({ status: t, prefix: c }) {
28
+ const s = D(t);
29
+ let i = `${c}-dot`;
30
+ return s === "ok" ? i += ` ${c}-dot-ok` : s === "err" && (i += ` ${c}-dot-err`), /* @__PURE__ */ e("span", { className: i });
31
+ }
32
+ const L = () => /* @__PURE__ */ e(
33
+ "svg",
34
+ {
35
+ xmlns: "http://www.w3.org/2000/svg",
36
+ width: "12",
37
+ height: "12",
38
+ viewBox: y.eye.viewBox,
39
+ fill: "none",
40
+ stroke: "currentColor",
41
+ strokeWidth: "2",
42
+ strokeLinecap: "round",
43
+ strokeLinejoin: "round",
44
+ dangerouslySetInnerHTML: { __html: y.eye.elements.join("") }
45
+ }
46
+ ), k = () => /* @__PURE__ */ e(
47
+ "svg",
48
+ {
49
+ xmlns: "http://www.w3.org/2000/svg",
50
+ width: "12",
51
+ height: "12",
52
+ viewBox: y["eye-off"].viewBox,
53
+ fill: "none",
54
+ stroke: "currentColor",
55
+ strokeWidth: "2",
56
+ strokeLinecap: "round",
57
+ strokeLinejoin: "round",
58
+ dangerouslySetInnerHTML: { __html: y["eye-off"].elements.join("") }
59
+ }
60
+ );
61
+ function V({ value: t }) {
62
+ const [c, s] = f(!1);
63
+ return /* @__PURE__ */ n("span", { children: [
64
+ c ? t : "••••••••",
65
+ " ",
66
+ /* @__PURE__ */ e(
67
+ "button",
68
+ {
69
+ type: "button",
70
+ onClick: () => s((i) => !i),
71
+ style: {
72
+ background: "none",
73
+ border: "1px solid var(--ss-border)",
74
+ borderRadius: 3,
75
+ padding: "0 4px",
76
+ fontSize: "10px",
77
+ color: "var(--ss-dim)",
78
+ cursor: "pointer",
79
+ verticalAlign: "middle"
80
+ },
81
+ children: c ? /* @__PURE__ */ e(k, {}) : /* @__PURE__ */ e(L, {})
82
+ }
83
+ )
84
+ ] });
85
+ }
86
+ function O({ current: t, max: c, prefix: s }) {
87
+ const i = c > 0 ? Math.min(100, Math.round(t / c * 100)) : 0, d = i >= 100;
88
+ return /* @__PURE__ */ n("div", { className: `${s}-bar`, children: [
89
+ /* @__PURE__ */ e("div", { className: `${s}-bar-track`, children: /* @__PURE__ */ e(
90
+ "div",
91
+ {
92
+ className: `${s}-bar-fill${d ? ` ${s}-bar-fill-warn` : ""}`,
93
+ style: { width: `${i}%` }
94
+ }
95
+ ) }),
96
+ /* @__PURE__ */ n("span", { className: `${s}-bar-pct${d ? ` ${s}-bar-pct-warn` : ""}`, children: [
97
+ i,
98
+ "%"
99
+ ] })
100
+ ] });
101
+ }
102
+ function P({ config: t, prefix: c }) {
103
+ const s = Object.entries(t);
104
+ return s.length === 0 ? /* @__PURE__ */ e("span", { className: `${c}-c-dim`, children: "-" }) : /* @__PURE__ */ e("span", { className: `${c}-c-muted`, children: s.map(([i, d], u) => /* @__PURE__ */ n("span", { children: [
105
+ u > 0 && ", ",
106
+ /* @__PURE__ */ e("span", { className: `${c}-c-dim`, children: i }),
107
+ "=",
108
+ C(i) && typeof d == "string" ? /* @__PURE__ */ e(V, { value: d }) : /* @__PURE__ */ e("span", { children: I(d) })
109
+ ] }, i)) });
110
+ }
111
+ function m({ label: t, value: c, prefix: s }) {
112
+ return /* @__PURE__ */ n("div", { className: `${s}-info-card`, children: [
113
+ /* @__PURE__ */ e("span", { className: `${s}-info-card-label`, children: t }),
114
+ /* @__PURE__ */ e("span", { className: `${s}-info-card-value`, children: c })
115
+ ] });
116
+ }
117
+ function W({ data: t, tableClassName: c, classPrefix: s }) {
118
+ const i = s || "ss-dash", [d, u] = f(/* @__PURE__ */ new Set()), b = x((r) => {
119
+ u((l) => {
120
+ const a = new Set(l);
121
+ return a.has(r) ? a.delete(r) : a.add(r), a;
122
+ });
123
+ }, []), v = x(
124
+ (r, l) => {
125
+ if (l == null) return /* @__PURE__ */ e("span", { className: `${i}-c-dim`, children: "null" });
126
+ if (typeof l == "boolean")
127
+ return /* @__PURE__ */ e("span", { className: l ? `${i}-c-green` : `${i}-c-red`, children: String(l) });
128
+ if (Array.isArray(l)) return /* @__PURE__ */ e("span", { children: l.join(", ") || "-" });
129
+ const a = I(l);
130
+ if (C(r)) {
131
+ const h = d.has(r);
132
+ return /* @__PURE__ */ n("span", { children: [
133
+ h ? a : "••••••••",
134
+ " ",
135
+ /* @__PURE__ */ e(
136
+ "button",
137
+ {
138
+ type: "button",
139
+ onClick: () => b(r),
140
+ style: {
141
+ background: "none",
142
+ border: "1px solid var(--ss-border)",
143
+ borderRadius: 3,
144
+ padding: "0 4px",
145
+ fontSize: "10px",
146
+ color: "var(--ss-dim)",
147
+ cursor: "pointer",
148
+ verticalAlign: "middle"
149
+ },
150
+ children: h ? /* @__PURE__ */ e(k, {}) : /* @__PURE__ */ e(L, {})
151
+ }
152
+ )
153
+ ] });
154
+ }
155
+ return /* @__PURE__ */ e("span", { children: a });
156
+ },
157
+ [d, b, i]
158
+ ), S = t.collectors?.some((r) => r.name === "db_pool" || r.name === "app") && Array.isArray(t.lucidDebugConnections) && t.lucidDebugConnections.length === 0;
159
+ return /* @__PURE__ */ n("div", { children: [
160
+ S && /* @__PURE__ */ n(
161
+ "div",
162
+ {
163
+ style: {
164
+ background: "var(--ss-amber-bg)",
165
+ color: "var(--ss-amber-fg)",
166
+ padding: "8px 12px",
167
+ borderRadius: "6px",
168
+ fontSize: "12px",
169
+ marginBottom: "12px",
170
+ lineHeight: 1.5
171
+ },
172
+ children: [
173
+ /* @__PURE__ */ e("strong", { children: "Query capture disabled" }),
174
+ " — no Lucid connections have",
175
+ " ",
176
+ /* @__PURE__ */ e("code", { style: { fontSize: "11px" }, children: "debug: true" }),
177
+ ". Add it to your database connection in ",
178
+ /* @__PURE__ */ e("code", { style: { fontSize: "11px" }, children: "config/database.ts" }),
179
+ " to see queries in the Queries panel."
180
+ ]
181
+ }
182
+ ),
183
+ /* @__PURE__ */ e("h3", { className: `${i}-internals-title`, children: "Package Info" }),
184
+ /* @__PURE__ */ n("div", { className: `${i}-info-cards`, children: [
185
+ /* @__PURE__ */ e(m, { label: "Version", value: t.package.version || "-", prefix: i }),
186
+ /* @__PURE__ */ e(m, { label: "Node.js", value: t.package.nodeVersion || "-", prefix: i }),
187
+ /* @__PURE__ */ e(m, { label: "AdonisJS", value: t.package.adonisVersion || "-", prefix: i }),
188
+ /* @__PURE__ */ e(m, { label: "Uptime", value: R(t.package.uptime), prefix: i }),
189
+ /* @__PURE__ */ e(m, { label: "Renderer", value: t.devToolbar?.renderer || "preact", prefix: i })
190
+ ] }),
191
+ t.collectors.length > 0 && /* @__PURE__ */ n($, { children: [
192
+ /* @__PURE__ */ e("h3", { className: `${i}-internals-title`, children: "Collectors" }),
193
+ /* @__PURE__ */ n("table", { className: c, children: [
194
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ n("tr", { children: [
195
+ /* @__PURE__ */ e("th", { children: "Collector" }),
196
+ /* @__PURE__ */ e("th", { children: "Status" }),
197
+ /* @__PURE__ */ e("th", { children: "Last Error" }),
198
+ /* @__PURE__ */ e("th", { children: "Config" })
199
+ ] }) }),
200
+ /* @__PURE__ */ e("tbody", { children: t.collectors.map((r) => /* @__PURE__ */ n("tr", { children: [
201
+ /* @__PURE__ */ n("td", { children: [
202
+ /* @__PURE__ */ e("code", { children: r.name }),
203
+ r.label && r.label !== r.name && /* @__PURE__ */ n("span", { className: `${i}-c-dim`, children: [
204
+ " ",
205
+ r.label
206
+ ] })
207
+ ] }),
208
+ /* @__PURE__ */ n("td", { children: [
209
+ /* @__PURE__ */ e(p, { status: r.status, prefix: i }),
210
+ r.status
211
+ ] }),
212
+ /* @__PURE__ */ e("td", { className: r.lastError ? `${i}-c-red` : `${i}-c-dim`, children: r.lastError ? /* @__PURE__ */ n($, { children: [
213
+ r.lastError,
214
+ r.lastErrorAt && /* @__PURE__ */ e("span", { className: `${i}-c-dim`, style: { fontSize: "10px" }, children: N(r.lastErrorAt) })
215
+ ] }) : "-" }),
216
+ /* @__PURE__ */ e("td", { children: /* @__PURE__ */ e(P, { config: r.config, prefix: i }) })
217
+ ] }, r.name)) })
218
+ ] })
219
+ ] }),
220
+ /* @__PURE__ */ e("h3", { className: `${i}-internals-title`, children: "Buffers" }),
221
+ /* @__PURE__ */ n("table", { className: c, children: [
222
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ n("tr", { children: [
223
+ /* @__PURE__ */ e("th", { children: "Buffer" }),
224
+ /* @__PURE__ */ e("th", { children: "Usage" }),
225
+ /* @__PURE__ */ e("th", { children: "Fill %" })
226
+ ] }) }),
227
+ /* @__PURE__ */ e("tbody", { children: Object.entries(t.buffers).map(([r, l]) => /* @__PURE__ */ n("tr", { children: [
228
+ /* @__PURE__ */ e("td", { style: { textTransform: "capitalize" }, children: r }),
229
+ /* @__PURE__ */ n("td", { children: [
230
+ l.current.toLocaleString(),
231
+ " / ",
232
+ l.max.toLocaleString()
233
+ ] }),
234
+ /* @__PURE__ */ e("td", { children: /* @__PURE__ */ e(O, { current: l.current, max: l.max, prefix: i }) })
235
+ ] }, r)) })
236
+ ] }),
237
+ /* @__PURE__ */ e("h3", { className: `${i}-internals-title`, children: "Timers" }),
238
+ /* @__PURE__ */ n("table", { className: c, children: [
239
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ n("tr", { children: [
240
+ /* @__PURE__ */ e("th", { children: "Timer" }),
241
+ /* @__PURE__ */ e("th", { children: "Status" }),
242
+ /* @__PURE__ */ e("th", { children: "Interval" })
243
+ ] }) }),
244
+ /* @__PURE__ */ e("tbody", { children: Object.entries(t.timers).map(([r, l]) => /* @__PURE__ */ n("tr", { children: [
245
+ /* @__PURE__ */ e("td", { children: j(r) }),
246
+ /* @__PURE__ */ n("td", { children: [
247
+ /* @__PURE__ */ e(p, { status: l.active ? "active" : "inactive", prefix: i }),
248
+ /* @__PURE__ */ e("span", { className: l.active ? `${i}-c-green` : `${i}-c-dim`, children: l.active ? "active" : "inactive" })
249
+ ] }),
250
+ /* @__PURE__ */ e("td", { children: l.active ? l.intervalMs ? w(l.intervalMs) : l.debounceMs ? `${w(l.debounceMs)} (debounce)` : "-" : /* @__PURE__ */ e("span", { className: `${i}-c-dim`, children: "—" }) })
251
+ ] }, r)) })
252
+ ] }),
253
+ /* @__PURE__ */ e("h3", { className: `${i}-internals-title`, children: "Integrations" }),
254
+ /* @__PURE__ */ n("table", { className: c, children: [
255
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ n("tr", { children: [
256
+ /* @__PURE__ */ e("th", { children: "Integration" }),
257
+ /* @__PURE__ */ e("th", { children: "Status" }),
258
+ /* @__PURE__ */ e("th", { children: "Details" })
259
+ ] }) }),
260
+ /* @__PURE__ */ n("tbody", { children: [
261
+ /* @__PURE__ */ n("tr", { children: [
262
+ /* @__PURE__ */ e("td", { children: "Transmit (SSE)" }),
263
+ /* @__PURE__ */ n("td", { children: [
264
+ /* @__PURE__ */ e(p, { status: t.transmit.available ? "connected" : "inactive", prefix: i }),
265
+ t.transmit.available ? "connected" : "unavailable"
266
+ ] }),
267
+ /* @__PURE__ */ e("td", { style: { fontSize: "11px" }, children: t.transmit.channels.length > 0 ? `Channels: ${t.transmit.channels.join(", ")}` : "-" })
268
+ ] }),
269
+ Object.entries(t.integrations).map(([r, l]) => {
270
+ const a = l.active ?? l.available ?? !1, h = l.active ? "active" : l.available ? "available" : "unavailable";
271
+ let o = l.mode ? `Mode: ${l.mode}` : "-";
272
+ return r === "edgePlugin" && l.active ? o = "@serverStats() tag registered" : r === "cacheInspector" && l.available ? o = "Redis dependency detected" : r === "queueInspector" && l.available && (o = "Queue dependency detected"), /* @__PURE__ */ n("tr", { children: [
273
+ /* @__PURE__ */ e("td", { children: z(r) }),
274
+ /* @__PURE__ */ n("td", { children: [
275
+ /* @__PURE__ */ e(p, { status: a ? "active" : "inactive", prefix: i }),
276
+ h
277
+ ] }),
278
+ /* @__PURE__ */ e("td", { className: `${i}-c-dim`, style: { fontSize: "11px" }, children: o })
279
+ ] }, r);
280
+ })
281
+ ] })
282
+ ] }),
283
+ t.storage && /* @__PURE__ */ n($, { children: [
284
+ /* @__PURE__ */ e("h3", { className: `${i}-internals-title`, children: "Storage (SQLite)" }),
285
+ /* @__PURE__ */ n("table", { className: c, children: [
286
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ n("tr", { children: [
287
+ /* @__PURE__ */ e("th", { style: { width: "200px" }, children: "Metric" }),
288
+ /* @__PURE__ */ e("th", { children: "Value" })
289
+ ] }) }),
290
+ /* @__PURE__ */ n("tbody", { children: [
291
+ /* @__PURE__ */ n("tr", { children: [
292
+ /* @__PURE__ */ e("td", { children: "Status" }),
293
+ /* @__PURE__ */ n("td", { children: [
294
+ /* @__PURE__ */ e(p, { status: t.storage.ready ? "ready" : "inactive", prefix: i }),
295
+ t.storage.ready ? "ready" : "not ready"
296
+ ] })
297
+ ] }),
298
+ /* @__PURE__ */ n("tr", { children: [
299
+ /* @__PURE__ */ e("td", { children: "DB Path" }),
300
+ /* @__PURE__ */ e("td", { children: /* @__PURE__ */ e("code", { children: t.storage.dbPath }) })
301
+ ] }),
302
+ /* @__PURE__ */ n("tr", { children: [
303
+ /* @__PURE__ */ e("td", { children: "File Size" }),
304
+ /* @__PURE__ */ n("td", { children: [
305
+ t.storage.fileSizeMb.toFixed(1),
306
+ " MB"
307
+ ] })
308
+ ] }),
309
+ /* @__PURE__ */ n("tr", { children: [
310
+ /* @__PURE__ */ e("td", { children: "WAL Size" }),
311
+ /* @__PURE__ */ n("td", { children: [
312
+ t.storage.walSizeMb.toFixed(1),
313
+ " MB"
314
+ ] })
315
+ ] }),
316
+ /* @__PURE__ */ n("tr", { children: [
317
+ /* @__PURE__ */ e("td", { children: "Retention" }),
318
+ /* @__PURE__ */ n("td", { children: [
319
+ t.storage.retentionDays,
320
+ " days"
321
+ ] })
322
+ ] }),
323
+ /* @__PURE__ */ n("tr", { children: [
324
+ /* @__PURE__ */ e("td", { children: "Last Cleanup" }),
325
+ /* @__PURE__ */ e("td", { children: t.storage.lastCleanupAt ? N(t.storage.lastCleanupAt) : "-" })
326
+ ] })
327
+ ] })
328
+ ] }),
329
+ t.storage.tables.length > 0 && /* @__PURE__ */ n("table", { className: c, style: { marginTop: 8 }, children: [
330
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ n("tr", { children: [
331
+ /* @__PURE__ */ e("th", { children: "Table" }),
332
+ /* @__PURE__ */ e("th", { children: "Rows" })
333
+ ] }) }),
334
+ /* @__PURE__ */ e("tbody", { children: t.storage.tables.map((r) => /* @__PURE__ */ n("tr", { children: [
335
+ /* @__PURE__ */ e("td", { children: /* @__PURE__ */ e("code", { children: r.name }) }),
336
+ /* @__PURE__ */ e("td", { children: r.rowCount.toLocaleString() })
337
+ ] }, r.name)) })
338
+ ] })
339
+ ] }),
340
+ /* @__PURE__ */ e("h3", { className: `${i}-internals-title`, children: "Resolved Config" }),
341
+ /* @__PURE__ */ n("table", { className: c, children: [
342
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ n("tr", { children: [
343
+ /* @__PURE__ */ e("th", { style: { width: "200px" }, children: "Setting" }),
344
+ /* @__PURE__ */ e("th", { children: "Value" })
345
+ ] }) }),
346
+ /* @__PURE__ */ n("tbody", { children: [
347
+ /* @__PURE__ */ n("tr", { children: [
348
+ /* @__PURE__ */ e("td", { children: "intervalMs" }),
349
+ /* @__PURE__ */ e("td", { children: t.config.intervalMs })
350
+ ] }),
351
+ /* @__PURE__ */ n("tr", { children: [
352
+ /* @__PURE__ */ e("td", { children: "transport" }),
353
+ /* @__PURE__ */ e("td", { children: t.config.transport })
354
+ ] }),
355
+ /* @__PURE__ */ n("tr", { children: [
356
+ /* @__PURE__ */ e("td", { children: "channelName" }),
357
+ /* @__PURE__ */ e("td", { children: t.config.channelName })
358
+ ] }),
359
+ /* @__PURE__ */ n("tr", { children: [
360
+ /* @__PURE__ */ e("td", { children: "endpoint" }),
361
+ /* @__PURE__ */ e("td", { children: t.config.endpoint === !1 ? "false" : t.config.endpoint })
362
+ ] }),
363
+ /* @__PURE__ */ n("tr", { children: [
364
+ /* @__PURE__ */ e("td", { children: "skipInTest" }),
365
+ /* @__PURE__ */ e("td", { children: v("skipInTest", t.config.skipInTest) })
366
+ ] }),
367
+ /* @__PURE__ */ n("tr", { children: [
368
+ /* @__PURE__ */ e("td", { children: "onStats callback" }),
369
+ /* @__PURE__ */ e("td", { children: t.config.hasOnStatsCallback ? "defined" : "not defined" })
370
+ ] }),
371
+ /* @__PURE__ */ n("tr", { children: [
372
+ /* @__PURE__ */ e("td", { children: "shouldShow callback" }),
373
+ /* @__PURE__ */ e("td", { children: t.config.hasShouldShowCallback ? "defined" : "not defined" })
374
+ ] })
375
+ ] })
376
+ ] }),
377
+ /* @__PURE__ */ e("h4", { className: `${i}-internals-title`, children: "DevToolbar" }),
378
+ /* @__PURE__ */ n("table", { className: c, children: [
379
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ n("tr", { children: [
380
+ /* @__PURE__ */ e("th", { style: { width: "200px" }, children: "Setting" }),
381
+ /* @__PURE__ */ e("th", { children: "Value" })
382
+ ] }) }),
383
+ /* @__PURE__ */ e("tbody", { children: Object.entries(t.devToolbar).map(([r, l]) => /* @__PURE__ */ n("tr", { children: [
384
+ /* @__PURE__ */ e("td", { children: r === "customPaneCount" ? "customPanes" : r }),
385
+ /* @__PURE__ */ e("td", { children: r === "customPaneCount" ? `${l} registered` : v(r, l) })
386
+ ] }, r)) })
387
+ ] })
388
+ ] });
389
+ }
390
+ export {
391
+ W as I,
392
+ H as u
393
+ };
@@ -1,6 +1,6 @@
1
1
  import { jsx as a, jsxs as n } from "react/jsx-runtime";
2
2
  import { SECTION_REFRESH_MS as o } from "adonisjs-server-stats/core";
3
- import { u as d, I as l } from "./InternalsContent-O8ino9oM.js";
3
+ import { u as d, I as l } from "./InternalsContent-BNOnSoi9.js";
4
4
  function u({
5
5
  options: e = {},
6
6
  debugEndpoint: t = "/admin/api/debug"
@@ -1,5 +1,5 @@
1
1
  import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
- import { u as i, I as d } from "./InternalsContent-O8ino9oM.js";
2
+ import { u as i, I as d } from "./InternalsContent-BNOnSoi9.js";
3
3
  function b({ options: s }) {
4
4
  const { data: a, isLoading: t, error: r } = i({
5
5
  baseUrl: s?.baseUrl,
@@ -1,7 +1,7 @@
1
1
  import { jsxs as y, jsx as t, Fragment as T } from "react/jsx-runtime";
2
2
  import { useState as l, useCallback as C } from "react";
3
3
  import { extractJobs as D, extractJobStats as F, JOB_STATUS_FILTERS as j, getJobStatusBadgeColor as B, formatDuration as A, resolveJobTimestamp as L } from "adonisjs-server-stats/core";
4
- import { a as R, B as _, J as $ } from "./index-DwDK-4oX.js";
4
+ import { a as R, B as _, J as $ } from "./index-C4EMJrkH.js";
5
5
  import { J as M } from "./JobStatsBar-C7RslAFE.js";
6
6
  import { T as O } from "./TimeAgoCell-o3KigGfM.js";
7
7
  import { D as U } from "./DataTable-YyShr5B-.js";
@@ -3,7 +3,7 @@ import { useState as m, useMemo as C, useCallback as A } from "react";
3
3
  import { extractJobs as B, extractJobStats as $, JOB_STATUS_FILTERS as D, getJobStatusCssClass as F, formatDuration as L, resolveJobTimestamp as R } from "adonisjs-server-stats/core";
4
4
  import { T as P } from "./TimeAgoCell-o3KigGfM.js";
5
5
  import { u as k } from "./useDashboardApiBase-Bi36pJ2L.js";
6
- import { u as E, J as O } from "./index-DwDK-4oX.js";
6
+ import { u as E, J as O } from "./index-C4EMJrkH.js";
7
7
  import { u as q } from "./useResizableTable-CNJmACdt.js";
8
8
  import { F as z } from "./FilterBar-CQ7bD669.js";
9
9
  import { J as M } from "./JobStatsBar-C7RslAFE.js";
@@ -2,7 +2,7 @@ import { jsxs as i, jsx as s } from "react/jsx-runtime";
2
2
  import g from "react";
3
3
  import { T as v } from "./TimeAgoCell-o3KigGfM.js";
4
4
  import { resolveLogLevel as u, resolveLogMessage as f, resolveLogTimestamp as h, resolveLogRequestId as L, getStructuredData as x, getLogLevelCssClass as N } from "adonisjs-server-stats/core";
5
- import { J as y } from "./index-DwDK-4oX.js";
5
+ import { J as y } from "./index-C4EMJrkH.js";
6
6
  function $({ log: o, index: c, expanded: l, onToggleExpand: m, onReqIdClick: e }) {
7
7
  const n = u(o), d = f(o), p = h(o), a = L(o), t = x(o);
8
8
  return /* @__PURE__ */ i(g.Fragment, { children: [
@@ -1,9 +1,9 @@
1
1
  import { jsxs as l, jsx as t } from "react/jsx-runtime";
2
2
  import { useState as a, useCallback as c } from "react";
3
3
  import { LOG_LEVELS as B } from "adonisjs-server-stats/core";
4
- import { a as G } from "./index-DwDK-4oX.js";
4
+ import { a as G } from "./index-C4EMJrkH.js";
5
5
  import { F as T } from "./FilterBar-CQ7bD669.js";
6
- import { L as z } from "./LogEntryRow-CMMkqA9M.js";
6
+ import { L as z } from "./LogEntryRow-DFI52ZEw.js";
7
7
  import { P as H } from "./Pagination-BkmzUDY8.js";
8
8
  function Z({ options: L = {} }) {
9
9
  const [E, i] = a(1), [b, x] = a(""), [r, q] = a("all"), [n, h] = a(""), [u, p] = a(""), [m, y] = a([]), [v, R] = a("level"), [g, $] = a("equals"), [f, C] = a(""), [F, P] = a(null), o = {};
@@ -1,9 +1,9 @@
1
1
  import { jsx as o, jsxs as a } from "react/jsx-runtime";
2
2
  import { useState as i, useMemo as v, useCallback as x } from "react";
3
3
  import { filterLogsByLevel as C, resolveLogRequestId as N, resolveLogMessage as F, LOG_LEVELS as w } from "adonisjs-server-stats/core";
4
- import { u as E } from "./index-DwDK-4oX.js";
4
+ import { u as E } from "./index-C4EMJrkH.js";
5
5
  import { F as I } from "./FilterBar-CQ7bD669.js";
6
- import { L as k } from "./LogEntryRow-CMMkqA9M.js";
6
+ import { L as k } from "./LogEntryRow-DFI52ZEw.js";
7
7
  function M({ options: f }) {
8
8
  const { data: t, isLoading: p, error: g } = E("logs", f), [d, L] = i("all"), [n, h] = i(""), [l, m] = i(""), [u, b] = i(null), c = v(() => {
9
9
  let e = Array.isArray(t) ? t : t?.logs || t?.entries || [];
@@ -1,7 +1,7 @@
1
1
  import { jsx as s, jsxs as e } from "react/jsx-runtime";
2
2
  import { useState as T, useRef as P, useEffect as ss, useCallback as O } from "react";
3
3
  import { resolveMetric as k, formatDuration as S, durationClassName as U, resolveEventName as es, resolveNormalizedSql as as } from "adonisjs-server-stats/core";
4
- import { a as z, b as M } from "./index-DwDK-4oX.js";
4
+ import { a as z, b as M } from "./index-C4EMJrkH.js";
5
5
  import { T as ls } from "./TimeAgoCell-o3KigGfM.js";
6
6
  const rs = [
7
7
  { value: "5m", label: "5m" },