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
@@ -1,72 +1,72 @@
1
- import { jsx as t, jsxs as l, Fragment as v } from "react/jsx-runtime";
2
- import { useState as y, useCallback as $, useEffect as X, useMemo as T } from "react";
3
- import { resolveField as b, resolveNormalizedSql as A, durationClassName as R, resolveSqlMethod as Q, resolveTimestamp as Y, SLOW_DURATION_MS as Z } from "adonisjs-server-stats/core";
4
- import { a as ee } from "./index-DwDK-4oX.js";
1
+ import { jsx as t, jsxs as r, Fragment as y } from "react/jsx-runtime";
2
+ import { useState as g, useCallback as $, useEffect as X, useMemo as T } from "react";
3
+ import { resolveField as N, resolveNormalizedSql as A, durationClassName as R, resolveSqlMethod as z, resolveTimestamp as Y, SLOW_DURATION_MS as Z } from "adonisjs-server-stats/core";
4
+ import { a as ee } from "./index-C4EMJrkH.js";
5
5
  import { D as U } from "./DataTable-YyShr5B-.js";
6
6
  import { F as se } from "./FilterBar-CQ7bD669.js";
7
7
  import { T as te } from "./TimeAgoCell-o3KigGfM.js";
8
- import { P as ae } from "./Pagination-BkmzUDY8.js";
9
- function W({ node: a, depth: d = 0 }) {
10
- if (!a) return null;
11
- const f = d * 20, u = a["Node Type"] || "Unknown", C = a["Relation Name"] ? /* @__PURE__ */ l(v, { children: [
8
+ import { P as ne } from "./Pagination-BkmzUDY8.js";
9
+ function W({ node: n, depth: d = 0 }) {
10
+ if (!n) return null;
11
+ const f = d * 20, u = n["Node Type"] || "Unknown", S = n["Relation Name"] ? /* @__PURE__ */ r(y, { children: [
12
12
  " on ",
13
- /* @__PURE__ */ t("strong", { children: a["Relation Name"] })
14
- ] }) : null, c = a.Alias && a.Alias !== a["Relation Name"] ? ` (${a.Alias})` : "", m = a["Index Name"] ? /* @__PURE__ */ l(v, { children: [
13
+ /* @__PURE__ */ t("strong", { children: n["Relation Name"] })
14
+ ] }) : null, c = n.Alias && n.Alias !== n["Relation Name"] ? ` (${n.Alias})` : "", m = n["Index Name"] ? /* @__PURE__ */ r(y, { children: [
15
15
  " using ",
16
- /* @__PURE__ */ t("em", { children: a["Index Name"] })
16
+ /* @__PURE__ */ t("em", { children: n["Index Name"] })
17
17
  ] }) : null, i = [];
18
- if (a["Startup Cost"] !== null && a["Startup Cost"] !== void 0 && i.push(`cost=${a["Startup Cost"]}..${a["Total Cost"]}`), a["Plan Rows"] !== null && a["Plan Rows"] !== void 0 && i.push(`rows=${a["Plan Rows"]}`), a["Plan Width"] !== null && a["Plan Width"] !== void 0 && i.push(`width=${a["Plan Width"]}`), a.Filter && i.push(`filter: ${a.Filter}`), a["Index Cond"] && i.push(`cond: ${a["Index Cond"]}`), a["Hash Cond"] && i.push(`hash: ${a["Hash Cond"]}`), a["Join Type"] && i.push(`join: ${a["Join Type"]}`), a["Sort Key"]) {
19
- const r = Array.isArray(a["Sort Key"]) ? a["Sort Key"].join(", ") : a["Sort Key"];
20
- i.push(`sort: ${r}`);
18
+ if (n["Startup Cost"] !== null && n["Startup Cost"] !== void 0 && i.push(`cost=${n["Startup Cost"]}..${n["Total Cost"]}`), n["Plan Rows"] !== null && n["Plan Rows"] !== void 0 && i.push(`rows=${n["Plan Rows"]}`), n["Plan Width"] !== null && n["Plan Width"] !== void 0 && i.push(`width=${n["Plan Width"]}`), n.Filter && i.push(`filter: ${n.Filter}`), n["Index Cond"] && i.push(`cond: ${n["Index Cond"]}`), n["Hash Cond"] && i.push(`hash: ${n["Hash Cond"]}`), n["Join Type"] && i.push(`join: ${n["Join Type"]}`), n["Sort Key"]) {
19
+ const l = Array.isArray(n["Sort Key"]) ? n["Sort Key"].join(", ") : n["Sort Key"];
20
+ i.push(`sort: ${l}`);
21
21
  }
22
- const q = a.Plans || [];
23
- return /* @__PURE__ */ l("div", { className: "ss-dash-explain-node", style: { marginLeft: `${f}px` }, children: [
24
- /* @__PURE__ */ l("div", { className: "ss-dash-explain-node-header", children: [
22
+ const C = n.Plans || [];
23
+ return /* @__PURE__ */ r("div", { className: "ss-dash-explain-node", style: { marginLeft: `${f}px` }, children: [
24
+ /* @__PURE__ */ r("div", { className: "ss-dash-explain-node-header", children: [
25
25
  /* @__PURE__ */ t("span", { className: "ss-dash-explain-node-type", children: u }),
26
- C,
26
+ S,
27
27
  c,
28
28
  m
29
29
  ] }),
30
30
  i.length > 0 && /* @__PURE__ */ t("div", { className: "ss-dash-explain-metrics", children: i.join(" · ") }),
31
- q.map((r, F) => /* @__PURE__ */ t(W, { node: r, depth: d + 1 }, F))
31
+ C.map((l, F) => /* @__PURE__ */ t(W, { node: l, depth: d + 1 }, F))
32
32
  ] });
33
33
  }
34
- function ne({ plan: a }) {
35
- if (!a || !Array.isArray(a) || a.length === 0)
34
+ function ae({ plan: n }) {
35
+ if (!n || !Array.isArray(n) || n.length === 0)
36
36
  return /* @__PURE__ */ t("div", { className: "ss-dash-explain-result", children: "No plan data returned" });
37
- const d = a[0];
37
+ const d = n[0];
38
38
  if (d && d.Plan)
39
39
  return /* @__PURE__ */ t("div", { className: "ss-dash-explain-result", children: /* @__PURE__ */ t(W, { node: d.Plan, depth: 0 }) });
40
40
  if (typeof d == "object" && d !== null) {
41
41
  const f = Object.keys(d);
42
- return /* @__PURE__ */ t("div", { className: "ss-dash-explain-result", children: /* @__PURE__ */ l("table", { children: [
42
+ return /* @__PURE__ */ t("div", { className: "ss-dash-explain-result", children: /* @__PURE__ */ r("table", { children: [
43
43
  /* @__PURE__ */ t("thead", { children: /* @__PURE__ */ t("tr", { children: f.map((u) => /* @__PURE__ */ t("th", { children: u }, u)) }) }),
44
- /* @__PURE__ */ t("tbody", { children: a.map((u, C) => {
44
+ /* @__PURE__ */ t("tbody", { children: n.map((u, S) => {
45
45
  const c = u;
46
- return /* @__PURE__ */ t("tr", { children: f.map((m) => /* @__PURE__ */ t("td", { children: c[m] !== null && c[m] !== void 0 ? String(c[m]) : "-" }, m)) }, C);
46
+ return /* @__PURE__ */ t("tr", { children: f.map((m) => /* @__PURE__ */ t("td", { children: c[m] !== null && c[m] !== void 0 ? String(c[m]) : "-" }, m)) }, S);
47
47
  }) })
48
48
  ] }) });
49
49
  }
50
50
  return /* @__PURE__ */ t("div", { className: "ss-dash-explain-result", children: "No plan data returned" });
51
51
  }
52
52
  const re = 8;
53
- function me({ options: a = {} }) {
54
- const [d, f] = y(1), [u, C] = y(""), [c, m] = y("createdAt"), [i, q] = y("desc"), [r, F] = y("list"), [N, D] = y(null), [o, w] = y(null), [j, _] = y(null), I = $(
53
+ function me({ options: n = {} }) {
54
+ const [d, f] = g(1), [u, S] = g(""), [c, m] = g("createdAt"), [i, C] = g("desc"), [l, F] = g("list"), [v, D] = g(null), [o, w] = g(null), [j, L] = g(null), I = $(
55
55
  (e) => {
56
- e !== r && (F(e), f(1), m(e === "list" ? "createdAt" : "count"), q("desc"), D(null), w(null), _(null));
56
+ e !== l && (F(e), f(1), m(e === "list" ? "createdAt" : "count"), C("desc"), D(null), w(null), L(null));
57
57
  },
58
- [r]
58
+ [l]
59
59
  );
60
60
  X(() => f(1), [u]);
61
- const H = r === "grouped" ? "queries/grouped" : "queries", { data: M, meta: k, isLoading: J, getApi: O } = ee(H, {
62
- ...a,
61
+ const H = l === "grouped" ? "queries/grouped" : "queries", { data: _, meta: k, isLoading: J, getApi: O } = ee(H, {
62
+ ...n,
63
63
  page: d,
64
64
  search: u,
65
65
  sort: c,
66
66
  sortDir: i
67
67
  }), K = $(
68
68
  (e) => {
69
- c === e ? q((s) => s === "asc" ? "desc" : "asc") : (m(e), q("desc"));
69
+ c === e ? C((s) => s === "asc" ? "desc" : "asc") : (m(e), C("desc"));
70
70
  },
71
71
  [c]
72
72
  ), V = $(
@@ -75,7 +75,7 @@ function me({ options: a = {} }) {
75
75
  w(null);
76
76
  return;
77
77
  }
78
- _(e);
78
+ L(e);
79
79
  try {
80
80
  const s = await O().explainQuery(e);
81
81
  s && s.error ? w({
@@ -94,23 +94,23 @@ function me({ options: a = {} }) {
94
94
  error: s instanceof Error ? s.message : String(s)
95
95
  });
96
96
  } finally {
97
- _(null);
97
+ L(null);
98
98
  }
99
99
  },
100
100
  [O, o]
101
101
  ), B = $(
102
102
  (e) => {
103
103
  const s = e.id;
104
- return !o || o.queryId !== s ? null : /* @__PURE__ */ t("tr", { className: "ss-dash-explain-row", children: /* @__PURE__ */ t("td", { colSpan: re, className: "ss-dash-explain", children: /* @__PURE__ */ l("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "start" }, children: [
105
- /* @__PURE__ */ t("div", { style: { flex: 1 }, children: o.error ? /* @__PURE__ */ l("div", { className: "ss-dash-explain-result ss-dash-explain-error", children: [
104
+ return !o || o.queryId !== s ? null : /* @__PURE__ */ t("tr", { className: "ss-dash-explain-row", children: /* @__PURE__ */ t("td", { colSpan: re, className: "ss-dash-explain", children: /* @__PURE__ */ r("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "start" }, children: [
105
+ /* @__PURE__ */ t("div", { style: { flex: 1 }, children: o.error ? /* @__PURE__ */ r("div", { className: "ss-dash-explain-result ss-dash-explain-error", children: [
106
106
  /* @__PURE__ */ t("strong", { children: "Error:" }),
107
107
  " ",
108
108
  o.error,
109
- o.message && /* @__PURE__ */ l(v, { children: [
109
+ o.message && /* @__PURE__ */ r(y, { children: [
110
110
  /* @__PURE__ */ t("br", {}),
111
111
  o.message
112
112
  ] })
113
- ] }) : /* @__PURE__ */ t(ne, { plan: o.plan }) }),
113
+ ] }) : /* @__PURE__ */ t(ae, { plan: o.plan }) }),
114
114
  /* @__PURE__ */ t(
115
115
  "button",
116
116
  {
@@ -124,56 +124,56 @@ function me({ options: a = {} }) {
124
124
  ] }) }) });
125
125
  },
126
126
  [o]
127
- ), E = r === "grouped" ? M?.groups || [] : M || [], p = T(() => r !== "grouped" ? E : E.map((e) => {
127
+ ), M = l === "grouped" ? _?.groups || [] : _ || [], h = T(() => l !== "grouped" ? M : M.map((e) => {
128
128
  const s = { ...e };
129
- return s.sqlNormalized ??= b(e, "sql_normalized", "pattern") ?? void 0, s.count ??= b(e, "total_count"), s.avgDuration ??= b(e, "avg_duration"), s.maxDuration ??= b(e, "max_duration"), s.minDuration ??= b(e, "min_duration"), s.totalDuration ??= b(e, "total_duration"), s.percentOfTotal ??= b(e, "pct_time"), s;
130
- }), [E, r]), g = T(() => {
131
- const e = k?.total ?? p.length;
132
- let s = 0, n = 0, h = 0, x = 0;
133
- for (const S of p) {
134
- const P = S.duration || 0;
135
- h += P, x++, P > Z && s++;
129
+ return s.sqlNormalized ??= N(e, "sql_normalized", "pattern") ?? void 0, s.count ??= N(e, "total_count"), s.avgDuration ??= N(e, "avg_duration"), s.maxDuration ??= N(e, "max_duration"), s.minDuration ??= N(e, "min_duration"), s.totalDuration ??= N(e, "total_duration"), s.percentOfTotal ??= N(e, "pct_time"), s;
130
+ }), [M, l]), b = T(() => {
131
+ const e = k?.total ?? h.length;
132
+ let s = 0, a = 0, p = 0, x = 0;
133
+ for (const q of h) {
134
+ const P = q.duration || 0;
135
+ p += P, x++, P > Z && s++;
136
136
  }
137
- const L = /* @__PURE__ */ new Map();
138
- for (const S of p) {
139
- const P = A(S);
140
- L.set(P, (L.get(P) || 0) + 1);
137
+ const E = /* @__PURE__ */ new Map();
138
+ for (const q of h) {
139
+ const P = A(q);
140
+ E.set(P, (E.get(P) || 0) + 1);
141
141
  }
142
- for (const S of L.values())
143
- S > 1 && (n += S);
142
+ for (const q of E.values())
143
+ q > 1 && (a += q);
144
144
  return {
145
145
  total: e,
146
146
  slow: s,
147
- duplicates: n,
148
- avgDuration: x > 0 ? h / x : 0
147
+ duplicates: a,
148
+ avgDuration: x > 0 ? p / x : 0
149
149
  };
150
- }, [p, k]), z = T(() => {
150
+ }, [h, k]), Q = T(() => {
151
151
  const e = /* @__PURE__ */ new Map();
152
- for (const s of p) {
153
- const n = A(s);
154
- e.set(n, (e.get(n) || 0) + 1);
152
+ for (const s of h) {
153
+ const a = A(s);
154
+ e.set(a, (e.get(a) || 0) + 1);
155
155
  }
156
156
  return e;
157
- }, [p]), G = T(() => {
158
- if (r === "grouped")
159
- return `${p.length} query patterns`;
160
- const e = [`${g.total} queries`];
161
- return g.slow > 0 && e.push(`${g.slow} slow`), g.duplicates > 0 && e.push(`${g.duplicates} dup`), e.push(`avg ${(g.avgDuration || 0).toFixed(1)}ms`), e.join(", ");
162
- }, [r, p.length, g]);
163
- return /* @__PURE__ */ l("div", { children: [
157
+ }, [h]), G = T(() => {
158
+ if (l === "grouped")
159
+ return `${h.length} query patterns`;
160
+ const e = [`${b.total} queries`];
161
+ return b.slow > 0 && e.push(`${b.slow} slow`), b.duplicates > 0 && e.push(`${b.duplicates} dup`), e.push(`avg ${(b.avgDuration || 0).toFixed(1)}ms`), e.join(", ");
162
+ }, [l, h.length, b]);
163
+ return /* @__PURE__ */ r("div", { children: [
164
164
  /* @__PURE__ */ t(
165
165
  se,
166
166
  {
167
167
  search: u,
168
- onSearchChange: C,
168
+ onSearchChange: S,
169
169
  placeholder: "Filter queries...",
170
170
  summary: G,
171
- children: /* @__PURE__ */ l("div", { className: "ss-dash-btn-group", children: [
171
+ children: /* @__PURE__ */ r("div", { className: "ss-dash-btn-group", children: [
172
172
  /* @__PURE__ */ t(
173
173
  "button",
174
174
  {
175
175
  type: "button",
176
- className: `ss-dash-btn ${r === "list" ? "ss-dash-active" : ""}`,
176
+ className: `ss-dash-btn ${l === "list" ? "ss-dash-active" : ""}`,
177
177
  onClick: () => I("list"),
178
178
  children: "List"
179
179
  }
@@ -182,7 +182,7 @@ function me({ options: a = {} }) {
182
182
  "button",
183
183
  {
184
184
  type: "button",
185
- className: `ss-dash-btn ${r === "grouped" ? "ss-dash-active" : ""}`,
185
+ className: `ss-dash-btn ${l === "grouped" ? "ss-dash-active" : ""}`,
186
186
  onClick: () => I("grouped"),
187
187
  children: "Grouped"
188
188
  }
@@ -190,7 +190,7 @@ function me({ options: a = {} }) {
190
190
  ] })
191
191
  }
192
192
  ),
193
- J && !M ? /* @__PURE__ */ t("div", { className: "ss-dash-empty", children: "Loading queries..." }) : r === "grouped" ? /* @__PURE__ */ t(v, { children: /* @__PURE__ */ t("div", { className: "ss-dash-table-wrap", children: /* @__PURE__ */ t(
193
+ J && !_ ? /* @__PURE__ */ t("div", { className: "ss-dash-empty", children: "Loading queries..." }) : l === "grouped" ? /* @__PURE__ */ t(y, { children: /* @__PURE__ */ t("div", { className: "ss-dash-table-wrap", children: /* @__PURE__ */ t(
194
194
  U,
195
195
  {
196
196
  columns: [
@@ -198,23 +198,23 @@ function me({ options: a = {} }) {
198
198
  key: "sqlNormalized",
199
199
  label: "Pattern",
200
200
  render: (e, s) => {
201
- const n = e || "", h = (s.count || 0) >= 3;
202
- return /* @__PURE__ */ l(v, { children: [
201
+ const a = e || "", p = (s.count || 0) >= 3;
202
+ return /* @__PURE__ */ r(y, { children: [
203
203
  /* @__PURE__ */ t(
204
204
  "span",
205
205
  {
206
- className: `ss-dash-sql ${N === n ? "ss-dash-expanded" : ""}`,
206
+ className: `ss-dash-sql ${v === a ? "ss-dash-expanded" : ""}`,
207
207
  title: "Click to expand",
208
208
  onClick: (x) => {
209
- x.stopPropagation(), D(N === n ? null : n);
209
+ x.stopPropagation(), D(v === a ? null : a);
210
210
  },
211
211
  role: "button",
212
212
  tabIndex: 0,
213
- onKeyDown: (x) => x.key === "Enter" && D(N === n ? null : n),
214
- children: n
213
+ onKeyDown: (x) => x.key === "Enter" && D(v === a ? null : a),
214
+ children: a
215
215
  }
216
216
  ),
217
- h && /* @__PURE__ */ l(v, { children: [
217
+ p && /* @__PURE__ */ r(y, { children: [
218
218
  " ",
219
219
  /* @__PURE__ */ t("span", { className: "ss-dash-dup", children: "DUP" })
220
220
  ] })
@@ -291,14 +291,22 @@ function me({ options: a = {} }) {
291
291
  )
292
292
  }
293
293
  ],
294
- data: p,
294
+ data: h,
295
295
  keyField: "sqlNormalized",
296
296
  sort: c,
297
297
  sortDir: i,
298
298
  onSort: K,
299
- emptyMessage: "No queries recorded"
299
+ emptyMessage: /* @__PURE__ */ r(y, { children: [
300
+ "No queries recorded",
301
+ /* @__PURE__ */ r("span", { className: "ss-empty-hint", children: [
302
+ "Queries require ",
303
+ /* @__PURE__ */ t("code", { children: "debug: true" }),
304
+ " on your Lucid connections in ",
305
+ /* @__PURE__ */ t("code", { children: "config/database.ts" })
306
+ ] })
307
+ ] })
300
308
  }
301
- ) }) }) : /* @__PURE__ */ l(v, { children: [
309
+ ) }) }) : /* @__PURE__ */ r(y, { children: [
302
310
  /* @__PURE__ */ t("div", { className: "ss-dash-table-wrap", children: /* @__PURE__ */ t(
303
311
  U,
304
312
  {
@@ -313,29 +321,29 @@ function me({ options: a = {} }) {
313
321
  key: "sql",
314
322
  label: "SQL",
315
323
  render: (e, s) => {
316
- const n = s.sql || s.sql_text || "";
317
- return /* @__PURE__ */ l("div", { children: [
324
+ const a = s.sql || s.sql_text || "";
325
+ return /* @__PURE__ */ r("div", { children: [
318
326
  /* @__PURE__ */ t(
319
327
  "span",
320
328
  {
321
- className: `ss-dash-sql ${N === s.id ? "ss-dash-expanded" : ""}`,
329
+ className: `ss-dash-sql ${v === s.id ? "ss-dash-expanded" : ""}`,
322
330
  title: "Click to expand",
323
- onClick: (h) => {
324
- h.stopPropagation(), D(
325
- N === s.id ? null : s.id
331
+ onClick: (p) => {
332
+ p.stopPropagation(), D(
333
+ v === s.id ? null : s.id
326
334
  );
327
335
  },
328
336
  role: "button",
329
337
  tabIndex: 0,
330
- onKeyDown: (h) => h.key === "Enter" && D(
331
- N === s.id ? null : s.id
338
+ onKeyDown: (p) => p.key === "Enter" && D(
339
+ v === s.id ? null : s.id
332
340
  ),
333
- children: n
341
+ children: a
334
342
  }
335
343
  ),
336
- (z.get(A(s)) ?? 0) > 1 && /* @__PURE__ */ l("span", { className: "ss-dash-dup", children: [
344
+ (Q.get(A(s)) ?? 0) > 1 && /* @__PURE__ */ r("span", { className: "ss-dash-dup", children: [
337
345
  "×",
338
- z.get(A(s))
346
+ Q.get(A(s))
339
347
  ] })
340
348
  ] });
341
349
  }
@@ -361,8 +369,8 @@ function me({ options: a = {} }) {
361
369
  label: "Method",
362
370
  width: "60px",
363
371
  render: (e, s) => {
364
- const n = Q(s);
365
- return /* @__PURE__ */ t("span", { className: `ss-dash-method ss-dash-method-${n.toLowerCase()}`, children: n });
372
+ const a = z(s);
373
+ return /* @__PURE__ */ t("span", { className: `ss-dash-method ss-dash-method-${a.toLowerCase()}`, children: a });
366
374
  }
367
375
  },
368
376
  {
@@ -406,8 +414,8 @@ function me({ options: a = {} }) {
406
414
  width: "90px",
407
415
  sortable: !0,
408
416
  render: (e, s) => {
409
- const n = e || (Y(s) ?? "");
410
- return /* @__PURE__ */ t(te, { ts: n, className: "ss-dash-event-time" });
417
+ const a = e || (Y(s) ?? "");
418
+ return /* @__PURE__ */ t(te, { ts: a, className: "ss-dash-event-time" });
411
419
  }
412
420
  },
413
421
  {
@@ -415,13 +423,13 @@ function me({ options: a = {} }) {
415
423
  label: "",
416
424
  width: "70px",
417
425
  render: (e, s) => {
418
- if (Q(s) !== "select") return null;
419
- const h = o?.queryId === s.id && !o?.error;
426
+ if (z(s) !== "select") return null;
427
+ const p = o?.queryId === s.id && !o?.error;
420
428
  return /* @__PURE__ */ t(
421
429
  "button",
422
430
  {
423
431
  type: "button",
424
- className: `ss-dash-explain-btn${h ? " ss-dash-explain-btn-active" : ""}`,
432
+ className: `ss-dash-explain-btn${p ? " ss-dash-explain-btn-active" : ""}`,
425
433
  onClick: (x) => {
426
434
  x.stopPropagation(), V(s.id);
427
435
  },
@@ -432,16 +440,24 @@ function me({ options: a = {} }) {
432
440
  }
433
441
  }
434
442
  ],
435
- data: p,
443
+ data: h,
436
444
  sort: c,
437
445
  sortDir: i,
438
446
  onSort: K,
439
- emptyMessage: "No queries recorded",
447
+ emptyMessage: /* @__PURE__ */ r(y, { children: [
448
+ "No queries recorded",
449
+ /* @__PURE__ */ r("span", { className: "ss-empty-hint", children: [
450
+ "Queries require ",
451
+ /* @__PURE__ */ t("code", { children: "debug: true" }),
452
+ " on your Lucid connections in ",
453
+ /* @__PURE__ */ t("code", { children: "config/database.ts" })
454
+ ] })
455
+ ] }),
440
456
  renderAfterRow: B
441
457
  }
442
458
  ) }),
443
459
  k && /* @__PURE__ */ t(
444
- ae,
460
+ ne,
445
461
  {
446
462
  page: k.page,
447
463
  lastPage: k.lastPage,
@@ -1,13 +1,13 @@
1
1
  import { jsx as e, jsxs as t, Fragment as w } from "react/jsx-runtime";
2
- import { useState as m, useMemo as i, useCallback as C } from "react";
3
- import { filterQueries as v, countDuplicateQueries as D, computeQuerySummary as S, formatDuration as p, durationClassName as T } from "adonisjs-server-stats/core";
4
- import { T as Q } from "./TimeAgoCell-o3KigGfM.js";
5
- import { u as M, M as $ } from "./index-DwDK-4oX.js";
2
+ import { useState as m, useMemo as l, useCallback as C } from "react";
3
+ import { filterQueries as v, countDuplicateQueries as D, computeQuerySummary as Q, formatDuration as p, durationClassName as S } from "adonisjs-server-stats/core";
4
+ import { T } from "./TimeAgoCell-o3KigGfM.js";
5
+ import { u as M, M as $ } from "./index-C4EMJrkH.js";
6
6
  import { u as E } from "./useResizableTable-CNJmACdt.js";
7
7
  import { F } from "./FilterBar-CQ7bD669.js";
8
8
  function A({ options: g }) {
9
- const { data: n, isLoading: b, error: u } = M("queries", g), [o, f] = m(""), [y, x] = m(null), d = i(() => n?.queries || [], [n]), r = i(() => v(d, o), [d, o]), a = i(() => D(d), [d]), l = i(
10
- () => S(d, a),
9
+ const { data: n, isLoading: b, error: u } = M("queries", g), [o, y] = m(""), [f, x] = m(null), d = l(() => n?.queries || [], [n]), r = l(() => v(d, o), [d, o]), a = l(() => D(d), [d]), i = l(
10
+ () => Q(d, a),
11
11
  [d, a]
12
12
  ), h = C((s) => {
13
13
  x((c) => c === s ? null : s);
@@ -20,18 +20,27 @@ function A({ options: g }) {
20
20
  F,
21
21
  {
22
22
  search: o,
23
- onSearchChange: f,
23
+ onSearchChange: y,
24
24
  placeholder: "Filter queries...",
25
25
  summary: /* @__PURE__ */ t(w, { children: [
26
26
  r.length,
27
27
  " queries",
28
- l.slowCount > 0 && ` | ${l.slowCount} slow`,
29
- l.dupCount > 0 && ` | ${l.dupCount} dup`,
30
- r.length > 0 && ` | avg ${p(l.avgDuration)}`
28
+ i.slowCount > 0 && ` | ${i.slowCount} slow`,
29
+ i.dupCount > 0 && ` | ${i.dupCount} dup`,
30
+ r.length > 0 && ` | avg ${p(i.avgDuration)}`
31
31
  ] })
32
32
  }
33
33
  ),
34
- r.length === 0 ? /* @__PURE__ */ e("div", { className: "ss-dbg-empty", children: "No queries captured" }) : /* @__PURE__ */ t("table", { ref: N, className: "ss-dbg-table", children: [
34
+ r.length === 0 ? /* @__PURE__ */ t("div", { className: "ss-dbg-empty", children: [
35
+ /* @__PURE__ */ e("span", { children: "No queries captured" }),
36
+ /* @__PURE__ */ t("span", { className: "ss-empty-hint", children: [
37
+ "Queries require ",
38
+ /* @__PURE__ */ e("code", { children: "debug: true" }),
39
+ " on your Lucid connections in",
40
+ " ",
41
+ /* @__PURE__ */ e("code", { children: "config/database.ts" })
42
+ ] })
43
+ ] }) : /* @__PURE__ */ t("table", { ref: N, className: "ss-dbg-table", children: [
35
44
  /* @__PURE__ */ t("colgroup", { children: [
36
45
  /* @__PURE__ */ e("col", { style: { width: "50px" } }),
37
46
  /* @__PURE__ */ e("col", {}),
@@ -54,7 +63,7 @@ function A({ options: g }) {
54
63
  /* @__PURE__ */ e(
55
64
  "span",
56
65
  {
57
- className: `ss-dbg-sql ${y === s.id ? "ss-dbg-expanded" : ""}`,
66
+ className: `ss-dbg-sql ${f === s.id ? "ss-dbg-expanded" : ""}`,
58
67
  onClick: () => h(s.id),
59
68
  role: "button",
60
69
  tabIndex: 0,
@@ -71,13 +80,13 @@ function A({ options: g }) {
71
80
  /* @__PURE__ */ e(
72
81
  "td",
73
82
  {
74
- className: `ss-dbg-duration ${T(s.duration, "ss-dbg")}`,
83
+ className: `ss-dbg-duration ${S(s.duration, "ss-dbg")}`,
75
84
  children: p(s.duration)
76
85
  }
77
86
  ),
78
87
  /* @__PURE__ */ e("td", { children: /* @__PURE__ */ e($, { method: s.method, classPrefix: "ss-dbg" }) }),
79
88
  /* @__PURE__ */ e("td", { className: "ss-dbg-c-muted", children: s.model || "-" }),
80
- /* @__PURE__ */ e("td", { children: /* @__PURE__ */ e(Q, { ts: s.timestamp, className: "ss-dbg-event-time" }) })
89
+ /* @__PURE__ */ e("td", { children: /* @__PURE__ */ e(T, { ts: s.timestamp, className: "ss-dbg-event-time" }) })
81
90
  ] }, s.id)) })
82
91
  ] })
83
92
  ] });
@@ -3,8 +3,8 @@ import { useMemo as $, useState as g, useEffect as E, useCallback as L } from "r
3
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
4
  import { T as Y } from "./TimeAgoCell-o3KigGfM.js";
5
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";
6
+ import { a as V, M as D, S as R } from "./index-C4EMJrkH.js";
7
+ import { S as H, R as J } from "./SplitPaneWrapper-B05Mg6Sg.js";
8
8
  import { D as Q } from "./DataTable-YyShr5B-.js";
9
9
  import { F as X } from "./FilterBar-CQ7bD669.js";
10
10
  import { P as Z } from "./Pagination-BkmzUDY8.js";
@@ -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-DwDK-4oX.js";
3
+ import { a as u, M as f } from "./index-C4EMJrkH.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,6 +1,6 @@
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, M as f } from "./index-DwDK-4oX.js";
3
+ import { u as b, M as f } from "./index-C4EMJrkH.js";
4
4
  import { u as w } from "./useResizableTable-CNJmACdt.js";
5
5
  import { F as N } from "./FilterBar-CQ7bD669.js";
6
6
  function R({ options: o, currentPath: n }) {
@@ -1,6 +1,6 @@
1
1
  import { jsxs as c, jsx as l } from "react/jsx-runtime";
2
2
  import { useState as d, useRef as o, useEffect as u } from "react";
3
- import { L as p } from "./LogEntryRow-CMMkqA9M.js";
3
+ import { L as p } from "./LogEntryRow-DFI52ZEw.js";
4
4
  import { initSplitPane as f } from "adonisjs-server-stats/core";
5
5
  function v({ logs: n, onReqIdClick: a }) {
6
6
  const [t, s] = d(null);
@@ -2,11 +2,11 @@ import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
2
  import { useState as i, useMemo as q, useEffect as I, useCallback as O } from "react";
3
3
  import { formatDuration as m, durationClassName as j } from "adonisjs-server-stats/core";
4
4
  import { u as U } from "./useApiClient-BVtNCmnL.js";
5
- import { u as W, M as D, S as L } from "./index-DwDK-4oX.js";
5
+ import { u as W, M as D, S as L } from "./index-C4EMJrkH.js";
6
6
  import { T as _ } from "./TimeAgoCell-o3KigGfM.js";
7
7
  import { u as z } from "./useResizableTable-CNJmACdt.js";
8
8
  import { F as G } from "./FilterBar-CQ7bD669.js";
9
- import { S as K, R as V } from "./SplitPaneWrapper-BiIgT4ND.js";
9
+ import { S as K, R as V } from "./SplitPaneWrapper-B05Mg6Sg.js";
10
10
  const S = {
11
11
  request: "#1e3a5f",
12
12
  middleware: "rgba(30, 58, 95, 0.7)",
@@ -15,7 +15,7 @@ interface DataTableProps<T> {
15
15
  onSort?: (key: string) => void;
16
16
  onRowClick?: (row: T) => void;
17
17
  rowClassName?: string | ((row: T) => string);
18
- emptyMessage?: string;
18
+ emptyMessage?: React.ReactNode;
19
19
  className?: string;
20
20
  renderAfterRow?: (row: T, index: number) => React.ReactNode;
21
21
  }
@@ -435,7 +435,7 @@ function A({
435
435
  }
436
436
  );
437
437
  }
438
- const ge = L(() => import("./QueriesTab-x85PjkyS.js")), me = L(() => import("./EventsTab-B-FoehXC.js")), ve = L(() => import("./EmailsTab-Ch8jp10B.js")), fe = L(() => import("./RoutesTab-CbzBOzpc.js")), we = L(() => import("./LogsTab-CS4sLfLw.js")), ke = L(() => import("./TimelineTab-Ue9tUD_n.js")), Ne = L(() => import("./CacheTab-DOhuK05d.js")), ye = L(() => import("./JobsTab-DqnifQXV.js")), Ce = L(() => import("./ConfigTab-C8kriE2b.js")), Se = L(() => import("./InternalsTab-CkEKpRMU.js")), Le = L(() => import("./CustomPaneTab-CvzQS_Wh.js"));
438
+ const ge = L(() => import("./QueriesTab-CQHa1ck3.js")), me = L(() => import("./EventsTab-BRRSW6RI.js")), ve = L(() => import("./EmailsTab-DKxK322z.js")), fe = L(() => import("./RoutesTab-RfhCUbkx.js")), we = L(() => import("./LogsTab-CV4Gf_yb.js")), ke = L(() => import("./TimelineTab-Dx4686Ti.js")), Ne = L(() => import("./CacheTab-D9o6bsPc.js")), ye = L(() => import("./JobsTab-CQXWCrl8.js")), Ce = L(() => import("./ConfigTab-CT-Tu-ct.js")), Se = L(() => import("./InternalsTab--RD-L1dX.js")), Le = L(() => import("./CustomPaneTab-CvIPe7NP.js"));
439
439
  function Qe(s) {
440
440
  const {
441
441
  defaultOpen: o = !1,
@@ -724,7 +724,7 @@ const De = [
724
724
  "jobs",
725
725
  "config",
726
726
  "internals"
727
- ], Re = L(() => import("./OverviewSection-CxvfOR0v.js")), Oe = L(() => import("./RequestsSection-DETN9oZb.js")), _e = L(() => import("./QueriesSection-CrMdU5Ax.js")), je = L(() => import("./EventsSection-DJPwHeT8.js")), Pe = L(() => import("./RoutesSection-CmorkJeC.js")), He = L(() => import("./LogsSection-C1xC5aP4.js")), qe = L(() => import("./EmailsSection-BJyFJf7A.js")), Ue = L(() => import("./CacheSection-BYN53kYO.js")), Fe = L(() => import("./JobsSection-DWF4i1t_.js")), Ae = L(() => import("./ConfigSection-B9EHh4Rp.js")), ze = L(() => import("./InternalsSection-B6VlVx5f.js"));
727
+ ], Re = L(() => import("./OverviewSection-CxF9cabq.js")), Oe = L(() => import("./RequestsSection-Cb5YeqvI.js")), _e = L(() => import("./QueriesSection-CZJ-imAb.js")), je = L(() => import("./EventsSection-D3AK0mhw.js")), Pe = L(() => import("./RoutesSection-B43olD9v.js")), He = L(() => import("./LogsSection-CW2hQ976.js")), qe = L(() => import("./EmailsSection-B1LT7Nx3.js")), Ue = L(() => import("./CacheSection-DOUnyUrw.js")), Fe = L(() => import("./JobsSection-BMvj5886.js")), Ae = L(() => import("./ConfigSection-DzNC7pOJ.js")), ze = L(() => import("./InternalsSection-BwrTfpjA.js"));
728
728
  function Xe(s) {
729
729
  const {
730
730
  baseUrl: o = "",
@@ -1,4 +1,4 @@
1
- import { B as s, D as t, c as r, J as u, M as g, d as o, d, S as D, T as S, e as h, a as B, u as T, f as b, g as l, h as m } from "./index-DwDK-4oX.js";
1
+ import { B as s, D as t, c as r, J as u, M as g, d as o, d, S as D, T as S, e as h, a as B, u as T, f as b, g as l, h as m } from "./index-C4EMJrkH.js";
2
2
  export {
3
3
  s as Badge,
4
4
  t as DashboardPage,