adonisjs-server-stats 1.16.1 → 1.18.0

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 (109) hide show
  1. package/README.md +25 -8
  2. package/dist/core/core/dashboard-api.d.ts +6 -4
  3. package/dist/core/core/define-config-helpers.d.ts +1 -0
  4. package/dist/core/core/types-diagnostics.d.ts +2 -0
  5. package/dist/core/debug/types.d.ts +2 -0
  6. package/dist/core/index.js +9 -6
  7. package/dist/core/types.d.ts +55 -4
  8. package/dist/react/{CacheSection-DkLtukWz.js → CacheSection-B-lSIN8Q.js} +48 -44
  9. package/dist/react/{CacheTab-DWeXnEBI.js → CacheTab-BN0QgPXz.js} +1 -1
  10. package/dist/react/{ConfigSection-DaVbFPDg.js → ConfigSection-u_TSfb9f.js} +1 -1
  11. package/dist/react/{ConfigTab-D4640WJZ.js → ConfigTab-au26s-ON.js} +1 -1
  12. package/dist/react/{CustomPaneTab-DglmAVMC.js → CustomPaneTab-qvMnh8ss.js} +1 -1
  13. package/dist/react/{EmailsSection-vYx6ExTb.js → EmailsSection-HfEMeRex.js} +65 -57
  14. package/dist/react/{EmailsTab-DKDrRmRH.js → EmailsTab-BWwq-CxB.js} +1 -1
  15. package/dist/react/{EventsSection-CapH5xut.js → EventsSection-CA9b15dJ.js} +1 -1
  16. package/dist/react/{EventsTab-BNVEySAm.js → EventsTab-CgSdHbKU.js} +1 -1
  17. package/dist/react/{InternalsContent-C9lIA92C.js → InternalsContent-CI7HvBtH.js} +51 -47
  18. package/dist/react/{InternalsSection-lOv_UcSV.js → InternalsSection-IEeWXJqP.js} +1 -1
  19. package/dist/react/{InternalsTab-BygoSorC.js → InternalsTab-CoVLHQbF.js} +1 -1
  20. package/dist/react/{JobsSection-ZIQsJWid.js → JobsSection-DgsS_VwU.js} +1 -1
  21. package/dist/react/{JobsTab-DXQzXrDt.js → JobsTab-CzwLSRUC.js} +1 -1
  22. package/dist/react/{LogEntryRow-BWkHE51-.js → LogEntryRow-VCCzwD1H.js} +1 -1
  23. package/dist/react/{LogsSection-ConXdBkL.js → LogsSection-BujNn_cO.js} +2 -2
  24. package/dist/react/{LogsTab-CJM47LPn.js → LogsTab-BtD1h7DM.js} +2 -2
  25. package/dist/react/{OverviewSection-DOMu2qvl.js → OverviewSection-B28em0gQ.js} +119 -111
  26. package/dist/react/{QueriesSection-DFsaOSJI.js → QueriesSection-B0tFn_Dc.js} +1 -1
  27. package/dist/react/{QueriesTab-CY9CG_7L.js → QueriesTab-DJY7aavR.js} +1 -1
  28. package/dist/react/{RequestsSection-CC-eVHsl.js → RequestsSection-DPmYM7tq.js} +2 -2
  29. package/dist/react/{RoutesSection-p1DMq41y.js → RoutesSection-Ck-RcFVS.js} +1 -1
  30. package/dist/react/{RoutesTab-Cnqy8UcK.js → RoutesTab-Ch3PDLzo.js} +1 -1
  31. package/dist/react/{SplitPaneWrapper-XgkA0QxE.js → SplitPaneWrapper-BZ6VrBr-.js} +1 -1
  32. package/dist/react/{TimelineTab-1YOERxe5.js → TimelineTab-_byxh2mJ.js} +2 -2
  33. package/dist/react/components/Dashboard/overview-data-context.d.ts +15 -0
  34. package/dist/react/components/Dashboard/sections/OverviewSection.d.ts +9 -0
  35. package/dist/react/{index-DOSlCpZ9.js → index-De7nsWBN.js} +148 -141
  36. package/dist/react/index.js +1 -1
  37. package/dist/src/collectors/app_collector.d.ts +11 -0
  38. package/dist/src/collectors/app_collector.js +11 -0
  39. package/dist/src/collectors/redis_collector.js +13 -13
  40. package/dist/src/dashboard/cache_handlers.d.ts +17 -3
  41. package/dist/src/dashboard/cache_handlers.js +14 -19
  42. package/dist/src/dashboard/coalesce_cache.d.ts +2 -8
  43. package/dist/src/dashboard/coalesce_cache.js +25 -0
  44. package/dist/src/dashboard/dashboard_controller.d.ts +1 -0
  45. package/dist/src/dashboard/dashboard_controller.js +8 -3
  46. package/dist/src/dashboard/dashboard_store.d.ts +0 -1
  47. package/dist/src/dashboard/dashboard_store.js +18 -18
  48. package/dist/src/dashboard/filter_handlers.js +26 -4
  49. package/dist/src/dashboard/flush_manager.d.ts +1 -0
  50. package/dist/src/dashboard/flush_manager.js +6 -1
  51. package/dist/src/dashboard/format_helpers.d.ts +0 -4
  52. package/dist/src/dashboard/format_helpers.js +0 -19
  53. package/dist/src/dashboard/integrations/config_inspector.js +6 -3
  54. package/dist/src/dashboard/knex_factory.js +8 -0
  55. package/dist/src/dashboard/migrator.d.ts +7 -2
  56. package/dist/src/dashboard/migrator.js +140 -6
  57. package/dist/src/dashboard/migrator_tables.js +8 -0
  58. package/dist/src/dashboard/paginate_helper.js +21 -11
  59. package/dist/src/dashboard/sensitive_patterns.d.ts +37 -0
  60. package/dist/src/dashboard/sensitive_patterns.js +146 -5
  61. package/dist/src/dashboard/storage_stats.d.ts +5 -0
  62. package/dist/src/dashboard/storage_stats.js +15 -1
  63. package/dist/src/dashboard/write_queue.d.ts +20 -21
  64. package/dist/src/dashboard/write_queue.js +37 -60
  65. package/dist/src/debug/query_collector.js +6 -1
  66. package/dist/src/debug/trace_collector.js +26 -13
  67. package/dist/src/debug/types.d.ts +2 -0
  68. package/dist/src/define_config.js +2 -0
  69. package/dist/src/edge/client/dashboard.js +2 -2
  70. package/dist/src/edge/client/debug-panel-deferred.js +1 -1
  71. package/dist/src/edge/client-vue/dashboard.js +5 -5
  72. package/dist/src/edge/client-vue/debug-panel-deferred.js +2 -2
  73. package/dist/src/edge/views/dashboard.edge +1 -1
  74. package/dist/src/edge/views/debug-panel.edge +1 -1
  75. package/dist/src/edge/views/stats-bar.edge +1 -1
  76. package/dist/src/middleware/request_tracking_middleware.js +7 -2
  77. package/dist/src/provider/dashboard_init.d.ts +9 -1
  78. package/dist/src/provider/dashboard_init.js +10 -0
  79. package/dist/src/provider/dashboard_setup.js +14 -0
  80. package/dist/src/provider/diagnostics.d.ts +2 -0
  81. package/dist/src/provider/diagnostics.js +1 -0
  82. package/dist/src/provider/email_helpers.js +20 -5
  83. package/dist/src/provider/server_stats_provider.d.ts +10 -0
  84. package/dist/src/provider/server_stats_provider.js +26 -7
  85. package/dist/src/provider/shutdown_helpers.js +3 -1
  86. package/dist/src/provider/toolbar_setup.js +21 -15
  87. package/dist/src/stubs/config.stub +4 -0
  88. package/dist/src/types.d.ts +55 -4
  89. package/dist/vue/CacheSection-z2TQRez9.js +161 -0
  90. package/dist/vue/{ConfigSection-BiRAiaHj.js → ConfigSection-CFEaig69.js} +1 -1
  91. package/dist/vue/{EmailsSection-Dl44qyqY.js → EmailsSection-CYohBo62.js} +89 -85
  92. package/dist/vue/{EventsSection-CWjeitjU.js → EventsSection-B_TuVrGj.js} +1 -1
  93. package/dist/vue/{InternalsSection-jhTCuK3j.js → InternalsSection-B1P2kNT-.js} +92 -84
  94. package/dist/vue/{InternalsTab-Z3c82glB.js → InternalsTab-CRI-IFTo.js} +155 -147
  95. package/dist/vue/{JobsSection-DOBb4LjZ.js → JobsSection-AjkEzyiv.js} +1 -1
  96. package/dist/vue/{LogsSection-CXx-HOWJ.js → LogsSection-DZD0CCDi.js} +1 -1
  97. package/dist/vue/{OverviewSection-CyfNQ8uV.js → OverviewSection-BEc4Gktf.js} +1 -1
  98. package/dist/vue/{QueriesSection-CXBsFp-y.js → QueriesSection-BMImGXTn.js} +1 -1
  99. package/dist/vue/{RequestsSection-YTIaZGZd.js → RequestsSection-DOI2MUFX.js} +1 -1
  100. package/dist/vue/{RoutesSection-CDKMey49.js → RoutesSection-C1sxt-AW.js} +1 -1
  101. package/dist/vue/composables/useDashboardData.d.ts +1 -1
  102. package/dist/vue/{index-14x39RI_.js → index-BfPAAjL5.js} +95 -95
  103. package/dist/vue/index.js +1 -1
  104. package/package.json +12 -3
  105. package/dist/src/dashboard/explain_query.d.ts +0 -8
  106. package/dist/src/dashboard/explain_query.js +0 -22
  107. package/dist/src/provider/boot_initializer.d.ts +0 -28
  108. package/dist/src/provider/boot_initializer.js +0 -35
  109. package/dist/vue/CacheSection-CxEBVVkF.js +0 -156
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as Y, computed as q, openBlock as l, createElementBlock as o, normalizeClass as v, createElementVNode as t, Fragment as f, renderList as A, normalizeStyle as W, toDisplayString as i, createTextVNode as b, createCommentVNode as p, inject as T, ref as m, watch as at, nextTick as lt, onUnmounted as nt, createVNode as G, createBlock as I, unref as d } from "vue";
2
2
  import { initSplitPane as ot, formatTime as rt, timeAgo as it, normalizeTraceFields as dt, durationClassName as ut } from "adonisjs-server-stats/core";
3
3
  import { u as ct } from "./useApiClient-BQQ9CF-q.js";
4
- import { u as ht } from "./index-14x39RI_.js";
4
+ import { u as ht } from "./index-BfPAAjL5.js";
5
5
  import { u as mt } from "./useResizableTable-BoivAevK.js";
6
6
  import { _ as pt } from "./FilterBar.vue_vue_type_script_setup_true_lang-ClJ37hhT.js";
7
7
  import { _ as vt } 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-14x39RI_.js";
2
+ import { u as z } from "./index-BfPAAjL5.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 = {
@@ -43,6 +43,6 @@ export declare function useDashboardData(section: () => DashboardSection | strin
43
43
  deleteCacheKey: (key: string) => Promise<boolean>;
44
44
  fetchGroupedQueries: () => Promise<Record<string, unknown>[] | null>;
45
45
  explainQuery: (queryId: number) => Promise<Record<string, unknown> | null>;
46
- fetchEmailPreview: (emailId: number) => Promise<string | null>;
46
+ fetchEmailPreview: (emailId: number, init?: RequestInit) => Promise<string | null>;
47
47
  fetchChart: (range: TimeRange) => Promise<unknown>;
48
48
  };
@@ -1,4 +1,4 @@
1
- import { ref as c, reactive as oe, computed as p, onMounted as Q, onUnmounted as te, defineComponent as se, openBlock as a, createElementBlock as l, normalizeStyle as ke, Fragment as G, createElementVNode as i, watch as W, nextTick as we, onBeforeUnmount as he, normalizeClass as U, toDisplayString as C, createCommentVNode as k, createBlock as A, Teleport as Ce, withModifiers as Te, unref as n, createVNode as de, renderList as ae, defineAsyncComponent as T, createTextVNode as _e, provide as ee, Suspense as Ee, withCtx as ve, resolveDynamicComponent as Se } from "vue";
1
+ import { ref as c, reactive as oe, computed as p, onMounted as Q, onUnmounted as te, defineComponent as se, openBlock as a, createElementBlock as l, normalizeStyle as ke, Fragment as G, createElementVNode as r, watch as W, nextTick as we, onBeforeUnmount as he, normalizeClass as U, toDisplayString as C, createCommentVNode as k, createBlock as A, Teleport as Ce, withModifiers as Te, unref as n, createVNode as de, renderList as ae, defineAsyncComponent as T, createTextVNode as _e, provide as ee, Suspense as Ee, withCtx as ve, resolveDynamicComponent as Se } from "vue";
2
2
  import { ServerStatsController as xe, DEFAULT_FEATURES as $e, detectFeatures as Le, getTheme as be, onThemeChange as Me, toggleTheme as Ue, buildSparklineData as Be, computeStats as Pe, formatStatNum as re, detectMetricGroupsFromStats as Re, getVisibleMetricGroups as De, getMetricsByGroup as He, TAB_ICONS as x, DebugDataController as ge, DashboardDataController as Ae, UnauthorizedError as je, subscribeToChannel as ze } from "adonisjs-server-stats/core";
3
3
  function Ie(e) {
4
4
  return {
@@ -31,14 +31,14 @@ function Ie(e) {
31
31
  }
32
32
  function qe(e, s) {
33
33
  if (e.isUnauthorized.value) return null;
34
- const t = Ie(e), r = new xe({ ...s, ...t });
35
- return r.start(), r;
34
+ const t = Ie(e), i = new xe({ ...s, ...t });
35
+ return i.start(), i;
36
36
  }
37
37
  function Oe(e = {}) {
38
38
  const {
39
39
  baseUrl: s = "",
40
40
  endpoint: t = "/admin/api/server-stats",
41
- channelName: r = "admin/server-stats",
41
+ channelName: i = "admin/server-stats",
42
42
  authToken: o,
43
43
  pollInterval: d = 3e3
44
44
  } = e, y = c(null), h = oe({}), f = c(!1), _ = c(!1), P = c(null), B = c(!1), v = c(!1), u = c(!1), D = {
@@ -54,15 +54,15 @@ function Oe(e = {}) {
54
54
  let b = null;
55
55
  const I = p(() => B.value ? "disconnected" : v.value ? "live" : u.value ? "polling" : "disconnected");
56
56
  return Q(() => {
57
- b = qe(D, { baseUrl: s, endpoint: t, channelName: r, authToken: o, pollInterval: d });
57
+ b = qe(D, { baseUrl: s, endpoint: t, channelName: i, authToken: o, pollInterval: d });
58
58
  }), te(() => {
59
59
  b?.stop(), b = null;
60
60
  }), { stats: y, history: h, isConnected: f, isStale: _, isUnauthorized: B, error: P, connectionMode: I };
61
61
  }
62
62
  function ce(e = {}) {
63
- const { baseUrl: s = "", debugEndpoint: t = "/admin/api/debug", authToken: r } = e, o = c({ ...$e }), d = c(!0);
63
+ const { baseUrl: s = "", debugEndpoint: t = "/admin/api/debug", authToken: i } = e, o = c({ ...$e }), d = c(!0);
64
64
  return Q(async () => {
65
- o.value = await Le({ baseUrl: s, debugEndpoint: t, authToken: r }), d.value = !1;
65
+ o.value = await Le({ baseUrl: s, debugEndpoint: t, authToken: i }), d.value = !1;
66
66
  }), {
67
67
  features: o,
68
68
  loading: d
@@ -74,7 +74,7 @@ function le() {
74
74
  function t(o) {
75
75
  e.value = o;
76
76
  }
77
- function r() {
77
+ function i() {
78
78
  const o = Ue();
79
79
  return e.value = o, o;
80
80
  }
@@ -84,7 +84,7 @@ function le() {
84
84
  s?.();
85
85
  }), {
86
86
  theme: e,
87
- toggleTheme: r
87
+ toggleTheme: i
88
88
  };
89
89
  }
90
90
  const Ne = ["width", "height", "viewBox"], Fe = ["id"], Ve = ["stop-color"], Ge = ["stop-color"], Qe = ["d", "fill"], Je = ["d", "stroke"], We = ["x", "y"], Ke = /* @__PURE__ */ se({
@@ -102,7 +102,7 @@ const Ne = ["width", "height", "viewBox"], Fe = ["id"], Ve = ["stop-color"], Ge
102
102
  height: s.height,
103
103
  color: s.color
104
104
  })
105
- ), r = p(() => t.value !== null), o = p(() => `sg-${s.color.replace("#", "")}`);
105
+ ), i = p(() => t.value !== null), o = p(() => `sg-${s.color.replace("#", "")}`);
106
106
  return (d, y) => (a(), l("div", {
107
107
  class: "ss-dash-sparkline",
108
108
  style: ke({ "--ss-accent": e.color })
@@ -113,32 +113,32 @@ const Ne = ["width", "height", "viewBox"], Fe = ["id"], Ve = ["stop-color"], Ge
113
113
  viewBox: `0 0 ${e.width} ${e.height}`,
114
114
  style: { display: "block" }
115
115
  }, [
116
- r.value && t.value ? (a(), l(G, { key: 0 }, [
117
- i("defs", null, [
118
- i("linearGradient", {
116
+ i.value && t.value ? (a(), l(G, { key: 0 }, [
117
+ r("defs", null, [
118
+ r("linearGradient", {
119
119
  id: o.value,
120
120
  x1: "0",
121
121
  y1: "0",
122
122
  x2: "0",
123
123
  y2: "1"
124
124
  }, [
125
- i("stop", {
125
+ r("stop", {
126
126
  offset: "0%",
127
127
  "stop-color": e.color,
128
128
  "stop-opacity": "0.25"
129
129
  }, null, 8, Ve),
130
- i("stop", {
130
+ r("stop", {
131
131
  offset: "100%",
132
132
  "stop-color": e.color,
133
133
  "stop-opacity": "0.02"
134
134
  }, null, 8, Ge)
135
135
  ], 8, Fe)
136
136
  ]),
137
- i("path", {
137
+ r("path", {
138
138
  d: t.value.areaPath,
139
139
  fill: `url(#${o.value})`
140
140
  }, null, 8, Qe),
141
- i("path", {
141
+ r("path", {
142
142
  class: "ss-dash-sparkline-line",
143
143
  d: "M" + t.value.points.replace(/ /g, " L"),
144
144
  fill: "none",
@@ -185,7 +185,7 @@ const Ne = ["width", "height", "viewBox"], Fe = ["id"], Ve = ["stop-color"], Ge
185
185
  },
186
186
  emits: ["pin"],
187
187
  setup(e, { emit: s }) {
188
- const t = e, r = s, o = c(!1), d = c(!1), y = c(null), h = c(null), f = c(null), _ = c({
188
+ const t = e, i = s, o = c(!1), d = c(!1), y = c(null), h = c(null), f = c(null), _ = c({
189
189
  position: "absolute",
190
190
  bottom: "100%",
191
191
  left: "0",
@@ -245,7 +245,7 @@ const Ne = ["width", "height", "viewBox"], Fe = ["id"], Ve = ["stop-color"], Ge
245
245
  o.value = !1;
246
246
  }
247
247
  function L() {
248
- d.value = !d.value, d.value && r("pin", t.metric.id);
248
+ d.value = !d.value, d.value && i("pin", t.metric.id);
249
249
  }
250
250
  function R() {
251
251
  d.value = !1;
@@ -278,8 +278,8 @@ const Ne = ["width", "height", "viewBox"], Fe = ["id"], Ve = ["stop-color"], Ge
278
278
  onClick: L,
279
279
  onKeydown: Z
280
280
  }, [
281
- i("span", Ye, C(e.metric.label), 1),
282
- i("span", {
281
+ r("span", Ye, C(e.metric.label), 1),
282
+ r("span", {
283
283
  class: U(["ss-value", `ss-${I.value}`])
284
284
  }, C(b.value), 3)
285
285
  ], 42, Xe)) : k("", !0),
@@ -287,30 +287,30 @@ const Ne = ["width", "height", "viewBox"], Fe = ["id"], Ve = ["stop-color"], Ge
287
287
  key: 1,
288
288
  to: f.value
289
289
  }, [
290
- i("div", {
290
+ r("div", {
291
291
  ref_key: "tooltipRef",
292
292
  ref: h,
293
293
  class: U(["ss-tooltip", { "ss-pinned": d.value }]),
294
294
  style: ke(_.value)
295
295
  }, [
296
- i("div", Ze, [
296
+ r("div", Ze, [
297
297
  d.value ? (a(), l("button", {
298
298
  key: 0,
299
299
  class: "ss-tooltip-close",
300
300
  onClick: Te(R, ["stop"])
301
301
  }, "×")) : k("", !0),
302
- i("div", et, [
303
- i("span", tt, C(e.metric.title), 1),
302
+ r("div", et, [
303
+ r("span", tt, C(e.metric.title), 1),
304
304
  e.metric.unit ? (a(), l("span", st, C(e.metric.unit), 1)) : k("", !0)
305
305
  ]),
306
- i("div", at, [
307
- O[0] || (O[0] = i("span", { class: "ss-tooltip-current-label" }, "Current: ", -1)),
308
- i("span", nt, C(b.value), 1)
306
+ r("div", at, [
307
+ O[0] || (O[0] = r("span", { class: "ss-tooltip-current-label" }, "Current: ", -1)),
308
+ r("span", nt, C(b.value), 1)
309
309
  ]),
310
310
  q.value ? (a(), l("div", ot, [
311
- i("span", null, "Min: " + C(n(re)(q.value.min, e.metric.unit)), 1),
312
- i("span", null, "Max: " + C(n(re)(q.value.max, e.metric.unit)), 1),
313
- i("span", null, "Avg: " + C(n(re)(q.value.avg, e.metric.unit)), 1)
311
+ r("span", null, "Min: " + C(n(re)(q.value.min, e.metric.unit)), 1),
312
+ r("span", null, "Max: " + C(n(re)(q.value.max, e.metric.unit)), 1),
313
+ r("span", null, "Avg: " + C(n(re)(q.value.avg, e.metric.unit)), 1)
314
314
  ])) : k("", !0),
315
315
  H.value ? (a(), l("div", lt, C(H.value), 1)) : k("", !0),
316
316
  e.history.length > 0 ? (a(), l("div", it, [
@@ -321,7 +321,7 @@ const Ne = ["width", "height", "viewBox"], Fe = ["id"], Ve = ["stop-color"], Ge
321
321
  ])) : k("", !0),
322
322
  e.history.length > 0 ? (a(), l("div", rt, " Last " + C(Math.min(e.history.length, 60)) + " samples (~" + C(Math.round(Math.min(e.history.length, 60) * 3 / 60)) + " min) ", 1)) : k("", !0)
323
323
  ]),
324
- O[1] || (O[1] = i("div", { class: "ss-tooltip-arrow" }, null, -1))
324
+ O[1] || (O[1] = r("div", { class: "ss-tooltip-arrow" }, null, -1))
325
325
  ], 6)
326
326
  ], 8, ["to"])) : k("", !0)
327
327
  ], 64));
@@ -354,7 +354,7 @@ const Ne = ["width", "height", "viewBox"], Fe = ["id"], Ve = ["stop-color"], Ge
354
354
  },
355
355
  emits: ["openDebugPanel", "connectionChange"],
356
356
  setup(e, { emit: s }) {
357
- const t = e, r = s, { stats: o, history: d, isStale: y, isUnauthorized: h, isConnected: f, connectionMode: _ } = Oe({
357
+ const t = e, i = s, { stats: o, history: d, isStale: y, isUnauthorized: h, isConnected: f, connectionMode: _ } = Oe({
358
358
  baseUrl: t.baseUrl,
359
359
  endpoint: t.endpoint,
360
360
  channelName: t.channelName,
@@ -362,7 +362,7 @@ const Ne = ["width", "height", "viewBox"], Fe = ["id"], Ve = ["stop-color"], Ge
362
362
  pollInterval: t.pollInterval
363
363
  });
364
364
  W(f, ($) => {
365
- r("connectionChange", $);
365
+ i("connectionChange", $);
366
366
  });
367
367
  const { features: P } = ce({
368
368
  baseUrl: t.baseUrl,
@@ -403,14 +403,14 @@ const Ne = ["width", "height", "viewBox"], Fe = ["id"], Ve = ["stop-color"], Ge
403
403
  class: U(["ss-bar", { "ss-hidden": !v.value }]),
404
404
  "data-ss-theme": m.value
405
405
  }, [
406
- i("div", ct, [
406
+ r("div", ct, [
407
407
  n(P).tracing || b.value.has("redis") || b.value.has("queue") ? (a(), l("button", {
408
408
  key: 0,
409
409
  type: "button",
410
410
  class: U(["ss-dbg-btn", { "ss-dbg-active": e.debugPanelOpen }]),
411
411
  title: "Toggle debug panel",
412
412
  id: "ss-dbg-wrench",
413
- onClick: L[0] || (L[0] = (R) => r("openDebugPanel"))
413
+ onClick: L[0] || (L[0] = (R) => i("openDebugPanel"))
414
414
  }, [
415
415
  (a(), l("svg", {
416
416
  width: "14",
@@ -424,11 +424,11 @@ const Ne = ["width", "height", "viewBox"], Fe = ["id"], Ve = ["stop-color"], Ge
424
424
  innerHTML: n(x).wrench.elements.join("")
425
425
  }, null, 8, ht))
426
426
  ], 2)) : k("", !0),
427
- i("div", {
427
+ r("div", {
428
428
  class: U(["ss-dot", { "ss-stale": n(y) }])
429
429
  }, null, 2)
430
430
  ]),
431
- i("div", {
431
+ r("div", {
432
432
  ref_key: "scrollRef",
433
433
  ref: u,
434
434
  id: "ss-bar-scroll",
@@ -437,7 +437,7 @@ const Ne = ["width", "height", "viewBox"], Fe = ["id"], Ve = ["stop-color"], Ge
437
437
  (a(!0), l(G, null, ae(I.value, (R, Z) => (a(), l(G, {
438
438
  key: R.name
439
439
  }, [
440
- i("div", vt, [
440
+ r("div", vt, [
441
441
  (a(!0), l(G, null, ae(R.metrics, (F) => (a(), A(ut, {
442
442
  key: F.id,
443
443
  metric: F,
@@ -472,7 +472,7 @@ const Ne = ["width", "height", "viewBox"], Fe = ["id"], Ve = ["stop-color"], Ge
472
472
  }, C(q.value), 3)) : k("", !0)
473
473
  ])) : k("", !0),
474
474
  v.value ? (a(), l("span", mt, "hide stats")) : k("", !0),
475
- i("span", kt, C(v.value ? "▼" : "▲"), 1)
475
+ r("span", kt, C(v.value ? "▼" : "▲"), 1)
476
476
  ], 10, gt))
477
477
  ], 64));
478
478
  }
@@ -494,10 +494,10 @@ function me(e) {
494
494
  };
495
495
  }
496
496
  class yt {
497
- constructor(s, t, r, o) {
497
+ constructor(s, t, i, o) {
498
498
  this.refs = s, this.config = t, this.dashboardEndpoint = o, this.controller = new ge({
499
499
  ...t,
500
- endpoint: r,
500
+ endpoint: i,
501
501
  ...me(s)
502
502
  });
503
503
  }
@@ -534,14 +534,14 @@ class yt {
534
534
  function wt(e, s = {}) {
535
535
  const {
536
536
  baseUrl: t = "",
537
- debugEndpoint: r = "/admin/api/debug",
537
+ debugEndpoint: i = "/admin/api/debug",
538
538
  dashboardEndpoint: o,
539
539
  authToken: d,
540
540
  refreshInterval: y
541
541
  } = s, h = c(null), f = c(!1), _ = c(null), P = c(!1), B = { data: h, loading: f, error: _, isUnauthorized: P }, v = new yt(
542
542
  B,
543
543
  { baseUrl: t, authToken: d, refreshInterval: y },
544
- r,
544
+ i,
545
545
  o
546
546
  );
547
547
  return W(e, () => {
@@ -566,7 +566,7 @@ const Ct = ["title", "aria-label"], Tt = ["viewBox", "innerHTML"], _t = ["viewBo
566
566
  classPrefix: { default: "ss-dbg" }
567
567
  },
568
568
  setup(e) {
569
- const s = e, { theme: t, toggleTheme: r } = le(), o = p(() => t.value === "dark"), d = p(() => o.value ? "Switch to light theme" : "Switch to dark theme"), y = p(
569
+ const s = e, { theme: t, toggleTheme: i } = le(), o = p(() => t.value === "dark"), d = p(() => o.value ? "Switch to light theme" : "Switch to dark theme"), y = p(
570
570
  () => s.classPrefix === "ss-dbg" ? "ss-dbg-theme-toggle" : "ss-dash-theme-btn"
571
571
  );
572
572
  return (h, f) => (a(), l("button", {
@@ -575,7 +575,7 @@ const Ct = ["title", "aria-label"], Tt = ["viewBox", "innerHTML"], _t = ["viewBo
575
575
  title: d.value,
576
576
  "aria-label": d.value,
577
577
  onClick: f[0] || (f[0] = //@ts-ignore
578
- (..._) => n(r) && n(r)(..._))
578
+ (..._) => n(i) && n(i)(..._))
579
579
  }, [
580
580
  o.value ? (a(), l("svg", {
581
581
  key: 0,
@@ -622,7 +622,7 @@ const Ct = ["title", "aria-label"], Tt = ["viewBox", "innerHTML"], _t = ["viewBo
622
622
  defaultOpen: { type: Boolean, default: !1 }
623
623
  },
624
624
  setup(e, { expose: s }) {
625
- const t = T(() => import("./QueriesTab-DO5XwJ--.js")), r = T(() => import("./EventsTab-BBM7olXF.js")), o = T(() => import("./EmailsTab-Diya54CP.js")), d = T(() => import("./RoutesTab-Dz0MkZuF.js")), y = T(() => import("./LogsTab-47zEK7jL.js")), h = T(() => import("./TimelineTab-DHfXsX7t.js")), f = T(() => import("./CacheTab-BPisYYiQ.js")), _ = T(() => import("./JobsTab-WFnxPdN7.js")), P = T(() => import("./ConfigTab-C8cafGUj.js")), B = T(() => import("./InternalsTab-Z3c82glB.js")), v = T(() => import("./CustomPaneTab-Hr1IBHfz.js")), u = e, D = c(u.defaultOpen), b = c("queries"), { theme: I } = le(), { features: E } = ce({
625
+ const t = T(() => import("./QueriesTab-DO5XwJ--.js")), i = T(() => import("./EventsTab-BBM7olXF.js")), o = T(() => import("./EmailsTab-Diya54CP.js")), d = T(() => import("./RoutesTab-Dz0MkZuF.js")), y = T(() => import("./LogsTab-47zEK7jL.js")), h = T(() => import("./TimelineTab-DHfXsX7t.js")), f = T(() => import("./CacheTab-BPisYYiQ.js")), _ = T(() => import("./JobsTab-WFnxPdN7.js")), P = T(() => import("./ConfigTab-C8cafGUj.js")), B = T(() => import("./InternalsTab-CRI-IFTo.js")), v = T(() => import("./CustomPaneTab-Hr1IBHfz.js")), u = e, D = c(u.defaultOpen), b = c("queries"), { theme: I } = le(), { features: E } = ce({
626
626
  baseUrl: u.baseUrl,
627
627
  debugEndpoint: u.debugEndpoint,
628
628
  authToken: u.authToken
@@ -674,8 +674,8 @@ const Ct = ["title", "aria-label"], Tt = ["viewBox", "innerHTML"], _t = ["viewBo
674
674
  class: U(["ss-dbg-panel", { "ss-dbg-open": D.value }]),
675
675
  "data-ss-theme": n(I)
676
676
  }, [
677
- i("div", St, [
678
- i("div", xt, [
677
+ r("div", St, [
678
+ r("div", xt, [
679
679
  (a(!0), l(G, null, ae(M.value, (g) => (a(), l("button", {
680
680
  key: g.id,
681
681
  type: "button",
@@ -691,8 +691,8 @@ const Ct = ["title", "aria-label"], Tt = ["viewBox", "innerHTML"], _t = ["viewBo
691
691
  _e(" " + C(g.label), 1)
692
692
  ], 10, $t))), 128))
693
693
  ]),
694
- i("div", Mt, [
695
- i("span", {
694
+ r("div", Mt, [
695
+ r("span", {
696
696
  class: U(["ss-dbg-conn-mode", e.isLive ? "ss-dbg-conn-live" : "ss-dbg-conn-polling"]),
697
697
  title: e.isLive ? "Connected via Transmit (SSE) — real-time updates" : "Polling every 3s"
698
698
  }, C(e.isLive ? "live" : "polling"), 11, Ut),
@@ -717,7 +717,7 @@ const Ct = ["title", "aria-label"], Tt = ["viewBox", "innerHTML"], _t = ["viewBo
717
717
  }, null, 8, Pt))
718
718
  ], 8, Bt)) : k("", !0),
719
719
  de(ye),
720
- i("button", {
720
+ r("button", {
721
721
  type: "button",
722
722
  class: "ss-dbg-close",
723
723
  onClick: X,
@@ -725,13 +725,13 @@ const Ct = ["title", "aria-label"], Tt = ["viewBox", "innerHTML"], _t = ["viewBo
725
725
  }, " × ")
726
726
  ])
727
727
  ]),
728
- i("div", Rt, [
728
+ r("div", Rt, [
729
729
  n($) && !n(m) && !q.value ? (a(), l("div", Dt, "Loading...")) : n(L) && !q.value ? (a(), l("div", Ht, " Error: " + C(n(L).message), 1)) : (a(), l(G, { key: 2 }, [
730
730
  b.value === "queries" ? (a(), A(n(t), {
731
731
  key: 0,
732
732
  data: n(m),
733
733
  "dashboard-path": e.dashboardPath
734
- }, null, 8, ["data", "dashboard-path"])) : b.value === "events" ? (a(), A(n(r), {
734
+ }, null, 8, ["data", "dashboard-path"])) : b.value === "events" ? (a(), A(n(i), {
735
735
  key: 1,
736
736
  data: n(m),
737
737
  "dashboard-path": e.dashboardPath
@@ -803,8 +803,8 @@ function At(e) {
803
803
  }
804
804
  function jt(e) {
805
805
  const s = {};
806
- for (const [t, r] of Object.entries(e))
807
- t !== "search" && r !== "" && r !== void 0 && r !== null && (s[t] = String(r));
806
+ for (const [t, i] of Object.entries(e))
807
+ t !== "search" && i !== "" && i !== void 0 && i !== null && (s[t] = String(i));
808
808
  return s;
809
809
  }
810
810
  async function ue(e) {
@@ -818,7 +818,7 @@ function zt(e) {
818
818
  return {
819
819
  fetchGroupedQueries: () => ue(() => e.fetchGroupedQueries()),
820
820
  explainQuery: (s) => ue(() => e.explainQuery(s)),
821
- fetchEmailPreview: async (s) => (await ue(() => e.fetchEmailPreview(s)))?.html || null
821
+ fetchEmailPreview: async (s, t) => (await ue(() => e.fetchEmailPreview(s, t)))?.html || null
822
822
  };
823
823
  }
824
824
  function It(e) {
@@ -844,14 +844,14 @@ function qt(e, s) {
844
844
  fetchChart: async (t) => {
845
845
  try {
846
846
  return await e.fetchChart(t);
847
- } catch (r) {
848
- return r instanceof je && (s.value = !0), null;
847
+ } catch (i) {
848
+ return i instanceof je && (s.value = !0), null;
849
849
  }
850
850
  }
851
851
  };
852
852
  }
853
853
  function ne(e, s, t) {
854
- const r = s(), o = jt(t.filter);
854
+ const i = s(), o = jt(t.filter);
855
855
  e.configure({
856
856
  page: t.pagination.page,
857
857
  perPage: t.pagination.perPage,
@@ -859,7 +859,7 @@ function ne(e, s, t) {
859
859
  sort: t.sort.column || void 0,
860
860
  sortDir: t.sort.column ? t.sort.direction : void 0,
861
861
  filters: Object.keys(o).length > 0 ? o : void 0,
862
- timeRange: r.startsWith("overview") ? t.timeRange.value : void 0
862
+ timeRange: i.startsWith("overview") ? t.timeRange.value : void 0
863
863
  });
864
864
  }
865
865
  function Ot(e, s) {
@@ -870,11 +870,11 @@ function Ot(e, s) {
870
870
  setSearch(t) {
871
871
  e.filter.search = t, e.pagination.page = 1, s();
872
872
  },
873
- setFilter(t, r) {
874
- e.filter[t] = r, e.pagination.page = 1, s();
873
+ setFilter(t, i) {
874
+ e.filter[t] = i, e.pagination.page = 1, s();
875
875
  },
876
- setSort(t, r) {
877
- e.sort.column === t && !r ? e.sort.direction = e.sort.direction === "asc" ? "desc" : "asc" : (e.sort.column = t, e.sort.direction = r || "desc"), s();
876
+ setSort(t, i) {
877
+ e.sort.column === t && !i ? e.sort.direction = e.sort.direction === "asc" ? "desc" : "asc" : (e.sort.column = t, e.sort.direction = i || "desc"), s();
878
878
  },
879
879
  setTimeRange(t) {
880
880
  e.timeRange.value = t, s();
@@ -883,8 +883,8 @@ function Ot(e, s) {
883
883
  }
884
884
  function Nt(e, s, t) {
885
885
  return {
886
- async mutate(r, o = "post", d) {
887
- return e.mutate(r, o, d);
886
+ async mutate(i, o = "post", d) {
887
+ return e.mutate(i, o, d);
888
888
  },
889
889
  refresh() {
890
890
  ne(e, s, t), e.fetch(!0);
@@ -897,13 +897,13 @@ function Nt(e, s, t) {
897
897
  }
898
898
  };
899
899
  }
900
- function Ft(e, s, t, r) {
900
+ function Ft(e, s, t, i) {
901
901
  W(s, () => {
902
902
  t.pagination.page = 1;
903
903
  for (const o of Object.keys(t.filter))
904
904
  o === "search" ? t.filter.search = "" : delete t.filter[o];
905
905
  t.sort.column = "", t.data.value = null, e.setSection(s()), ne(e, s, t);
906
- }), r && W(r, () => {
906
+ }), i && W(i, () => {
907
907
  ne(e, s, t), e.handleRefreshSignal();
908
908
  });
909
909
  }
@@ -922,7 +922,7 @@ function Vt(e) {
922
922
  })
923
923
  };
924
924
  }
925
- function Gt(e, s, t, r) {
925
+ function Gt(e, s, t, i) {
926
926
  return {
927
927
  data: e.data,
928
928
  loading: e.loading,
@@ -934,19 +934,19 @@ function Gt(e, s, t, r) {
934
934
  timeRange: e.timeRange,
935
935
  ...s,
936
936
  ...t,
937
- ...r
937
+ ...i
938
938
  };
939
939
  }
940
940
  function Qt(e, s = {}) {
941
941
  const {
942
942
  baseUrl: t = "",
943
- dashboardEndpoint: r = "/__stats/api",
943
+ dashboardEndpoint: i = "/__stats/api",
944
944
  authToken: o,
945
945
  perPage: d = 50,
946
946
  refreshKey: y
947
947
  } = s, h = Vt(d), f = new Ae({
948
948
  baseUrl: t,
949
- endpoint: r,
949
+ endpoint: i,
950
950
  authToken: o,
951
951
  section: e(),
952
952
  perPage: d,
@@ -981,7 +981,7 @@ const Jt = ["data-theme"], Wt = { class: "ss-dash-header" }, Kt = { class: "ss-d
981
981
  channelName: { default: "server-stats/dashboard" }
982
982
  },
983
983
  setup(e) {
984
- const s = T(() => import("./OverviewSection-CyfNQ8uV.js")), t = T(() => import("./RequestsSection-YTIaZGZd.js")), r = T(() => import("./QueriesSection-CXBsFp-y.js")), o = T(() => import("./EventsSection-CWjeitjU.js")), d = T(() => import("./RoutesSection-CDKMey49.js")), y = T(() => import("./LogsSection-CXx-HOWJ.js")), h = T(() => import("./EmailsSection-Dl44qyqY.js")), f = T(() => import("./CacheSection-CxEBVVkF.js")), _ = T(() => import("./JobsSection-DOBb4LjZ.js")), P = T(() => import("./ConfigSection-BiRAiaHj.js")), B = T(() => import("./InternalsSection-jhTCuK3j.js")), v = [
984
+ const s = T(() => import("./OverviewSection-BEc4Gktf.js")), t = T(() => import("./RequestsSection-DOI2MUFX.js")), i = T(() => import("./QueriesSection-BMImGXTn.js")), o = T(() => import("./EventsSection-B_TuVrGj.js")), d = T(() => import("./RoutesSection-C1sxt-AW.js")), y = T(() => import("./LogsSection-DZD0CCDi.js")), h = T(() => import("./EmailsSection-CYohBo62.js")), f = T(() => import("./CacheSection-z2TQRez9.js")), _ = T(() => import("./JobsSection-AjkEzyiv.js")), P = T(() => import("./ConfigSection-CFEaig69.js")), B = T(() => import("./InternalsSection-B1P2kNT-.js")), v = [
985
985
  "overview",
986
986
  "requests",
987
987
  "queries",
@@ -1079,7 +1079,7 @@ const Jt = ["data-theme"], Wt = { class: "ss-dash-header" }, Kt = { class: "ss-d
1079
1079
  }), S = {
1080
1080
  overview: s,
1081
1081
  requests: t,
1082
- queries: r,
1082
+ queries: i,
1083
1083
  events: o,
1084
1084
  routes: d,
1085
1085
  logs: y,
@@ -1094,22 +1094,22 @@ const Jt = ["data-theme"], Wt = { class: "ss-dash-header" }, Kt = { class: "ss-d
1094
1094
  "data-theme": n(D),
1095
1095
  id: "ss-dash"
1096
1096
  }, [
1097
- i("div", Wt, [
1098
- z[0] || (z[0] = i("div", { class: "ss-dash-header-left" }, [
1099
- i("span", { class: "ss-dash-logo" }, "Server Stats"),
1100
- i("span", { class: "ss-dash-logo-sub" }, "Dashboard")
1097
+ r("div", Wt, [
1098
+ z[0] || (z[0] = r("div", { class: "ss-dash-header-left" }, [
1099
+ r("span", { class: "ss-dash-logo" }, "Server Stats"),
1100
+ r("span", { class: "ss-dash-logo-sub" }, "Dashboard")
1101
1101
  ], -1)),
1102
- i("div", Kt, [
1103
- i("span", {
1102
+ r("div", Kt, [
1103
+ r("span", {
1104
1104
  class: U(["ss-dash-live-dot", { "ss-dash-connected": N.value }]),
1105
1105
  id: "ss-dash-live-dot"
1106
1106
  }, null, 2),
1107
- i("span", {
1107
+ r("span", {
1108
1108
  class: U(["ss-dash-live-label", { "ss-dash-connected": N.value }]),
1109
1109
  id: "ss-dash-live-label"
1110
1110
  }, C(N.value ? "Live" : "Polling"), 3)
1111
1111
  ]),
1112
- i("div", Xt, [
1112
+ r("div", Xt, [
1113
1113
  de(ye, { "class-prefix": "ss-dash" }),
1114
1114
  e.backUrl ? (a(), l("a", {
1115
1115
  key: 0,
@@ -1119,12 +1119,12 @@ const Jt = ["data-theme"], Wt = { class: "ss-dash-header" }, Kt = { class: "ss-d
1119
1119
  }, " ← App ", 8, Yt)) : k("", !0)
1120
1120
  ])
1121
1121
  ]),
1122
- i("div", Zt, [
1123
- i("div", {
1122
+ r("div", Zt, [
1123
+ r("div", {
1124
1124
  class: U(["ss-dash-sidebar", { "ss-dash-collapsed": H.value }]),
1125
1125
  id: "ss-dash-sidebar"
1126
1126
  }, [
1127
- i("nav", es, [
1127
+ r("nav", es, [
1128
1128
  (a(!0), l(G, null, ae(O.value, (w) => (a(), l("button", {
1129
1129
  key: w.id,
1130
1130
  type: "button",
@@ -1133,7 +1133,7 @@ const Jt = ["data-theme"], Wt = { class: "ss-dash-header" }, Kt = { class: "ss-d
1133
1133
  onClick: (ie) => J(w.id),
1134
1134
  title: H.value ? w.label : void 0
1135
1135
  }, [
1136
- i("span", ss, [
1136
+ r("span", ss, [
1137
1137
  (a(), l("svg", {
1138
1138
  width: "20",
1139
1139
  height: "20",
@@ -1146,7 +1146,7 @@ const Jt = ["data-theme"], Wt = { class: "ss-dash-header" }, Kt = { class: "ss-d
1146
1146
  innerHTML: (n(x)[w.id] || n(x).config).elements.join("")
1147
1147
  }, null, 8, as))
1148
1148
  ]),
1149
- i("span", ns, C(w.label), 1),
1149
+ r("span", ns, C(w.label), 1),
1150
1150
  Y.value[w.id] && Y.value[w.id].count > 0 ? (a(), l("span", {
1151
1151
  key: 0,
1152
1152
  class: U(["ss-dash-nav-badge", Y.value[w.id].variant || ""])
@@ -1160,7 +1160,7 @@ const Jt = ["data-theme"], Wt = { class: "ss-dash-header" }, Kt = { class: "ss-d
1160
1160
  onClick: (ie) => J(w.id),
1161
1161
  title: H.value ? w.label : void 0
1162
1162
  }, [
1163
- i("span", is, [
1163
+ r("span", is, [
1164
1164
  (a(), l("svg", {
1165
1165
  width: "20",
1166
1166
  height: "20",
@@ -1173,10 +1173,10 @@ const Jt = ["data-theme"], Wt = { class: "ss-dash-header" }, Kt = { class: "ss-d
1173
1173
  innerHTML: n(x)["custom-pane"].elements.join("")
1174
1174
  }, null, 8, rs))
1175
1175
  ]),
1176
- i("span", us, C(w.label), 1)
1176
+ r("span", us, C(w.label), 1)
1177
1177
  ], 10, ls))), 128))
1178
1178
  ]),
1179
- i("button", {
1179
+ r("button", {
1180
1180
  type: "button",
1181
1181
  class: "ss-dash-sidebar-toggle",
1182
1182
  id: "ss-dash-sidebar-toggle",
@@ -1204,15 +1204,15 @@ const Jt = ["data-theme"], Wt = { class: "ss-dash-header" }, Kt = { class: "ss-d
1204
1204
  }, null, 8, hs))
1205
1205
  ], 8, ds)
1206
1206
  ], 2),
1207
- i("div", vs, [
1208
- i("div", {
1207
+ r("div", vs, [
1208
+ r("div", {
1209
1209
  class: "ss-dash-pane ss-dash-active",
1210
1210
  id: `ss-dash-pane-${E.value}`
1211
1211
  }, [
1212
- i("div", gs, [
1212
+ r("div", gs, [
1213
1213
  (a(), A(Ee, null, {
1214
1214
  fallback: ve(() => [...z[1] || (z[1] = [
1215
- i("div", { class: "ss-dash-empty" }, "Loading...", -1)
1215
+ r("div", { class: "ss-dash-empty" }, "Loading...", -1)
1216
1216
  ])]),
1217
1217
  default: ve(() => [
1218
1218
  j.value ? (a(), A(Se(j.value), { key: 0 })) : (a(), l("div", ps, "Unknown section"))
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-14x39RI_.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-BfPAAjL5.js";
2
2
  export {
3
3
  s as DashboardPage,
4
4
  r as DebugPanel,