adonisjs-server-stats 1.9.0 → 1.10.3

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 (227) hide show
  1. package/README.md +23 -14
  2. package/dist/core/config-utils.d.ts +8 -0
  3. package/dist/core/constants.d.ts +4 -0
  4. package/dist/core/dashboard-data-controller.d.ts +16 -0
  5. package/dist/core/dashboard-data-helpers.d.ts +12 -0
  6. package/dist/core/debug-data-controller.d.ts +4 -0
  7. package/dist/core/define-config-helpers.d.ts +25 -0
  8. package/dist/core/feature-detect-helpers.d.ts +36 -0
  9. package/dist/core/formatters-helpers.d.ts +23 -0
  10. package/dist/core/index.js +596 -509
  11. package/dist/core/log-utils-helpers.d.ts +13 -0
  12. package/dist/core/metrics.d.ts +3 -28
  13. package/dist/core/pagination.d.ts +0 -9
  14. package/dist/core/server-stats-controller.d.ts +6 -0
  15. package/dist/core/split-pane.d.ts +18 -0
  16. package/dist/core/trace-utils.d.ts +5 -0
  17. package/dist/core/transmit-helpers.d.ts +7 -0
  18. package/dist/core/types-dashboard.d.ts +178 -0
  19. package/dist/core/types-diagnostics.d.ts +85 -0
  20. package/dist/core/types.d.ts +11 -443
  21. package/dist/react/{CacheSection-xH75hwXu.js → CacheSection-baMZotSn.js} +2 -2
  22. package/dist/react/CacheTab-2cw_rMzj.js +117 -0
  23. package/dist/react/{ConfigSection-D8BO1Ry9.js → ConfigSection-DGgqjAal.js} +1 -1
  24. package/dist/react/{ConfigTab-CcN-tfjv.js → ConfigTab-H3OnYqmK.js} +1 -1
  25. package/dist/react/CustomPaneTab-B6r7ha0u.js +98 -0
  26. package/dist/react/{EmailsSection-BzlsTdPs.js → EmailsSection-C-UZISG-.js} +2 -2
  27. package/dist/react/EmailsTab-DbK4Eobn.js +139 -0
  28. package/dist/react/{EventsSection-CGQWiIdV.js → EventsSection-C7RQW_LY.js} +2 -2
  29. package/dist/react/EventsTab-CfVr7AiM.js +57 -0
  30. package/dist/react/{FilterBar-DQRXpWrb.js → FilterBar-CQ7bD669.js} +15 -15
  31. package/dist/react/{JobsSection-D7AHQmZi.js → JobsSection-CQHNK_Ls.js} +2 -2
  32. package/dist/react/{JobsTab-B3Lfdqed.js → JobsTab-znzf6jzk.js} +54 -42
  33. package/dist/react/{LogsSection-Cly1dpvS.js → LogsSection-Dmm3rE2B.js} +9 -3
  34. package/dist/react/LogsTab-D8unMV5P.js +108 -0
  35. package/dist/react/{OverviewSection-CkBGFEWq.js → OverviewSection-ABP9ueBo.js} +1 -1
  36. package/dist/react/{QueriesSection-CfCpnNUD.js → QueriesSection-CnmSkznA.js} +2 -2
  37. package/dist/react/{QueriesTab-DbBmAqzO.js → QueriesTab-BQzcxEiW.js} +37 -40
  38. package/dist/react/RelatedLogs-3A8RuGKH.js +52 -0
  39. package/dist/react/RequestsSection-kW79_M7k.js +341 -0
  40. package/dist/react/{RoutesSection-CRqF-cNM.js → RoutesSection-BRhxrtjZ.js} +2 -2
  41. package/dist/react/RoutesTab-CpYH5lUw.js +68 -0
  42. package/dist/react/TimelineTab-DjLR35Ce.js +214 -0
  43. package/dist/react/index-CsImORX6.js +1121 -0
  44. package/dist/react/index.js +1 -1
  45. package/dist/react/react/components/{Dashboard/shared → shared}/FilterBar.d.ts +4 -3
  46. package/dist/react/react/components/shared/RelatedLogs.d.ts +7 -0
  47. package/dist/react/react/hooks/useDashboardData.d.ts +4 -8
  48. package/dist/react/style.css +1 -1
  49. package/dist/src/collectors/app_collector.d.ts +0 -8
  50. package/dist/src/collectors/app_collector.js +45 -52
  51. package/dist/src/collectors/auto_detect.d.ts +0 -23
  52. package/dist/src/collectors/auto_detect.js +33 -55
  53. package/dist/src/collectors/db_pool_collector.d.ts +14 -16
  54. package/dist/src/collectors/db_pool_collector.js +72 -57
  55. package/dist/src/collectors/log_collector.d.ts +0 -47
  56. package/dist/src/collectors/log_collector.js +36 -65
  57. package/dist/src/collectors/queue_collector.d.ts +0 -20
  58. package/dist/src/collectors/queue_collector.js +60 -76
  59. package/dist/src/collectors/redis_collector.d.ts +10 -10
  60. package/dist/src/collectors/redis_collector.js +69 -66
  61. package/dist/src/config/deprecation_migration.d.ts +7 -0
  62. package/dist/src/config/deprecation_migration.js +201 -0
  63. package/dist/src/controller/debug_controller.d.ts +1 -1
  64. package/dist/src/controller/debug_controller.js +87 -81
  65. package/dist/src/dashboard/cache_handlers.d.ts +14 -0
  66. package/dist/src/dashboard/cache_handlers.js +52 -0
  67. package/dist/src/dashboard/chart_aggregator.d.ts +0 -7
  68. package/dist/src/dashboard/chart_aggregator.js +68 -50
  69. package/dist/src/dashboard/coalesce_cache.d.ts +25 -0
  70. package/dist/src/dashboard/coalesce_cache.js +47 -0
  71. package/dist/src/dashboard/dashboard_controller.d.ts +11 -37
  72. package/dist/src/dashboard/dashboard_controller.js +52 -532
  73. package/dist/src/dashboard/dashboard_page_assets.d.ts +17 -0
  74. package/dist/src/dashboard/dashboard_page_assets.js +51 -0
  75. package/dist/src/dashboard/dashboard_store.d.ts +19 -217
  76. package/dist/src/dashboard/dashboard_store.js +115 -1069
  77. package/dist/src/dashboard/dashboard_types.d.ts +83 -0
  78. package/dist/src/dashboard/dashboard_types.js +4 -0
  79. package/dist/src/dashboard/detail_queries.d.ts +19 -0
  80. package/dist/src/dashboard/detail_queries.js +98 -0
  81. package/dist/src/dashboard/email_event_builder.d.ts +8 -0
  82. package/dist/src/dashboard/email_event_builder.js +65 -0
  83. package/dist/src/dashboard/explain_query.d.ts +8 -0
  84. package/dist/src/dashboard/explain_query.js +22 -0
  85. package/dist/src/dashboard/filter_handlers.d.ts +23 -0
  86. package/dist/src/dashboard/filter_handlers.js +56 -0
  87. package/dist/src/dashboard/filtered_queries.d.ts +15 -0
  88. package/dist/src/dashboard/filtered_queries.js +155 -0
  89. package/dist/src/dashboard/flush_manager.d.ts +25 -0
  90. package/dist/src/dashboard/flush_manager.js +107 -0
  91. package/dist/src/dashboard/format_helpers.d.ts +126 -0
  92. package/dist/src/dashboard/format_helpers.js +140 -0
  93. package/dist/src/dashboard/inspector_manager.d.ts +36 -0
  94. package/dist/src/dashboard/inspector_manager.js +102 -0
  95. package/dist/src/dashboard/integrations/config_inspector.js +11 -13
  96. package/dist/src/dashboard/integrations/queue_inspector.d.ts +3 -3
  97. package/dist/src/dashboard/integrations/queue_inspector.js +13 -10
  98. package/dist/src/dashboard/jobs_handlers.d.ts +14 -0
  99. package/dist/src/dashboard/jobs_handlers.js +61 -0
  100. package/dist/src/dashboard/knex_factory.d.ts +18 -0
  101. package/dist/src/dashboard/knex_factory.js +91 -0
  102. package/dist/src/dashboard/migrator.js +30 -153
  103. package/dist/src/dashboard/migrator_tables.d.ts +19 -0
  104. package/dist/src/dashboard/migrator_tables.js +153 -0
  105. package/dist/src/dashboard/overview_queries.d.ts +66 -0
  106. package/dist/src/dashboard/overview_queries.js +155 -0
  107. package/dist/src/dashboard/overview_query_runners.d.ts +25 -0
  108. package/dist/src/dashboard/overview_query_runners.js +84 -0
  109. package/dist/src/dashboard/overview_store_queries.d.ts +40 -0
  110. package/dist/src/dashboard/overview_store_queries.js +69 -0
  111. package/dist/src/dashboard/paginate_helper.d.ts +12 -0
  112. package/dist/src/dashboard/paginate_helper.js +33 -0
  113. package/dist/src/dashboard/query_explain_handler.d.ts +10 -0
  114. package/dist/src/dashboard/query_explain_handler.js +80 -0
  115. package/dist/src/dashboard/read_queries.d.ts +32 -0
  116. package/dist/src/dashboard/read_queries.js +107 -0
  117. package/dist/src/dashboard/saved_filter_queries.d.ts +10 -0
  118. package/dist/src/dashboard/saved_filter_queries.js +24 -0
  119. package/dist/src/dashboard/storage_stats.d.ts +41 -0
  120. package/dist/src/dashboard/storage_stats.js +81 -0
  121. package/dist/src/dashboard/write_queue.d.ts +106 -0
  122. package/dist/src/dashboard/write_queue.js +225 -0
  123. package/dist/src/data/data_access.d.ts +6 -36
  124. package/dist/src/data/data_access.js +43 -188
  125. package/dist/src/data/data_access_helpers.d.ts +130 -0
  126. package/dist/src/data/data_access_helpers.js +212 -0
  127. package/dist/src/debug/debug_store.js +37 -32
  128. package/dist/src/debug/email_collector.d.ts +1 -10
  129. package/dist/src/debug/email_collector.js +78 -81
  130. package/dist/src/debug/event_collector.d.ts +0 -9
  131. package/dist/src/debug/event_collector.js +79 -62
  132. package/dist/src/debug/query_collector.js +23 -19
  133. package/dist/src/debug/route_inspector.d.ts +1 -5
  134. package/dist/src/debug/route_inspector.js +50 -51
  135. package/dist/src/debug/trace_collector.d.ts +10 -2
  136. package/dist/src/debug/trace_collector.js +23 -16
  137. package/dist/src/debug/types.d.ts +5 -1
  138. package/dist/src/define_config.d.ts +0 -65
  139. package/dist/src/define_config.js +93 -333
  140. package/dist/src/edge/client/dashboard.js +2 -2
  141. package/dist/src/edge/client/debug-panel-deferred.js +1 -1
  142. package/dist/src/edge/client/stats-bar.js +1 -1
  143. package/dist/src/edge/client-vue/dashboard.js +5 -5
  144. package/dist/src/edge/client-vue/debug-panel-deferred.js +3 -3
  145. package/dist/src/edge/client-vue/stats-bar.js +3 -3
  146. package/dist/src/edge/plugin.d.ts +0 -16
  147. package/dist/src/edge/plugin.js +57 -64
  148. package/dist/src/engine/request_metrics.d.ts +1 -0
  149. package/dist/src/engine/request_metrics.js +32 -42
  150. package/dist/src/middleware/request_tracking_middleware.d.ts +3 -8
  151. package/dist/src/middleware/request_tracking_middleware.js +65 -91
  152. package/dist/src/provider/auth_middleware_detector.d.ts +16 -0
  153. package/dist/src/provider/auth_middleware_detector.js +97 -0
  154. package/dist/src/provider/boot_helpers.d.ts +20 -0
  155. package/dist/src/provider/boot_helpers.js +91 -0
  156. package/dist/src/provider/boot_initializer.d.ts +28 -0
  157. package/dist/src/provider/boot_initializer.js +35 -0
  158. package/dist/src/provider/dashboard_init.d.ts +30 -0
  159. package/dist/src/provider/dashboard_init.js +138 -0
  160. package/dist/src/provider/dashboard_setup.d.ts +25 -0
  161. package/dist/src/provider/dashboard_setup.js +78 -0
  162. package/dist/src/provider/diagnostics.d.ts +134 -0
  163. package/dist/src/provider/diagnostics.js +127 -0
  164. package/dist/src/provider/email_bridge.d.ts +43 -0
  165. package/dist/src/provider/email_bridge.js +80 -0
  166. package/dist/src/provider/email_helpers.d.ts +13 -0
  167. package/dist/src/provider/email_helpers.js +68 -0
  168. package/dist/src/provider/pino_hook.d.ts +17 -0
  169. package/dist/src/provider/pino_hook.js +35 -0
  170. package/dist/src/provider/provider_helpers_extra.d.ts +47 -0
  171. package/dist/src/provider/provider_helpers_extra.js +177 -0
  172. package/dist/src/provider/server_stats_provider.d.ts +39 -85
  173. package/dist/src/provider/server_stats_provider.js +131 -936
  174. package/dist/src/provider/shutdown_helpers.d.ts +43 -0
  175. package/dist/src/provider/shutdown_helpers.js +70 -0
  176. package/dist/src/provider/toolbar_setup.d.ts +57 -0
  177. package/dist/src/provider/toolbar_setup.js +141 -0
  178. package/dist/src/routes/dashboard_routes.d.ts +14 -0
  179. package/dist/src/routes/dashboard_routes.js +197 -0
  180. package/dist/src/routes/debug_routes.d.ts +14 -0
  181. package/dist/src/routes/debug_routes.js +101 -0
  182. package/dist/src/routes/register_routes.d.ts +0 -78
  183. package/dist/src/routes/register_routes.js +22 -347
  184. package/dist/src/routes/stats_routes.d.ts +5 -0
  185. package/dist/src/routes/stats_routes.js +14 -0
  186. package/dist/src/styles/components.css +177 -0
  187. package/dist/src/styles/dashboard.css +8 -90
  188. package/dist/src/styles/debug-panel.css +10 -31
  189. package/dist/src/types.d.ts +306 -15
  190. package/dist/vue/{CacheSection-Cx-hj09X.js → CacheSection-ITqvpfH5.js} +1 -1
  191. package/dist/vue/{ConfigSection-CMXyryf6.js → ConfigSection-DTn3GslE.js} +1 -1
  192. package/dist/vue/{EmailsSection-DgKl9xGT.js → EmailsSection-DtLJ4XoS.js} +1 -1
  193. package/dist/vue/{EventsSection-BNMCAim1.js → EventsSection-BOYYz0Ty.js} +1 -1
  194. package/dist/vue/{JobsSection-CCMgMlxd.js → JobsSection-BazTxcJL.js} +1 -1
  195. package/dist/vue/{LogsSection-CvOnTxUu.js → LogsSection-D55PjTKX.js} +9 -3
  196. package/dist/vue/{LogsTab-Bg3o0Mm6.js → LogsTab-47zEK7jL.js} +4 -1
  197. package/dist/vue/{OverviewSection-CHgaKtUR.js → OverviewSection-1uBKo-Tu.js} +1 -1
  198. package/dist/vue/{QueriesSection-BnHRD98z.js → QueriesSection-rpoZ4ogd.js} +1 -1
  199. package/dist/vue/RelatedLogs.vue_vue_type_script_setup_true_lang-CB2_TzYW.js +84 -0
  200. package/dist/vue/RequestsSection-x7LvT0MC.js +401 -0
  201. package/dist/vue/{RoutesSection-BrceOcKQ.js → RoutesSection-CCD0zZqQ.js} +1 -1
  202. package/dist/vue/TimelineTab-zj5Z5OdT.js +338 -0
  203. package/dist/vue/components/Dashboard/sections/RequestsSection.vue.d.ts +4 -0
  204. package/dist/vue/components/DebugPanel/tabs/TimelineTab.vue.d.ts +4 -0
  205. package/dist/vue/components/{Dashboard/sections/TimelineSection.vue.d.ts → shared/RelatedLogs.vue.d.ts} +5 -6
  206. package/dist/vue/composables/useDashboardData.d.ts +12 -23
  207. package/dist/vue/index-C8MxnS7Q.js +1232 -0
  208. package/dist/vue/index.js +1 -1
  209. package/dist/vue/style.css +1 -1
  210. package/package.json +1 -1
  211. package/dist/react/CacheTab-DYmsZJJ1.js +0 -123
  212. package/dist/react/CustomPaneTab-D7_o3Ec6.js +0 -104
  213. package/dist/react/EmailsTab-Uh2CQY3o.js +0 -153
  214. package/dist/react/EventsTab-CC6DQzEm.js +0 -63
  215. package/dist/react/LogsTab-BbYK-iyh.js +0 -103
  216. package/dist/react/RequestsSection-Cb5a6MlT.js +0 -209
  217. package/dist/react/RoutesTab-Bwreij3e.js +0 -74
  218. package/dist/react/TimelineSection-B2y06kRE.js +0 -158
  219. package/dist/react/TimelineTab-6hthfdBB.js +0 -193
  220. package/dist/react/WaterfallChart-Cj73WdfM.js +0 -100
  221. package/dist/react/index-CecA4IdQ.js +0 -1075
  222. package/dist/react/react/components/Dashboard/sections/TimelineSection.d.ts +0 -8
  223. package/dist/vue/RequestsSection-B-uSlM0f.js +0 -243
  224. package/dist/vue/TimelineSection-CfvnA2Oo.js +0 -186
  225. package/dist/vue/TimelineTab-Db6lKKsD.js +0 -250
  226. package/dist/vue/WaterfallChart.vue_vue_type_script_setup_true_lang-tZ13cNj1.js +0 -118
  227. package/dist/vue/index-oLxS08vN.js +0 -1235
@@ -0,0 +1,338 @@
1
+ import { defineComponent as I, ref as c, computed as $, watch as Y, nextTick as j, onBeforeUnmount as K, openBlock as s, createElementBlock as l, Fragment as r, createElementVNode as t, toDisplayString as a, normalizeClass as g, unref as u, renderList as b, normalizeStyle as L, createTextVNode as N, createCommentVNode as p, createVNode as J, withDirectives as Q, vModelText as X, withModifiers as Z } from "vue";
2
+ import { initSplitPane as ee, formatDuration as m, TAB_ICONS as V, formatTime as te, timeAgo as se, durationSeverity as le } from "adonisjs-server-stats/core";
3
+ import { u as ae } from "./useApiClient-BQQ9CF-q.js";
4
+ import { u as ne } from "./useResizableTable-BoivAevK.js";
5
+ import { _ as oe } from "./RelatedLogs.vue_vue_type_script_setup_true_lang-CB2_TzYW.js";
6
+ const de = {
7
+ key: 0,
8
+ class: "ss-dbg-empty"
9
+ }, ie = { class: "ss-dbg-empty" }, re = {
10
+ key: 2,
11
+ class: "ss-dbg-tl-detail-wrapper"
12
+ }, ue = { class: "ss-dbg-tl-detail-header" }, ce = { class: "ss-dbg-tl-detail-url" }, ge = { class: "ss-dbg-tl-meta" }, be = { class: "ss-dbg-tl-legend" }, ve = { id: "ss-dbg-tl-waterfall" }, he = {
13
+ key: 0,
14
+ class: "ss-dbg-empty"
15
+ }, me = ["title"], fe = { class: "ss-dbg-tl-track" }, pe = ["title"], _e = { class: "ss-dbg-tl-dur" }, ye = {
16
+ key: 0,
17
+ class: "ss-dbg-tl-warnings"
18
+ }, ke = { class: "ss-dbg-tl-legend" }, we = { id: "ss-dbg-tl-waterfall" }, Ce = {
19
+ key: 0,
20
+ class: "ss-dbg-empty"
21
+ }, Te = ["title"], xe = { class: "ss-dbg-tl-track" }, $e = ["title"], Le = { class: "ss-dbg-tl-dur" }, Re = {
22
+ key: 0,
23
+ class: "ss-dbg-tl-warnings"
24
+ }, Be = {
25
+ key: 3,
26
+ class: "ss-dbg-empty"
27
+ }, De = { class: "ss-dbg-search-bar" }, Ee = { class: "ss-dbg-summary" }, Se = {
28
+ key: 0,
29
+ class: "ss-dbg-empty"
30
+ }, Ae = ["onClick"], Me = {
31
+ class: "ss-dbg-c-dim",
32
+ style: { "white-space": "nowrap" }
33
+ }, Ne = { class: "ss-dbg-c-text" }, qe = ["href"], Oe = ["viewBox", "innerHTML"], Pe = {
34
+ class: "ss-dbg-c-muted",
35
+ style: { "text-align": "center" }
36
+ }, Ve = ["title"], Ge = /* @__PURE__ */ I({
37
+ __name: "TimelineTab",
38
+ props: {
39
+ data: {},
40
+ dashboardPath: {},
41
+ baseUrl: {},
42
+ debugEndpoint: {},
43
+ authToken: {}
44
+ },
45
+ setup(R) {
46
+ const _ = R, y = c(""), v = c(null), n = c(null), B = c(!1), h = c(null), U = ae(_.baseUrl || "", _.authToken), k = $(() => {
47
+ const i = _.data;
48
+ if (!i) return [];
49
+ const o = Array.isArray(i) ? i : i.traces || [];
50
+ if (!y.value.trim()) return o;
51
+ const e = y.value.toLowerCase();
52
+ return o.filter(
53
+ (d) => d.url.toLowerCase().includes(e) || d.method.toLowerCase().includes(e) || String(d.statusCode).includes(e)
54
+ );
55
+ }), w = {
56
+ request: "#1e3a5f",
57
+ middleware: "rgba(30, 58, 95, 0.7)",
58
+ db: "#6d28d9",
59
+ view: "#0e7490",
60
+ mail: "#059669",
61
+ event: "#b45309",
62
+ custom: "#525252"
63
+ }, q = {
64
+ request: "Request",
65
+ middleware: "Middleware",
66
+ db: "Database",
67
+ view: "View",
68
+ mail: "Mail",
69
+ event: "Event",
70
+ custom: "Custom"
71
+ };
72
+ function H(i) {
73
+ v.value === i.id ? (v.value = null, n.value = null, h.value = null) : (v.value = i.id, z(i.id));
74
+ }
75
+ function O() {
76
+ v.value = null, n.value = null, h.value = null;
77
+ }
78
+ let f = null;
79
+ async function z(i) {
80
+ f && f.abort(), f = new AbortController(), B.value = !0, h.value = null, n.value = null;
81
+ const o = _.debugEndpoint || "/admin/api/debug";
82
+ try {
83
+ const d = await U().get(`${o}/traces/${i}`);
84
+ n.value = d;
85
+ } catch (e) {
86
+ if (e instanceof Error && e.name === "AbortError") return;
87
+ h.value = e instanceof Error ? e.message : "Failed to load trace";
88
+ } finally {
89
+ B.value = !1;
90
+ }
91
+ }
92
+ const C = $(() => n.value?.spans || []), T = $(() => n.value?.warnings || []);
93
+ function P(i, o) {
94
+ const e = o || 1, d = e > 0 ? i.startOffset / e * 100 : 0, G = e > 0 ? Math.max(i.duration / e * 100, 0.5) : 0.5;
95
+ return {
96
+ left: `${d}%`,
97
+ width: `${G}%`,
98
+ background: w[i.category] || w.custom
99
+ };
100
+ }
101
+ const { tableRef: F } = ne(() => k.value), D = c(null), E = c(null), S = c(null), A = c(null);
102
+ let x = null;
103
+ const M = $(() => n.value ? n.value.logs || [] : []);
104
+ Y([v, n], async () => {
105
+ x?.(), x = null, n.value && M.value.length > 0 && (await j(), D.value && E.value && S.value && A.value && (x = ee({
106
+ container: D.value,
107
+ handle: E.value,
108
+ topPane: S.value,
109
+ bottomPane: A.value,
110
+ storageKey: "ss-dbg-timeline-split"
111
+ })));
112
+ }), K(() => {
113
+ f && f.abort(), x?.();
114
+ });
115
+ function W(i) {
116
+ const o = le(i);
117
+ return o === "very-slow" ? "ss-dbg-very-slow" : o === "slow" ? "ss-dbg-slow" : "";
118
+ }
119
+ return (i, o) => (s(), l("div", null, [
120
+ v.value !== null ? (s(), l(r, { key: 0 }, [
121
+ B.value ? (s(), l("div", de, "Loading trace detail...")) : h.value ? (s(), l(r, { key: 1 }, [
122
+ t("div", { class: "ss-dbg-tl-detail-header" }, [
123
+ t("button", {
124
+ type: "button",
125
+ class: "ss-dbg-btn-clear",
126
+ onClick: O
127
+ }, "← Back")
128
+ ]),
129
+ t("div", ie, "Error: " + a(h.value), 1)
130
+ ], 64)) : n.value ? (s(), l("div", re, [
131
+ t("div", ue, [
132
+ t("button", {
133
+ type: "button",
134
+ class: "ss-dbg-btn-clear",
135
+ onClick: O
136
+ }, "← Back"),
137
+ t("span", {
138
+ class: g(`ss-dbg-method ss-dbg-method-${n.value.method.toLowerCase()}`)
139
+ }, a(n.value.method), 3),
140
+ t("span", ce, a(n.value.url), 1),
141
+ t("span", {
142
+ class: g(`ss-dbg-status ss-dbg-status-${Math.floor(n.value.statusCode / 100)}xx`)
143
+ }, a(n.value.statusCode), 3),
144
+ t("span", ge, a(u(m)(n.value.totalDuration)) + " · " + a(n.value.spanCount) + " spans ", 1)
145
+ ]),
146
+ M.value.length > 0 ? (s(), l("div", {
147
+ key: 0,
148
+ ref_key: "splitContainerRef",
149
+ ref: D,
150
+ class: "ss-dbg-split-container"
151
+ }, [
152
+ t("div", {
153
+ ref_key: "splitTopRef",
154
+ ref: S,
155
+ class: "ss-dbg-split-top"
156
+ }, [
157
+ t("div", be, [
158
+ (s(), l(r, null, b(w, (e, d) => t("span", {
159
+ key: d,
160
+ class: "ss-dbg-tl-legend-item"
161
+ }, [
162
+ t("span", {
163
+ class: "ss-dbg-tl-legend-dot",
164
+ style: L({ background: e })
165
+ }, null, 4),
166
+ N(" " + a(q[d] || d), 1)
167
+ ])), 64))
168
+ ]),
169
+ t("div", ve, [
170
+ C.value.length === 0 ? (s(), l("div", he, " No spans captured for this request ")) : p("", !0),
171
+ (s(!0), l(r, null, b(C.value, (e) => (s(), l("div", {
172
+ key: e.id,
173
+ class: "ss-dbg-tl-row"
174
+ }, [
175
+ t("span", {
176
+ class: "ss-dbg-tl-label",
177
+ title: e.label
178
+ }, a(e.label), 9, me),
179
+ t("span", fe, [
180
+ t("span", {
181
+ class: g(`ss-dbg-tl-bar ss-dbg-tl-bar-${e.category}`),
182
+ style: L(P(e, n.value.totalDuration)),
183
+ title: `${e.label}: ${u(m)(e.duration)}`
184
+ }, null, 14, pe)
185
+ ]),
186
+ t("span", _e, a(u(m)(e.duration)), 1)
187
+ ]))), 128))
188
+ ]),
189
+ T.value.length > 0 ? (s(), l("div", ye, [
190
+ o[2] || (o[2] = t("div", { class: "ss-dbg-tl-warnings-title" }, "Warnings", -1)),
191
+ (s(!0), l(r, null, b(T.value, (e, d) => (s(), l("div", {
192
+ key: d,
193
+ class: "ss-dbg-tl-warning"
194
+ }, a(e), 1))), 128))
195
+ ])) : p("", !0)
196
+ ], 512),
197
+ t("div", {
198
+ ref_key: "splitHandleRef",
199
+ ref: E,
200
+ class: "ss-dbg-split-handle"
201
+ }, null, 512),
202
+ t("div", {
203
+ ref_key: "splitBottomRef",
204
+ ref: A,
205
+ class: "ss-dbg-split-bottom"
206
+ }, [
207
+ J(oe, {
208
+ logs: M.value,
209
+ "class-prefix": "ss-dbg"
210
+ }, null, 8, ["logs"])
211
+ ], 512)
212
+ ], 512)) : (s(), l(r, { key: 1 }, [
213
+ t("div", ke, [
214
+ (s(), l(r, null, b(w, (e, d) => t("span", {
215
+ key: d,
216
+ class: "ss-dbg-tl-legend-item"
217
+ }, [
218
+ t("span", {
219
+ class: "ss-dbg-tl-legend-dot",
220
+ style: L({ background: e })
221
+ }, null, 4),
222
+ N(" " + a(q[d] || d), 1)
223
+ ])), 64))
224
+ ]),
225
+ t("div", we, [
226
+ C.value.length === 0 ? (s(), l("div", Ce, " No spans captured for this request ")) : p("", !0),
227
+ (s(!0), l(r, null, b(C.value, (e) => (s(), l("div", {
228
+ key: e.id,
229
+ class: "ss-dbg-tl-row"
230
+ }, [
231
+ t("span", {
232
+ class: "ss-dbg-tl-label",
233
+ title: e.label
234
+ }, a(e.label), 9, Te),
235
+ t("span", xe, [
236
+ t("span", {
237
+ class: g(`ss-dbg-tl-bar ss-dbg-tl-bar-${e.category}`),
238
+ style: L(P(e, n.value.totalDuration)),
239
+ title: `${e.label}: ${u(m)(e.duration)}`
240
+ }, null, 14, $e)
241
+ ]),
242
+ t("span", Le, a(u(m)(e.duration)), 1)
243
+ ]))), 128))
244
+ ]),
245
+ T.value.length > 0 ? (s(), l("div", Re, [
246
+ o[3] || (o[3] = t("div", { class: "ss-dbg-tl-warnings-title" }, "Warnings", -1)),
247
+ (s(!0), l(r, null, b(T.value, (e, d) => (s(), l("div", {
248
+ key: d,
249
+ class: "ss-dbg-tl-warning"
250
+ }, a(e), 1))), 128))
251
+ ])) : p("", !0)
252
+ ], 64))
253
+ ])) : (s(), l("div", Be, "Loading trace detail..."))
254
+ ], 64)) : (s(), l(r, { key: 1 }, [
255
+ t("div", De, [
256
+ Q(t("input", {
257
+ "onUpdate:modelValue": o[0] || (o[0] = (e) => y.value = e),
258
+ class: "ss-dbg-search",
259
+ placeholder: "Filter traces...",
260
+ type: "text"
261
+ }, null, 512), [
262
+ [X, y.value]
263
+ ]),
264
+ t("span", Ee, a(k.value.length) + " traces", 1)
265
+ ]),
266
+ k.value.length === 0 ? (s(), l("div", Se, "No traces captured")) : (s(), l("table", {
267
+ key: 1,
268
+ ref_key: "tableRef",
269
+ ref: F,
270
+ class: "ss-dbg-table"
271
+ }, [
272
+ o[4] || (o[4] = t("thead", null, [
273
+ t("tr", null, [
274
+ t("th", null, "#"),
275
+ t("th", null, "Method"),
276
+ t("th", null, "URL"),
277
+ t("th", null, "Status"),
278
+ t("th", null, "Duration"),
279
+ t("th", null, "Spans"),
280
+ t("th", null, "Time")
281
+ ])
282
+ ], -1)),
283
+ t("tbody", null, [
284
+ (s(!0), l(r, null, b(k.value, (e) => (s(), l("tr", {
285
+ key: e.id,
286
+ class: "ss-dbg-email-row",
287
+ onClick: (d) => H(e)
288
+ }, [
289
+ t("td", Me, a(e.id), 1),
290
+ t("td", null, [
291
+ t("span", {
292
+ class: g(`ss-dbg-method ss-dbg-method-${e.method.toLowerCase()}`)
293
+ }, a(e.method), 3)
294
+ ]),
295
+ t("td", Ne, [
296
+ N(a(e.url) + " ", 1),
297
+ R.dashboardPath ? (s(), l("a", {
298
+ key: 0,
299
+ href: `${R.dashboardPath}#requests?id=${e.id}`,
300
+ target: "_blank",
301
+ class: "ss-dbg-deeplink",
302
+ onClick: o[1] || (o[1] = Z(() => {
303
+ }, ["stop"]))
304
+ }, [
305
+ (s(), l("svg", {
306
+ viewBox: u(V)["open-external"].viewBox,
307
+ width: "12",
308
+ height: "12",
309
+ fill: "none",
310
+ stroke: "currentColor",
311
+ "stroke-width": "2",
312
+ innerHTML: u(V)["open-external"].elements.join("")
313
+ }, null, 8, Oe))
314
+ ], 8, qe)) : p("", !0)
315
+ ]),
316
+ t("td", null, [
317
+ t("span", {
318
+ class: g(`ss-dbg-status ss-dbg-status-${Math.floor(e.statusCode / 100)}xx`)
319
+ }, a(e.statusCode), 3)
320
+ ]),
321
+ t("td", {
322
+ class: g(["ss-dbg-duration", W(e.totalDuration)])
323
+ }, a(u(m)(e.totalDuration)), 3),
324
+ t("td", Pe, a(e.spanCount), 1),
325
+ t("td", {
326
+ class: "ss-dbg-event-time",
327
+ title: u(te)(e.timestamp)
328
+ }, a(u(se)(e.timestamp)), 9, Ve)
329
+ ], 8, Ae))), 128))
330
+ ])
331
+ ], 512))
332
+ ], 64))
333
+ ]));
334
+ }
335
+ });
336
+ export {
337
+ Ge as default
338
+ };
@@ -1,4 +1,8 @@
1
1
  declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
2
+ splitContainerRef: HTMLDivElement;
3
+ splitTopRef: HTMLDivElement;
4
+ splitHandleRef: HTMLDivElement;
5
+ splitBottomRef: HTMLDivElement;
2
6
  tableRef: HTMLTableElement;
3
7
  }, HTMLDivElement>;
4
8
  export default _default;
@@ -9,6 +9,10 @@ type __VLS_Props = {
9
9
  authToken?: string;
10
10
  };
11
11
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
12
+ splitContainerRef: HTMLDivElement;
13
+ splitTopRef: HTMLDivElement;
14
+ splitHandleRef: HTMLDivElement;
15
+ splitBottomRef: HTMLDivElement;
12
16
  tableRef: HTMLTableElement;
13
17
  }, HTMLDivElement>;
14
18
  export default _default;
@@ -1,10 +1,9 @@
1
+ import { LogEntry } from '../../../core/log-utils.js';
1
2
  type __VLS_Props = {
2
- /** When false, show a "tracing disabled" message instead of fetching. Defaults to true. */
3
- tracingEnabled?: boolean;
3
+ logs: LogEntry[];
4
+ classPrefix?: 'ss-dash' | 'ss-dbg';
4
5
  };
5
6
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
6
- tracingEnabled: boolean;
7
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
8
- tableRef: HTMLTableElement;
9
- }, HTMLDivElement>;
7
+ classPrefix: "ss-dash" | "ss-dbg";
8
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
10
9
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import { Ref, WatchSource } from 'vue';
2
- import { DashboardSection, TimeRange } from '../../core/index.js';
2
+ import { DashboardSection, PaginationState, TimeRange } from '../../core/index.js';
3
3
  export interface UseDashboardDataOptions {
4
4
  /** Base URL for API requests. */
5
5
  baseUrl?: string;
@@ -15,18 +15,22 @@ export interface UseDashboardDataOptions {
15
15
  refreshKey?: Ref<number> | WatchSource<number>;
16
16
  }
17
17
  export declare function useDashboardData(section: () => DashboardSection | string, options?: UseDashboardDataOptions): {
18
+ mutate(path: string, method?: "post" | "delete", body?: unknown): Promise<unknown>;
19
+ refresh(): void;
20
+ startRefresh(): void;
21
+ stopRefresh(): void;
22
+ goToPage(page: number): void;
23
+ setSearch(search: string): void;
24
+ setFilter(key: string, value: string | number | boolean): void;
25
+ setSort(column: string, direction?: "asc" | "desc"): void;
26
+ setTimeRange(range: TimeRange): void;
18
27
  data: Ref<unknown, unknown>;
19
28
  loading: Ref<boolean, boolean>;
20
29
  error: Ref<Error | null, Error | null>;
21
30
  isUnauthorized: Ref<boolean, boolean>;
22
- pagination: {
23
- page: number;
24
- perPage: number;
25
- total: number;
26
- totalPages: number;
27
- };
31
+ pagination: PaginationState;
28
32
  filter: {
29
- [x: string]: string | number | boolean;
33
+ [key: string]: string | number | boolean;
30
34
  search: string;
31
35
  };
32
36
  sort: {
@@ -34,19 +38,4 @@ export declare function useDashboardData(section: () => DashboardSection | strin
34
38
  direction: "asc" | "desc";
35
39
  };
36
40
  timeRange: Ref<TimeRange, TimeRange>;
37
- goToPage: (page: number) => void;
38
- setSearch: (search: string) => void;
39
- setFilter: (key: string, value: string | number | boolean) => void;
40
- setSort: (column: string, direction?: "asc" | "desc") => void;
41
- setTimeRange: (range: TimeRange) => void;
42
- refresh: () => void;
43
- startRefresh: () => void;
44
- stopRefresh: () => void;
45
- mutate: (path: string, method?: "post" | "delete", body?: unknown) => Promise<unknown>;
46
- fetchChart: (range: TimeRange) => Promise<unknown>;
47
- fetchGroupedQueries: () => Promise<unknown>;
48
- explainQuery: (queryId: number) => Promise<unknown>;
49
- retryJob: (jobId: string) => Promise<boolean>;
50
- deleteCacheKey: (key: string) => Promise<boolean>;
51
- fetchEmailPreview: (emailId: number) => Promise<string | null>;
52
41
  };