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
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { defineComponent as ie, inject as C, ref as u, computed as B, openBlock as a, createElementBlock as o, createVNode as O, unref as s, withCtx as ue, createElementVNode as n, Fragment as q, renderList as x, normalizeClass as $, toDisplayString as i, withKeys as V, createCommentVNode as _, createStaticVNode as re, createTextVNode as w, withModifiers as U, createBlock as de } from "vue";
|
|
2
|
+
import { LOG_LEVELS as ce, getStructuredData as m, getLogLevelCssClass as ve, resolveLogLevel as W, resolveLogTimestamp as F, formatTime as pe, timeAgo as he, resolveLogRequestId as g, resolveLogMessage as _e } from "adonisjs-server-stats/core";
|
|
3
|
+
import { _ as fe } from "./JsonViewer.vue_vue_type_script_setup_true_lang-Bid05zpm.js";
|
|
4
|
+
import { u as me } from "./index-Dtgysd26.js";
|
|
5
|
+
import { _ as ge } from "./FilterBar.vue_vue_type_script_setup_true_lang-ClJ37hhT.js";
|
|
6
|
+
import { _ as ye } from "./PaginationControls.vue_vue_type_script_setup_true_lang-CuN7g_8Z.js";
|
|
7
|
+
const ke = { class: "ss-dash-log-filters" }, be = ["onClick"], Ce = ["value"], qe = { class: "ss-dash-structured-search" }, $e = ["value"], Fe = ["value"], Le = ["value"], Se = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "ss-dash-filter-chips"
|
|
10
|
+
}, Ie = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "ss-dash-filter-chip"
|
|
13
|
+
}, xe = {
|
|
14
|
+
key: 1,
|
|
15
|
+
class: "ss-dash-filter-chip"
|
|
16
|
+
}, Ve = ["onClick"], we = {
|
|
17
|
+
key: 1,
|
|
18
|
+
class: "ss-dash-empty"
|
|
19
|
+
}, Ee = {
|
|
20
|
+
key: 2,
|
|
21
|
+
class: "ss-dash-empty"
|
|
22
|
+
}, Ke = {
|
|
23
|
+
key: 3,
|
|
24
|
+
class: "ss-dash-empty"
|
|
25
|
+
}, Ne = {
|
|
26
|
+
key: 4,
|
|
27
|
+
class: "ss-dash-log-entries"
|
|
28
|
+
}, De = ["onClick"], Pe = ["title"], Te = ["title", "onClick", "onKeydown"], Re = {
|
|
29
|
+
key: 1,
|
|
30
|
+
class: "ss-dash-log-reqid-empty"
|
|
31
|
+
}, Ae = {
|
|
32
|
+
key: 3,
|
|
33
|
+
style: { width: "14px" }
|
|
34
|
+
}, Be = { class: "ss-dash-log-msg" }, Oe = {
|
|
35
|
+
key: 0,
|
|
36
|
+
class: "ss-dash-log-detail"
|
|
37
|
+
}, Je = /* @__PURE__ */ ie({
|
|
38
|
+
__name: "LogsSection",
|
|
39
|
+
setup(Ue) {
|
|
40
|
+
const j = C("ss-refresh-key", u(0)), M = C("ss-dashboard-endpoint", "/__stats/api"), z = C("ss-auth-token", void 0), G = C("ss-base-url", ""), {
|
|
41
|
+
data: y,
|
|
42
|
+
loading: H,
|
|
43
|
+
error: J,
|
|
44
|
+
pagination: v,
|
|
45
|
+
filter: Q,
|
|
46
|
+
goToPage: X,
|
|
47
|
+
setSearch: Y,
|
|
48
|
+
setFilter: p,
|
|
49
|
+
refresh: Z
|
|
50
|
+
} = me(() => "logs", {
|
|
51
|
+
baseUrl: G,
|
|
52
|
+
dashboardEndpoint: M,
|
|
53
|
+
authToken: z,
|
|
54
|
+
refreshKey: j
|
|
55
|
+
}), E = u(""), d = u("all"), r = u(""), h = u(""), k = u(null), f = u([]), L = u("level"), S = u("equals"), b = u(""), K = B(() => {
|
|
56
|
+
if (!y.value) return [];
|
|
57
|
+
const t = y.value;
|
|
58
|
+
return t.data || t.logs || y.value || [];
|
|
59
|
+
}), ee = B(
|
|
60
|
+
() => d.value !== "all" || r.value !== "" || f.value.length > 0
|
|
61
|
+
);
|
|
62
|
+
function te(t, l) {
|
|
63
|
+
l && (k.value = k.value === t ? null : t);
|
|
64
|
+
}
|
|
65
|
+
function se(t) {
|
|
66
|
+
E.value = t, Y(t);
|
|
67
|
+
}
|
|
68
|
+
function le(t) {
|
|
69
|
+
d.value = t, t === "all" ? p("level", "") : p("level", t);
|
|
70
|
+
}
|
|
71
|
+
function N(t) {
|
|
72
|
+
r.value = t, h.value = t, p("request_id", t);
|
|
73
|
+
}
|
|
74
|
+
function ae() {
|
|
75
|
+
const t = h.value.trim();
|
|
76
|
+
r.value = t, p("request_id", t);
|
|
77
|
+
}
|
|
78
|
+
function D() {
|
|
79
|
+
r.value = "", h.value = "", p("request_id", "");
|
|
80
|
+
}
|
|
81
|
+
function oe() {
|
|
82
|
+
d.value = "all", p("level", "");
|
|
83
|
+
}
|
|
84
|
+
function P() {
|
|
85
|
+
const t = Q;
|
|
86
|
+
for (const l of Object.keys(t))
|
|
87
|
+
(l.startsWith("filter_field_") || l.startsWith("filter_op_") || l.startsWith("filter_value_")) && delete t[l];
|
|
88
|
+
f.value.forEach((l, e) => {
|
|
89
|
+
t[`filter_field_${e}`] = l.field, t[`filter_op_${e}`] = l.operator, t[`filter_value_${e}`] = l.value;
|
|
90
|
+
}), v.page = 1, Z();
|
|
91
|
+
}
|
|
92
|
+
function T() {
|
|
93
|
+
const t = b.value.trim();
|
|
94
|
+
t && (f.value.push({
|
|
95
|
+
field: L.value,
|
|
96
|
+
operator: S.value,
|
|
97
|
+
value: t
|
|
98
|
+
}), b.value = "", P());
|
|
99
|
+
}
|
|
100
|
+
function ne(t) {
|
|
101
|
+
f.value.splice(t, 1), P();
|
|
102
|
+
}
|
|
103
|
+
function R(t) {
|
|
104
|
+
return t.target.value;
|
|
105
|
+
}
|
|
106
|
+
function A(t) {
|
|
107
|
+
return t.target.value;
|
|
108
|
+
}
|
|
109
|
+
return (t, l) => (a(), o("div", null, [
|
|
110
|
+
O(ge, {
|
|
111
|
+
"model-value": E.value,
|
|
112
|
+
placeholder: "Search logs...",
|
|
113
|
+
summary: `${s(v).total ?? 0} logs`,
|
|
114
|
+
"onUpdate:modelValue": se
|
|
115
|
+
}, {
|
|
116
|
+
default: ue(() => [
|
|
117
|
+
n("div", ke, [
|
|
118
|
+
(a(!0), o(q, null, x(s(ce), (e) => (a(), o("button", {
|
|
119
|
+
key: e,
|
|
120
|
+
type: "button",
|
|
121
|
+
class: $(`ss-dash-log-filter ${d.value === e ? "ss-dash-active" : ""}`),
|
|
122
|
+
onClick: (c) => le(e)
|
|
123
|
+
}, i(e), 11, be))), 128)),
|
|
124
|
+
n("input", {
|
|
125
|
+
type: "text",
|
|
126
|
+
class: "ss-dash-filter-input ss-dash-reqid-input",
|
|
127
|
+
placeholder: "Filter by request ID...",
|
|
128
|
+
value: h.value,
|
|
129
|
+
onInput: l[0] || (l[0] = (e) => h.value = R(e)),
|
|
130
|
+
onKeydown: V(ae, ["enter"])
|
|
131
|
+
}, null, 40, Ce),
|
|
132
|
+
h.value || r.value ? (a(), o("button", {
|
|
133
|
+
key: 0,
|
|
134
|
+
type: "button",
|
|
135
|
+
class: "ss-dash-btn ss-dash-reqid-clear",
|
|
136
|
+
onClick: D
|
|
137
|
+
}, " Clear ")) : _("", !0)
|
|
138
|
+
])
|
|
139
|
+
]),
|
|
140
|
+
_: 1
|
|
141
|
+
}, 8, ["model-value", "summary"]),
|
|
142
|
+
n("div", qe, [
|
|
143
|
+
n("select", {
|
|
144
|
+
class: "ss-dash-filter-select",
|
|
145
|
+
value: L.value,
|
|
146
|
+
onChange: l[1] || (l[1] = (e) => L.value = A(e))
|
|
147
|
+
}, [...l[4] || (l[4] = [
|
|
148
|
+
re('<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)
|
|
149
|
+
])], 40, $e),
|
|
150
|
+
n("select", {
|
|
151
|
+
class: "ss-dash-filter-select",
|
|
152
|
+
value: S.value,
|
|
153
|
+
onChange: l[2] || (l[2] = (e) => S.value = A(e))
|
|
154
|
+
}, [...l[5] || (l[5] = [
|
|
155
|
+
n("option", { value: "equals" }, "equals", -1),
|
|
156
|
+
n("option", { value: "contains" }, "contains", -1),
|
|
157
|
+
n("option", { value: "starts_with" }, "starts with", -1)
|
|
158
|
+
])], 40, Fe),
|
|
159
|
+
n("input", {
|
|
160
|
+
class: "ss-dash-filter-input",
|
|
161
|
+
placeholder: "Value...",
|
|
162
|
+
value: b.value,
|
|
163
|
+
onInput: l[3] || (l[3] = (e) => b.value = R(e)),
|
|
164
|
+
onKeydown: V(T, ["enter"])
|
|
165
|
+
}, null, 40, Le),
|
|
166
|
+
n("button", {
|
|
167
|
+
type: "button",
|
|
168
|
+
class: "ss-dash-btn",
|
|
169
|
+
onClick: T
|
|
170
|
+
}, "Add")
|
|
171
|
+
]),
|
|
172
|
+
ee.value ? (a(), o("div", Se, [
|
|
173
|
+
d.value !== "all" ? (a(), o("span", Ie, [
|
|
174
|
+
w(" level: " + i(d.value) + " ", 1),
|
|
175
|
+
n("button", {
|
|
176
|
+
type: "button",
|
|
177
|
+
class: "ss-dash-filter-chip-remove",
|
|
178
|
+
onClick: oe
|
|
179
|
+
}, " × ")
|
|
180
|
+
])) : _("", !0),
|
|
181
|
+
r.value ? (a(), o("span", xe, [
|
|
182
|
+
w(" requestId: " + i(r.value.slice(0, 8)) + "... ", 1),
|
|
183
|
+
n("button", {
|
|
184
|
+
type: "button",
|
|
185
|
+
class: "ss-dash-filter-chip-remove",
|
|
186
|
+
onClick: D
|
|
187
|
+
}, " × ")
|
|
188
|
+
])) : _("", !0),
|
|
189
|
+
(a(!0), o(q, null, x(f.value, (e, c) => (a(), o("span", {
|
|
190
|
+
key: c,
|
|
191
|
+
class: "ss-dash-filter-chip"
|
|
192
|
+
}, [
|
|
193
|
+
w(i(e.field) + " " + i(e.operator) + ' "' + i(e.value) + '" ', 1),
|
|
194
|
+
n("button", {
|
|
195
|
+
type: "button",
|
|
196
|
+
class: "ss-dash-filter-chip-remove",
|
|
197
|
+
onClick: (I) => ne(c)
|
|
198
|
+
}, " × ", 8, Ve)
|
|
199
|
+
]))), 128))
|
|
200
|
+
])) : _("", !0),
|
|
201
|
+
s(J) ? (a(), o("div", we, "Failed to load logs")) : s(H) && !s(y) ? (a(), o("div", Ee, "Loading logs...")) : K.value.length === 0 ? (a(), o("div", Ke, " No log entries" + i(r.value ? ` matching request ${r.value}` : d.value !== "all" ? ` for ${d.value}` : ""), 1)) : (a(), o("div", Ne, [
|
|
202
|
+
(a(!0), o(q, null, x(K.value, (e, c) => (a(), o(q, {
|
|
203
|
+
key: String(e.id || c)
|
|
204
|
+
}, [
|
|
205
|
+
n("div", {
|
|
206
|
+
class: $(["ss-dash-log-entry", { "ss-dash-log-entry-expandable": !!s(m)(e) }]),
|
|
207
|
+
onClick: (I) => te(c, !!s(m)(e))
|
|
208
|
+
}, [
|
|
209
|
+
n("span", {
|
|
210
|
+
class: $(`ss-dash-log-level ${s(ve)(s(W)(e), "ss-dash-log-level")}`)
|
|
211
|
+
}, i(s(W)(e).toUpperCase()), 3),
|
|
212
|
+
n("span", {
|
|
213
|
+
class: "ss-dash-log-time",
|
|
214
|
+
title: s(F)(e) ? s(pe)(s(F)(e)) : ""
|
|
215
|
+
}, i(s(F)(e) ? s(he)(s(F)(e)) : "-"), 9, Pe),
|
|
216
|
+
s(g)(e) ? (a(), o("span", {
|
|
217
|
+
key: 0,
|
|
218
|
+
class: "ss-dash-log-reqid",
|
|
219
|
+
title: s(g)(e),
|
|
220
|
+
role: "button",
|
|
221
|
+
tabindex: "0",
|
|
222
|
+
onClick: U((I) => N(s(g)(e)), ["stop"]),
|
|
223
|
+
onKeydown: V(U((I) => N(s(g)(e)), ["stop"]), ["enter"])
|
|
224
|
+
}, i(s(g)(e).slice(0, 8)), 41, Te)) : (a(), o("span", Re, "--")),
|
|
225
|
+
s(m)(e) ? (a(), o("span", {
|
|
226
|
+
key: 2,
|
|
227
|
+
class: $(["ss-dash-log-expand-icon", { "ss-dash-log-expand-icon-open": k.value === c }])
|
|
228
|
+
}, "▶", 2)) : (a(), o("span", Ae)),
|
|
229
|
+
n("span", Be, i(s(_e)(e)), 1)
|
|
230
|
+
], 10, De),
|
|
231
|
+
k.value === c && s(m)(e) ? (a(), o("div", Oe, [
|
|
232
|
+
O(fe, {
|
|
233
|
+
value: s(m)(e),
|
|
234
|
+
"class-prefix": "ss-dash",
|
|
235
|
+
"default-expanded": ""
|
|
236
|
+
}, null, 8, ["value"])
|
|
237
|
+
])) : _("", !0)
|
|
238
|
+
], 64))), 128))
|
|
239
|
+
])),
|
|
240
|
+
s(v).totalPages > 1 ? (a(), de(ye, {
|
|
241
|
+
key: 5,
|
|
242
|
+
page: s(v).page,
|
|
243
|
+
"last-page": s(v).totalPages,
|
|
244
|
+
total: s(v).total,
|
|
245
|
+
onPageChange: s(X)
|
|
246
|
+
}, null, 8, ["page", "last-page", "total", "onPageChange"])) : _("", !0)
|
|
247
|
+
]));
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
export {
|
|
251
|
+
Je as default
|
|
252
|
+
};
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { defineComponent as D, ref as b, computed as q, openBlock as o, createElementBlock as l, createElementVNode as a, Fragment as k, renderList as B, unref as s, normalizeClass as y, toDisplayString as d, createCommentVNode as x, withDirectives as $, vModelText as I, withKeys as F, withModifiers as L, createVNode as R } from "vue";
|
|
2
|
+
import { filterLogsByLevel as K, resolveLogRequestId as u, resolveLogMessage as T, LOG_LEVELS as P, getStructuredData as v, getLogLevelCssClass as U, resolveLogLevel as A, resolveLogTimestamp as h, formatTime as H, timeAgo as O, TAB_ICONS as V } from "adonisjs-server-stats/core";
|
|
3
|
+
import { _ as j } from "./JsonViewer.vue_vue_type_script_setup_true_lang-Bid05zpm.js";
|
|
4
|
+
const z = { class: "ss-dbg-log-filters" }, G = ["onClick"], J = {
|
|
5
|
+
class: "ss-dbg-summary",
|
|
6
|
+
style: { "margin-left": "auto" }
|
|
7
|
+
}, Q = { class: "ss-dbg-search-bar" }, W = { class: "ss-dbg-summary" }, X = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "ss-dbg-empty"
|
|
10
|
+
}, Y = ["onClick"], Z = ["title"], ee = ["title", "onClick", "onKeydown"], se = {
|
|
11
|
+
key: 1,
|
|
12
|
+
class: "ss-dbg-log-reqid-empty"
|
|
13
|
+
}, te = {
|
|
14
|
+
key: 3,
|
|
15
|
+
style: { width: "14px" }
|
|
16
|
+
}, ne = { class: "ss-dbg-log-msg" }, oe = ["href"], le = ["viewBox", "innerHTML"], ae = {
|
|
17
|
+
key: 0,
|
|
18
|
+
class: "ss-dbg-log-detail"
|
|
19
|
+
}, ue = /* @__PURE__ */ D({
|
|
20
|
+
__name: "LogsTab",
|
|
21
|
+
props: {
|
|
22
|
+
data: {},
|
|
23
|
+
dashboardPath: {}
|
|
24
|
+
},
|
|
25
|
+
emits: ["filterByRequestId"],
|
|
26
|
+
setup(f, { emit: E }) {
|
|
27
|
+
const C = f, M = E, _ = b("all"), g = b(""), i = b(""), p = b(null), m = q(() => {
|
|
28
|
+
const n = C.data;
|
|
29
|
+
let t = n ? (Array.isArray(n) ? n : n.logs || n.entries) || [] : [];
|
|
30
|
+
if (t = K(t, _.value), i.value.trim()) {
|
|
31
|
+
const e = i.value.trim().toLowerCase();
|
|
32
|
+
t = t.filter((r) => {
|
|
33
|
+
const c = u(r);
|
|
34
|
+
return c && c.toLowerCase().includes(e);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
if (g.value.trim()) {
|
|
38
|
+
const e = g.value.trim().toLowerCase();
|
|
39
|
+
t = t.filter((r) => T(r).toLowerCase().includes(e));
|
|
40
|
+
}
|
|
41
|
+
return t;
|
|
42
|
+
}), N = q(() => {
|
|
43
|
+
const n = C.data, t = n ? (Array.isArray(n) ? n : n.logs || n.entries) || [] : [];
|
|
44
|
+
return `${m.value.length} of ${t.length} entries`;
|
|
45
|
+
});
|
|
46
|
+
function S(n, t) {
|
|
47
|
+
t && (p.value = p.value === n ? null : n);
|
|
48
|
+
}
|
|
49
|
+
function w(n) {
|
|
50
|
+
i.value = n, M("filterByRequestId", n);
|
|
51
|
+
}
|
|
52
|
+
return (n, t) => (o(), l("div", null, [
|
|
53
|
+
a("div", z, [
|
|
54
|
+
(o(!0), l(k, null, B(s(P), (e) => (o(), l("button", {
|
|
55
|
+
key: e,
|
|
56
|
+
type: "button",
|
|
57
|
+
class: y(["ss-dbg-log-filter", { "ss-dbg-active": _.value === e }]),
|
|
58
|
+
onClick: (r) => _.value = e
|
|
59
|
+
}, d(e), 11, G))), 128)),
|
|
60
|
+
i.value ? (o(), l("button", {
|
|
61
|
+
key: 0,
|
|
62
|
+
type: "button",
|
|
63
|
+
class: "ss-dbg-log-filter ss-dbg-active",
|
|
64
|
+
onClick: t[0] || (t[0] = (e) => i.value = "")
|
|
65
|
+
}, " req: " + d(i.value.slice(0, 8)) + " x ", 1)) : x("", !0),
|
|
66
|
+
a("span", J, d(m.value.length) + " entries", 1)
|
|
67
|
+
]),
|
|
68
|
+
a("div", Q, [
|
|
69
|
+
$(a("input", {
|
|
70
|
+
"onUpdate:modelValue": t[1] || (t[1] = (e) => g.value = e),
|
|
71
|
+
class: "ss-dbg-search",
|
|
72
|
+
placeholder: "Filter log messages...",
|
|
73
|
+
type: "text"
|
|
74
|
+
}, null, 512), [
|
|
75
|
+
[I, g.value]
|
|
76
|
+
]),
|
|
77
|
+
$(a("input", {
|
|
78
|
+
"onUpdate:modelValue": t[2] || (t[2] = (e) => i.value = e),
|
|
79
|
+
class: "ss-dbg-search ss-dbg-reqid-input",
|
|
80
|
+
placeholder: "Filter by request ID...",
|
|
81
|
+
type: "text"
|
|
82
|
+
}, null, 512), [
|
|
83
|
+
[I, i.value]
|
|
84
|
+
]),
|
|
85
|
+
a("span", W, d(N.value), 1)
|
|
86
|
+
]),
|
|
87
|
+
m.value.length === 0 ? (o(), l("div", X, "No log entries")) : (o(!0), l(k, { key: 1 }, B(m.value, (e, r) => (o(), l(k, {
|
|
88
|
+
key: String(e.id || r)
|
|
89
|
+
}, [
|
|
90
|
+
a("div", {
|
|
91
|
+
class: y(["ss-dbg-log-entry", { "ss-dbg-log-entry-expandable": !!s(v)(e) }]),
|
|
92
|
+
onClick: (c) => S(r, !!s(v)(e))
|
|
93
|
+
}, [
|
|
94
|
+
a("span", {
|
|
95
|
+
class: y(["ss-dbg-log-level", s(U)(s(A)(e))])
|
|
96
|
+
}, d(s(A)(e).toUpperCase()), 3),
|
|
97
|
+
a("span", {
|
|
98
|
+
class: "ss-dbg-log-time",
|
|
99
|
+
title: s(h)(e) ? s(H)(s(h)(e)) : ""
|
|
100
|
+
}, d(s(h)(e) ? s(O)(s(h)(e)) : "-"), 9, Z),
|
|
101
|
+
s(u)(e) ? (o(), l("span", {
|
|
102
|
+
key: 0,
|
|
103
|
+
class: "ss-dbg-log-reqid",
|
|
104
|
+
role: "button",
|
|
105
|
+
tabindex: "0",
|
|
106
|
+
title: s(u)(e),
|
|
107
|
+
onClick: L((c) => w(s(u)(e)), ["stop"]),
|
|
108
|
+
onKeydown: F(L((c) => w(s(u)(e)), ["stop"]), ["enter"])
|
|
109
|
+
}, d(s(u)(e).slice(0, 8)), 41, ee)) : (o(), l("span", se, "-")),
|
|
110
|
+
s(v)(e) ? (o(), l("span", {
|
|
111
|
+
key: 2,
|
|
112
|
+
class: y(["ss-dbg-log-expand-icon", { "ss-dbg-log-expand-icon-open": p.value === r }])
|
|
113
|
+
}, "▶", 2)) : (o(), l("span", te)),
|
|
114
|
+
a("span", ne, d(s(T)(e)), 1),
|
|
115
|
+
f.dashboardPath && s(u)(e) ? (o(), l("a", {
|
|
116
|
+
key: 4,
|
|
117
|
+
href: `${f.dashboardPath}#logs?requestId=${s(u)(e)}`,
|
|
118
|
+
target: "_blank",
|
|
119
|
+
class: "ss-dbg-deeplink",
|
|
120
|
+
onClick: t[3] || (t[3] = L(() => {
|
|
121
|
+
}, ["stop"]))
|
|
122
|
+
}, [
|
|
123
|
+
(o(), l("svg", {
|
|
124
|
+
viewBox: s(V)["open-external"].viewBox,
|
|
125
|
+
width: "12",
|
|
126
|
+
height: "12",
|
|
127
|
+
fill: "none",
|
|
128
|
+
stroke: "currentColor",
|
|
129
|
+
"stroke-width": "2",
|
|
130
|
+
innerHTML: s(V)["open-external"].elements.join("")
|
|
131
|
+
}, null, 8, le))
|
|
132
|
+
], 8, oe)) : x("", !0)
|
|
133
|
+
], 10, Y),
|
|
134
|
+
p.value === r && s(v)(e) ? (o(), l("div", ae, [
|
|
135
|
+
R(j, {
|
|
136
|
+
value: s(v)(e),
|
|
137
|
+
"class-prefix": "ss-dbg",
|
|
138
|
+
"default-expanded": ""
|
|
139
|
+
}, null, 8, ["value"])
|
|
140
|
+
])) : x("", !0)
|
|
141
|
+
], 64))), 128))
|
|
142
|
+
]));
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
export {
|
|
146
|
+
ue as default
|
|
147
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as ws, openBlock as o, createElementBlock as n, Fragment as _, renderList as k, createElementVNode as s, normalizeClass as b, toDisplayString as r, inject as P, ref as D, watch as ms, computed as d, onUnmounted as Ws, unref as x, createVNode as F, createCommentVNode as v, normalizeStyle as ts, createTextVNode as gs } from "vue";
|
|
2
2
|
import { formatDuration as N, formatTime as Os, timeAgo as Hs, durationSeverity as Ks } from "adonisjs-server-stats/core";
|
|
3
|
-
import { u as xs, _ as U } from "./index-
|
|
3
|
+
import { u as xs, _ as U } from "./index-Dtgysd26.js";
|
|
4
4
|
const Gs = { class: "ss-dash-btn-group" }, Xs = ["onClick"], Ys = /* @__PURE__ */ ws({
|
|
5
5
|
__name: "TimeRangeSelector",
|
|
6
6
|
props: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as H, inject as A, ref as C, computed as g, openBlock as o, createElementBlock as i, createVNode as W, withCtx as it, createElementVNode as e, normalizeClass as f, unref as u, createTextVNode as b, toDisplayString as r, createCommentVNode as v, Fragment as k, renderList as T, withKeys as B, withModifiers as L, createBlock as rt, h as D } from "vue";
|
|
2
2
|
import { formatTime as ut, timeAgo as dt, SLOW_DURATION_MS as pt, durationSeverity as ct } from "adonisjs-server-stats/core";
|
|
3
|
-
import { u as vt } from "./index-
|
|
3
|
+
import { u as vt } from "./index-Dtgysd26.js";
|
|
4
4
|
import { u as ht } from "./useResizableTable-BoivAevK.js";
|
|
5
5
|
import { _ as mt } from "./FilterBar.vue_vue_type_script_setup_true_lang-ClJ37hhT.js";
|
|
6
6
|
import { _ as ft } from "./PaginationControls.vue_vue_type_script_setup_true_lang-CuN7g_8Z.js";
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { defineComponent as y, ref as k, openBlock as a, createElementBlock as n, createElementVNode as i, normalizeClass as t, createTextVNode as L, toDisplayString as c, Fragment as v, renderList as h, unref as e, createVNode as C, createCommentVNode as g } from "vue";
|
|
2
|
+
import { getStructuredData as r, getLogLevelCssClass as N, resolveLogLevel as P, resolveLogTimestamp as u, 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 }, w = { style: { overflow: "auto" } }, B = ["onClick"], D = ["title"], I = ["title"], S = {
|
|
5
|
+
key: 3,
|
|
6
|
+
style: { width: "14px" }
|
|
7
|
+
}, M = /* @__PURE__ */ y({
|
|
8
|
+
__name: "RelatedLogs",
|
|
9
|
+
props: {
|
|
10
|
+
logs: {},
|
|
11
|
+
classPrefix: { default: "ss-dash" }
|
|
12
|
+
},
|
|
13
|
+
setup(s) {
|
|
14
|
+
const o = k(null);
|
|
15
|
+
function $(x, d) {
|
|
16
|
+
d && (o.value = o.value === x ? null : x);
|
|
17
|
+
}
|
|
18
|
+
return (x, d) => s.logs.length > 0 ? (a(), n("div", T, [
|
|
19
|
+
i("div", {
|
|
20
|
+
class: t(`${s.classPrefix}-related-logs-title`)
|
|
21
|
+
}, [
|
|
22
|
+
d[0] || (d[0] = L(" Related Logs ", -1)),
|
|
23
|
+
i("span", {
|
|
24
|
+
class: t(`${s.classPrefix}-related-logs-count`)
|
|
25
|
+
}, "(" + c(s.logs.length) + ")", 3)
|
|
26
|
+
], 2),
|
|
27
|
+
i("div", w, [
|
|
28
|
+
(a(!0), n(v, null, h(s.logs, (l, f) => (a(), n(v, {
|
|
29
|
+
key: l.id || f
|
|
30
|
+
}, [
|
|
31
|
+
i("div", {
|
|
32
|
+
class: t([
|
|
33
|
+
`${s.classPrefix}-log-entry`,
|
|
34
|
+
e(r)(l) ? `${s.classPrefix}-log-entry-expandable` : ""
|
|
35
|
+
]),
|
|
36
|
+
onClick: (b) => $(f, !!e(r)(l))
|
|
37
|
+
}, [
|
|
38
|
+
i("span", {
|
|
39
|
+
class: t([
|
|
40
|
+
`${s.classPrefix}-log-level`,
|
|
41
|
+
e(N)(e(P)(l), `${s.classPrefix}-log-level`)
|
|
42
|
+
])
|
|
43
|
+
}, c(e(P)(l).toUpperCase()), 3),
|
|
44
|
+
i("span", {
|
|
45
|
+
class: t(`${s.classPrefix}-log-time`),
|
|
46
|
+
title: e(u)(l) ? e(V)(e(u)(l)) : ""
|
|
47
|
+
}, c(e(u)(l) ? e(q)(e(u)(l)) : "-"), 11, D),
|
|
48
|
+
e(m)(l) ? (a(), n("span", {
|
|
49
|
+
key: 0,
|
|
50
|
+
class: t(`${s.classPrefix}-log-reqid`),
|
|
51
|
+
title: e(m)(l)
|
|
52
|
+
}, c(e(m)(l).slice(0, 8)), 11, I)) : (a(), n("span", {
|
|
53
|
+
key: 1,
|
|
54
|
+
class: t(`${s.classPrefix}-log-reqid-empty`)
|
|
55
|
+
}, "--", 2)),
|
|
56
|
+
e(r)(l) ? (a(), n("span", {
|
|
57
|
+
key: 2,
|
|
58
|
+
class: t([
|
|
59
|
+
`${s.classPrefix}-log-expand-icon`,
|
|
60
|
+
o.value === f ? `${s.classPrefix}-log-expand-icon-open` : ""
|
|
61
|
+
])
|
|
62
|
+
}, "▶", 2)) : (a(), n("span", S)),
|
|
63
|
+
i("span", {
|
|
64
|
+
class: t(`${s.classPrefix}-log-msg`)
|
|
65
|
+
}, c(e(E)(l)), 3)
|
|
66
|
+
], 10, B),
|
|
67
|
+
o.value === f && e(r)(l) ? (a(), n("div", {
|
|
68
|
+
key: 0,
|
|
69
|
+
class: t(`${s.classPrefix}-log-detail`)
|
|
70
|
+
}, [
|
|
71
|
+
C(R, {
|
|
72
|
+
value: e(r)(l),
|
|
73
|
+
"class-prefix": s.classPrefix,
|
|
74
|
+
"default-expanded": !0
|
|
75
|
+
}, null, 8, ["value", "class-prefix"])
|
|
76
|
+
], 2)) : g("", !0)
|
|
77
|
+
], 64))), 128))
|
|
78
|
+
])
|
|
79
|
+
])) : g("", !0);
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
export {
|
|
83
|
+
M as _
|
|
84
|
+
};
|