adonisjs-server-stats 1.10.3 → 1.11.1
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/field-resolvers.d.ts +64 -0
- package/dist/core/formatters.d.ts +15 -0
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +208 -203
- package/dist/react/CacheSection-BYN53kYO.js +135 -0
- package/dist/react/CacheStatsBar-CRodCOeP.js +27 -0
- package/dist/react/CacheTab-DOhuK05d.js +106 -0
- package/dist/react/{ConfigSection-DGgqjAal.js → ConfigSection-B9EHh4Rp.js} +1 -1
- package/dist/react/{ConfigTab-H3OnYqmK.js → ConfigTab-C8kriE2b.js} +1 -1
- package/dist/react/CustomPaneTab-CvzQS_Wh.js +99 -0
- package/dist/react/EmailPreviewOverlay-BmXOAvqG.js +58 -0
- package/dist/react/EmailsSection-BJyFJf7A.js +226 -0
- package/dist/react/EmailsTab-Ch8jp10B.js +110 -0
- package/dist/react/{EventsSection-C7RQW_LY.js → EventsSection-DJPwHeT8.js} +27 -26
- package/dist/react/EventsTab-B-FoehXC.js +58 -0
- package/dist/react/{InternalsContent-DBzsI0CG.js → InternalsContent-O8ino9oM.js} +133 -109
- package/dist/react/InternalsSection-B6VlVx5f.js +22 -0
- package/dist/react/InternalsTab-CkEKpRMU.js +17 -0
- package/dist/react/JobStatsBar-C7RslAFE.js +30 -0
- package/dist/react/JobsSection-DWF4i1t_.js +167 -0
- package/dist/react/JobsTab-DqnifQXV.js +129 -0
- package/dist/react/LogEntryRow-CMMkqA9M.js +43 -0
- package/dist/react/LogsSection-C1xC5aP4.js +198 -0
- package/dist/react/LogsTab-CS4sLfLw.js +79 -0
- package/dist/react/{OverviewSection-ABP9ueBo.js → OverviewSection-CxvfOR0v.js} +70 -80
- package/dist/react/QueriesSection-CrMdU5Ax.js +458 -0
- package/dist/react/{QueriesTab-BQzcxEiW.js → QueriesTab-x85PjkyS.js} +22 -21
- package/dist/react/RequestsSection-DETN9oZb.js +321 -0
- package/dist/react/{RoutesSection-BRhxrtjZ.js → RoutesSection-CmorkJeC.js} +1 -1
- package/dist/react/{RoutesTab-CpYH5lUw.js → RoutesTab-CbzBOzpc.js} +12 -12
- package/dist/react/SplitPaneWrapper-BiIgT4ND.js +49 -0
- package/dist/react/TimeAgoCell-o3KigGfM.js +8 -0
- package/dist/react/{TimelineTab-DjLR35Ce.js → TimelineTab-Ue9tUD_n.js} +71 -91
- package/dist/react/{index-CsImORX6.js → index-DwDK-4oX.js} +4 -4
- package/dist/react/index.js +6 -6
- package/dist/react/react/components/shared/CacheStatsBar.d.ts +13 -0
- package/dist/react/react/components/shared/EmailPreviewOverlay.d.ts +29 -0
- package/dist/react/react/components/shared/JobStatsBar.d.ts +12 -0
- package/dist/react/react/components/shared/LogEntryRow.d.ts +9 -0
- package/dist/react/react/components/shared/RelatedLogs.d.ts +2 -2
- package/dist/react/react/components/shared/SplitPaneWrapper.d.ts +7 -0
- package/dist/react/react/components/shared/TimeAgoCell.d.ts +17 -0
- package/dist/react/react/hooks/useDiagnosticsData.d.ts +14 -0
- package/dist/react/style.css +1 -1
- 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 +3 -3
- package/dist/src/edge/client-vue/debug-panel-deferred.js +4 -4
- package/dist/src/styles/components.css +67 -0
- package/dist/src/styles/dashboard.css +5 -15
- package/dist/src/styles/debug-panel.css +1 -22
- package/dist/src/styles/utilities.css +3 -1
- package/dist/vue/{CacheSection-ITqvpfH5.js → CacheSection-DT2Mwf_s.js} +1 -1
- package/dist/vue/{ConfigSection-DTn3GslE.js → ConfigSection-BwKwS9lh.js} +1 -1
- package/dist/vue/CustomPaneTab-Hr1IBHfz.js +172 -0
- package/dist/vue/{EmailsSection-DtLJ4XoS.js → EmailsSection-B65g0FVS.js} +1 -1
- package/dist/vue/{EventsSection-BOYYz0Ty.js → EventsSection-CxqtVF-o.js} +1 -1
- package/dist/vue/{JobsSection-BazTxcJL.js → JobsSection-rMIyMb-g.js} +1 -1
- package/dist/vue/{LogsSection-D55PjTKX.js → LogsSection-DmmZVJ7D.js} +1 -1
- package/dist/vue/{OverviewSection-1uBKo-Tu.js → OverviewSection-BMabyqw-.js} +49 -50
- package/dist/vue/{QueriesSection-rpoZ4ogd.js → QueriesSection-BfDFwGqH.js} +44 -45
- package/dist/vue/{QueriesTab-C8_7oprC.js → QueriesTab-DuTG7cpC.js} +30 -31
- package/dist/vue/RelatedLogs.vue_vue_type_script_setup_true_lang-Py1iu9GU.js +77 -0
- package/dist/vue/{RequestsSection-x7LvT0MC.js → RequestsSection-CTu4jPZ_.js} +143 -147
- package/dist/vue/{RoutesSection-CCD0zZqQ.js → RoutesSection-zQZDedL7.js} +1 -1
- package/dist/vue/TimelineTab-DHfXsX7t.js +334 -0
- package/dist/vue/components/shared/RelatedLogs.vue.d.ts +1 -4
- package/dist/vue/{index-C8MxnS7Q.js → index-CM3yNVUR.js} +2 -2
- package/dist/vue/index.js +1 -1
- package/dist/vue/style.css +1 -1
- package/package.json +7 -7
- package/dist/react/CacheSection-baMZotSn.js +0 -146
- package/dist/react/CacheTab-2cw_rMzj.js +0 -117
- package/dist/react/CustomPaneTab-B6r7ha0u.js +0 -98
- package/dist/react/EmailsSection-C-UZISG-.js +0 -262
- package/dist/react/EmailsTab-DbK4Eobn.js +0 -139
- package/dist/react/EventsTab-CfVr7AiM.js +0 -57
- package/dist/react/InternalsSection-t7ihcWO-.js +0 -32
- package/dist/react/InternalsTab-Oij0A2fN.js +0 -30
- package/dist/react/JobsSection-CQHNK_Ls.js +0 -187
- package/dist/react/JobsTab-znzf6jzk.js +0 -153
- package/dist/react/LogsSection-Dmm3rE2B.js +0 -233
- package/dist/react/LogsTab-D8unMV5P.js +0 -108
- package/dist/react/QueriesSection-CnmSkznA.js +0 -461
- package/dist/react/RelatedLogs-3A8RuGKH.js +0 -52
- package/dist/react/RequestsSection-kW79_M7k.js +0 -341
- package/dist/vue/CustomPaneTab-BJxT5Dp7.js +0 -172
- package/dist/vue/RelatedLogs.vue_vue_type_script_setup_true_lang-CB2_TzYW.js +0 -84
- package/dist/vue/TimelineTab-zj5Z5OdT.js +0 -338
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as $, ref as D, computed as d, openBlock as
|
|
2
|
-
import { filterQueries as K, countDuplicateQueries as L, computeQuerySummary as M, formatDuration as y, formatTime as R, timeAgo as V,
|
|
1
|
+
import { defineComponent as $, ref as D, computed as d, openBlock as l, createElementBlock as n, createElementVNode as e, withDirectives as Q, vModelText as N, toDisplayString as a, Fragment as S, renderList as E, withKeys as A, normalizeClass as h, createCommentVNode as f, unref as v } from "vue";
|
|
2
|
+
import { filterQueries as K, countDuplicateQueries as L, computeQuerySummary as M, formatDuration as y, formatTime as R, timeAgo as V, durationClassName as z } from "adonisjs-server-stats/core";
|
|
3
3
|
import { u as B } from "./useResizableTable-BoivAevK.js";
|
|
4
4
|
const F = { class: "ss-dbg-search-bar" }, I = { class: "ss-dbg-summary" }, P = {
|
|
5
5
|
key: 0,
|
|
@@ -20,44 +20,43 @@ const F = { class: "ss-dbg-search-bar" }, I = { class: "ss-dbg-summary" }, P = {
|
|
|
20
20
|
dashboardPath: {}
|
|
21
21
|
},
|
|
22
22
|
setup(_) {
|
|
23
|
-
const b = _, c = D(""),
|
|
23
|
+
const b = _, c = D(""), r = /* @__PURE__ */ new Set(), m = d(() => {
|
|
24
24
|
if (!b.data) return [];
|
|
25
25
|
const s = b.data;
|
|
26
26
|
return (Array.isArray(s) ? s : s.queries) || [];
|
|
27
|
-
}),
|
|
28
|
-
let s = `${
|
|
29
|
-
return
|
|
27
|
+
}), o = d(() => K(m.value, c.value)), p = d(() => L(m.value)), u = d(() => M(m.value, p.value)), C = d(() => {
|
|
28
|
+
let s = `${o.value.length} queries`;
|
|
29
|
+
return u.value.slowCount > 0 && (s += ` | ${u.value.slowCount} slow`), u.value.dupCount > 0 && (s += ` | ${u.value.dupCount} dup`), o.value.length > 0 && (s += ` | avg ${y(u.value.avgDuration)}`), s;
|
|
30
30
|
});
|
|
31
31
|
function g(s) {
|
|
32
|
-
|
|
32
|
+
r.has(s) ? r.delete(s) : r.add(s);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
return
|
|
34
|
+
function w(s) {
|
|
35
|
+
return r.has(s);
|
|
36
36
|
}
|
|
37
37
|
function k(s) {
|
|
38
|
-
|
|
39
|
-
return n === "very-slow" ? "ss-dbg-very-slow" : n === "slow" ? "ss-dbg-slow" : "";
|
|
38
|
+
return z(s, "ss-dbg");
|
|
40
39
|
}
|
|
41
|
-
const { tableRef: x } = B(() =>
|
|
42
|
-
return (s,
|
|
40
|
+
const { tableRef: x } = B(() => o.value);
|
|
41
|
+
return (s, i) => (l(), n("div", null, [
|
|
43
42
|
e("div", F, [
|
|
44
43
|
Q(e("input", {
|
|
45
|
-
"onUpdate:modelValue":
|
|
44
|
+
"onUpdate:modelValue": i[0] || (i[0] = (t) => c.value = t),
|
|
46
45
|
class: "ss-dbg-search",
|
|
47
46
|
placeholder: "Filter queries...",
|
|
48
47
|
type: "text"
|
|
49
48
|
}, null, 512), [
|
|
50
|
-
[
|
|
49
|
+
[N, c.value]
|
|
51
50
|
]),
|
|
52
|
-
e("span", I,
|
|
51
|
+
e("span", I, a(C.value), 1)
|
|
53
52
|
]),
|
|
54
|
-
|
|
53
|
+
o.value.length === 0 ? (l(), n("div", P, "No queries captured")) : (l(), n("table", {
|
|
55
54
|
key: 1,
|
|
56
55
|
ref_key: "tableRef",
|
|
57
56
|
ref: x,
|
|
58
57
|
class: "ss-dbg-table"
|
|
59
58
|
}, [
|
|
60
|
-
|
|
59
|
+
i[1] || (i[1] = e("thead", null, [
|
|
61
60
|
e("tr", null, [
|
|
62
61
|
e("th", null, "#"),
|
|
63
62
|
e("th", null, "SQL"),
|
|
@@ -68,34 +67,34 @@ const F = { class: "ss-dbg-search-bar" }, I = { class: "ss-dbg-summary" }, P = {
|
|
|
68
67
|
])
|
|
69
68
|
], -1)),
|
|
70
69
|
e("tbody", null, [
|
|
71
|
-
(
|
|
70
|
+
(l(!0), n(S, null, E(o.value, (t) => (l(), n("tr", {
|
|
72
71
|
key: t.id
|
|
73
72
|
}, [
|
|
74
|
-
e("td", U,
|
|
73
|
+
e("td", U, a(t.id), 1),
|
|
75
74
|
e("td", null, [
|
|
76
75
|
e("span", {
|
|
77
|
-
class:
|
|
76
|
+
class: h(["ss-dbg-sql", { "ss-dbg-expanded": w(t.id) }]),
|
|
78
77
|
role: "button",
|
|
79
78
|
tabindex: "0",
|
|
80
79
|
onClick: (T) => g(t.id),
|
|
81
80
|
onKeydown: A((T) => g(t.id), ["enter"])
|
|
82
|
-
},
|
|
83
|
-
p.value[t.sql] > 1 ? (
|
|
84
|
-
t.inTransaction ? (
|
|
81
|
+
}, a(t.sql), 43, X),
|
|
82
|
+
p.value[t.sql] > 1 ? (l(), n("span", j, " x" + a(p.value[t.sql]), 1)) : f("", !0),
|
|
83
|
+
t.inTransaction ? (l(), n("span", G, " TXN")) : f("", !0)
|
|
85
84
|
]),
|
|
86
85
|
e("td", {
|
|
87
|
-
class:
|
|
88
|
-
},
|
|
86
|
+
class: h(["ss-dbg-duration", k(t.duration)])
|
|
87
|
+
}, a(v(y)(t.duration)), 3),
|
|
89
88
|
e("td", null, [
|
|
90
89
|
e("span", {
|
|
91
|
-
class:
|
|
92
|
-
},
|
|
90
|
+
class: h(`ss-dbg-method ss-dbg-method-${t.method.toLowerCase()}`)
|
|
91
|
+
}, a(t.method), 3)
|
|
93
92
|
]),
|
|
94
|
-
e("td", H,
|
|
93
|
+
e("td", H, a(t.model || "-"), 1),
|
|
95
94
|
e("td", {
|
|
96
95
|
class: "ss-dbg-event-time",
|
|
97
|
-
title:
|
|
98
|
-
},
|
|
96
|
+
title: v(R)(t.timestamp)
|
|
97
|
+
}, a(v(V)(t.timestamp)), 9, J)
|
|
99
98
|
]))), 128))
|
|
100
99
|
])
|
|
101
100
|
], 512))
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { defineComponent as y, ref as k, openBlock as t, createElementBlock as o, createElementVNode as l, createTextVNode as x, toDisplayString as n, Fragment as g, renderList as L, unref as e, normalizeClass as _, createVNode as C, createCommentVNode as v } from "vue";
|
|
2
|
+
import { getStructuredData as a, getLogLevelCssClass as N, resolveLogLevel as f, resolveLogTimestamp as c, formatTime as V, timeAgo as q, resolveLogRequestId as m, resolveLogMessage as E } from "adonisjs-server-stats/core";
|
|
3
|
+
import { _ as R } from "./JsonViewer.vue_vue_type_script_setup_true_lang-Bid05zpm.js";
|
|
4
|
+
const T = { key: 0 }, b = { class: "ss-related-logs-title" }, w = { class: "ss-related-logs-count" }, B = { style: { overflow: "auto" } }, D = ["onClick"], I = ["title"], S = ["title"], $ = {
|
|
5
|
+
key: 1,
|
|
6
|
+
class: "ss-log-reqid-empty"
|
|
7
|
+
}, z = {
|
|
8
|
+
key: 3,
|
|
9
|
+
style: { width: "14px" }
|
|
10
|
+
}, A = { class: "ss-log-msg" }, F = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "ss-log-detail"
|
|
13
|
+
}, H = /* @__PURE__ */ y({
|
|
14
|
+
__name: "RelatedLogs",
|
|
15
|
+
props: {
|
|
16
|
+
logs: {}
|
|
17
|
+
},
|
|
18
|
+
setup(p) {
|
|
19
|
+
const r = k(null);
|
|
20
|
+
function h(u, i) {
|
|
21
|
+
i && (r.value = r.value === u ? null : u);
|
|
22
|
+
}
|
|
23
|
+
return (u, i) => p.logs.length > 0 ? (t(), o("div", T, [
|
|
24
|
+
l("div", b, [
|
|
25
|
+
i[0] || (i[0] = x(" Related Logs ", -1)),
|
|
26
|
+
l("span", w, "(" + n(p.logs.length) + ")", 1)
|
|
27
|
+
]),
|
|
28
|
+
l("div", B, [
|
|
29
|
+
(t(!0), o(g, null, L(p.logs, (s, d) => (t(), o(g, {
|
|
30
|
+
key: s.id || d
|
|
31
|
+
}, [
|
|
32
|
+
l("div", {
|
|
33
|
+
class: _([
|
|
34
|
+
"ss-log-entry",
|
|
35
|
+
e(a)(s) ? "ss-log-entry-expandable" : ""
|
|
36
|
+
]),
|
|
37
|
+
onClick: (M) => h(d, !!e(a)(s))
|
|
38
|
+
}, [
|
|
39
|
+
l("span", {
|
|
40
|
+
class: _([
|
|
41
|
+
"ss-log-level",
|
|
42
|
+
e(N)(e(f)(s), "ss-log-level")
|
|
43
|
+
])
|
|
44
|
+
}, n(e(f)(s).toUpperCase()), 3),
|
|
45
|
+
l("span", {
|
|
46
|
+
class: "ss-log-time",
|
|
47
|
+
title: e(c)(s) ? e(V)(e(c)(s)) : ""
|
|
48
|
+
}, n(e(c)(s) ? e(q)(e(c)(s)) : "-"), 9, I),
|
|
49
|
+
e(m)(s) ? (t(), o("span", {
|
|
50
|
+
key: 0,
|
|
51
|
+
class: "ss-log-reqid",
|
|
52
|
+
title: e(m)(s)
|
|
53
|
+
}, n(e(m)(s).slice(0, 8)), 9, S)) : (t(), o("span", $, "--")),
|
|
54
|
+
e(a)(s) ? (t(), o("span", {
|
|
55
|
+
key: 2,
|
|
56
|
+
class: _([
|
|
57
|
+
"ss-log-expand-icon",
|
|
58
|
+
r.value === d ? "ss-log-expand-icon-open" : ""
|
|
59
|
+
])
|
|
60
|
+
}, "▶", 2)) : (t(), o("span", z)),
|
|
61
|
+
l("span", A, n(e(E)(s)), 1)
|
|
62
|
+
], 10, D),
|
|
63
|
+
r.value === d && e(a)(s) ? (t(), o("div", F, [
|
|
64
|
+
C(R, {
|
|
65
|
+
value: e(a)(s),
|
|
66
|
+
"class-prefix": "ss-dbg",
|
|
67
|
+
"default-expanded": !0
|
|
68
|
+
}, null, 8, ["value"])
|
|
69
|
+
])) : v("", !0)
|
|
70
|
+
], 64))), 128))
|
|
71
|
+
])
|
|
72
|
+
])) : v("", !0);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
export {
|
|
76
|
+
H as _
|
|
77
|
+
};
|