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
package/dist/core/index.js
CHANGED
|
@@ -164,11 +164,11 @@ function U() {
|
|
|
164
164
|
function z(e) {
|
|
165
165
|
typeof window > "u" || (localStorage.setItem(S, e), window.dispatchEvent(new CustomEvent(k, { detail: e })));
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function qe() {
|
|
168
168
|
const t = U() === "dark" ? "light" : "dark";
|
|
169
169
|
return z(t), t;
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function Ke(e) {
|
|
172
172
|
if (typeof window > "u") return () => {
|
|
173
173
|
};
|
|
174
174
|
const t = (s) => {
|
|
@@ -198,7 +198,7 @@ const m = {
|
|
|
198
198
|
function j(e) {
|
|
199
199
|
return { ...m, ...e };
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function ze(e, t = m.width, r = m.height, n = m.padding) {
|
|
202
202
|
if (e.length < 2) return null;
|
|
203
203
|
const o = t - n * 2, s = r - n * 2, i = Math.min(...e), c = Math.max(...e) - i || 1;
|
|
204
204
|
return e.map((p, h) => {
|
|
@@ -206,7 +206,7 @@ function Ke(e, t = m.width, r = m.height, n = m.padding) {
|
|
|
206
206
|
return `${d.toFixed(1)},${f.toFixed(1)}`;
|
|
207
207
|
}).join(" ");
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function je(e, t = m.width, r = m.height, n = m.padding) {
|
|
210
210
|
if (e.length < 2) return null;
|
|
211
211
|
const o = t - n * 2, s = r - n * 2, i = Math.min(...e), c = Math.max(...e) - i || 1, l = e.map((f, y) => {
|
|
212
212
|
const u = n + y / (e.length - 1) * o, E = n + s - (f - i) / c * s;
|
|
@@ -227,7 +227,7 @@ function G(e) {
|
|
|
227
227
|
}
|
|
228
228
|
return { min: t, max: r, avg: n / e.length };
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function Ve(e, t) {
|
|
231
231
|
if (e.length < 2) return null;
|
|
232
232
|
const r = j(t), n = G(e), o = n.max - n.min || 1, s = r.width - r.padding * 2, i = r.height - r.padding * 2, a = r.padding, c = e.length, l = Array.from({ length: c });
|
|
233
233
|
for (let u = 0; u < c; u++) {
|
|
@@ -276,13 +276,13 @@ function A(e) {
|
|
|
276
276
|
function ie(e) {
|
|
277
277
|
return e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).toFixed(1)}K` : `${e}`;
|
|
278
278
|
}
|
|
279
|
-
function
|
|
279
|
+
function We(e) {
|
|
280
280
|
return e >= 1e3 ? `${(e / 1e3).toFixed(2)}s` : e >= 1 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`;
|
|
281
281
|
}
|
|
282
282
|
function D(e) {
|
|
283
283
|
return /([+-]\d{2}:?\d{2}|Z)\s*$/.test(e) ? e : e + "Z";
|
|
284
284
|
}
|
|
285
|
-
function
|
|
285
|
+
function Ge(e) {
|
|
286
286
|
if (!e) return "-";
|
|
287
287
|
const t = typeof e == "string" ? new Date(D(e)) : new Date(e);
|
|
288
288
|
return Number.isNaN(t.getTime()) ? "-" : t.toLocaleTimeString("en-US", {
|
|
@@ -292,12 +292,12 @@ function We(e) {
|
|
|
292
292
|
second: "2-digit"
|
|
293
293
|
}) + "." + String(t.getMilliseconds()).padStart(3, "0");
|
|
294
294
|
}
|
|
295
|
-
function
|
|
295
|
+
function Qe(e) {
|
|
296
296
|
if (!e) return "-";
|
|
297
297
|
const t = typeof e == "string" ? new Date(D(e)).getTime() : e, r = Math.floor((Date.now() - t) / 1e3);
|
|
298
298
|
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`;
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function Je(e, t) {
|
|
301
301
|
switch (t) {
|
|
302
302
|
case "%":
|
|
303
303
|
return `${e.toFixed(1)}%`;
|
|
@@ -329,35 +329,39 @@ const ce = {
|
|
|
329
329
|
green: "ss-green",
|
|
330
330
|
amber: "ss-amber",
|
|
331
331
|
red: "ss-red"
|
|
332
|
-
},
|
|
332
|
+
}, Ye = {
|
|
333
333
|
green: "#34d399",
|
|
334
334
|
amber: "#fbbf24",
|
|
335
335
|
red: "#f87171"
|
|
336
|
-
},
|
|
336
|
+
}, Xe = {
|
|
337
337
|
green: "--ss-accent",
|
|
338
338
|
amber: "--ss-amber-fg",
|
|
339
339
|
red: "--ss-red-fg"
|
|
340
340
|
};
|
|
341
|
-
function
|
|
341
|
+
function Ze(e) {
|
|
342
342
|
return e >= 500 ? "red" : e >= 400 ? "amber" : "green";
|
|
343
343
|
}
|
|
344
|
-
function
|
|
344
|
+
function le(e) {
|
|
345
345
|
return e > Z ? "very-slow" : e > X ? "slow" : "normal";
|
|
346
346
|
}
|
|
347
|
-
function et(e) {
|
|
347
|
+
function et(e, t = "ss-dash") {
|
|
348
|
+
const r = le(e);
|
|
349
|
+
return r === "very-slow" ? `${t}-very-slow` : r === "slow" ? `${t}-slow` : "";
|
|
350
|
+
}
|
|
351
|
+
function tt(e) {
|
|
348
352
|
return e ? e.length <= 8 ? e : e.slice(0, 8) + "…" : "--";
|
|
349
353
|
}
|
|
350
354
|
function L(e, t = 100) {
|
|
351
355
|
return e === null ? "null" : e === void 0 ? "-" : typeof e == "string" ? re(e) : typeof e == "number" || typeof e == "boolean" ? String(e) : Array.isArray(e) ? ne(e, t, L) : typeof e == "object" ? se(e, t, L) : String(e);
|
|
352
356
|
}
|
|
353
|
-
function
|
|
357
|
+
function rt(e) {
|
|
354
358
|
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`;
|
|
355
359
|
}
|
|
356
|
-
function
|
|
360
|
+
function nt(e) {
|
|
357
361
|
return e < 1024 ? `${e}B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)}KB` : `${(e / (1024 * 1024)).toFixed(1)}MB`;
|
|
358
362
|
}
|
|
359
363
|
const O = 50;
|
|
360
|
-
function
|
|
364
|
+
function st(e, t, r) {
|
|
361
365
|
const n = new URLSearchParams();
|
|
362
366
|
if (n.set("page", String(e.page)), n.set("perPage", String(e.perPage)), t) {
|
|
363
367
|
t.search && n.set("search", t.search);
|
|
@@ -366,7 +370,7 @@ function nt(e, t, r) {
|
|
|
366
370
|
}
|
|
367
371
|
return r && (n.set("sort", r.field), n.set("direction", r.direction)), n.toString();
|
|
368
372
|
}
|
|
369
|
-
function
|
|
373
|
+
function ot(e, t = O) {
|
|
370
374
|
const r = e.data ?? e.items ?? [], n = e.total ?? 0, o = e.page ?? 1, s = e.perPage ?? e.limit ?? t, i = e.totalPages ?? (Math.ceil(n / s) || 1);
|
|
371
375
|
return {
|
|
372
376
|
data: r,
|
|
@@ -378,7 +382,7 @@ function st(e, t = O) {
|
|
|
378
382
|
}
|
|
379
383
|
};
|
|
380
384
|
}
|
|
381
|
-
function
|
|
385
|
+
function it(e = O) {
|
|
382
386
|
return {
|
|
383
387
|
page: 1,
|
|
384
388
|
perPage: e,
|
|
@@ -386,16 +390,16 @@ function ot(e = O) {
|
|
|
386
390
|
totalPages: 1
|
|
387
391
|
};
|
|
388
392
|
}
|
|
389
|
-
function
|
|
393
|
+
function at() {
|
|
390
394
|
return {
|
|
391
395
|
search: "",
|
|
392
396
|
filters: {}
|
|
393
397
|
};
|
|
394
398
|
}
|
|
395
|
-
function
|
|
399
|
+
function ct(e = "id", t = "desc") {
|
|
396
400
|
return { field: e, direction: t };
|
|
397
401
|
}
|
|
398
|
-
const
|
|
402
|
+
const ue = [
|
|
399
403
|
{ key: "page", param: "page", isNumeric: !0 },
|
|
400
404
|
{ key: "perPage", param: "perPage", isNumeric: !0 },
|
|
401
405
|
{ key: "search", param: "search" },
|
|
@@ -403,9 +407,9 @@ const le = [
|
|
|
403
407
|
{ key: "sortDir", param: "direction" },
|
|
404
408
|
{ key: "timeRange", param: "range" }
|
|
405
409
|
];
|
|
406
|
-
function
|
|
410
|
+
function he(e) {
|
|
407
411
|
const t = new URLSearchParams(), r = e;
|
|
408
|
-
for (const { key: n, param: o, isNumeric: s } of
|
|
412
|
+
for (const { key: n, param: o, isNumeric: s } of ue) {
|
|
409
413
|
const i = r[n];
|
|
410
414
|
(s ? i != null : i) && t.set(o, String(i));
|
|
411
415
|
}
|
|
@@ -414,7 +418,7 @@ function ue(e) {
|
|
|
414
418
|
o && t.set(n, o);
|
|
415
419
|
return t.toString();
|
|
416
420
|
}
|
|
417
|
-
function
|
|
421
|
+
function lt(e) {
|
|
418
422
|
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, o = Math.min(r * e.perPage, e.total);
|
|
419
423
|
return {
|
|
420
424
|
page: r,
|
|
@@ -427,7 +431,7 @@ function ct(e) {
|
|
|
427
431
|
hasNext: r < t
|
|
428
432
|
};
|
|
429
433
|
}
|
|
430
|
-
function
|
|
434
|
+
function ut(e, t, r = 2) {
|
|
431
435
|
if (t <= 1) return [1];
|
|
432
436
|
const n = [], o = Math.max(2, e - r), s = Math.min(t - 1, e + r);
|
|
433
437
|
n.push(1), o > 2 && n.push("...");
|
|
@@ -435,7 +439,7 @@ function lt(e, t, r = 2) {
|
|
|
435
439
|
n.push(i);
|
|
436
440
|
return s < t - 1 && n.push("..."), t > 1 && n.push(t), n;
|
|
437
441
|
}
|
|
438
|
-
const
|
|
442
|
+
const de = [
|
|
439
443
|
"tracing",
|
|
440
444
|
"process",
|
|
441
445
|
"system",
|
|
@@ -448,7 +452,7 @@ const he = [
|
|
|
448
452
|
"log",
|
|
449
453
|
"emails",
|
|
450
454
|
"dashboard"
|
|
451
|
-
],
|
|
455
|
+
], fe = [
|
|
452
456
|
{ flag: "process", group: "process" },
|
|
453
457
|
{ flag: "process", group: "memory" },
|
|
454
458
|
{ flag: "system", group: "memory" },
|
|
@@ -458,7 +462,7 @@ const he = [
|
|
|
458
462
|
{ flag: "queues", group: "queue" },
|
|
459
463
|
{ flag: "app", group: "app" },
|
|
460
464
|
{ flag: "log", group: "log" }
|
|
461
|
-
],
|
|
465
|
+
], pe = [
|
|
462
466
|
{ group: "process", fields: ["cpuPercent", "uptime", "nodeVersion"] },
|
|
463
467
|
{
|
|
464
468
|
group: "memory",
|
|
@@ -476,7 +480,7 @@ const he = [
|
|
|
476
480
|
function T(e) {
|
|
477
481
|
return typeof e == "number" && !Number.isNaN(e);
|
|
478
482
|
}
|
|
479
|
-
const I = "/admin/api/debug",
|
|
483
|
+
const I = "/admin/api/debug", ge = {
|
|
480
484
|
tracing: !1,
|
|
481
485
|
process: !1,
|
|
482
486
|
system: !1,
|
|
@@ -491,39 +495,39 @@ const I = "/admin/api/debug", pe = {
|
|
|
491
495
|
dashboard: !1,
|
|
492
496
|
customPanes: []
|
|
493
497
|
};
|
|
494
|
-
function
|
|
498
|
+
function me(e) {
|
|
495
499
|
const t = { customPanes: e.customPanes ?? [] }, r = e.features;
|
|
496
|
-
for (const n of
|
|
500
|
+
for (const n of de)
|
|
497
501
|
t[n] = r?.[n] ?? !1;
|
|
498
502
|
return t;
|
|
499
503
|
}
|
|
500
|
-
async function
|
|
504
|
+
async function ye(e, t = I) {
|
|
501
505
|
const r = `${t.replace(/\/+$/, "")}/config`;
|
|
502
506
|
return e.fetch(r);
|
|
503
507
|
}
|
|
504
|
-
async function
|
|
508
|
+
async function ht(e) {
|
|
505
509
|
const { baseUrl: t = "", debugEndpoint: r = I, authToken: n } = e, o = new v({ baseUrl: t, authToken: n });
|
|
506
510
|
try {
|
|
507
|
-
const s = await
|
|
508
|
-
return
|
|
511
|
+
const s = await ye(o, r);
|
|
512
|
+
return me(s);
|
|
509
513
|
} catch {
|
|
510
|
-
return
|
|
514
|
+
return ge;
|
|
511
515
|
}
|
|
512
516
|
}
|
|
513
|
-
function
|
|
517
|
+
function dt(e) {
|
|
514
518
|
const t = /* @__PURE__ */ new Set(), n = "features" in e && typeof e.features == "object" && e.features !== null ? e.features : e;
|
|
515
|
-
for (const { flag: o, group: s } of
|
|
519
|
+
for (const { flag: o, group: s } of fe)
|
|
516
520
|
n[o] && t.add(s);
|
|
517
521
|
return t;
|
|
518
522
|
}
|
|
519
|
-
function
|
|
523
|
+
function ft(e) {
|
|
520
524
|
const t = /* @__PURE__ */ new Set();
|
|
521
|
-
(T(e.cpuPercent) || T(e.uptime) ||
|
|
522
|
-
for (const r of
|
|
525
|
+
(T(e.cpuPercent) || T(e.uptime) || be(e)) && t.add("process");
|
|
526
|
+
for (const r of pe)
|
|
523
527
|
r.fields.some((n) => T(e[n])) && t.add(r.group);
|
|
524
528
|
return e.redisOk !== void 0 && e.redisOk !== null && t.add("redis"), t;
|
|
525
529
|
}
|
|
526
|
-
function
|
|
530
|
+
function be(e) {
|
|
527
531
|
return typeof e.nodeVersion == "string" && e.nodeVersion.length > 0;
|
|
528
532
|
}
|
|
529
533
|
function g(e) {
|
|
@@ -831,10 +835,10 @@ const P = [
|
|
|
831
835
|
historyKey: "logEntriesPerMinute"
|
|
832
836
|
}
|
|
833
837
|
];
|
|
834
|
-
function
|
|
838
|
+
function pt(e) {
|
|
835
839
|
return P.find((t) => t.id === e);
|
|
836
840
|
}
|
|
837
|
-
function
|
|
841
|
+
function gt() {
|
|
838
842
|
const e = /* @__PURE__ */ new Map();
|
|
839
843
|
for (const t of P) {
|
|
840
844
|
const r = t.group || "core";
|
|
@@ -842,7 +846,7 @@ function pt() {
|
|
|
842
846
|
}
|
|
843
847
|
return e;
|
|
844
848
|
}
|
|
845
|
-
const
|
|
849
|
+
const xe = {
|
|
846
850
|
queries: "/queries",
|
|
847
851
|
events: "/events",
|
|
848
852
|
emails: "/emails",
|
|
@@ -854,10 +858,10 @@ const be = {
|
|
|
854
858
|
config: "/config",
|
|
855
859
|
internals: "/diagnostics"
|
|
856
860
|
};
|
|
857
|
-
function
|
|
858
|
-
return
|
|
861
|
+
function Se(e) {
|
|
862
|
+
return xe[e] || `/${e}`;
|
|
859
863
|
}
|
|
860
|
-
const
|
|
864
|
+
const we = {
|
|
861
865
|
overview: "/overview",
|
|
862
866
|
requests: "/requests",
|
|
863
867
|
queries: "/queries",
|
|
@@ -870,10 +874,10 @@ const Se = {
|
|
|
870
874
|
jobs: "/jobs",
|
|
871
875
|
config: "/config"
|
|
872
876
|
};
|
|
873
|
-
function
|
|
874
|
-
return
|
|
877
|
+
function ve(e) {
|
|
878
|
+
return we[e] || `/${e}`;
|
|
875
879
|
}
|
|
876
|
-
function
|
|
880
|
+
function Ee(e = ee) {
|
|
877
881
|
const t = {}, r = {};
|
|
878
882
|
let n = !1;
|
|
879
883
|
function o(s) {
|
|
@@ -908,7 +912,7 @@ function ve(e = ee) {
|
|
|
908
912
|
}
|
|
909
913
|
};
|
|
910
914
|
}
|
|
911
|
-
class
|
|
915
|
+
class mt {
|
|
912
916
|
// -- Configuration --------------------------------------------------------
|
|
913
917
|
baseUrl;
|
|
914
918
|
endpoint;
|
|
@@ -937,7 +941,7 @@ class gt {
|
|
|
937
941
|
isConnected = !1;
|
|
938
942
|
isStale = !1;
|
|
939
943
|
constructor(t = {}) {
|
|
940
|
-
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 =
|
|
944
|
+
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 = Ee();
|
|
941
945
|
}
|
|
942
946
|
// -- Public API -----------------------------------------------------------
|
|
943
947
|
/**
|
|
@@ -1054,7 +1058,7 @@ class gt {
|
|
|
1054
1058
|
this.isStale !== t && (this.isStale = t, this.onStaleChange?.(t));
|
|
1055
1059
|
}
|
|
1056
1060
|
}
|
|
1057
|
-
class
|
|
1061
|
+
class Te {
|
|
1058
1062
|
constructor(t, r) {
|
|
1059
1063
|
this.client = t, this.basePath = r;
|
|
1060
1064
|
}
|
|
@@ -1066,7 +1070,7 @@ class Ee {
|
|
|
1066
1070
|
* @param init - Optional `RequestInit` overrides (e.g. `{ signal }`).
|
|
1067
1071
|
*/
|
|
1068
1072
|
async fetchSection(t, r, n) {
|
|
1069
|
-
const o =
|
|
1073
|
+
const o = ve(t), s = r ? `${this.basePath}${o}?${r}` : `${this.basePath}${o}`;
|
|
1070
1074
|
return this.client.fetch(s, n);
|
|
1071
1075
|
}
|
|
1072
1076
|
/**
|
|
@@ -1135,15 +1139,15 @@ class Ee {
|
|
|
1135
1139
|
return this.client.fetch(`${this.basePath}/emails/${t}/preview`);
|
|
1136
1140
|
}
|
|
1137
1141
|
}
|
|
1138
|
-
function
|
|
1142
|
+
function Ce(e) {
|
|
1139
1143
|
if (!e || typeof e != "object") return !1;
|
|
1140
1144
|
const t = e;
|
|
1141
1145
|
return t.data !== void 0 && t.meta !== void 0;
|
|
1142
1146
|
}
|
|
1143
|
-
function
|
|
1147
|
+
function ke(e, t) {
|
|
1144
1148
|
return t.aborted ? !0 : e instanceof DOMException && e.name === "AbortError";
|
|
1145
1149
|
}
|
|
1146
|
-
class
|
|
1150
|
+
class yt {
|
|
1147
1151
|
// -- Dependencies ---------------------------------------------------------
|
|
1148
1152
|
client;
|
|
1149
1153
|
api;
|
|
@@ -1172,7 +1176,7 @@ class mt {
|
|
|
1172
1176
|
/** AbortController for the current in-flight fetch. */
|
|
1173
1177
|
abortController = null;
|
|
1174
1178
|
constructor(t) {
|
|
1175
|
-
this.client = new v({ baseUrl: t.baseUrl, authToken: t.authToken }), this.api = new
|
|
1179
|
+
this.client = new v({ baseUrl: t.baseUrl, authToken: t.authToken }), this.api = new Te(this.client, t.endpoint), this.endpoint = t.endpoint, this.section = t.section, this.perPage = t.perPage, this.callbacks = t.callbacks;
|
|
1176
1180
|
}
|
|
1177
1181
|
// -- Public API -----------------------------------------------------------
|
|
1178
1182
|
/**
|
|
@@ -1321,12 +1325,12 @@ class mt {
|
|
|
1321
1325
|
}
|
|
1322
1326
|
/** Check if an error should be silently ignored (abort or stale). */
|
|
1323
1327
|
shouldIgnoreError(t, r, n) {
|
|
1324
|
-
return
|
|
1328
|
+
return ke(t, r) ? !0 : this.isStaleResponse(n);
|
|
1325
1329
|
}
|
|
1326
1330
|
/** Build query string from current controller state. */
|
|
1327
1331
|
buildCurrentQueryString() {
|
|
1328
1332
|
const t = this.sort ? this.sort.replace(/[A-Z]/g, (n) => "_" + n.toLowerCase()) : void 0, r = this.filters;
|
|
1329
|
-
return
|
|
1333
|
+
return he({
|
|
1330
1334
|
page: this.page,
|
|
1331
1335
|
perPage: this.perPage,
|
|
1332
1336
|
search: this.search,
|
|
@@ -1338,7 +1342,7 @@ class mt {
|
|
|
1338
1342
|
}
|
|
1339
1343
|
/** Apply a successful fetch result to the callbacks. */
|
|
1340
1344
|
applyFetchResult(t) {
|
|
1341
|
-
|
|
1345
|
+
Ce(t) ? (this.callbacks.onData(t.data), this.callbacks.onPagination(t.meta)) : (this.callbacks.onData(t), this.callbacks.onPagination(null)), this.callbacks.onError(null), this.callbacks.onLoading(!1), this.hasFetched = !0;
|
|
1342
1346
|
}
|
|
1343
1347
|
/** Handle a fetch error (unauthorized, network, etc.). */
|
|
1344
1348
|
handleFetchError(t, r) {
|
|
@@ -1358,7 +1362,7 @@ class mt {
|
|
|
1358
1362
|
this.timer && (clearInterval(this.timer), this.timer = null);
|
|
1359
1363
|
}
|
|
1360
1364
|
}
|
|
1361
|
-
const
|
|
1365
|
+
const bt = {
|
|
1362
1366
|
// ---------------------------------------------------------------------------
|
|
1363
1367
|
// Debug-panel tabs / Dashboard sidebar sections (shared)
|
|
1364
1368
|
// ---------------------------------------------------------------------------
|
|
@@ -1550,8 +1554,8 @@ const yt = {
|
|
|
1550
1554
|
viewBox: "0 0 16 16",
|
|
1551
1555
|
elements: ['<path d="M6 3H3v10h10v-3M9 1h6v6M7 9L15 1"/>']
|
|
1552
1556
|
}
|
|
1553
|
-
},
|
|
1554
|
-
function
|
|
1557
|
+
}, Me = "ss-col-resize", F = "ss-resizing";
|
|
1558
|
+
function xt(e) {
|
|
1555
1559
|
const t = Array.from(e.querySelectorAll("thead th"));
|
|
1556
1560
|
if (t.length === 0) return () => {
|
|
1557
1561
|
};
|
|
@@ -1581,7 +1585,7 @@ function bt(e) {
|
|
|
1581
1585
|
};
|
|
1582
1586
|
if (!s.textContent?.trim()) continue;
|
|
1583
1587
|
const a = document.createElement("div");
|
|
1584
|
-
a.className =
|
|
1588
|
+
a.className = Me, s.appendChild(a), a.addEventListener("pointerdown", i), r.push(() => {
|
|
1585
1589
|
a.removeEventListener("pointerdown", i), a.remove();
|
|
1586
1590
|
});
|
|
1587
1591
|
}
|
|
@@ -1589,7 +1593,7 @@ function bt(e) {
|
|
|
1589
1593
|
for (const s of r) s();
|
|
1590
1594
|
};
|
|
1591
1595
|
}
|
|
1592
|
-
class
|
|
1596
|
+
class St {
|
|
1593
1597
|
client;
|
|
1594
1598
|
endpoint;
|
|
1595
1599
|
refreshInterval;
|
|
@@ -1689,7 +1693,7 @@ class xt {
|
|
|
1689
1693
|
const r = new AbortController();
|
|
1690
1694
|
this.abortController = r;
|
|
1691
1695
|
try {
|
|
1692
|
-
const n = `${this.endpoint}${
|
|
1696
|
+
const n = `${this.endpoint}${Se(t)}`, o = await this.client.fetch(n, { signal: r.signal });
|
|
1693
1697
|
if (r.signal.aborted) return;
|
|
1694
1698
|
this.callbacks.onData(o), this.callbacks.onError(null), this.callbacks.onLoading(!1);
|
|
1695
1699
|
} catch (n) {
|
|
@@ -1711,21 +1715,21 @@ class xt {
|
|
|
1711
1715
|
}
|
|
1712
1716
|
}
|
|
1713
1717
|
}
|
|
1714
|
-
const
|
|
1715
|
-
function
|
|
1718
|
+
const wt = ["all", "error", "warn", "info", "debug"];
|
|
1719
|
+
function Pe(e) {
|
|
1716
1720
|
return (e.levelName || e.level_name || (typeof e.level == "string" ? e.level : "") || "info").toLowerCase();
|
|
1717
1721
|
}
|
|
1718
|
-
function
|
|
1722
|
+
function vt(e) {
|
|
1719
1723
|
return e.msg || e.message || JSON.stringify(e);
|
|
1720
1724
|
}
|
|
1721
|
-
function
|
|
1725
|
+
function Et(e) {
|
|
1722
1726
|
return e.createdAt || e.created_at || e.time || e.timestamp || 0;
|
|
1723
1727
|
}
|
|
1724
|
-
function
|
|
1728
|
+
function Tt(e) {
|
|
1725
1729
|
const t = e.data || {};
|
|
1726
1730
|
return e.requestId || e.request_id || e["x-request-id"] || t.requestId || t.request_id || t["x-request-id"] || "";
|
|
1727
1731
|
}
|
|
1728
|
-
function
|
|
1732
|
+
function Ct(e, t = "ss-dbg-log-level") {
|
|
1729
1733
|
switch (e) {
|
|
1730
1734
|
case "error":
|
|
1731
1735
|
case "fatal":
|
|
@@ -1742,30 +1746,30 @@ function Tt(e, t = "ss-dbg-log-level") {
|
|
|
1742
1746
|
return `${t}-info`;
|
|
1743
1747
|
}
|
|
1744
1748
|
}
|
|
1745
|
-
function
|
|
1749
|
+
function kt(e, t) {
|
|
1746
1750
|
return t === "all" ? e : e.filter((r) => {
|
|
1747
|
-
const n =
|
|
1751
|
+
const n = Pe(r);
|
|
1748
1752
|
return t === "error" ? n === "error" || n === "fatal" : n === t;
|
|
1749
1753
|
});
|
|
1750
1754
|
}
|
|
1751
|
-
function
|
|
1755
|
+
function Mt(e, t) {
|
|
1752
1756
|
if (!t) return e;
|
|
1753
1757
|
const r = t.toLowerCase();
|
|
1754
1758
|
return e.filter(
|
|
1755
1759
|
(n) => n.sql.toLowerCase().includes(r) || n.model && n.model.toLowerCase().includes(r) || n.method.toLowerCase().includes(r)
|
|
1756
1760
|
);
|
|
1757
1761
|
}
|
|
1758
|
-
function
|
|
1762
|
+
function Pt(e) {
|
|
1759
1763
|
const t = {};
|
|
1760
1764
|
for (const r of e)
|
|
1761
1765
|
t[r.sql] = (t[r.sql] || 0) + 1;
|
|
1762
1766
|
return t;
|
|
1763
1767
|
}
|
|
1764
|
-
function
|
|
1768
|
+
function $t(e, t) {
|
|
1765
1769
|
const r = e.filter((s) => s.duration > 100).length, n = Object.values(t).filter((s) => s > 1).length, o = e.length > 0 ? e.reduce((s, i) => s + i.duration, 0) / e.length : 0;
|
|
1766
1770
|
return { slowCount: r, dupCount: n, avgDuration: o, totalCount: e.length };
|
|
1767
1771
|
}
|
|
1768
|
-
const
|
|
1772
|
+
const At = [
|
|
1769
1773
|
"all",
|
|
1770
1774
|
"active",
|
|
1771
1775
|
"waiting",
|
|
@@ -1773,7 +1777,7 @@ const $t = [
|
|
|
1773
1777
|
"completed",
|
|
1774
1778
|
"failed"
|
|
1775
1779
|
];
|
|
1776
|
-
function
|
|
1780
|
+
function Rt(e, t = "ss-dbg-job-status") {
|
|
1777
1781
|
switch (e) {
|
|
1778
1782
|
case "completed":
|
|
1779
1783
|
case "failed":
|
|
@@ -1785,7 +1789,7 @@ function At(e, t = "ss-dbg-job-status") {
|
|
|
1785
1789
|
return "ss-dbg-badge-muted";
|
|
1786
1790
|
}
|
|
1787
1791
|
}
|
|
1788
|
-
function
|
|
1792
|
+
function Lt(e) {
|
|
1789
1793
|
switch (e) {
|
|
1790
1794
|
case "active":
|
|
1791
1795
|
return "blue";
|
|
@@ -1801,18 +1805,18 @@ function Rt(e) {
|
|
|
1801
1805
|
return "muted";
|
|
1802
1806
|
}
|
|
1803
1807
|
}
|
|
1804
|
-
function
|
|
1808
|
+
function Ft(e) {
|
|
1805
1809
|
if (!e) return [];
|
|
1806
1810
|
if (Array.isArray(e)) return e;
|
|
1807
1811
|
const t = e;
|
|
1808
1812
|
return t.jobs || t.data || [];
|
|
1809
1813
|
}
|
|
1810
|
-
function
|
|
1814
|
+
function Ut(e) {
|
|
1811
1815
|
if (!e || Array.isArray(e)) return null;
|
|
1812
1816
|
const t = e;
|
|
1813
1817
|
return t.stats || t.overview || null;
|
|
1814
1818
|
}
|
|
1815
|
-
function
|
|
1819
|
+
function $e(e) {
|
|
1816
1820
|
if (!e) return [];
|
|
1817
1821
|
if (typeof e == "string")
|
|
1818
1822
|
try {
|
|
@@ -1822,7 +1826,7 @@ function Pe(e) {
|
|
|
1822
1826
|
}
|
|
1823
1827
|
return Array.isArray(e) ? e : [];
|
|
1824
1828
|
}
|
|
1825
|
-
function
|
|
1829
|
+
function Ae(e) {
|
|
1826
1830
|
if (!e) return [];
|
|
1827
1831
|
if (typeof e == "string")
|
|
1828
1832
|
try {
|
|
@@ -1835,25 +1839,25 @@ function $e(e) {
|
|
|
1835
1839
|
function C(e, t, r, n = 0) {
|
|
1836
1840
|
return e[t] ?? e[r] ?? n;
|
|
1837
1841
|
}
|
|
1838
|
-
function
|
|
1842
|
+
function Dt(e) {
|
|
1839
1843
|
return {
|
|
1840
1844
|
method: e.method || "",
|
|
1841
1845
|
url: e.url || "",
|
|
1842
1846
|
statusCode: C(e, "status_code", "statusCode"),
|
|
1843
1847
|
totalDuration: C(e, "total_duration", "totalDuration") || e.duration || 0,
|
|
1844
1848
|
spanCount: C(e, "span_count", "spanCount"),
|
|
1845
|
-
spans:
|
|
1846
|
-
warnings:
|
|
1849
|
+
spans: $e(e.spans),
|
|
1850
|
+
warnings: Ae(e.warnings),
|
|
1847
1851
|
logs: e.logs || [],
|
|
1848
1852
|
httpRequestId: e.httpRequestId || e.http_request_id || void 0
|
|
1849
1853
|
};
|
|
1850
1854
|
}
|
|
1851
|
-
const
|
|
1852
|
-
function
|
|
1855
|
+
const Re = ["password", "secret", "token", "key", "credential", "auth"];
|
|
1856
|
+
function Le(e) {
|
|
1853
1857
|
const t = e.toLowerCase();
|
|
1854
|
-
return
|
|
1858
|
+
return Re.some((r) => t.includes(r));
|
|
1855
1859
|
}
|
|
1856
|
-
function
|
|
1860
|
+
function Fe(e) {
|
|
1857
1861
|
if (e == null) return "-";
|
|
1858
1862
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean")
|
|
1859
1863
|
return String(e);
|
|
@@ -1864,45 +1868,45 @@ function Le(e) {
|
|
|
1864
1868
|
return String(e);
|
|
1865
1869
|
}
|
|
1866
1870
|
}
|
|
1867
|
-
const
|
|
1871
|
+
const Ue = {
|
|
1868
1872
|
collectionInterval: "Stats Collection",
|
|
1869
1873
|
dashboardBroadcast: "Dashboard Broadcast",
|
|
1870
1874
|
debugBroadcast: "Debug Broadcast",
|
|
1871
1875
|
persistFlush: "Persist Flush",
|
|
1872
1876
|
retentionCleanup: "Retention Cleanup"
|
|
1873
1877
|
};
|
|
1874
|
-
function
|
|
1875
|
-
return
|
|
1878
|
+
function Ot(e) {
|
|
1879
|
+
return Ue[e] || e;
|
|
1876
1880
|
}
|
|
1877
|
-
const
|
|
1881
|
+
const De = {
|
|
1878
1882
|
prometheus: "Prometheus",
|
|
1879
1883
|
pinoHook: "Pino Log Hook",
|
|
1880
1884
|
edgePlugin: "Edge Plugin",
|
|
1881
1885
|
cacheInspector: "Cache Inspector",
|
|
1882
1886
|
queueInspector: "Queue Inspector"
|
|
1883
1887
|
};
|
|
1884
|
-
function Ot(e) {
|
|
1885
|
-
return Ue[e] || e;
|
|
1886
|
-
}
|
|
1887
1888
|
function It(e) {
|
|
1889
|
+
return De[e] || e;
|
|
1890
|
+
}
|
|
1891
|
+
function _t(e) {
|
|
1888
1892
|
return "active" in e ? e.active ? "active" : "inactive" : "available" in e ? e.available ? "available" : "unavailable" : "unknown";
|
|
1889
1893
|
}
|
|
1890
|
-
function
|
|
1894
|
+
function Bt(e, t) {
|
|
1891
1895
|
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" : "-";
|
|
1892
1896
|
}
|
|
1893
|
-
function
|
|
1897
|
+
function Ht(e) {
|
|
1894
1898
|
return Object.entries(e).map(([t, r]) => ({
|
|
1895
1899
|
key: t,
|
|
1896
|
-
value:
|
|
1897
|
-
secret:
|
|
1900
|
+
value: Fe(r),
|
|
1901
|
+
secret: Le(t)
|
|
1898
1902
|
}));
|
|
1899
1903
|
}
|
|
1900
|
-
function
|
|
1904
|
+
function Nt(e, t) {
|
|
1901
1905
|
return t ? Math.min(100, Math.round(e / t * 100)) : 0;
|
|
1902
1906
|
}
|
|
1903
|
-
const
|
|
1904
|
-
function
|
|
1905
|
-
return
|
|
1907
|
+
const Oe = ["healthy", "active", "connected", "available", "ready"], Ie = ["errored", "unavailable"];
|
|
1908
|
+
function qt(e) {
|
|
1909
|
+
return Oe.includes(e) ? "ok" : Ie.includes(e) ? "err" : "";
|
|
1906
1910
|
}
|
|
1907
1911
|
function $(e) {
|
|
1908
1912
|
return e !== null && typeof e == "object" && !Array.isArray(e) && e.__redacted === !0;
|
|
@@ -1910,41 +1914,41 @@ function $(e) {
|
|
|
1910
1914
|
function w(e) {
|
|
1911
1915
|
return e != null && typeof e == "object" && !Array.isArray(e) && !$(e);
|
|
1912
1916
|
}
|
|
1913
|
-
function
|
|
1917
|
+
function _e(e, t = "") {
|
|
1914
1918
|
if (!w(e))
|
|
1915
1919
|
return [{ path: t, value: e }];
|
|
1916
1920
|
const r = [];
|
|
1917
1921
|
for (const n of Object.keys(e)) {
|
|
1918
1922
|
const o = t ? `${t}.${n}` : n, s = e[n];
|
|
1919
|
-
w(s) ? r.push(...
|
|
1923
|
+
w(s) ? r.push(..._e(s, o)) : r.push({ path: o, value: s });
|
|
1920
1924
|
}
|
|
1921
1925
|
return r;
|
|
1922
1926
|
}
|
|
1923
|
-
function
|
|
1927
|
+
function Kt(e) {
|
|
1924
1928
|
return e == null ? { text: "null", color: "var(--ss-dim)" } : typeof e == "boolean" ? {
|
|
1925
1929
|
text: String(e),
|
|
1926
1930
|
color: e ? "var(--ss-green-fg)" : "var(--ss-red-fg)"
|
|
1927
1931
|
} : 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) };
|
|
1928
1932
|
}
|
|
1929
|
-
function
|
|
1933
|
+
function Be(e) {
|
|
1930
1934
|
if (e == null || typeof e != "object" || Array.isArray(e) || $(e))
|
|
1931
1935
|
return 1;
|
|
1932
1936
|
let t = 0;
|
|
1933
1937
|
for (const r of Object.keys(e))
|
|
1934
|
-
t +=
|
|
1938
|
+
t += Be(e[r]);
|
|
1935
1939
|
return t;
|
|
1936
1940
|
}
|
|
1937
|
-
function
|
|
1941
|
+
function zt(e) {
|
|
1938
1942
|
if (!w(e)) return [];
|
|
1939
1943
|
const t = [];
|
|
1940
1944
|
for (const r of Object.keys(e))
|
|
1941
1945
|
w(e[r]) && t.push(r);
|
|
1942
1946
|
return t;
|
|
1943
1947
|
}
|
|
1944
|
-
function
|
|
1948
|
+
function jt(e, t, r) {
|
|
1945
1949
|
return !r || e.toLowerCase().includes(r) ? !0 : ($(t) ? t.display : t == null ? "" : String(t)).toLowerCase().includes(r);
|
|
1946
1950
|
}
|
|
1947
|
-
function
|
|
1951
|
+
function Vt(e, t, r) {
|
|
1948
1952
|
t && navigator.clipboard.writeText(e).then(() => {
|
|
1949
1953
|
const n = t.textContent;
|
|
1950
1954
|
t.textContent = "✓", t.classList.add(`${r}-copy-row-ok`), setTimeout(() => {
|
|
@@ -1953,7 +1957,7 @@ function jt(e, t, r) {
|
|
|
1953
1957
|
}).catch(() => {
|
|
1954
1958
|
});
|
|
1955
1959
|
}
|
|
1956
|
-
const
|
|
1960
|
+
const He = /* @__PURE__ */ new Set([
|
|
1957
1961
|
"secret",
|
|
1958
1962
|
"key",
|
|
1959
1963
|
"token",
|
|
@@ -1967,7 +1971,7 @@ const Be = /* @__PURE__ */ new Set([
|
|
|
1967
1971
|
"private",
|
|
1968
1972
|
"encryption"
|
|
1969
1973
|
]);
|
|
1970
|
-
function
|
|
1974
|
+
function Ne(e) {
|
|
1971
1975
|
const t = e.split(/[._-]/), r = [];
|
|
1972
1976
|
for (const n of t) {
|
|
1973
1977
|
const o = n.split(new RegExp("(?<=[a-z])(?=[A-Z])"));
|
|
@@ -1976,119 +1980,120 @@ function He(e) {
|
|
|
1976
1980
|
}
|
|
1977
1981
|
return r;
|
|
1978
1982
|
}
|
|
1979
|
-
function
|
|
1980
|
-
return
|
|
1983
|
+
function Wt(e) {
|
|
1984
|
+
return Ne(e).some((r) => He.has(r.toLowerCase()));
|
|
1981
1985
|
}
|
|
1982
|
-
const
|
|
1986
|
+
const Gt = new RegExp("secret|password|pass(?:word)?|pwd|token|(?:^|[._-])key(?:[._-]|$)|(?<=[a-z])Key|apikey|api_key|auth|credential|private|encryption", "i");
|
|
1983
1987
|
export {
|
|
1984
1988
|
v as ApiClient,
|
|
1985
1989
|
B as ApiError,
|
|
1986
|
-
|
|
1990
|
+
we as DASHBOARD_SECTION_PATHS,
|
|
1987
1991
|
Y as DEBUG_REFRESH_MS,
|
|
1988
|
-
|
|
1989
|
-
|
|
1992
|
+
xe as DEBUG_TAB_PATHS,
|
|
1993
|
+
ge as DEFAULT_FEATURES,
|
|
1990
1994
|
O as DEFAULT_PER_PAGE,
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1995
|
+
Te as DashboardApi,
|
|
1996
|
+
yt as DashboardDataController,
|
|
1997
|
+
St as DebugDataController,
|
|
1998
|
+
Ie as ERROR_STATUSES,
|
|
1999
|
+
De as INTEGRATION_LABELS,
|
|
2000
|
+
At as JOB_STATUS_FILTERS,
|
|
2001
|
+
wt as LOG_LEVELS,
|
|
1998
2002
|
ee as MAX_HISTORY,
|
|
1999
2003
|
P as METRIC_DEFINITIONS,
|
|
2000
|
-
|
|
2004
|
+
Oe as OK_STATUSES,
|
|
2001
2005
|
Q as OVERVIEW_REFRESH_MS,
|
|
2002
|
-
|
|
2006
|
+
Gt as REDACT_PATTERN,
|
|
2003
2007
|
J as SECTION_REFRESH_MS,
|
|
2004
2008
|
X as SLOW_DURATION_MS,
|
|
2005
2009
|
te as STALE_MS,
|
|
2006
|
-
|
|
2007
|
-
|
|
2010
|
+
mt as ServerStatsController,
|
|
2011
|
+
bt as TAB_ICONS,
|
|
2008
2012
|
ce as THRESHOLD_CSS_CLASS,
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2013
|
+
Xe as THRESHOLD_CSS_VAR,
|
|
2014
|
+
Ye as THRESHOLD_HEX_FALLBACK,
|
|
2015
|
+
Ue as TIMER_LABELS,
|
|
2012
2016
|
b as UnauthorizedError,
|
|
2013
2017
|
Z as VERY_SLOW_DURATION_MS,
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2018
|
+
he as buildQueryParams,
|
|
2019
|
+
st as buildQueryString,
|
|
2020
|
+
Ve as buildSparklineData,
|
|
2021
|
+
qt as classifyStatus,
|
|
2022
|
+
zt as collectTopLevelObjectKeys,
|
|
2019
2023
|
L as compactPreview,
|
|
2020
|
-
|
|
2021
|
-
|
|
2024
|
+
lt as computePagination,
|
|
2025
|
+
$t as computeQuerySummary,
|
|
2022
2026
|
G as computeStats,
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2027
|
+
Vt as copyWithFeedback,
|
|
2028
|
+
Pt as countDuplicateQueries,
|
|
2029
|
+
Be as countLeaves,
|
|
2030
|
+
at as createFilterState,
|
|
2031
|
+
Ee as createHistoryBuffer,
|
|
2032
|
+
it as createPaginationState,
|
|
2033
|
+
ct as createSortState,
|
|
2030
2034
|
q as createTransmitSubscription,
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
kt as
|
|
2040
|
-
|
|
2035
|
+
ht as detectFeatures,
|
|
2036
|
+
ft as detectMetricGroupsFromStats,
|
|
2037
|
+
et as durationClassName,
|
|
2038
|
+
le as durationSeverity,
|
|
2039
|
+
Ut as extractJobStats,
|
|
2040
|
+
Ft as extractJobs,
|
|
2041
|
+
ye as fetchFeatures,
|
|
2042
|
+
Nt as fillPercent,
|
|
2043
|
+
kt as filterLogsByLevel,
|
|
2044
|
+
Mt as filterQueries,
|
|
2045
|
+
_e as flattenConfig,
|
|
2041
2046
|
M as formatBytes,
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2047
|
+
nt as formatCacheSize,
|
|
2048
|
+
Ht as formatCollectorConfig,
|
|
2049
|
+
Fe as formatConfigVal,
|
|
2045
2050
|
ie as formatCount,
|
|
2046
|
-
|
|
2047
|
-
|
|
2051
|
+
We as formatDuration,
|
|
2052
|
+
Kt as formatFlatValue,
|
|
2048
2053
|
A as formatMb,
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2054
|
+
Je as formatStatNum,
|
|
2055
|
+
Ge as formatTime,
|
|
2056
|
+
rt as formatTtl,
|
|
2052
2057
|
oe as formatUptime,
|
|
2053
2058
|
W as generateGradientId,
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2059
|
+
je as generateSparklinePath,
|
|
2060
|
+
ze as generateSparklinePoints,
|
|
2061
|
+
ve as getDashboardSectionPath,
|
|
2062
|
+
Se as getDebugTabPath,
|
|
2063
|
+
Bt as getIntegrationDetails,
|
|
2064
|
+
It as getIntegrationLabel,
|
|
2065
|
+
_t as getIntegrationStatus,
|
|
2066
|
+
Lt as getJobStatusBadgeColor,
|
|
2067
|
+
Rt as getJobStatusCssClass,
|
|
2068
|
+
Ct as getLogLevelCssClass,
|
|
2069
|
+
pt as getMetricById,
|
|
2070
|
+
gt as getMetricsByGroup,
|
|
2071
|
+
ut as getPageNumbers,
|
|
2067
2072
|
R as getRatioColor,
|
|
2068
2073
|
U as getTheme,
|
|
2069
2074
|
x as getThresholdColor,
|
|
2070
2075
|
ae as getThresholdColorInverse,
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2076
|
+
Ot as getTimerLabel,
|
|
2077
|
+
dt as getVisibleMetricGroups,
|
|
2078
|
+
xt as initResizableColumns,
|
|
2074
2079
|
$ as isRedactedValue,
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2080
|
+
Le as isSecretKey,
|
|
2081
|
+
jt as matchesConfigSearch,
|
|
2082
|
+
Dt as normalizeTraceFields,
|
|
2083
|
+
Ke as onThemeChange,
|
|
2084
|
+
ot as parsePaginatedResponse,
|
|
2085
|
+
$e as parseTraceSpans,
|
|
2086
|
+
Ae as parseTraceWarnings,
|
|
2087
|
+
Pe as resolveLogLevel,
|
|
2088
|
+
vt as resolveLogMessage,
|
|
2089
|
+
Tt as resolveLogRequestId,
|
|
2090
|
+
Et as resolveLogTimestamp,
|
|
2086
2091
|
C as resolveTraceField,
|
|
2087
2092
|
z as setTheme,
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2093
|
+
tt as shortReqId,
|
|
2094
|
+
Wt as shouldRedact,
|
|
2095
|
+
Ze as statusColor,
|
|
2091
2096
|
K as subscribeToChannel,
|
|
2092
|
-
|
|
2093
|
-
|
|
2097
|
+
Qe as timeAgo,
|
|
2098
|
+
qe as toggleTheme
|
|
2094
2099
|
};
|