adonisjs-server-stats 1.12.0 → 1.12.2

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 (57) hide show
  1. package/README.md +19 -1
  2. package/dist/core/api-client.d.ts +1 -1
  3. package/dist/core/index.js +1 -1
  4. package/dist/react/{CacheSection-DZFOiOYH.js → CacheSection-CX2duJuc.js} +1 -1
  5. package/dist/react/{CacheTab-D8js5o69.js → CacheTab-CgT4t0oZ.js} +1 -1
  6. package/dist/react/{ConfigSection-DoJmvNkF.js → ConfigSection-Dt0FyeaW.js} +1 -1
  7. package/dist/react/{ConfigTab-CDvljuBF.js → ConfigTab-KtiTtsrj.js} +1 -1
  8. package/dist/react/{CustomPaneTab-Db9eIQ-9.js → CustomPaneTab-15QoEplP.js} +1 -1
  9. package/dist/react/{EmailsTab-BITuGTQm.js → EmailsTab-CUjubln_.js} +2 -2
  10. package/dist/react/{EventsSection-7mDZv70I.js → EventsSection-GGPoYSNv.js} +1 -1
  11. package/dist/react/{EventsTab-DF13BChE.js → EventsTab-Wdwr0_ny.js} +1 -1
  12. package/dist/react/{JobsSection-B_VJFWy6.js → JobsSection-BqqIh_DR.js} +1 -1
  13. package/dist/react/{JobsTab-DK8Fl9nz.js → JobsTab-CBrU-ryL.js} +1 -1
  14. package/dist/react/{LogEntryRow-Bdie9SFe.js → LogEntryRow-BOrRkhRU.js} +1 -1
  15. package/dist/react/{LogsSection-CrWqxWRr.js → LogsSection-Cm_lphM6.js} +2 -2
  16. package/dist/react/{LogsTab-DYSpL637.js → LogsTab-jKwv9G7Q.js} +2 -2
  17. package/dist/react/{OverviewSection-CuaccMZt.js → OverviewSection-XF7bakyM.js} +1 -1
  18. package/dist/react/QueriesSection-DsQBKrNK.js +123 -0
  19. package/dist/react/QueriesTab-CxCC1GVq.js +87 -0
  20. package/dist/react/{RequestsSection-mENyeNsk.js → RequestsSection-D8cMbZU0.js} +2 -2
  21. package/dist/react/{RoutesSection-DjovlaNS.js → RoutesSection-D0y5JQP4.js} +1 -1
  22. package/dist/react/{RoutesTab-CbQECiUc.js → RoutesTab-Y_alJVMV.js} +1 -1
  23. package/dist/react/{SplitPaneWrapper-DyRyH5Re.js → SplitPaneWrapper-CZl1ouIT.js} +1 -1
  24. package/dist/react/{TimelineTab-BKTFbsPe.js → TimelineTab-HyqZpfbp.js} +2 -2
  25. package/dist/react/{index-CAUHa8QX.js → index-CsprmgzI.js} +2 -2
  26. package/dist/react/index.js +1 -1
  27. package/dist/src/edge/client/dashboard.js +2 -2
  28. package/dist/src/edge/client/debug-panel-deferred.js +1 -1
  29. package/dist/src/edge/client/stats-bar.js +1 -1
  30. package/dist/src/edge/client-vue/dashboard.js +3 -3
  31. package/dist/src/edge/client-vue/debug-panel-deferred.js +1 -1
  32. package/dist/src/edge/client-vue/stats-bar.js +1 -1
  33. package/dist/src/provider/auth_middleware_detector.d.ts +12 -6
  34. package/dist/src/provider/auth_middleware_detector.js +53 -6
  35. package/dist/src/provider/boot_helpers.d.ts +1 -0
  36. package/dist/src/provider/boot_helpers.js +7 -1
  37. package/dist/src/provider/server_stats_provider.js +2 -1
  38. package/dist/src/routes/no_session_middleware.d.ts +14 -0
  39. package/dist/src/routes/no_session_middleware.js +16 -0
  40. package/dist/src/routes/register_routes.js +5 -1
  41. package/dist/vue/{CacheSection-Bx41lpfK.js → CacheSection-DRqV3YX2.js} +1 -1
  42. package/dist/vue/{ConfigSection-fkfUdCmx.js → ConfigSection-C6pQCHAL.js} +1 -1
  43. package/dist/vue/{EmailsSection-CbcDKF9Q.js → EmailsSection-BTNw3ZU2.js} +1 -1
  44. package/dist/vue/{EmailsTab-CNyEODVB.js → EmailsTab-CwIF1fik.js} +1 -1
  45. package/dist/vue/{EventsSection-CWbTYOBi.js → EventsSection-BpgkWIwM.js} +1 -1
  46. package/dist/vue/{JobsSection-CGGO6rtS.js → JobsSection-DrghFEKL.js} +1 -1
  47. package/dist/vue/{LogsSection-BPB-C-XA.js → LogsSection-BDxx9Bfi.js} +1 -1
  48. package/dist/vue/{OverviewSection-BTcnPeoM.js → OverviewSection-BAgZTPjY.js} +1 -1
  49. package/dist/vue/{QueriesSection-2SE3igQJ.js → QueriesSection-CUpwhp7u.js} +127 -115
  50. package/dist/vue/{RequestsSection-DXcG5Zok.js → RequestsSection-D8P2xpF2.js} +1 -1
  51. package/dist/vue/{RoutesSection-BkNGWdoP.js → RoutesSection-0qB81hTT.js} +1 -1
  52. package/dist/vue/{index-CptF6Qbp.js → index-30jLw-_w.js} +2 -2
  53. package/dist/vue/index.js +1 -1
  54. package/package.json +1 -1
  55. package/dist/react/QueriesSection-CvGGh5Ij.js +0 -117
  56. package/dist/react/QueriesTab-C7CCwhVc.js +0 -87
  57. package/dist/react/{EmailsSection-D7oxvAjA.js → EmailsSection-YcJYR5eA.js} +1 -1
@@ -1,6 +1,6 @@
1
- import { defineComponent as he, inject as z, ref as T, computed as c, openBlock as a, createElementBlock as l, createVNode as me, withCtx as ve, createElementVNode as s, normalizeClass as v, unref as d, Fragment as u, renderList as _, createTextVNode as h, toDisplayString as o, createCommentVNode as p, withKeys as G, withModifiers as F, normalizeStyle as H, createBlock as ye } from "vue";
2
- import { QueriesController as fe, getDashboardListColumns as _e, getDashboardGroupedColumns as xe, resolveField as g, normalizeDashboardQuery as ge, buildSqlCounts as ke, computeDashboardQuerySummary as be, formatTime as we, timeAgo as Ce, formatCellValue as De, flattenPlanTree as Ee, getExplainColumns as $e, hasNestedPlan as Se, durationClassName as ze } from "adonisjs-server-stats/core";
3
- import { u as Ne } from "./index-CptF6Qbp.js";
1
+ import { defineComponent as he, inject as z, ref as T, computed as p, openBlock as a, createElementBlock as l, createVNode as me, withCtx as ve, createElementVNode as s, normalizeClass as f, unref as c, Fragment as d, renderList as x, createTextVNode as v, toDisplayString as o, createCommentVNode as h, withKeys as G, withModifiers as F, normalizeStyle as H, createBlock as ye } from "vue";
2
+ import { QueriesController as fe, getDashboardListColumns as _e, getDashboardGroupedColumns as xe, resolveField as b, normalizeDashboardQuery as ge, buildSqlCounts as be, computeDashboardQuerySummary as ke, formatTime as we, timeAgo as Ce, formatCellValue as $e, flattenPlanTree as De, getExplainColumns as Ee, hasNestedPlan as Se, durationClassName as Ne } from "adonisjs-server-stats/core";
3
+ import { u as ze } from "./index-30jLw-_w.js";
4
4
  import { u as Pe } from "./useResizableTable-BoivAevK.js";
5
5
  import { _ as Te } from "./FilterBar.vue_vue_type_script_setup_true_lang-ClJ37hhT.js";
6
6
  import { _ as Fe } from "./PaginationControls.vue_vue_type_script_setup_true_lang-CuN7g_8Z.js";
@@ -10,16 +10,16 @@ const Le = { class: "ss-dash-btn-group" }, Qe = {
10
10
  }, Ve = {
11
11
  key: 1,
12
12
  class: "ss-dash-table-wrap"
13
- }, Re = ["onClick"], je = {
13
+ }, Re = ["onClick"], Me = {
14
14
  key: 0,
15
15
  class: "ss-dash-sort-arrow"
16
- }, Ke = ["onClick", "onKeydown"], Me = {
16
+ }, je = ["onClick", "onKeydown"], Ke = {
17
17
  key: 0,
18
18
  class: "ss-dash-dup"
19
19
  }, Oe = { style: { color: "var(--ss-muted)", "text-align": "center", display: "block" } }, Ae = { class: "ss-dash-duration" }, Be = { class: "ss-dash-duration" }, Ue = { style: { color: "var(--ss-muted)", "text-align": "center", display: "block" } }, Ge = {
20
20
  key: 1,
21
21
  class: "ss-dash-empty"
22
- }, He = { class: "ss-dash-table-wrap" }, Xe = ["onClick"], Je = {
22
+ }, He = { class: "ss-dash-table-wrap" }, Je = ["onClick"], Xe = {
23
23
  key: 0,
24
24
  class: "ss-dash-sort-arrow"
25
25
  }, We = { key: 1 }, Ye = { style: { color: "var(--ss-dim)" } }, Ze = ["onClick", "onKeydown"], Ie = {
@@ -52,40 +52,40 @@ const Le = { class: "ss-dash-btn-group" }, Qe = {
52
52
  }, Ct = /* @__PURE__ */ he({
53
53
  __name: "QueriesSection",
54
54
  setup(ft) {
55
- const X = z("ss-refresh-key", T(0)), J = z("ss-dashboard-endpoint", "/__stats/api"), W = z("ss-auth-token", void 0), Y = z("ss-base-url", ""), i = new fe("list"), x = T(0);
55
+ const J = z("ss-refresh-key", T(0)), X = z("ss-dashboard-endpoint", "/__stats/api"), W = z("ss-auth-token", void 0), Y = z("ss-base-url", ""), i = new fe("list"), g = T(0);
56
56
  function k() {
57
- x.value++;
57
+ g.value++;
58
58
  }
59
- const y = c(() => (x.value, i.state.viewMode));
60
- c(() => (x.value, i.state.expandedIds)), c(() => (x.value, i.state.explainData));
61
- const L = c(() => _e()), Z = c(() => xe()), I = c(() => y.value === "grouped" ? "queries/grouped" : "queries"), { data: w, loading: q, pagination: C, sort: E, goToPage: ee, setSearch: te, setSort: se, explainQuery: ne } = Ne(() => I.value, {
59
+ const _ = p(() => (g.value, i.state.viewMode));
60
+ p(() => (g.value, i.state.expandedIds)), p(() => (g.value, i.state.explainData));
61
+ const L = p(() => _e()), Z = p(() => xe()), I = p(() => _.value === "grouped" ? "queries/grouped" : "queries"), { data: C, loading: q, pagination: $, sort: E, goToPage: ee, setSearch: te, setSort: se, explainQuery: ne } = ze(() => I.value, {
62
62
  baseUrl: Y,
63
- dashboardEndpoint: J,
63
+ dashboardEndpoint: X,
64
64
  authToken: W,
65
- refreshKey: X
66
- }), Q = T(""), D = c(() => w.value ? y.value === "grouped" ? w.value.groups || [] : w.value.data || w.value || [] : []), $ = c(() => y.value !== "grouped" ? D.value : D.value.map((n) => {
65
+ refreshKey: J
66
+ }), Q = T(""), D = p(() => C.value ? _.value === "grouped" ? C.value.groups || [] : C.value.data || C.value || [] : []), S = p(() => _.value !== "grouped" ? D.value : D.value.map((n) => {
67
67
  const t = { ...n };
68
- return (t.sqlNormalized === null || t.sqlNormalized === void 0) && (t.sqlNormalized = g(n, "sql_normalized", "pattern") ?? ""), (t.count === null || t.count === void 0) && (t.count = g(n, "total_count") ?? void 0), (t.avgDuration === null || t.avgDuration === void 0) && (t.avgDuration = g(n, "avg_duration") ?? void 0), (t.maxDuration === null || t.maxDuration === void 0) && (t.maxDuration = g(n, "max_duration") ?? void 0), (t.minDuration === null || t.minDuration === void 0) && (t.minDuration = g(n, "min_duration") ?? void 0), (t.totalDuration === null || t.totalDuration === void 0) && (t.totalDuration = g(n, "total_duration") ?? void 0), (t.percentOfTotal === null || t.percentOfTotal === void 0) && (t.percentOfTotal = g(n, "pct_time") ?? void 0), t;
69
- })), V = c(() => y.value !== "list" ? [] : D.value.map((n) => ge(n))), R = c(() => ke(D.value)), b = c(() => be(D.value, {
70
- total: C.total
71
- })), ae = c(() => {
72
- if (y.value === "grouped") return `${$.value.length} query patterns`;
73
- const n = [`${b.value.totalCount} queries`];
74
- return b.value.slowCount > 0 && n.push(`${b.value.slowCount} slow`), b.value.dupCount > 0 && n.push(`${b.value.dupCount} dup`), n.push(`avg ${(b.value.avgDuration || 0).toFixed(1)}ms`), n.join(", ");
68
+ return (t.sqlNormalized === null || t.sqlNormalized === void 0) && (t.sqlNormalized = b(n, "sql_normalized", "pattern") ?? ""), (t.count === null || t.count === void 0) && (t.count = b(n, "total_count") ?? void 0), (t.avgDuration === null || t.avgDuration === void 0) && (t.avgDuration = b(n, "avg_duration") ?? void 0), (t.maxDuration === null || t.maxDuration === void 0) && (t.maxDuration = b(n, "max_duration") ?? void 0), (t.minDuration === null || t.minDuration === void 0) && (t.minDuration = b(n, "min_duration") ?? void 0), (t.totalDuration === null || t.totalDuration === void 0) && (t.totalDuration = b(n, "total_duration") ?? void 0), (t.percentOfTotal === null || t.percentOfTotal === void 0) && (t.percentOfTotal = b(n, "pct_time") ?? void 0), t;
69
+ })), V = p(() => _.value !== "list" ? [] : D.value.map((n) => ge(n))), R = p(() => be(D.value)), w = p(() => ke(D.value, {
70
+ total: $.total
71
+ })), ae = p(() => {
72
+ if (_.value === "grouped") return `${S.value.length} query patterns`;
73
+ const n = [`${w.value.totalCount} queries`];
74
+ return w.value.slowCount > 0 && n.push(`${w.value.slowCount} slow`), w.value.dupCount > 0 && n.push(`${w.value.dupCount} dup`), n.push(`avg ${(w.value.avgDuration || 0).toFixed(1)}ms`), n.join(", ");
75
75
  });
76
76
  function le(n) {
77
77
  Q.value = n, te(n);
78
78
  }
79
- function j(n) {
80
- n !== y.value && (i.setViewMode(n), k());
79
+ function M(n) {
80
+ n !== _.value && (i.setViewMode(n), k());
81
81
  }
82
- function K(n) {
82
+ function j(n) {
83
83
  se(n);
84
84
  }
85
- function M(n) {
86
- return x.value, i.isExpanded(n);
85
+ function K(n) {
86
+ return g.value, i.isExpanded(n);
87
87
  }
88
- function S(n) {
88
+ function N(n) {
89
89
  i.toggleExpand(n), k();
90
90
  }
91
91
  async function oe(n) {
@@ -97,23 +97,35 @@ const Le = { class: "ss-dash-btn-group" }, Qe = {
97
97
  i.startExplain(n), k();
98
98
  try {
99
99
  const e = await ne(n);
100
- e && e.error ? i.completeExplain(n, { rows: [], error: e.error, message: e.message }) : i.completeExplain(n, {
101
- plan: e?.plan,
102
- rows: e?.rows
103
- });
100
+ if (e && e.error) {
101
+ const u = e.message ? `${e.error}: ${e.message}` : e.error;
102
+ i.failExplain(n, u);
103
+ } else
104
+ i.completeExplain(n, {
105
+ plan: e?.plan,
106
+ rows: e?.rows
107
+ });
104
108
  } catch (e) {
105
- i.failExplain(n, e instanceof Error ? e.message : String(e));
109
+ let u = e instanceof Error ? e.message : String(e);
110
+ const r = e?.body;
111
+ if (r)
112
+ try {
113
+ const m = JSON.parse(r);
114
+ m.message ? u = m.error ? `${m.error}: ${m.message}` : m.message : m.error && (u = m.error);
115
+ } catch {
116
+ }
117
+ i.failExplain(n, u);
106
118
  }
107
119
  k();
108
120
  }
109
- function m(n) {
110
- return x.value, i.getExplainState(n);
121
+ function y(n) {
122
+ return g.value, i.getExplainState(n);
111
123
  }
112
124
  function O(n) {
113
- return x.value, i.getExplainState(n)?.loading ?? !1;
125
+ return g.value, i.getExplainState(n)?.loading ?? !1;
114
126
  }
115
127
  function re(n) {
116
- x.value;
128
+ g.value;
117
129
  const t = i.getExplainState(n);
118
130
  return !!t && !t.loading && !t.error && !!t.result;
119
131
  }
@@ -121,39 +133,39 @@ const Le = { class: "ss-dash-btn-group" }, Qe = {
121
133
  i.state.explainData.delete(n), k();
122
134
  }
123
135
  function ue(n) {
124
- const t = m(n);
136
+ const t = y(n);
125
137
  if (!t?.result) return [];
126
138
  const e = t.result.plan || t.result.rows;
127
139
  if (!e || e.length === 0) return [];
128
- const f = e[0];
129
- return !f || typeof f != "object" ? [] : "Plan" in f ? Ee(f.Plan) : [];
140
+ const u = e[0];
141
+ return !u || typeof u != "object" ? [] : "Plan" in u ? De(u.Plan) : [];
130
142
  }
131
143
  function A(n) {
132
- const t = m(n);
144
+ const t = y(n);
133
145
  if (!t?.result) return [];
134
146
  const e = t.result.plan || t.result.rows;
135
- return !e || e.length === 0 ? [] : $e(e);
147
+ return !e || e.length === 0 ? [] : Ee(e);
136
148
  }
137
149
  function de(n) {
138
- const t = m(n);
150
+ const t = y(n);
139
151
  return t?.result ? t.result.plan || t.result.rows || [] : [];
140
152
  }
141
153
  function ce(n) {
142
- const t = m(n);
154
+ const t = y(n);
143
155
  if (!t?.result) return !1;
144
156
  const e = t.result.plan || t.result.rows;
145
157
  return !e || e.length === 0 ? !1 : Se(e[0]);
146
158
  }
147
159
  function pe(n) {
148
- const t = m(n);
160
+ const t = y(n);
149
161
  if (!t?.result) return !1;
150
162
  const e = t.result.plan || t.result.rows;
151
163
  return !!e && e.length > 0 && typeof e[0] == "object";
152
164
  }
153
- function N(n) {
154
- return ze(n, "ss-dash");
165
+ function P(n) {
166
+ return Ne(n, "ss-dash");
155
167
  }
156
- const { tableRef: B } = Pe(() => $.value);
168
+ const { tableRef: B } = Pe(() => S.value);
157
169
  return (n, t) => (a(), l("div", null, [
158
170
  me(Te, {
159
171
  "model-value": Q.value,
@@ -165,20 +177,20 @@ const Le = { class: "ss-dash-btn-group" }, Qe = {
165
177
  s("div", Le, [
166
178
  s("button", {
167
179
  type: "button",
168
- class: v(`ss-dash-btn ${y.value === "list" ? "ss-dash-active" : ""}`),
169
- onClick: t[0] || (t[0] = (e) => j("list"))
180
+ class: f(`ss-dash-btn ${_.value === "list" ? "ss-dash-active" : ""}`),
181
+ onClick: t[0] || (t[0] = (e) => M("list"))
170
182
  }, " List ", 2),
171
183
  s("button", {
172
184
  type: "button",
173
- class: v(`ss-dash-btn ${y.value === "grouped" ? "ss-dash-active" : ""}`),
174
- onClick: t[1] || (t[1] = (e) => j("grouped"))
185
+ class: f(`ss-dash-btn ${_.value === "grouped" ? "ss-dash-active" : ""}`),
186
+ onClick: t[1] || (t[1] = (e) => M("grouped"))
175
187
  }, " Grouped ", 2)
176
188
  ])
177
189
  ]),
178
190
  _: 1
179
191
  }, 8, ["model-value", "summary"]),
180
- d(q) && !d(w) ? (a(), l("div", Qe, "Loading queries...")) : y.value === "grouped" ? (a(), l("div", Ve, [
181
- $.value.length > 0 ? (a(), l("table", {
192
+ c(q) && !c(C) ? (a(), l("div", Qe, "Loading queries...")) : _.value === "grouped" ? (a(), l("div", Ve, [
193
+ S.value.length > 0 ? (a(), l("table", {
182
194
  key: 0,
183
195
  ref_key: "tableRef",
184
196
  ref: B,
@@ -186,35 +198,35 @@ const Le = { class: "ss-dash-btn-group" }, Qe = {
186
198
  }, [
187
199
  s("thead", null, [
188
200
  s("tr", null, [
189
- (a(!0), l(u, null, _(Z.value, (e) => (a(), l("th", {
201
+ (a(!0), l(d, null, x(Z.value, (e) => (a(), l("th", {
190
202
  key: e.key,
191
- class: v(e.sortable ? "ss-dash-sortable" : ""),
192
- onClick: (f) => e.sortable ? K(e.key) : void 0
203
+ class: f(e.sortable ? "ss-dash-sortable" : ""),
204
+ onClick: (u) => e.sortable ? j(e.key) : void 0
193
205
  }, [
194
- h(o(e.label) + " ", 1),
195
- e.sortable && d(E).column === e.key ? (a(), l("span", je, o(d(E).direction === "asc" ? " ▲" : " ▼"), 1)) : p("", !0)
206
+ v(o(e.label) + " ", 1),
207
+ e.sortable && c(E).column === e.key ? (a(), l("span", Me, o(c(E).direction === "asc" ? " ▲" : " ▼"), 1)) : h("", !0)
196
208
  ], 10, Re))), 128))
197
209
  ])
198
210
  ]),
199
211
  s("tbody", null, [
200
- (a(!0), l(u, null, _($.value, (e, f) => (a(), l("tr", { key: f }, [
212
+ (a(!0), l(d, null, x(S.value, (e, u) => (a(), l("tr", { key: u }, [
201
213
  s("td", null, [
202
214
  s("span", {
203
- class: v(`ss-dash-sql ${M(e.sqlNormalized) ? "ss-dash-expanded" : ""}`),
215
+ class: f(`ss-dash-sql ${K(e.sqlNormalized) ? "ss-dash-expanded" : ""}`),
204
216
  title: "Click to expand",
205
217
  role: "button",
206
218
  tabindex: "0",
207
- onClick: F((r) => S(e.sqlNormalized), ["stop"]),
208
- onKeydown: G((r) => S(e.sqlNormalized), ["enter"])
209
- }, o(e.sqlNormalized), 43, Ke),
210
- (e.count || 0) >= 3 ? (a(), l("span", Me, "DUP")) : p("", !0)
219
+ onClick: F((r) => N(e.sqlNormalized), ["stop"]),
220
+ onKeydown: G((r) => N(e.sqlNormalized), ["enter"])
221
+ }, o(e.sqlNormalized), 43, je),
222
+ (e.count || 0) >= 3 ? (a(), l("span", Ke, "DUP")) : h("", !0)
211
223
  ]),
212
224
  s("td", null, [
213
225
  s("span", Oe, o(e.count || 0), 1)
214
226
  ]),
215
227
  s("td", null, [
216
228
  s("span", {
217
- class: v(`ss-dash-duration ${N(e.avgDuration || 0)}`)
229
+ class: f(`ss-dash-duration ${P(e.avgDuration || 0)}`)
218
230
  }, o((e.avgDuration || 0).toFixed(2)) + "ms ", 3)
219
231
  ]),
220
232
  s("td", null, [
@@ -222,7 +234,7 @@ const Le = { class: "ss-dash-btn-group" }, Qe = {
222
234
  ]),
223
235
  s("td", null, [
224
236
  s("span", {
225
- class: v(`ss-dash-duration ${N(e.maxDuration || 0)}`)
237
+ class: f(`ss-dash-duration ${P(e.maxDuration || 0)}`)
226
238
  }, o((e.maxDuration || 0).toFixed(2)) + "ms ", 3)
227
239
  ]),
228
240
  s("td", null, [
@@ -236,13 +248,13 @@ const Le = { class: "ss-dash-btn-group" }, Qe = {
236
248
  ], 512)) : (a(), l("div", Ge, [...t[2] || (t[2] = [
237
249
  s("span", null, "No queries recorded", -1),
238
250
  s("span", { class: "ss-empty-hint" }, [
239
- h(" Queries require "),
251
+ v(" Queries require "),
240
252
  s("code", null, "debug: true"),
241
- h(" on your Lucid connections in "),
253
+ v(" on your Lucid connections in "),
242
254
  s("code", null, "config/database.ts")
243
255
  ], -1)
244
256
  ])]))
245
- ])) : (a(), l(u, { key: 2 }, [
257
+ ])) : (a(), l(d, { key: 2 }, [
246
258
  s("div", He, [
247
259
  V.value.length > 0 ? (a(), l("table", {
248
260
  key: 0,
@@ -251,29 +263,29 @@ const Le = { class: "ss-dash-btn-group" }, Qe = {
251
263
  class: "ss-dash-table"
252
264
  }, [
253
265
  s("colgroup", null, [
254
- (a(!0), l(u, null, _(L.value, (e) => (a(), l("col", {
266
+ (a(!0), l(d, null, x(L.value, (e) => (a(), l("col", {
255
267
  key: e.key + e.type,
256
268
  style: H(e.width ? { width: e.width } : {})
257
269
  }, null, 4))), 128))
258
270
  ]),
259
271
  s("thead", null, [
260
272
  s("tr", null, [
261
- (a(!0), l(u, null, _(L.value, (e) => (a(), l(u, {
273
+ (a(!0), l(d, null, x(L.value, (e) => (a(), l(d, {
262
274
  key: e.key + e.type
263
275
  }, [
264
276
  e.sortable ? (a(), l("th", {
265
277
  key: 0,
266
278
  class: "ss-dash-sortable",
267
- onClick: (f) => K(e.key)
279
+ onClick: (u) => j(e.key)
268
280
  }, [
269
- h(o(e.label) + " ", 1),
270
- d(E).column === e.key ? (a(), l("span", Je, o(d(E).direction === "asc" ? " ▲" : " ▼"), 1)) : p("", !0)
271
- ], 8, Xe)) : (a(), l("th", We, o(e.label), 1))
281
+ v(o(e.label) + " ", 1),
282
+ c(E).column === e.key ? (a(), l("span", Xe, o(c(E).direction === "asc" ? " ▲" : " ▼"), 1)) : h("", !0)
283
+ ], 8, Je)) : (a(), l("th", We, o(e.label), 1))
272
284
  ], 64))), 128))
273
285
  ])
274
286
  ]),
275
287
  s("tbody", null, [
276
- (a(!0), l(u, null, _(V.value, (e, f) => (a(), l(u, {
288
+ (a(!0), l(d, null, x(V.value, (e, u) => (a(), l(d, {
277
289
  key: e.id
278
290
  }, [
279
291
  s("tr", null, [
@@ -283,24 +295,24 @@ const Le = { class: "ss-dash-btn-group" }, Qe = {
283
295
  s("td", null, [
284
296
  s("div", null, [
285
297
  s("span", {
286
- class: v(`ss-dash-sql ${M(e.id) ? "ss-dash-expanded" : ""}`),
298
+ class: f(`ss-dash-sql ${K(e.id) ? "ss-dash-expanded" : ""}`),
287
299
  title: "Click to expand",
288
300
  role: "button",
289
301
  tabindex: "0",
290
- onClick: F((r) => S(e.id), ["stop"]),
291
- onKeydown: G((r) => S(e.id), ["enter"])
302
+ onClick: F((r) => N(e.id), ["stop"]),
303
+ onKeydown: G((r) => N(e.id), ["enter"])
292
304
  }, o(e.sql), 43, Ze),
293
- (R.value.get(e.sqlNormalized) ?? 0) > 1 ? (a(), l("span", Ie, " ×" + o(R.value.get(e.sqlNormalized)), 1)) : p("", !0)
305
+ (R.value.get(e.sqlNormalized) ?? 0) > 1 ? (a(), l("span", Ie, " ×" + o(R.value.get(e.sqlNormalized)), 1)) : h("", !0)
294
306
  ])
295
307
  ]),
296
308
  s("td", null, [
297
309
  s("span", {
298
- class: v(`ss-dash-duration ${N(e.duration)}`)
310
+ class: f(`ss-dash-duration ${P(e.duration)}`)
299
311
  }, o(e.duration.toFixed(2)) + "ms ", 3)
300
312
  ]),
301
313
  s("td", null, [
302
314
  s("span", {
303
- class: v(`ss-dash-method ss-dash-method-${e.method.toLowerCase()}`)
315
+ class: f(`ss-dash-method ss-dash-method-${e.method.toLowerCase()}`)
304
316
  }, o(e.method), 3)
305
317
  ]),
306
318
  s("td", null, [
@@ -315,60 +327,60 @@ const Le = { class: "ss-dash-btn-group" }, Qe = {
315
327
  s("td", null, [
316
328
  s("span", {
317
329
  class: "ss-dash-event-time",
318
- title: d(we)(String(e.timestamp))
319
- }, o(d(Ce)(String(e.timestamp))), 9, tt)
330
+ title: c(we)(String(e.timestamp))
331
+ }, o(c(Ce)(String(e.timestamp))), 9, tt)
320
332
  ]),
321
333
  s("td", null, [
322
334
  e.method === "select" ? (a(), l("button", {
323
335
  key: 0,
324
336
  type: "button",
325
- class: v(`ss-dash-explain-btn${re(e.id) ? " ss-dash-explain-btn-active" : ""}`),
337
+ class: f(`ss-dash-explain-btn${re(e.id) ? " ss-dash-explain-btn-active" : ""}`),
326
338
  disabled: O(e.id),
327
339
  onClick: F((r) => oe(e.id), ["stop"])
328
- }, o(O(e.id) ? "..." : "EXPLAIN"), 11, st)) : p("", !0)
340
+ }, o(O(e.id) ? "..." : "EXPLAIN"), 11, st)) : h("", !0)
329
341
  ])
330
342
  ]),
331
- m(e.id) ? (a(), l("tr", nt, [
343
+ y(e.id) ? (a(), l("tr", nt, [
332
344
  s("td", at, [
333
345
  s("div", lt, [
334
346
  s("div", ot, [
335
- m(e.id)?.error ? (a(), l("div", rt, [
347
+ y(e.id)?.error ? (a(), l("div", rt, [
336
348
  t[3] || (t[3] = s("strong", null, "Error:", -1)),
337
- h(" " + o(m(e.id)?.error) + " ", 1),
338
- m(e.id)?.result?.message ? (a(), l("br", it)) : p("", !0),
339
- h(" " + o(m(e.id)?.result?.message), 1)
349
+ v(" " + o(y(e.id)?.error) + " ", 1),
350
+ y(e.id)?.result?.message ? (a(), l("br", it)) : h("", !0),
351
+ v(" " + o(y(e.id)?.result?.message), 1)
340
352
  ])) : ce(e.id) ? (a(), l("div", ut, [
341
- (a(!0), l(u, null, _(ue(e.id), (r, P) => (a(), l("div", {
342
- key: P,
353
+ (a(!0), l(d, null, x(ue(e.id), (r, m) => (a(), l("div", {
354
+ key: m,
343
355
  class: "ss-dash-explain-node",
344
356
  style: H({ marginLeft: `${r.depth * 20}px` })
345
357
  }, [
346
358
  s("div", dt, [
347
359
  s("span", ct, o(r.nodeType), 1),
348
- r.relationName ? (a(), l(u, { key: 0 }, [
349
- t[4] || (t[4] = h(o(" on "), -1)),
360
+ r.relationName ? (a(), l(d, { key: 0 }, [
361
+ t[4] || (t[4] = v(o(" on "), -1)),
350
362
  s("strong", null, o(r.relationName), 1)
351
- ], 64)) : p("", !0),
352
- r.alias ? (a(), l(u, { key: 1 }, [
353
- h(o(` (${r.alias})`), 1)
354
- ], 64)) : p("", !0),
355
- r.indexName ? (a(), l(u, { key: 2 }, [
356
- t[5] || (t[5] = h(o(" using "), -1)),
363
+ ], 64)) : h("", !0),
364
+ r.alias ? (a(), l(d, { key: 1 }, [
365
+ v(o(` (${r.alias})`), 1)
366
+ ], 64)) : h("", !0),
367
+ r.indexName ? (a(), l(d, { key: 2 }, [
368
+ t[5] || (t[5] = v(o(" using "), -1)),
357
369
  s("em", null, o(r.indexName), 1)
358
- ], 64)) : p("", !0)
370
+ ], 64)) : h("", !0)
359
371
  ]),
360
- r.metrics.length > 0 ? (a(), l("div", pt, o(r.metrics.join(" · ")), 1)) : p("", !0)
372
+ r.metrics.length > 0 ? (a(), l("div", pt, o(r.metrics.join(" · ")), 1)) : h("", !0)
361
373
  ], 4))), 128))
362
374
  ])) : pe(e.id) ? (a(), l("div", ht, [
363
375
  s("table", null, [
364
376
  s("thead", null, [
365
377
  s("tr", null, [
366
- (a(!0), l(u, null, _(A(e.id), (r) => (a(), l("th", { key: r }, o(r), 1))), 128))
378
+ (a(!0), l(d, null, x(A(e.id), (r) => (a(), l("th", { key: r }, o(r), 1))), 128))
367
379
  ])
368
380
  ]),
369
381
  s("tbody", null, [
370
- (a(!0), l(u, null, _(de(e.id), (r, P) => (a(), l("tr", { key: P }, [
371
- (a(!0), l(u, null, _(A(e.id), (U) => (a(), l("td", { key: U }, o(d(De)(r[U])), 1))), 128))
382
+ (a(!0), l(d, null, x(de(e.id), (r, m) => (a(), l("tr", { key: m }, [
383
+ (a(!0), l(d, null, x(A(e.id), (U) => (a(), l("td", { key: U }, o(c($e)(r[U])), 1))), 128))
372
384
  ]))), 128))
373
385
  ])
374
386
  ])
@@ -382,26 +394,26 @@ const Le = { class: "ss-dash-btn-group" }, Qe = {
382
394
  }, " Close ", 8, vt)
383
395
  ])
384
396
  ])
385
- ])) : p("", !0)
397
+ ])) : h("", !0)
386
398
  ], 64))), 128))
387
399
  ])
388
400
  ], 512)) : (a(), l("div", yt, [...t[6] || (t[6] = [
389
401
  s("span", null, "No queries recorded", -1),
390
402
  s("span", { class: "ss-empty-hint" }, [
391
- h(" Queries require "),
403
+ v(" Queries require "),
392
404
  s("code", null, "debug: true"),
393
- h(" on your Lucid connections in "),
405
+ v(" on your Lucid connections in "),
394
406
  s("code", null, "config/database.ts")
395
407
  ], -1)
396
408
  ])]))
397
409
  ]),
398
- d(C).totalPages > 1 ? (a(), ye(Fe, {
410
+ c($).totalPages > 1 ? (a(), ye(Fe, {
399
411
  key: 0,
400
- page: d(C).page,
401
- "last-page": d(C).totalPages,
402
- total: d(C).total,
403
- onPageChange: d(ee)
404
- }, null, 8, ["page", "last-page", "total", "onPageChange"])) : p("", !0)
412
+ page: c($).page,
413
+ "last-page": c($).totalPages,
414
+ total: c($).total,
415
+ onPageChange: c(ee)
416
+ }, null, 8, ["page", "last-page", "total", "onPageChange"])) : h("", !0)
405
417
  ], 64))
406
418
  ]));
407
419
  }
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as I, computed as x, openBlock as l, createElementBlock as o, normalizeClass as v, createElementVNode as t, Fragment as f, renderList as B, normalizeStyle as U, toDisplayString as d, createTextVNode as k, createCommentVNode as p, inject as S, ref as m, watch as et, nextTick as at, onUnmounted as lt, createVNode as j, createBlock as G, unref as r } from "vue";
2
2
  import { initSplitPane as nt, formatTime as ot, timeAgo as it, normalizeTraceFields as dt, durationClassName as rt } from "adonisjs-server-stats/core";
3
3
  import { u as ut } from "./useApiClient-BQQ9CF-q.js";
4
- import { u as ct } from "./index-CptF6Qbp.js";
4
+ import { u as ct } from "./index-30jLw-_w.js";
5
5
  import { u as ht } from "./useResizableTable-BoivAevK.js";
6
6
  import { _ as mt } from "./FilterBar.vue_vue_type_script_setup_true_lang-ClJ37hhT.js";
7
7
  import { _ as pt } from "./PaginationControls.vue_vue_type_script_setup_true_lang-CuN7g_8Z.js";
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as g, inject as d, ref as c, computed as A, openBlock as l, createElementBlock as o, createVNode as N, unref as u, createElementVNode as e, Fragment as R, renderList as S, normalizeClass as j, toDisplayString as a } from "vue";
2
- import { u as z } from "./index-CptF6Qbp.js";
2
+ import { u as z } from "./index-30jLw-_w.js";
3
3
  import { u as C } from "./useResizableTable-BoivAevK.js";
4
4
  import { _ as D } from "./FilterBar.vue_vue_type_script_setup_true_lang-ClJ37hhT.js";
5
5
  const E = {
@@ -617,7 +617,7 @@ const wt = ["title", "aria-label"], Ct = ["viewBox", "innerHTML"], Tt = ["viewBo
617
617
  defaultOpen: { type: Boolean, default: !1 }
618
618
  },
619
619
  setup(e, { expose: s }) {
620
- const t = E(() => import("./QueriesTab-DO5XwJ--.js")), r = E(() => import("./EventsTab-BBM7olXF.js")), o = E(() => import("./EmailsTab-CNyEODVB.js")), c = E(() => import("./RoutesTab-Dz0MkZuF.js")), y = E(() => import("./LogsTab-47zEK7jL.js")), v = E(() => import("./TimelineTab-DHfXsX7t.js")), f = E(() => import("./CacheTab-BPisYYiQ.js")), S = E(() => import("./JobsTab-WFnxPdN7.js")), R = E(() => import("./ConfigTab-C8cafGUj.js")), P = E(() => import("./InternalsTab-521fxYYj.js")), b = E(() => import("./CustomPaneTab-Hr1IBHfz.js")), u = e, H = h(u.defaultOpen), g = h("queries"), { theme: I } = oe(), { features: x } = de({
620
+ const t = E(() => import("./QueriesTab-DO5XwJ--.js")), r = E(() => import("./EventsTab-BBM7olXF.js")), o = E(() => import("./EmailsTab-CwIF1fik.js")), c = E(() => import("./RoutesTab-Dz0MkZuF.js")), y = E(() => import("./LogsTab-47zEK7jL.js")), v = E(() => import("./TimelineTab-DHfXsX7t.js")), f = E(() => import("./CacheTab-BPisYYiQ.js")), S = E(() => import("./JobsTab-WFnxPdN7.js")), R = E(() => import("./ConfigTab-C8cafGUj.js")), P = E(() => import("./InternalsTab-521fxYYj.js")), b = E(() => import("./CustomPaneTab-Hr1IBHfz.js")), u = e, H = h(u.defaultOpen), g = h("queries"), { theme: I } = oe(), { features: x } = de({
621
621
  baseUrl: u.baseUrl,
622
622
  debugEndpoint: u.debugEndpoint,
623
623
  authToken: u.authToken
@@ -976,7 +976,7 @@ const Qt = ["data-theme"], Jt = { class: "ss-dash-header" }, Wt = { class: "ss-d
976
976
  channelName: { default: "server-stats/dashboard" }
977
977
  },
978
978
  setup(e) {
979
- const s = E(() => import("./OverviewSection-BTcnPeoM.js")), t = E(() => import("./RequestsSection-DXcG5Zok.js")), r = E(() => import("./QueriesSection-2SE3igQJ.js")), o = E(() => import("./EventsSection-CWbTYOBi.js")), c = E(() => import("./RoutesSection-BkNGWdoP.js")), y = E(() => import("./LogsSection-BPB-C-XA.js")), v = E(() => import("./EmailsSection-CbcDKF9Q.js")), f = E(() => import("./CacheSection-Bx41lpfK.js")), S = E(() => import("./JobsSection-CGGO6rtS.js")), R = E(() => import("./ConfigSection-fkfUdCmx.js")), P = E(() => import("./InternalsSection-jhTCuK3j.js")), b = [
979
+ const s = E(() => import("./OverviewSection-BAgZTPjY.js")), t = E(() => import("./RequestsSection-D8P2xpF2.js")), r = E(() => import("./QueriesSection-CUpwhp7u.js")), o = E(() => import("./EventsSection-BpgkWIwM.js")), c = E(() => import("./RoutesSection-0qB81hTT.js")), y = E(() => import("./LogsSection-BDxx9Bfi.js")), v = E(() => import("./EmailsSection-BTNw3ZU2.js")), f = E(() => import("./CacheSection-DRqV3YX2.js")), S = E(() => import("./JobsSection-DrghFEKL.js")), R = E(() => import("./ConfigSection-C6pQCHAL.js")), P = E(() => import("./InternalsSection-jhTCuK3j.js")), b = [
980
980
  "overview",
981
981
  "requests",
982
982
  "queries",
package/dist/vue/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as s, b as r, c as u, u as t, d as D, e as b, f as g, g as o } from "./index-CptF6Qbp.js";
1
+ import { a as s, b as r, c as u, u as t, d as D, e as b, f as g, g as o } from "./index-30jLw-_w.js";
2
2
  export {
3
3
  s as DashboardPage,
4
4
  r as DebugPanel,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adonisjs-server-stats",
3
- "version": "1.12.0",
3
+ "version": "1.12.2",
4
4
  "description": "Real-time server monitoring for AdonisJS v6 applications",
5
5
  "keywords": [
6
6
  "adonisjs",