adonisjs-server-stats 1.9.0 → 1.10.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.
- package/dist/core/index.js +24 -22
- package/dist/core/split-pane.d.ts +18 -0
- package/dist/core/trace-utils.d.ts +5 -0
- package/dist/core/types.d.ts +1 -1
- package/dist/react/{CacheSection-xH75hwXu.js → CacheSection-UCMptWyn.js} +1 -1
- package/dist/react/{CacheTab-DYmsZJJ1.js → CacheTab-CA8LB1J5.js} +1 -1
- package/dist/react/{ConfigSection-D8BO1Ry9.js → ConfigSection-DfFd-WRq.js} +1 -1
- package/dist/react/{ConfigTab-CcN-tfjv.js → ConfigTab-Bdg8YMer.js} +1 -1
- package/dist/react/{CustomPaneTab-D7_o3Ec6.js → CustomPaneTab-Bxtv_8Rw.js} +1 -1
- package/dist/react/{EmailsSection-BzlsTdPs.js → EmailsSection-CM7stSyh.js} +1 -1
- package/dist/react/{EmailsTab-Uh2CQY3o.js → EmailsTab-BDhEiomM.js} +1 -1
- package/dist/react/{EventsSection-CGQWiIdV.js → EventsSection-ByQ-9blq.js} +1 -1
- package/dist/react/{EventsTab-CC6DQzEm.js → EventsTab-CMfY98Rl.js} +1 -1
- package/dist/react/{JobsSection-D7AHQmZi.js → JobsSection-DF3qEv9O.js} +1 -1
- package/dist/react/{JobsTab-B3Lfdqed.js → JobsTab-BbrBWIOb.js} +1 -1
- package/dist/react/{LogsSection-Cly1dpvS.js → LogsSection-DcFTZY7b.js} +1 -1
- package/dist/react/{LogsTab-BbYK-iyh.js → LogsTab-CicucmVk.js} +2 -2
- package/dist/react/{OverviewSection-CkBGFEWq.js → OverviewSection-C4T1ur51.js} +1 -1
- package/dist/react/{QueriesSection-CfCpnNUD.js → QueriesSection-PswteoF9.js} +1 -1
- package/dist/react/{QueriesTab-DbBmAqzO.js → QueriesTab-osLUWd4L.js} +1 -1
- package/dist/react/RelatedLogs-DFDOyUMr.js +40 -0
- package/dist/react/RequestsSection-Nag30rEA.js +341 -0
- package/dist/react/{RoutesSection-CRqF-cNM.js → RoutesSection-BUSkM6PY.js} +1 -1
- package/dist/react/{RoutesTab-Bwreij3e.js → RoutesTab-DgVzd2PZ.js} +1 -1
- package/dist/react/TimelineTab-Covg5weo.js +220 -0
- package/dist/react/{index-CecA4IdQ.js → index-Cflz9Ebj.js} +197 -203
- package/dist/react/index.js +1 -1
- package/dist/react/react/components/shared/RelatedLogs.d.ts +7 -0
- package/dist/react/style.css +1 -1
- package/dist/src/controller/debug_controller.js +1 -1
- package/dist/src/dashboard/dashboard_controller.js +13 -0
- package/dist/src/dashboard/dashboard_store.d.ts +1 -0
- package/dist/src/dashboard/dashboard_store.js +88 -41
- package/dist/src/dashboard/migrator.js +6 -0
- package/dist/src/data/data_access.d.ts +7 -0
- package/dist/src/data/data_access.js +32 -1
- package/dist/src/debug/trace_collector.d.ts +1 -1
- package/dist/src/debug/trace_collector.js +2 -1
- package/dist/src/debug/types.d.ts +4 -0
- package/dist/src/edge/client/dashboard.js +2 -2
- package/dist/src/edge/client/debug-panel-deferred.js +1 -1
- package/dist/src/edge/client-vue/dashboard.js +4 -4
- package/dist/src/edge/client-vue/debug-panel-deferred.js +3 -3
- package/dist/src/middleware/request_tracking_middleware.d.ts +1 -0
- package/dist/src/middleware/request_tracking_middleware.js +3 -1
- package/dist/src/provider/server_stats_provider.d.ts +3 -3
- package/dist/src/provider/server_stats_provider.js +29 -15
- package/dist/src/routes/register_routes.js +7 -2
- package/dist/src/styles/components.css +81 -0
- package/dist/src/styles/debug-panel.css +9 -0
- package/dist/src/types.d.ts +1 -1
- package/dist/vue/{CacheSection-Cx-hj09X.js → CacheSection-oFAJL3mo.js} +1 -1
- package/dist/vue/{ConfigSection-CMXyryf6.js → ConfigSection-BhfJ4KqL.js} +1 -1
- package/dist/vue/{EmailsSection-DgKl9xGT.js → EmailsSection-BcNyhyHs.js} +1 -1
- package/dist/vue/{EventsSection-BNMCAim1.js → EventsSection-r60Q5Lmu.js} +1 -1
- package/dist/vue/{JobsSection-CCMgMlxd.js → JobsSection-BHL-hkQw.js} +1 -1
- package/dist/vue/{LogsSection-CvOnTxUu.js → LogsSection-DRMGzJmg.js} +1 -1
- package/dist/vue/{OverviewSection-CHgaKtUR.js → OverviewSection-CXh6Ja1B.js} +1 -1
- package/dist/vue/{QueriesSection-BnHRD98z.js → QueriesSection-IodIsCJ-.js} +1 -1
- package/dist/vue/RelatedLogs.vue_vue_type_script_setup_true_lang-CB2_TzYW.js +84 -0
- package/dist/vue/RequestsSection-BPuMdmMc.js +401 -0
- package/dist/vue/{RoutesSection-BrceOcKQ.js → RoutesSection-NKo3Rbq3.js} +1 -1
- package/dist/vue/TimelineTab-zj5Z5OdT.js +338 -0
- package/dist/vue/components/Dashboard/sections/RequestsSection.vue.d.ts +4 -0
- package/dist/vue/components/DebugPanel/tabs/TimelineTab.vue.d.ts +4 -0
- package/dist/vue/components/{Dashboard/sections/TimelineSection.vue.d.ts → shared/RelatedLogs.vue.d.ts} +5 -6
- package/dist/vue/index-Dtgysd26.js +1229 -0
- package/dist/vue/index.js +1 -1
- package/dist/vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/react/RequestsSection-Cb5a6MlT.js +0 -209
- package/dist/react/TimelineSection-B2y06kRE.js +0 -158
- package/dist/react/TimelineTab-6hthfdBB.js +0 -193
- package/dist/react/WaterfallChart-Cj73WdfM.js +0 -100
- package/dist/react/react/components/Dashboard/sections/TimelineSection.d.ts +0 -8
- package/dist/vue/RequestsSection-B-uSlM0f.js +0 -243
- package/dist/vue/TimelineSection-CfvnA2Oo.js +0 -186
- package/dist/vue/TimelineTab-Db6lKKsD.js +0 -250
- package/dist/vue/WaterfallChart.vue_vue_type_script_setup_true_lang-tZ13cNj1.js +0 -118
- package/dist/vue/index-oLxS08vN.js +0 -1235
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { defineComponent as B, computed as c, openBlock as n, createElementBlock as l, normalizeClass as u, createElementVNode as a, Fragment as m, renderList as h, normalizeStyle as g, toDisplayString as d, createTextVNode as L, createCommentVNode as O } from "vue";
|
|
2
|
-
const S = {
|
|
3
|
-
key: 0,
|
|
4
|
-
class: "ss-dash-empty"
|
|
5
|
-
}, D = { class: "ss-dash-tl-legend" }, E = ["title"], N = { class: "ss-dash-tl-track" }, F = ["title"], M = { class: "ss-dash-tl-dur" }, R = {
|
|
6
|
-
key: 0,
|
|
7
|
-
class: "ss-dash-tl-warnings"
|
|
8
|
-
}, T = { class: "ss-dash-tl-warnings-title" }, q = /* @__PURE__ */ B({
|
|
9
|
-
__name: "WaterfallChart",
|
|
10
|
-
props: {
|
|
11
|
-
spans: {},
|
|
12
|
-
totalDuration: {},
|
|
13
|
-
className: {},
|
|
14
|
-
warnings: {}
|
|
15
|
-
},
|
|
16
|
-
setup(r) {
|
|
17
|
-
const o = r, f = {
|
|
18
|
-
request: "#1e3a5f",
|
|
19
|
-
middleware: "rgba(30, 58, 95, 0.7)",
|
|
20
|
-
db: "#6d28d9",
|
|
21
|
-
view: "#0e7490",
|
|
22
|
-
mail: "#059669",
|
|
23
|
-
event: "#b45309",
|
|
24
|
-
custom: "var(--ss-dim)"
|
|
25
|
-
}, _ = {
|
|
26
|
-
request: "Request",
|
|
27
|
-
middleware: "Middleware",
|
|
28
|
-
db: "DB",
|
|
29
|
-
mail: "Mail",
|
|
30
|
-
event: "Event",
|
|
31
|
-
view: "View",
|
|
32
|
-
custom: "Custom"
|
|
33
|
-
}, v = c(() => o.spans || []), b = c(
|
|
34
|
-
() => [...v.value].sort((t, s) => t.startOffset - s.startOffset)
|
|
35
|
-
), y = c(() => {
|
|
36
|
-
const t = {};
|
|
37
|
-
for (const s of b.value)
|
|
38
|
-
t[s.id] = s.parentId ? (t[s.parentId] || 0) + 1 : 0;
|
|
39
|
-
return t;
|
|
40
|
-
});
|
|
41
|
-
function $(t) {
|
|
42
|
-
const s = o.totalDuration || 1;
|
|
43
|
-
return `${t.startOffset / s * 100}%`;
|
|
44
|
-
}
|
|
45
|
-
function k(t) {
|
|
46
|
-
const s = o.totalDuration || 1;
|
|
47
|
-
return `${Math.max(t.duration / s * 100, 0.5)}%`;
|
|
48
|
-
}
|
|
49
|
-
function x(t) {
|
|
50
|
-
return t.length > 50 ? t.slice(0, 50) + "..." : t;
|
|
51
|
-
}
|
|
52
|
-
function C(t) {
|
|
53
|
-
return t === "db" ? "DB" : t;
|
|
54
|
-
}
|
|
55
|
-
function p(t) {
|
|
56
|
-
return t === "db" ? "purple" : t === "mail" ? "green" : t === "event" ? "amber" : t === "view" ? "blue" : "muted";
|
|
57
|
-
}
|
|
58
|
-
function w(t) {
|
|
59
|
-
const s = t.metadata ? Object.entries(t.metadata).filter(([, e]) => e != null).map(([e, i]) => `${e}=${i}`).join(", ") : "";
|
|
60
|
-
return s ? `${t.label} (${t.duration.toFixed(2)}ms)
|
|
61
|
-
${s}` : `${t.label} (${t.duration.toFixed(2)}ms)`;
|
|
62
|
-
}
|
|
63
|
-
return (t, s) => v.value.length === 0 ? (n(), l("div", S, "No spans recorded")) : (n(), l("div", {
|
|
64
|
-
key: 1,
|
|
65
|
-
class: u(`ss-dash-tl-waterfall ${r.className || ""}`)
|
|
66
|
-
}, [
|
|
67
|
-
a("div", D, [
|
|
68
|
-
(n(), l(m, null, h(_, (e, i) => a("div", {
|
|
69
|
-
key: i,
|
|
70
|
-
class: "ss-dash-tl-legend-item"
|
|
71
|
-
}, [
|
|
72
|
-
a("span", {
|
|
73
|
-
class: "ss-dash-tl-legend-dot",
|
|
74
|
-
style: g({ background: f[i] || f.custom })
|
|
75
|
-
}, null, 4),
|
|
76
|
-
a("span", null, d(e), 1)
|
|
77
|
-
])), 64))
|
|
78
|
-
]),
|
|
79
|
-
(n(!0), l(m, null, h(b.value, (e) => (n(), l("div", {
|
|
80
|
-
key: e.id,
|
|
81
|
-
class: "ss-dash-tl-row"
|
|
82
|
-
}, [
|
|
83
|
-
a("div", {
|
|
84
|
-
class: "ss-dash-tl-label",
|
|
85
|
-
title: w(e),
|
|
86
|
-
style: g({ paddingLeft: 8 + (y.value[e.id] || 0) * 16 + "px" })
|
|
87
|
-
}, [
|
|
88
|
-
a("span", {
|
|
89
|
-
class: u(`ss-dash-badge ss-dash-badge-${p(e.category)}`),
|
|
90
|
-
style: { "font-size": "9px", "margin-right": "4px" }
|
|
91
|
-
}, d(C(e.category)), 3),
|
|
92
|
-
L(" " + d(x(e.label)), 1)
|
|
93
|
-
], 12, E),
|
|
94
|
-
a("div", N, [
|
|
95
|
-
a("div", {
|
|
96
|
-
class: u(`ss-dash-tl-bar ss-dash-tl-bar-${e.category || "custom"}`),
|
|
97
|
-
style: g({
|
|
98
|
-
left: $(e),
|
|
99
|
-
width: k(e)
|
|
100
|
-
}),
|
|
101
|
-
title: w(e)
|
|
102
|
-
}, null, 14, F)
|
|
103
|
-
]),
|
|
104
|
-
a("span", M, d(e.duration.toFixed(2)) + "ms", 1)
|
|
105
|
-
]))), 128)),
|
|
106
|
-
r.warnings && r.warnings.length > 0 ? (n(), l("div", R, [
|
|
107
|
-
a("div", T, "Warnings (" + d(r.warnings.length) + ")", 1),
|
|
108
|
-
(n(!0), l(m, null, h(r.warnings, (e, i) => (n(), l("div", {
|
|
109
|
-
key: i,
|
|
110
|
-
class: "ss-dash-tl-warning"
|
|
111
|
-
}, d(e), 1))), 128))
|
|
112
|
-
])) : O("", !0)
|
|
113
|
-
], 2));
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
export {
|
|
117
|
-
q as _
|
|
118
|
-
};
|