adonisjs-server-stats 1.8.0 → 1.9.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/log-utils.d.ts +14 -0
- package/dist/react/{CacheSection-D5J5moz7.js → CacheSection-xH75hwXu.js} +1 -1
- package/dist/react/{CacheTab-F1MkWSZl.js → CacheTab-DYmsZJJ1.js} +1 -1
- package/dist/react/{ConfigSection-DerLBu4o.js → ConfigSection-D8BO1Ry9.js} +1 -1
- package/dist/react/{ConfigTab-Bsj7v9JW.js → ConfigTab-CcN-tfjv.js} +1 -1
- package/dist/react/{CustomPaneTab-gzdtDEvz.js → CustomPaneTab-D7_o3Ec6.js} +1 -1
- package/dist/react/{EmailsSection-ndH3cvJk.js → EmailsSection-BzlsTdPs.js} +1 -1
- package/dist/react/{EmailsTab-DVPHRx0L.js → EmailsTab-Uh2CQY3o.js} +1 -1
- package/dist/react/{EventsSection-ClIByDSk.js → EventsSection-CGQWiIdV.js} +1 -1
- package/dist/react/{EventsTab-CCzWEKrk.js → EventsTab-CC6DQzEm.js} +1 -1
- package/dist/react/{JobsSection-CVMyAs7O.js → JobsSection-D7AHQmZi.js} +1 -1
- package/dist/react/{JobsTab-CATUyb9V.js → JobsTab-B3Lfdqed.js} +1 -1
- package/dist/react/LogsSection-Cly1dpvS.js +227 -0
- package/dist/react/LogsTab-BbYK-iyh.js +103 -0
- package/dist/react/{OverviewSection-ae5AO2RG.js → OverviewSection-CkBGFEWq.js} +1 -1
- package/dist/react/{QueriesSection-DFFr9Tbb.js → QueriesSection-CfCpnNUD.js} +1 -1
- package/dist/react/{QueriesTab-GrHRAREt.js → QueriesTab-DbBmAqzO.js} +1 -1
- package/dist/react/{RequestsSection-DtwnJOnM.js → RequestsSection-Cb5a6MlT.js} +1 -1
- package/dist/react/{RoutesSection-F7nANhF0.js → RoutesSection-CRqF-cNM.js} +1 -1
- package/dist/react/{RoutesTab-rugjhCPH.js → RoutesTab-Bwreij3e.js} +1 -1
- package/dist/react/{TimelineSection-F5ThmTdy.js → TimelineSection-B2y06kRE.js} +1 -1
- package/dist/react/{TimelineTab-Dvpf-I5C.js → TimelineTab-6hthfdBB.js} +1 -1
- package/dist/react/{index-DDzo1bZk.js → index-CecA4IdQ.js} +394 -393
- package/dist/react/index.js +1 -1
- package/dist/react/react/components/shared/JsonViewer.d.ts +2 -1
- 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 +4 -4
- package/dist/src/edge/client-vue/debug-panel-deferred.js +3 -3
- package/dist/src/styles/components.css +81 -0
- package/dist/vue/{CacheSection-DDvJ7bs2.js → CacheSection-Cx-hj09X.js} +2 -2
- package/dist/vue/{ConfigSection-GTCrvsPr.js → ConfigSection-CMXyryf6.js} +1 -1
- package/dist/vue/{EmailsSection-Ct5vsLCc.js → EmailsSection-DgKl9xGT.js} +1 -1
- package/dist/vue/{EventsSection-CRVhtagq.js → EventsSection-BNMCAim1.js} +2 -2
- package/dist/vue/{EventsTab-DQ4Nd6AK.js → EventsTab-BBM7olXF.js} +1 -1
- package/dist/vue/{JobsSection-B_wH2Co7.js → JobsSection-CCMgMlxd.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-CvOnTxUu.js +252 -0
- package/dist/vue/LogsTab-Bg3o0Mm6.js +147 -0
- package/dist/vue/{OverviewSection-BqSwuMKH.js → OverviewSection-CHgaKtUR.js} +1 -1
- package/dist/vue/{QueriesSection-D4Fs0YH6.js → QueriesSection-BnHRD98z.js} +1 -1
- package/dist/vue/{RequestsSection-B0A5SKcM.js → RequestsSection-B-uSlM0f.js} +1 -1
- package/dist/vue/{RoutesSection-Ys5dTzvF.js → RoutesSection-BrceOcKQ.js} +1 -1
- package/dist/vue/{TimelineSection-D38iHB08.js → TimelineSection-CfvnA2Oo.js} +1 -1
- package/dist/vue/components/shared/JsonViewer.vue.d.ts +3 -0
- package/dist/vue/{index-Bj6pm5g3.js → index-oLxS08vN.js} +2 -2
- 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/vue/LogsSection-C4NRFOpA.js +0 -227
- package/dist/vue/LogsTab-DpEQ7euu.js +0 -122
package/dist/core/log-utils.d.ts
CHANGED
|
@@ -31,3 +31,17 @@ export declare function getLogLevelCssClass(level: string, prefix?: string): str
|
|
|
31
31
|
* The `'error'` filter also includes `'fatal'` entries (matching React behaviour).
|
|
32
32
|
*/
|
|
33
33
|
export declare function filterLogsByLevel(logs: LogEntry[], level: string): LogEntry[];
|
|
34
|
+
/**
|
|
35
|
+
* Standard Pino / framework keys that should NOT be surfaced as "structured data".
|
|
36
|
+
*/
|
|
37
|
+
export declare const STANDARD_LOG_KEYS: Set<string>;
|
|
38
|
+
/**
|
|
39
|
+
* Extract non-standard structured data from a log entry.
|
|
40
|
+
*
|
|
41
|
+
* Handles two data shapes:
|
|
42
|
+
* - **Debug panel** (raw Pino): extra fields live at the top level
|
|
43
|
+
* - **Dashboard** (SQLite): extra fields live inside the `data` JSON blob
|
|
44
|
+
*
|
|
45
|
+
* Returns `null` when there is no structured data to show.
|
|
46
|
+
*/
|
|
47
|
+
export declare function getStructuredData(entry: LogEntry): Record<string, unknown> | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as l, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { useState as i, useCallback as f } from "react";
|
|
3
3
|
import { formatCacheSize as x, formatTtl as D } from "adonisjs-server-stats/core";
|
|
4
|
-
import { a as S, J as V } from "./index-
|
|
4
|
+
import { a as S, J as V } from "./index-CecA4IdQ.js";
|
|
5
5
|
import { D as F } from "./DataTable-YyShr5B-.js";
|
|
6
6
|
import { F as L } from "./FilterBar-DQRXpWrb.js";
|
|
7
7
|
function H({ options: k = {} }) {
|
|
@@ -2,7 +2,7 @@ import { jsx as s, jsxs as a } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as b, useMemo as z, useCallback as K } from "react";
|
|
3
3
|
import { formatTtl as B, formatCacheSize as L } from "adonisjs-server-stats/core";
|
|
4
4
|
import { u as S } from "./useDashboardApiBase-Bi36pJ2L.js";
|
|
5
|
-
import { u as j, J as A } from "./index-
|
|
5
|
+
import { u as j, J as A } from "./index-CecA4IdQ.js";
|
|
6
6
|
import { u as $ } from "./useResizableTable-CNJmACdt.js";
|
|
7
7
|
function q({ options: d, dashboardPath: y }) {
|
|
8
8
|
const { dashApiBase: u, resolvedOptions: f } = S(y, d), { data: t, isLoading: v, error: g } = j("cache", f), [i, k] = b(""), [r, h] = b(null), [p, o] = b(null), n = z(() => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { a as i } from "./index-
|
|
2
|
+
import { a as i } from "./index-CecA4IdQ.js";
|
|
3
3
|
import { C as n } from "./ConfigContent-CnsEI4j3.js";
|
|
4
4
|
function m({ options: o = {} }) {
|
|
5
5
|
const { data: a, isLoading: s } = i("config", o);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as i, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { u as f } from "./useDashboardApiBase-Bi36pJ2L.js";
|
|
3
|
-
import { u as m } from "./index-
|
|
3
|
+
import { u as m } from "./index-CecA4IdQ.js";
|
|
4
4
|
import { C as d } from "./ConfigContent-CnsEI4j3.js";
|
|
5
5
|
function b({ options: r, dashboardPath: o }) {
|
|
6
6
|
const { resolvedOptions: a } = f(o, r), { data: e, isLoading: t, error: s } = m("config", a);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as o, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { useState as L, useMemo as h } from "react";
|
|
3
3
|
import { compactPreview as x, formatDuration as A, durationSeverity as f, timeAgo as u, formatTime as p } from "adonisjs-server-stats/core";
|
|
4
|
-
import { u as D } from "./index-
|
|
4
|
+
import { u as D } from "./index-CecA4IdQ.js";
|
|
5
5
|
import { u as M } from "./useResizableTable-CNJmACdt.js";
|
|
6
6
|
function E({ pane: r, options: g }) {
|
|
7
7
|
({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as r, jsx as a, Fragment as i } from "react/jsx-runtime";
|
|
2
2
|
import { useState as n, useEffect as N, useCallback as C } from "react";
|
|
3
3
|
import { timeAgo as P, formatTime as A } from "adonisjs-server-stats/core";
|
|
4
|
-
import { a as T } from "./index-
|
|
4
|
+
import { a as T } from "./index-CecA4IdQ.js";
|
|
5
5
|
import { D as j } from "./DataTable-YyShr5B-.js";
|
|
6
6
|
import { F as $ } from "./FilterBar-DQRXpWrb.js";
|
|
7
7
|
import { P as F } from "./Pagination-BkmzUDY8.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
2
|
import { useState as n, useMemo as f, useCallback as v } from "react";
|
|
3
3
|
import { timeAgo as k, formatTime as S } from "adonisjs-server-stats/core";
|
|
4
|
-
import { u as A } from "./index-
|
|
4
|
+
import { u as A } from "./index-CecA4IdQ.js";
|
|
5
5
|
import { u as P } from "./useResizableTable-CNJmACdt.js";
|
|
6
6
|
function M({ options: i }) {
|
|
7
7
|
const { data: o, isLoading: N, error: u } = A("emails", i), [c, y] = n(""), [g, b] = n(null), [p, h] = n(null), [x, m] = n(!1), r = f(() => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as o, jsx as e, Fragment as g } from "react/jsx-runtime";
|
|
2
2
|
import { useState as d, useEffect as f } from "react";
|
|
3
3
|
import { timeAgo as y, formatTime as u } from "adonisjs-server-stats/core";
|
|
4
|
-
import { a as b, J as N } from "./index-
|
|
4
|
+
import { a as b, J as N } from "./index-CecA4IdQ.js";
|
|
5
5
|
import { D as x } from "./DataTable-YyShr5B-.js";
|
|
6
6
|
import { F as P } from "./FilterBar-DQRXpWrb.js";
|
|
7
7
|
import { P as k } from "./Pagination-BkmzUDY8.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
2
|
import { useState as g, useMemo as u } from "react";
|
|
3
3
|
import { timeAgo as b, formatTime as p } from "adonisjs-server-stats/core";
|
|
4
|
-
import { u as v, J as f } from "./index-
|
|
4
|
+
import { u as v, J as f } from "./index-CecA4IdQ.js";
|
|
5
5
|
import { u as N } from "./useResizableTable-CNJmACdt.js";
|
|
6
6
|
function T({ options: c }) {
|
|
7
7
|
const { data: n, isLoading: o, error: i } = v("events", c), [r, m] = g(""), d = u(() => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as l, jsx as a, Fragment as C } from "react/jsx-runtime";
|
|
2
2
|
import { useState as c, useCallback as D } from "react";
|
|
3
3
|
import { extractJobs as F, extractJobStats as J, JOB_STATUS_FILTERS as T, getJobStatusBadgeColor as A, formatDuration as B, timeAgo as _, formatTime as L } from "adonisjs-server-stats/core";
|
|
4
|
-
import { a as R, B as $, J as M } from "./index-
|
|
4
|
+
import { a as R, B as $, J as M } from "./index-CecA4IdQ.js";
|
|
5
5
|
import { D as O } from "./DataTable-YyShr5B-.js";
|
|
6
6
|
import { F as U } from "./FilterBar-DQRXpWrb.js";
|
|
7
7
|
import { P as E } from "./Pagination-BkmzUDY8.js";
|
|
@@ -2,7 +2,7 @@ import { jsx as s, jsxs as t } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as u, useMemo as T, useCallback as S } from "react";
|
|
3
3
|
import { extractJobs as j, extractJobStats as D, JOB_STATUS_FILTERS as J, getJobStatusCssClass as C, formatDuration as R, timeAgo as $, formatTime as B } from "adonisjs-server-stats/core";
|
|
4
4
|
import { u as k } from "./useDashboardApiBase-Bi36pJ2L.js";
|
|
5
|
-
import { u as F, J as L } from "./index-
|
|
5
|
+
import { u as F, J as L } from "./index-CecA4IdQ.js";
|
|
6
6
|
import { u as P } from "./useResizableTable-CNJmACdt.js";
|
|
7
7
|
function U({ options: i, dashboardPath: p }) {
|
|
8
8
|
const { dashApiBase: c, resolvedOptions: N } = k(p, i), { data: d, isLoading: y, error: m } = F("jobs", N), [r, f] = u("all"), [h, b] = u(null), n = T(() => {
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { jsxs as a, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import M, { useState as l, useCallback as c } from "react";
|
|
3
|
+
import { LOG_LEVELS as U, resolveLogLevel as z, resolveLogMessage as H, resolveLogRequestId as Q, resolveLogTimestamp as W, getStructuredData as X, getLogLevelCssClass as Y, timeAgo as Z, formatTime as ee } from "adonisjs-server-stats/core";
|
|
4
|
+
import { a as se, J as te } from "./index-CecA4IdQ.js";
|
|
5
|
+
import { F as ae } from "./FilterBar-DQRXpWrb.js";
|
|
6
|
+
import { P as le } from "./Pagination-BkmzUDY8.js";
|
|
7
|
+
function he({ options: D = {} }) {
|
|
8
|
+
const [R, i] = l(1), [L, V] = l(""), [r, S] = l("all"), [n, v] = l(""), [p, f] = l(""), [N, k] = l([]), [b, A] = l("level"), [q, K] = l("equals"), [y, _] = l(""), [C, O] = l(null), o = {};
|
|
9
|
+
r !== "all" && (o.level = r), n && (o.request_id = n), N.forEach((e, t) => {
|
|
10
|
+
o[`filter_field_${t}`] = e.field, o[`filter_op_${t}`] = e.operator, o[`filter_value_${t}`] = e.value;
|
|
11
|
+
});
|
|
12
|
+
const { data: x, meta: d, isLoading: j } = se("logs", {
|
|
13
|
+
...D,
|
|
14
|
+
page: R,
|
|
15
|
+
search: L,
|
|
16
|
+
filters: o
|
|
17
|
+
}), $ = x || [], P = c((e) => {
|
|
18
|
+
v(e), f(e), i(1);
|
|
19
|
+
}, []), J = c(() => {
|
|
20
|
+
const e = p.trim();
|
|
21
|
+
v(e), i(1);
|
|
22
|
+
}, [p]), E = c(() => {
|
|
23
|
+
v(""), f(""), i(1);
|
|
24
|
+
}, []), T = c(() => {
|
|
25
|
+
S("all"), i(1);
|
|
26
|
+
}, []), w = c(() => {
|
|
27
|
+
const e = y.trim();
|
|
28
|
+
e && (k((t) => [
|
|
29
|
+
...t,
|
|
30
|
+
{ field: b, operator: q, value: e }
|
|
31
|
+
]), _(""));
|
|
32
|
+
}, [b, q, y]), B = c((e) => {
|
|
33
|
+
k((t) => t.filter((I, F) => F !== e));
|
|
34
|
+
}, []), G = r !== "all" || n !== "" || N.length > 0;
|
|
35
|
+
return /* @__PURE__ */ a("div", { children: [
|
|
36
|
+
/* @__PURE__ */ s(
|
|
37
|
+
ae,
|
|
38
|
+
{
|
|
39
|
+
search: L,
|
|
40
|
+
onSearchChange: V,
|
|
41
|
+
placeholder: "Search logs...",
|
|
42
|
+
summary: `${d?.total ?? 0} logs`,
|
|
43
|
+
children: /* @__PURE__ */ a("div", { className: "ss-dash-log-filters", children: [
|
|
44
|
+
U.map((e) => /* @__PURE__ */ s(
|
|
45
|
+
"button",
|
|
46
|
+
{
|
|
47
|
+
type: "button",
|
|
48
|
+
className: `ss-dash-log-filter ${r === e ? "ss-dash-active" : ""}`,
|
|
49
|
+
onClick: () => {
|
|
50
|
+
S(e), i(1);
|
|
51
|
+
},
|
|
52
|
+
children: e
|
|
53
|
+
},
|
|
54
|
+
e
|
|
55
|
+
)),
|
|
56
|
+
/* @__PURE__ */ s(
|
|
57
|
+
"input",
|
|
58
|
+
{
|
|
59
|
+
type: "text",
|
|
60
|
+
className: "ss-dash-filter-input ss-dash-reqid-input",
|
|
61
|
+
placeholder: "Filter by request ID...",
|
|
62
|
+
value: p,
|
|
63
|
+
onChange: (e) => f(e.target.value),
|
|
64
|
+
onKeyDown: (e) => e.key === "Enter" && J()
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
(p || n) && /* @__PURE__ */ s(
|
|
68
|
+
"button",
|
|
69
|
+
{
|
|
70
|
+
type: "button",
|
|
71
|
+
className: "ss-dash-btn ss-dash-reqid-clear",
|
|
72
|
+
onClick: () => {
|
|
73
|
+
E();
|
|
74
|
+
},
|
|
75
|
+
children: "Clear"
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
] })
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
/* @__PURE__ */ a("div", { className: "ss-dash-structured-search", children: [
|
|
82
|
+
/* @__PURE__ */ a(
|
|
83
|
+
"select",
|
|
84
|
+
{
|
|
85
|
+
className: "ss-dash-filter-select",
|
|
86
|
+
value: b,
|
|
87
|
+
onChange: (e) => A(e.target.value),
|
|
88
|
+
children: [
|
|
89
|
+
/* @__PURE__ */ s("option", { value: "level", children: "level" }),
|
|
90
|
+
/* @__PURE__ */ s("option", { value: "message", children: "message" }),
|
|
91
|
+
/* @__PURE__ */ s("option", { value: "request_id", children: "request_id" }),
|
|
92
|
+
/* @__PURE__ */ s("option", { value: "userId", children: "userId" }),
|
|
93
|
+
/* @__PURE__ */ s("option", { value: "email", children: "email" }),
|
|
94
|
+
/* @__PURE__ */ s("option", { value: "path", children: "path" })
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
),
|
|
98
|
+
/* @__PURE__ */ a(
|
|
99
|
+
"select",
|
|
100
|
+
{
|
|
101
|
+
className: "ss-dash-filter-select",
|
|
102
|
+
value: q,
|
|
103
|
+
onChange: (e) => K(e.target.value),
|
|
104
|
+
children: [
|
|
105
|
+
/* @__PURE__ */ s("option", { value: "equals", children: "equals" }),
|
|
106
|
+
/* @__PURE__ */ s("option", { value: "contains", children: "contains" }),
|
|
107
|
+
/* @__PURE__ */ s("option", { value: "starts_with", children: "starts with" })
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
),
|
|
111
|
+
/* @__PURE__ */ s(
|
|
112
|
+
"input",
|
|
113
|
+
{
|
|
114
|
+
className: "ss-dash-filter-input",
|
|
115
|
+
placeholder: "Value...",
|
|
116
|
+
value: y,
|
|
117
|
+
onChange: (e) => _(e.target.value),
|
|
118
|
+
onKeyDown: (e) => e.key === "Enter" && w()
|
|
119
|
+
}
|
|
120
|
+
),
|
|
121
|
+
/* @__PURE__ */ s("button", { type: "button", className: "ss-dash-btn", onClick: w, children: "Add" })
|
|
122
|
+
] }),
|
|
123
|
+
G && /* @__PURE__ */ a("div", { className: "ss-dash-filter-chips", children: [
|
|
124
|
+
r !== "all" && /* @__PURE__ */ a("span", { className: "ss-dash-filter-chip", children: [
|
|
125
|
+
"level: ",
|
|
126
|
+
r,
|
|
127
|
+
/* @__PURE__ */ s(
|
|
128
|
+
"button",
|
|
129
|
+
{
|
|
130
|
+
type: "button",
|
|
131
|
+
className: "ss-dash-filter-chip-remove",
|
|
132
|
+
onClick: T,
|
|
133
|
+
children: "×"
|
|
134
|
+
}
|
|
135
|
+
)
|
|
136
|
+
] }),
|
|
137
|
+
n && /* @__PURE__ */ a("span", { className: "ss-dash-filter-chip", children: [
|
|
138
|
+
"requestId: ",
|
|
139
|
+
n.slice(0, 8),
|
|
140
|
+
"...",
|
|
141
|
+
/* @__PURE__ */ s(
|
|
142
|
+
"button",
|
|
143
|
+
{
|
|
144
|
+
type: "button",
|
|
145
|
+
className: "ss-dash-filter-chip-remove",
|
|
146
|
+
onClick: E,
|
|
147
|
+
children: "×"
|
|
148
|
+
}
|
|
149
|
+
)
|
|
150
|
+
] }),
|
|
151
|
+
N.map((e, t) => /* @__PURE__ */ a("span", { className: "ss-dash-filter-chip", children: [
|
|
152
|
+
e.field,
|
|
153
|
+
" ",
|
|
154
|
+
e.operator,
|
|
155
|
+
' "',
|
|
156
|
+
e.value,
|
|
157
|
+
'"',
|
|
158
|
+
/* @__PURE__ */ s(
|
|
159
|
+
"button",
|
|
160
|
+
{
|
|
161
|
+
type: "button",
|
|
162
|
+
className: "ss-dash-filter-chip-remove",
|
|
163
|
+
onClick: () => B(t),
|
|
164
|
+
children: "×"
|
|
165
|
+
}
|
|
166
|
+
)
|
|
167
|
+
] }, t))
|
|
168
|
+
] }),
|
|
169
|
+
j && !x ? /* @__PURE__ */ s("div", { className: "ss-dash-empty", children: "Loading logs..." }) : $.length === 0 ? /* @__PURE__ */ a("div", { className: "ss-dash-empty", children: [
|
|
170
|
+
"No log entries",
|
|
171
|
+
n ? ` matching request ${n}` : r !== "all" ? ` for ${r}` : ""
|
|
172
|
+
] }) : /* @__PURE__ */ s("div", { className: "ss-dash-log-entries", children: $.map((e, t) => {
|
|
173
|
+
const I = z(e), F = H(e), h = Q(e), m = W(e), u = X(e);
|
|
174
|
+
return /* @__PURE__ */ a(M.Fragment, { children: [
|
|
175
|
+
/* @__PURE__ */ a(
|
|
176
|
+
"div",
|
|
177
|
+
{
|
|
178
|
+
className: `ss-dash-log-entry${u ? " ss-dash-log-entry-expandable" : ""}`,
|
|
179
|
+
onClick: () => u && O(C === t ? null : t),
|
|
180
|
+
children: [
|
|
181
|
+
/* @__PURE__ */ s(
|
|
182
|
+
"span",
|
|
183
|
+
{
|
|
184
|
+
className: `ss-dash-log-level ${Y(I, "ss-dash-log-level")}`,
|
|
185
|
+
children: I.toUpperCase()
|
|
186
|
+
}
|
|
187
|
+
),
|
|
188
|
+
/* @__PURE__ */ s("span", { className: "ss-dash-log-time", title: m ? ee(m) : "", children: m ? Z(m) : "-" }),
|
|
189
|
+
h ? /* @__PURE__ */ s(
|
|
190
|
+
"span",
|
|
191
|
+
{
|
|
192
|
+
className: "ss-dash-log-reqid",
|
|
193
|
+
title: h,
|
|
194
|
+
onClick: (g) => {
|
|
195
|
+
g.stopPropagation(), P(h);
|
|
196
|
+
},
|
|
197
|
+
role: "button",
|
|
198
|
+
tabIndex: 0,
|
|
199
|
+
onKeyDown: (g) => {
|
|
200
|
+
g.key === "Enter" && (g.stopPropagation(), P(h));
|
|
201
|
+
},
|
|
202
|
+
children: h.slice(0, 8)
|
|
203
|
+
}
|
|
204
|
+
) : /* @__PURE__ */ s("span", { className: "ss-dash-log-reqid-empty", children: "--" }),
|
|
205
|
+
u ? /* @__PURE__ */ s("span", { className: `ss-dash-log-expand-icon${C === t ? " ss-dash-log-expand-icon-open" : ""}`, children: "▶" }) : /* @__PURE__ */ s("span", { style: { width: 14 } }),
|
|
206
|
+
/* @__PURE__ */ s("span", { className: "ss-dash-log-msg", children: F })
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
),
|
|
210
|
+
C === t && u && /* @__PURE__ */ s("div", { className: "ss-dash-log-detail", children: /* @__PURE__ */ s(te, { data: u, classPrefix: "ss-dash", defaultExpanded: !0 }) })
|
|
211
|
+
] }, e.id || t);
|
|
212
|
+
}) }),
|
|
213
|
+
d && /* @__PURE__ */ s(
|
|
214
|
+
le,
|
|
215
|
+
{
|
|
216
|
+
page: d.page,
|
|
217
|
+
lastPage: d.lastPage,
|
|
218
|
+
total: d.total,
|
|
219
|
+
onPageChange: i
|
|
220
|
+
}
|
|
221
|
+
)
|
|
222
|
+
] });
|
|
223
|
+
}
|
|
224
|
+
export {
|
|
225
|
+
he as LogsSection,
|
|
226
|
+
he as default
|
|
227
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { jsx as s, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import I, { useState as m, useMemo as E, useCallback as F } from "react";
|
|
3
|
+
import { filterLogsByLevel as D, resolveLogRequestId as y, resolveLogMessage as N, LOG_LEVELS as R, resolveLogLevel as S, resolveLogTimestamp as $, getStructuredData as A, getLogLevelCssClass as P, timeAgo as T, formatTime as j } from "adonisjs-server-stats/core";
|
|
4
|
+
import { u as J, J as M } from "./index-CecA4IdQ.js";
|
|
5
|
+
function O({ options: x }) {
|
|
6
|
+
const { data: l, isLoading: C, error: h } = J("logs", x), [p, w] = m("all"), [d, k] = m(""), [n, f] = m(""), [u, q] = m(null), b = E(() => {
|
|
7
|
+
let e = Array.isArray(l) ? l : l?.logs || l?.entries || [];
|
|
8
|
+
if (e = D(e, p), n) {
|
|
9
|
+
const t = n.toLowerCase();
|
|
10
|
+
e = e.filter((r) => y(r).toLowerCase().includes(t));
|
|
11
|
+
}
|
|
12
|
+
if (d) {
|
|
13
|
+
const t = d.toLowerCase();
|
|
14
|
+
e = e.filter((r) => N(r).toLowerCase().includes(t));
|
|
15
|
+
}
|
|
16
|
+
return e;
|
|
17
|
+
}, [l, p, d, n]), v = F((e) => {
|
|
18
|
+
f((t) => t === e ? "" : e);
|
|
19
|
+
}, []);
|
|
20
|
+
return C && !l ? /* @__PURE__ */ s("div", { className: "ss-dbg-empty", children: "Loading logs..." }) : h ? /* @__PURE__ */ a("div", { className: "ss-dbg-empty", children: [
|
|
21
|
+
"Error: ",
|
|
22
|
+
h.message
|
|
23
|
+
] }) : /* @__PURE__ */ a("div", { children: [
|
|
24
|
+
/* @__PURE__ */ a("div", { className: "ss-dbg-log-filters", children: [
|
|
25
|
+
R.map((e) => /* @__PURE__ */ s(
|
|
26
|
+
"button",
|
|
27
|
+
{
|
|
28
|
+
type: "button",
|
|
29
|
+
className: `ss-dbg-log-filter ${p === e ? "ss-dbg-active" : ""}`,
|
|
30
|
+
onClick: () => w(e),
|
|
31
|
+
children: e
|
|
32
|
+
},
|
|
33
|
+
e
|
|
34
|
+
)),
|
|
35
|
+
n && /* @__PURE__ */ a(
|
|
36
|
+
"button",
|
|
37
|
+
{
|
|
38
|
+
type: "button",
|
|
39
|
+
className: "ss-dbg-log-filter ss-dbg-active",
|
|
40
|
+
onClick: () => f(""),
|
|
41
|
+
children: [
|
|
42
|
+
"req: ",
|
|
43
|
+
n.slice(0, 8),
|
|
44
|
+
" x"
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
),
|
|
48
|
+
/* @__PURE__ */ a("span", { className: "ss-dbg-summary", style: { marginLeft: "auto" }, children: [
|
|
49
|
+
b.length,
|
|
50
|
+
" entries"
|
|
51
|
+
] })
|
|
52
|
+
] }),
|
|
53
|
+
/* @__PURE__ */ s("div", { className: "ss-dbg-search-bar", children: /* @__PURE__ */ s(
|
|
54
|
+
"input",
|
|
55
|
+
{
|
|
56
|
+
type: "text",
|
|
57
|
+
className: "ss-dbg-search",
|
|
58
|
+
placeholder: "Filter log messages...",
|
|
59
|
+
value: d,
|
|
60
|
+
onChange: (e) => k(e.target.value)
|
|
61
|
+
}
|
|
62
|
+
) }),
|
|
63
|
+
/* @__PURE__ */ s("div", { style: { overflow: "auto", flex: 1 }, children: b.length === 0 ? /* @__PURE__ */ s("div", { className: "ss-dbg-empty", children: "No log entries" }) : b.slice(-200).reverse().map((e, t) => {
|
|
64
|
+
const r = S(e), L = N(e), c = $(e), o = y(e), i = A(e);
|
|
65
|
+
return /* @__PURE__ */ a(I.Fragment, { children: [
|
|
66
|
+
/* @__PURE__ */ a(
|
|
67
|
+
"div",
|
|
68
|
+
{
|
|
69
|
+
className: `ss-dbg-log-entry${i ? " ss-dbg-log-entry-expandable" : ""}`,
|
|
70
|
+
onClick: () => i && q(u === t ? null : t),
|
|
71
|
+
children: [
|
|
72
|
+
/* @__PURE__ */ s("span", { className: `ss-dbg-log-level ${P(r)}`, children: r.toUpperCase() }),
|
|
73
|
+
/* @__PURE__ */ s("span", { className: "ss-dbg-log-time", title: c ? j(c) : "", children: c ? T(c) : "-" }),
|
|
74
|
+
o ? /* @__PURE__ */ s(
|
|
75
|
+
"span",
|
|
76
|
+
{
|
|
77
|
+
className: "ss-dbg-log-reqid",
|
|
78
|
+
onClick: (g) => {
|
|
79
|
+
g.stopPropagation(), v(o);
|
|
80
|
+
},
|
|
81
|
+
role: "button",
|
|
82
|
+
tabIndex: 0,
|
|
83
|
+
title: o,
|
|
84
|
+
onKeyDown: (g) => {
|
|
85
|
+
g.key === "Enter" && (g.stopPropagation(), v(o));
|
|
86
|
+
},
|
|
87
|
+
children: o.slice(0, 8)
|
|
88
|
+
}
|
|
89
|
+
) : /* @__PURE__ */ s("span", { className: "ss-dbg-log-reqid-empty", children: "-" }),
|
|
90
|
+
i ? /* @__PURE__ */ s("span", { className: `ss-dbg-log-expand-icon${u === t ? " ss-dbg-log-expand-icon-open" : ""}`, children: "▶" }) : /* @__PURE__ */ s("span", { style: { width: 14 } }),
|
|
91
|
+
/* @__PURE__ */ s("span", { className: "ss-dbg-log-msg", children: L })
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
),
|
|
95
|
+
u === t && i && /* @__PURE__ */ s("div", { className: "ss-dbg-log-detail", children: /* @__PURE__ */ s(M, { data: i, classPrefix: "ss-dbg", defaultExpanded: !0 }) })
|
|
96
|
+
] }, t);
|
|
97
|
+
}) })
|
|
98
|
+
] });
|
|
99
|
+
}
|
|
100
|
+
export {
|
|
101
|
+
O as LogsTab,
|
|
102
|
+
O as default
|
|
103
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as s, jsxs as e } from "react/jsx-runtime";
|
|
2
2
|
import { useState as E, useRef as X, useEffect as P, useCallback as z } from "react";
|
|
3
3
|
import { formatDuration as $, timeAgo as ss, formatTime as es, durationSeverity as as } from "adonisjs-server-stats/core";
|
|
4
|
-
import { a as B, S } from "./index-
|
|
4
|
+
import { a as B, S } from "./index-CecA4IdQ.js";
|
|
5
5
|
const ls = [
|
|
6
6
|
{ value: "5m", label: "5m" },
|
|
7
7
|
{ value: "15m", label: "15m" },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t, jsxs as r, Fragment as b } from "react/jsx-runtime";
|
|
2
2
|
import { useState as y, useCallback as $, useEffect as V, useMemo as P } from "react";
|
|
3
3
|
import { durationSeverity as _, timeAgo as B, formatTime as G, SLOW_DURATION_MS as X } from "adonisjs-server-stats/core";
|
|
4
|
-
import { a as Y } from "./index-
|
|
4
|
+
import { a as Y } from "./index-CecA4IdQ.js";
|
|
5
5
|
import { D as I } from "./DataTable-YyShr5B-.js";
|
|
6
6
|
import { F as Z } from "./FilterBar-DQRXpWrb.js";
|
|
7
7
|
import { P as ee } from "./Pagination-BkmzUDY8.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
2
|
import { useState as m, useMemo as i, useCallback as v } from "react";
|
|
3
3
|
import { filterQueries as C, countDuplicateQueries as D, computeQuerySummary as S, formatDuration as p, durationSeverity as g, timeAgo as Q, formatTime as T } from "adonisjs-server-stats/core";
|
|
4
|
-
import { u as $ } from "./index-
|
|
4
|
+
import { u as $ } from "./index-CecA4IdQ.js";
|
|
5
5
|
import { u as E } from "./useResizableTable-CNJmACdt.js";
|
|
6
6
|
function R({ options: b }) {
|
|
7
7
|
const { data: n, isLoading: y, error: u } = $("queries", b), [o, N] = m(""), [w, x] = m(null), d = i(() => n?.queries || [], [n]), a = i(() => C(d, o), [d, o]), l = i(() => D(d), [d]), r = i(
|
|
@@ -2,7 +2,7 @@ import { jsxs as r, jsx as t, Fragment as L } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as n, useEffect as P, useCallback as v } from "react";
|
|
3
3
|
import { normalizeTraceFields as R, durationSeverity as y, timeAgo as B, formatTime as M } from "adonisjs-server-stats/core";
|
|
4
4
|
import { u as $ } from "./useApiClient-BVtNCmnL.js";
|
|
5
|
-
import { a as E, M as C, b as x } from "./index-
|
|
5
|
+
import { a as E, M as C, b as x } from "./index-CecA4IdQ.js";
|
|
6
6
|
import { D as j } from "./DataTable-YyShr5B-.js";
|
|
7
7
|
import { F as z } from "./FilterBar-DQRXpWrb.js";
|
|
8
8
|
import { P as U } from "./Pagination-BkmzUDY8.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as m, jsx as r, Fragment as p } from "react/jsx-runtime";
|
|
2
2
|
import { useState as y } from "react";
|
|
3
|
-
import { a as u, M as f } from "./index-
|
|
3
|
+
import { a as u, M as f } from "./index-CecA4IdQ.js";
|
|
4
4
|
import { D as w } from "./DataTable-YyShr5B-.js";
|
|
5
5
|
import { F as b } from "./FilterBar-DQRXpWrb.js";
|
|
6
6
|
function A({ options: n = {} }) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
2
|
import { useState as u, useMemo as p } from "react";
|
|
3
|
-
import { u as b } from "./index-
|
|
3
|
+
import { u as b } from "./index-CecA4IdQ.js";
|
|
4
4
|
import { u as w } from "./useResizableTable-CNJmACdt.js";
|
|
5
5
|
function C({ options: o, currentPath: n }) {
|
|
6
6
|
const { data: c, isLoading: h, error: i } = b("routes", o), [r, m] = u(""), l = p(() => {
|
|
@@ -2,7 +2,7 @@ import { jsx as a, jsxs as t, Fragment as T } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as n, useEffect as B, useCallback as L } from "react";
|
|
3
3
|
import { normalizeTraceFields as P, durationSeverity as f, timeAgo as A, formatTime as E } from "adonisjs-server-stats/core";
|
|
4
4
|
import { u as M } from "./useApiClient-BVtNCmnL.js";
|
|
5
|
-
import { a as $, M as g, b } from "./index-
|
|
5
|
+
import { a as $, M as g, b } from "./index-CecA4IdQ.js";
|
|
6
6
|
import { D as j } from "./DataTable-YyShr5B-.js";
|
|
7
7
|
import { F as z } from "./FilterBar-DQRXpWrb.js";
|
|
8
8
|
import { P as I } from "./Pagination-BkmzUDY8.js";
|
|
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as r, useMemo as B, useEffect as I, useCallback as C } from "react";
|
|
3
3
|
import { formatDuration as u, durationSeverity as D, timeAgo as O, formatTime as j } from "adonisjs-server-stats/core";
|
|
4
4
|
import { u as F } from "./useApiClient-BVtNCmnL.js";
|
|
5
|
-
import { u as U } from "./index-
|
|
5
|
+
import { u as U } from "./index-CecA4IdQ.js";
|
|
6
6
|
import { u as _ } from "./useResizableTable-CNJmACdt.js";
|
|
7
7
|
const L = {
|
|
8
8
|
request: "#1e3a5f",
|