adonisjs-server-stats 1.6.5 → 1.6.12

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.
Files changed (95) hide show
  1. package/README.md +1 -0
  2. package/dist/core/api-client.d.ts.map +1 -1
  3. package/dist/core/dashboard-api.d.ts +2 -1
  4. package/dist/core/dashboard-api.d.ts.map +1 -1
  5. package/dist/core/dashboard-data-controller.d.ts +2 -0
  6. package/dist/core/dashboard-data-controller.d.ts.map +1 -1
  7. package/dist/core/debug-data-controller.d.ts +1 -0
  8. package/dist/core/debug-data-controller.d.ts.map +1 -1
  9. package/dist/core/history-buffer.d.ts.map +1 -1
  10. package/dist/core/index.js +405 -362
  11. package/dist/core/server-stats-controller.d.ts +1 -0
  12. package/dist/core/server-stats-controller.d.ts.map +1 -1
  13. package/dist/core/sparkline.d.ts.map +1 -1
  14. package/dist/core/trace-utils.d.ts +1 -1
  15. package/dist/react/core/api-client.d.ts.map +1 -1
  16. package/dist/react/core/dashboard-api.d.ts +2 -1
  17. package/dist/react/core/dashboard-api.d.ts.map +1 -1
  18. package/dist/react/core/dashboard-data-controller.d.ts +2 -0
  19. package/dist/react/core/dashboard-data-controller.d.ts.map +1 -1
  20. package/dist/react/core/debug-data-controller.d.ts +1 -0
  21. package/dist/react/core/debug-data-controller.d.ts.map +1 -1
  22. package/dist/react/core/history-buffer.d.ts.map +1 -1
  23. package/dist/react/core/server-stats-controller.d.ts +1 -0
  24. package/dist/react/core/server-stats-controller.d.ts.map +1 -1
  25. package/dist/react/core/sparkline.d.ts.map +1 -1
  26. package/dist/react/core/trace-utils.d.ts +1 -1
  27. package/dist/src/collectors/app_collector.d.ts.map +1 -1
  28. package/dist/src/collectors/db_pool_collector.d.ts.map +1 -1
  29. package/dist/src/collectors/http_collector.d.ts.map +1 -1
  30. package/dist/src/collectors/http_collector.js +3 -0
  31. package/dist/src/collectors/log_collector.d.ts.map +1 -1
  32. package/dist/src/collectors/log_collector.js +4 -0
  33. package/dist/src/collectors/redis_collector.d.ts.map +1 -1
  34. package/dist/src/controller/debug_controller.d.ts +3 -1
  35. package/dist/src/controller/debug_controller.d.ts.map +1 -1
  36. package/dist/src/controller/debug_controller.js +25 -20
  37. package/dist/src/dashboard/chart_aggregator.js +42 -41
  38. package/dist/src/dashboard/dashboard_controller.d.ts.map +1 -1
  39. package/dist/src/dashboard/dashboard_controller.js +7 -5
  40. package/dist/src/dashboard/dashboard_store.d.ts +61 -19
  41. package/dist/src/dashboard/dashboard_store.d.ts.map +1 -1
  42. package/dist/src/dashboard/dashboard_store.js +677 -474
  43. package/dist/src/dashboard/integrations/config_inspector.d.ts +4 -0
  44. package/dist/src/dashboard/integrations/config_inspector.d.ts.map +1 -1
  45. package/dist/src/dashboard/integrations/config_inspector.js +16 -2
  46. package/dist/src/dashboard/migrator.d.ts.map +1 -1
  47. package/dist/src/dashboard/migrator.js +27 -4
  48. package/dist/src/data/data_access.d.ts.map +1 -1
  49. package/dist/src/data/data_access.js +26 -6
  50. package/dist/src/debug/debug_store.d.ts.map +1 -1
  51. package/dist/src/debug/debug_store.js +17 -7
  52. package/dist/src/debug/email_collector.d.ts +2 -0
  53. package/dist/src/debug/email_collector.d.ts.map +1 -1
  54. package/dist/src/debug/email_collector.js +17 -13
  55. package/dist/src/debug/event_collector.d.ts +7 -1
  56. package/dist/src/debug/event_collector.d.ts.map +1 -1
  57. package/dist/src/debug/event_collector.js +46 -17
  58. package/dist/src/debug/query_collector.d.ts +12 -0
  59. package/dist/src/debug/query_collector.d.ts.map +1 -1
  60. package/dist/src/debug/query_collector.js +35 -5
  61. package/dist/src/debug/ring_buffer.d.ts +14 -0
  62. package/dist/src/debug/ring_buffer.d.ts.map +1 -1
  63. package/dist/src/debug/ring_buffer.js +48 -2
  64. package/dist/src/debug/trace_collector.d.ts +1 -0
  65. package/dist/src/debug/trace_collector.d.ts.map +1 -1
  66. package/dist/src/debug/trace_collector.js +4 -1
  67. package/dist/src/define_config.d.ts.map +1 -1
  68. package/dist/src/define_config.js +5 -1
  69. package/dist/src/edge/client/dashboard.js +2 -2
  70. package/dist/src/edge/client/debug-panel-deferred.js +1 -1
  71. package/dist/src/edge/client/debug-panel.js +1 -1
  72. package/dist/src/edge/client/stats-bar.js +1 -1
  73. package/dist/src/edge/client-vue/dashboard.js +5 -5
  74. package/dist/src/edge/client-vue/debug-panel-deferred.js +2 -2
  75. package/dist/src/edge/client-vue/debug-panel.js +2 -2
  76. package/dist/src/edge/client-vue/stats-bar.js +3 -3
  77. package/dist/src/engine/request_metrics.d.ts.map +1 -1
  78. package/dist/src/engine/request_metrics.js +33 -3
  79. package/dist/src/engine/stats_engine.d.ts.map +1 -1
  80. package/dist/src/engine/stats_engine.js +12 -2
  81. package/dist/src/log_stream/log_stream_provider.js +1 -1
  82. package/dist/src/log_stream/log_stream_service.d.ts +1 -0
  83. package/dist/src/log_stream/log_stream_service.d.ts.map +1 -1
  84. package/dist/src/log_stream/log_stream_service.js +13 -3
  85. package/dist/src/prometheus/prometheus_collector.d.ts +1 -1
  86. package/dist/src/prometheus/prometheus_collector.d.ts.map +1 -1
  87. package/dist/src/provider/server_stats_provider.d.ts.map +1 -1
  88. package/dist/src/provider/server_stats_provider.js +17 -31
  89. package/dist/src/stubs/config.stub +3 -0
  90. package/dist/src/types.d.ts +12 -0
  91. package/dist/src/types.d.ts.map +1 -1
  92. package/dist/src/utils/logger.d.ts +7 -5
  93. package/dist/src/utils/logger.d.ts.map +1 -1
  94. package/dist/src/utils/logger.js +27 -5
  95. package/package.json +6 -2
@@ -1,4 +1,4 @@
1
- class b extends Error {
1
+ class w extends Error {
2
2
  status;
3
3
  constructor(t = 403) {
4
4
  super(`Unauthorized (HTTP ${t})`), this.name = "UnauthorizedError", this.status = t;
@@ -11,7 +11,7 @@ class I extends Error {
11
11
  super(`API error (HTTP ${t})`), this.name = "ApiError", this.status = t, this.body = r;
12
12
  }
13
13
  }
14
- class w {
14
+ class T {
15
15
  baseUrl;
16
16
  authToken;
17
17
  constructor(t) {
@@ -36,8 +36,10 @@ class w {
36
36
  headers: i,
37
37
  credentials: this.authToken ? "omit" : "include"
38
38
  });
39
+ if (r?.signal?.aborted)
40
+ throw new DOMException("The operation was aborted.", "AbortError");
39
41
  if (s.status === 401 || s.status === 403)
40
- throw new b(s.status);
42
+ throw new w(s.status);
41
43
  if (!s.ok) {
42
44
  const o = await s.text().catch(() => "");
43
45
  throw new I(s.status, o);
@@ -82,7 +84,7 @@ class w {
82
84
  return this.fetch(t, { method: "DELETE" });
83
85
  }
84
86
  }
85
- async function O() {
87
+ async function _() {
86
88
  if (typeof window < "u" && window.Transmit && typeof window.Transmit == "function")
87
89
  return window.Transmit;
88
90
  try {
@@ -92,11 +94,11 @@ async function O() {
92
94
  return null;
93
95
  }
94
96
  }
95
- function _(e) {
97
+ function B(e) {
96
98
  let t = null, r = null, n = !1;
97
99
  return { subscribe: async () => {
98
100
  try {
99
- const o = await O();
101
+ const o = await _();
100
102
  if (!o)
101
103
  throw new Error(
102
104
  "Transmit client not available (neither window.Transmit nor @adonisjs/transmit-client)"
@@ -105,14 +107,14 @@ function _(e) {
105
107
  t = new o({
106
108
  baseUrl: e.baseUrl || window.location.origin,
107
109
  ...e.authToken ? {
108
- beforeSubscribe(a) {
110
+ beforeSubscribe(l) {
109
111
  return {
110
112
  headers: {
111
113
  Authorization: `Bearer ${e.authToken}`
112
114
  }
113
115
  };
114
116
  },
115
- beforeUnsubscribe(a) {
117
+ beforeUnsubscribe(l) {
116
118
  return {
117
119
  headers: {
118
120
  Authorization: `Bearer ${e.authToken}`
@@ -120,8 +122,8 @@ function _(e) {
120
122
  };
121
123
  }
122
124
  } : {}
123
- }), r = t.subscription(e.channelName), r.onMessage((a) => {
124
- n || e.onMessage(a);
125
+ }), r = t.subscription(e.channelName), r.onMessage((l) => {
126
+ n || e.onMessage(l);
125
127
  }), await r.create();
126
128
  } catch (o) {
127
129
  e.onError && e.onError(o);
@@ -134,9 +136,9 @@ function _(e) {
134
136
  }
135
137
  } };
136
138
  }
137
- function B(e) {
139
+ function H(e) {
138
140
  let t = !1;
139
- const r = _({
141
+ const r = B({
140
142
  baseUrl: e.baseUrl,
141
143
  channelName: e.channelName,
142
144
  authToken: e.authToken,
@@ -156,38 +158,38 @@ function B(e) {
156
158
  }
157
159
  };
158
160
  }
159
- const S = "ss-dash-theme", C = "ss-theme-change";
160
- function R() {
161
+ const v = "ss-dash-theme", M = "ss-theme-change";
162
+ function U() {
161
163
  if (typeof window > "u") return "light";
162
- const e = localStorage.getItem(S);
164
+ const e = localStorage.getItem(v);
163
165
  return e === "dark" || e === "light" ? e : window.matchMedia?.("(prefers-color-scheme: dark)").matches ? "dark" : "light";
164
166
  }
165
- function H(e) {
166
- typeof window > "u" || (localStorage.setItem(S, e), window.dispatchEvent(new CustomEvent(C, { detail: e })));
167
+ function N(e) {
168
+ typeof window > "u" || (localStorage.setItem(v, e), window.dispatchEvent(new CustomEvent(M, { detail: e })));
167
169
  }
168
- function Ae() {
169
- const t = R() === "dark" ? "light" : "dark";
170
- return H(t), t;
170
+ function $e() {
171
+ const t = U() === "dark" ? "light" : "dark";
172
+ return N(t), t;
171
173
  }
172
- function Le(e) {
174
+ function Ae(e) {
173
175
  if (typeof window > "u") return () => {
174
176
  };
175
177
  const t = (s) => {
176
178
  const o = s.detail;
177
179
  (o === "dark" || o === "light") && e(o);
178
180
  }, r = (s) => {
179
- if (s.key === S) {
181
+ if (s.key === v) {
180
182
  const o = s.newValue;
181
- e(o === "dark" || o === "light" ? o : R());
183
+ e(o === "dark" || o === "light" ? o : U());
182
184
  }
183
185
  }, n = window.matchMedia("(prefers-color-scheme: dark)"), i = (s) => {
184
- localStorage.getItem(S) || e(s.matches ? "dark" : "light");
186
+ localStorage.getItem(v) || e(s.matches ? "dark" : "light");
185
187
  };
186
- return window.addEventListener(C, t), window.addEventListener("storage", r), n.addEventListener("change", i), () => {
187
- window.removeEventListener(C, t), window.removeEventListener("storage", r), n.removeEventListener("change", i);
188
+ return window.addEventListener(M, t), window.addEventListener("storage", r), n.addEventListener("change", i), () => {
189
+ window.removeEventListener(M, t), window.removeEventListener("storage", r), n.removeEventListener("change", i);
188
190
  };
189
191
  }
190
- const f = {
192
+ const y = {
191
193
  color: "#34d399",
192
194
  fillOpacityTop: 0.25,
193
195
  fillOpacityBottom: 0.02,
@@ -196,64 +198,74 @@ const f = {
196
198
  height: 32,
197
199
  padding: 2
198
200
  };
199
- function N(e) {
200
- return { ...f, ...e };
201
+ function q(e) {
202
+ return { ...y, ...e };
201
203
  }
202
- function q(e, t = f.width, r = f.height, n = f.padding) {
204
+ function Le(e, t = y.width, r = y.height, n = y.padding) {
203
205
  if (e.length < 2) return null;
204
- const i = t - n * 2, s = r - n * 2, o = Math.min(...e), l = Math.max(...e) - o || 1;
205
- return e.map((y, h) => {
206
- const p = n + h / (e.length - 1) * i, u = n + s - (y - o) / l * s;
207
- return `${p.toFixed(1)},${u.toFixed(1)}`;
206
+ const i = t - n * 2, s = r - n * 2, o = Math.min(...e), a = Math.max(...e) - o || 1;
207
+ return e.map((m, d) => {
208
+ const f = n + d / (e.length - 1) * i, p = n + s - (m - o) / a * s;
209
+ return `${f.toFixed(1)},${p.toFixed(1)}`;
208
210
  }).join(" ");
209
211
  }
210
- function K(e, t = f.width, r = f.height, n = f.padding) {
212
+ function Re(e, t = y.width, r = y.height, n = y.padding) {
211
213
  if (e.length < 2) return null;
212
- const i = t - n * 2, s = r - n * 2, o = Math.min(...e), l = Math.max(...e) - o || 1, g = e.map((u, v) => {
213
- const T = n + v / (e.length - 1) * i, F = n + s - (u - o) / l * s;
214
- return `${T.toFixed(1)},${F.toFixed(1)}`;
215
- }), y = (n + i).toFixed(1), h = (n + s).toFixed(1), p = n.toFixed(1);
216
- return `M${g[0]} ` + g.slice(1).map((u) => `L${u}`).join(" ") + ` L${y},${h} L${p},${h} Z`;
214
+ const i = t - n * 2, s = r - n * 2, o = Math.min(...e), a = Math.max(...e) - o || 1, h = e.map((p, x) => {
215
+ const u = n + x / (e.length - 1) * i, E = n + s - (p - o) / a * s;
216
+ return `${u.toFixed(1)},${E.toFixed(1)}`;
217
+ }), m = (n + i).toFixed(1), d = (n + s).toFixed(1), f = n.toFixed(1);
218
+ return `M${h[0]} ` + h.slice(1).map((p) => `L${p}`).join(" ") + ` L${m},${d} L${f},${d} Z`;
217
219
  }
218
- let z = 0;
219
- function W() {
220
- return `ss-grad-${z++}`;
220
+ let K = 0;
221
+ function z() {
222
+ return `ss-grad-${K++}`;
221
223
  }
222
- function V(e) {
224
+ function W(e) {
223
225
  if (e.length === 0) return null;
224
- const t = Math.min(...e), r = Math.max(...e), n = e.reduce((i, s) => i + s, 0) / e.length;
225
- return { min: t, max: r, avg: n };
226
- }
227
- function Re(e, t) {
228
- const r = N(t), n = q(e, r.width, r.height, r.padding), i = K(e, r.width, r.height, r.padding);
229
- return !n || !i ? null : {
230
- points: n,
231
- areaPath: i,
232
- gradientId: W(),
226
+ let t = e[0], r = e[0], n = e[0];
227
+ for (let i = 1; i < e.length; i++) {
228
+ const s = e[i];
229
+ s < t && (t = s), s > r && (r = s), n += s;
230
+ }
231
+ return { min: t, max: r, avg: n / e.length };
232
+ }
233
+ function Ue(e, t) {
234
+ if (e.length < 2) return null;
235
+ const r = q(t), n = W(e), i = n.max - n.min || 1, s = r.width - r.padding * 2, o = r.height - r.padding * 2, l = r.padding, a = e.length, h = Array.from({ length: a });
236
+ for (let u = 0; u < a; u++) {
237
+ const E = l + u / (a - 1) * s, O = l + o - (e[u] - n.min) / i * o;
238
+ h[u] = `${E.toFixed(1)},${O.toFixed(1)}`;
239
+ }
240
+ const m = h.join(" "), d = (l + s).toFixed(1), f = (l + o).toFixed(1), p = l.toFixed(1), x = `M${h[0]} ` + h.slice(1).map((u) => `L${u}`).join(" ") + ` L${d},${f} L${p},${f} Z`;
241
+ return {
242
+ points: m,
243
+ areaPath: x,
244
+ gradientId: z(),
233
245
  options: r,
234
- stats: V(e)
246
+ stats: n
235
247
  };
236
248
  }
237
- const j = 5e3, G = 1e4, J = 3e3, Q = 100, X = 500;
238
- function Y(e) {
249
+ const V = 5e3, j = 1e4, G = 3e3, J = 100, Q = 500;
250
+ function X(e) {
239
251
  if (!e && e !== 0) return "-";
240
252
  const t = Math.floor(e), r = Math.floor(t / 86400), n = Math.floor(t % 86400 / 3600), i = Math.floor(t % 3600 / 60);
241
253
  return r > 0 ? `${r}d ${n}h` : n > 0 ? `${n}h ${i}m` : i > 0 ? `${i}m ${t % 60}s` : `${t}s`;
242
254
  }
243
- function M(e) {
255
+ function P(e) {
244
256
  const t = e / 1048576;
245
257
  return t >= 1024 ? `${(t / 1024).toFixed(1)}G` : `${t.toFixed(0)}M`;
246
258
  }
247
- function k(e) {
259
+ function $(e) {
248
260
  return e >= 1024 ? `${(e / 1024).toFixed(1)}G` : `${e.toFixed(1)}M`;
249
261
  }
250
- function Z(e) {
262
+ function Y(e) {
251
263
  return e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).toFixed(1)}K` : `${e}`;
252
264
  }
253
- function Ue(e) {
265
+ function De(e) {
254
266
  return e >= 1e3 ? `${(e / 1e3).toFixed(2)}s` : e >= 1 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`;
255
267
  }
256
- function De(e) {
268
+ function Fe(e) {
257
269
  if (!e) return "-";
258
270
  const t = typeof e == "string" ? new Date(e) : new Date(e);
259
271
  return Number.isNaN(t.getTime()) ? "-" : t.toLocaleTimeString("en-US", {
@@ -263,7 +275,7 @@ function De(e) {
263
275
  second: "2-digit"
264
276
  }) + "." + String(t.getMilliseconds()).padStart(3, "0");
265
277
  }
266
- function Fe(e) {
278
+ function Oe(e) {
267
279
  if (!e) return "-";
268
280
  const t = typeof e == "string" ? new Date(e).getTime() : e, r = Math.floor((Date.now() - t) / 1e3);
269
281
  return r < 0 ? "just now" : r < 60 ? `${r}s ago` : r < 3600 ? `${Math.floor(r / 60)}m ago` : r < 86400 ? `${Math.floor(r / 3600)}h ago` : `${Math.floor(r / 86400)}d ago`;
@@ -277,7 +289,7 @@ function Ie(e, t) {
277
289
  case "MB":
278
290
  return `${e.toFixed(1)}M`;
279
291
  case "bytes":
280
- return M(e);
292
+ return P(e);
281
293
  case "/s":
282
294
  case "/m":
283
295
  return e.toFixed(1);
@@ -285,40 +297,40 @@ function Ie(e, t) {
285
297
  return e.toFixed(1);
286
298
  }
287
299
  }
288
- function x(e, t, r) {
300
+ function S(e, t, r) {
289
301
  return e > r ? "red" : e > t ? "amber" : "green";
290
302
  }
291
- function ee(e, t, r) {
303
+ function Z(e, t, r) {
292
304
  return e < r ? "red" : e < t ? "amber" : "green";
293
305
  }
294
- function $(e, t) {
306
+ function A(e, t) {
295
307
  if (t === 0) return "green";
296
308
  const r = e / t;
297
309
  return r > 0.8 ? "red" : r > 0.5 ? "amber" : "green";
298
310
  }
299
- const te = {
311
+ const ee = {
300
312
  green: "ss-green",
301
313
  amber: "ss-amber",
302
314
  red: "ss-red"
303
- }, Oe = {
315
+ }, _e = {
304
316
  green: "#34d399",
305
317
  amber: "#fbbf24",
306
318
  red: "#f87171"
307
- }, _e = {
319
+ }, Be = {
308
320
  green: "--ss-accent",
309
321
  amber: "--ss-amber-fg",
310
322
  red: "--ss-red-fg"
311
323
  };
312
- function Be(e) {
313
- return e >= 500 ? "red" : e >= 400 ? "amber" : "green";
314
- }
315
324
  function He(e) {
316
- return e > X ? "very-slow" : e > Q ? "slow" : "normal";
325
+ return e >= 500 ? "red" : e >= 400 ? "amber" : "green";
317
326
  }
318
327
  function Ne(e) {
328
+ return e > Q ? "very-slow" : e > J ? "slow" : "normal";
329
+ }
330
+ function qe(e) {
319
331
  return e ? e.length <= 8 ? e : e.slice(0, 8) + "…" : "--";
320
332
  }
321
- function A(e, t = 100) {
333
+ function L(e, t = 100) {
322
334
  if (e === null) return "null";
323
335
  if (e === void 0) return "-";
324
336
  if (typeof e == "string")
@@ -326,7 +338,7 @@ function A(e, t = 100) {
326
338
  if (typeof e == "number" || typeof e == "boolean") return String(e);
327
339
  if (Array.isArray(e)) {
328
340
  if (e.length === 0) return "[]";
329
- const n = "[" + e.slice(0, 3).map((i) => A(i, 30)).join(", ") + (e.length > 3 ? ", ..." + e.length + " items" : "") + "]";
341
+ const n = "[" + e.slice(0, 3).map((i) => L(i, 30)).join(", ") + (e.length > 3 ? ", ..." + e.length + " items" : "") + "]";
330
342
  return n.length > t ? "[" + e.length + " items]" : n;
331
343
  }
332
344
  if (typeof e == "object") {
@@ -334,20 +346,20 @@ function A(e, t = 100) {
334
346
  if (r.length === 0) return "{}";
335
347
  const n = [];
336
348
  for (let s = 0; s < Math.min(r.length, 4); s++)
337
- n.push(r[s] + ": " + A(e[r[s]], 30));
349
+ n.push(r[s] + ": " + L(e[r[s]], 30));
338
350
  const i = "{ " + n.join(", ") + (r.length > 4 ? ", ...+" + (r.length - 4) : "") + " }";
339
351
  return i.length > t ? "{ " + r.slice(0, 6).join(", ") + (r.length > 6 ? ", ..." : "") + " }" : i;
340
352
  }
341
353
  return String(e);
342
354
  }
343
- function qe(e) {
355
+ function Ke(e) {
344
356
  return e < 0 ? "no expiry" : e < 60 ? `${e}s` : e < 3600 ? `${Math.floor(e / 60)}m` : e < 86400 ? `${Math.floor(e / 3600)}h` : `${Math.floor(e / 86400)}d`;
345
357
  }
346
- function Ke(e) {
358
+ function ze(e) {
347
359
  return e < 1024 ? `${e}B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)}KB` : `${(e / (1024 * 1024)).toFixed(1)}MB`;
348
360
  }
349
- const U = 50;
350
- function ze(e, t, r) {
361
+ const D = 50;
362
+ function We(e, t, r) {
351
363
  const n = new URLSearchParams();
352
364
  if (n.set("page", String(e.page)), n.set("perPage", String(e.perPage)), t) {
353
365
  t.search && n.set("search", t.search);
@@ -356,7 +368,7 @@ function ze(e, t, r) {
356
368
  }
357
369
  return r && (n.set("sort", r.field), n.set("direction", r.direction)), n.toString();
358
370
  }
359
- function We(e, t = U) {
371
+ function Ve(e, t = D) {
360
372
  const r = e.data ?? e.items ?? [], n = e.total ?? 0, i = e.page ?? 1, s = e.perPage ?? e.limit ?? t, o = e.totalPages ?? (Math.ceil(n / s) || 1);
361
373
  return {
362
374
  data: r,
@@ -368,7 +380,7 @@ function We(e, t = U) {
368
380
  }
369
381
  };
370
382
  }
371
- function Ve(e = U) {
383
+ function je(e = D) {
372
384
  return {
373
385
  page: 1,
374
386
  perPage: e,
@@ -376,23 +388,23 @@ function Ve(e = U) {
376
388
  totalPages: 1
377
389
  };
378
390
  }
379
- function je() {
391
+ function Ge() {
380
392
  return {
381
393
  search: "",
382
394
  filters: {}
383
395
  };
384
396
  }
385
- function Ge(e = "id", t = "desc") {
397
+ function Je(e = "id", t = "desc") {
386
398
  return { field: e, direction: t };
387
399
  }
388
- function re(e) {
400
+ function te(e) {
389
401
  const t = new URLSearchParams();
390
402
  if (e.page !== null && e.page !== void 0 && t.set("page", String(e.page)), e.perPage !== null && e.perPage !== void 0 && t.set("perPage", String(e.perPage)), e.search && t.set("search", e.search), e.sort && t.set("sort", e.sort), e.sortDir && t.set("direction", e.sortDir), e.timeRange && t.set("range", e.timeRange), e.filters)
391
403
  for (const [r, n] of Object.entries(e.filters))
392
404
  n && t.set(r, n);
393
405
  return t.toString();
394
406
  }
395
- function Je(e) {
407
+ function Qe(e) {
396
408
  const t = Math.max(1, Math.ceil(e.total / e.perPage)), r = Math.min(e.page, t), n = e.total === 0 ? 0 : (r - 1) * e.perPage + 1, i = Math.min(r * e.perPage, e.total);
397
409
  return {
398
410
  page: r,
@@ -405,7 +417,7 @@ function Je(e) {
405
417
  hasNext: r < t
406
418
  };
407
419
  }
408
- function Qe(e, t, r = 2) {
420
+ function Xe(e, t, r = 2) {
409
421
  if (t <= 1) return [1];
410
422
  const n = [], i = Math.max(2, e - r), s = Math.min(t - 1, e + r);
411
423
  n.push(1), i > 2 && n.push("...");
@@ -413,7 +425,7 @@ function Qe(e, t, r = 2) {
413
425
  n.push(o);
414
426
  return s < t - 1 && n.push("..."), t > 1 && n.push(t), n;
415
427
  }
416
- const D = "/admin/api/debug", ne = {
428
+ const F = "/admin/api/debug", re = {
417
429
  tracing: !1,
418
430
  process: !1,
419
431
  system: !1,
@@ -428,7 +440,7 @@ const D = "/admin/api/debug", ne = {
428
440
  dashboard: !1,
429
441
  customPanes: []
430
442
  };
431
- function se(e) {
443
+ function ne(e) {
432
444
  return {
433
445
  tracing: e.features?.tracing ?? !1,
434
446
  process: e.features?.process ?? !1,
@@ -445,37 +457,37 @@ function se(e) {
445
457
  customPanes: e.customPanes ?? []
446
458
  };
447
459
  }
448
- async function ie(e, t = D) {
460
+ async function se(e, t = F) {
449
461
  const r = `${t.replace(/\/+$/, "")}/config`;
450
462
  return e.fetch(r);
451
463
  }
452
- async function Xe(e) {
453
- const { baseUrl: t = "", debugEndpoint: r = D, authToken: n } = e, i = new w({ baseUrl: t, authToken: n });
464
+ async function Ye(e) {
465
+ const { baseUrl: t = "", debugEndpoint: r = F, authToken: n } = e, i = new T({ baseUrl: t, authToken: n });
454
466
  try {
455
- const s = await ie(i, r);
456
- return se(s);
467
+ const s = await se(i, r);
468
+ return ne(s);
457
469
  } catch {
458
- return ne;
470
+ return re;
459
471
  }
460
472
  }
461
- function Ye(e) {
473
+ function Ze(e) {
462
474
  const t = /* @__PURE__ */ new Set(), r = "features" in e && typeof e.features == "object" && e.features !== null ? e.features : e;
463
475
  return "process" in r && r.process && t.add("process"), ("process" in r && r.process || "system" in r && r.system) && t.add("memory"), "http" in r && r.http && t.add("http"), "db" in r && r.db && t.add("db"), "redis" in r && r.redis && t.add("redis"), "queues" in r && r.queues && t.add("queue"), "app" in r && r.app && t.add("app"), "log" in r && r.log && t.add("log"), t;
464
476
  }
465
- function Ze(e) {
477
+ function et(e) {
466
478
  const t = /* @__PURE__ */ new Set();
467
- return (c(e.cpuPercent) || c(e.uptime) || oe(e.nodeVersion)) && t.add("process"), (c(e.memHeapUsed) || c(e.memRss)) && t.add("memory"), (c(e.systemMemoryTotalMb) || c(e.systemMemoryFreeMb)) && t.add("memory"), (c(e.requestsPerSecond) || c(e.avgResponseTimeMs) || c(e.errorRate) || c(e.activeHttpConnections)) && t.add("http"), (c(e.dbPoolMax) || c(e.dbPoolUsed) || c(e.dbPoolFree) || c(e.dbPoolPending)) && t.add("db"), e.redisOk !== void 0 && e.redisOk !== null && t.add("redis"), (c(e.queueActive) || c(e.queueWaiting) || c(e.queueWorkerCount)) && t.add("queue"), (c(e.onlineUsers) || c(e.pendingWebhooks) || c(e.pendingEmails)) && t.add("app"), (c(e.logErrorsLast5m) || c(e.logEntriesPerMinute)) && t.add("log"), t;
479
+ return (c(e.cpuPercent) || c(e.uptime) || ie(e.nodeVersion)) && t.add("process"), (c(e.memHeapUsed) || c(e.memRss)) && t.add("memory"), (c(e.systemMemoryTotalMb) || c(e.systemMemoryFreeMb)) && t.add("memory"), (c(e.requestsPerSecond) || c(e.avgResponseTimeMs) || c(e.errorRate) || c(e.activeHttpConnections)) && t.add("http"), (c(e.dbPoolMax) || c(e.dbPoolUsed) || c(e.dbPoolFree) || c(e.dbPoolPending)) && t.add("db"), e.redisOk !== void 0 && e.redisOk !== null && t.add("redis"), (c(e.queueActive) || c(e.queueWaiting) || c(e.queueWorkerCount)) && t.add("queue"), (c(e.onlineUsers) || c(e.pendingWebhooks) || c(e.pendingEmails)) && t.add("app"), (c(e.logErrorsLast5m) || c(e.logEntriesPerMinute)) && t.add("log"), t;
468
480
  }
469
481
  function c(e) {
470
482
  return typeof e == "number" && !Number.isNaN(e);
471
483
  }
472
- function oe(e) {
484
+ function ie(e) {
473
485
  return typeof e == "string" && e.length > 0;
474
486
  }
475
- function d(e) {
476
- return te[e] || "";
487
+ function g(e) {
488
+ return ee[e] || "";
477
489
  }
478
- const P = [
490
+ const k = [
479
491
  // ── Process group ─────────────────────────────────────────────────────────
480
492
  // -- Node version ---------------------------------------------------------
481
493
  {
@@ -496,7 +508,7 @@ const P = [
496
508
  unit: "",
497
509
  group: "process",
498
510
  extract: (e) => e.uptime,
499
- format: (e) => Y(e.uptime),
511
+ format: (e) => X(e.uptime),
500
512
  color: () => ""
501
513
  },
502
514
  // -- CPU ------------------------------------------------------------------
@@ -510,7 +522,7 @@ const P = [
510
522
  critThreshold: 80,
511
523
  extract: (e) => e.cpuPercent,
512
524
  format: (e) => `${e.cpuPercent.toFixed(1)}%`,
513
- color: (e) => d(x(e.cpuPercent, 50, 80)),
525
+ color: (e) => g(S(e.cpuPercent, 50, 80)),
514
526
  historyKey: "cpuPercent"
515
527
  },
516
528
  // -- Event loop -----------------------------------------------------------
@@ -524,7 +536,7 @@ const P = [
524
536
  critThreshold: 50,
525
537
  extract: (e) => e.eventLoopLag,
526
538
  format: (e) => `${e.eventLoopLag.toFixed(1)}ms`,
527
- color: (e) => d(x(e.eventLoopLag, 20, 50)),
539
+ color: (e) => g(S(e.eventLoopLag, 20, 50)),
528
540
  historyKey: "eventLoopLag"
529
541
  },
530
542
  // ── Memory group ──────────────────────────────────────────────────────────
@@ -536,7 +548,7 @@ const P = [
536
548
  unit: "bytes",
537
549
  group: "memory",
538
550
  extract: (e) => e.memHeapUsed,
539
- format: (e) => M(e.memHeapUsed),
551
+ format: (e) => P(e.memHeapUsed),
540
552
  color: () => "",
541
553
  historyKey: "memHeapUsed"
542
554
  },
@@ -548,7 +560,7 @@ const P = [
548
560
  unit: "bytes",
549
561
  group: "memory",
550
562
  extract: (e) => e.memRss,
551
- format: (e) => M(e.memRss),
563
+ format: (e) => P(e.memRss),
552
564
  color: () => "",
553
565
  historyKey: "memRss"
554
566
  },
@@ -560,12 +572,12 @@ const P = [
560
572
  unit: "MB",
561
573
  group: "memory",
562
574
  extract: (e) => e.systemMemoryTotalMb - e.systemMemoryFreeMb,
563
- format: (e) => `${k(e.systemMemoryTotalMb - e.systemMemoryFreeMb)}/${k(e.systemMemoryTotalMb)}`,
575
+ format: (e) => `${$(e.systemMemoryTotalMb - e.systemMemoryFreeMb)}/${$(e.systemMemoryTotalMb)}`,
564
576
  color: (e) => {
565
577
  const t = e.systemMemoryTotalMb;
566
578
  if (t === 0) return "";
567
579
  const r = t - e.systemMemoryFreeMb;
568
- return d($(r, t));
580
+ return g(A(r, t));
569
581
  },
570
582
  historyKey: "_sysMemUsed",
571
583
  show: (e) => e.systemMemoryTotalMb !== null && e.systemMemoryTotalMb !== void 0
@@ -594,7 +606,7 @@ const P = [
594
606
  critThreshold: 500,
595
607
  extract: (e) => e.avgResponseTimeMs,
596
608
  format: (e) => `${e.avgResponseTimeMs.toFixed(0)}ms`,
597
- color: (e) => d(x(e.avgResponseTimeMs, 200, 500)),
609
+ color: (e) => g(S(e.avgResponseTimeMs, 200, 500)),
598
610
  historyKey: "avgResponseTimeMs"
599
611
  },
600
612
  // -- Error rate -----------------------------------------------------------
@@ -608,7 +620,7 @@ const P = [
608
620
  critThreshold: 5,
609
621
  extract: (e) => e.errorRate,
610
622
  format: (e) => `${e.errorRate.toFixed(1)}%`,
611
- color: (e) => d(x(e.errorRate, 1, 5)),
623
+ color: (e) => g(S(e.errorRate, 1, 5)),
612
624
  historyKey: "errorRate"
613
625
  },
614
626
  // -- Active connections ---------------------------------------------------
@@ -633,7 +645,7 @@ const P = [
633
645
  group: "db",
634
646
  extract: (e) => e.dbPoolUsed,
635
647
  format: (e) => `${e.dbPoolUsed}/${e.dbPoolFree}/${e.dbPoolMax}`,
636
- color: (e) => d($(e.dbPoolUsed, e.dbPoolMax)),
648
+ color: (e) => g(A(e.dbPoolUsed, e.dbPoolMax)),
637
649
  historyKey: "dbPoolUsed"
638
650
  },
639
651
  // ── Redis group ───────────────────────────────────────────────────────────
@@ -669,7 +681,7 @@ const P = [
669
681
  unit: "",
670
682
  group: "redis",
671
683
  extract: (e) => e.redisKeysCount,
672
- format: (e) => Z(e.redisKeysCount),
684
+ format: (e) => Y(e.redisKeysCount),
673
685
  color: () => "",
674
686
  historyKey: "redisKeysCount",
675
687
  show: (e) => e.redisOk
@@ -686,7 +698,7 @@ const P = [
686
698
  inverseThreshold: !0,
687
699
  extract: (e) => e.redisHitRate,
688
700
  format: (e) => `${e.redisHitRate.toFixed(0)}%`,
689
- color: (e) => d(ee(e.redisHitRate, 90, 70)),
701
+ color: (e) => g(Z(e.redisHitRate, 90, 70)),
690
702
  historyKey: "redisHitRate",
691
703
  show: (e) => e.redisOk
692
704
  },
@@ -777,18 +789,18 @@ const P = [
777
789
  historyKey: "logEntriesPerMinute"
778
790
  }
779
791
  ];
780
- function et(e) {
781
- return P.find((t) => t.id === e);
792
+ function tt(e) {
793
+ return k.find((t) => t.id === e);
782
794
  }
783
- function tt() {
795
+ function rt() {
784
796
  const e = /* @__PURE__ */ new Map();
785
- for (const t of P) {
797
+ for (const t of k) {
786
798
  const r = t.group || "core";
787
799
  e.has(r) || e.set(r, []), e.get(r).push(t);
788
800
  }
789
801
  return e;
790
802
  }
791
- const ae = 60, ce = 1e4, le = {
803
+ const oe = 60, ae = 1e4, le = {
792
804
  queries: "/queries",
793
805
  events: "/events",
794
806
  emails: "/emails",
@@ -800,10 +812,10 @@ const ae = 60, ce = 1e4, le = {
800
812
  config: "/config",
801
813
  internals: "/diagnostics"
802
814
  };
803
- function he(e) {
815
+ function ce(e) {
804
816
  return le[e] || `/${e}`;
805
817
  }
806
- const ue = {
818
+ const he = {
807
819
  overview: "/overview",
808
820
  requests: "/requests",
809
821
  queries: "/queries",
@@ -816,29 +828,45 @@ const ue = {
816
828
  jobs: "/jobs",
817
829
  config: "/config"
818
830
  };
819
- function de(e) {
820
- return ue[e] || `/${e}`;
831
+ function ue(e) {
832
+ return he[e] || `/${e}`;
821
833
  }
822
- function fe(e = ae) {
823
- const t = {};
834
+ function de(e = oe) {
835
+ const t = {}, r = {};
836
+ let n = !1;
837
+ function i(s) {
838
+ if (s.count === 0) return [];
839
+ const o = Array.from({ length: s.count }), l = s.count < e ? 0 : s.head;
840
+ for (let a = 0; a < s.count; a++)
841
+ o[a] = s.data[(l + a) % e];
842
+ return o;
843
+ }
824
844
  return {
825
- push(r) {
826
- for (const n of P) {
827
- const i = n.historyKey;
828
- if (!i) continue;
829
- const s = n.extract(r);
830
- typeof s == "number" && (t[i] || (t[i] = []), t[i].push(s), t[i].length > e && t[i].shift());
845
+ push(s) {
846
+ n = !1;
847
+ for (const o of k) {
848
+ const l = o.historyKey;
849
+ if (!l) continue;
850
+ const a = o.extract(s);
851
+ if (typeof a != "number") continue;
852
+ t[l] || (t[l] = { data: Array.from({ length: e }), head: 0, count: 0 });
853
+ const h = t[l];
854
+ h.data[h.head] = a, h.head = (h.head + 1) % e, h.count < e && h.count++;
831
855
  }
832
856
  },
833
- get(r) {
834
- return t[r] || [];
857
+ get(s) {
858
+ const o = t[s];
859
+ return o ? i(o) : [];
835
860
  },
836
861
  getAll() {
837
- return t;
862
+ if (n) return r;
863
+ for (const s of Object.keys(t))
864
+ r[s] = i(t[s]);
865
+ return n = !0, r;
838
866
  }
839
867
  };
840
868
  }
841
- class rt {
869
+ class nt {
842
870
  // -- Configuration --------------------------------------------------------
843
871
  baseUrl;
844
872
  endpoint;
@@ -862,11 +890,12 @@ class rt {
862
890
  staleTimer = null;
863
891
  lastSuccess = 0;
864
892
  unauthorized = !1;
893
+ stopped = !1;
865
894
  sseActive = !1;
866
895
  isConnected = !1;
867
896
  isStale = !1;
868
897
  constructor(t = {}) {
869
- this.baseUrl = t.baseUrl ?? "", this.endpoint = t.endpoint ?? "/admin/api/server-stats", this.channelName = t.channelName ?? "admin/server-stats", this.authToken = t.authToken, this.pollInterval = t.pollInterval ?? 3e3, this.onStatsUpdate = t.onStatsUpdate, this.onConnectionChange = t.onConnectionChange, this.onStaleChange = t.onStaleChange, this.onError = t.onError, this.onUnauthorizedChange = t.onUnauthorizedChange, this.onHistoryChange = t.onHistoryChange, this.onSseActiveChange = t.onSseActiveChange, this.onPollActiveChange = t.onPollActiveChange, this.historyBuffer = fe();
898
+ this.baseUrl = t.baseUrl ?? "", this.endpoint = t.endpoint ?? "/admin/api/server-stats", this.channelName = t.channelName ?? "admin/server-stats", this.authToken = t.authToken, this.pollInterval = t.pollInterval ?? 3e3, this.onStatsUpdate = t.onStatsUpdate, this.onConnectionChange = t.onConnectionChange, this.onStaleChange = t.onStaleChange, this.onError = t.onError, this.onUnauthorizedChange = t.onUnauthorizedChange, this.onHistoryChange = t.onHistoryChange, this.onSseActiveChange = t.onSseActiveChange, this.onPollActiveChange = t.onPollActiveChange, this.historyBuffer = de();
870
899
  }
871
900
  // -- Public API -----------------------------------------------------------
872
901
  /**
@@ -876,9 +905,10 @@ class rt {
876
905
  */
877
906
  start() {
878
907
  if (this.unauthorized) return;
908
+ this.stopped = !1;
879
909
  let t = !1;
880
910
  try {
881
- const r = B({
911
+ const r = H({
882
912
  baseUrl: this.baseUrl,
883
913
  channelName: this.channelName,
884
914
  authToken: this.authToken,
@@ -889,7 +919,7 @@ class rt {
889
919
  this.setSseActive(!0), this.setConnected(!0), this.stopPolling();
890
920
  },
891
921
  onDisconnect: () => {
892
- this.setSseActive(!1), this.setConnected(!1), !this.pollTimer && !this.unauthorized && this.startPollInterval();
922
+ this.setSseActive(!1), this.setConnected(!1), !this.pollTimer && !this.unauthorized && !this.stopped && this.startPollInterval();
893
923
  },
894
924
  onError: () => {
895
925
  t = !0;
@@ -903,21 +933,21 @@ class rt {
903
933
  this.startPollInterval();
904
934
  else {
905
935
  const r = setTimeout(() => {
906
- !this.isConnected && !this.pollTimer && this.startPollInterval();
936
+ !this.isConnected && !this.pollTimer && !this.stopped && this.startPollInterval();
907
937
  }, 3e3), n = this.sseHandle?.unsubscribe;
908
938
  this.sseHandle && (this.sseHandle.unsubscribe = () => {
909
939
  clearTimeout(r), n?.();
910
940
  });
911
941
  }
912
942
  this.staleTimer = setInterval(() => {
913
- this.lastSuccess > 0 && Date.now() - this.lastSuccess > ce && this.setStale(!0);
943
+ this.lastSuccess > 0 && Date.now() - this.lastSuccess > ae && this.setStale(!0);
914
944
  }, 2e3);
915
945
  }
916
946
  /**
917
947
  * Stop all timers and subscriptions. Call on unmount.
918
948
  */
919
949
  stop() {
920
- this.sseHandle?.unsubscribe(), this.sseHandle = null, this.stopPolling(), this.staleTimer && (clearInterval(this.staleTimer), this.staleTimer = null);
950
+ this.stopped = !0, this.sseHandle?.unsubscribe(), this.sseHandle = null, this.stopPolling(), this.staleTimer && (clearInterval(this.staleTimer), this.staleTimer = null);
921
951
  }
922
952
  /**
923
953
  * Get the history array for a single metric key.
@@ -945,18 +975,18 @@ class rt {
945
975
  /** Poll the HTTP endpoint once. */
946
976
  async poll() {
947
977
  if (!this.unauthorized) {
948
- this.client || (this.client = new w({ baseUrl: this.baseUrl, authToken: this.authToken }));
978
+ this.client || (this.client = new T({ baseUrl: this.baseUrl, authToken: this.authToken }));
949
979
  try {
950
980
  const t = await this.client.get(this.endpoint);
951
981
  this.processStats(t);
952
982
  } catch (t) {
953
- t instanceof b && (this.unauthorized = !0, this.onUnauthorizedChange?.(!0), this.onError?.(t), this.stopPolling());
983
+ t instanceof w && (this.unauthorized = !0, this.onUnauthorizedChange?.(!0), this.onError?.(t), this.stopPolling());
954
984
  }
955
985
  }
956
986
  }
957
987
  /** Start the poll interval timer. */
958
988
  startPollInterval() {
959
- this.pollTimer || (this.pollTimer = setInterval(() => this.poll(), this.pollInterval), this.onPollActiveChange?.(!0));
989
+ this.pollTimer || this.stopped || (this.pollTimer = setInterval(() => this.poll(), this.pollInterval), this.onPollActiveChange?.(!0));
960
990
  }
961
991
  /** Stop the poll interval timer. */
962
992
  stopPolling() {
@@ -975,7 +1005,7 @@ class rt {
975
1005
  this.isStale !== t && (this.isStale = t, this.onStaleChange?.(t));
976
1006
  }
977
1007
  }
978
- class pe {
1008
+ class fe {
979
1009
  constructor(t, r) {
980
1010
  this.client = t, this.basePath = r;
981
1011
  }
@@ -984,10 +1014,11 @@ class pe {
984
1014
  *
985
1015
  * @param section - Section identifier (e.g. `'overview'`, `'queries'`).
986
1016
  * @param queryString - Optional query string (without leading `?`).
1017
+ * @param init - Optional `RequestInit` overrides (e.g. `{ signal }`).
987
1018
  */
988
- async fetchSection(t, r) {
989
- const n = de(t), i = r ? `${this.basePath}${n}?${r}` : `${this.basePath}${n}`;
990
- return this.client.fetch(i);
1019
+ async fetchSection(t, r, n) {
1020
+ const i = ue(t), s = r ? `${this.basePath}${i}?${r}` : `${this.basePath}${i}`;
1021
+ return this.client.fetch(s, n);
991
1022
  }
992
1023
  /**
993
1024
  * Fetch chart time-series data for the overview section.
@@ -1055,7 +1086,7 @@ class pe {
1055
1086
  return this.client.fetch(`${this.basePath}/emails/${t}/preview`);
1056
1087
  }
1057
1088
  }
1058
- class nt {
1089
+ class st {
1059
1090
  // -- Dependencies ---------------------------------------------------------
1060
1091
  client;
1061
1092
  api;
@@ -1081,8 +1112,10 @@ class nt {
1081
1112
  hasFetched = !1;
1082
1113
  /** Whether the controller has been stopped (disposed). */
1083
1114
  stopped = !1;
1115
+ /** AbortController for the current in-flight fetch. */
1116
+ abortController = null;
1084
1117
  constructor(t) {
1085
- this.client = new w({ baseUrl: t.baseUrl, authToken: t.authToken }), this.api = new pe(this.client, t.endpoint), this.endpoint = t.endpoint, this.section = t.section, this.perPage = t.perPage, this.callbacks = t.callbacks;
1118
+ this.client = new T({ baseUrl: t.baseUrl, authToken: t.authToken }), this.api = new fe(this.client, t.endpoint), this.endpoint = t.endpoint, this.section = t.section, this.perPage = t.perPage, this.callbacks = t.callbacks;
1086
1119
  }
1087
1120
  // -- Public API -----------------------------------------------------------
1088
1121
  /**
@@ -1096,7 +1129,7 @@ class nt {
1096
1129
  * Outstanding in-flight responses will be discarded via fetchId.
1097
1130
  */
1098
1131
  stop() {
1099
- this.stopped = !0, this.stopRefreshTimer();
1132
+ this.stopped = !0, this.stopRefreshTimer(), this.abortController?.abort(), this.abortController = null;
1100
1133
  }
1101
1134
  /**
1102
1135
  * Perform a data fetch.
@@ -1106,30 +1139,35 @@ class nt {
1106
1139
  */
1107
1140
  async fetch(t = !0) {
1108
1141
  if (t && this.explicitFetchPending) return;
1109
- const r = ++this.fetchId, n = this.section;
1110
- if (!n) return;
1111
- const i = this.filters, s = this.sort ? this.sort.replace(/[A-Z]/g, (a) => "_" + a.toLowerCase()) : void 0, o = re({
1142
+ this.abortController?.abort();
1143
+ const r = new AbortController();
1144
+ this.abortController = r;
1145
+ const n = ++this.fetchId, i = this.section;
1146
+ if (!i) return;
1147
+ const s = this.filters, o = this.sort ? this.sort.replace(/[A-Z]/g, (a) => "_" + a.toLowerCase()) : void 0, l = te({
1112
1148
  page: this.page,
1113
1149
  perPage: this.perPage,
1114
1150
  search: this.search,
1115
- sort: s,
1151
+ sort: o,
1116
1152
  sortDir: this.sort ? this.sortDir : void 0,
1117
- filters: i && Object.keys(i).length > 0 ? i : void 0,
1118
- timeRange: n.startsWith("overview") ? this.timeRange : void 0
1153
+ filters: s && Object.keys(s).length > 0 ? s : void 0,
1154
+ timeRange: i.startsWith("overview") ? this.timeRange : void 0
1119
1155
  });
1120
1156
  t || (this.callbacks.onLoading(!0), this.explicitFetchPending = !0);
1121
1157
  try {
1122
- const a = await this.api.fetchSection(n, o || void 0);
1123
- if (r !== this.fetchId || this.stopped) return;
1158
+ const a = await this.api.fetchSection(i, l || void 0, {
1159
+ signal: r.signal
1160
+ });
1161
+ if (n !== this.fetchId || this.stopped) return;
1124
1162
  if (a && typeof a == "object" && a.data !== void 0 && a.meta !== void 0) {
1125
- const l = a;
1126
- this.callbacks.onData(l.data), this.callbacks.onPagination(l.meta);
1163
+ const h = a;
1164
+ this.callbacks.onData(h.data), this.callbacks.onPagination(h.meta);
1127
1165
  } else
1128
1166
  this.callbacks.onData(a), this.callbacks.onPagination(null);
1129
1167
  this.callbacks.onError(null), this.callbacks.onLoading(!1), this.hasFetched = !0;
1130
1168
  } catch (a) {
1131
- if (r !== this.fetchId || this.stopped) return;
1132
- if (a instanceof b) {
1169
+ if (a instanceof DOMException && a.name === "AbortError" || r.signal.aborted || n !== this.fetchId || this.stopped) return;
1170
+ if (a instanceof w) {
1133
1171
  this.callbacks.onError(a), this.callbacks.onLoading(!1), this.stopRefreshTimer(), this.callbacks.onUnauthorized();
1134
1172
  return;
1135
1173
  }
@@ -1228,14 +1266,14 @@ class nt {
1228
1266
  // -- Timer management (private) -------------------------------------------
1229
1267
  startRefreshTimer() {
1230
1268
  this.stopRefreshTimer();
1231
- const t = this.section === "overview" ? j : G;
1269
+ const t = this.section === "overview" ? V : j;
1232
1270
  this.timer = setInterval(() => this.fetch(!0), t);
1233
1271
  }
1234
1272
  stopRefreshTimer() {
1235
1273
  this.timer && (clearInterval(this.timer), this.timer = null);
1236
1274
  }
1237
1275
  }
1238
- const st = {
1276
+ const it = {
1239
1277
  // ---------------------------------------------------------------------------
1240
1278
  // Debug-panel tabs / Dashboard sidebar sections (shared)
1241
1279
  // ---------------------------------------------------------------------------
@@ -1427,8 +1465,8 @@ const st = {
1427
1465
  viewBox: "0 0 16 16",
1428
1466
  elements: ['<path d="M6 3H3v10h10v-3M9 1h6v6M7 9L15 1"/>']
1429
1467
  }
1430
- }, me = "ss-col-resize", L = "ss-resizing";
1431
- function it(e) {
1468
+ }, pe = "ss-col-resize", R = "ss-resizing";
1469
+ function ot(e) {
1432
1470
  const t = Array.from(e.querySelectorAll("thead th"));
1433
1471
  if (t.length === 0) return () => {
1434
1472
  };
@@ -1443,30 +1481,30 @@ function it(e) {
1443
1481
  }
1444
1482
  }
1445
1483
  for (const s of t) {
1446
- let o = function(l) {
1447
- l.preventDefault(), l.stopPropagation(), i();
1448
- const g = l.clientX, y = s.offsetWidth;
1449
- a.classList.add(L), a.setPointerCapture(l.pointerId);
1450
- function h(u) {
1451
- const v = u.clientX - g, T = Math.max(30, y + v);
1452
- s.style.width = T + "px";
1484
+ let o = function(a) {
1485
+ a.preventDefault(), a.stopPropagation(), i();
1486
+ const h = a.clientX, m = s.offsetWidth;
1487
+ l.classList.add(R), l.setPointerCapture(a.pointerId);
1488
+ function d(p) {
1489
+ const x = p.clientX - h, u = Math.max(30, m + x);
1490
+ s.style.width = u + "px";
1453
1491
  }
1454
- function p() {
1455
- a.classList.remove(L), a.removeEventListener("pointermove", h), a.removeEventListener("pointerup", p);
1492
+ function f() {
1493
+ l.classList.remove(R), l.removeEventListener("pointermove", d), l.removeEventListener("pointerup", f);
1456
1494
  }
1457
- a.addEventListener("pointermove", h), a.addEventListener("pointerup", p);
1495
+ l.addEventListener("pointermove", d), l.addEventListener("pointerup", f);
1458
1496
  };
1459
1497
  if (!s.textContent?.trim()) continue;
1460
- const a = document.createElement("div");
1461
- a.className = me, s.appendChild(a), a.addEventListener("pointerdown", o), r.push(() => {
1462
- a.removeEventListener("pointerdown", o), a.remove();
1498
+ const l = document.createElement("div");
1499
+ l.className = pe, s.appendChild(l), l.addEventListener("pointerdown", o), r.push(() => {
1500
+ l.removeEventListener("pointerdown", o), l.remove();
1463
1501
  });
1464
1502
  }
1465
1503
  return () => {
1466
1504
  for (const s of r) s();
1467
1505
  };
1468
1506
  }
1469
- class ot {
1507
+ class at {
1470
1508
  client;
1471
1509
  endpoint;
1472
1510
  refreshInterval;
@@ -1474,11 +1512,12 @@ class ot {
1474
1512
  timer = null;
1475
1513
  currentTab = null;
1476
1514
  fetchOnceCache = {};
1515
+ abortController = null;
1477
1516
  constructor(t) {
1478
- this.client = new w({
1517
+ this.client = new T({
1479
1518
  baseUrl: t.baseUrl,
1480
1519
  authToken: t.authToken
1481
- }), this.endpoint = t.endpoint ?? "/admin/api/debug", this.refreshInterval = t.refreshInterval ?? J, this.callbacks = {
1520
+ }), this.endpoint = t.endpoint ?? "/admin/api/debug", this.refreshInterval = t.refreshInterval ?? G, this.callbacks = {
1482
1521
  onData: t.onData,
1483
1522
  onLoading: t.onLoading,
1484
1523
  onError: t.onError,
@@ -1500,7 +1539,7 @@ class ot {
1500
1539
  * Stop the auto-refresh timer.
1501
1540
  */
1502
1541
  stop() {
1503
- this.timer && (clearInterval(this.timer), this.timer = null);
1542
+ this.timer && (clearInterval(this.timer), this.timer = null), this.abortController?.abort(), this.abortController = null;
1504
1543
  }
1505
1544
  /**
1506
1545
  * Switch to a different tab.
@@ -1532,7 +1571,7 @@ class ot {
1532
1571
  const n = await this.client.fetch(t);
1533
1572
  this.callbacks.onData(n), this.callbacks.onError(null), r && (this.fetchOnceCache[t] = n);
1534
1573
  } catch (n) {
1535
- if (n instanceof b) {
1574
+ if (n instanceof w) {
1536
1575
  this.callbacks.onUnauthorized(n);
1537
1576
  return;
1538
1577
  }
@@ -1560,39 +1599,43 @@ class ot {
1560
1599
  // -------------------------------------------------------------------------
1561
1600
  async fetchData() {
1562
1601
  const t = this.currentTab;
1563
- if (t) {
1564
- if (this.fetchOnceCache[t] !== void 0) {
1565
- this.callbacks.onData(this.fetchOnceCache[t]), this.callbacks.onLoading(!1);
1602
+ if (!t) return;
1603
+ if (this.fetchOnceCache[t] !== void 0) {
1604
+ this.callbacks.onData(this.fetchOnceCache[t]), this.callbacks.onLoading(!1);
1605
+ return;
1606
+ }
1607
+ this.abortController?.abort();
1608
+ const r = new AbortController();
1609
+ this.abortController = r;
1610
+ try {
1611
+ const n = `${this.endpoint}${ce(t)}`, i = await this.client.fetch(n, { signal: r.signal });
1612
+ if (r.signal.aborted) return;
1613
+ this.callbacks.onData(i), this.callbacks.onError(null), this.callbacks.onLoading(!1);
1614
+ } catch (n) {
1615
+ if (n instanceof DOMException && n.name === "AbortError" || r.signal.aborted) return;
1616
+ if (n instanceof w) {
1617
+ this.callbacks.onError(n), this.callbacks.onLoading(!1), this.stop(), this.callbacks.onUnauthorized(n);
1566
1618
  return;
1567
1619
  }
1568
- try {
1569
- const r = `${this.endpoint}${he(t)}`, n = await this.client.fetch(r);
1570
- this.callbacks.onData(n), this.callbacks.onError(null), this.callbacks.onLoading(!1);
1571
- } catch (r) {
1572
- if (r instanceof b) {
1573
- this.callbacks.onError(r), this.callbacks.onLoading(!1), this.stop(), this.callbacks.onUnauthorized(r);
1574
- return;
1575
- }
1576
- this.callbacks.onError(r instanceof Error ? r : new Error(String(r))), this.callbacks.onLoading(!1);
1577
- }
1620
+ this.callbacks.onError(n instanceof Error ? n : new Error(String(n))), this.callbacks.onLoading(!1);
1578
1621
  }
1579
1622
  }
1580
1623
  }
1581
- const at = ["all", "error", "warn", "info", "debug"];
1582
- function ge(e) {
1624
+ const lt = ["all", "error", "warn", "info", "debug"];
1625
+ function me(e) {
1583
1626
  return (e.levelName || e.level_name || (typeof e.level == "string" ? e.level : "") || "info").toLowerCase();
1584
1627
  }
1585
1628
  function ct(e) {
1586
1629
  return e.msg || e.message || JSON.stringify(e);
1587
1630
  }
1588
- function lt(e) {
1631
+ function ht(e) {
1589
1632
  return e.createdAt || e.created_at || e.time || e.timestamp || 0;
1590
1633
  }
1591
- function ht(e) {
1634
+ function ut(e) {
1592
1635
  const t = e.data || {};
1593
1636
  return e.requestId || e.request_id || e["x-request-id"] || t.requestId || t.request_id || t["x-request-id"] || "";
1594
1637
  }
1595
- function ut(e, t = "ss-dbg-log-level") {
1638
+ function dt(e, t = "ss-dbg-log-level") {
1596
1639
  switch (e) {
1597
1640
  case "error":
1598
1641
  case "fatal":
@@ -1609,30 +1652,30 @@ function ut(e, t = "ss-dbg-log-level") {
1609
1652
  return `${t}-info`;
1610
1653
  }
1611
1654
  }
1612
- function dt(e, t) {
1655
+ function ft(e, t) {
1613
1656
  return t === "all" ? e : e.filter((r) => {
1614
- const n = ge(r);
1657
+ const n = me(r);
1615
1658
  return t === "error" ? n === "error" || n === "fatal" : n === t;
1616
1659
  });
1617
1660
  }
1618
- function ft(e, t) {
1661
+ function pt(e, t) {
1619
1662
  if (!t) return e;
1620
1663
  const r = t.toLowerCase();
1621
1664
  return e.filter(
1622
1665
  (n) => n.sql.toLowerCase().includes(r) || n.model && n.model.toLowerCase().includes(r) || n.method.toLowerCase().includes(r)
1623
1666
  );
1624
1667
  }
1625
- function pt(e) {
1668
+ function mt(e) {
1626
1669
  const t = {};
1627
1670
  for (const r of e)
1628
1671
  t[r.sql] = (t[r.sql] || 0) + 1;
1629
1672
  return t;
1630
1673
  }
1631
- function mt(e, t) {
1674
+ function gt(e, t) {
1632
1675
  const r = e.filter((s) => s.duration > 100).length, n = Object.values(t).filter((s) => s > 1).length, i = e.length > 0 ? e.reduce((s, o) => s + o.duration, 0) / e.length : 0;
1633
1676
  return { slowCount: r, dupCount: n, avgDuration: i, totalCount: e.length };
1634
1677
  }
1635
- const gt = [
1678
+ const yt = [
1636
1679
  "all",
1637
1680
  "active",
1638
1681
  "waiting",
@@ -1640,7 +1683,7 @@ const gt = [
1640
1683
  "completed",
1641
1684
  "failed"
1642
1685
  ];
1643
- function yt(e, t = "ss-dbg-job-status") {
1686
+ function bt(e, t = "ss-dbg-job-status") {
1644
1687
  switch (e) {
1645
1688
  case "completed":
1646
1689
  case "failed":
@@ -1652,7 +1695,7 @@ function yt(e, t = "ss-dbg-job-status") {
1652
1695
  return "ss-dbg-badge-muted";
1653
1696
  }
1654
1697
  }
1655
- function bt(e) {
1698
+ function xt(e) {
1656
1699
  switch (e) {
1657
1700
  case "active":
1658
1701
  return "blue";
@@ -1668,7 +1711,7 @@ function bt(e) {
1668
1711
  return "muted";
1669
1712
  }
1670
1713
  }
1671
- function xt(e) {
1714
+ function wt(e) {
1672
1715
  if (!e) return [];
1673
1716
  if (Array.isArray(e)) return e;
1674
1717
  const t = e;
@@ -1679,7 +1722,7 @@ function St(e) {
1679
1722
  const t = e;
1680
1723
  return t.stats || t.overview || null;
1681
1724
  }
1682
- function ye(e) {
1725
+ function ge(e) {
1683
1726
  if (!e) return [];
1684
1727
  if (typeof e == "string")
1685
1728
  try {
@@ -1689,7 +1732,7 @@ function ye(e) {
1689
1732
  }
1690
1733
  return Array.isArray(e) ? e : [];
1691
1734
  }
1692
- function be(e) {
1735
+ function ye(e) {
1693
1736
  if (!e) return [];
1694
1737
  if (typeof e == "string")
1695
1738
  try {
@@ -1699,24 +1742,24 @@ function be(e) {
1699
1742
  }
1700
1743
  return Array.isArray(e) ? e : [];
1701
1744
  }
1702
- function E(e, t, r, n = 0) {
1703
- return e[t] || e[r] || n;
1745
+ function C(e, t, r, n = 0) {
1746
+ return e[t] ?? e[r] ?? n;
1704
1747
  }
1705
- function wt(e) {
1748
+ function vt(e) {
1706
1749
  return {
1707
1750
  method: e.method || "",
1708
1751
  url: e.url || "",
1709
- statusCode: E(e, "status_code", "statusCode"),
1710
- totalDuration: E(e, "total_duration", "totalDuration") || e.duration || 0,
1711
- spanCount: E(e, "span_count", "spanCount"),
1712
- spans: ye(e.spans),
1713
- warnings: be(e.warnings)
1752
+ statusCode: C(e, "status_code", "statusCode"),
1753
+ totalDuration: C(e, "total_duration", "totalDuration") || e.duration || 0,
1754
+ spanCount: C(e, "span_count", "spanCount"),
1755
+ spans: ge(e.spans),
1756
+ warnings: ye(e.warnings)
1714
1757
  };
1715
1758
  }
1716
- const xe = ["password", "secret", "token", "key", "credential", "auth"];
1717
- function Se(e) {
1759
+ const be = ["password", "secret", "token", "key", "credential", "auth"];
1760
+ function xe(e) {
1718
1761
  const t = e.toLowerCase();
1719
- return xe.some((r) => t.includes(r));
1762
+ return be.some((r) => t.includes(r));
1720
1763
  }
1721
1764
  function we(e) {
1722
1765
  if (e == null) return "-";
@@ -1729,89 +1772,89 @@ function we(e) {
1729
1772
  return String(e);
1730
1773
  }
1731
1774
  }
1732
- const ve = {
1775
+ const Se = {
1733
1776
  collectionInterval: "Stats Collection",
1734
1777
  dashboardBroadcast: "Dashboard Broadcast",
1735
1778
  debugBroadcast: "Debug Broadcast",
1736
1779
  persistFlush: "Persist Flush",
1737
1780
  retentionCleanup: "Retention Cleanup"
1738
1781
  };
1739
- function vt(e) {
1740
- return ve[e] || e;
1782
+ function Tt(e) {
1783
+ return Se[e] || e;
1741
1784
  }
1742
- const Te = {
1785
+ const ve = {
1743
1786
  prometheus: "Prometheus",
1744
1787
  pinoHook: "Pino Log Hook",
1745
1788
  edgePlugin: "Edge Plugin",
1746
1789
  cacheInspector: "Cache Inspector",
1747
1790
  queueInspector: "Queue Inspector"
1748
1791
  };
1749
- function Tt(e) {
1750
- return Te[e] || e;
1751
- }
1752
1792
  function Et(e) {
1793
+ return ve[e] || e;
1794
+ }
1795
+ function Ct(e) {
1753
1796
  return "active" in e ? e.active ? "active" : "inactive" : "available" in e ? e.available ? "available" : "unavailable" : "unknown";
1754
1797
  }
1755
- function Ct(e, t) {
1798
+ function Mt(e, t) {
1756
1799
  return t.mode ? `Mode: ${t.mode}` : e === "edgePlugin" && t.active ? "@serverStats() tag registered" : e === "cacheInspector" ? t.available ? "Redis dependency detected" : "Redis not installed" : e === "queueInspector" ? t.available ? "Queue dependency detected" : "@rlanz/bull-queue not installed" : "-";
1757
1800
  }
1758
- function Mt(e) {
1801
+ function Pt(e) {
1759
1802
  return Object.entries(e).map(([t, r]) => ({
1760
1803
  key: t,
1761
1804
  value: we(r),
1762
- secret: Se(t)
1805
+ secret: xe(t)
1763
1806
  }));
1764
1807
  }
1765
- function Pt(e, t) {
1808
+ function kt(e, t) {
1766
1809
  return t ? Math.min(100, Math.round(e / t * 100)) : 0;
1767
1810
  }
1768
- const Ee = ["healthy", "active", "connected", "available", "ready"], Ce = ["errored", "unavailable"];
1769
- function kt(e) {
1770
- return Ee.includes(e) ? "ok" : Ce.includes(e) ? "err" : "";
1811
+ const Te = ["healthy", "active", "connected", "available", "ready"], Ee = ["errored", "unavailable"];
1812
+ function $t(e) {
1813
+ return Te.includes(e) ? "ok" : Ee.includes(e) ? "err" : "";
1771
1814
  }
1772
- function m(e) {
1815
+ function b(e) {
1773
1816
  return e !== null && typeof e == "object" && !Array.isArray(e) && e.__redacted === !0;
1774
1817
  }
1775
- function Me(e, t = "") {
1818
+ function Ce(e, t = "") {
1776
1819
  if (typeof e != "object" || e === null || e === void 0)
1777
1820
  return [{ path: t, value: e }];
1778
- if (Array.isArray(e) || m(e))
1821
+ if (Array.isArray(e) || b(e))
1779
1822
  return [{ path: t, value: e }];
1780
1823
  const r = [];
1781
1824
  for (const n of Object.keys(e)) {
1782
1825
  const i = t ? `${t}.${n}` : n, s = e[n];
1783
- typeof s == "object" && s !== null && !Array.isArray(s) && !m(s) ? r.push(...Me(s, i)) : r.push({ path: i, value: s });
1826
+ typeof s == "object" && s !== null && !Array.isArray(s) && !b(s) ? r.push(...Ce(s, i)) : r.push({ path: i, value: s });
1784
1827
  }
1785
1828
  return r;
1786
1829
  }
1787
- function $t(e) {
1830
+ function At(e) {
1788
1831
  return e == null ? { text: "null", color: "var(--ss-dim)" } : typeof e == "boolean" ? {
1789
1832
  text: String(e),
1790
1833
  color: e ? "var(--ss-green-fg)" : "var(--ss-red-fg)"
1791
1834
  } : typeof e == "number" ? { text: String(e), color: "var(--ss-amber-fg)" } : Array.isArray(e) ? { text: `[${e.map((r) => r == null ? "null" : typeof r == "object" ? JSON.stringify(r) : String(r)).join(", ")}]`, color: "var(--ss-purple-fg)" } : typeof e == "object" ? { text: JSON.stringify(e), color: "var(--ss-dim)" } : { text: String(e) };
1792
1835
  }
1793
- function Pe(e) {
1794
- if (e == null || typeof e != "object" || Array.isArray(e) || m(e))
1836
+ function Me(e) {
1837
+ if (e == null || typeof e != "object" || Array.isArray(e) || b(e))
1795
1838
  return 1;
1796
1839
  let t = 0;
1797
1840
  for (const r of Object.keys(e))
1798
- t += Pe(e[r]);
1841
+ t += Me(e[r]);
1799
1842
  return t;
1800
1843
  }
1801
- function At(e) {
1802
- if (e == null || typeof e != "object" || Array.isArray(e) || m(e))
1844
+ function Lt(e) {
1845
+ if (e == null || typeof e != "object" || Array.isArray(e) || b(e))
1803
1846
  return [];
1804
1847
  const t = [];
1805
1848
  for (const r of Object.keys(e)) {
1806
1849
  const n = e[r];
1807
- n !== null && typeof n == "object" && !Array.isArray(n) && !m(n) && t.push(r);
1850
+ n !== null && typeof n == "object" && !Array.isArray(n) && !b(n) && t.push(r);
1808
1851
  }
1809
1852
  return t;
1810
1853
  }
1811
- function Lt(e, t, r) {
1812
- return !r || e.toLowerCase().includes(r) ? !0 : (m(t) ? t.display : t == null ? "" : String(t)).toLowerCase().includes(r);
1813
- }
1814
1854
  function Rt(e, t, r) {
1855
+ return !r || e.toLowerCase().includes(r) ? !0 : (b(t) ? t.display : t == null ? "" : String(t)).toLowerCase().includes(r);
1856
+ }
1857
+ function Ut(e, t, r) {
1815
1858
  t && navigator.clipboard.writeText(e).then(() => {
1816
1859
  const n = t.textContent;
1817
1860
  t.textContent = "✓", t.classList.add(`${r}-copy-row-ok`), setTimeout(() => {
@@ -1820,7 +1863,7 @@ function Rt(e, t, r) {
1820
1863
  }).catch(() => {
1821
1864
  });
1822
1865
  }
1823
- const ke = /* @__PURE__ */ new Set([
1866
+ const Pe = /* @__PURE__ */ new Set([
1824
1867
  "secret",
1825
1868
  "key",
1826
1869
  "token",
@@ -1834,7 +1877,7 @@ const ke = /* @__PURE__ */ new Set([
1834
1877
  "private",
1835
1878
  "encryption"
1836
1879
  ]);
1837
- function $e(e) {
1880
+ function ke(e) {
1838
1881
  const t = e.split(/[._-]/), r = [];
1839
1882
  for (const n of t) {
1840
1883
  const i = n.split(new RegExp("(?<=[a-z])(?=[A-Z])"));
@@ -1843,119 +1886,119 @@ function $e(e) {
1843
1886
  }
1844
1887
  return r;
1845
1888
  }
1846
- function Ut(e) {
1847
- return $e(e).some((r) => ke.has(r.toLowerCase()));
1889
+ function Dt(e) {
1890
+ return ke(e).some((r) => Pe.has(r.toLowerCase()));
1848
1891
  }
1849
- const Dt = new RegExp("secret|password|pass(?:word)?|pwd|token|(?:^|[._-])key(?:[._-]|$)|(?<=[a-z])Key|apikey|api_key|auth|credential|private|encryption", "i");
1892
+ const Ft = new RegExp("secret|password|pass(?:word)?|pwd|token|(?:^|[._-])key(?:[._-]|$)|(?<=[a-z])Key|apikey|api_key|auth|credential|private|encryption", "i");
1850
1893
  export {
1851
- w as ApiClient,
1894
+ T as ApiClient,
1852
1895
  I as ApiError,
1853
- ue as DASHBOARD_SECTION_PATHS,
1854
- J as DEBUG_REFRESH_MS,
1896
+ he as DASHBOARD_SECTION_PATHS,
1897
+ G as DEBUG_REFRESH_MS,
1855
1898
  le as DEBUG_TAB_PATHS,
1856
- ne as DEFAULT_FEATURES,
1857
- U as DEFAULT_PER_PAGE,
1858
- pe as DashboardApi,
1859
- nt as DashboardDataController,
1860
- ot as DebugDataController,
1861
- Ce as ERROR_STATUSES,
1862
- Te as INTEGRATION_LABELS,
1863
- gt as JOB_STATUS_FILTERS,
1864
- at as LOG_LEVELS,
1865
- ae as MAX_HISTORY,
1866
- P as METRIC_DEFINITIONS,
1867
- Ee as OK_STATUSES,
1868
- j as OVERVIEW_REFRESH_MS,
1869
- Dt as REDACT_PATTERN,
1870
- G as SECTION_REFRESH_MS,
1871
- Q as SLOW_DURATION_MS,
1872
- ce as STALE_MS,
1873
- rt as ServerStatsController,
1874
- st as TAB_ICONS,
1875
- te as THRESHOLD_CSS_CLASS,
1876
- _e as THRESHOLD_CSS_VAR,
1877
- Oe as THRESHOLD_HEX_FALLBACK,
1878
- ve as TIMER_LABELS,
1879
- b as UnauthorizedError,
1880
- X as VERY_SLOW_DURATION_MS,
1881
- re as buildQueryParams,
1882
- ze as buildQueryString,
1883
- Re as buildSparklineData,
1884
- kt as classifyStatus,
1885
- At as collectTopLevelObjectKeys,
1886
- A as compactPreview,
1887
- Je as computePagination,
1888
- mt as computeQuerySummary,
1889
- V as computeStats,
1890
- Rt as copyWithFeedback,
1891
- pt as countDuplicateQueries,
1892
- Pe as countLeaves,
1893
- je as createFilterState,
1894
- fe as createHistoryBuffer,
1895
- Ve as createPaginationState,
1896
- Ge as createSortState,
1897
- _ as createTransmitSubscription,
1898
- Xe as detectFeatures,
1899
- Ze as detectMetricGroupsFromStats,
1900
- He as durationSeverity,
1899
+ re as DEFAULT_FEATURES,
1900
+ D as DEFAULT_PER_PAGE,
1901
+ fe as DashboardApi,
1902
+ st as DashboardDataController,
1903
+ at as DebugDataController,
1904
+ Ee as ERROR_STATUSES,
1905
+ ve as INTEGRATION_LABELS,
1906
+ yt as JOB_STATUS_FILTERS,
1907
+ lt as LOG_LEVELS,
1908
+ oe as MAX_HISTORY,
1909
+ k as METRIC_DEFINITIONS,
1910
+ Te as OK_STATUSES,
1911
+ V as OVERVIEW_REFRESH_MS,
1912
+ Ft as REDACT_PATTERN,
1913
+ j as SECTION_REFRESH_MS,
1914
+ J as SLOW_DURATION_MS,
1915
+ ae as STALE_MS,
1916
+ nt as ServerStatsController,
1917
+ it as TAB_ICONS,
1918
+ ee as THRESHOLD_CSS_CLASS,
1919
+ Be as THRESHOLD_CSS_VAR,
1920
+ _e as THRESHOLD_HEX_FALLBACK,
1921
+ Se as TIMER_LABELS,
1922
+ w as UnauthorizedError,
1923
+ Q as VERY_SLOW_DURATION_MS,
1924
+ te as buildQueryParams,
1925
+ We as buildQueryString,
1926
+ Ue as buildSparklineData,
1927
+ $t as classifyStatus,
1928
+ Lt as collectTopLevelObjectKeys,
1929
+ L as compactPreview,
1930
+ Qe as computePagination,
1931
+ gt as computeQuerySummary,
1932
+ W as computeStats,
1933
+ Ut as copyWithFeedback,
1934
+ mt as countDuplicateQueries,
1935
+ Me as countLeaves,
1936
+ Ge as createFilterState,
1937
+ de as createHistoryBuffer,
1938
+ je as createPaginationState,
1939
+ Je as createSortState,
1940
+ B as createTransmitSubscription,
1941
+ Ye as detectFeatures,
1942
+ et as detectMetricGroupsFromStats,
1943
+ Ne as durationSeverity,
1901
1944
  St as extractJobStats,
1902
- xt as extractJobs,
1903
- ie as fetchFeatures,
1904
- Pt as fillPercent,
1905
- dt as filterLogsByLevel,
1906
- ft as filterQueries,
1907
- Me as flattenConfig,
1908
- M as formatBytes,
1909
- Ke as formatCacheSize,
1910
- Mt as formatCollectorConfig,
1945
+ wt as extractJobs,
1946
+ se as fetchFeatures,
1947
+ kt as fillPercent,
1948
+ ft as filterLogsByLevel,
1949
+ pt as filterQueries,
1950
+ Ce as flattenConfig,
1951
+ P as formatBytes,
1952
+ ze as formatCacheSize,
1953
+ Pt as formatCollectorConfig,
1911
1954
  we as formatConfigVal,
1912
- Z as formatCount,
1913
- Ue as formatDuration,
1914
- $t as formatFlatValue,
1915
- k as formatMb,
1955
+ Y as formatCount,
1956
+ De as formatDuration,
1957
+ At as formatFlatValue,
1958
+ $ as formatMb,
1916
1959
  Ie as formatStatNum,
1917
- De as formatTime,
1918
- qe as formatTtl,
1919
- Y as formatUptime,
1920
- W as generateGradientId,
1921
- K as generateSparklinePath,
1922
- q as generateSparklinePoints,
1923
- de as getDashboardSectionPath,
1924
- he as getDebugTabPath,
1925
- Ct as getIntegrationDetails,
1926
- Tt as getIntegrationLabel,
1927
- Et as getIntegrationStatus,
1928
- bt as getJobStatusBadgeColor,
1929
- yt as getJobStatusCssClass,
1930
- ut as getLogLevelCssClass,
1931
- et as getMetricById,
1932
- tt as getMetricsByGroup,
1933
- Qe as getPageNumbers,
1934
- $ as getRatioColor,
1935
- R as getTheme,
1936
- x as getThresholdColor,
1937
- ee as getThresholdColorInverse,
1938
- vt as getTimerLabel,
1939
- Ye as getVisibleMetricGroups,
1940
- it as initResizableColumns,
1941
- m as isRedactedValue,
1942
- Se as isSecretKey,
1943
- Lt as matchesConfigSearch,
1944
- wt as normalizeTraceFields,
1945
- Le as onThemeChange,
1946
- We as parsePaginatedResponse,
1947
- ye as parseTraceSpans,
1948
- be as parseTraceWarnings,
1949
- ge as resolveLogLevel,
1960
+ Fe as formatTime,
1961
+ Ke as formatTtl,
1962
+ X as formatUptime,
1963
+ z as generateGradientId,
1964
+ Re as generateSparklinePath,
1965
+ Le as generateSparklinePoints,
1966
+ ue as getDashboardSectionPath,
1967
+ ce as getDebugTabPath,
1968
+ Mt as getIntegrationDetails,
1969
+ Et as getIntegrationLabel,
1970
+ Ct as getIntegrationStatus,
1971
+ xt as getJobStatusBadgeColor,
1972
+ bt as getJobStatusCssClass,
1973
+ dt as getLogLevelCssClass,
1974
+ tt as getMetricById,
1975
+ rt as getMetricsByGroup,
1976
+ Xe as getPageNumbers,
1977
+ A as getRatioColor,
1978
+ U as getTheme,
1979
+ S as getThresholdColor,
1980
+ Z as getThresholdColorInverse,
1981
+ Tt as getTimerLabel,
1982
+ Ze as getVisibleMetricGroups,
1983
+ ot as initResizableColumns,
1984
+ b as isRedactedValue,
1985
+ xe as isSecretKey,
1986
+ Rt as matchesConfigSearch,
1987
+ vt as normalizeTraceFields,
1988
+ Ae as onThemeChange,
1989
+ Ve as parsePaginatedResponse,
1990
+ ge as parseTraceSpans,
1991
+ ye as parseTraceWarnings,
1992
+ me as resolveLogLevel,
1950
1993
  ct as resolveLogMessage,
1951
- ht as resolveLogRequestId,
1952
- lt as resolveLogTimestamp,
1953
- E as resolveTraceField,
1954
- H as setTheme,
1955
- Ne as shortReqId,
1956
- Ut as shouldRedact,
1957
- Be as statusColor,
1958
- B as subscribeToChannel,
1959
- Fe as timeAgo,
1960
- Ae as toggleTheme
1994
+ ut as resolveLogRequestId,
1995
+ ht as resolveLogTimestamp,
1996
+ C as resolveTraceField,
1997
+ N as setTheme,
1998
+ qe as shortReqId,
1999
+ Dt as shouldRedact,
2000
+ He as statusColor,
2001
+ H as subscribeToChannel,
2002
+ Oe as timeAgo,
2003
+ $e as toggleTheme
1961
2004
  };