adonisjs-server-stats 1.8.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/log-utils.d.ts +14 -0
- 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-D5J5moz7.js → CacheSection-UCMptWyn.js} +1 -1
- package/dist/react/{CacheTab-F1MkWSZl.js → CacheTab-CA8LB1J5.js} +1 -1
- package/dist/react/{ConfigSection-DerLBu4o.js → ConfigSection-DfFd-WRq.js} +1 -1
- package/dist/react/{ConfigTab-Bsj7v9JW.js → ConfigTab-Bdg8YMer.js} +1 -1
- package/dist/react/{CustomPaneTab-gzdtDEvz.js → CustomPaneTab-Bxtv_8Rw.js} +1 -1
- package/dist/react/{EmailsSection-ndH3cvJk.js → EmailsSection-CM7stSyh.js} +1 -1
- package/dist/react/{EmailsTab-DVPHRx0L.js → EmailsTab-BDhEiomM.js} +1 -1
- package/dist/react/{EventsSection-ClIByDSk.js → EventsSection-ByQ-9blq.js} +1 -1
- package/dist/react/{EventsTab-CCzWEKrk.js → EventsTab-CMfY98Rl.js} +1 -1
- package/dist/react/{JobsSection-CVMyAs7O.js → JobsSection-DF3qEv9O.js} +1 -1
- package/dist/react/{JobsTab-CATUyb9V.js → JobsTab-BbrBWIOb.js} +1 -1
- package/dist/react/LogsSection-DcFTZY7b.js +227 -0
- package/dist/react/LogsTab-CicucmVk.js +103 -0
- package/dist/react/{OverviewSection-ae5AO2RG.js → OverviewSection-C4T1ur51.js} +1 -1
- package/dist/react/{QueriesSection-DFFr9Tbb.js → QueriesSection-PswteoF9.js} +1 -1
- package/dist/react/{QueriesTab-GrHRAREt.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-F7nANhF0.js → RoutesSection-BUSkM6PY.js} +1 -1
- package/dist/react/{RoutesTab-rugjhCPH.js → RoutesTab-DgVzd2PZ.js} +1 -1
- package/dist/react/TimelineTab-Covg5weo.js +220 -0
- package/dist/react/{index-DDzo1bZk.js → index-Cflz9Ebj.js} +390 -395
- package/dist/react/index.js +1 -1
- package/dist/react/react/components/shared/JsonViewer.d.ts +2 -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 +162 -0
- package/dist/src/styles/debug-panel.css +9 -0
- package/dist/src/types.d.ts +1 -1
- package/dist/vue/{CacheSection-DDvJ7bs2.js → CacheSection-oFAJL3mo.js} +2 -2
- package/dist/vue/{ConfigSection-GTCrvsPr.js → ConfigSection-BhfJ4KqL.js} +1 -1
- package/dist/vue/{EmailsSection-Ct5vsLCc.js → EmailsSection-BcNyhyHs.js} +1 -1
- package/dist/vue/{EventsSection-CRVhtagq.js → EventsSection-r60Q5Lmu.js} +2 -2
- package/dist/vue/{EventsTab-DQ4Nd6AK.js → EventsTab-BBM7olXF.js} +1 -1
- package/dist/vue/{JobsSection-B_wH2Co7.js → JobsSection-BHL-hkQw.js} +2 -2
- package/dist/vue/{JobsTab-BCvhOARO.js → JobsTab-WFnxPdN7.js} +1 -1
- package/dist/vue/{JsonViewer.vue_vue_type_script_setup_true_lang-Vsqar1zx.js → JsonViewer.vue_vue_type_script_setup_true_lang-Bid05zpm.js} +25 -23
- package/dist/vue/LogsSection-DRMGzJmg.js +252 -0
- package/dist/vue/LogsTab-Bg3o0Mm6.js +147 -0
- package/dist/vue/{OverviewSection-BqSwuMKH.js → OverviewSection-CXh6Ja1B.js} +1 -1
- package/dist/vue/{QueriesSection-D4Fs0YH6.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-Ys5dTzvF.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/shared/JsonViewer.vue.d.ts +3 -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/LogsSection-hAsLaKOC.js +0 -212
- package/dist/react/LogsTab-QouH4NPQ.js +0 -88
- package/dist/react/RequestsSection-DtwnJOnM.js +0 -209
- package/dist/react/TimelineSection-F5ThmTdy.js +0 -158
- package/dist/react/TimelineTab-Dvpf-I5C.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/LogsSection-C4NRFOpA.js +0 -227
- package/dist/vue/LogsTab-DpEQ7euu.js +0 -122
- package/dist/vue/RequestsSection-B0A5SKcM.js +0 -243
- package/dist/vue/TimelineSection-D38iHB08.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-Bj6pm5g3.js +0 -1235
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
import { defineComponent as se, inject as k, ref as u, computed as R, openBlock as a, createElementBlock as o, createVNode as le, unref as s, withCtx as ae, createElementVNode as n, Fragment as F, renderList as L, normalizeClass as x, toDisplayString as i, withKeys as $, createCommentVNode as f, createStaticVNode as oe, createTextVNode as S, createBlock as ne } from "vue";
|
|
2
|
-
import { LOG_LEVELS as ie, getLogLevelCssClass as re, resolveLogLevel as A, resolveLogTimestamp as b, formatTime as ue, timeAgo as de, resolveLogRequestId as m, resolveLogMessage as ce } from "adonisjs-server-stats/core";
|
|
3
|
-
import { u as ve } from "./index-Bj6pm5g3.js";
|
|
4
|
-
import { _ as pe } from "./FilterBar.vue_vue_type_script_setup_true_lang-ClJ37hhT.js";
|
|
5
|
-
import { _ as he } from "./PaginationControls.vue_vue_type_script_setup_true_lang-CuN7g_8Z.js";
|
|
6
|
-
const _e = { class: "ss-dash-log-filters" }, fe = ["onClick"], me = ["value"], ge = { class: "ss-dash-structured-search" }, ye = ["value"], ke = ["value"], be = ["value"], Ce = {
|
|
7
|
-
key: 0,
|
|
8
|
-
class: "ss-dash-filter-chips"
|
|
9
|
-
}, qe = {
|
|
10
|
-
key: 0,
|
|
11
|
-
class: "ss-dash-filter-chip"
|
|
12
|
-
}, Fe = {
|
|
13
|
-
key: 1,
|
|
14
|
-
class: "ss-dash-filter-chip"
|
|
15
|
-
}, Le = ["onClick"], $e = {
|
|
16
|
-
key: 1,
|
|
17
|
-
class: "ss-dash-empty"
|
|
18
|
-
}, Se = {
|
|
19
|
-
key: 2,
|
|
20
|
-
class: "ss-dash-empty"
|
|
21
|
-
}, Ie = {
|
|
22
|
-
key: 3,
|
|
23
|
-
class: "ss-dash-empty"
|
|
24
|
-
}, Ve = {
|
|
25
|
-
key: 4,
|
|
26
|
-
class: "ss-dash-log-entries"
|
|
27
|
-
}, we = ["title"], Ee = ["title", "onClick", "onKeydown"], Ke = {
|
|
28
|
-
key: 1,
|
|
29
|
-
class: "ss-dash-log-reqid-empty"
|
|
30
|
-
}, Ne = { class: "ss-dash-log-msg" }, Be = /* @__PURE__ */ se({
|
|
31
|
-
__name: "LogsSection",
|
|
32
|
-
setup(Pe) {
|
|
33
|
-
const B = k("ss-refresh-key", u(0)), O = k("ss-dashboard-endpoint", "/__stats/api"), U = k("ss-auth-token", void 0), W = k("ss-base-url", ""), {
|
|
34
|
-
data: g,
|
|
35
|
-
loading: j,
|
|
36
|
-
error: z,
|
|
37
|
-
pagination: c,
|
|
38
|
-
filter: G,
|
|
39
|
-
goToPage: M,
|
|
40
|
-
setSearch: H,
|
|
41
|
-
setFilter: v,
|
|
42
|
-
refresh: J
|
|
43
|
-
} = ve(() => "logs", {
|
|
44
|
-
baseUrl: W,
|
|
45
|
-
dashboardEndpoint: O,
|
|
46
|
-
authToken: U,
|
|
47
|
-
refreshKey: B
|
|
48
|
-
}), I = u(""), d = u("all"), r = u(""), p = u(""), h = u([]), C = u("level"), q = u("equals"), y = u(""), V = R(() => {
|
|
49
|
-
if (!g.value) return [];
|
|
50
|
-
const t = g.value;
|
|
51
|
-
return t.data || t.logs || g.value || [];
|
|
52
|
-
}), Q = R(
|
|
53
|
-
() => d.value !== "all" || r.value !== "" || h.value.length > 0
|
|
54
|
-
);
|
|
55
|
-
function X(t) {
|
|
56
|
-
I.value = t, H(t);
|
|
57
|
-
}
|
|
58
|
-
function Y(t) {
|
|
59
|
-
d.value = t, t === "all" ? v("level", "") : v("level", t);
|
|
60
|
-
}
|
|
61
|
-
function w(t) {
|
|
62
|
-
r.value = t, p.value = t, v("request_id", t);
|
|
63
|
-
}
|
|
64
|
-
function Z() {
|
|
65
|
-
const t = p.value.trim();
|
|
66
|
-
r.value = t, v("request_id", t);
|
|
67
|
-
}
|
|
68
|
-
function E() {
|
|
69
|
-
r.value = "", p.value = "", v("request_id", "");
|
|
70
|
-
}
|
|
71
|
-
function ee() {
|
|
72
|
-
d.value = "all", v("level", "");
|
|
73
|
-
}
|
|
74
|
-
function K() {
|
|
75
|
-
const t = G;
|
|
76
|
-
for (const l of Object.keys(t))
|
|
77
|
-
(l.startsWith("filter_field_") || l.startsWith("filter_op_") || l.startsWith("filter_value_")) && delete t[l];
|
|
78
|
-
h.value.forEach((l, e) => {
|
|
79
|
-
t[`filter_field_${e}`] = l.field, t[`filter_op_${e}`] = l.operator, t[`filter_value_${e}`] = l.value;
|
|
80
|
-
}), c.page = 1, J();
|
|
81
|
-
}
|
|
82
|
-
function N() {
|
|
83
|
-
const t = y.value.trim();
|
|
84
|
-
t && (h.value.push({
|
|
85
|
-
field: C.value,
|
|
86
|
-
operator: q.value,
|
|
87
|
-
value: t
|
|
88
|
-
}), y.value = "", K());
|
|
89
|
-
}
|
|
90
|
-
function te(t) {
|
|
91
|
-
h.value.splice(t, 1), K();
|
|
92
|
-
}
|
|
93
|
-
function P(t) {
|
|
94
|
-
return t.target.value;
|
|
95
|
-
}
|
|
96
|
-
function T(t) {
|
|
97
|
-
return t.target.value;
|
|
98
|
-
}
|
|
99
|
-
return (t, l) => (a(), o("div", null, [
|
|
100
|
-
le(pe, {
|
|
101
|
-
"model-value": I.value,
|
|
102
|
-
placeholder: "Search logs...",
|
|
103
|
-
summary: `${s(c).total ?? 0} logs`,
|
|
104
|
-
"onUpdate:modelValue": X
|
|
105
|
-
}, {
|
|
106
|
-
default: ae(() => [
|
|
107
|
-
n("div", _e, [
|
|
108
|
-
(a(!0), o(F, null, L(s(ie), (e) => (a(), o("button", {
|
|
109
|
-
key: e,
|
|
110
|
-
type: "button",
|
|
111
|
-
class: x(`ss-dash-log-filter ${d.value === e ? "ss-dash-active" : ""}`),
|
|
112
|
-
onClick: (_) => Y(e)
|
|
113
|
-
}, i(e), 11, fe))), 128)),
|
|
114
|
-
n("input", {
|
|
115
|
-
type: "text",
|
|
116
|
-
class: "ss-dash-filter-input ss-dash-reqid-input",
|
|
117
|
-
placeholder: "Filter by request ID...",
|
|
118
|
-
value: p.value,
|
|
119
|
-
onInput: l[0] || (l[0] = (e) => p.value = P(e)),
|
|
120
|
-
onKeydown: $(Z, ["enter"])
|
|
121
|
-
}, null, 40, me),
|
|
122
|
-
p.value || r.value ? (a(), o("button", {
|
|
123
|
-
key: 0,
|
|
124
|
-
type: "button",
|
|
125
|
-
class: "ss-dash-btn ss-dash-reqid-clear",
|
|
126
|
-
onClick: E
|
|
127
|
-
}, " Clear ")) : f("", !0)
|
|
128
|
-
])
|
|
129
|
-
]),
|
|
130
|
-
_: 1
|
|
131
|
-
}, 8, ["model-value", "summary"]),
|
|
132
|
-
n("div", ge, [
|
|
133
|
-
n("select", {
|
|
134
|
-
class: "ss-dash-filter-select",
|
|
135
|
-
value: C.value,
|
|
136
|
-
onChange: l[1] || (l[1] = (e) => C.value = T(e))
|
|
137
|
-
}, [...l[4] || (l[4] = [
|
|
138
|
-
oe('<option value="level">level</option><option value="message">message</option><option value="request_id">request_id</option><option value="userId">userId</option><option value="email">email</option><option value="path">path</option>', 6)
|
|
139
|
-
])], 40, ye),
|
|
140
|
-
n("select", {
|
|
141
|
-
class: "ss-dash-filter-select",
|
|
142
|
-
value: q.value,
|
|
143
|
-
onChange: l[2] || (l[2] = (e) => q.value = T(e))
|
|
144
|
-
}, [...l[5] || (l[5] = [
|
|
145
|
-
n("option", { value: "equals" }, "equals", -1),
|
|
146
|
-
n("option", { value: "contains" }, "contains", -1),
|
|
147
|
-
n("option", { value: "starts_with" }, "starts with", -1)
|
|
148
|
-
])], 40, ke),
|
|
149
|
-
n("input", {
|
|
150
|
-
class: "ss-dash-filter-input",
|
|
151
|
-
placeholder: "Value...",
|
|
152
|
-
value: y.value,
|
|
153
|
-
onInput: l[3] || (l[3] = (e) => y.value = P(e)),
|
|
154
|
-
onKeydown: $(N, ["enter"])
|
|
155
|
-
}, null, 40, be),
|
|
156
|
-
n("button", {
|
|
157
|
-
type: "button",
|
|
158
|
-
class: "ss-dash-btn",
|
|
159
|
-
onClick: N
|
|
160
|
-
}, "Add")
|
|
161
|
-
]),
|
|
162
|
-
Q.value ? (a(), o("div", Ce, [
|
|
163
|
-
d.value !== "all" ? (a(), o("span", qe, [
|
|
164
|
-
S(" level: " + i(d.value) + " ", 1),
|
|
165
|
-
n("button", {
|
|
166
|
-
type: "button",
|
|
167
|
-
class: "ss-dash-filter-chip-remove",
|
|
168
|
-
onClick: ee
|
|
169
|
-
}, " × ")
|
|
170
|
-
])) : f("", !0),
|
|
171
|
-
r.value ? (a(), o("span", Fe, [
|
|
172
|
-
S(" requestId: " + i(r.value.slice(0, 8)) + "... ", 1),
|
|
173
|
-
n("button", {
|
|
174
|
-
type: "button",
|
|
175
|
-
class: "ss-dash-filter-chip-remove",
|
|
176
|
-
onClick: E
|
|
177
|
-
}, " × ")
|
|
178
|
-
])) : f("", !0),
|
|
179
|
-
(a(!0), o(F, null, L(h.value, (e, _) => (a(), o("span", {
|
|
180
|
-
key: _,
|
|
181
|
-
class: "ss-dash-filter-chip"
|
|
182
|
-
}, [
|
|
183
|
-
S(i(e.field) + " " + i(e.operator) + ' "' + i(e.value) + '" ', 1),
|
|
184
|
-
n("button", {
|
|
185
|
-
type: "button",
|
|
186
|
-
class: "ss-dash-filter-chip-remove",
|
|
187
|
-
onClick: (D) => te(_)
|
|
188
|
-
}, " × ", 8, Le)
|
|
189
|
-
]))), 128))
|
|
190
|
-
])) : f("", !0),
|
|
191
|
-
s(z) ? (a(), o("div", $e, "Failed to load logs")) : s(j) && !s(g) ? (a(), o("div", Se, "Loading logs...")) : V.value.length === 0 ? (a(), o("div", Ie, " No log entries" + i(r.value ? ` matching request ${r.value}` : d.value !== "all" ? ` for ${d.value}` : ""), 1)) : (a(), o("div", Ve, [
|
|
192
|
-
(a(!0), o(F, null, L(V.value, (e, _) => (a(), o("div", {
|
|
193
|
-
key: String(e.id || _),
|
|
194
|
-
class: "ss-dash-log-entry"
|
|
195
|
-
}, [
|
|
196
|
-
n("span", {
|
|
197
|
-
class: x(`ss-dash-log-level ${s(re)(s(A)(e), "ss-dash-log-level")}`)
|
|
198
|
-
}, i(s(A)(e).toUpperCase()), 3),
|
|
199
|
-
n("span", {
|
|
200
|
-
class: "ss-dash-log-time",
|
|
201
|
-
title: s(b)(e) ? s(ue)(s(b)(e)) : ""
|
|
202
|
-
}, i(s(b)(e) ? s(de)(s(b)(e)) : "-"), 9, we),
|
|
203
|
-
s(m)(e) ? (a(), o("span", {
|
|
204
|
-
key: 0,
|
|
205
|
-
class: "ss-dash-log-reqid",
|
|
206
|
-
title: s(m)(e),
|
|
207
|
-
role: "button",
|
|
208
|
-
tabindex: "0",
|
|
209
|
-
onClick: (D) => w(s(m)(e)),
|
|
210
|
-
onKeydown: $((D) => w(s(m)(e)), ["enter"])
|
|
211
|
-
}, i(s(m)(e).slice(0, 8)), 41, Ee)) : (a(), o("span", Ke, "--")),
|
|
212
|
-
n("span", Ne, i(s(ce)(e)), 1)
|
|
213
|
-
]))), 128))
|
|
214
|
-
])),
|
|
215
|
-
s(c).totalPages > 1 ? (a(), ne(he, {
|
|
216
|
-
key: 5,
|
|
217
|
-
page: s(c).page,
|
|
218
|
-
"last-page": s(c).totalPages,
|
|
219
|
-
total: s(c).total,
|
|
220
|
-
onPageChange: s(M)
|
|
221
|
-
}, null, 8, ["page", "last-page", "total", "onPageChange"])) : f("", !0)
|
|
222
|
-
]));
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
export {
|
|
226
|
-
Be as default
|
|
227
|
-
};
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { defineComponent as E, ref as h, computed as _, openBlock as n, createElementBlock as l, createElementVNode as r, Fragment as L, renderList as k, unref as s, normalizeClass as C, toDisplayString as i, createCommentVNode as w, withDirectives as x, vModelText as q, withKeys as F } from "vue";
|
|
2
|
-
import { filterLogsByLevel as M, resolveLogRequestId as d, resolveLogMessage as B, LOG_LEVELS as N, getLogLevelCssClass as R, resolveLogLevel as I, resolveLogTimestamp as m, formatTime as S, timeAgo as D, TAB_ICONS as $ } from "adonisjs-server-stats/core";
|
|
3
|
-
const K = { class: "ss-dbg-log-filters" }, P = ["onClick"], U = {
|
|
4
|
-
class: "ss-dbg-summary",
|
|
5
|
-
style: { "margin-left": "auto" }
|
|
6
|
-
}, H = { class: "ss-dbg-search-bar" }, O = { class: "ss-dbg-summary" }, j = {
|
|
7
|
-
key: 0,
|
|
8
|
-
class: "ss-dbg-empty"
|
|
9
|
-
}, z = { key: 1 }, G = ["title"], J = ["title", "onClick", "onKeydown"], Q = {
|
|
10
|
-
key: 1,
|
|
11
|
-
class: "ss-dbg-log-reqid-empty"
|
|
12
|
-
}, W = { class: "ss-dbg-log-msg" }, X = ["href"], Y = ["viewBox", "innerHTML"], se = /* @__PURE__ */ E({
|
|
13
|
-
__name: "LogsTab",
|
|
14
|
-
props: {
|
|
15
|
-
data: {},
|
|
16
|
-
dashboardPath: {}
|
|
17
|
-
},
|
|
18
|
-
emits: ["filterByRequestId"],
|
|
19
|
-
setup(p, { emit: T }) {
|
|
20
|
-
const y = p, A = T, b = h("all"), c = h(""), a = h(""), v = _(() => {
|
|
21
|
-
const o = y.data;
|
|
22
|
-
let t = o ? (Array.isArray(o) ? o : o.logs || o.entries) || [] : [];
|
|
23
|
-
if (t = M(t, b.value), a.value.trim()) {
|
|
24
|
-
const e = a.value.trim().toLowerCase();
|
|
25
|
-
t = t.filter((u) => {
|
|
26
|
-
const g = d(u);
|
|
27
|
-
return g && g.toLowerCase().includes(e);
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
if (c.value.trim()) {
|
|
31
|
-
const e = c.value.trim().toLowerCase();
|
|
32
|
-
t = t.filter((u) => B(u).toLowerCase().includes(e));
|
|
33
|
-
}
|
|
34
|
-
return t;
|
|
35
|
-
}), V = _(() => {
|
|
36
|
-
const o = y.data, t = o ? (Array.isArray(o) ? o : o.logs || o.entries) || [] : [];
|
|
37
|
-
return `${v.value.length} of ${t.length} entries`;
|
|
38
|
-
});
|
|
39
|
-
function f(o) {
|
|
40
|
-
a.value = o, A("filterByRequestId", o);
|
|
41
|
-
}
|
|
42
|
-
return (o, t) => (n(), l("div", null, [
|
|
43
|
-
r("div", K, [
|
|
44
|
-
(n(!0), l(L, null, k(s(N), (e) => (n(), l("button", {
|
|
45
|
-
key: e,
|
|
46
|
-
type: "button",
|
|
47
|
-
class: C(["ss-dbg-log-filter", { "ss-dbg-active": b.value === e }]),
|
|
48
|
-
onClick: (u) => b.value = e
|
|
49
|
-
}, i(e), 11, P))), 128)),
|
|
50
|
-
a.value ? (n(), l("button", {
|
|
51
|
-
key: 0,
|
|
52
|
-
type: "button",
|
|
53
|
-
class: "ss-dbg-log-filter ss-dbg-active",
|
|
54
|
-
onClick: t[0] || (t[0] = (e) => a.value = "")
|
|
55
|
-
}, " req: " + i(a.value.slice(0, 8)) + " x ", 1)) : w("", !0),
|
|
56
|
-
r("span", U, i(v.value.length) + " entries", 1)
|
|
57
|
-
]),
|
|
58
|
-
r("div", H, [
|
|
59
|
-
x(r("input", {
|
|
60
|
-
"onUpdate:modelValue": t[1] || (t[1] = (e) => c.value = e),
|
|
61
|
-
class: "ss-dbg-search",
|
|
62
|
-
placeholder: "Filter log messages...",
|
|
63
|
-
type: "text"
|
|
64
|
-
}, null, 512), [
|
|
65
|
-
[q, c.value]
|
|
66
|
-
]),
|
|
67
|
-
x(r("input", {
|
|
68
|
-
"onUpdate:modelValue": t[2] || (t[2] = (e) => a.value = e),
|
|
69
|
-
class: "ss-dbg-search ss-dbg-reqid-input",
|
|
70
|
-
placeholder: "Filter by request ID...",
|
|
71
|
-
type: "text"
|
|
72
|
-
}, null, 512), [
|
|
73
|
-
[q, a.value]
|
|
74
|
-
]),
|
|
75
|
-
r("span", O, i(V.value), 1)
|
|
76
|
-
]),
|
|
77
|
-
v.value.length === 0 ? (n(), l("div", j, "No log entries")) : (n(), l("div", z, [
|
|
78
|
-
(n(!0), l(L, null, k(v.value, (e, u) => (n(), l("div", {
|
|
79
|
-
key: String(e.id || u),
|
|
80
|
-
class: "ss-dbg-log-entry"
|
|
81
|
-
}, [
|
|
82
|
-
r("span", {
|
|
83
|
-
class: C(["ss-dbg-log-level", s(R)(s(I)(e))])
|
|
84
|
-
}, i(s(I)(e).toUpperCase()), 3),
|
|
85
|
-
r("span", {
|
|
86
|
-
class: "ss-dbg-log-time",
|
|
87
|
-
title: s(m)(e) ? s(S)(s(m)(e)) : ""
|
|
88
|
-
}, i(s(m)(e) ? s(D)(s(m)(e)) : "-"), 9, G),
|
|
89
|
-
s(d)(e) ? (n(), l("span", {
|
|
90
|
-
key: 0,
|
|
91
|
-
class: "ss-dbg-log-reqid",
|
|
92
|
-
role: "button",
|
|
93
|
-
tabindex: "0",
|
|
94
|
-
title: s(d)(e),
|
|
95
|
-
onClick: (g) => f(s(d)(e)),
|
|
96
|
-
onKeydown: F((g) => f(s(d)(e)), ["enter"])
|
|
97
|
-
}, i(s(d)(e).slice(0, 8)), 41, J)) : (n(), l("span", Q, "-")),
|
|
98
|
-
r("span", W, i(s(B)(e)), 1),
|
|
99
|
-
p.dashboardPath && s(d)(e) ? (n(), l("a", {
|
|
100
|
-
key: 2,
|
|
101
|
-
href: `${p.dashboardPath}#logs?requestId=${s(d)(e)}`,
|
|
102
|
-
target: "_blank",
|
|
103
|
-
class: "ss-dbg-deeplink"
|
|
104
|
-
}, [
|
|
105
|
-
(n(), l("svg", {
|
|
106
|
-
viewBox: s($)["open-external"].viewBox,
|
|
107
|
-
width: "12",
|
|
108
|
-
height: "12",
|
|
109
|
-
fill: "none",
|
|
110
|
-
stroke: "currentColor",
|
|
111
|
-
"stroke-width": "2",
|
|
112
|
-
innerHTML: s($)["open-external"].elements.join("")
|
|
113
|
-
}, null, 8, Y))
|
|
114
|
-
], 8, X)) : w("", !0)
|
|
115
|
-
]))), 128))
|
|
116
|
-
]))
|
|
117
|
-
]));
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
export {
|
|
121
|
-
se as default
|
|
122
|
-
};
|
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
import { defineComponent as M, inject as _, ref as h, computed as U, openBlock as o, createElementBlock as l, Fragment as m, createElementVNode as s, normalizeClass as v, toDisplayString as n, createVNode as D, unref as a, createCommentVNode as u, createTextVNode as y, renderList as j, createBlock as K } from "vue";
|
|
2
|
-
import { formatTime as G, timeAgo as H, normalizeTraceFields as I, durationSeverity as J } from "adonisjs-server-stats/core";
|
|
3
|
-
import { u as O } from "./useApiClient-BQQ9CF-q.js";
|
|
4
|
-
import { u as Q } from "./index-Bj6pm5g3.js";
|
|
5
|
-
import { u as W } from "./useResizableTable-BoivAevK.js";
|
|
6
|
-
import { _ as X } from "./FilterBar.vue_vue_type_script_setup_true_lang-ClJ37hhT.js";
|
|
7
|
-
import { _ as Y } from "./PaginationControls.vue_vue_type_script_setup_true_lang-CuN7g_8Z.js";
|
|
8
|
-
import { _ as Z } from "./WaterfallChart.vue_vue_type_script_setup_true_lang-tZ13cNj1.js";
|
|
9
|
-
const ss = { class: "ss-dash-tl-detail-header" }, ts = { style: { color: "var(--ss-text)" } }, es = { class: "ss-dash-tl-meta" }, as = { class: "ss-dash-tl-detail-header" }, os = {
|
|
10
|
-
key: 0,
|
|
11
|
-
class: "ss-dash-empty"
|
|
12
|
-
}, ls = {
|
|
13
|
-
key: 1,
|
|
14
|
-
class: "ss-dash-empty"
|
|
15
|
-
}, ns = { class: "ss-dash-table-wrap" }, ds = {
|
|
16
|
-
key: 0,
|
|
17
|
-
class: "ss-dash-sort-arrow"
|
|
18
|
-
}, is = {
|
|
19
|
-
key: 0,
|
|
20
|
-
class: "ss-dash-sort-arrow"
|
|
21
|
-
}, rs = {
|
|
22
|
-
key: 0,
|
|
23
|
-
class: "ss-dash-sort-arrow"
|
|
24
|
-
}, us = {
|
|
25
|
-
key: 0,
|
|
26
|
-
class: "ss-dash-sort-arrow"
|
|
27
|
-
}, cs = {
|
|
28
|
-
key: 0,
|
|
29
|
-
class: "ss-dash-sort-arrow"
|
|
30
|
-
}, ps = ["onClick"], hs = { style: { color: "var(--ss-dim)" } }, ms = ["title"], vs = { style: { color: "var(--ss-muted)", "text-align": "center" } }, ys = {
|
|
31
|
-
key: 0,
|
|
32
|
-
style: { color: "var(--ss-amber-fg)", "text-align": "center", display: "block" }
|
|
33
|
-
}, fs = {
|
|
34
|
-
key: 1,
|
|
35
|
-
style: { color: "var(--ss-dim)", "text-align": "center", display: "block" }
|
|
36
|
-
}, ks = ["title"], _s = {
|
|
37
|
-
key: 1,
|
|
38
|
-
class: "ss-dash-empty"
|
|
39
|
-
}, Rs = /* @__PURE__ */ M({
|
|
40
|
-
__name: "RequestsSection",
|
|
41
|
-
setup(gs) {
|
|
42
|
-
const S = _("ss-refresh-key", h(0)), C = _("ss-dashboard-endpoint", "/__stats/api"), b = _("ss-auth-token", void 0), x = _("ss-base-url", ""), { data: f, loading: R, error: T, pagination: c, sort: r, goToPage: L, setSearch: A, setSort: B } = Q(
|
|
43
|
-
() => "requests",
|
|
44
|
-
{
|
|
45
|
-
baseUrl: x,
|
|
46
|
-
dashboardEndpoint: C,
|
|
47
|
-
authToken: b,
|
|
48
|
-
refreshKey: S
|
|
49
|
-
}
|
|
50
|
-
), $ = h(""), g = h(null), k = h(!1), d = h(null), w = U(() => {
|
|
51
|
-
if (!f.value) return [];
|
|
52
|
-
const i = f.value;
|
|
53
|
-
return i.data || i.requests || f.value || [];
|
|
54
|
-
}), F = O(x, b);
|
|
55
|
-
async function N(i) {
|
|
56
|
-
const t = i.id;
|
|
57
|
-
k.value = !0;
|
|
58
|
-
try {
|
|
59
|
-
const e = C || "/__stats/api", q = await F().fetch(`${e}/requests/${t}`);
|
|
60
|
-
d.value = I(q), g.value = i;
|
|
61
|
-
} catch {
|
|
62
|
-
} finally {
|
|
63
|
-
k.value = !1;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
function P() {
|
|
67
|
-
g.value = null, d.value = null;
|
|
68
|
-
}
|
|
69
|
-
function V(i) {
|
|
70
|
-
$.value = i, A(i);
|
|
71
|
-
}
|
|
72
|
-
function p(i) {
|
|
73
|
-
B(i);
|
|
74
|
-
}
|
|
75
|
-
function z(i) {
|
|
76
|
-
const t = J(i);
|
|
77
|
-
return t === "very-slow" ? "ss-dash-very-slow" : t === "slow" ? "ss-dash-slow" : "";
|
|
78
|
-
}
|
|
79
|
-
const { tableRef: E } = W(() => w.value);
|
|
80
|
-
return (i, t) => (o(), l("div", null, [
|
|
81
|
-
d.value && g.value ? (o(), l(m, { key: 0 }, [
|
|
82
|
-
s("div", ss, [
|
|
83
|
-
s("button", {
|
|
84
|
-
type: "button",
|
|
85
|
-
class: "ss-dash-btn",
|
|
86
|
-
onClick: P
|
|
87
|
-
}, " ← Back to Requests "),
|
|
88
|
-
s("span", {
|
|
89
|
-
class: v(`ss-dash-method ss-dash-method-${(d.value.method || "").toLowerCase()}`)
|
|
90
|
-
}, n(d.value.method), 3),
|
|
91
|
-
s("span", ts, n(d.value.url), 1),
|
|
92
|
-
s("span", {
|
|
93
|
-
class: v(`ss-dash-status ss-dash-status-${Math.floor((d.value.statusCode || 200) / 100)}xx`)
|
|
94
|
-
}, n(d.value.statusCode), 3),
|
|
95
|
-
s("span", es, n(d.value.totalDuration.toFixed(1)) + "ms · " + n(d.value.spanCount) + " spans ", 1)
|
|
96
|
-
]),
|
|
97
|
-
D(Z, {
|
|
98
|
-
spans: d.value.spans,
|
|
99
|
-
"total-duration": d.value.totalDuration,
|
|
100
|
-
warnings: d.value.warnings
|
|
101
|
-
}, null, 8, ["spans", "total-duration", "warnings"])
|
|
102
|
-
], 64)) : k.value ? (o(), l(m, { key: 1 }, [
|
|
103
|
-
s("div", as, [
|
|
104
|
-
s("button", {
|
|
105
|
-
type: "button",
|
|
106
|
-
class: "ss-dash-btn",
|
|
107
|
-
onClick: t[0] || (t[0] = (e) => k.value = !1)
|
|
108
|
-
}, " ← Back to Requests ")
|
|
109
|
-
]),
|
|
110
|
-
t[6] || (t[6] = s("div", { class: "ss-dash-empty" }, "Loading request detail...", -1))
|
|
111
|
-
], 64)) : (o(), l(m, { key: 2 }, [
|
|
112
|
-
D(X, {
|
|
113
|
-
"model-value": $.value,
|
|
114
|
-
placeholder: "Filter requests...",
|
|
115
|
-
summary: `${a(c).total ?? 0} requests`,
|
|
116
|
-
"onUpdate:modelValue": V
|
|
117
|
-
}, null, 8, ["model-value", "summary"]),
|
|
118
|
-
a(T) ? (o(), l("div", os, "Failed to load requests")) : u("", !0),
|
|
119
|
-
a(R) && !a(f) ? (o(), l("div", ls, "Loading requests...")) : (o(), l(m, { key: 2 }, [
|
|
120
|
-
s("div", ns, [
|
|
121
|
-
w.value.length > 0 ? (o(), l("table", {
|
|
122
|
-
key: 0,
|
|
123
|
-
ref_key: "tableRef",
|
|
124
|
-
ref: E,
|
|
125
|
-
class: "ss-dash-table"
|
|
126
|
-
}, [
|
|
127
|
-
t[15] || (t[15] = s("colgroup", null, [
|
|
128
|
-
s("col", { style: { width: "40px" } }),
|
|
129
|
-
s("col", { style: { width: "70px" } }),
|
|
130
|
-
s("col"),
|
|
131
|
-
s("col", { style: { width: "60px" } }),
|
|
132
|
-
s("col", { style: { width: "80px" } }),
|
|
133
|
-
s("col", { style: { width: "50px" } }),
|
|
134
|
-
s("col", { style: { width: "40px" } }),
|
|
135
|
-
s("col", { style: { width: "80px" } })
|
|
136
|
-
], -1)),
|
|
137
|
-
s("thead", null, [
|
|
138
|
-
s("tr", null, [
|
|
139
|
-
t[12] || (t[12] = s("th", null, "#", -1)),
|
|
140
|
-
s("th", {
|
|
141
|
-
class: "ss-dash-sortable",
|
|
142
|
-
onClick: t[1] || (t[1] = (e) => p("method"))
|
|
143
|
-
}, [
|
|
144
|
-
t[7] || (t[7] = y(" Method ", -1)),
|
|
145
|
-
a(r).column === "method" ? (o(), l("span", ds, n(a(r).direction === "asc" ? " ▲" : " ▼"), 1)) : u("", !0)
|
|
146
|
-
]),
|
|
147
|
-
s("th", {
|
|
148
|
-
class: "ss-dash-sortable",
|
|
149
|
-
onClick: t[2] || (t[2] = (e) => p("url"))
|
|
150
|
-
}, [
|
|
151
|
-
t[8] || (t[8] = y(" URL ", -1)),
|
|
152
|
-
a(r).column === "url" ? (o(), l("span", is, n(a(r).direction === "asc" ? " ▲" : " ▼"), 1)) : u("", !0)
|
|
153
|
-
]),
|
|
154
|
-
s("th", {
|
|
155
|
-
class: "ss-dash-sortable",
|
|
156
|
-
onClick: t[3] || (t[3] = (e) => p("statusCode"))
|
|
157
|
-
}, [
|
|
158
|
-
t[9] || (t[9] = y(" Status ", -1)),
|
|
159
|
-
a(r).column === "statusCode" ? (o(), l("span", rs, n(a(r).direction === "asc" ? " ▲" : " ▼"), 1)) : u("", !0)
|
|
160
|
-
]),
|
|
161
|
-
s("th", {
|
|
162
|
-
class: "ss-dash-sortable",
|
|
163
|
-
onClick: t[4] || (t[4] = (e) => p("duration"))
|
|
164
|
-
}, [
|
|
165
|
-
t[10] || (t[10] = y(" Duration ", -1)),
|
|
166
|
-
a(r).column === "duration" ? (o(), l("span", us, n(a(r).direction === "asc" ? " ▲" : " ▼"), 1)) : u("", !0)
|
|
167
|
-
]),
|
|
168
|
-
t[13] || (t[13] = s("th", null, "Spans", -1)),
|
|
169
|
-
t[14] || (t[14] = s("th", null, "⚠", -1)),
|
|
170
|
-
s("th", {
|
|
171
|
-
class: "ss-dash-sortable",
|
|
172
|
-
onClick: t[5] || (t[5] = (e) => p("createdAt"))
|
|
173
|
-
}, [
|
|
174
|
-
t[11] || (t[11] = y(" Time ", -1)),
|
|
175
|
-
a(r).column === "createdAt" ? (o(), l("span", cs, n(a(r).direction === "asc" ? " ▲" : " ▼"), 1)) : u("", !0)
|
|
176
|
-
])
|
|
177
|
-
])
|
|
178
|
-
]),
|
|
179
|
-
s("tbody", null, [
|
|
180
|
-
(o(!0), l(m, null, j(w.value, (e) => (o(), l("tr", {
|
|
181
|
-
key: e.id,
|
|
182
|
-
class: "ss-dash-clickable",
|
|
183
|
-
onClick: (q) => N(e)
|
|
184
|
-
}, [
|
|
185
|
-
s("td", null, [
|
|
186
|
-
s("span", hs, n(e.id), 1)
|
|
187
|
-
]),
|
|
188
|
-
s("td", null, [
|
|
189
|
-
s("span", {
|
|
190
|
-
class: v(`ss-dash-method ss-dash-method-${(e.method || "").toLowerCase()}`)
|
|
191
|
-
}, n(e.method), 3)
|
|
192
|
-
]),
|
|
193
|
-
s("td", null, [
|
|
194
|
-
s("span", {
|
|
195
|
-
style: { color: "var(--ss-text)", overflow: "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" },
|
|
196
|
-
title: e.url
|
|
197
|
-
}, n(e.url), 9, ms)
|
|
198
|
-
]),
|
|
199
|
-
s("td", null, [
|
|
200
|
-
s("span", {
|
|
201
|
-
class: v(`ss-dash-status ss-dash-status-${Math.floor((e.status_code || e.statusCode || 200) / 100)}xx`)
|
|
202
|
-
}, n(e.status_code || e.statusCode), 3)
|
|
203
|
-
]),
|
|
204
|
-
s("td", null, [
|
|
205
|
-
s("span", {
|
|
206
|
-
class: v(`ss-dash-duration ${z(e.total_duration || e.totalDuration || e.duration || 0)}`)
|
|
207
|
-
}, n((e.total_duration || e.totalDuration || e.duration || 0).toFixed(1)) + "ms ", 3)
|
|
208
|
-
]),
|
|
209
|
-
s("td", null, [
|
|
210
|
-
s("span", vs, n(e.span_count || e.spanCount || 0), 1)
|
|
211
|
-
]),
|
|
212
|
-
s("td", null, [
|
|
213
|
-
(e.warning_count || e.warningCount || 0) > 0 ? (o(), l("span", ys, n(e.warning_count || e.warningCount || 0), 1)) : (o(), l("span", fs, "-"))
|
|
214
|
-
]),
|
|
215
|
-
s("td", null, [
|
|
216
|
-
s("span", {
|
|
217
|
-
class: "ss-dash-event-time",
|
|
218
|
-
title: a(G)(
|
|
219
|
-
e.createdAt || e.created_at || e.timestamp || ""
|
|
220
|
-
)
|
|
221
|
-
}, n(a(H)(
|
|
222
|
-
e.createdAt || e.created_at || e.timestamp || ""
|
|
223
|
-
)), 9, ks)
|
|
224
|
-
])
|
|
225
|
-
], 8, ps))), 128))
|
|
226
|
-
])
|
|
227
|
-
], 512)) : (o(), l("div", _s, "No requests recorded yet"))
|
|
228
|
-
]),
|
|
229
|
-
a(c).totalPages > 1 ? (o(), K(Y, {
|
|
230
|
-
key: 0,
|
|
231
|
-
page: a(c).page,
|
|
232
|
-
"last-page": a(c).totalPages,
|
|
233
|
-
total: a(c).total,
|
|
234
|
-
onPageChange: a(L)
|
|
235
|
-
}, null, 8, ["page", "last-page", "total", "onPageChange"])) : u("", !0)
|
|
236
|
-
], 64))
|
|
237
|
-
], 64))
|
|
238
|
-
]));
|
|
239
|
-
}
|
|
240
|
-
});
|
|
241
|
-
export {
|
|
242
|
-
Rs as default
|
|
243
|
-
};
|