adonisjs-server-stats 1.16.0 → 1.17.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 +14 -2
- package/dist/core/core/dashboard-api.d.ts +6 -4
- package/dist/core/index.js +9 -6
- package/dist/core/types.d.ts +24 -1
- package/dist/react/{CacheSection-DkLtukWz.js → CacheSection-C-X2Tnca.js} +48 -44
- package/dist/react/{CacheTab-DWeXnEBI.js → CacheTab-D55mfmeE.js} +1 -1
- package/dist/react/{ConfigSection-DaVbFPDg.js → ConfigSection-C-HGnZfd.js} +1 -1
- package/dist/react/{ConfigTab-D4640WJZ.js → ConfigTab-CNnsOXBh.js} +1 -1
- package/dist/react/{CustomPaneTab-DglmAVMC.js → CustomPaneTab-D-267UVd.js} +1 -1
- package/dist/react/{EmailsSection-vYx6ExTb.js → EmailsSection-Bqw4DI4r.js} +65 -57
- package/dist/react/{EmailsTab-DKDrRmRH.js → EmailsTab-CkHOhj2F.js} +1 -1
- package/dist/react/{EventsSection-CapH5xut.js → EventsSection-CMeyjzVC.js} +1 -1
- package/dist/react/{EventsTab-BNVEySAm.js → EventsTab-DgS2v1HX.js} +1 -1
- package/dist/react/{JobsSection-ZIQsJWid.js → JobsSection-oWH6pbrG.js} +1 -1
- package/dist/react/{JobsTab-DXQzXrDt.js → JobsTab-zdxX_as-.js} +1 -1
- package/dist/react/{LogEntryRow-BWkHE51-.js → LogEntryRow-Cn8Ee_X0.js} +1 -1
- package/dist/react/{LogsSection-ConXdBkL.js → LogsSection-XmiI2MMs.js} +2 -2
- package/dist/react/{LogsTab-CJM47LPn.js → LogsTab-ixusY4v7.js} +2 -2
- package/dist/react/{OverviewSection-DOMu2qvl.js → OverviewSection-CvhObTLP.js} +119 -111
- package/dist/react/{QueriesSection-DFsaOSJI.js → QueriesSection-BvledwBI.js} +1 -1
- package/dist/react/{QueriesTab-CY9CG_7L.js → QueriesTab-smQQJvJa.js} +1 -1
- package/dist/react/{RequestsSection-CC-eVHsl.js → RequestsSection-DKuYpViv.js} +2 -2
- package/dist/react/{RoutesSection-p1DMq41y.js → RoutesSection-5RNVurQ6.js} +1 -1
- package/dist/react/{RoutesTab-Cnqy8UcK.js → RoutesTab-CpXNO-Rx.js} +1 -1
- package/dist/react/{SplitPaneWrapper-XgkA0QxE.js → SplitPaneWrapper-DQvJnsuk.js} +1 -1
- package/dist/react/{TimelineTab-1YOERxe5.js → TimelineTab-LHQHHKkO.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-LlFvooUN.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 +1 -3
- package/dist/src/dashboard/dashboard_store.js +14 -9
- package/dist/src/dashboard/dashboard_types.d.ts +2 -0
- package/dist/src/dashboard/filter_handlers.js +26 -4
- package/dist/src/dashboard/flush_manager.d.ts +2 -6
- package/dist/src/dashboard/flush_manager.js +9 -11
- 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 +15 -52
- package/dist/src/dashboard/migrator_tables.js +4 -0
- package/dist/src/dashboard/paginate_helper.js +21 -11
- package/dist/src/dashboard/sensitive_patterns.d.ts +76 -0
- package/dist/src/dashboard/sensitive_patterns.js +259 -0
- package/dist/src/dashboard/write_queue.d.ts +27 -16
- package/dist/src/dashboard/write_queue.js +50 -47
- package/dist/src/debug/event_collector.d.ts +8 -0
- package/dist/src/debug/event_collector.js +12 -0
- package/dist/src/debug/query_collector.js +6 -1
- package/dist/src/debug/trace_collector.js +26 -13
- package/dist/src/edge/client/dashboard.js +2 -2
- package/dist/src/edge/client-vue/dashboard.js +5 -5
- 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 +19 -0
- package/dist/src/provider/email_helpers.js +20 -5
- package/dist/src/provider/server_stats_provider.d.ts +9 -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/types.d.ts +24 -1
- package/dist/vue/CacheSection-Bm0goqX6.js +161 -0
- package/dist/vue/{ConfigSection-BiRAiaHj.js → ConfigSection-BrYslIMN.js} +1 -1
- package/dist/vue/{EmailsSection-Dl44qyqY.js → EmailsSection-B8N5vaWA.js} +89 -85
- package/dist/vue/{EventsSection-CWjeitjU.js → EventsSection-D2Y_xt0m.js} +1 -1
- package/dist/vue/{JobsSection-DOBb4LjZ.js → JobsSection-cEKqELLC.js} +1 -1
- package/dist/vue/{LogsSection-CXx-HOWJ.js → LogsSection-C3H2c0S3.js} +1 -1
- package/dist/vue/{OverviewSection-CyfNQ8uV.js → OverviewSection-I2swuHDa.js} +1 -1
- package/dist/vue/{QueriesSection-CXBsFp-y.js → QueriesSection-CF1IE3SN.js} +1 -1
- package/dist/vue/{RequestsSection-YTIaZGZd.js → RequestsSection-CuwgXzmU.js} +1 -1
- package/dist/vue/{RoutesSection-CDKMey49.js → RoutesSection-BhJCF7Rn.js} +1 -1
- package/dist/vue/composables/useDashboardData.d.ts +1 -1
- package/dist/vue/{index-14x39RI_.js → index-DUsImuIN.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,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-LlFvooUN.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-Cn8Ee_X0.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 || [];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as s, jsxs as e } from "react/jsx-runtime";
|
|
2
|
-
import { useState as A, useId as
|
|
3
|
-
import { resolveMetric as k, formatDuration as S, durationClassName as G, resolveEventName as
|
|
4
|
-
import { a as
|
|
5
|
-
import { T as
|
|
6
|
-
const
|
|
2
|
+
import { useContext as rs, useState as A, useId as ts, useRef as ls, useEffect as ds, useCallback as z } from "react";
|
|
3
|
+
import { resolveMetric as k, formatDuration as S, durationClassName as G, resolveEventName as is, resolveNormalizedSql as ns } from "adonisjs-server-stats/core";
|
|
4
|
+
import { O as cs, a as Y, b as D } from "./index-LlFvooUN.js";
|
|
5
|
+
import { T as os } from "./TimeAgoCell-o3KigGfM.js";
|
|
6
|
+
const hs = [
|
|
7
7
|
{ value: "5m", label: "5m" },
|
|
8
8
|
{ value: "15m", label: "15m" },
|
|
9
9
|
{ value: "30m", label: "30m" },
|
|
@@ -12,30 +12,30 @@ const ns = [
|
|
|
12
12
|
{ value: "24h", label: "24h" },
|
|
13
13
|
{ value: "7d", label: "7d" }
|
|
14
14
|
];
|
|
15
|
-
function
|
|
16
|
-
return /* @__PURE__ */ s("div", { className: `ss-dash-btn-group ${c}`, children:
|
|
15
|
+
function us({ value: r, onChange: l, className: c = "" }) {
|
|
16
|
+
return /* @__PURE__ */ s("div", { className: `ss-dash-btn-group ${c}`, children: hs.map((n) => /* @__PURE__ */ s(
|
|
17
17
|
"button",
|
|
18
18
|
{
|
|
19
19
|
type: "button",
|
|
20
|
-
className: `ss-dash-btn ${
|
|
21
|
-
onClick: () =>
|
|
20
|
+
className: `ss-dash-btn ${r === n.value ? "ss-dash-active" : ""}`,
|
|
21
|
+
onClick: () => l(n.value),
|
|
22
22
|
children: n.label
|
|
23
23
|
},
|
|
24
24
|
n.value
|
|
25
25
|
)) });
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
if (
|
|
29
|
-
const c =
|
|
27
|
+
function ms(r, l) {
|
|
28
|
+
if (r <= 0) return [0];
|
|
29
|
+
const c = r / l, n = Math.pow(10, Math.floor(Math.log10(c))), u = c / n;
|
|
30
30
|
let o;
|
|
31
|
-
|
|
31
|
+
u <= 1 ? o = n : u <= 2 ? o = 2 * n : u <= 5 ? o = 5 * n : o = 10 * n;
|
|
32
32
|
const a = [];
|
|
33
|
-
for (let g = o; g <=
|
|
34
|
-
return a.length === 0 && a.push(Math.ceil(
|
|
33
|
+
for (let g = o; g <= r + o * 0.5; g += o) a.push(Math.round(g));
|
|
34
|
+
return a.length === 0 && a.push(Math.ceil(r)), a;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function K(r) {
|
|
37
37
|
try {
|
|
38
|
-
return new Date(
|
|
38
|
+
return new Date(r).toLocaleTimeString("en-US", {
|
|
39
39
|
hour12: !1,
|
|
40
40
|
hour: "2-digit",
|
|
41
41
|
minute: "2-digit"
|
|
@@ -44,41 +44,41 @@ function V(l) {
|
|
|
44
44
|
return "";
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
function
|
|
48
|
-
if (
|
|
49
|
-
if (
|
|
50
|
-
let
|
|
51
|
-
for (let c = 0; c <
|
|
52
|
-
const n =
|
|
53
|
-
|
|
47
|
+
function V(r) {
|
|
48
|
+
if (r.length === 0) return "";
|
|
49
|
+
if (r.length === 1) return `M${r[0].x},${r[0].y}`;
|
|
50
|
+
let l = `M${r[0].x.toFixed(1)},${r[0].y.toFixed(1)}`;
|
|
51
|
+
for (let c = 0; c < r.length - 1; c++) {
|
|
52
|
+
const n = r[c], u = r[c + 1], o = (n.x + u.x) / 2;
|
|
53
|
+
l += ` C${o.toFixed(1)},${n.y.toFixed(1)} ${o.toFixed(1)},${u.y.toFixed(1)} ${u.x.toFixed(1)},${u.y.toFixed(1)}`;
|
|
54
54
|
}
|
|
55
|
-
return
|
|
55
|
+
return l;
|
|
56
56
|
}
|
|
57
|
-
function
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
const
|
|
61
|
-
if (!
|
|
62
|
-
b(
|
|
63
|
-
const
|
|
57
|
+
function vs({ chartPoints: r }) {
|
|
58
|
+
const l = { top: 12, right: 12, bottom: 28, left: 38 }, c = 220, n = ts(), u = `ss-cg-total-${n}`, o = `ss-cg-error-${n}`, a = ls(null), [g, b] = A(0);
|
|
59
|
+
ds(() => {
|
|
60
|
+
const i = a.current;
|
|
61
|
+
if (!i) return;
|
|
62
|
+
b(i.clientWidth);
|
|
63
|
+
const t = new ResizeObserver((w) => {
|
|
64
64
|
for (const j of w)
|
|
65
65
|
b(j.contentRect.width);
|
|
66
66
|
});
|
|
67
|
-
return
|
|
67
|
+
return t.observe(i), () => t.disconnect();
|
|
68
68
|
}, []);
|
|
69
|
-
const f = g || 600,
|
|
70
|
-
(
|
|
71
|
-
const
|
|
72
|
-
|
|
69
|
+
const f = g || 600, C = f - l.left - l.right, x = c - l.top - l.bottom, q = l.top + x, m = r.map((i) => k(i, "requestCount", "request_count") || i.total || 0), v = r.map((i) => k(i, "errorCount", "error_count")), E = Math.max(...m, 1), L = Math.ceil(E * 1.1), M = v.some((i) => i > 0), R = ms(L, 4), d = R.length > 0 ? R[R.length - 1] : L, y = (i) => l.left + i / Math.max(r.length - 1, 1) * C, h = (i) => l.top + x - i / (d || 1) * x, N = r.map((i, t) => ({ x: y(t), y: h(m[t]) })), $ = r.map((i, t) => ({ x: y(t), y: h(v[t]) })), T = V(N), F = M ? V($) : "", _ = N.length > 1 ? `${T} L${N[N.length - 1].x.toFixed(1)},${q} L${N[0].x.toFixed(1)},${q} Z` : "", W = M && $.length > 1 ? `${F} L${$[$.length - 1].x.toFixed(1)},${q} L${$[0].x.toFixed(1)},${q} Z` : "", J = Math.min(10, r.length), X = Math.max(1, Math.ceil(r.length / J)), [p, O] = A({ visible: !1, x: 0, idx: -1 }), P = z(
|
|
70
|
+
(i) => {
|
|
71
|
+
const t = N[i].x;
|
|
72
|
+
O({ visible: !0, x: t, idx: i });
|
|
73
73
|
},
|
|
74
74
|
[N]
|
|
75
|
-
),
|
|
76
|
-
|
|
77
|
-
}, []),
|
|
75
|
+
), ss = z(() => {
|
|
76
|
+
O({ visible: !1, x: 0, idx: -1 });
|
|
77
|
+
}, []), I = 120, es = p.visible ? Math.max(I / 2, Math.min(p.x, f - I / 2)) : 0;
|
|
78
78
|
return /* @__PURE__ */ e("div", { ref: a, style: { position: "relative" }, children: [
|
|
79
79
|
/* @__PURE__ */ e("svg", { viewBox: `0 0 ${f} ${c}`, className: "ss-dash-chart-svg", children: [
|
|
80
80
|
/* @__PURE__ */ e("defs", { children: [
|
|
81
|
-
/* @__PURE__ */ e("linearGradient", { id:
|
|
81
|
+
/* @__PURE__ */ e("linearGradient", { id: u, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
82
82
|
/* @__PURE__ */ s("stop", { offset: "0%", stopColor: "var(--ss-accent)", stopOpacity: 0.3 }),
|
|
83
83
|
/* @__PURE__ */ s("stop", { offset: "100%", stopColor: "var(--ss-accent)", stopOpacity: 0.02 })
|
|
84
84
|
] }),
|
|
@@ -87,16 +87,16 @@ function hs({ chartPoints: l }) {
|
|
|
87
87
|
/* @__PURE__ */ s("stop", { offset: "100%", stopColor: "var(--ss-red-fg)", stopOpacity: 0.02 })
|
|
88
88
|
] })
|
|
89
89
|
] }),
|
|
90
|
-
R.map((
|
|
91
|
-
const
|
|
90
|
+
R.map((i) => {
|
|
91
|
+
const t = h(i);
|
|
92
92
|
return /* @__PURE__ */ e("g", { children: [
|
|
93
93
|
/* @__PURE__ */ s(
|
|
94
94
|
"line",
|
|
95
95
|
{
|
|
96
|
-
x1:
|
|
97
|
-
y1:
|
|
98
|
-
x2: f -
|
|
99
|
-
y2:
|
|
96
|
+
x1: l.left,
|
|
97
|
+
y1: t,
|
|
98
|
+
x2: f - l.right,
|
|
99
|
+
y2: t,
|
|
100
100
|
stroke: "var(--ss-border-faint)",
|
|
101
101
|
strokeWidth: 0.5,
|
|
102
102
|
strokeDasharray: "3,3"
|
|
@@ -105,18 +105,18 @@ function hs({ chartPoints: l }) {
|
|
|
105
105
|
/* @__PURE__ */ s(
|
|
106
106
|
"text",
|
|
107
107
|
{
|
|
108
|
-
x:
|
|
109
|
-
y:
|
|
108
|
+
x: l.left - 6,
|
|
109
|
+
y: t,
|
|
110
110
|
textAnchor: "end",
|
|
111
111
|
fill: "var(--ss-dim)",
|
|
112
112
|
fontSize: 9,
|
|
113
113
|
dominantBaseline: "middle",
|
|
114
|
-
children:
|
|
114
|
+
children: i
|
|
115
115
|
}
|
|
116
116
|
)
|
|
117
|
-
] }, `ytick-${
|
|
117
|
+
] }, `ytick-${i}`);
|
|
118
118
|
}),
|
|
119
|
-
_ && /* @__PURE__ */ s("path", { d: _, fill: `url(#${
|
|
119
|
+
_ && /* @__PURE__ */ s("path", { d: _, fill: `url(#${u})` }),
|
|
120
120
|
T && /* @__PURE__ */ s(
|
|
121
121
|
"path",
|
|
122
122
|
{
|
|
@@ -141,34 +141,34 @@ function hs({ chartPoints: l }) {
|
|
|
141
141
|
strokeDasharray: "4,2"
|
|
142
142
|
}
|
|
143
143
|
),
|
|
144
|
-
|
|
145
|
-
const w =
|
|
144
|
+
r.map((i, t) => {
|
|
145
|
+
const w = m[t], j = v[t], Q = N[t].x, as = N[t].y, B = C / (r.length || 1), H = p.visible && p.idx === t, U = p.visible && p.idx !== t;
|
|
146
146
|
return /* @__PURE__ */ e("g", { children: [
|
|
147
147
|
/* @__PURE__ */ s(
|
|
148
148
|
"rect",
|
|
149
149
|
{
|
|
150
150
|
x: Q - B / 2,
|
|
151
|
-
y:
|
|
151
|
+
y: l.top,
|
|
152
152
|
width: B,
|
|
153
153
|
height: x,
|
|
154
154
|
fill: "transparent",
|
|
155
155
|
className: "ss-dash-chart-hover-zone",
|
|
156
|
-
"data-idx":
|
|
157
|
-
onMouseEnter: () =>
|
|
158
|
-
onMouseLeave:
|
|
156
|
+
"data-idx": t,
|
|
157
|
+
onMouseEnter: () => P(t),
|
|
158
|
+
onMouseLeave: ss
|
|
159
159
|
}
|
|
160
160
|
),
|
|
161
161
|
w > 0 && /* @__PURE__ */ s(
|
|
162
162
|
"circle",
|
|
163
163
|
{
|
|
164
164
|
cx: Q,
|
|
165
|
-
cy:
|
|
166
|
-
r:
|
|
165
|
+
cy: as,
|
|
166
|
+
r: H ? 4 : 2.5,
|
|
167
167
|
fill: "var(--ss-accent)",
|
|
168
168
|
stroke: "var(--ss-surface)",
|
|
169
169
|
strokeWidth: 1,
|
|
170
170
|
className: "ss-dash-chart-dot",
|
|
171
|
-
"data-idx":
|
|
171
|
+
"data-idx": t,
|
|
172
172
|
opacity: U ? 0.3 : 1
|
|
173
173
|
}
|
|
174
174
|
),
|
|
@@ -176,32 +176,32 @@ function hs({ chartPoints: l }) {
|
|
|
176
176
|
"circle",
|
|
177
177
|
{
|
|
178
178
|
cx: Q,
|
|
179
|
-
cy: $[
|
|
180
|
-
r:
|
|
179
|
+
cy: $[t].y,
|
|
180
|
+
r: H ? 3.5 : 2,
|
|
181
181
|
fill: "var(--ss-red-fg)",
|
|
182
182
|
stroke: "var(--ss-surface)",
|
|
183
183
|
strokeWidth: 1,
|
|
184
184
|
className: "ss-dash-chart-dot ss-dash-chart-dot-err",
|
|
185
|
-
"data-idx":
|
|
185
|
+
"data-idx": t,
|
|
186
186
|
opacity: U ? 0.3 : 1
|
|
187
187
|
}
|
|
188
188
|
)
|
|
189
|
-
] },
|
|
189
|
+
] }, t);
|
|
190
190
|
}),
|
|
191
|
-
|
|
192
|
-
if (
|
|
193
|
-
const w =
|
|
191
|
+
r.map((i, t) => {
|
|
192
|
+
if (t % X !== 0 && t !== r.length - 1) return null;
|
|
193
|
+
const w = K(i.bucket);
|
|
194
194
|
return w ? /* @__PURE__ */ s(
|
|
195
195
|
"text",
|
|
196
196
|
{
|
|
197
|
-
x: y(
|
|
197
|
+
x: y(t),
|
|
198
198
|
y: c - 6,
|
|
199
199
|
textAnchor: "middle",
|
|
200
200
|
fill: "var(--ss-dim)",
|
|
201
201
|
fontSize: 9,
|
|
202
202
|
children: w
|
|
203
203
|
},
|
|
204
|
-
`xlabel-${
|
|
204
|
+
`xlabel-${t}`
|
|
205
205
|
) : null;
|
|
206
206
|
})
|
|
207
207
|
] }),
|
|
@@ -210,15 +210,15 @@ function hs({ chartPoints: l }) {
|
|
|
210
210
|
{
|
|
211
211
|
className: "ss-dash-chart-tooltip",
|
|
212
212
|
style: {
|
|
213
|
-
left:
|
|
214
|
-
top:
|
|
213
|
+
left: es,
|
|
214
|
+
top: l.top - 4,
|
|
215
215
|
transform: "translate(-50%, -100%)"
|
|
216
216
|
},
|
|
217
217
|
children: [
|
|
218
|
-
/* @__PURE__ */ s("div", { children:
|
|
218
|
+
/* @__PURE__ */ s("div", { children: K(r[p.idx].bucket) }),
|
|
219
219
|
/* @__PURE__ */ e("div", { children: [
|
|
220
220
|
"Requests: ",
|
|
221
|
-
|
|
221
|
+
m[p.idx]
|
|
222
222
|
] }),
|
|
223
223
|
v[p.idx] > 0 && /* @__PURE__ */ e("div", { style: { color: "var(--ss-red-fg)" }, children: [
|
|
224
224
|
"Errors: ",
|
|
@@ -229,14 +229,22 @@ function hs({ chartPoints: l }) {
|
|
|
229
229
|
)
|
|
230
230
|
] });
|
|
231
231
|
}
|
|
232
|
-
function
|
|
233
|
-
const
|
|
234
|
-
|
|
235
|
-
|
|
232
|
+
function ws({ options: r = {} }) {
|
|
233
|
+
const l = rs(cs);
|
|
234
|
+
return l ? /* @__PURE__ */ s(Z, { options: r, overview: l.data, isLoading: l.isLoading }) : /* @__PURE__ */ s(ps, { options: r });
|
|
235
|
+
}
|
|
236
|
+
function ps({ options: r }) {
|
|
237
|
+
const { data: l, isLoading: c } = Y("overview", r);
|
|
238
|
+
return /* @__PURE__ */ s(Z, { options: r, overview: l, isLoading: c });
|
|
239
|
+
}
|
|
240
|
+
function Z({ options: r, overview: l, isLoading: c }) {
|
|
241
|
+
const [n, u] = A("1h"), { data: o } = Y("overview/chart", {
|
|
242
|
+
...r,
|
|
243
|
+
timeRange: n
|
|
236
244
|
});
|
|
237
|
-
if (
|
|
245
|
+
if (c && !l)
|
|
238
246
|
return /* @__PURE__ */ s("div", { className: "ss-dash-empty", children: "Loading overview..." });
|
|
239
|
-
const a =
|
|
247
|
+
const a = l || {
|
|
240
248
|
avgResponseTime: 0,
|
|
241
249
|
p95ResponseTime: 0,
|
|
242
250
|
requestsPerMinute: 0,
|
|
@@ -252,7 +260,7 @@ function ys({ options: l = {} }) {
|
|
|
252
260
|
jobQueueStatus: null,
|
|
253
261
|
statusDistribution: { "2xx": 0, "3xx": 0, "4xx": 0, "5xx": 0 },
|
|
254
262
|
slowestQueries: []
|
|
255
|
-
}, g = a, b = k(g, "avgResponseTime", "avg_response_time"), f = k(g, "p95ResponseTime", "p95_response_time"),
|
|
263
|
+
}, g = a, b = k(g, "avgResponseTime", "avg_response_time"), f = k(g, "p95ResponseTime", "p95_response_time"), C = k(g, "requestsPerMinute", "requests_per_minute"), x = k(g, "errorRate", "error_rate"), m = k(g, "totalRequests", "total_requests") > 0, v = o?.buckets || [], E = a.sparklines?.avgResponseTime ?? v.map((d) => d.avgDuration ?? 0), L = a.sparklines?.p95ResponseTime ?? v.map((d) => d.p95Duration ?? 0), M = a.sparklines?.requestsPerMinute ?? v.map((d) => d.requestCount ?? 0), R = a.sparklines?.errorRate ?? v.map((d) => d.errorCount ?? 0);
|
|
256
264
|
return /* @__PURE__ */ e("div", { className: "ss-dash-overview", children: [
|
|
257
265
|
/* @__PURE__ */ e("div", { className: "ss-dash-cards", children: [
|
|
258
266
|
/* @__PURE__ */ e("div", { className: "ss-dash-card", children: [
|
|
@@ -260,8 +268,8 @@ function ys({ options: l = {} }) {
|
|
|
260
268
|
/* @__PURE__ */ s(
|
|
261
269
|
"div",
|
|
262
270
|
{
|
|
263
|
-
className: `ss-dash-card-value ${
|
|
264
|
-
children:
|
|
271
|
+
className: `ss-dash-card-value ${m ? b > 500 ? "ss-dash-red" : b > 200 ? "ss-dash-amber" : "ss-dash-accent" : "ss-dash-dim"}`,
|
|
272
|
+
children: m ? S(b) : "-"
|
|
265
273
|
}
|
|
266
274
|
),
|
|
267
275
|
/* @__PURE__ */ s("div", { className: "ss-dash-sparkline", children: /* @__PURE__ */ s(D, { data: E, color: "#34d399", width: 160, height: 40 }) })
|
|
@@ -271,24 +279,24 @@ function ys({ options: l = {} }) {
|
|
|
271
279
|
/* @__PURE__ */ s(
|
|
272
280
|
"div",
|
|
273
281
|
{
|
|
274
|
-
className: `ss-dash-card-value ${
|
|
275
|
-
children:
|
|
282
|
+
className: `ss-dash-card-value ${m ? f > 500 ? "ss-dash-red" : f > 200 ? "ss-dash-amber" : "ss-dash-accent" : "ss-dash-dim"}`,
|
|
283
|
+
children: m ? S(f) : "-"
|
|
276
284
|
}
|
|
277
285
|
),
|
|
278
|
-
/* @__PURE__ */ s("div", { className: "ss-dash-sparkline", children: /* @__PURE__ */ s(D, { data:
|
|
286
|
+
/* @__PURE__ */ s("div", { className: "ss-dash-sparkline", children: /* @__PURE__ */ s(D, { data: L, color: "#60a5fa", width: 160, height: 40 }) })
|
|
279
287
|
] }),
|
|
280
288
|
/* @__PURE__ */ e("div", { className: "ss-dash-card", children: [
|
|
281
289
|
/* @__PURE__ */ s("div", { className: "ss-dash-card-title", children: "Requests / min" }),
|
|
282
|
-
/* @__PURE__ */ s("div", { className: `ss-dash-card-value ${
|
|
283
|
-
/* @__PURE__ */ s("div", { className: "ss-dash-sparkline", children: /* @__PURE__ */ s(D, { data:
|
|
290
|
+
/* @__PURE__ */ s("div", { className: `ss-dash-card-value ${m ? "ss-dash-accent" : "ss-dash-dim"}`, children: m ? C.toFixed(1) : "-" }),
|
|
291
|
+
/* @__PURE__ */ s("div", { className: "ss-dash-sparkline", children: /* @__PURE__ */ s(D, { data: M, color: "#34d399", width: 160, height: 40 }) })
|
|
284
292
|
] }),
|
|
285
293
|
/* @__PURE__ */ e("div", { className: "ss-dash-card", children: [
|
|
286
294
|
/* @__PURE__ */ s("div", { className: "ss-dash-card-title", children: "Error Rate" }),
|
|
287
295
|
/* @__PURE__ */ s(
|
|
288
296
|
"div",
|
|
289
297
|
{
|
|
290
|
-
className: `ss-dash-card-value ${
|
|
291
|
-
children:
|
|
298
|
+
className: `ss-dash-card-value ${m ? x > 5 ? "ss-dash-red" : x > 1 ? "ss-dash-amber" : "ss-dash-accent" : "ss-dash-dim"}`,
|
|
299
|
+
children: m ? `${x.toFixed(1)}%` : "-"
|
|
292
300
|
}
|
|
293
301
|
),
|
|
294
302
|
/* @__PURE__ */ s("div", { className: "ss-dash-sparkline", children: /* @__PURE__ */ s(D, { data: R, color: "#f87171", width: 160, height: 40 }) })
|
|
@@ -297,15 +305,15 @@ function ys({ options: l = {} }) {
|
|
|
297
305
|
/* @__PURE__ */ e("div", { className: "ss-dash-chart-container", children: [
|
|
298
306
|
/* @__PURE__ */ e("div", { className: "ss-dash-chart-header", children: [
|
|
299
307
|
/* @__PURE__ */ s("span", { className: "ss-dash-chart-title", children: "Request Volume" }),
|
|
300
|
-
/* @__PURE__ */ s(
|
|
308
|
+
/* @__PURE__ */ s(us, { value: n, onChange: u })
|
|
301
309
|
] }),
|
|
302
|
-
/* @__PURE__ */ s("div", { className: "ss-dash-chart", id: "ss-dash-chart-area", children: v.length === 0 ? /* @__PURE__ */ s("div", { className: "ss-dash-empty", style: { minHeight: "120px" }, children: "No data for this range" }) : /* @__PURE__ */ s(
|
|
310
|
+
/* @__PURE__ */ s("div", { className: "ss-dash-chart", id: "ss-dash-chart-area", children: v.length === 0 ? /* @__PURE__ */ s("div", { className: "ss-dash-empty", style: { minHeight: "120px" }, children: "No data for this range" }) : /* @__PURE__ */ s(vs, { chartPoints: v }) }),
|
|
303
311
|
/* @__PURE__ */ e("div", { className: "ss-dash-chart-legend", id: "ss-dash-chart-legend", children: [
|
|
304
312
|
/* @__PURE__ */ e("span", { className: "ss-dash-chart-legend-item", children: [
|
|
305
313
|
/* @__PURE__ */ s("span", { className: "ss-dash-legend-dot", style: { background: "var(--ss-accent)" } }),
|
|
306
314
|
"Requests"
|
|
307
315
|
] }),
|
|
308
|
-
v.some((
|
|
316
|
+
v.some((d) => (d.errorCount ?? 0) > 0) && /* @__PURE__ */ e("span", { className: "ss-dash-chart-legend-item", children: [
|
|
309
317
|
/* @__PURE__ */ s("span", { className: "ss-dash-legend-dot", style: { background: "var(--ss-red-fg)" } }),
|
|
310
318
|
"Errors"
|
|
311
319
|
] })
|
|
@@ -314,8 +322,8 @@ function ys({ options: l = {} }) {
|
|
|
314
322
|
/* @__PURE__ */ e("div", { className: "ss-dash-secondary-cards", children: [
|
|
315
323
|
/* @__PURE__ */ e("div", { className: "ss-dash-secondary-card", children: [
|
|
316
324
|
/* @__PURE__ */ s("div", { className: "ss-dash-secondary-card-title", children: /* @__PURE__ */ s("a", { href: "#requests", className: "ss-dash-widget-link", children: "Slowest Endpoints" }) }),
|
|
317
|
-
a.slowestEndpoints.length === 0 ? /* @__PURE__ */ s("div", { className: "ss-dash-empty", style: { minHeight: "60px" }, children: "No data yet" }) : /* @__PURE__ */ s("ul", { className: "ss-dash-secondary-list", children: a.slowestEndpoints.slice(0, 5).map((
|
|
318
|
-
const h =
|
|
325
|
+
a.slowestEndpoints.length === 0 ? /* @__PURE__ */ s("div", { className: "ss-dash-empty", style: { minHeight: "60px" }, children: "No data yet" }) : /* @__PURE__ */ s("ul", { className: "ss-dash-secondary-list", children: a.slowestEndpoints.slice(0, 5).map((d, y) => {
|
|
326
|
+
const h = d.url || d.pattern || "-";
|
|
319
327
|
return /* @__PURE__ */ s("li", { children: /* @__PURE__ */ e(
|
|
320
328
|
"a",
|
|
321
329
|
{
|
|
@@ -326,8 +334,8 @@ function ys({ options: l = {} }) {
|
|
|
326
334
|
/* @__PURE__ */ s(
|
|
327
335
|
"span",
|
|
328
336
|
{
|
|
329
|
-
className: `ss-dash-secondary-list-value ss-dash-duration ${G(
|
|
330
|
-
children: S(
|
|
337
|
+
className: `ss-dash-secondary-list-value ss-dash-duration ${G(d.avgDuration)}`,
|
|
338
|
+
children: S(d.avgDuration)
|
|
331
339
|
}
|
|
332
340
|
)
|
|
333
341
|
]
|
|
@@ -354,12 +362,12 @@ function ys({ options: l = {} }) {
|
|
|
354
362
|
] }),
|
|
355
363
|
/* @__PURE__ */ e("div", { className: "ss-dash-secondary-card", children: [
|
|
356
364
|
/* @__PURE__ */ s("div", { className: "ss-dash-secondary-card-title", children: /* @__PURE__ */ s("a", { href: "#logs?level=error", className: "ss-dash-widget-link", children: "Recent Errors" }) }),
|
|
357
|
-
a.recentErrors.length === 0 ? /* @__PURE__ */ s("div", { className: "ss-dash-empty", style: { minHeight: "60px" }, children: "No recent errors" }) : /* @__PURE__ */ s("ul", { className: "ss-dash-secondary-list", children: a.recentErrors.map((
|
|
358
|
-
/* @__PURE__ */ s("span", { style: { color: "var(--ss-red-fg)" }, title:
|
|
359
|
-
|
|
360
|
-
|
|
365
|
+
a.recentErrors.length === 0 ? /* @__PURE__ */ s("div", { className: "ss-dash-empty", style: { minHeight: "60px" }, children: "No recent errors" }) : /* @__PURE__ */ s("ul", { className: "ss-dash-secondary-list", children: a.recentErrors.map((d, y) => /* @__PURE__ */ s("li", { children: /* @__PURE__ */ e("a", { href: `#logs?id=${d.id ?? ""}`, className: "ss-dash-widget-row-link", children: [
|
|
366
|
+
/* @__PURE__ */ s("span", { style: { color: "var(--ss-red-fg)" }, title: d.message, children: d.message }),
|
|
367
|
+
d.timestamp && /* @__PURE__ */ s(
|
|
368
|
+
os,
|
|
361
369
|
{
|
|
362
|
-
ts:
|
|
370
|
+
ts: d.timestamp,
|
|
363
371
|
className: "ss-dash-secondary-list-value",
|
|
364
372
|
style: { color: "var(--ss-dim)" }
|
|
365
373
|
}
|
|
@@ -368,8 +376,8 @@ function ys({ options: l = {} }) {
|
|
|
368
376
|
] }),
|
|
369
377
|
/* @__PURE__ */ e("div", { className: "ss-dash-secondary-card", children: [
|
|
370
378
|
/* @__PURE__ */ s("div", { className: "ss-dash-secondary-card-title", children: /* @__PURE__ */ s("a", { href: "#events", className: "ss-dash-widget-link", children: "Top Events" }) }),
|
|
371
|
-
a.topEvents.length === 0 ? /* @__PURE__ */ s("div", { className: "ss-dash-empty", style: { minHeight: "60px" }, children: "No events yet" }) : /* @__PURE__ */ s("ul", { className: "ss-dash-secondary-list", children: a.topEvents.slice(0, 5).map((
|
|
372
|
-
const h =
|
|
379
|
+
a.topEvents.length === 0 ? /* @__PURE__ */ s("div", { className: "ss-dash-empty", style: { minHeight: "60px" }, children: "No events yet" }) : /* @__PURE__ */ s("ul", { className: "ss-dash-secondary-list", children: a.topEvents.slice(0, 5).map((d, y) => {
|
|
380
|
+
const h = is(d);
|
|
373
381
|
return /* @__PURE__ */ s("li", { children: /* @__PURE__ */ e(
|
|
374
382
|
"a",
|
|
375
383
|
{
|
|
@@ -377,7 +385,7 @@ function ys({ options: l = {} }) {
|
|
|
377
385
|
className: "ss-dash-widget-row-link",
|
|
378
386
|
children: [
|
|
379
387
|
/* @__PURE__ */ s("span", { children: h }),
|
|
380
|
-
/* @__PURE__ */ s("span", { className: "ss-dash-secondary-list-value", children:
|
|
388
|
+
/* @__PURE__ */ s("span", { className: "ss-dash-secondary-list-value", children: d.count })
|
|
381
389
|
]
|
|
382
390
|
}
|
|
383
391
|
) }, y);
|
|
@@ -499,8 +507,8 @@ function ys({ options: l = {} }) {
|
|
|
499
507
|
] }),
|
|
500
508
|
/* @__PURE__ */ e("div", { className: "ss-dash-secondary-card", children: [
|
|
501
509
|
/* @__PURE__ */ s("div", { className: "ss-dash-secondary-card-title", children: /* @__PURE__ */ s("a", { href: "#queries", className: "ss-dash-widget-link", children: "Slowest Queries" }) }),
|
|
502
|
-
a.slowestQueries.length === 0 ? /* @__PURE__ */ s("div", { className: "ss-dash-empty", style: { minHeight: "60px" }, children: "No query data yet" }) : /* @__PURE__ */ s("ul", { className: "ss-dash-secondary-list", children: a.slowestQueries.slice(0, 5).map((
|
|
503
|
-
const h =
|
|
510
|
+
a.slowestQueries.length === 0 ? /* @__PURE__ */ s("div", { className: "ss-dash-empty", style: { minHeight: "60px" }, children: "No query data yet" }) : /* @__PURE__ */ s("ul", { className: "ss-dash-secondary-list", children: a.slowestQueries.slice(0, 5).map((d, y) => {
|
|
511
|
+
const h = ns(d) || "-";
|
|
504
512
|
return /* @__PURE__ */ s("li", { children: /* @__PURE__ */ e(
|
|
505
513
|
"a",
|
|
506
514
|
{
|
|
@@ -511,8 +519,8 @@ function ys({ options: l = {} }) {
|
|
|
511
519
|
/* @__PURE__ */ s(
|
|
512
520
|
"span",
|
|
513
521
|
{
|
|
514
|
-
className: `ss-dash-secondary-list-value ss-dash-duration ${G(
|
|
515
|
-
children: S(
|
|
522
|
+
className: `ss-dash-secondary-list-value ss-dash-duration ${G(d.avgDuration)}`,
|
|
523
|
+
children: S(d.avgDuration)
|
|
516
524
|
}
|
|
517
525
|
)
|
|
518
526
|
]
|
|
@@ -524,6 +532,6 @@ function ys({ options: l = {} }) {
|
|
|
524
532
|
] });
|
|
525
533
|
}
|
|
526
534
|
export {
|
|
527
|
-
|
|
528
|
-
|
|
535
|
+
ws as OverviewSection,
|
|
536
|
+
ws as default
|
|
529
537
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as f, jsxs as T } from "react/jsx-runtime";
|
|
2
2
|
import { useState as S, useRef as V, useCallback as i, useEffect as q, useMemo as b } from "react";
|
|
3
3
|
import { QueriesController as F, resolveField as l, computeDashboardQuerySummary as O } from "adonisjs-server-stats/core";
|
|
4
|
-
import { a as P } from "./index-
|
|
4
|
+
import { a as P } from "./index-LlFvooUN.js";
|
|
5
5
|
import { Q as R } from "./QueriesContent-BDIx8zFn.js";
|
|
6
6
|
function K({ options: $ = {} }) {
|
|
7
7
|
const [y, d] = S(1), t = V(new F("list")), [x, D] = S(t.current.state), o = i(() => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as S, jsxs as w, Fragment as L } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as M, useState as R, useCallback as o, useMemo as l } from "react";
|
|
3
3
|
import { QueriesController as q, filterQueries as z, countDuplicateQueries as A, computeQuerySummary as B, formatDuration as F } from "adonisjs-server-stats/core";
|
|
4
|
-
import { u as U } from "./index-
|
|
4
|
+
import { u as U } from "./index-LlFvooUN.js";
|
|
5
5
|
import { Q as _ } from "./QueriesContent-BDIx8zFn.js";
|
|
6
6
|
function V({ options: m }) {
|
|
7
7
|
const { baseUrl: d = "", debugEndpoint: g = "/admin/api/debug", authToken: c } = m || {}, { data: u, isLoading: Q, error: h } = U("queries", m), e = M(new q("list")), [f, $] = R(e.current.state), n = o(() => {
|
|
@@ -3,8 +3,8 @@ import { useMemo as R, useState as g, useRef as W, useEffect as L, useCallback a
|
|
|
3
3
|
import { normalizeTraceFields as z, resolveStatusCode as G, resolveDuration as I, durationClassName as U, resolveSpanCount as Y, resolveWarningCount as K, resolveTimestamp as V } from "adonisjs-server-stats/core";
|
|
4
4
|
import { T as H } from "./TimeAgoCell-o3KigGfM.js";
|
|
5
5
|
import { u as J } from "./useApiClient-CtEG7rHs.js";
|
|
6
|
-
import { a as Q, M as A, S as F } from "./index-
|
|
7
|
-
import { S as X, R as Z } from "./SplitPaneWrapper-
|
|
6
|
+
import { a as Q, M as A, S as F } from "./index-LlFvooUN.js";
|
|
7
|
+
import { S as X, R as Z } from "./SplitPaneWrapper-DQvJnsuk.js";
|
|
8
8
|
import { D as ee } from "./DataTable-YyShr5B-.js";
|
|
9
9
|
import { F as te } from "./FilterBar-CQ7bD669.js";
|
|
10
10
|
import { P as se } 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-LlFvooUN.js";
|
|
4
4
|
import { D as w } from "./DataTable-YyShr5B-.js";
|
|
5
5
|
import { F as b } from "./FilterBar-CQ7bD669.js";
|
|
6
6
|
function A({ options: n = {} }) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e, jsxs as d } from "react/jsx-runtime";
|
|
2
2
|
import { useState as g, useMemo as p } from "react";
|
|
3
|
-
import { u as b, M as f } from "./index-
|
|
3
|
+
import { u as b, M as f } from "./index-LlFvooUN.js";
|
|
4
4
|
import { u as w } from "./useResizableTable-CNJmACdt.js";
|
|
5
5
|
import { F as N } from "./FilterBar-CQ7bD669.js";
|
|
6
6
|
function R({ options: o, currentPath: n }) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as c, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { useState as d, useRef as o, useEffect as u } from "react";
|
|
3
|
-
import { L as p } from "./LogEntryRow-
|
|
3
|
+
import { L as p } from "./LogEntryRow-Cn8Ee_X0.js";
|
|
4
4
|
import { initSplitPane as f } from "adonisjs-server-stats/core";
|
|
5
5
|
function v({ logs: n, onReqIdClick: a }) {
|
|
6
6
|
const [t, s] = d(null);
|
|
@@ -2,11 +2,11 @@ import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as i, useMemo as q, useEffect as I, useCallback as O } from "react";
|
|
3
3
|
import { formatDuration as m, durationClassName as j } from "adonisjs-server-stats/core";
|
|
4
4
|
import { u as U } from "./useApiClient-CtEG7rHs.js";
|
|
5
|
-
import { u as W, M as D, S as L } from "./index-
|
|
5
|
+
import { u as W, M as D, S as L } from "./index-LlFvooUN.js";
|
|
6
6
|
import { T as _ } from "./TimeAgoCell-o3KigGfM.js";
|
|
7
7
|
import { u as z } from "./useResizableTable-CNJmACdt.js";
|
|
8
8
|
import { F as G } from "./FilterBar-CQ7bD669.js";
|
|
9
|
-
import { S as K, R as V } from "./SplitPaneWrapper-
|
|
9
|
+
import { S as K, R as V } from "./SplitPaneWrapper-DQvJnsuk.js";
|
|
10
10
|
const S = {
|
|
11
11
|
request: "#1e3a5f",
|
|
12
12
|
middleware: "rgba(30, 58, 95, 0.7)",
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OverviewMetrics } from '../../../core/types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Shared `overview` poller data, provided by {@link DashboardPage} so the
|
|
4
|
+
* sidebar badges and {@link OverviewSection} read from a single poller
|
|
5
|
+
* instead of running two concurrent 5s pollers against the same endpoint.
|
|
6
|
+
*
|
|
7
|
+
* `undefined` (the default) means no provider is present — consumers fall
|
|
8
|
+
* back to their own `useDashboardData` call so a section still works when
|
|
9
|
+
* mounted standalone.
|
|
10
|
+
*/
|
|
11
|
+
export interface OverviewDataContextValue {
|
|
12
|
+
data: OverviewMetrics | null;
|
|
13
|
+
isLoading: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const OverviewDataContext: import('react').Context<OverviewDataContextValue | undefined>;
|
|
@@ -2,5 +2,14 @@ import { DashboardHookOptions } from '../../../../core/types.js';
|
|
|
2
2
|
interface OverviewSectionProps {
|
|
3
3
|
options?: DashboardHookOptions;
|
|
4
4
|
}
|
|
5
|
+
/**
|
|
6
|
+
* Reuses the shared `overview` poller provided by DashboardPage (used for the
|
|
7
|
+
* sidebar badges) so the dashboard doesn't run a second concurrent poller
|
|
8
|
+
* against the same endpoint. Falls back to its own poller — via
|
|
9
|
+
* {@link OverviewSectionStandalone} — when rendered without a provider (e.g.
|
|
10
|
+
* mounted standalone outside DashboardPage). The conditional is on which
|
|
11
|
+
* component renders, not which hooks run, so each component's hooks stay
|
|
12
|
+
* unconditional.
|
|
13
|
+
*/
|
|
5
14
|
export declare function OverviewSection({ options }: OverviewSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
6
15
|
export default OverviewSection;
|