adonisjs-server-stats 1.12.3 → 1.14.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/README.md +11 -6
- package/dist/configure.js +6 -1
- package/dist/core/collectors/collector.d.ts +83 -0
- package/dist/core/core/types.d.ts +186 -0
- package/dist/core/debug/types.d.ts +467 -0
- package/dist/core/index.js +184 -169
- package/dist/core/types.d.ts +855 -167
- package/dist/react/{CacheSection-CX2duJuc.js → CacheSection-DkLtukWz.js} +1 -1
- package/dist/react/{CacheTab-CgT4t0oZ.js → CacheTab-DWeXnEBI.js} +51 -46
- package/dist/react/ConfigContent-Bwvfl_G7.js +350 -0
- package/dist/react/{ConfigSection-Dt0FyeaW.js → ConfigSection-DaVbFPDg.js} +2 -2
- package/dist/react/{ConfigTab-KtiTtsrj.js → ConfigTab-D4640WJZ.js} +2 -2
- package/dist/react/{CustomPaneTab-15QoEplP.js → CustomPaneTab-DglmAVMC.js} +1 -1
- package/dist/react/{EmailsSection-YcJYR5eA.js → EmailsSection-vYx6ExTb.js} +1 -1
- package/dist/react/{EmailsTab-CUjubln_.js → EmailsTab-DKDrRmRH.js} +54 -49
- package/dist/react/{EventsSection-GGPoYSNv.js → EventsSection-CapH5xut.js} +1 -1
- package/dist/react/{EventsTab-Wdwr0_ny.js → EventsTab-BNVEySAm.js} +1 -1
- package/dist/react/{InternalsContent-BNOnSoi9.js → InternalsContent-C9lIA92C.js} +1 -1
- package/dist/react/{InternalsSection-BwrTfpjA.js → InternalsSection-lOv_UcSV.js} +1 -1
- package/dist/react/{InternalsTab--RD-L1dX.js → InternalsTab-BygoSorC.js} +1 -1
- package/dist/react/{JobsSection-BqqIh_DR.js → JobsSection-ZIQsJWid.js} +1 -1
- package/dist/react/{JobsTab-CBrU-ryL.js → JobsTab-DXQzXrDt.js} +1 -1
- package/dist/react/{LogEntryRow-BOrRkhRU.js → LogEntryRow-BWkHE51-.js} +1 -1
- package/dist/react/{LogsSection-Cm_lphM6.js → LogsSection-ConXdBkL.js} +2 -2
- package/dist/react/LogsTab-CJM47LPn.js +82 -0
- package/dist/react/{OverviewSection-XF7bakyM.js → OverviewSection-DOMu2qvl.js} +131 -131
- package/dist/react/{QueriesSection-DsQBKrNK.js → QueriesSection-DFsaOSJI.js} +1 -1
- package/dist/react/{QueriesTab-CxCC1GVq.js → QueriesTab-CY9CG_7L.js} +1 -1
- package/dist/react/RequestsSection-CC-eVHsl.js +326 -0
- package/dist/react/{RoutesSection-D0y5JQP4.js → RoutesSection-p1DMq41y.js} +1 -1
- package/dist/react/{RoutesTab-Y_alJVMV.js → RoutesTab-Cnqy8UcK.js} +1 -1
- package/dist/react/{SplitPaneWrapper-CZl1ouIT.js → SplitPaneWrapper-XgkA0QxE.js} +1 -1
- package/dist/react/{TimelineTab-HyqZpfbp.js → TimelineTab-1YOERxe5.js} +3 -3
- package/dist/react/index-DOSlCpZ9.js +1159 -0
- package/dist/react/index.js +1 -1
- package/dist/react/useApiClient-CtEG7rHs.js +11 -0
- package/dist/src/collectors/adonisjs_queue_collector.d.ts +21 -0
- package/dist/src/collectors/adonisjs_queue_collector.js +61 -0
- package/dist/src/collectors/auto_detect.js +8 -2
- package/dist/src/collectors/index.d.ts +2 -0
- package/dist/src/collectors/index.js +1 -0
- package/dist/src/collectors/queue_collector.js +22 -6
- package/dist/src/config/deprecation_migration.js +11 -0
- package/dist/src/dashboard/cache_handlers.js +22 -2
- package/dist/src/dashboard/flush_manager.d.ts +2 -0
- package/dist/src/dashboard/flush_manager.js +17 -0
- package/dist/src/dashboard/inspector_manager.d.ts +4 -4
- package/dist/src/dashboard/inspector_manager.js +20 -10
- package/dist/src/dashboard/integrations/adonisjs_queue_inspector.d.ts +42 -0
- package/dist/src/dashboard/integrations/adonisjs_queue_inspector.js +135 -0
- package/dist/src/dashboard/integrations/adonisjs_queue_store.d.ts +166 -0
- package/dist/src/dashboard/integrations/adonisjs_queue_store.js +629 -0
- package/dist/src/dashboard/integrations/config_inspector.d.ts +0 -1
- package/dist/src/dashboard/integrations/config_inspector.js +4 -2
- package/dist/src/dashboard/integrations/index.d.ts +4 -1
- package/dist/src/dashboard/integrations/index.js +2 -0
- package/dist/src/dashboard/integrations/queue_inspector.d.ts +5 -61
- package/dist/src/dashboard/integrations/queue_inspector.js +5 -1
- package/dist/src/dashboard/integrations/queue_inspector_contract.d.ts +73 -0
- package/dist/src/dashboard/integrations/queue_inspector_contract.js +15 -0
- package/dist/src/dashboard/paginate_helper.d.ts +5 -0
- package/dist/src/dashboard/paginate_helper.js +16 -4
- package/dist/src/dashboard/query_explain_handler.d.ts +6 -1
- package/dist/src/dashboard/query_explain_handler.js +12 -2
- package/dist/src/dashboard/write_queue.d.ts +13 -0
- package/dist/src/dashboard/write_queue.js +34 -2
- package/dist/src/debug/debug_store.js +8 -1
- package/dist/src/debug/event_collector.js +4 -0
- package/dist/src/debug/query_collector.js +2 -0
- package/dist/src/debug/ring_buffer.js +8 -1
- package/dist/src/debug/trace_collector.js +34 -10
- package/dist/src/debug/types.d.ts +2 -0
- package/dist/src/define_config.js +1 -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/stats-bar.js +1 -1
- package/dist/src/edge/client-vue/dashboard.js +5 -5
- package/dist/src/edge/client-vue/debug-panel-deferred.js +2 -2
- package/dist/src/engine/request_metrics.js +8 -10
- package/dist/src/log_stream/log_stream_service.d.ts +1 -0
- package/dist/src/log_stream/log_stream_service.js +7 -5
- package/dist/src/prometheus/prometheus_collector.d.ts +9 -0
- package/dist/src/prometheus/prometheus_collector.js +11 -0
- package/dist/src/provider/dashboard_init.js +15 -0
- package/dist/src/provider/dashboard_setup.js +9 -2
- package/dist/src/provider/email_bridge.d.ts +14 -3
- package/dist/src/provider/email_bridge.js +25 -3
- package/dist/src/provider/email_helpers.d.ts +9 -1
- package/dist/src/provider/email_helpers.js +32 -4
- package/dist/src/provider/pino_hook.d.ts +8 -0
- package/dist/src/provider/pino_hook.js +19 -1
- package/dist/src/provider/provider_helpers_extra.d.ts +2 -0
- package/dist/src/provider/provider_helpers_extra.js +17 -2
- package/dist/src/provider/server_stats_provider.js +19 -1
- package/dist/src/provider/shutdown_helpers.js +2 -0
- package/dist/src/provider/toolbar_setup.js +32 -17
- package/dist/src/routes/dashboard_routes.js +96 -62
- package/dist/src/routes/debug_routes.js +45 -35
- package/dist/src/routes/no_session_middleware.d.ts +6 -3
- package/dist/src/routes/no_session_middleware.js +7 -3
- package/dist/src/routes/register_routes.d.ts +8 -0
- package/dist/src/routes/register_routes.js +19 -0
- package/dist/src/types.d.ts +31 -0
- package/dist/src/utils/app_import.js +12 -4
- package/dist/vue/CacheSection-CxEBVVkF.js +156 -0
- package/dist/vue/ConfigSection-BiRAiaHj.js +415 -0
- package/dist/vue/EmailsSection-Dl44qyqY.js +208 -0
- package/dist/vue/{EmailsTab-CwIF1fik.js → EmailsTab-Diya54CP.js} +6 -5
- package/dist/vue/{EventsSection-BpgkWIwM.js → EventsSection-CWjeitjU.js} +1 -1
- package/dist/vue/{InternalsTab-521fxYYj.js → InternalsTab-Z3c82glB.js} +15 -15
- package/dist/vue/{JobsSection-DrghFEKL.js → JobsSection-DOBb4LjZ.js} +1 -1
- package/dist/vue/LogsSection-CXx-HOWJ.js +260 -0
- package/dist/vue/{OverviewSection-BAgZTPjY.js → OverviewSection-CyfNQ8uV.js} +318 -302
- package/dist/vue/{QueriesSection-CUpwhp7u.js → QueriesSection-CXBsFp-y.js} +1 -1
- package/dist/vue/{RequestsSection-D8P2xpF2.js → RequestsSection-YTIaZGZd.js} +151 -145
- package/dist/vue/{RoutesSection-0qB81hTT.js → RoutesSection-CDKMey49.js} +1 -1
- package/dist/vue/composables/useApiClient.d.ts +8 -1
- package/dist/vue/index-14x39RI_.js +1239 -0
- package/dist/vue/index.js +1 -1
- package/dist/vue/style.css +1 -1
- package/package.json +16 -3
- package/dist/react/ConfigContent-CnsEI4j3.js +0 -397
- package/dist/react/LogsTab-jKwv9G7Q.js +0 -79
- package/dist/react/RequestsSection-D8cMbZU0.js +0 -321
- package/dist/react/index-CsprmgzI.js +0 -1121
- package/dist/react/useApiClient-BVtNCmnL.js +0 -9
- package/dist/vue/CacheSection-DRqV3YX2.js +0 -149
- package/dist/vue/ConfigSection-C6pQCHAL.js +0 -576
- package/dist/vue/EmailsSection-BTNw3ZU2.js +0 -206
- package/dist/vue/LogsSection-BDxx9Bfi.js +0 -258
- package/dist/vue/index-30jLw-_w.js +0 -1232
- /package/dist/core/{api-client.d.ts → core/api-client.d.ts} +0 -0
- /package/dist/core/{config-utils.d.ts → core/config-utils.d.ts} +0 -0
- /package/dist/core/{constants.d.ts → core/constants.d.ts} +0 -0
- /package/dist/core/{dashboard-api.d.ts → core/dashboard-api.d.ts} +0 -0
- /package/dist/core/{dashboard-data-controller.d.ts → core/dashboard-data-controller.d.ts} +0 -0
- /package/dist/core/{dashboard-data-helpers.d.ts → core/dashboard-data-helpers.d.ts} +0 -0
- /package/dist/core/{debug-data-controller.d.ts → core/debug-data-controller.d.ts} +0 -0
- /package/dist/core/{define-config-helpers.d.ts → core/define-config-helpers.d.ts} +0 -0
- /package/dist/core/{explain-utils.d.ts → core/explain-utils.d.ts} +0 -0
- /package/dist/core/{feature-detect-helpers.d.ts → core/feature-detect-helpers.d.ts} +0 -0
- /package/dist/core/{feature-detect.d.ts → core/feature-detect.d.ts} +0 -0
- /package/dist/core/{field-resolvers.d.ts → core/field-resolvers.d.ts} +0 -0
- /package/dist/core/{formatters-helpers.d.ts → core/formatters-helpers.d.ts} +0 -0
- /package/dist/core/{formatters.d.ts → core/formatters.d.ts} +0 -0
- /package/dist/core/{history-buffer.d.ts → core/history-buffer.d.ts} +0 -0
- /package/dist/core/{icons.d.ts → core/icons.d.ts} +0 -0
- /package/dist/core/{index.d.ts → core/index.d.ts} +0 -0
- /package/dist/core/{internals-utils.d.ts → core/internals-utils.d.ts} +0 -0
- /package/dist/core/{job-utils.d.ts → core/job-utils.d.ts} +0 -0
- /package/dist/core/{log-utils-helpers.d.ts → core/log-utils-helpers.d.ts} +0 -0
- /package/dist/core/{log-utils.d.ts → core/log-utils.d.ts} +0 -0
- /package/dist/core/{metrics.d.ts → core/metrics.d.ts} +0 -0
- /package/dist/core/{pagination.d.ts → core/pagination.d.ts} +0 -0
- /package/dist/core/{queries-columns.d.ts → core/queries-columns.d.ts} +0 -0
- /package/dist/core/{queries-controller.d.ts → core/queries-controller.d.ts} +0 -0
- /package/dist/core/{query-utils.d.ts → core/query-utils.d.ts} +0 -0
- /package/dist/core/{resizable-columns.d.ts → core/resizable-columns.d.ts} +0 -0
- /package/dist/core/{routes.d.ts → core/routes.d.ts} +0 -0
- /package/dist/core/{server-stats-controller.d.ts → core/server-stats-controller.d.ts} +0 -0
- /package/dist/core/{sparkline.d.ts → core/sparkline.d.ts} +0 -0
- /package/dist/core/{split-pane.d.ts → core/split-pane.d.ts} +0 -0
- /package/dist/core/{theme.d.ts → core/theme.d.ts} +0 -0
- /package/dist/core/{trace-utils.d.ts → core/trace-utils.d.ts} +0 -0
- /package/dist/core/{transmit-adapter.d.ts → core/transmit-adapter.d.ts} +0 -0
- /package/dist/core/{transmit-helpers.d.ts → core/transmit-helpers.d.ts} +0 -0
- /package/dist/core/{types-dashboard.d.ts → core/types-dashboard.d.ts} +0 -0
- /package/dist/core/{types-diagnostics.d.ts → core/types-diagnostics.d.ts} +0 -0
|
@@ -1,71 +1,76 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { useState as c, useMemo as
|
|
3
|
-
import { resolveTimestamp as
|
|
4
|
-
import { T as
|
|
5
|
-
import { u as
|
|
6
|
-
import { u as
|
|
7
|
-
import { F as
|
|
8
|
-
import { E as
|
|
9
|
-
function
|
|
10
|
-
const { data:
|
|
11
|
-
const s =
|
|
12
|
-
if (!
|
|
13
|
-
const
|
|
1
|
+
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { useState as c, useRef as A, useMemo as v, useCallback as y, useEffect as S } from "react";
|
|
3
|
+
import { resolveTimestamp as j } from "adonisjs-server-stats/core";
|
|
4
|
+
import { T as q } from "./TimeAgoCell-o3KigGfM.js";
|
|
5
|
+
import { u as $ } from "./index-DOSlCpZ9.js";
|
|
6
|
+
import { u as F } from "./useResizableTable-CNJmACdt.js";
|
|
7
|
+
import { F as R } from "./FilterBar-CQ7bD669.js";
|
|
8
|
+
import { E as M } from "./EmailPreviewOverlay-BmXOAvqG.js";
|
|
9
|
+
function K({ options: r }) {
|
|
10
|
+
const { data: o, isLoading: N, error: h } = $("emails", r), [n, C] = c(""), [g, b] = c(null), [x, m] = c(null), [T, u] = c(!1), d = A(null), a = v(() => {
|
|
11
|
+
const s = o?.emails || [];
|
|
12
|
+
if (!n) return s;
|
|
13
|
+
const t = n.toLowerCase();
|
|
14
14
|
return s.filter(
|
|
15
|
-
(
|
|
15
|
+
(l) => (l.subject || "").toLowerCase().includes(t) || (l.to || "").toLowerCase().includes(t) || (l.from || "").toLowerCase().includes(t) || (l.mailer || "").toLowerCase().includes(t)
|
|
16
16
|
);
|
|
17
|
-
}, [
|
|
17
|
+
}, [o, n]), f = v(() => a.find((s) => s.id === g), [a, g]), L = y(
|
|
18
18
|
async (s) => {
|
|
19
|
-
if (
|
|
20
|
-
|
|
19
|
+
if (b(s.id), m(s.html || null), !s.html && s.id) {
|
|
20
|
+
d.current?.abort();
|
|
21
|
+
const t = new AbortController();
|
|
22
|
+
d.current = t, u(!0);
|
|
21
23
|
try {
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
headers:
|
|
26
|
-
credentials:
|
|
24
|
+
const l = r?.debugEndpoint || "/admin/api/debug", p = {};
|
|
25
|
+
r?.authToken && (p.Authorization = `Bearer ${r.authToken}`);
|
|
26
|
+
const w = await fetch(`${l}/emails/${s.id}/preview`, {
|
|
27
|
+
headers: p,
|
|
28
|
+
credentials: r?.authToken ? "omit" : "same-origin",
|
|
29
|
+
signal: t.signal
|
|
27
30
|
});
|
|
28
|
-
|
|
31
|
+
w.ok && m(await w.text());
|
|
29
32
|
} catch {
|
|
30
33
|
} finally {
|
|
31
|
-
|
|
34
|
+
t.signal.aborted || u(!1);
|
|
32
35
|
}
|
|
33
36
|
}
|
|
34
37
|
},
|
|
35
|
-
[
|
|
36
|
-
),
|
|
37
|
-
|
|
38
|
-
}, [])
|
|
38
|
+
[r]
|
|
39
|
+
), E = y(() => {
|
|
40
|
+
d.current?.abort(), b(null), m(null), u(!1);
|
|
41
|
+
}, []);
|
|
42
|
+
S(() => () => d.current?.abort(), []);
|
|
43
|
+
const P = {
|
|
39
44
|
sent: "ss-dbg-email-status-sent",
|
|
40
45
|
sending: "ss-dbg-email-status-sending",
|
|
41
46
|
queueing: "ss-dbg-email-status-queued",
|
|
42
47
|
queued: "ss-dbg-email-status-queued",
|
|
43
48
|
failed: "ss-dbg-email-status-failed"
|
|
44
|
-
},
|
|
45
|
-
return
|
|
49
|
+
}, k = F([a]);
|
|
50
|
+
return N && !o ? /* @__PURE__ */ e("div", { className: "ss-dbg-empty", children: "Loading emails..." }) : h ? /* @__PURE__ */ i("div", { className: "ss-dbg-empty", children: [
|
|
46
51
|
"Error: ",
|
|
47
52
|
h.message
|
|
48
|
-
] }) :
|
|
49
|
-
|
|
53
|
+
] }) : f ? /* @__PURE__ */ e(
|
|
54
|
+
M,
|
|
50
55
|
{
|
|
51
|
-
email:
|
|
52
|
-
previewHtml:
|
|
53
|
-
isLoading:
|
|
54
|
-
onClose:
|
|
56
|
+
email: f,
|
|
57
|
+
previewHtml: x,
|
|
58
|
+
isLoading: T,
|
|
59
|
+
onClose: E,
|
|
55
60
|
className: "ss-dbg-email-preview"
|
|
56
61
|
}
|
|
57
|
-
) : /* @__PURE__ */
|
|
62
|
+
) : /* @__PURE__ */ i("div", { children: [
|
|
58
63
|
/* @__PURE__ */ e(
|
|
59
|
-
|
|
64
|
+
R,
|
|
60
65
|
{
|
|
61
|
-
search:
|
|
62
|
-
onSearchChange:
|
|
66
|
+
search: n,
|
|
67
|
+
onSearchChange: C,
|
|
63
68
|
placeholder: "Filter emails...",
|
|
64
69
|
summary: `${a.length} emails`
|
|
65
70
|
}
|
|
66
71
|
),
|
|
67
|
-
a.length === 0 ? /* @__PURE__ */ e("div", { className: "ss-dbg-empty", children: "No emails captured" }) : /* @__PURE__ */
|
|
68
|
-
/* @__PURE__ */
|
|
72
|
+
a.length === 0 ? /* @__PURE__ */ e("div", { className: "ss-dbg-empty", children: "No emails captured" }) : /* @__PURE__ */ i("table", { ref: k, className: "ss-dbg-table", children: [
|
|
73
|
+
/* @__PURE__ */ i("colgroup", { children: [
|
|
69
74
|
/* @__PURE__ */ e("col", { style: { width: "50px" } }),
|
|
70
75
|
/* @__PURE__ */ e("col", { style: { width: "140px" } }),
|
|
71
76
|
/* @__PURE__ */ e("col", { style: { width: "140px" } }),
|
|
@@ -75,7 +80,7 @@ function R({ options: l }) {
|
|
|
75
80
|
/* @__PURE__ */ e("col", { style: { width: "40px" } }),
|
|
76
81
|
/* @__PURE__ */ e("col", { style: { width: "80px" } })
|
|
77
82
|
] }),
|
|
78
|
-
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ i("tr", { children: [
|
|
79
84
|
/* @__PURE__ */ e("th", { children: "#" }),
|
|
80
85
|
/* @__PURE__ */ e("th", { children: "From" }),
|
|
81
86
|
/* @__PURE__ */ e("th", { children: "To" }),
|
|
@@ -85,18 +90,18 @@ function R({ options: l }) {
|
|
|
85
90
|
/* @__PURE__ */ e("th", { title: "Attachments", children: "📎" }),
|
|
86
91
|
/* @__PURE__ */ e("th", { children: "Time" })
|
|
87
92
|
] }) }),
|
|
88
|
-
/* @__PURE__ */ e("tbody", { children: a.map((s) => /* @__PURE__ */
|
|
93
|
+
/* @__PURE__ */ e("tbody", { children: a.map((s) => /* @__PURE__ */ i("tr", { className: "ss-dbg-email-row", onClick: () => L(s), children: [
|
|
89
94
|
/* @__PURE__ */ e("td", { className: "ss-dbg-c-dim", style: { whiteSpace: "nowrap" }, children: s.id }),
|
|
90
95
|
/* @__PURE__ */ e("td", { className: "ss-dbg-c-secondary", title: s.from, children: s.from }),
|
|
91
96
|
/* @__PURE__ */ e("td", { className: "ss-dbg-c-secondary", title: s.to, children: s.to }),
|
|
92
97
|
/* @__PURE__ */ e("td", { className: "ss-dbg-c-sql", children: s.subject }),
|
|
93
|
-
/* @__PURE__ */ e("td", { children: /* @__PURE__ */ e("span", { className: `ss-dbg-email-status ${
|
|
98
|
+
/* @__PURE__ */ e("td", { children: /* @__PURE__ */ e("span", { className: `ss-dbg-email-status ${P[s.status] || ""}`, children: s.status }) }),
|
|
94
99
|
/* @__PURE__ */ e("td", { className: "ss-dbg-c-muted", children: s.mailer }),
|
|
95
100
|
/* @__PURE__ */ e("td", { className: "ss-dbg-c-dim", style: { textAlign: "center" }, children: s.attachmentCount > 0 ? s.attachmentCount : "-" }),
|
|
96
101
|
/* @__PURE__ */ e("td", { children: /* @__PURE__ */ e(
|
|
97
|
-
|
|
102
|
+
q,
|
|
98
103
|
{
|
|
99
|
-
ts:
|
|
104
|
+
ts: j(s),
|
|
100
105
|
className: "ss-dbg-event-time"
|
|
101
106
|
}
|
|
102
107
|
) })
|
|
@@ -105,6 +110,6 @@ function R({ options: l }) {
|
|
|
105
110
|
] });
|
|
106
111
|
}
|
|
107
112
|
export {
|
|
108
|
-
|
|
109
|
-
|
|
113
|
+
K as EmailsTab,
|
|
114
|
+
K as default
|
|
110
115
|
};
|
|
@@ -2,7 +2,7 @@ import { jsxs as i, jsx as e, Fragment as g } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as m, useEffect as f } from "react";
|
|
3
3
|
import { resolveEventName as y, resolveTimestamp as u } from "adonisjs-server-stats/core";
|
|
4
4
|
import { T as w } from "./TimeAgoCell-o3KigGfM.js";
|
|
5
|
-
import { a as b, J as N } from "./index-
|
|
5
|
+
import { a as b, J as N } from "./index-DOSlCpZ9.js";
|
|
6
6
|
import { D as x } from "./DataTable-YyShr5B-.js";
|
|
7
7
|
import { F as P } from "./FilterBar-CQ7bD669.js";
|
|
8
8
|
import { P as k } from "./Pagination-BkmzUDY8.js";
|
|
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as p, useMemo as u } from "react";
|
|
3
3
|
import { resolveTimestamp as g } from "adonisjs-server-stats/core";
|
|
4
4
|
import { T as b } from "./TimeAgoCell-o3KigGfM.js";
|
|
5
|
-
import { u as f, J as v } from "./index-
|
|
5
|
+
import { u as f, J as v } from "./index-DOSlCpZ9.js";
|
|
6
6
|
import { u as w } from "./useResizableTable-CNJmACdt.js";
|
|
7
7
|
import { F as y } from "./FilterBar-CQ7bD669.js";
|
|
8
8
|
function E({ options: c }) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState as f, useRef as T, useCallback as x, useEffect as M } from "react";
|
|
2
2
|
import { UnauthorizedError as E, formatConfigVal as I, isSecretKey as C, formatUptime as R, timeAgo as N, getTimerLabel as j, formatDuration as w, getIntegrationLabel as z, TAB_ICONS as y, classifyStatus as D } from "adonisjs-server-stats/core";
|
|
3
|
-
import { u as B } from "./useApiClient-
|
|
3
|
+
import { u as B } from "./useApiClient-CtEG7rHs.js";
|
|
4
4
|
import { jsx as e, jsxs as n, Fragment as $ } from "react/jsx-runtime";
|
|
5
5
|
function H(t = {}) {
|
|
6
6
|
const {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as a, jsxs as n } from "react/jsx-runtime";
|
|
2
2
|
import { SECTION_REFRESH_MS as o } from "adonisjs-server-stats/core";
|
|
3
|
-
import { u as d, I as l } from "./InternalsContent-
|
|
3
|
+
import { u as d, I as l } from "./InternalsContent-C9lIA92C.js";
|
|
4
4
|
function u({
|
|
5
5
|
options: e = {},
|
|
6
6
|
debugEndpoint: t = "/admin/api/debug"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
|
-
import { u as i, I as d } from "./InternalsContent-
|
|
2
|
+
import { u as i, I as d } from "./InternalsContent-C9lIA92C.js";
|
|
3
3
|
function b({ options: s }) {
|
|
4
4
|
const { data: a, isLoading: t, error: r } = i({
|
|
5
5
|
baseUrl: s?.baseUrl,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as y, jsx as t, Fragment as T } from "react/jsx-runtime";
|
|
2
2
|
import { useState as l, useCallback as C } from "react";
|
|
3
3
|
import { extractJobs as D, extractJobStats as F, JOB_STATUS_FILTERS as j, getJobStatusBadgeColor as B, formatDuration as A, resolveJobTimestamp as L } from "adonisjs-server-stats/core";
|
|
4
|
-
import { a as R, B as _, J as $ } from "./index-
|
|
4
|
+
import { a as R, B as _, J as $ } from "./index-DOSlCpZ9.js";
|
|
5
5
|
import { J as M } from "./JobStatsBar-C7RslAFE.js";
|
|
6
6
|
import { T as O } from "./TimeAgoCell-o3KigGfM.js";
|
|
7
7
|
import { D as U } from "./DataTable-YyShr5B-.js";
|
|
@@ -3,7 +3,7 @@ import { useState as m, useMemo as C, useCallback as A } from "react";
|
|
|
3
3
|
import { extractJobs as B, extractJobStats as $, JOB_STATUS_FILTERS as D, getJobStatusCssClass as F, formatDuration as L, resolveJobTimestamp as R } from "adonisjs-server-stats/core";
|
|
4
4
|
import { T as P } from "./TimeAgoCell-o3KigGfM.js";
|
|
5
5
|
import { u as k } from "./useDashboardApiBase-Bi36pJ2L.js";
|
|
6
|
-
import { u as E, J as O } from "./index-
|
|
6
|
+
import { u as E, J as O } from "./index-DOSlCpZ9.js";
|
|
7
7
|
import { u as q } from "./useResizableTable-CNJmACdt.js";
|
|
8
8
|
import { F as z } from "./FilterBar-CQ7bD669.js";
|
|
9
9
|
import { J as M } from "./JobStatsBar-C7RslAFE.js";
|
|
@@ -2,7 +2,7 @@ import { jsxs as i, jsx as s } from "react/jsx-runtime";
|
|
|
2
2
|
import g from "react";
|
|
3
3
|
import { T as v } from "./TimeAgoCell-o3KigGfM.js";
|
|
4
4
|
import { resolveLogLevel as u, resolveLogMessage as f, resolveLogTimestamp as h, resolveLogRequestId as L, getStructuredData as x, getLogLevelCssClass as N } from "adonisjs-server-stats/core";
|
|
5
|
-
import { J as y } from "./index-
|
|
5
|
+
import { J as y } from "./index-DOSlCpZ9.js";
|
|
6
6
|
function $({ log: o, index: c, expanded: l, onToggleExpand: m, onReqIdClick: e }) {
|
|
7
7
|
const n = u(o), d = f(o), p = h(o), a = L(o), t = x(o);
|
|
8
8
|
return /* @__PURE__ */ i(g.Fragment, { children: [
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as l, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { useState as a, useCallback as c } from "react";
|
|
3
3
|
import { LOG_LEVELS as B } from "adonisjs-server-stats/core";
|
|
4
|
-
import { a as G } from "./index-
|
|
4
|
+
import { a as G } from "./index-DOSlCpZ9.js";
|
|
5
5
|
import { F as T } from "./FilterBar-CQ7bD669.js";
|
|
6
|
-
import { L as z } from "./LogEntryRow-
|
|
6
|
+
import { L as z } from "./LogEntryRow-BWkHE51-.js";
|
|
7
7
|
import { P as H } from "./Pagination-BkmzUDY8.js";
|
|
8
8
|
function Z({ options: L = {} }) {
|
|
9
9
|
const [E, i] = a(1), [b, x] = a(""), [r, q] = a("all"), [n, h] = a(""), [u, p] = a(""), [m, y] = a([]), [v, R] = a("level"), [g, $] = a("equals"), [f, C] = a(""), [F, P] = a(null), o = {};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { jsx as o, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { useState as n, useMemo as x, useCallback as C } from "react";
|
|
3
|
+
import { filterLogsByLevel as N, resolveLogRequestId as F, resolveLogMessage as k, LOG_LEVELS as w } from "adonisjs-server-stats/core";
|
|
4
|
+
import { u as E } from "./index-DOSlCpZ9.js";
|
|
5
|
+
import { F as q } from "./FilterBar-CQ7bD669.js";
|
|
6
|
+
import { L as R } from "./LogEntryRow-BWkHE51-.js";
|
|
7
|
+
function K({ options: f }) {
|
|
8
|
+
const { data: r, isLoading: p, error: g } = E("logs", f), [d, L] = n("all"), [a, h] = n(""), [l, m] = n(""), [b, y] = n(null), c = x(() => {
|
|
9
|
+
let e = Array.isArray(r) ? r : r?.logs || r?.entries || [];
|
|
10
|
+
if (e = N(e, d), l) {
|
|
11
|
+
const s = l.toLowerCase();
|
|
12
|
+
e = e.filter((t) => F(t).toLowerCase().includes(s));
|
|
13
|
+
}
|
|
14
|
+
if (a) {
|
|
15
|
+
const s = a.toLowerCase();
|
|
16
|
+
e = e.filter((t) => k(t).toLowerCase().includes(s));
|
|
17
|
+
}
|
|
18
|
+
return e;
|
|
19
|
+
}, [r, d, a, l]), v = C((e) => {
|
|
20
|
+
m((s) => s === e ? "" : e);
|
|
21
|
+
}, []);
|
|
22
|
+
return p && !r ? /* @__PURE__ */ o("div", { className: "ss-dbg-empty", children: "Loading logs..." }) : g ? /* @__PURE__ */ i("div", { className: "ss-dbg-empty", children: [
|
|
23
|
+
"Error: ",
|
|
24
|
+
g.message
|
|
25
|
+
] }) : /* @__PURE__ */ i("div", { children: [
|
|
26
|
+
/* @__PURE__ */ i("div", { className: "ss-dbg-log-filters", children: [
|
|
27
|
+
w.map((e) => /* @__PURE__ */ o(
|
|
28
|
+
"button",
|
|
29
|
+
{
|
|
30
|
+
type: "button",
|
|
31
|
+
className: `ss-dbg-log-filter ${d === e ? "ss-dbg-active" : ""}`,
|
|
32
|
+
onClick: () => L(e),
|
|
33
|
+
children: e
|
|
34
|
+
},
|
|
35
|
+
e
|
|
36
|
+
)),
|
|
37
|
+
l && /* @__PURE__ */ i(
|
|
38
|
+
"button",
|
|
39
|
+
{
|
|
40
|
+
type: "button",
|
|
41
|
+
className: "ss-dbg-log-filter ss-dbg-active",
|
|
42
|
+
onClick: () => m(""),
|
|
43
|
+
children: [
|
|
44
|
+
"req: ",
|
|
45
|
+
l.slice(0, 8),
|
|
46
|
+
" x"
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
),
|
|
50
|
+
/* @__PURE__ */ i("span", { className: "ss-dbg-summary", style: { marginLeft: "auto" }, children: [
|
|
51
|
+
c.length,
|
|
52
|
+
" entries"
|
|
53
|
+
] })
|
|
54
|
+
] }),
|
|
55
|
+
/* @__PURE__ */ o(
|
|
56
|
+
q,
|
|
57
|
+
{
|
|
58
|
+
search: a,
|
|
59
|
+
onSearchChange: h,
|
|
60
|
+
placeholder: "Filter log messages..."
|
|
61
|
+
}
|
|
62
|
+
),
|
|
63
|
+
/* @__PURE__ */ o("div", { style: { overflow: "auto", flex: 1 }, children: c.length === 0 ? /* @__PURE__ */ o("div", { className: "ss-dbg-empty", children: "No log entries" }) : c.slice(0, 200).map((e, s) => {
|
|
64
|
+
const t = String(e.id ?? `idx-${s}`);
|
|
65
|
+
return /* @__PURE__ */ o(
|
|
66
|
+
R,
|
|
67
|
+
{
|
|
68
|
+
log: e,
|
|
69
|
+
index: s,
|
|
70
|
+
expanded: b === t,
|
|
71
|
+
onToggleExpand: () => y((u) => u === t ? null : t),
|
|
72
|
+
onReqIdClick: v
|
|
73
|
+
},
|
|
74
|
+
t
|
|
75
|
+
);
|
|
76
|
+
}) })
|
|
77
|
+
] });
|
|
78
|
+
}
|
|
79
|
+
export {
|
|
80
|
+
K as LogsTab,
|
|
81
|
+
K as default
|
|
82
|
+
};
|