adonisjs-server-stats 1.16.1 → 1.18.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 +25 -8
- package/dist/core/core/dashboard-api.d.ts +6 -4
- package/dist/core/core/define-config-helpers.d.ts +1 -0
- package/dist/core/core/types-diagnostics.d.ts +2 -0
- package/dist/core/debug/types.d.ts +2 -0
- package/dist/core/index.js +9 -6
- package/dist/core/types.d.ts +55 -4
- package/dist/react/{CacheSection-DkLtukWz.js → CacheSection-B-lSIN8Q.js} +48 -44
- package/dist/react/{CacheTab-DWeXnEBI.js → CacheTab-BN0QgPXz.js} +1 -1
- package/dist/react/{ConfigSection-DaVbFPDg.js → ConfigSection-u_TSfb9f.js} +1 -1
- package/dist/react/{ConfigTab-D4640WJZ.js → ConfigTab-au26s-ON.js} +1 -1
- package/dist/react/{CustomPaneTab-DglmAVMC.js → CustomPaneTab-qvMnh8ss.js} +1 -1
- package/dist/react/{EmailsSection-vYx6ExTb.js → EmailsSection-HfEMeRex.js} +65 -57
- package/dist/react/{EmailsTab-DKDrRmRH.js → EmailsTab-BWwq-CxB.js} +1 -1
- package/dist/react/{EventsSection-CapH5xut.js → EventsSection-CA9b15dJ.js} +1 -1
- package/dist/react/{EventsTab-BNVEySAm.js → EventsTab-CgSdHbKU.js} +1 -1
- package/dist/react/{InternalsContent-C9lIA92C.js → InternalsContent-CI7HvBtH.js} +51 -47
- package/dist/react/{InternalsSection-lOv_UcSV.js → InternalsSection-IEeWXJqP.js} +1 -1
- package/dist/react/{InternalsTab-BygoSorC.js → InternalsTab-CoVLHQbF.js} +1 -1
- package/dist/react/{JobsSection-ZIQsJWid.js → JobsSection-DgsS_VwU.js} +1 -1
- package/dist/react/{JobsTab-DXQzXrDt.js → JobsTab-CzwLSRUC.js} +1 -1
- package/dist/react/{LogEntryRow-BWkHE51-.js → LogEntryRow-VCCzwD1H.js} +1 -1
- package/dist/react/{LogsSection-ConXdBkL.js → LogsSection-BujNn_cO.js} +2 -2
- package/dist/react/{LogsTab-CJM47LPn.js → LogsTab-BtD1h7DM.js} +2 -2
- package/dist/react/{OverviewSection-DOMu2qvl.js → OverviewSection-B28em0gQ.js} +119 -111
- package/dist/react/{QueriesSection-DFsaOSJI.js → QueriesSection-B0tFn_Dc.js} +1 -1
- package/dist/react/{QueriesTab-CY9CG_7L.js → QueriesTab-DJY7aavR.js} +1 -1
- package/dist/react/{RequestsSection-CC-eVHsl.js → RequestsSection-DPmYM7tq.js} +2 -2
- package/dist/react/{RoutesSection-p1DMq41y.js → RoutesSection-Ck-RcFVS.js} +1 -1
- package/dist/react/{RoutesTab-Cnqy8UcK.js → RoutesTab-Ch3PDLzo.js} +1 -1
- package/dist/react/{SplitPaneWrapper-XgkA0QxE.js → SplitPaneWrapper-BZ6VrBr-.js} +1 -1
- package/dist/react/{TimelineTab-1YOERxe5.js → TimelineTab-_byxh2mJ.js} +2 -2
- package/dist/react/components/Dashboard/overview-data-context.d.ts +15 -0
- package/dist/react/components/Dashboard/sections/OverviewSection.d.ts +9 -0
- package/dist/react/{index-DOSlCpZ9.js → index-De7nsWBN.js} +148 -141
- package/dist/react/index.js +1 -1
- package/dist/src/collectors/app_collector.d.ts +11 -0
- package/dist/src/collectors/app_collector.js +11 -0
- package/dist/src/collectors/redis_collector.js +13 -13
- package/dist/src/dashboard/cache_handlers.d.ts +17 -3
- package/dist/src/dashboard/cache_handlers.js +14 -19
- package/dist/src/dashboard/coalesce_cache.d.ts +2 -8
- package/dist/src/dashboard/coalesce_cache.js +25 -0
- package/dist/src/dashboard/dashboard_controller.d.ts +1 -0
- package/dist/src/dashboard/dashboard_controller.js +8 -3
- package/dist/src/dashboard/dashboard_store.d.ts +0 -1
- package/dist/src/dashboard/dashboard_store.js +18 -18
- package/dist/src/dashboard/filter_handlers.js +26 -4
- package/dist/src/dashboard/flush_manager.d.ts +1 -0
- package/dist/src/dashboard/flush_manager.js +6 -1
- package/dist/src/dashboard/format_helpers.d.ts +0 -4
- package/dist/src/dashboard/format_helpers.js +0 -19
- package/dist/src/dashboard/integrations/config_inspector.js +6 -3
- package/dist/src/dashboard/knex_factory.js +8 -0
- package/dist/src/dashboard/migrator.d.ts +7 -2
- package/dist/src/dashboard/migrator.js +140 -6
- package/dist/src/dashboard/migrator_tables.js +8 -0
- package/dist/src/dashboard/paginate_helper.js +21 -11
- package/dist/src/dashboard/sensitive_patterns.d.ts +37 -0
- package/dist/src/dashboard/sensitive_patterns.js +146 -5
- package/dist/src/dashboard/storage_stats.d.ts +5 -0
- package/dist/src/dashboard/storage_stats.js +15 -1
- package/dist/src/dashboard/write_queue.d.ts +20 -21
- package/dist/src/dashboard/write_queue.js +37 -60
- package/dist/src/debug/query_collector.js +6 -1
- package/dist/src/debug/trace_collector.js +26 -13
- package/dist/src/debug/types.d.ts +2 -0
- package/dist/src/define_config.js +2 -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 +5 -5
- package/dist/src/edge/client-vue/debug-panel-deferred.js +2 -2
- package/dist/src/edge/views/dashboard.edge +1 -1
- package/dist/src/edge/views/debug-panel.edge +1 -1
- package/dist/src/edge/views/stats-bar.edge +1 -1
- package/dist/src/middleware/request_tracking_middleware.js +7 -2
- package/dist/src/provider/dashboard_init.d.ts +9 -1
- package/dist/src/provider/dashboard_init.js +10 -0
- package/dist/src/provider/dashboard_setup.js +14 -0
- package/dist/src/provider/diagnostics.d.ts +2 -0
- package/dist/src/provider/diagnostics.js +1 -0
- package/dist/src/provider/email_helpers.js +20 -5
- package/dist/src/provider/server_stats_provider.d.ts +10 -0
- package/dist/src/provider/server_stats_provider.js +26 -7
- package/dist/src/provider/shutdown_helpers.js +3 -1
- package/dist/src/provider/toolbar_setup.js +21 -15
- package/dist/src/stubs/config.stub +4 -0
- package/dist/src/types.d.ts +55 -4
- package/dist/vue/CacheSection-z2TQRez9.js +161 -0
- package/dist/vue/{ConfigSection-BiRAiaHj.js → ConfigSection-CFEaig69.js} +1 -1
- package/dist/vue/{EmailsSection-Dl44qyqY.js → EmailsSection-CYohBo62.js} +89 -85
- package/dist/vue/{EventsSection-CWjeitjU.js → EventsSection-B_TuVrGj.js} +1 -1
- package/dist/vue/{InternalsSection-jhTCuK3j.js → InternalsSection-B1P2kNT-.js} +92 -84
- package/dist/vue/{InternalsTab-Z3c82glB.js → InternalsTab-CRI-IFTo.js} +155 -147
- package/dist/vue/{JobsSection-DOBb4LjZ.js → JobsSection-AjkEzyiv.js} +1 -1
- package/dist/vue/{LogsSection-CXx-HOWJ.js → LogsSection-DZD0CCDi.js} +1 -1
- package/dist/vue/{OverviewSection-CyfNQ8uV.js → OverviewSection-BEc4Gktf.js} +1 -1
- package/dist/vue/{QueriesSection-CXBsFp-y.js → QueriesSection-BMImGXTn.js} +1 -1
- package/dist/vue/{RequestsSection-YTIaZGZd.js → RequestsSection-DOI2MUFX.js} +1 -1
- package/dist/vue/{RoutesSection-CDKMey49.js → RoutesSection-C1sxt-AW.js} +1 -1
- package/dist/vue/composables/useDashboardData.d.ts +1 -1
- package/dist/vue/{index-14x39RI_.js → index-BfPAAjL5.js} +95 -95
- package/dist/vue/index.js +1 -1
- package/package.json +12 -3
- package/dist/src/dashboard/explain_query.d.ts +0 -8
- package/dist/src/dashboard/explain_query.js +0 -22
- package/dist/src/provider/boot_initializer.d.ts +0 -28
- package/dist/src/provider/boot_initializer.js +0 -35
- package/dist/vue/CacheSection-CxEBVVkF.js +0 -156
|
@@ -1,65 +1,73 @@
|
|
|
1
|
-
import { jsx as s, jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { resolveCcAddr as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { P as
|
|
10
|
-
function
|
|
11
|
-
const [
|
|
12
|
-
|
|
13
|
-
const
|
|
1
|
+
import { jsx as s, jsxs as b, Fragment as E } from "react/jsx-runtime";
|
|
2
|
+
import { useState as o, useRef as N, useEffect as y, useCallback as F } from "react";
|
|
3
|
+
import { resolveCcAddr as _, resolveToAddr as g, resolveFromAddr as x, resolveAttachmentCount as $, resolveTimestamp as D } from "adonisjs-server-stats/core";
|
|
4
|
+
import { a as O } from "./index-De7nsWBN.js";
|
|
5
|
+
import { E as R } from "./EmailPreviewOverlay-BmXOAvqG.js";
|
|
6
|
+
import { F as B } from "./FilterBar-CQ7bD669.js";
|
|
7
|
+
import { T as H } from "./TimeAgoCell-o3KigGfM.js";
|
|
8
|
+
import { D as I } from "./DataTable-YyShr5B-.js";
|
|
9
|
+
import { P as L } from "./Pagination-BkmzUDY8.js";
|
|
10
|
+
function X({ options: n = {} }) {
|
|
11
|
+
const [k, m] = o(1), [i, A] = o(""), [p, c] = o(null), [h, d] = o(null), a = N(null), { data: u, meta: l, isLoading: C } = O("emails", { ...n, page: k, search: i }), w = u || [];
|
|
12
|
+
y(() => m(1), [i]);
|
|
13
|
+
const S = F(
|
|
14
14
|
async (e) => {
|
|
15
|
-
if (e.html) {
|
|
16
|
-
|
|
15
|
+
if (a.current?.abort(), e.html) {
|
|
16
|
+
a.current = null, c(e.id), d(e.html);
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
|
+
const t = new AbortController();
|
|
20
|
+
a.current = t;
|
|
19
21
|
try {
|
|
20
|
-
const { baseUrl:
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
const { baseUrl: r = "", dashboardEndpoint: P = "/__stats/api", authToken: v } = n, T = `${r}${P}/emails/${e.id}/preview`, f = { Accept: "text/html" };
|
|
23
|
+
v && (f.Authorization = `Bearer ${v}`);
|
|
24
|
+
const j = await (await fetch(T, {
|
|
25
|
+
headers: f,
|
|
26
|
+
credentials: "same-origin",
|
|
27
|
+
signal: t.signal
|
|
28
|
+
})).text();
|
|
29
|
+
if (a.current !== t) return;
|
|
30
|
+
c(e.id), d(j);
|
|
31
|
+
} catch (r) {
|
|
32
|
+
if (r instanceof Error && r.name === "AbortError") return;
|
|
25
33
|
}
|
|
26
34
|
},
|
|
27
|
-
[
|
|
35
|
+
[n]
|
|
28
36
|
);
|
|
29
|
-
if (
|
|
30
|
-
const e =
|
|
37
|
+
if (y(() => () => a.current?.abort(), []), p && h) {
|
|
38
|
+
const e = w.find((r) => r.id === p), t = e ? {
|
|
31
39
|
subject: e.subject,
|
|
32
|
-
from:
|
|
33
|
-
to:
|
|
34
|
-
cc:
|
|
40
|
+
from: x(e),
|
|
41
|
+
to: g(e),
|
|
42
|
+
cc: _(e) || null,
|
|
35
43
|
status: e.status,
|
|
36
44
|
mailer: e.mailer
|
|
37
45
|
} : null;
|
|
38
46
|
return /* @__PURE__ */ s(
|
|
39
|
-
|
|
47
|
+
R,
|
|
40
48
|
{
|
|
41
49
|
email: t,
|
|
42
|
-
previewHtml:
|
|
50
|
+
previewHtml: h,
|
|
43
51
|
onClose: () => {
|
|
44
|
-
|
|
52
|
+
c(null), d(null);
|
|
45
53
|
},
|
|
46
54
|
className: "ss-dash-email-preview"
|
|
47
55
|
}
|
|
48
56
|
);
|
|
49
57
|
}
|
|
50
|
-
return /* @__PURE__ */
|
|
58
|
+
return /* @__PURE__ */ b("div", { children: [
|
|
51
59
|
/* @__PURE__ */ s(
|
|
52
|
-
|
|
60
|
+
B,
|
|
53
61
|
{
|
|
54
62
|
search: i,
|
|
55
|
-
onSearchChange:
|
|
63
|
+
onSearchChange: A,
|
|
56
64
|
placeholder: "Filter emails...",
|
|
57
|
-
summary: `${
|
|
65
|
+
summary: `${l?.total ?? 0} emails`
|
|
58
66
|
}
|
|
59
67
|
),
|
|
60
|
-
|
|
68
|
+
C && !u ? /* @__PURE__ */ s("div", { className: "ss-dash-empty", children: "Loading emails..." }) : /* @__PURE__ */ b(E, { children: [
|
|
61
69
|
/* @__PURE__ */ s("div", { className: "ss-dash-table-wrap", children: /* @__PURE__ */ s(
|
|
62
|
-
|
|
70
|
+
I,
|
|
63
71
|
{
|
|
64
72
|
columns: [
|
|
65
73
|
{
|
|
@@ -73,11 +81,11 @@ function Q({ options: o = {} }) {
|
|
|
73
81
|
label: "From",
|
|
74
82
|
width: "150px",
|
|
75
83
|
render: (e, t) => {
|
|
76
|
-
const
|
|
84
|
+
const r = x(t);
|
|
77
85
|
return /* @__PURE__ */ s(
|
|
78
86
|
"span",
|
|
79
87
|
{
|
|
80
|
-
title:
|
|
88
|
+
title: r,
|
|
81
89
|
style: {
|
|
82
90
|
color: "var(--ss-text-secondary)",
|
|
83
91
|
overflow: "hidden",
|
|
@@ -85,7 +93,7 @@ function Q({ options: o = {} }) {
|
|
|
85
93
|
whiteSpace: "nowrap",
|
|
86
94
|
display: "block"
|
|
87
95
|
},
|
|
88
|
-
children:
|
|
96
|
+
children: r
|
|
89
97
|
}
|
|
90
98
|
);
|
|
91
99
|
}
|
|
@@ -95,11 +103,11 @@ function Q({ options: o = {} }) {
|
|
|
95
103
|
label: "To",
|
|
96
104
|
width: "150px",
|
|
97
105
|
render: (e, t) => {
|
|
98
|
-
const
|
|
106
|
+
const r = g(t);
|
|
99
107
|
return /* @__PURE__ */ s(
|
|
100
108
|
"span",
|
|
101
109
|
{
|
|
102
|
-
title:
|
|
110
|
+
title: r,
|
|
103
111
|
style: {
|
|
104
112
|
color: "var(--ss-text-secondary)",
|
|
105
113
|
overflow: "hidden",
|
|
@@ -107,7 +115,7 @@ function Q({ options: o = {} }) {
|
|
|
107
115
|
whiteSpace: "nowrap",
|
|
108
116
|
display: "block"
|
|
109
117
|
},
|
|
110
|
-
children:
|
|
118
|
+
children: r
|
|
111
119
|
}
|
|
112
120
|
);
|
|
113
121
|
}
|
|
@@ -147,12 +155,12 @@ function Q({ options: o = {} }) {
|
|
|
147
155
|
label: "ATT",
|
|
148
156
|
width: "40px",
|
|
149
157
|
render: (e, t) => {
|
|
150
|
-
const
|
|
151
|
-
return
|
|
158
|
+
const r = $(t);
|
|
159
|
+
return r > 0 ? /* @__PURE__ */ s(
|
|
152
160
|
"span",
|
|
153
161
|
{
|
|
154
162
|
style: { color: "var(--ss-dim)", textAlign: "center", display: "block" },
|
|
155
|
-
children:
|
|
163
|
+
children: r
|
|
156
164
|
}
|
|
157
165
|
) : /* @__PURE__ */ s(
|
|
158
166
|
"span",
|
|
@@ -190,11 +198,11 @@ function Q({ options: o = {} }) {
|
|
|
190
198
|
label: "Time",
|
|
191
199
|
width: "80px",
|
|
192
200
|
render: (e, t) => {
|
|
193
|
-
const
|
|
201
|
+
const r = D(t);
|
|
194
202
|
return /* @__PURE__ */ s(
|
|
195
|
-
|
|
203
|
+
H,
|
|
196
204
|
{
|
|
197
|
-
ts:
|
|
205
|
+
ts: r,
|
|
198
206
|
className: "ss-dash-event-time",
|
|
199
207
|
style: { whiteSpace: "nowrap" }
|
|
200
208
|
}
|
|
@@ -202,25 +210,25 @@ function Q({ options: o = {} }) {
|
|
|
202
210
|
}
|
|
203
211
|
}
|
|
204
212
|
],
|
|
205
|
-
data:
|
|
206
|
-
onRowClick:
|
|
213
|
+
data: w,
|
|
214
|
+
onRowClick: S,
|
|
207
215
|
rowClassName: "ss-dash-email-row",
|
|
208
216
|
emptyMessage: "No emails captured yet"
|
|
209
217
|
}
|
|
210
218
|
) }),
|
|
211
|
-
|
|
212
|
-
|
|
219
|
+
l && /* @__PURE__ */ s(
|
|
220
|
+
L,
|
|
213
221
|
{
|
|
214
|
-
page:
|
|
215
|
-
lastPage:
|
|
216
|
-
total:
|
|
217
|
-
onPageChange:
|
|
222
|
+
page: l.page,
|
|
223
|
+
lastPage: l.lastPage,
|
|
224
|
+
total: l.total,
|
|
225
|
+
onPageChange: m
|
|
218
226
|
}
|
|
219
227
|
)
|
|
220
228
|
] })
|
|
221
229
|
] });
|
|
222
230
|
}
|
|
223
231
|
export {
|
|
224
|
-
|
|
225
|
-
|
|
232
|
+
X as EmailsSection,
|
|
233
|
+
X as default
|
|
226
234
|
};
|
|
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as c, useRef as A, useMemo as v, useCallback as y, useEffect as S } from "react";
|
|
3
3
|
import { resolveTimestamp as j } from "adonisjs-server-stats/core";
|
|
4
4
|
import { T as q } from "./TimeAgoCell-o3KigGfM.js";
|
|
5
|
-
import { u as $ } from "./index-
|
|
5
|
+
import { u as $ } from "./index-De7nsWBN.js";
|
|
6
6
|
import { u as F } from "./useResizableTable-CNJmACdt.js";
|
|
7
7
|
import { F as R } from "./FilterBar-CQ7bD669.js";
|
|
8
8
|
import { E as M } from "./EmailPreviewOverlay-BmXOAvqG.js";
|
|
@@ -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-De7nsWBN.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-De7nsWBN.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,33 +1,33 @@
|
|
|
1
|
-
import { useState as f, useRef as
|
|
2
|
-
import { UnauthorizedError as
|
|
1
|
+
import { useState as f, useRef as z, useCallback as x, useEffect as A } from "react";
|
|
2
|
+
import { UnauthorizedError as T, formatConfigVal as C, isSecretKey as I, formatUptime as D, timeAgo as N, getTimerLabel as E, formatDuration as w, getIntegrationLabel as R, TAB_ICONS as S, classifyStatus as j } from "adonisjs-server-stats/core";
|
|
3
3
|
import { u as B } from "./useApiClient-CtEG7rHs.js";
|
|
4
|
-
import { jsx as e, jsxs as n, Fragment as
|
|
4
|
+
import { jsx as e, jsxs as n, Fragment as y } from "react/jsx-runtime";
|
|
5
5
|
function H(t = {}) {
|
|
6
6
|
const {
|
|
7
7
|
baseUrl: c = "",
|
|
8
|
-
debugEndpoint:
|
|
8
|
+
debugEndpoint: d = "/admin/api/debug",
|
|
9
9
|
authToken: i,
|
|
10
|
-
refreshInterval:
|
|
11
|
-
} = t, [u, b] = f(null), [v, g] = f(!0), [
|
|
10
|
+
refreshInterval: s = 3e3
|
|
11
|
+
} = t, [u, b] = f(null), [v, g] = f(!0), [$, r] = f(null), l = z(null), a = B(c, i), h = x(async () => {
|
|
12
12
|
try {
|
|
13
|
-
const
|
|
14
|
-
b(
|
|
13
|
+
const M = await a().get(`${d}/diagnostics`);
|
|
14
|
+
b(M), r(null), g(!1);
|
|
15
15
|
} catch (o) {
|
|
16
|
-
if (o instanceof
|
|
16
|
+
if (o instanceof T) {
|
|
17
17
|
r(o), g(!1), l.current && (clearInterval(l.current), l.current = null);
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
20
|
r(o instanceof Error ? o : new Error(String(o))), g(!1);
|
|
21
21
|
}
|
|
22
|
-
}, [
|
|
23
|
-
return
|
|
22
|
+
}, [d, a]);
|
|
23
|
+
return A(() => (g(!0), r(null), h(), l.current = setInterval(h, s), () => {
|
|
24
24
|
l.current && (clearInterval(l.current), l.current = null);
|
|
25
|
-
}), [h,
|
|
25
|
+
}), [h, s]), { data: u, isLoading: v, error: $ };
|
|
26
26
|
}
|
|
27
27
|
function p({ status: t, prefix: c }) {
|
|
28
|
-
const
|
|
28
|
+
const d = j(t);
|
|
29
29
|
let i = `${c}-dot`;
|
|
30
|
-
return
|
|
30
|
+
return d === "ok" ? i += ` ${c}-dot-ok` : d === "err" && (i += ` ${c}-dot-err`), /* @__PURE__ */ e("span", { className: i });
|
|
31
31
|
}
|
|
32
32
|
const L = () => /* @__PURE__ */ e(
|
|
33
33
|
"svg",
|
|
@@ -35,13 +35,13 @@ const L = () => /* @__PURE__ */ e(
|
|
|
35
35
|
xmlns: "http://www.w3.org/2000/svg",
|
|
36
36
|
width: "12",
|
|
37
37
|
height: "12",
|
|
38
|
-
viewBox:
|
|
38
|
+
viewBox: S.eye.viewBox,
|
|
39
39
|
fill: "none",
|
|
40
40
|
stroke: "currentColor",
|
|
41
41
|
strokeWidth: "2",
|
|
42
42
|
strokeLinecap: "round",
|
|
43
43
|
strokeLinejoin: "round",
|
|
44
|
-
dangerouslySetInnerHTML: { __html:
|
|
44
|
+
dangerouslySetInnerHTML: { __html: S.eye.elements.join("") }
|
|
45
45
|
}
|
|
46
46
|
), k = () => /* @__PURE__ */ e(
|
|
47
47
|
"svg",
|
|
@@ -49,17 +49,17 @@ const L = () => /* @__PURE__ */ e(
|
|
|
49
49
|
xmlns: "http://www.w3.org/2000/svg",
|
|
50
50
|
width: "12",
|
|
51
51
|
height: "12",
|
|
52
|
-
viewBox:
|
|
52
|
+
viewBox: S["eye-off"].viewBox,
|
|
53
53
|
fill: "none",
|
|
54
54
|
stroke: "currentColor",
|
|
55
55
|
strokeWidth: "2",
|
|
56
56
|
strokeLinecap: "round",
|
|
57
57
|
strokeLinejoin: "round",
|
|
58
|
-
dangerouslySetInnerHTML: { __html:
|
|
58
|
+
dangerouslySetInnerHTML: { __html: S["eye-off"].elements.join("") }
|
|
59
59
|
}
|
|
60
60
|
);
|
|
61
61
|
function V({ value: t }) {
|
|
62
|
-
const [c,
|
|
62
|
+
const [c, d] = f(!1);
|
|
63
63
|
return /* @__PURE__ */ n("span", { children: [
|
|
64
64
|
c ? t : "••••••••",
|
|
65
65
|
" ",
|
|
@@ -67,7 +67,7 @@ function V({ value: t }) {
|
|
|
67
67
|
"button",
|
|
68
68
|
{
|
|
69
69
|
type: "button",
|
|
70
|
-
onClick: () =>
|
|
70
|
+
onClick: () => d((i) => !i),
|
|
71
71
|
style: {
|
|
72
72
|
background: "none",
|
|
73
73
|
border: "1px solid var(--ss-border)",
|
|
@@ -83,39 +83,39 @@ function V({ value: t }) {
|
|
|
83
83
|
)
|
|
84
84
|
] });
|
|
85
85
|
}
|
|
86
|
-
function O({ current: t, max: c, prefix:
|
|
87
|
-
const i = c > 0 ? Math.min(100, Math.round(t / c * 100)) : 0,
|
|
88
|
-
return /* @__PURE__ */ n("div", { className: `${
|
|
89
|
-
/* @__PURE__ */ e("div", { className: `${
|
|
86
|
+
function O({ current: t, max: c, prefix: d }) {
|
|
87
|
+
const i = c > 0 ? Math.min(100, Math.round(t / c * 100)) : 0, s = i >= 100;
|
|
88
|
+
return /* @__PURE__ */ n("div", { className: `${d}-bar`, children: [
|
|
89
|
+
/* @__PURE__ */ e("div", { className: `${d}-bar-track`, children: /* @__PURE__ */ e(
|
|
90
90
|
"div",
|
|
91
91
|
{
|
|
92
|
-
className: `${
|
|
92
|
+
className: `${d}-bar-fill${s ? ` ${d}-bar-fill-warn` : ""}`,
|
|
93
93
|
style: { width: `${i}%` }
|
|
94
94
|
}
|
|
95
95
|
) }),
|
|
96
|
-
/* @__PURE__ */ n("span", { className: `${
|
|
96
|
+
/* @__PURE__ */ n("span", { className: `${d}-bar-pct${s ? ` ${d}-bar-pct-warn` : ""}`, children: [
|
|
97
97
|
i,
|
|
98
98
|
"%"
|
|
99
99
|
] })
|
|
100
100
|
] });
|
|
101
101
|
}
|
|
102
102
|
function P({ config: t, prefix: c }) {
|
|
103
|
-
const
|
|
104
|
-
return
|
|
103
|
+
const d = Object.entries(t);
|
|
104
|
+
return d.length === 0 ? /* @__PURE__ */ e("span", { className: `${c}-c-dim`, children: "-" }) : /* @__PURE__ */ e("span", { className: `${c}-c-muted`, children: d.map(([i, s], u) => /* @__PURE__ */ n("span", { children: [
|
|
105
105
|
u > 0 && ", ",
|
|
106
106
|
/* @__PURE__ */ e("span", { className: `${c}-c-dim`, children: i }),
|
|
107
107
|
"=",
|
|
108
|
-
|
|
108
|
+
I(i) && typeof s == "string" ? /* @__PURE__ */ e(V, { value: s }) : /* @__PURE__ */ e("span", { children: C(s) })
|
|
109
109
|
] }, i)) });
|
|
110
110
|
}
|
|
111
|
-
function m({ label: t, value: c, prefix:
|
|
112
|
-
return /* @__PURE__ */ n("div", { className: `${
|
|
113
|
-
/* @__PURE__ */ e("span", { className: `${
|
|
114
|
-
/* @__PURE__ */ e("span", { className: `${
|
|
111
|
+
function m({ label: t, value: c, prefix: d }) {
|
|
112
|
+
return /* @__PURE__ */ n("div", { className: `${d}-info-card`, children: [
|
|
113
|
+
/* @__PURE__ */ e("span", { className: `${d}-info-card-label`, children: t }),
|
|
114
|
+
/* @__PURE__ */ e("span", { className: `${d}-info-card-value`, children: c })
|
|
115
115
|
] });
|
|
116
116
|
}
|
|
117
|
-
function W({ data: t, tableClassName: c, classPrefix:
|
|
118
|
-
const i =
|
|
117
|
+
function W({ data: t, tableClassName: c, classPrefix: d }) {
|
|
118
|
+
const i = d || "ss-dash", [s, u] = f(/* @__PURE__ */ new Set()), b = x((r) => {
|
|
119
119
|
u((l) => {
|
|
120
120
|
const a = new Set(l);
|
|
121
121
|
return a.has(r) ? a.delete(r) : a.add(r), a;
|
|
@@ -126,9 +126,9 @@ function W({ data: t, tableClassName: c, classPrefix: s }) {
|
|
|
126
126
|
if (typeof l == "boolean")
|
|
127
127
|
return /* @__PURE__ */ e("span", { className: l ? `${i}-c-green` : `${i}-c-red`, children: String(l) });
|
|
128
128
|
if (Array.isArray(l)) return /* @__PURE__ */ e("span", { children: l.join(", ") || "-" });
|
|
129
|
-
const a =
|
|
130
|
-
if (
|
|
131
|
-
const h =
|
|
129
|
+
const a = C(l);
|
|
130
|
+
if (I(r)) {
|
|
131
|
+
const h = s.has(r);
|
|
132
132
|
return /* @__PURE__ */ n("span", { children: [
|
|
133
133
|
h ? a : "••••••••",
|
|
134
134
|
" ",
|
|
@@ -154,10 +154,10 @@ function W({ data: t, tableClassName: c, classPrefix: s }) {
|
|
|
154
154
|
}
|
|
155
155
|
return /* @__PURE__ */ e("span", { children: a });
|
|
156
156
|
},
|
|
157
|
-
[
|
|
158
|
-
),
|
|
157
|
+
[s, b, i]
|
|
158
|
+
), $ = t.collectors?.some((r) => r.name === "db_pool" || r.name === "app") && Array.isArray(t.lucidDebugConnections) && t.lucidDebugConnections.length === 0;
|
|
159
159
|
return /* @__PURE__ */ n("div", { children: [
|
|
160
|
-
|
|
160
|
+
$ && /* @__PURE__ */ n(
|
|
161
161
|
"div",
|
|
162
162
|
{
|
|
163
163
|
style: {
|
|
@@ -185,10 +185,10 @@ function W({ data: t, tableClassName: c, classPrefix: s }) {
|
|
|
185
185
|
/* @__PURE__ */ e(m, { label: "Version", value: t.package.version || "-", prefix: i }),
|
|
186
186
|
/* @__PURE__ */ e(m, { label: "Node.js", value: t.package.nodeVersion || "-", prefix: i }),
|
|
187
187
|
/* @__PURE__ */ e(m, { label: "AdonisJS", value: t.package.adonisVersion || "-", prefix: i }),
|
|
188
|
-
/* @__PURE__ */ e(m, { label: "Uptime", value:
|
|
188
|
+
/* @__PURE__ */ e(m, { label: "Uptime", value: D(t.package.uptime), prefix: i }),
|
|
189
189
|
/* @__PURE__ */ e(m, { label: "Renderer", value: t.devToolbar?.renderer || "preact", prefix: i })
|
|
190
190
|
] }),
|
|
191
|
-
t.collectors.length > 0 && /* @__PURE__ */ n(
|
|
191
|
+
t.collectors.length > 0 && /* @__PURE__ */ n(y, { children: [
|
|
192
192
|
/* @__PURE__ */ e("h3", { className: `${i}-internals-title`, children: "Collectors" }),
|
|
193
193
|
/* @__PURE__ */ n("table", { className: c, children: [
|
|
194
194
|
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ n("tr", { children: [
|
|
@@ -209,7 +209,7 @@ function W({ data: t, tableClassName: c, classPrefix: s }) {
|
|
|
209
209
|
/* @__PURE__ */ e(p, { status: r.status, prefix: i }),
|
|
210
210
|
r.status
|
|
211
211
|
] }),
|
|
212
|
-
/* @__PURE__ */ e("td", { className: r.lastError ? `${i}-c-red` : `${i}-c-dim`, children: r.lastError ? /* @__PURE__ */ n(
|
|
212
|
+
/* @__PURE__ */ e("td", { className: r.lastError ? `${i}-c-red` : `${i}-c-dim`, children: r.lastError ? /* @__PURE__ */ n(y, { children: [
|
|
213
213
|
r.lastError,
|
|
214
214
|
r.lastErrorAt && /* @__PURE__ */ e("span", { className: `${i}-c-dim`, style: { fontSize: "10px" }, children: N(r.lastErrorAt) })
|
|
215
215
|
] }) : "-" }),
|
|
@@ -242,7 +242,7 @@ function W({ data: t, tableClassName: c, classPrefix: s }) {
|
|
|
242
242
|
/* @__PURE__ */ e("th", { children: "Interval" })
|
|
243
243
|
] }) }),
|
|
244
244
|
/* @__PURE__ */ e("tbody", { children: Object.entries(t.timers).map(([r, l]) => /* @__PURE__ */ n("tr", { children: [
|
|
245
|
-
/* @__PURE__ */ e("td", { children:
|
|
245
|
+
/* @__PURE__ */ e("td", { children: E(r) }),
|
|
246
246
|
/* @__PURE__ */ n("td", { children: [
|
|
247
247
|
/* @__PURE__ */ e(p, { status: l.active ? "active" : "inactive", prefix: i }),
|
|
248
248
|
/* @__PURE__ */ e("span", { className: l.active ? `${i}-c-green` : `${i}-c-dim`, children: l.active ? "active" : "inactive" })
|
|
@@ -270,7 +270,7 @@ function W({ data: t, tableClassName: c, classPrefix: s }) {
|
|
|
270
270
|
const a = l.active ?? l.available ?? !1, h = l.active ? "active" : l.available ? "available" : "unavailable";
|
|
271
271
|
let o = l.mode ? `Mode: ${l.mode}` : "-";
|
|
272
272
|
return r === "edgePlugin" && l.active ? o = "@serverStats() tag registered" : r === "cacheInspector" && l.available ? o = "Redis dependency detected" : r === "queueInspector" && l.available && (o = "Queue dependency detected"), /* @__PURE__ */ n("tr", { children: [
|
|
273
|
-
/* @__PURE__ */ e("td", { children:
|
|
273
|
+
/* @__PURE__ */ e("td", { children: R(r) }),
|
|
274
274
|
/* @__PURE__ */ n("td", { children: [
|
|
275
275
|
/* @__PURE__ */ e(p, { status: a ? "active" : "inactive", prefix: i }),
|
|
276
276
|
h
|
|
@@ -280,7 +280,7 @@ function W({ data: t, tableClassName: c, classPrefix: s }) {
|
|
|
280
280
|
})
|
|
281
281
|
] })
|
|
282
282
|
] }),
|
|
283
|
-
t.storage && /* @__PURE__ */ n(
|
|
283
|
+
t.storage && /* @__PURE__ */ n(y, { children: [
|
|
284
284
|
/* @__PURE__ */ e("h3", { className: `${i}-internals-title`, children: "Storage (SQLite)" }),
|
|
285
285
|
/* @__PURE__ */ n("table", { className: c, children: [
|
|
286
286
|
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ n("tr", { children: [
|
|
@@ -320,6 +320,10 @@ function W({ data: t, tableClassName: c, classPrefix: s }) {
|
|
|
320
320
|
" days"
|
|
321
321
|
] })
|
|
322
322
|
] }),
|
|
323
|
+
/* @__PURE__ */ n("tr", { children: [
|
|
324
|
+
/* @__PURE__ */ e("td", { children: "Size Cap" }),
|
|
325
|
+
/* @__PURE__ */ e("td", { children: t.storage.maxDbSizeMb > 0 ? `${t.storage.maxDbSizeMb} MB` : "off" })
|
|
326
|
+
] }),
|
|
323
327
|
/* @__PURE__ */ n("tr", { children: [
|
|
324
328
|
/* @__PURE__ */ e("td", { children: "Last Cleanup" }),
|
|
325
329
|
/* @__PURE__ */ e("td", { children: t.storage.lastCleanupAt ? N(t.storage.lastCleanupAt) : "-" })
|
|
@@ -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-CI7HvBtH.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-CI7HvBtH.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-De7nsWBN.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-De7nsWBN.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-De7nsWBN.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-De7nsWBN.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-VCCzwD1H.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 = {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as o, jsxs as i } from "react/jsx-runtime";
|
|
2
2
|
import { useState as n, useMemo as x, useCallback as C } from "react";
|
|
3
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-
|
|
4
|
+
import { u as E } from "./index-De7nsWBN.js";
|
|
5
5
|
import { F as q } from "./FilterBar-CQ7bD669.js";
|
|
6
|
-
import { L as R } from "./LogEntryRow-
|
|
6
|
+
import { L as R } from "./LogEntryRow-VCCzwD1H.js";
|
|
7
7
|
function K({ options: f }) {
|
|
8
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
9
|
let e = Array.isArray(r) ? r : r?.logs || r?.entries || [];
|