adonisjs-server-stats 1.10.3 → 1.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/field-resolvers.d.ts +64 -0
- package/dist/core/formatters.d.ts +15 -0
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +208 -203
- package/dist/react/CacheSection-BYN53kYO.js +135 -0
- package/dist/react/CacheStatsBar-CRodCOeP.js +27 -0
- package/dist/react/CacheTab-DOhuK05d.js +106 -0
- package/dist/react/{ConfigSection-DGgqjAal.js → ConfigSection-B9EHh4Rp.js} +1 -1
- package/dist/react/{ConfigTab-H3OnYqmK.js → ConfigTab-C8kriE2b.js} +1 -1
- package/dist/react/CustomPaneTab-CvzQS_Wh.js +99 -0
- package/dist/react/EmailPreviewOverlay-BmXOAvqG.js +58 -0
- package/dist/react/EmailsSection-BJyFJf7A.js +226 -0
- package/dist/react/EmailsTab-Ch8jp10B.js +110 -0
- package/dist/react/{EventsSection-C7RQW_LY.js → EventsSection-DJPwHeT8.js} +27 -26
- package/dist/react/EventsTab-B-FoehXC.js +58 -0
- package/dist/react/{InternalsContent-DBzsI0CG.js → InternalsContent-O8ino9oM.js} +133 -109
- package/dist/react/InternalsSection-B6VlVx5f.js +22 -0
- package/dist/react/InternalsTab-CkEKpRMU.js +17 -0
- package/dist/react/JobStatsBar-C7RslAFE.js +30 -0
- package/dist/react/JobsSection-DWF4i1t_.js +167 -0
- package/dist/react/JobsTab-DqnifQXV.js +129 -0
- package/dist/react/LogEntryRow-CMMkqA9M.js +43 -0
- package/dist/react/LogsSection-C1xC5aP4.js +198 -0
- package/dist/react/LogsTab-CS4sLfLw.js +79 -0
- package/dist/react/{OverviewSection-ABP9ueBo.js → OverviewSection-CxvfOR0v.js} +70 -80
- package/dist/react/QueriesSection-CrMdU5Ax.js +458 -0
- package/dist/react/{QueriesTab-BQzcxEiW.js → QueriesTab-x85PjkyS.js} +22 -21
- package/dist/react/RequestsSection-DETN9oZb.js +321 -0
- package/dist/react/{RoutesSection-BRhxrtjZ.js → RoutesSection-CmorkJeC.js} +1 -1
- package/dist/react/{RoutesTab-CpYH5lUw.js → RoutesTab-CbzBOzpc.js} +12 -12
- package/dist/react/SplitPaneWrapper-BiIgT4ND.js +49 -0
- package/dist/react/TimeAgoCell-o3KigGfM.js +8 -0
- package/dist/react/{TimelineTab-DjLR35Ce.js → TimelineTab-Ue9tUD_n.js} +71 -91
- package/dist/react/{index-CsImORX6.js → index-DwDK-4oX.js} +4 -4
- package/dist/react/index.js +6 -6
- package/dist/react/react/components/shared/CacheStatsBar.d.ts +13 -0
- package/dist/react/react/components/shared/EmailPreviewOverlay.d.ts +29 -0
- package/dist/react/react/components/shared/JobStatsBar.d.ts +12 -0
- package/dist/react/react/components/shared/LogEntryRow.d.ts +9 -0
- package/dist/react/react/components/shared/RelatedLogs.d.ts +2 -2
- package/dist/react/react/components/shared/SplitPaneWrapper.d.ts +7 -0
- package/dist/react/react/components/shared/TimeAgoCell.d.ts +17 -0
- package/dist/react/react/hooks/useDiagnosticsData.d.ts +14 -0
- package/dist/react/style.css +1 -1
- package/dist/src/edge/client/dashboard.js +2 -2
- package/dist/src/edge/client/debug-panel-deferred.js +1 -1
- package/dist/src/edge/client-vue/dashboard.js +3 -3
- package/dist/src/edge/client-vue/debug-panel-deferred.js +4 -4
- package/dist/src/styles/components.css +67 -0
- package/dist/src/styles/dashboard.css +5 -15
- package/dist/src/styles/debug-panel.css +1 -22
- package/dist/src/styles/utilities.css +3 -1
- package/dist/vue/{CacheSection-ITqvpfH5.js → CacheSection-DT2Mwf_s.js} +1 -1
- package/dist/vue/{ConfigSection-DTn3GslE.js → ConfigSection-BwKwS9lh.js} +1 -1
- package/dist/vue/CustomPaneTab-Hr1IBHfz.js +172 -0
- package/dist/vue/{EmailsSection-DtLJ4XoS.js → EmailsSection-B65g0FVS.js} +1 -1
- package/dist/vue/{EventsSection-BOYYz0Ty.js → EventsSection-CxqtVF-o.js} +1 -1
- package/dist/vue/{JobsSection-BazTxcJL.js → JobsSection-rMIyMb-g.js} +1 -1
- package/dist/vue/{LogsSection-D55PjTKX.js → LogsSection-DmmZVJ7D.js} +1 -1
- package/dist/vue/{OverviewSection-1uBKo-Tu.js → OverviewSection-BMabyqw-.js} +49 -50
- package/dist/vue/{QueriesSection-rpoZ4ogd.js → QueriesSection-BfDFwGqH.js} +44 -45
- package/dist/vue/{QueriesTab-C8_7oprC.js → QueriesTab-DuTG7cpC.js} +30 -31
- package/dist/vue/RelatedLogs.vue_vue_type_script_setup_true_lang-Py1iu9GU.js +77 -0
- package/dist/vue/{RequestsSection-x7LvT0MC.js → RequestsSection-CTu4jPZ_.js} +143 -147
- package/dist/vue/{RoutesSection-CCD0zZqQ.js → RoutesSection-zQZDedL7.js} +1 -1
- package/dist/vue/TimelineTab-DHfXsX7t.js +334 -0
- package/dist/vue/components/shared/RelatedLogs.vue.d.ts +1 -4
- package/dist/vue/{index-C8MxnS7Q.js → index-CM3yNVUR.js} +2 -2
- package/dist/vue/index.js +1 -1
- package/dist/vue/style.css +1 -1
- package/package.json +7 -7
- package/dist/react/CacheSection-baMZotSn.js +0 -146
- package/dist/react/CacheTab-2cw_rMzj.js +0 -117
- package/dist/react/CustomPaneTab-B6r7ha0u.js +0 -98
- package/dist/react/EmailsSection-C-UZISG-.js +0 -262
- package/dist/react/EmailsTab-DbK4Eobn.js +0 -139
- package/dist/react/EventsTab-CfVr7AiM.js +0 -57
- package/dist/react/InternalsSection-t7ihcWO-.js +0 -32
- package/dist/react/InternalsTab-Oij0A2fN.js +0 -30
- package/dist/react/JobsSection-CQHNK_Ls.js +0 -187
- package/dist/react/JobsTab-znzf6jzk.js +0 -153
- package/dist/react/LogsSection-Dmm3rE2B.js +0 -233
- package/dist/react/LogsTab-D8unMV5P.js +0 -108
- package/dist/react/QueriesSection-CnmSkznA.js +0 -461
- package/dist/react/RelatedLogs-3A8RuGKH.js +0 -52
- package/dist/react/RequestsSection-kW79_M7k.js +0 -341
- package/dist/vue/CustomPaneTab-BJxT5Dp7.js +0 -172
- package/dist/vue/RelatedLogs.vue_vue_type_script_setup_true_lang-CB2_TzYW.js +0 -84
- package/dist/vue/TimelineTab-zj5Z5OdT.js +0 -338
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx as s, jsxs as e } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { formatDuration as
|
|
4
|
-
import { a as
|
|
5
|
-
|
|
2
|
+
import { useState as T, useRef as P, useEffect as ss, useCallback as O } from "react";
|
|
3
|
+
import { resolveMetric as k, formatDuration as S, durationClassName as U, resolveEventName as es, resolveNormalizedSql as as } from "adonisjs-server-stats/core";
|
|
4
|
+
import { a as z, b as M } from "./index-DwDK-4oX.js";
|
|
5
|
+
import { T as ls } from "./TimeAgoCell-o3KigGfM.js";
|
|
6
|
+
const rs = [
|
|
6
7
|
{ value: "5m", label: "5m" },
|
|
7
8
|
{ value: "15m", label: "15m" },
|
|
8
9
|
{ value: "30m", label: "30m" },
|
|
@@ -11,8 +12,8 @@ const ls = [
|
|
|
11
12
|
{ value: "24h", label: "24h" },
|
|
12
13
|
{ value: "7d", label: "7d" }
|
|
13
14
|
];
|
|
14
|
-
function
|
|
15
|
-
return /* @__PURE__ */ s("div", { className: `ss-dash-btn-group ${c}`, children:
|
|
15
|
+
function ts({ value: r, onChange: i, className: c = "" }) {
|
|
16
|
+
return /* @__PURE__ */ s("div", { className: `ss-dash-btn-group ${c}`, children: rs.map((n) => /* @__PURE__ */ s(
|
|
16
17
|
"button",
|
|
17
18
|
{
|
|
18
19
|
type: "button",
|
|
@@ -23,7 +24,7 @@ function rs({ value: r, onChange: i, className: c = "" }) {
|
|
|
23
24
|
n.value
|
|
24
25
|
)) });
|
|
25
26
|
}
|
|
26
|
-
function
|
|
27
|
+
function ds(r, i) {
|
|
27
28
|
if (r <= 0) return [0];
|
|
28
29
|
const c = r / i, n = Math.pow(10, Math.floor(Math.log10(c))), u = c / n;
|
|
29
30
|
let o;
|
|
@@ -32,7 +33,7 @@ function ts(r, i) {
|
|
|
32
33
|
for (let v = o; v <= r + o * 0.5; v += o) a.push(Math.round(v));
|
|
33
34
|
return a.length === 0 && a.push(Math.ceil(r)), a;
|
|
34
35
|
}
|
|
35
|
-
function
|
|
36
|
+
function I(r) {
|
|
36
37
|
try {
|
|
37
38
|
return new Date(r).toLocaleTimeString("en-US", {
|
|
38
39
|
hour12: !1,
|
|
@@ -43,7 +44,7 @@ function O(r) {
|
|
|
43
44
|
return "";
|
|
44
45
|
}
|
|
45
46
|
}
|
|
46
|
-
function
|
|
47
|
+
function G(r) {
|
|
47
48
|
if (r.length === 0) return "";
|
|
48
49
|
if (r.length === 1) return `M${r[0].x},${r[0].y}`;
|
|
49
50
|
let i = `M${r[0].x.toFixed(1)},${r[0].y.toFixed(1)}`;
|
|
@@ -53,37 +54,27 @@ function U(r) {
|
|
|
53
54
|
}
|
|
54
55
|
return i;
|
|
55
56
|
}
|
|
56
|
-
function
|
|
57
|
-
const i =
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
function ds({ chartPoints: r }) {
|
|
61
|
-
const i = { top: 12, right: 12, bottom: 28, left: 38 }, c = 220, n = X(null), [u, o] = E(0);
|
|
62
|
-
P(() => {
|
|
57
|
+
function is({ chartPoints: r }) {
|
|
58
|
+
const i = { top: 12, right: 12, bottom: 28, left: 38 }, c = 220, n = P(null), [u, o] = T(0);
|
|
59
|
+
ss(() => {
|
|
63
60
|
const d = n.current;
|
|
64
61
|
if (!d) return;
|
|
65
62
|
o(d.clientWidth);
|
|
66
63
|
const t = new ResizeObserver((w) => {
|
|
67
|
-
for (const
|
|
68
|
-
o(
|
|
64
|
+
for (const D of w)
|
|
65
|
+
o(D.contentRect.width);
|
|
69
66
|
});
|
|
70
67
|
return t.observe(d), () => t.disconnect();
|
|
71
68
|
}, []);
|
|
72
|
-
const a = u || 600, v = a - i.left - i.right, f = c - i.top - i.bottom, x = i.top + f, b = r.map((d) => {
|
|
73
|
-
const t = d;
|
|
74
|
-
return (d.requestCount ?? 0) + (Number(t.request_count) || 0) || d.total || 0;
|
|
75
|
-
}), y = r.map((d) => {
|
|
76
|
-
const t = d;
|
|
77
|
-
return (d.errorCount ?? 0) + (Number(t.error_count) || 0);
|
|
78
|
-
}), T = Math.max(...b, 1), g = Math.ceil(T * 1.1), N = y.some((d) => d > 0), k = ts(g, 4), M = k.length > 0 ? k[k.length - 1] : g, R = (d) => i.left + d / Math.max(r.length - 1, 1) * v, q = (d) => i.top + f - d / (M || 1) * f, l = r.map((d, t) => ({ x: R(t), y: q(b[t]) })), h = r.map((d, t) => ({ x: R(t), y: q(y[t]) })), m = U(l), L = N ? U(h) : "", F = l.length > 1 ? `${m} L${l[l.length - 1].x.toFixed(1)},${x} L${l[0].x.toFixed(1)},${x} Z` : "", j = N && h.length > 1 ? `${L} L${h[h.length - 1].x.toFixed(1)},${x} L${h[0].x.toFixed(1)},${x} Z` : "", G = Math.min(10, r.length), K = Math.max(1, Math.ceil(r.length / G)), [p, Q] = E({ visible: !1, x: 0, idx: -1 }), V = z(
|
|
69
|
+
const a = u || 600, v = a - i.left - i.right, f = c - i.top - i.bottom, x = i.top + f, b = r.map((d) => k(d, "requestCount", "request_count") || d.total || 0), N = r.map((d) => k(d, "errorCount", "error_count")), F = Math.max(...b, 1), g = Math.ceil(F * 1.1), y = N.some((d) => d > 0), R = ds(g, 4), C = R.length > 0 ? R[R.length - 1] : g, q = (d) => i.left + d / Math.max(r.length - 1, 1) * v, $ = (d) => i.top + f - d / (C || 1) * f, l = r.map((d, t) => ({ x: q(t), y: $(b[t]) })), h = r.map((d, t) => ({ x: q(t), y: $(N[t]) })), m = G(l), L = y ? G(h) : "", j = l.length > 1 ? `${m} L${l[l.length - 1].x.toFixed(1)},${x} L${l[0].x.toFixed(1)},${x} Z` : "", Q = y && h.length > 1 ? `${L} L${h[h.length - 1].x.toFixed(1)},${x} L${h[0].x.toFixed(1)},${x} Z` : "", K = Math.min(10, r.length), V = Math.max(1, Math.ceil(r.length / K)), [p, A] = T({ visible: !1, x: 0, idx: -1 }), Y = O(
|
|
79
70
|
(d) => {
|
|
80
71
|
const t = l[d].x;
|
|
81
|
-
|
|
72
|
+
A({ visible: !0, x: t, idx: d });
|
|
82
73
|
},
|
|
83
74
|
[l]
|
|
84
|
-
),
|
|
85
|
-
|
|
86
|
-
}, []), _ = 120,
|
|
75
|
+
), Z = O(() => {
|
|
76
|
+
A({ visible: !1, x: 0, idx: -1 });
|
|
77
|
+
}, []), _ = 120, J = p.visible ? Math.max(_ / 2, Math.min(p.x, a - _ / 2)) : 0;
|
|
87
78
|
return /* @__PURE__ */ e("div", { ref: n, style: { position: "relative" }, children: [
|
|
88
79
|
/* @__PURE__ */ e("svg", { viewBox: `0 0 ${a} ${c}`, className: "ss-dash-chart-svg", children: [
|
|
89
80
|
/* @__PURE__ */ e("defs", { children: [
|
|
@@ -96,8 +87,8 @@ function ds({ chartPoints: r }) {
|
|
|
96
87
|
/* @__PURE__ */ s("stop", { offset: "100%", stopColor: "var(--ss-red-fg)", stopOpacity: 0.02 })
|
|
97
88
|
] })
|
|
98
89
|
] }),
|
|
99
|
-
|
|
100
|
-
const t =
|
|
90
|
+
R.map((d) => {
|
|
91
|
+
const t = $(d);
|
|
101
92
|
return /* @__PURE__ */ e("g", { children: [
|
|
102
93
|
/* @__PURE__ */ s(
|
|
103
94
|
"line",
|
|
@@ -125,7 +116,7 @@ function ds({ chartPoints: r }) {
|
|
|
125
116
|
)
|
|
126
117
|
] }, `ytick-${d}`);
|
|
127
118
|
}),
|
|
128
|
-
|
|
119
|
+
j && /* @__PURE__ */ s("path", { d: j, fill: "url(#ss-cg-total)" }),
|
|
129
120
|
m && /* @__PURE__ */ s(
|
|
130
121
|
"path",
|
|
131
122
|
{
|
|
@@ -137,7 +128,7 @@ function ds({ chartPoints: r }) {
|
|
|
137
128
|
strokeLinecap: "round"
|
|
138
129
|
}
|
|
139
130
|
),
|
|
140
|
-
|
|
131
|
+
Q && /* @__PURE__ */ s("path", { d: Q, fill: "url(#ss-cg-error)" }),
|
|
141
132
|
L && /* @__PURE__ */ s(
|
|
142
133
|
"path",
|
|
143
134
|
{
|
|
@@ -151,59 +142,59 @@ function ds({ chartPoints: r }) {
|
|
|
151
142
|
}
|
|
152
143
|
),
|
|
153
144
|
r.map((d, t) => {
|
|
154
|
-
const w = b[t],
|
|
145
|
+
const w = b[t], D = N[t], E = l[t].x, X = l[t].y, W = v / (r.length || 1), H = p.visible && p.idx === t, B = p.visible && p.idx !== t;
|
|
155
146
|
return /* @__PURE__ */ e("g", { children: [
|
|
156
147
|
/* @__PURE__ */ s(
|
|
157
148
|
"rect",
|
|
158
149
|
{
|
|
159
|
-
x:
|
|
150
|
+
x: E - W / 2,
|
|
160
151
|
y: i.top,
|
|
161
|
-
width:
|
|
152
|
+
width: W,
|
|
162
153
|
height: f,
|
|
163
154
|
fill: "transparent",
|
|
164
155
|
className: "ss-dash-chart-hover-zone",
|
|
165
156
|
"data-idx": t,
|
|
166
|
-
onMouseEnter: () =>
|
|
167
|
-
onMouseLeave:
|
|
157
|
+
onMouseEnter: () => Y(t),
|
|
158
|
+
onMouseLeave: Z
|
|
168
159
|
}
|
|
169
160
|
),
|
|
170
161
|
w > 0 && /* @__PURE__ */ s(
|
|
171
162
|
"circle",
|
|
172
163
|
{
|
|
173
|
-
cx:
|
|
174
|
-
cy:
|
|
175
|
-
r:
|
|
164
|
+
cx: E,
|
|
165
|
+
cy: X,
|
|
166
|
+
r: H ? 4 : 2.5,
|
|
176
167
|
fill: "var(--ss-accent)",
|
|
177
168
|
stroke: "var(--ss-surface)",
|
|
178
169
|
strokeWidth: 1,
|
|
179
170
|
className: "ss-dash-chart-dot",
|
|
180
171
|
"data-idx": t,
|
|
181
|
-
opacity:
|
|
172
|
+
opacity: B ? 0.3 : 1
|
|
182
173
|
}
|
|
183
174
|
),
|
|
184
|
-
|
|
175
|
+
D > 0 && /* @__PURE__ */ s(
|
|
185
176
|
"circle",
|
|
186
177
|
{
|
|
187
|
-
cx:
|
|
178
|
+
cx: E,
|
|
188
179
|
cy: h[t].y,
|
|
189
|
-
r:
|
|
180
|
+
r: H ? 3.5 : 2,
|
|
190
181
|
fill: "var(--ss-red-fg)",
|
|
191
182
|
stroke: "var(--ss-surface)",
|
|
192
183
|
strokeWidth: 1,
|
|
193
184
|
className: "ss-dash-chart-dot ss-dash-chart-dot-err",
|
|
194
185
|
"data-idx": t,
|
|
195
|
-
opacity:
|
|
186
|
+
opacity: B ? 0.3 : 1
|
|
196
187
|
}
|
|
197
188
|
)
|
|
198
189
|
] }, t);
|
|
199
190
|
}),
|
|
200
191
|
r.map((d, t) => {
|
|
201
|
-
if (t %
|
|
202
|
-
const w =
|
|
192
|
+
if (t % V !== 0 && t !== r.length - 1) return null;
|
|
193
|
+
const w = I(d.bucket);
|
|
203
194
|
return w ? /* @__PURE__ */ s(
|
|
204
195
|
"text",
|
|
205
196
|
{
|
|
206
|
-
x:
|
|
197
|
+
x: q(t),
|
|
207
198
|
y: c - 6,
|
|
208
199
|
textAnchor: "middle",
|
|
209
200
|
fill: "var(--ss-dim)",
|
|
@@ -219,27 +210,27 @@ function ds({ chartPoints: r }) {
|
|
|
219
210
|
{
|
|
220
211
|
className: "ss-dash-chart-tooltip",
|
|
221
212
|
style: {
|
|
222
|
-
left:
|
|
213
|
+
left: J,
|
|
223
214
|
top: i.top - 4,
|
|
224
215
|
transform: "translate(-50%, -100%)"
|
|
225
216
|
},
|
|
226
217
|
children: [
|
|
227
|
-
/* @__PURE__ */ s("div", { children:
|
|
218
|
+
/* @__PURE__ */ s("div", { children: I(r[p.idx].bucket) }),
|
|
228
219
|
/* @__PURE__ */ e("div", { children: [
|
|
229
220
|
"Requests: ",
|
|
230
221
|
b[p.idx]
|
|
231
222
|
] }),
|
|
232
|
-
|
|
223
|
+
N[p.idx] > 0 && /* @__PURE__ */ e("div", { style: { color: "var(--ss-red-fg)" }, children: [
|
|
233
224
|
"Errors: ",
|
|
234
|
-
|
|
225
|
+
N[p.idx]
|
|
235
226
|
] })
|
|
236
227
|
]
|
|
237
228
|
}
|
|
238
229
|
)
|
|
239
230
|
] });
|
|
240
231
|
}
|
|
241
|
-
function
|
|
242
|
-
const [i, c] =
|
|
232
|
+
function us({ options: r = {} }) {
|
|
233
|
+
const [i, c] = T("1h"), { data: n, isLoading: u } = z("overview", r), { data: o } = z("overview/chart", {
|
|
243
234
|
...r,
|
|
244
235
|
timeRange: i
|
|
245
236
|
});
|
|
@@ -261,7 +252,7 @@ function hs({ options: r = {} }) {
|
|
|
261
252
|
jobQueueStatus: null,
|
|
262
253
|
statusDistribution: { "2xx": 0, "3xx": 0, "4xx": 0, "5xx": 0 },
|
|
263
254
|
slowestQueries: []
|
|
264
|
-
}, v = a, f =
|
|
255
|
+
}, v = a, f = k(v, "avgResponseTime", "avg_response_time"), x = k(v, "p95ResponseTime", "p95_response_time"), b = k(v, "requestsPerMinute", "requests_per_minute"), N = k(v, "errorRate", "error_rate"), g = k(v, "totalRequests", "total_requests") > 0, y = o?.buckets || [], R = a.sparklines?.avgResponseTime ?? y.map((l) => l.avgDuration ?? 0), C = a.sparklines?.p95ResponseTime ?? y.map((l) => l.p95Duration ?? 0), q = a.sparklines?.requestsPerMinute ?? y.map((l) => l.requestCount ?? 0), $ = a.sparklines?.errorRate ?? y.map((l) => l.errorCount ?? 0);
|
|
265
256
|
return /* @__PURE__ */ e("div", { className: "ss-dash-overview", children: [
|
|
266
257
|
/* @__PURE__ */ e("div", { className: "ss-dash-cards", children: [
|
|
267
258
|
/* @__PURE__ */ e("div", { className: "ss-dash-card", children: [
|
|
@@ -270,10 +261,10 @@ function hs({ options: r = {} }) {
|
|
|
270
261
|
"div",
|
|
271
262
|
{
|
|
272
263
|
className: `ss-dash-card-value ${g ? f > 500 ? "ss-dash-red" : f > 200 ? "ss-dash-amber" : "ss-dash-accent" : "ss-dash-dim"}`,
|
|
273
|
-
children: g ?
|
|
264
|
+
children: g ? S(f) : "-"
|
|
274
265
|
}
|
|
275
266
|
),
|
|
276
|
-
/* @__PURE__ */ s("div", { className: "ss-dash-sparkline", children: /* @__PURE__ */ s(
|
|
267
|
+
/* @__PURE__ */ s("div", { className: "ss-dash-sparkline", children: /* @__PURE__ */ s(M, { data: R, color: "#34d399", width: 160, height: 40 }) })
|
|
277
268
|
] }),
|
|
278
269
|
/* @__PURE__ */ e("div", { className: "ss-dash-card", children: [
|
|
279
270
|
/* @__PURE__ */ s("div", { className: "ss-dash-card-title", children: "P95 Response Time" }),
|
|
@@ -281,40 +272,40 @@ function hs({ options: r = {} }) {
|
|
|
281
272
|
"div",
|
|
282
273
|
{
|
|
283
274
|
className: `ss-dash-card-value ${g ? x > 500 ? "ss-dash-red" : x > 200 ? "ss-dash-amber" : "ss-dash-accent" : "ss-dash-dim"}`,
|
|
284
|
-
children: g ?
|
|
275
|
+
children: g ? S(x) : "-"
|
|
285
276
|
}
|
|
286
277
|
),
|
|
287
|
-
/* @__PURE__ */ s("div", { className: "ss-dash-sparkline", children: /* @__PURE__ */ s(
|
|
278
|
+
/* @__PURE__ */ s("div", { className: "ss-dash-sparkline", children: /* @__PURE__ */ s(M, { data: C, color: "#60a5fa", width: 160, height: 40 }) })
|
|
288
279
|
] }),
|
|
289
280
|
/* @__PURE__ */ e("div", { className: "ss-dash-card", children: [
|
|
290
281
|
/* @__PURE__ */ s("div", { className: "ss-dash-card-title", children: "Requests / min" }),
|
|
291
282
|
/* @__PURE__ */ s("div", { className: `ss-dash-card-value ${g ? "ss-dash-accent" : "ss-dash-dim"}`, children: g ? b.toFixed(1) : "-" }),
|
|
292
|
-
/* @__PURE__ */ s("div", { className: "ss-dash-sparkline", children: /* @__PURE__ */ s(
|
|
283
|
+
/* @__PURE__ */ s("div", { className: "ss-dash-sparkline", children: /* @__PURE__ */ s(M, { data: q, color: "#34d399", width: 160, height: 40 }) })
|
|
293
284
|
] }),
|
|
294
285
|
/* @__PURE__ */ e("div", { className: "ss-dash-card", children: [
|
|
295
286
|
/* @__PURE__ */ s("div", { className: "ss-dash-card-title", children: "Error Rate" }),
|
|
296
287
|
/* @__PURE__ */ s(
|
|
297
288
|
"div",
|
|
298
289
|
{
|
|
299
|
-
className: `ss-dash-card-value ${g ?
|
|
300
|
-
children: g ? `${
|
|
290
|
+
className: `ss-dash-card-value ${g ? N > 5 ? "ss-dash-red" : N > 1 ? "ss-dash-amber" : "ss-dash-accent" : "ss-dash-dim"}`,
|
|
291
|
+
children: g ? `${N.toFixed(1)}%` : "-"
|
|
301
292
|
}
|
|
302
293
|
),
|
|
303
|
-
/* @__PURE__ */ s("div", { className: "ss-dash-sparkline", children: /* @__PURE__ */ s(
|
|
294
|
+
/* @__PURE__ */ s("div", { className: "ss-dash-sparkline", children: /* @__PURE__ */ s(M, { data: $, color: "#f87171", width: 160, height: 40 }) })
|
|
304
295
|
] })
|
|
305
296
|
] }),
|
|
306
297
|
/* @__PURE__ */ e("div", { className: "ss-dash-chart-container", children: [
|
|
307
298
|
/* @__PURE__ */ e("div", { className: "ss-dash-chart-header", children: [
|
|
308
299
|
/* @__PURE__ */ s("span", { className: "ss-dash-chart-title", children: "Request Volume" }),
|
|
309
|
-
/* @__PURE__ */ s(
|
|
300
|
+
/* @__PURE__ */ s(ts, { value: i, onChange: c })
|
|
310
301
|
] }),
|
|
311
|
-
/* @__PURE__ */ s("div", { className: "ss-dash-chart", id: "ss-dash-chart-area", children:
|
|
302
|
+
/* @__PURE__ */ s("div", { className: "ss-dash-chart", id: "ss-dash-chart-area", children: y.length === 0 ? /* @__PURE__ */ s("div", { className: "ss-dash-empty", style: { minHeight: "120px" }, children: "No data for this range" }) : /* @__PURE__ */ s(is, { chartPoints: y }) }),
|
|
312
303
|
/* @__PURE__ */ e("div", { className: "ss-dash-chart-legend", id: "ss-dash-chart-legend", children: [
|
|
313
304
|
/* @__PURE__ */ e("span", { className: "ss-dash-chart-legend-item", children: [
|
|
314
305
|
/* @__PURE__ */ s("span", { className: "ss-dash-legend-dot", style: { background: "var(--ss-accent)" } }),
|
|
315
306
|
"Requests"
|
|
316
307
|
] }),
|
|
317
|
-
|
|
308
|
+
y.some((l) => (l.errorCount ?? 0) > 0) && /* @__PURE__ */ e("span", { className: "ss-dash-chart-legend-item", children: [
|
|
318
309
|
/* @__PURE__ */ s("span", { className: "ss-dash-legend-dot", style: { background: "var(--ss-red-fg)" } }),
|
|
319
310
|
"Errors"
|
|
320
311
|
] })
|
|
@@ -335,8 +326,8 @@ function hs({ options: r = {} }) {
|
|
|
335
326
|
/* @__PURE__ */ s(
|
|
336
327
|
"span",
|
|
337
328
|
{
|
|
338
|
-
className: `ss-dash-secondary-list-value ss-dash-duration ${
|
|
339
|
-
children:
|
|
329
|
+
className: `ss-dash-secondary-list-value ss-dash-duration ${U(l.avgDuration)}`,
|
|
330
|
+
children: S(l.avgDuration)
|
|
340
331
|
}
|
|
341
332
|
)
|
|
342
333
|
]
|
|
@@ -353,7 +344,7 @@ function hs({ options: r = {} }) {
|
|
|
353
344
|
] }),
|
|
354
345
|
/* @__PURE__ */ e("li", { children: [
|
|
355
346
|
/* @__PURE__ */ s("span", { children: "Avg Duration" }),
|
|
356
|
-
/* @__PURE__ */ s("span", { className: "ss-dash-secondary-list-value", children:
|
|
347
|
+
/* @__PURE__ */ s("span", { className: "ss-dash-secondary-list-value", children: S(a.queryStats.avgDuration) })
|
|
357
348
|
] }),
|
|
358
349
|
/* @__PURE__ */ e("li", { children: [
|
|
359
350
|
/* @__PURE__ */ s("span", { children: "Queries / Request" }),
|
|
@@ -366,12 +357,11 @@ function hs({ options: r = {} }) {
|
|
|
366
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((l, h) => /* @__PURE__ */ s("li", { children: /* @__PURE__ */ e("a", { href: `#logs?id=${l.id ?? ""}`, className: "ss-dash-widget-row-link", children: [
|
|
367
358
|
/* @__PURE__ */ s("span", { style: { color: "var(--ss-red-fg)" }, title: l.message, children: l.message }),
|
|
368
359
|
l.timestamp && /* @__PURE__ */ s(
|
|
369
|
-
|
|
360
|
+
ls,
|
|
370
361
|
{
|
|
362
|
+
ts: l.timestamp,
|
|
371
363
|
className: "ss-dash-secondary-list-value",
|
|
372
|
-
style: { color: "var(--ss-dim)" }
|
|
373
|
-
title: es(l.timestamp),
|
|
374
|
-
children: ss(l.timestamp)
|
|
364
|
+
style: { color: "var(--ss-dim)" }
|
|
375
365
|
}
|
|
376
366
|
)
|
|
377
367
|
] }) }, h)) })
|
|
@@ -379,7 +369,7 @@ function hs({ options: r = {} }) {
|
|
|
379
369
|
/* @__PURE__ */ e("div", { className: "ss-dash-secondary-card", children: [
|
|
380
370
|
/* @__PURE__ */ s("div", { className: "ss-dash-secondary-card-title", children: /* @__PURE__ */ s("a", { href: "#events", className: "ss-dash-widget-link", children: "Top Events" }) }),
|
|
381
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((l, h) => {
|
|
382
|
-
const m = l
|
|
372
|
+
const m = es(l);
|
|
383
373
|
return /* @__PURE__ */ s("li", { children: /* @__PURE__ */ e(
|
|
384
374
|
"a",
|
|
385
375
|
{
|
|
@@ -510,7 +500,7 @@ function hs({ options: r = {} }) {
|
|
|
510
500
|
/* @__PURE__ */ e("div", { className: "ss-dash-secondary-card", children: [
|
|
511
501
|
/* @__PURE__ */ s("div", { className: "ss-dash-secondary-card-title", children: /* @__PURE__ */ s("a", { href: "#queries", className: "ss-dash-widget-link", children: "Slowest Queries" }) }),
|
|
512
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((l, h) => {
|
|
513
|
-
const m = l
|
|
503
|
+
const m = as(l) || "-";
|
|
514
504
|
return /* @__PURE__ */ s("li", { children: /* @__PURE__ */ e(
|
|
515
505
|
"a",
|
|
516
506
|
{
|
|
@@ -521,8 +511,8 @@ function hs({ options: r = {} }) {
|
|
|
521
511
|
/* @__PURE__ */ s(
|
|
522
512
|
"span",
|
|
523
513
|
{
|
|
524
|
-
className: `ss-dash-secondary-list-value ss-dash-duration ${
|
|
525
|
-
children:
|
|
514
|
+
className: `ss-dash-secondary-list-value ss-dash-duration ${U(l.avgDuration)}`,
|
|
515
|
+
children: S(l.avgDuration)
|
|
526
516
|
}
|
|
527
517
|
)
|
|
528
518
|
]
|
|
@@ -534,6 +524,6 @@ function hs({ options: r = {} }) {
|
|
|
534
524
|
] });
|
|
535
525
|
}
|
|
536
526
|
export {
|
|
537
|
-
|
|
538
|
-
|
|
527
|
+
us as OverviewSection,
|
|
528
|
+
us as default
|
|
539
529
|
};
|