@gravitee/gamma-lib-observability 1.35.1 → 1.35.2
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/index.js +567 -581
- package/dist/logs/detail/components/LogDetailContextChart.d.ts +2 -1
- package/dist/logs/detail/components/LogDetailContextChart.d.ts.map +1 -1
- package/dist/logs/detail/components/LogDetailHeader.d.ts.map +1 -1
- package/dist/logs/detail/presets/connection-log-preset.d.ts +2 -1
- package/dist/logs/detail/presets/connection-log-preset.d.ts.map +1 -1
- package/dist/logs/detail/presets/message-log-preset.d.ts +2 -1
- package/dist/logs/detail/presets/message-log-preset.d.ts.map +1 -1
- package/dist/logs/detail/presets/webhook-log-preset.d.ts +2 -1
- package/dist/logs/detail/presets/webhook-log-preset.d.ts.map +1 -1
- package/dist/logs/detail/testing/mock-log-detail-fixtures.d.ts.map +1 -1
- package/dist/logs/detail/types.d.ts +6 -3
- package/dist/logs/detail/types.d.ts.map +1 -1
- package/dist/logs/map-log-columns.d.ts.map +1 -1
- package/dist/shared/format-time.d.ts +18 -0
- package/dist/shared/format-time.d.ts.map +1 -0
- package/dist/traces/format-utils.d.ts +2 -0
- package/dist/traces/format-utils.d.ts.map +1 -1
- package/dist/types/connection-log.d.ts +5 -2
- package/dist/types/connection-log.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g, v as _, y as v } from "./filter-providers-context.js";
|
|
2
|
-
import { AlertCircleIcon as y, AlignRightIcon as b, ArrowLeftIcon as x, ArrowRightIcon as S, BoxesIcon as C, BrainCircuitIcon as w, CableIcon as ee, CalendarIcon as te, ChartLineIcon as ne, ChevronDownIcon as re, ChevronRightIcon as ie, CircleHelpIcon as ae, CopyIcon as oe, ExpandIcon as se, FileTextIcon as ce, FilterIcon as le, FunnelXIcon as ue, GlobeIcon as de, InfoIcon as fe, MessageSquareIcon as
|
|
3
|
-
import { Component as
|
|
2
|
+
import { AlertCircleIcon as y, AlignRightIcon as b, ArrowLeftIcon as x, ArrowRightIcon as S, BoxesIcon as C, BrainCircuitIcon as w, CableIcon as ee, CalendarIcon as te, ChartLineIcon as ne, ChevronDownIcon as re, ChevronRightIcon as ie, CircleHelpIcon as ae, CopyIcon as oe, ExpandIcon as se, FileTextIcon as ce, FilterIcon as le, FunnelXIcon as ue, GlobeIcon as de, InfoIcon as fe, MessageSquareIcon as T, PanelLeftIcon as E, PlusIcon as D, RefreshCwIcon as pe, SearchIcon as me, WebhookIcon as he, XIcon as ge } from "@gravitee/graphene-core/icons";
|
|
3
|
+
import { Component as _e, Fragment as ve, Suspense as ye, createContext as be, createElement as xe, forwardRef as Se, lazy as Ce, memo as we, useCallback as O, useContext as Te, useEffect as k, useId as Ee, useMemo as A, useRef as j, useState as M } from "react";
|
|
4
4
|
import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
|
|
5
5
|
import { keepPreviousData as De, useInfiniteQuery as Oe, useQueries as ke, useQuery as I, useQueryClient as Ae } from "@tanstack/react-query";
|
|
6
6
|
import { Accordion as je, AccordionContent as Me, AccordionItem as Ne, AccordionTrigger as Pe, Alert as Fe, AlertDescription as Ie, Badge as L, Button as R, Calendar as Le, Card as Re, Combobox as ze, ComboboxChip as Be, ComboboxChips as Ve, ComboboxChipsInput as He, ComboboxContent as Ue, ComboboxEmpty as We, ComboboxInput as Ge, ComboboxItem as Ke, ComboboxList as qe, ComboboxValue as Je, DataTable as Ye, DataTablePagination as Xe, Empty as Ze, EmptyDescription as Qe, EmptyHeader as $e, EmptyMedia as et, EmptyTitle as tt, Field as nt, FieldError as rt, FieldLabel as it, Input as at, Label as ot, Popover as st, PopoverAnchor as ct, PopoverContent as lt, PopoverTrigger as ut, ScrollArea as dt, Select as ft, SelectContent as pt, SelectItem as mt, SelectTrigger as ht, SelectValue as gt, Separator as _t, Sheet as vt, SheetContent as yt, SheetDescription as bt, SheetTitle as xt, Skeleton as z, Spinner as St, Tabs as Ct, TabsContent as wt, TabsList as Tt, TabsTrigger as Et, Textarea as Dt, ToggleGroup as Ot, ToggleGroupItem as kt, Tooltip as B, TooltipContent as V, TooltipProvider as H, TooltipTrigger as U, cn as W, toast as At, useComboboxAnchor as jt } from "@gravitee/graphene-core";
|
|
@@ -33,14 +33,14 @@ var fn = [
|
|
|
33
33
|
{
|
|
34
34
|
id: "MESSAGE",
|
|
35
35
|
label: "Message",
|
|
36
|
-
icon:
|
|
36
|
+
icon: T,
|
|
37
37
|
colorClass: "text-chart-7",
|
|
38
38
|
bgClass: "bg-chart-7/10"
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
id: "WEBHOOK",
|
|
42
42
|
label: "Webhook",
|
|
43
|
-
icon:
|
|
43
|
+
icon: he,
|
|
44
44
|
colorClass: "text-chart-9",
|
|
45
45
|
bgClass: "bg-chart-9/10"
|
|
46
46
|
}
|
|
@@ -110,7 +110,7 @@ function G(e) {
|
|
|
110
110
|
}
|
|
111
111
|
//#endregion
|
|
112
112
|
//#region src/providers/live-refresh-provider.tsx
|
|
113
|
-
var En = 6e4, Dn =
|
|
113
|
+
var En = 6e4, Dn = be(null);
|
|
114
114
|
function On({ config: e, children: t }) {
|
|
115
115
|
let n = e?.intervalMs ?? 6e4, r = e?.onResume, [i, a] = M(e?.defaultEnabled ?? !0), [o, s] = M(!1), c = O(() => a((e) => !e), []), l = j(i);
|
|
116
116
|
k(() => {
|
|
@@ -143,7 +143,7 @@ function An() {
|
|
|
143
143
|
}
|
|
144
144
|
//#endregion
|
|
145
145
|
//#region src/providers/FilterSourceProvider.tsx
|
|
146
|
-
var jn =
|
|
146
|
+
var jn = be(void 0);
|
|
147
147
|
function Mn({ source: e, children: t }) {
|
|
148
148
|
return /* @__PURE__ */ P(jn.Provider, {
|
|
149
149
|
value: e,
|
|
@@ -155,7 +155,7 @@ function Nn() {
|
|
|
155
155
|
}
|
|
156
156
|
//#endregion
|
|
157
157
|
//#region src/providers/http-provider.tsx
|
|
158
|
-
var Pn =
|
|
158
|
+
var Pn = be(void 0);
|
|
159
159
|
function Fn({ options: e, children: t }) {
|
|
160
160
|
return /* @__PURE__ */ P(Pn.Provider, {
|
|
161
161
|
value: e,
|
|
@@ -382,7 +382,7 @@ function J(...e) {
|
|
|
382
382
|
}
|
|
383
383
|
//#endregion
|
|
384
384
|
//#region src/providers/ContextFiltersProvider.tsx
|
|
385
|
-
var qn =
|
|
385
|
+
var qn = be([]);
|
|
386
386
|
function Jn({ filters: e, children: t }) {
|
|
387
387
|
let n = A(() => e, [e]);
|
|
388
388
|
return /* @__PURE__ */ P(qn.Provider, {
|
|
@@ -1219,7 +1219,7 @@ function Xr({ options: e, selected: t, onSelectedChange: n, multiple: r, onSearc
|
|
|
1219
1219
|
onValueChange: (e) => n(Array.isArray(e) ? e : []),
|
|
1220
1220
|
children: [/* @__PURE__ */ P(Ve, {
|
|
1221
1221
|
ref: u,
|
|
1222
|
-
children: /* @__PURE__ */ P(Je, { children: (e) => /* @__PURE__ */ F(
|
|
1222
|
+
children: /* @__PURE__ */ P(Je, { children: (e) => /* @__PURE__ */ F(ve, { children: [e.map((e) => /* @__PURE__ */ P(Be, {
|
|
1223
1223
|
removeAriaLabel: `Remove ${e.label}`,
|
|
1224
1224
|
children: e.label
|
|
1225
1225
|
}, e.value)), /* @__PURE__ */ P(He, {
|
|
@@ -1852,7 +1852,7 @@ var Bi = we(Se(function({ condition: e, onEdit: t, onRemove: n, editable: r = !0
|
|
|
1852
1852
|
"aria-label": `Remove filter ${u.name}`,
|
|
1853
1853
|
onClick: g,
|
|
1854
1854
|
tabIndex: 0,
|
|
1855
|
-
children: /* @__PURE__ */ P(
|
|
1855
|
+
children: /* @__PURE__ */ P(ge, {
|
|
1856
1856
|
className: "size-3",
|
|
1857
1857
|
"aria-hidden": "true"
|
|
1858
1858
|
})
|
|
@@ -1979,7 +1979,7 @@ function Xi({ filters: e, onFiltersChange: t, editable: n = !0, scopeFilterField
|
|
|
1979
1979
|
size: "sm",
|
|
1980
1980
|
onClick: b,
|
|
1981
1981
|
className: "shrink-0",
|
|
1982
|
-
children: [/* @__PURE__ */ P(
|
|
1982
|
+
children: [/* @__PURE__ */ P(D, {
|
|
1983
1983
|
className: "size-4",
|
|
1984
1984
|
"aria-hidden": "true"
|
|
1985
1985
|
}), "Add filter"]
|
|
@@ -2028,7 +2028,7 @@ function Xi({ filters: e, onFiltersChange: t, editable: n = !0, scopeFilterField
|
|
|
2028
2028
|
}
|
|
2029
2029
|
//#endregion
|
|
2030
2030
|
//#region src/dashboards/WidgetGroupContext.tsx
|
|
2031
|
-
var Zi = [], Qi =
|
|
2031
|
+
var Zi = [], Qi = be(null), $i = Qi.Provider;
|
|
2032
2032
|
function ea() {
|
|
2033
2033
|
return Te(Qi);
|
|
2034
2034
|
}
|
|
@@ -3095,7 +3095,7 @@ function No(e, t) {
|
|
|
3095
3095
|
}
|
|
3096
3096
|
//#endregion
|
|
3097
3097
|
//#region src/dashboards/templates/DashboardTemplatesProvider.tsx
|
|
3098
|
-
var Po =
|
|
3098
|
+
var Po = be(null);
|
|
3099
3099
|
function Fo({ templates: e, children: t }) {
|
|
3100
3100
|
let n = A(() => e, [e]);
|
|
3101
3101
|
return /* @__PURE__ */ P(Po.Provider, {
|
|
@@ -3266,7 +3266,7 @@ function Uo({ message: e, onRetry: t, className: n }) {
|
|
|
3266
3266
|
variant: "outline",
|
|
3267
3267
|
size: "sm",
|
|
3268
3268
|
onClick: t,
|
|
3269
|
-
children: [/* @__PURE__ */ P(
|
|
3269
|
+
children: [/* @__PURE__ */ P(pe, { className: "size-3.5" }), "Retry"]
|
|
3270
3270
|
})
|
|
3271
3271
|
]
|
|
3272
3272
|
});
|
|
@@ -3317,8 +3317,22 @@ function Ko() {
|
|
|
3317
3317
|
};
|
|
3318
3318
|
}
|
|
3319
3319
|
//#endregion
|
|
3320
|
+
//#region src/shared/format-time.ts
|
|
3321
|
+
function qo(e, t) {
|
|
3322
|
+
return new Date(e).toLocaleString(void 0, {
|
|
3323
|
+
year: "numeric",
|
|
3324
|
+
month: "2-digit",
|
|
3325
|
+
day: "2-digit",
|
|
3326
|
+
hour: "2-digit",
|
|
3327
|
+
minute: "2-digit",
|
|
3328
|
+
second: "2-digit",
|
|
3329
|
+
hour12: !1,
|
|
3330
|
+
...t?.fractionalSecondDigits ? { fractionalSecondDigits: t.fractionalSecondDigits } : {}
|
|
3331
|
+
});
|
|
3332
|
+
}
|
|
3333
|
+
//#endregion
|
|
3320
3334
|
//#region src/logs/LogSeverityBadge.tsx
|
|
3321
|
-
var
|
|
3335
|
+
var Jo = {
|
|
3322
3336
|
trace: "outline",
|
|
3323
3337
|
debug: "secondary",
|
|
3324
3338
|
info: "highlight",
|
|
@@ -3326,20 +3340,20 @@ var qo = {
|
|
|
3326
3340
|
error: "destructive",
|
|
3327
3341
|
fatal: "destructive"
|
|
3328
3342
|
};
|
|
3329
|
-
function
|
|
3330
|
-
return e in
|
|
3343
|
+
function Yo(e) {
|
|
3344
|
+
return e in Jo;
|
|
3331
3345
|
}
|
|
3332
|
-
function
|
|
3346
|
+
function Xo({ level: e }) {
|
|
3333
3347
|
if (!e) return null;
|
|
3334
3348
|
let t = e.toLowerCase();
|
|
3335
3349
|
return /* @__PURE__ */ P(L, {
|
|
3336
|
-
variant:
|
|
3350
|
+
variant: Yo(t) ? Jo[t] : "secondary",
|
|
3337
3351
|
children: e.toUpperCase()
|
|
3338
3352
|
});
|
|
3339
3353
|
}
|
|
3340
3354
|
//#endregion
|
|
3341
3355
|
//#region src/logs/map-log-columns.tsx
|
|
3342
|
-
var
|
|
3356
|
+
var Zo = {
|
|
3343
3357
|
GET: "success",
|
|
3344
3358
|
POST: "default",
|
|
3345
3359
|
PUT: "warning",
|
|
@@ -3348,32 +3362,23 @@ var Xo = {
|
|
|
3348
3362
|
HEAD: "secondary",
|
|
3349
3363
|
OPTIONS: "secondary"
|
|
3350
3364
|
};
|
|
3351
|
-
function Zo(e) {
|
|
3352
|
-
let t = typeof e == "number" ? new Date(e) : new Date(String(e));
|
|
3353
|
-
return Number.isNaN(t.getTime()) ? String(e) : new Intl.DateTimeFormat("en-US", {
|
|
3354
|
-
year: "numeric",
|
|
3355
|
-
month: "2-digit",
|
|
3356
|
-
day: "2-digit",
|
|
3357
|
-
hour: "2-digit",
|
|
3358
|
-
minute: "2-digit",
|
|
3359
|
-
second: "2-digit",
|
|
3360
|
-
fractionalSecondDigits: 3,
|
|
3361
|
-
hour12: !1
|
|
3362
|
-
}).format(t);
|
|
3363
|
-
}
|
|
3364
3365
|
function Qo(e) {
|
|
3366
|
+
let t = typeof e == "number" ? e : Number(e);
|
|
3367
|
+
return Number.isFinite(t) ? qo(t, { fractionalSecondDigits: 3 }) : String(e);
|
|
3368
|
+
}
|
|
3369
|
+
function $o(e) {
|
|
3365
3370
|
let t = typeof e == "number" ? e : Number(e);
|
|
3366
3371
|
return Number.isNaN(t) ? String(e) : t < 1e3 ? `${Math.round(t)}ms` : `${(t / 1e3).toFixed(2)}s`;
|
|
3367
3372
|
}
|
|
3368
|
-
var
|
|
3369
|
-
function
|
|
3373
|
+
var es = ["unknown"];
|
|
3374
|
+
function ts(e, t) {
|
|
3370
3375
|
if (t.length === 0) return !1;
|
|
3371
3376
|
let n = String(e).trim().toLowerCase();
|
|
3372
3377
|
return t.some((e) => e.trim().toLowerCase() === n);
|
|
3373
3378
|
}
|
|
3374
|
-
function
|
|
3379
|
+
function ns(e, t, n, r) {
|
|
3375
3380
|
let i = e.href?.(t);
|
|
3376
|
-
return !i ||
|
|
3381
|
+
return !i || ts(r, e.linkSentinels ?? es) ? n : /* @__PURE__ */ P("a", {
|
|
3377
3382
|
href: i,
|
|
3378
3383
|
target: "_blank",
|
|
3379
3384
|
rel: "noopener noreferrer",
|
|
@@ -3382,7 +3387,7 @@ function ts(e, t, n, r) {
|
|
|
3382
3387
|
children: n
|
|
3383
3388
|
});
|
|
3384
3389
|
}
|
|
3385
|
-
function
|
|
3390
|
+
function rs(e, t) {
|
|
3386
3391
|
if (e.render) return e.render(t);
|
|
3387
3392
|
let n = e.value(t);
|
|
3388
3393
|
if (n == null) return /* @__PURE__ */ P("span", {
|
|
@@ -3391,17 +3396,17 @@ function ns(e, t) {
|
|
|
3391
3396
|
});
|
|
3392
3397
|
let r;
|
|
3393
3398
|
switch (e.variant) {
|
|
3394
|
-
case "badge": return /* @__PURE__ */ P(
|
|
3399
|
+
case "badge": return /* @__PURE__ */ P(Xo, { level: String(n) });
|
|
3395
3400
|
case "datetime":
|
|
3396
3401
|
r = /* @__PURE__ */ P("span", {
|
|
3397
3402
|
className: "font-mono text-xs",
|
|
3398
|
-
children:
|
|
3403
|
+
children: Qo(n)
|
|
3399
3404
|
});
|
|
3400
3405
|
break;
|
|
3401
3406
|
case "duration":
|
|
3402
3407
|
r = /* @__PURE__ */ P("span", {
|
|
3403
3408
|
className: "font-mono text-xs",
|
|
3404
|
-
children:
|
|
3409
|
+
children: $o(n)
|
|
3405
3410
|
});
|
|
3406
3411
|
break;
|
|
3407
3412
|
case "status-code": {
|
|
@@ -3415,7 +3420,7 @@ function ns(e, t) {
|
|
|
3415
3420
|
case "http-method": {
|
|
3416
3421
|
let e = String(n).toUpperCase();
|
|
3417
3422
|
r = /* @__PURE__ */ P(L, {
|
|
3418
|
-
variant:
|
|
3423
|
+
variant: Zo[e] ?? "secondary",
|
|
3419
3424
|
children: e
|
|
3420
3425
|
});
|
|
3421
3426
|
break;
|
|
@@ -3425,28 +3430,28 @@ function ns(e, t) {
|
|
|
3425
3430
|
children: String(n)
|
|
3426
3431
|
});
|
|
3427
3432
|
}
|
|
3428
|
-
return
|
|
3433
|
+
return ns(e, t, r, n);
|
|
3429
3434
|
}
|
|
3430
|
-
function
|
|
3435
|
+
function is(e) {
|
|
3431
3436
|
return e.map((e) => ({
|
|
3432
3437
|
id: e.key,
|
|
3433
3438
|
accessorFn: (t) => e.value(t),
|
|
3434
3439
|
header: e.label,
|
|
3435
|
-
cell: ({ row: t }) =>
|
|
3440
|
+
cell: ({ row: t }) => rs(e, t.original),
|
|
3436
3441
|
enableSorting: !1,
|
|
3437
3442
|
enableHiding: !0
|
|
3438
3443
|
}));
|
|
3439
3444
|
}
|
|
3440
|
-
function
|
|
3445
|
+
function as(e) {
|
|
3441
3446
|
let t = {};
|
|
3442
3447
|
for (let n of e) n.defaultVisible === !1 && (t[n.key] = !1);
|
|
3443
3448
|
return t;
|
|
3444
3449
|
}
|
|
3445
3450
|
//#endregion
|
|
3446
3451
|
//#region src/logs/LogTable.tsx
|
|
3447
|
-
function
|
|
3452
|
+
function os({ columns: e, data: t, loading: n, totalCount: r, page: i, pageSize: a, onPageChange: o, onPageSizeChange: s, pageSizeOptions: c, onRowClick: l, toolbar: u, getRowId: d, selectedRowId: f, columnVisibilityStorageKey: p }) {
|
|
3448
3453
|
return /* @__PURE__ */ P(Ho, {
|
|
3449
|
-
columns: A(() =>
|
|
3454
|
+
columns: A(() => is(e), [e]),
|
|
3450
3455
|
data: t,
|
|
3451
3456
|
loading: n,
|
|
3452
3457
|
totalCount: r,
|
|
@@ -3459,7 +3464,7 @@ function as({ columns: e, data: t, loading: n, totalCount: r, page: i, pageSize:
|
|
|
3459
3464
|
getRowId: d,
|
|
3460
3465
|
selectedRowId: f,
|
|
3461
3466
|
columnVisibilityStorageKey: p,
|
|
3462
|
-
defaultColumnVisibility: A(() =>
|
|
3467
|
+
defaultColumnVisibility: A(() => as(e), [e]),
|
|
3463
3468
|
toolbar: u,
|
|
3464
3469
|
emptyMessage: /* @__PURE__ */ P(Ze, { children: /* @__PURE__ */ F($e, { children: [
|
|
3465
3470
|
/* @__PURE__ */ P(et, {
|
|
@@ -3473,7 +3478,7 @@ function as({ columns: e, data: t, loading: n, totalCount: r, page: i, pageSize:
|
|
|
3473
3478
|
}
|
|
3474
3479
|
//#endregion
|
|
3475
3480
|
//#region src/logs/LogsDesyncBanner.tsx
|
|
3476
|
-
function
|
|
3481
|
+
function ss() {
|
|
3477
3482
|
return /* @__PURE__ */ F(Fe, {
|
|
3478
3483
|
variant: "default",
|
|
3479
3484
|
style: { borderColor: "light-dark(oklch(0.79 0.11 230), oklch(0.55 0.11 230))" },
|
|
@@ -3482,24 +3487,24 @@ function os() {
|
|
|
3482
3487
|
}
|
|
3483
3488
|
//#endregion
|
|
3484
3489
|
//#region src/hooks/use-logs-histogram-query.ts
|
|
3485
|
-
var
|
|
3490
|
+
var cs = 40, ls = "HTTP_REQUESTS", us = "COUNT", ds = {
|
|
3486
3491
|
from: 100,
|
|
3487
3492
|
to: 399
|
|
3488
|
-
},
|
|
3493
|
+
}, fs = {
|
|
3489
3494
|
from: 400,
|
|
3490
3495
|
to: 499
|
|
3491
|
-
},
|
|
3496
|
+
}, ps = {
|
|
3492
3497
|
from: 500,
|
|
3493
3498
|
to: 599
|
|
3494
3499
|
};
|
|
3495
|
-
function
|
|
3496
|
-
let { timeRange: t, filters: n, enabled: r = !0 } = e, i = c(), a = J(Y(), n), o = X(t), s = A(() => Qa(o,
|
|
3497
|
-
name:
|
|
3498
|
-
measures: [
|
|
3500
|
+
function ms(e) {
|
|
3501
|
+
let { timeRange: t, filters: n, enabled: r = !0 } = e, i = c(), a = J(Y(), n), o = X(t), s = A(() => Qa(o, cs), [o]), l = A(() => [{
|
|
3502
|
+
name: ls,
|
|
3503
|
+
measures: [us]
|
|
3499
3504
|
}], []), u = A(() => ["HTTP_STATUS"], []), d = A(() => [
|
|
3500
|
-
us,
|
|
3501
3505
|
ds,
|
|
3502
|
-
fs
|
|
3506
|
+
fs,
|
|
3507
|
+
ps
|
|
3503
3508
|
], []), f = I({
|
|
3504
3509
|
queryKey: [...q.timeSeries(l, o, s, a, u), "histogram"],
|
|
3505
3510
|
queryFn: ({ signal: e }) => i.fetchTimeSeries({
|
|
@@ -3527,7 +3532,7 @@ function ps(e) {
|
|
|
3527
3532
|
}
|
|
3528
3533
|
//#endregion
|
|
3529
3534
|
//#region src/logs/LogsHistogram.tsx
|
|
3530
|
-
var
|
|
3535
|
+
var hs = {
|
|
3531
3536
|
"100-399": {
|
|
3532
3537
|
label: "1xx–3xx",
|
|
3533
3538
|
color: "var(--success)"
|
|
@@ -3540,9 +3545,9 @@ var ms = {
|
|
|
3540
3545
|
label: "5xx",
|
|
3541
3546
|
color: "var(--destructive)"
|
|
3542
3547
|
}
|
|
3543
|
-
},
|
|
3544
|
-
function
|
|
3545
|
-
let { data: t, isLoading: n, available: r } =
|
|
3548
|
+
}, gs = "100-399", _s = "400-499", vs = "500-599";
|
|
3549
|
+
function ys(e) {
|
|
3550
|
+
let { data: t, isLoading: n, available: r } = ms(e), i = A(() => bs(t), [t]);
|
|
3546
3551
|
if (!r) return null;
|
|
3547
3552
|
let a = !n && i.length === 0;
|
|
3548
3553
|
return /* @__PURE__ */ F("div", {
|
|
@@ -3552,7 +3557,7 @@ function vs(e) {
|
|
|
3552
3557
|
className: "mb-1 text-xs text-muted-foreground",
|
|
3553
3558
|
children: "Requests over time"
|
|
3554
3559
|
}), /* @__PURE__ */ P(zt, {
|
|
3555
|
-
config:
|
|
3560
|
+
config: hs,
|
|
3556
3561
|
className: "h-[120px] w-full",
|
|
3557
3562
|
children: /* @__PURE__ */ F(Rt, {
|
|
3558
3563
|
data: i,
|
|
@@ -3562,15 +3567,15 @@ function vs(e) {
|
|
|
3562
3567
|
children: [
|
|
3563
3568
|
/* @__PURE__ */ P(Kt, { orientation: "horizontal" }),
|
|
3564
3569
|
/* @__PURE__ */ P(Pt, {
|
|
3565
|
-
dataKey:
|
|
3570
|
+
dataKey: gs,
|
|
3566
3571
|
stackId: "volume"
|
|
3567
3572
|
}),
|
|
3568
3573
|
/* @__PURE__ */ P(Pt, {
|
|
3569
|
-
dataKey:
|
|
3574
|
+
dataKey: _s,
|
|
3570
3575
|
stackId: "volume"
|
|
3571
3576
|
}),
|
|
3572
3577
|
/* @__PURE__ */ P(Pt, {
|
|
3573
|
-
dataKey:
|
|
3578
|
+
dataKey: vs,
|
|
3574
3579
|
stackId: "volume"
|
|
3575
3580
|
}),
|
|
3576
3581
|
/* @__PURE__ */ P($t, {}),
|
|
@@ -3581,19 +3586,19 @@ function vs(e) {
|
|
|
3581
3586
|
})]
|
|
3582
3587
|
});
|
|
3583
3588
|
}
|
|
3584
|
-
function
|
|
3589
|
+
function bs(e) {
|
|
3585
3590
|
let t = /* @__PURE__ */ new Map();
|
|
3586
3591
|
for (let n of e) t.set(n.key, [n]);
|
|
3587
3592
|
return Ga(t);
|
|
3588
3593
|
}
|
|
3589
3594
|
//#endregion
|
|
3590
3595
|
//#region src/logs/LogsExplorerPage.tsx
|
|
3591
|
-
var
|
|
3592
|
-
function
|
|
3596
|
+
var xs = 300, Ss = "observability-logs-columns";
|
|
3597
|
+
function Cs({ columns: e, onRowClick: t, pageSize: n = 25, getRowId: r, selectedRowId: i, scopeFilterField: a, columnVisibilityStorageKey: o = Ss, onPageDataChange: s }) {
|
|
3593
3598
|
let { timeRange: c, filters: l, setTimeRange: u, setFilters: d } = Ko(), f = mr(l, Nn()), m = p(), { logsFilters: h, analyticsFilters: g, hasRestricted: _ } = A(() => oi(l, m), [l, m]), [v, y] = M(""), b = fr({
|
|
3594
3599
|
timeRange: c,
|
|
3595
3600
|
filters: h,
|
|
3596
|
-
search: Ln(v,
|
|
3601
|
+
search: Ln(v, xs) || void 0,
|
|
3597
3602
|
pageSize: n
|
|
3598
3603
|
}), x = j(s);
|
|
3599
3604
|
k(() => {
|
|
@@ -3603,7 +3608,7 @@ function Ss({ columns: e, onRowClick: t, pageSize: n = 25, getRowId: r, selected
|
|
|
3603
3608
|
}, [b.data]);
|
|
3604
3609
|
let S = /* @__PURE__ */ F("div", {
|
|
3605
3610
|
className: "relative flex-1",
|
|
3606
|
-
children: [/* @__PURE__ */ P(
|
|
3611
|
+
children: [/* @__PURE__ */ P(me, { className: "absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }), /* @__PURE__ */ P(at, {
|
|
3607
3612
|
type: "search",
|
|
3608
3613
|
placeholder: "Search logs…",
|
|
3609
3614
|
value: v,
|
|
@@ -3638,16 +3643,16 @@ function Ss({ columns: e, onRowClick: t, pageSize: n = 25, getRowId: r, selected
|
|
|
3638
3643
|
})
|
|
3639
3644
|
]
|
|
3640
3645
|
}),
|
|
3641
|
-
/* @__PURE__ */ P(
|
|
3646
|
+
/* @__PURE__ */ P(ys, {
|
|
3642
3647
|
timeRange: c,
|
|
3643
3648
|
filters: g
|
|
3644
3649
|
}),
|
|
3645
|
-
_ ? /* @__PURE__ */ P(
|
|
3650
|
+
_ ? /* @__PURE__ */ P(ss, {}) : null,
|
|
3646
3651
|
b.isError && /* @__PURE__ */ P(Uo, {
|
|
3647
3652
|
message: b.error?.message ?? "Failed to load logs.",
|
|
3648
3653
|
onRetry: b.refetch
|
|
3649
3654
|
}),
|
|
3650
|
-
/* @__PURE__ */ P(
|
|
3655
|
+
/* @__PURE__ */ P(os, {
|
|
3651
3656
|
columns: e,
|
|
3652
3657
|
data: b.data,
|
|
3653
3658
|
loading: b.isLoading,
|
|
@@ -3667,7 +3672,7 @@ function Ss({ columns: e, onRowClick: t, pageSize: n = 25, getRowId: r, selected
|
|
|
3667
3672
|
}
|
|
3668
3673
|
//#endregion
|
|
3669
3674
|
//#region src/logs/build-logs-deep-link.ts
|
|
3670
|
-
function
|
|
3675
|
+
function ws({ basePath: e, timeRange: t, filters: n = [] }) {
|
|
3671
3676
|
let r = Mr({
|
|
3672
3677
|
conditions: n,
|
|
3673
3678
|
timeRange: t
|
|
@@ -3678,23 +3683,23 @@ function Cs({ basePath: e, timeRange: t, filters: n = [] }) {
|
|
|
3678
3683
|
}
|
|
3679
3684
|
//#endregion
|
|
3680
3685
|
//#region src/logs/default-connection-log-columns.tsx
|
|
3681
|
-
function
|
|
3686
|
+
function Ts(e) {
|
|
3682
3687
|
let t = gn(e.apiType), n = t.icon;
|
|
3683
3688
|
return /* @__PURE__ */ F("span", {
|
|
3684
3689
|
className: `inline-flex items-center gap-1 text-xs ${t.colorClass}`,
|
|
3685
3690
|
children: [/* @__PURE__ */ P(n, { className: "size-3.5" }), t.label]
|
|
3686
3691
|
});
|
|
3687
3692
|
}
|
|
3688
|
-
var
|
|
3689
|
-
function
|
|
3690
|
-
if (t.apiId) return `${e}/${n?.byApiType?.[t.apiType] ?? n?.defaultSegment ??
|
|
3693
|
+
var Es = "apis";
|
|
3694
|
+
function Ds(e, t, n) {
|
|
3695
|
+
if (t.apiId) return `${e}/${n?.byApiType?.[t.apiType] ?? n?.defaultSegment ?? Es}/${t.apiId}`;
|
|
3691
3696
|
}
|
|
3692
|
-
function
|
|
3697
|
+
function Os(e, t) {
|
|
3693
3698
|
let n = e.replace(/\/$/, ""), r = t?.apiLink, i = [
|
|
3694
3699
|
{
|
|
3695
3700
|
key: "timestamp",
|
|
3696
3701
|
label: "Timestamp",
|
|
3697
|
-
value: (e) => e.
|
|
3702
|
+
value: (e) => e.timestampEpochMs,
|
|
3698
3703
|
variant: "datetime",
|
|
3699
3704
|
defaultVisible: !0
|
|
3700
3705
|
},
|
|
@@ -3716,7 +3721,7 @@ function Ds(e, t) {
|
|
|
3716
3721
|
key: "apiName",
|
|
3717
3722
|
label: "API",
|
|
3718
3723
|
value: (e) => e.apiName,
|
|
3719
|
-
href: (e) =>
|
|
3724
|
+
href: (e) => Ds(n, e, r),
|
|
3720
3725
|
defaultVisible: !0
|
|
3721
3726
|
},
|
|
3722
3727
|
{
|
|
@@ -3750,7 +3755,7 @@ function Ds(e, t) {
|
|
|
3750
3755
|
key: "apiType",
|
|
3751
3756
|
label: "API Type",
|
|
3752
3757
|
value: (e) => e.apiType,
|
|
3753
|
-
render:
|
|
3758
|
+
render: Ts,
|
|
3754
3759
|
defaultVisible: !1
|
|
3755
3760
|
},
|
|
3756
3761
|
{
|
|
@@ -3824,14 +3829,14 @@ function Ds(e, t) {
|
|
|
3824
3829
|
}
|
|
3825
3830
|
//#endregion
|
|
3826
3831
|
//#region src/logs/detail/components/LogDetailCodeBlock.tsx
|
|
3827
|
-
var
|
|
3828
|
-
function Z({ code: e, language: t = "json", maxHeight: n =
|
|
3832
|
+
var ks = 240;
|
|
3833
|
+
function Z({ code: e, language: t = "json", maxHeight: n = ks }) {
|
|
3829
3834
|
let [r, i] = M(!1);
|
|
3830
3835
|
if (!e) return /* @__PURE__ */ P("p", {
|
|
3831
3836
|
className: "text-xs text-muted-foreground/70 py-3 italic",
|
|
3832
3837
|
children: "No body captured"
|
|
3833
3838
|
});
|
|
3834
|
-
let a =
|
|
3839
|
+
let a = As(e), o = a.split("\n").length > 12;
|
|
3835
3840
|
return /* @__PURE__ */ F("div", {
|
|
3836
3841
|
className: "relative rounded-lg border",
|
|
3837
3842
|
children: [
|
|
@@ -3864,7 +3869,7 @@ function Z({ code: e, language: t = "json", maxHeight: n = Os }) {
|
|
|
3864
3869
|
]
|
|
3865
3870
|
});
|
|
3866
3871
|
}
|
|
3867
|
-
function
|
|
3872
|
+
function As(e) {
|
|
3868
3873
|
try {
|
|
3869
3874
|
let t = JSON.parse(e);
|
|
3870
3875
|
return JSON.stringify(t, null, 2);
|
|
@@ -3874,7 +3879,7 @@ function ks(e) {
|
|
|
3874
3879
|
}
|
|
3875
3880
|
//#endregion
|
|
3876
3881
|
//#region src/logs/detail/components/LogDetailEmptyField.tsx
|
|
3877
|
-
function
|
|
3882
|
+
function js({ message: e = "Not captured" }) {
|
|
3878
3883
|
return /* @__PURE__ */ P("p", {
|
|
3879
3884
|
className: "text-xs italic text-muted-foreground py-2",
|
|
3880
3885
|
children: e
|
|
@@ -3883,7 +3888,7 @@ function As({ message: e = "Not captured" }) {
|
|
|
3883
3888
|
//#endregion
|
|
3884
3889
|
//#region src/logs/detail/components/LogDetailHeadersTable.tsx
|
|
3885
3890
|
function Q({ headers: e }) {
|
|
3886
|
-
return !e || Object.keys(e).length === 0 ? /* @__PURE__ */ P(
|
|
3891
|
+
return !e || Object.keys(e).length === 0 ? /* @__PURE__ */ P(js, { message: "No headers captured" }) : /* @__PURE__ */ P("div", {
|
|
3887
3892
|
className: "rounded-lg border overflow-hidden",
|
|
3888
3893
|
children: /* @__PURE__ */ P("table", {
|
|
3889
3894
|
className: "w-full text-[13px]",
|
|
@@ -3905,7 +3910,7 @@ function Q({ headers: e }) {
|
|
|
3905
3910
|
}
|
|
3906
3911
|
//#endregion
|
|
3907
3912
|
//#region src/logs/detail/components/LogDetailJsonTree.tsx
|
|
3908
|
-
function
|
|
3913
|
+
function Ms({ data: e, onCopyAll: t }) {
|
|
3909
3914
|
let n = j(null), r = () => {
|
|
3910
3915
|
let n = JSON.stringify(e, null, 2);
|
|
3911
3916
|
navigator.clipboard.writeText(n).then(() => {
|
|
@@ -3946,7 +3951,7 @@ function js({ data: e, onCopyAll: t }) {
|
|
|
3946
3951
|
"aria-label": "Log attributes",
|
|
3947
3952
|
className: "rounded-md border p-3 text-xs font-mono",
|
|
3948
3953
|
onKeyDown: i,
|
|
3949
|
-
children: /* @__PURE__ */ P(
|
|
3954
|
+
children: /* @__PURE__ */ P(Ns, {
|
|
3950
3955
|
value: e,
|
|
3951
3956
|
depth: 0,
|
|
3952
3957
|
isRoot: !0
|
|
@@ -3954,9 +3959,9 @@ function js({ data: e, onCopyAll: t }) {
|
|
|
3954
3959
|
})]
|
|
3955
3960
|
});
|
|
3956
3961
|
}
|
|
3957
|
-
function
|
|
3962
|
+
function Ns({ name: e, value: t, depth: n, isRoot: r, isLast: i }) {
|
|
3958
3963
|
let [a, o] = M(n < 2);
|
|
3959
|
-
if (t === null) return /* @__PURE__ */ P(
|
|
3964
|
+
if (t === null) return /* @__PURE__ */ P(Ps, {
|
|
3960
3965
|
name: e,
|
|
3961
3966
|
value: "null",
|
|
3962
3967
|
className: "text-muted-foreground",
|
|
@@ -4029,7 +4034,7 @@ function Ms({ name: e, value: t, depth: n, isRoot: r, isLast: i }) {
|
|
|
4029
4034
|
a && /* @__PURE__ */ P("div", {
|
|
4030
4035
|
className: "ml-4 border-l border-muted pl-2",
|
|
4031
4036
|
role: "group",
|
|
4032
|
-
children: c.map(([e, t], r) => /* @__PURE__ */ P(
|
|
4037
|
+
children: c.map(([e, t], r) => /* @__PURE__ */ P(Ns, {
|
|
4033
4038
|
name: s ? void 0 : e,
|
|
4034
4039
|
value: t,
|
|
4035
4040
|
depth: n + 1,
|
|
@@ -4043,29 +4048,29 @@ function Ms({ name: e, value: t, depth: n, isRoot: r, isLast: i }) {
|
|
|
4043
4048
|
]
|
|
4044
4049
|
});
|
|
4045
4050
|
}
|
|
4046
|
-
return typeof t == "string" ? /* @__PURE__ */ P(
|
|
4051
|
+
return typeof t == "string" ? /* @__PURE__ */ P(Ps, {
|
|
4047
4052
|
name: e,
|
|
4048
4053
|
value: `"${t}"`,
|
|
4049
4054
|
className: "text-green-600 dark:text-green-400",
|
|
4050
4055
|
isLast: i
|
|
4051
|
-
}) : typeof t == "number" ? /* @__PURE__ */ P(
|
|
4056
|
+
}) : typeof t == "number" ? /* @__PURE__ */ P(Ps, {
|
|
4052
4057
|
name: e,
|
|
4053
4058
|
value: String(t),
|
|
4054
4059
|
className: "text-blue-600 dark:text-blue-400",
|
|
4055
4060
|
isLast: i
|
|
4056
|
-
}) : typeof t == "boolean" ? /* @__PURE__ */ P(
|
|
4061
|
+
}) : typeof t == "boolean" ? /* @__PURE__ */ P(Ps, {
|
|
4057
4062
|
name: e,
|
|
4058
4063
|
value: String(t),
|
|
4059
4064
|
className: "text-amber-600 dark:text-amber-400",
|
|
4060
4065
|
isLast: i
|
|
4061
|
-
}) : /* @__PURE__ */ P(
|
|
4066
|
+
}) : /* @__PURE__ */ P(Ps, {
|
|
4062
4067
|
name: e,
|
|
4063
4068
|
value: String(t),
|
|
4064
4069
|
className: "text-foreground",
|
|
4065
4070
|
isLast: i
|
|
4066
4071
|
});
|
|
4067
4072
|
}
|
|
4068
|
-
function
|
|
4073
|
+
function Ps({ name: e, value: t, className: n, isLast: r }) {
|
|
4069
4074
|
return /* @__PURE__ */ F("div", {
|
|
4070
4075
|
className: "flex items-center py-px",
|
|
4071
4076
|
role: "treeitem",
|
|
@@ -4097,14 +4102,14 @@ function $({ items: e, onFilter: t, wrap: n = !1 }) {
|
|
|
4097
4102
|
let r = e.filter((e) => e.value !== void 0 && e.value !== null && e.value !== "");
|
|
4098
4103
|
return r.length === 0 ? null : /* @__PURE__ */ P("dl", {
|
|
4099
4104
|
className: "space-y-0 divide-y divide-border/50",
|
|
4100
|
-
children: r.map((e) => /* @__PURE__ */ P(
|
|
4105
|
+
children: r.map((e) => /* @__PURE__ */ P(Fs, {
|
|
4101
4106
|
item: e,
|
|
4102
4107
|
onFilter: t,
|
|
4103
4108
|
wrap: n
|
|
4104
4109
|
}, e.label))
|
|
4105
4110
|
});
|
|
4106
4111
|
}
|
|
4107
|
-
function
|
|
4112
|
+
function Fs({ item: e, onFilter: t, wrap: n }) {
|
|
4108
4113
|
let r = String(e.value), i = n ? "break-words whitespace-pre-wrap" : "truncate";
|
|
4109
4114
|
return /* @__PURE__ */ F("div", {
|
|
4110
4115
|
className: "group flex items-baseline gap-4 py-2.5",
|
|
@@ -4153,7 +4158,7 @@ function Ps({ item: e, onFilter: t, wrap: n }) {
|
|
|
4153
4158
|
}
|
|
4154
4159
|
//#endregion
|
|
4155
4160
|
//#region src/logs/detail/presets/connection-log-preset.tsx
|
|
4156
|
-
function
|
|
4161
|
+
function Is(e) {
|
|
4157
4162
|
return {
|
|
4158
4163
|
type: "preset",
|
|
4159
4164
|
resolve: (t) => {
|
|
@@ -4187,7 +4192,7 @@ function Fs(e) {
|
|
|
4187
4192
|
key: "overview",
|
|
4188
4193
|
title: "Overview",
|
|
4189
4194
|
defaultOpen: !0,
|
|
4190
|
-
render: (t, r) => /* @__PURE__ */ P(
|
|
4195
|
+
render: (t, r) => /* @__PURE__ */ P(Ls, {
|
|
4191
4196
|
log: n,
|
|
4192
4197
|
basePath: e?.basePath,
|
|
4193
4198
|
extraFields: e?.extraFields,
|
|
@@ -4197,29 +4202,29 @@ function Fs(e) {
|
|
|
4197
4202
|
key: "request",
|
|
4198
4203
|
title: "Request",
|
|
4199
4204
|
defaultOpen: !1,
|
|
4200
|
-
render: () => /* @__PURE__ */ P(
|
|
4205
|
+
render: () => /* @__PURE__ */ P(Rs, { log: n })
|
|
4201
4206
|
}), i.has("response") || a.push({
|
|
4202
4207
|
key: "response",
|
|
4203
4208
|
title: "Response",
|
|
4204
4209
|
defaultOpen: !1,
|
|
4205
|
-
render: () => /* @__PURE__ */ P(
|
|
4210
|
+
render: () => /* @__PURE__ */ P(zs, { log: n })
|
|
4206
4211
|
}), !i.has("errors") && (n.errorKey || n.warnings && n.warnings.length > 0) && a.push({
|
|
4207
4212
|
key: "errors",
|
|
4208
4213
|
title: "Issues",
|
|
4209
4214
|
defaultOpen: !0,
|
|
4210
4215
|
badge: () => (n.warnings?.length ?? 0) + +!!n.errorKey,
|
|
4211
|
-
render: () => /* @__PURE__ */ P(
|
|
4216
|
+
render: () => /* @__PURE__ */ P(Bs, { log: n })
|
|
4212
4217
|
}), i.has("raw") || a.push({
|
|
4213
4218
|
key: "raw",
|
|
4214
4219
|
title: "Raw JSON",
|
|
4215
4220
|
defaultOpen: !1,
|
|
4216
|
-
render: () => /* @__PURE__ */ P(
|
|
4221
|
+
render: () => /* @__PURE__ */ P(Ms, { data: n })
|
|
4217
4222
|
}), {
|
|
4218
4223
|
header: {
|
|
4219
4224
|
method: () => n.method,
|
|
4220
4225
|
status: () => n.status,
|
|
4221
4226
|
uri: () => n.uri,
|
|
4222
|
-
timestamp: () => n.
|
|
4227
|
+
timestamp: () => n.timestampEpochMs
|
|
4223
4228
|
},
|
|
4224
4229
|
metrics: r,
|
|
4225
4230
|
sections: a
|
|
@@ -4227,7 +4232,7 @@ function Fs(e) {
|
|
|
4227
4232
|
}
|
|
4228
4233
|
};
|
|
4229
4234
|
}
|
|
4230
|
-
function
|
|
4235
|
+
function Ls({ log: e, basePath: t, extraFields: n, onFilter: r }) {
|
|
4231
4236
|
let i = t?.replace(/\/$/, "") ?? "";
|
|
4232
4237
|
return /* @__PURE__ */ P($, {
|
|
4233
4238
|
items: [
|
|
@@ -4300,9 +4305,9 @@ function Is({ log: e, basePath: t, extraFields: n, onFilter: r }) {
|
|
|
4300
4305
|
onFilter: r
|
|
4301
4306
|
});
|
|
4302
4307
|
}
|
|
4303
|
-
function
|
|
4308
|
+
function Rs({ log: e }) {
|
|
4304
4309
|
let t = e.entrypointRequest, n = e.endpointRequest;
|
|
4305
|
-
return !t && !n ? /* @__PURE__ */ P(
|
|
4310
|
+
return !t && !n ? /* @__PURE__ */ P(js, { message: "No request details captured" }) : /* @__PURE__ */ F("div", {
|
|
4306
4311
|
className: "space-y-4",
|
|
4307
4312
|
children: [t && /* @__PURE__ */ F("div", {
|
|
4308
4313
|
className: "space-y-2",
|
|
@@ -4341,9 +4346,9 @@ function Ls({ log: e }) {
|
|
|
4341
4346
|
})]
|
|
4342
4347
|
});
|
|
4343
4348
|
}
|
|
4344
|
-
function
|
|
4349
|
+
function zs({ log: e }) {
|
|
4345
4350
|
let t = e.endpointResponse, n = e.entrypointResponse;
|
|
4346
|
-
return !t && !n ? /* @__PURE__ */ P(
|
|
4351
|
+
return !t && !n ? /* @__PURE__ */ P(js, { message: "No response details captured" }) : /* @__PURE__ */ F("div", {
|
|
4347
4352
|
className: "space-y-4",
|
|
4348
4353
|
children: [t && /* @__PURE__ */ F("div", {
|
|
4349
4354
|
className: "space-y-2",
|
|
@@ -4376,7 +4381,7 @@ function Rs({ log: e }) {
|
|
|
4376
4381
|
})]
|
|
4377
4382
|
});
|
|
4378
4383
|
}
|
|
4379
|
-
function
|
|
4384
|
+
function Bs({ log: e }) {
|
|
4380
4385
|
return /* @__PURE__ */ F("div", {
|
|
4381
4386
|
className: "space-y-3",
|
|
4382
4387
|
children: [e.errorKey && /* @__PURE__ */ F("div", {
|
|
@@ -4426,9 +4431,9 @@ function zs({ log: e }) {
|
|
|
4426
4431
|
}
|
|
4427
4432
|
//#endregion
|
|
4428
4433
|
//#region src/logs/detail/presets/message-log-preset.tsx
|
|
4429
|
-
var
|
|
4430
|
-
function
|
|
4431
|
-
let t = e?.messagesPageSize ??
|
|
4434
|
+
var Vs = 5;
|
|
4435
|
+
function Hs(e) {
|
|
4436
|
+
let t = e?.messagesPageSize ?? Vs;
|
|
4432
4437
|
return {
|
|
4433
4438
|
type: "preset",
|
|
4434
4439
|
resolve: (e) => {
|
|
@@ -4436,7 +4441,7 @@ function Vs(e) {
|
|
|
4436
4441
|
key: "overview",
|
|
4437
4442
|
title: "Overview",
|
|
4438
4443
|
defaultOpen: !0,
|
|
4439
|
-
render: (e, t) => /* @__PURE__ */ P(
|
|
4444
|
+
render: (e, t) => /* @__PURE__ */ P(Us, {
|
|
4440
4445
|
log: n,
|
|
4441
4446
|
onFilter: t
|
|
4442
4447
|
})
|
|
@@ -4444,14 +4449,14 @@ function Vs(e) {
|
|
|
4444
4449
|
key: "connection",
|
|
4445
4450
|
title: "Connection Logs",
|
|
4446
4451
|
defaultOpen: !1,
|
|
4447
|
-
render: () => /* @__PURE__ */ P(
|
|
4452
|
+
render: () => /* @__PURE__ */ P(Ws, { log: n })
|
|
4448
4453
|
}];
|
|
4449
4454
|
return n.messages && n.messages.length > 0 && r.push({
|
|
4450
4455
|
key: "messages",
|
|
4451
4456
|
title: "Messages",
|
|
4452
4457
|
defaultOpen: !0,
|
|
4453
4458
|
badge: () => n.messages?.length,
|
|
4454
|
-
render: () => /* @__PURE__ */ P(
|
|
4459
|
+
render: () => /* @__PURE__ */ P(Gs, {
|
|
4455
4460
|
messages: n.messages,
|
|
4456
4461
|
pageSize: t
|
|
4457
4462
|
})
|
|
@@ -4459,13 +4464,13 @@ function Vs(e) {
|
|
|
4459
4464
|
key: "raw",
|
|
4460
4465
|
title: "Raw JSON",
|
|
4461
4466
|
defaultOpen: !1,
|
|
4462
|
-
render: () => /* @__PURE__ */ P(
|
|
4467
|
+
render: () => /* @__PURE__ */ P(Ms, { data: n })
|
|
4463
4468
|
}), {
|
|
4464
4469
|
header: {
|
|
4465
4470
|
method: () => void 0,
|
|
4466
4471
|
status: () => n.status,
|
|
4467
4472
|
uri: () => n.uri,
|
|
4468
|
-
timestamp: () => n.
|
|
4473
|
+
timestamp: () => n.timestampEpochMs
|
|
4469
4474
|
},
|
|
4470
4475
|
metrics: void 0,
|
|
4471
4476
|
sections: r
|
|
@@ -4473,7 +4478,7 @@ function Vs(e) {
|
|
|
4473
4478
|
}
|
|
4474
4479
|
};
|
|
4475
4480
|
}
|
|
4476
|
-
function
|
|
4481
|
+
function Us({ log: e, onFilter: t }) {
|
|
4477
4482
|
return /* @__PURE__ */ P($, {
|
|
4478
4483
|
items: [
|
|
4479
4484
|
{
|
|
@@ -4518,7 +4523,7 @@ function Hs({ log: e, onFilter: t }) {
|
|
|
4518
4523
|
onFilter: t
|
|
4519
4524
|
});
|
|
4520
4525
|
}
|
|
4521
|
-
function
|
|
4526
|
+
function Ws({ log: e }) {
|
|
4522
4527
|
return e.entrypointRequest || e.endpointRequest || e.entrypointResponse || e.endpointResponse ? /* @__PURE__ */ F("div", {
|
|
4523
4528
|
className: "space-y-4",
|
|
4524
4529
|
children: [
|
|
@@ -4589,13 +4594,13 @@ function Us({ log: e }) {
|
|
|
4589
4594
|
]
|
|
4590
4595
|
})
|
|
4591
4596
|
]
|
|
4592
|
-
}) : /* @__PURE__ */ P(
|
|
4597
|
+
}) : /* @__PURE__ */ P(js, { message: "No connection log details captured" });
|
|
4593
4598
|
}
|
|
4594
|
-
function
|
|
4599
|
+
function Gs({ messages: e, pageSize: t }) {
|
|
4595
4600
|
let [n, r] = M(t), i = e.slice(0, n), a = n < e.length;
|
|
4596
4601
|
return /* @__PURE__ */ F("div", {
|
|
4597
4602
|
className: "space-y-3",
|
|
4598
|
-
children: [i.map((e, t) => /* @__PURE__ */ P(
|
|
4603
|
+
children: [i.map((e, t) => /* @__PURE__ */ P(Ks, { message: e }, e.id ?? t)), a && /* @__PURE__ */ F("button", {
|
|
4599
4604
|
onClick: () => r((e) => e + t),
|
|
4600
4605
|
className: "w-full rounded-md border py-2 text-xs text-muted-foreground hover:bg-muted/50 transition-colors",
|
|
4601
4606
|
children: [
|
|
@@ -4606,7 +4611,7 @@ function Ws({ messages: e, pageSize: t }) {
|
|
|
4606
4611
|
})]
|
|
4607
4612
|
});
|
|
4608
4613
|
}
|
|
4609
|
-
function
|
|
4614
|
+
function Ks({ message: e }) {
|
|
4610
4615
|
return /* @__PURE__ */ F("div", {
|
|
4611
4616
|
className: "rounded-md border p-3 space-y-2",
|
|
4612
4617
|
children: [
|
|
@@ -4654,7 +4659,7 @@ function Gs({ message: e }) {
|
|
|
4654
4659
|
}
|
|
4655
4660
|
//#endregion
|
|
4656
4661
|
//#region src/logs/detail/presets/webhook-log-preset.tsx
|
|
4657
|
-
function
|
|
4662
|
+
function qs(e) {
|
|
4658
4663
|
return {
|
|
4659
4664
|
type: "preset",
|
|
4660
4665
|
resolve: (t) => {
|
|
@@ -4679,7 +4684,7 @@ function Ks(e) {
|
|
|
4679
4684
|
key: "overview",
|
|
4680
4685
|
title: "Overview",
|
|
4681
4686
|
defaultOpen: !0,
|
|
4682
|
-
render: () => /* @__PURE__ */ P(
|
|
4687
|
+
render: () => /* @__PURE__ */ P(Js, {
|
|
4683
4688
|
log: n,
|
|
4684
4689
|
basePath: e?.basePath
|
|
4685
4690
|
})
|
|
@@ -4689,28 +4694,28 @@ function Ks(e) {
|
|
|
4689
4694
|
title: "Delivery Attempts",
|
|
4690
4695
|
defaultOpen: !0,
|
|
4691
4696
|
badge: () => n.retryTimeline?.length,
|
|
4692
|
-
render: () => /* @__PURE__ */ P(
|
|
4697
|
+
render: () => /* @__PURE__ */ P(Ys, { attempts: n.retryTimeline })
|
|
4693
4698
|
}), i.push({
|
|
4694
4699
|
key: "request",
|
|
4695
4700
|
title: "Request Sent by Gateway",
|
|
4696
4701
|
defaultOpen: !1,
|
|
4697
|
-
render: () => /* @__PURE__ */ P(
|
|
4702
|
+
render: () => /* @__PURE__ */ P(Xs, { log: n })
|
|
4698
4703
|
}), i.push({
|
|
4699
4704
|
key: "response",
|
|
4700
4705
|
title: "Response from Callback",
|
|
4701
4706
|
defaultOpen: !1,
|
|
4702
|
-
render: () => /* @__PURE__ */ P(
|
|
4707
|
+
render: () => /* @__PURE__ */ P(Zs, { log: n })
|
|
4703
4708
|
}), i.push({
|
|
4704
4709
|
key: "raw",
|
|
4705
4710
|
title: "Raw JSON",
|
|
4706
4711
|
defaultOpen: !1,
|
|
4707
|
-
render: () => /* @__PURE__ */ P(
|
|
4712
|
+
render: () => /* @__PURE__ */ P(Ms, { data: n })
|
|
4708
4713
|
}), {
|
|
4709
4714
|
header: {
|
|
4710
4715
|
method: () => n.method,
|
|
4711
4716
|
status: () => n.status,
|
|
4712
4717
|
uri: () => n.callbackUrl ?? n.uri,
|
|
4713
|
-
timestamp: () => n.
|
|
4718
|
+
timestamp: () => n.timestampEpochMs
|
|
4714
4719
|
},
|
|
4715
4720
|
metrics: r,
|
|
4716
4721
|
sections: i
|
|
@@ -4718,7 +4723,7 @@ function Ks(e) {
|
|
|
4718
4723
|
}
|
|
4719
4724
|
};
|
|
4720
4725
|
}
|
|
4721
|
-
function
|
|
4726
|
+
function Js({ log: e, basePath: t }) {
|
|
4722
4727
|
let n = t?.replace(/\/$/, "") ?? "";
|
|
4723
4728
|
return /* @__PURE__ */ P($, { items: [
|
|
4724
4729
|
{
|
|
@@ -4755,7 +4760,7 @@ function qs({ log: e, basePath: t }) {
|
|
|
4755
4760
|
}] : []
|
|
4756
4761
|
] });
|
|
4757
4762
|
}
|
|
4758
|
-
function
|
|
4763
|
+
function Ys({ attempts: e }) {
|
|
4759
4764
|
return /* @__PURE__ */ P("div", {
|
|
4760
4765
|
className: "rounded-md border",
|
|
4761
4766
|
children: /* @__PURE__ */ F("table", {
|
|
@@ -4807,30 +4812,30 @@ function Js({ attempts: e }) {
|
|
|
4807
4812
|
})
|
|
4808
4813
|
});
|
|
4809
4814
|
}
|
|
4810
|
-
function
|
|
4811
|
-
return !e.requestHeaders && !e.requestBody ? /* @__PURE__ */ P(
|
|
4815
|
+
function Xs({ log: e }) {
|
|
4816
|
+
return !e.requestHeaders && !e.requestBody ? /* @__PURE__ */ P(js, { message: "No request details captured" }) : /* @__PURE__ */ F("div", {
|
|
4812
4817
|
className: "space-y-2",
|
|
4813
4818
|
children: [/* @__PURE__ */ P(Q, { headers: e.requestHeaders }), /* @__PURE__ */ P(Z, { code: e.requestBody })]
|
|
4814
4819
|
});
|
|
4815
4820
|
}
|
|
4816
|
-
function
|
|
4817
|
-
return !e.responseHeaders && !e.responseBody ? /* @__PURE__ */ P(
|
|
4821
|
+
function Zs({ log: e }) {
|
|
4822
|
+
return !e.responseHeaders && !e.responseBody ? /* @__PURE__ */ P(js, { message: "No response details captured" }) : /* @__PURE__ */ F("div", {
|
|
4818
4823
|
className: "space-y-2",
|
|
4819
4824
|
children: [/* @__PURE__ */ P(Q, { headers: e.responseHeaders }), /* @__PURE__ */ P(Z, { code: e.responseBody })]
|
|
4820
4825
|
});
|
|
4821
4826
|
}
|
|
4822
4827
|
//#endregion
|
|
4823
4828
|
//#region src/logs/detail/types.ts
|
|
4824
|
-
function
|
|
4829
|
+
function Qs(e) {
|
|
4825
4830
|
return "discriminant" in e;
|
|
4826
4831
|
}
|
|
4827
4832
|
//#endregion
|
|
4828
4833
|
//#region src/logs/detail/define-log-detail.ts
|
|
4829
|
-
function
|
|
4834
|
+
function $s(e) {
|
|
4830
4835
|
return "preset" in e;
|
|
4831
4836
|
}
|
|
4832
|
-
function
|
|
4833
|
-
return
|
|
4837
|
+
function ec(e) {
|
|
4838
|
+
return $s(e) ? {
|
|
4834
4839
|
preset: e.preset,
|
|
4835
4840
|
contextChart: e.contextChart
|
|
4836
4841
|
} : {
|
|
@@ -4840,54 +4845,51 @@ function $s(e) {
|
|
|
4840
4845
|
contextChart: e.contextChart
|
|
4841
4846
|
};
|
|
4842
4847
|
}
|
|
4843
|
-
function
|
|
4844
|
-
if (
|
|
4848
|
+
function tc(e, t) {
|
|
4849
|
+
if (Qs(e)) {
|
|
4845
4850
|
let n = e.discriminant(t);
|
|
4846
4851
|
return e.variants[n] ?? e.fallback ?? null;
|
|
4847
4852
|
}
|
|
4848
4853
|
return e.preset;
|
|
4849
4854
|
}
|
|
4850
|
-
function
|
|
4855
|
+
function nc(e, t) {
|
|
4851
4856
|
return e.type === "preset" ? e.resolve(t) : null;
|
|
4852
4857
|
}
|
|
4853
|
-
function
|
|
4854
|
-
let { basePath: t, connectionLog: n, messageLog: r, webhookLog: i, extraVariants: a, contextChart: o, fallback: s, discriminant: c } = e, l = t.replace(/\/$/, ""), u =
|
|
4858
|
+
function rc(e) {
|
|
4859
|
+
let { basePath: t, connectionLog: n, messageLog: r, webhookLog: i, extraVariants: a, contextChart: o, fallback: s, discriminant: c } = e, l = t.replace(/\/$/, ""), u = Is({
|
|
4855
4860
|
...n,
|
|
4856
4861
|
basePath: l
|
|
4857
|
-
}), d =
|
|
4862
|
+
}), d = qs({
|
|
4858
4863
|
...i,
|
|
4859
4864
|
basePath: l
|
|
4860
4865
|
}), f = {
|
|
4861
4866
|
HTTP_PROXY: u,
|
|
4862
4867
|
LLM: u,
|
|
4863
4868
|
MCP: u,
|
|
4864
|
-
MESSAGE:
|
|
4869
|
+
MESSAGE: Hs(r),
|
|
4865
4870
|
WEBHOOK: d,
|
|
4866
4871
|
...a
|
|
4867
4872
|
};
|
|
4868
|
-
return
|
|
4873
|
+
return ec({
|
|
4869
4874
|
discriminant: c ?? ((e) => e.apiType ?? ""),
|
|
4870
4875
|
variants: f,
|
|
4871
4876
|
fallback: s ?? u,
|
|
4872
4877
|
contextChart: {
|
|
4873
4878
|
extractApiId: (e) => e.apiId,
|
|
4874
|
-
extractTimestamp: (e) => e.
|
|
4879
|
+
extractTimestamp: (e) => e.timestampEpochMs,
|
|
4875
4880
|
...o
|
|
4876
4881
|
}
|
|
4877
4882
|
});
|
|
4878
4883
|
}
|
|
4879
4884
|
//#endregion
|
|
4880
4885
|
//#region src/logs/detail/components/LogDetailContextChart.tsx
|
|
4881
|
-
var
|
|
4882
|
-
function
|
|
4883
|
-
let a = c(), o = A(() => {
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
to: e + rc
|
|
4889
|
-
};
|
|
4890
|
-
}, [t]), s = A(() => Qa(o, 30), [o]), l = A(() => [{
|
|
4886
|
+
var ic = 900 * 1e3, ac = "HTTP_GATEWAY_RESPONSE_TIME", oc = "AVG", sc = "API";
|
|
4887
|
+
function cc({ apiId: e, timestamp: t, metric: n = ac, measure: r = oc, filterField: i = sc }) {
|
|
4888
|
+
let a = c(), o = A(() => ({
|
|
4889
|
+
type: "absolute",
|
|
4890
|
+
from: t - ic,
|
|
4891
|
+
to: t + ic
|
|
4892
|
+
}), [t]), s = A(() => Qa(o, 30), [o]), l = A(() => [{
|
|
4891
4893
|
field: i,
|
|
4892
4894
|
operator: "eq",
|
|
4893
4895
|
value: [e],
|
|
@@ -4914,7 +4916,7 @@ function sc({ apiId: e, timestamp: t, metric: n = ic, measure: r = ac, filterFie
|
|
|
4914
4916
|
let e = /* @__PURE__ */ new Map();
|
|
4915
4917
|
return e.set(p, d), Ga(e);
|
|
4916
4918
|
}, [d, p]), g = A(() => {
|
|
4917
|
-
let e =
|
|
4919
|
+
let e = t, n = d?.[0]?.points;
|
|
4918
4920
|
if (h.length === 0 || !n?.length) return;
|
|
4919
4921
|
let r = n[0].timestamp, i = Math.abs(r - e);
|
|
4920
4922
|
for (let t of n) {
|
|
@@ -4967,18 +4969,18 @@ function sc({ apiId: e, timestamp: t, metric: n = ic, measure: r = ac, filterFie
|
|
|
4967
4969
|
}
|
|
4968
4970
|
//#endregion
|
|
4969
4971
|
//#region src/logs/detail/components/LogDetailDrawerShell.tsx
|
|
4970
|
-
var
|
|
4972
|
+
var lc = be({
|
|
4971
4973
|
expanded: !1,
|
|
4972
4974
|
setExpanded: () => {}
|
|
4973
4975
|
});
|
|
4974
|
-
function
|
|
4975
|
-
return Te(
|
|
4976
|
+
function uc() {
|
|
4977
|
+
return Te(lc);
|
|
4976
4978
|
}
|
|
4977
|
-
var
|
|
4978
|
-
function
|
|
4979
|
-
return e === document.body ? !0 : e.closest(
|
|
4979
|
+
var dc = "[role=\"tree\"], [role=\"treeitem\"], input, textarea, select, [contenteditable]";
|
|
4980
|
+
function fc(e) {
|
|
4981
|
+
return e === document.body ? !0 : e.closest(dc) ? !1 : !!e.closest("[data-log-detail-shell]");
|
|
4980
4982
|
}
|
|
4981
|
-
function
|
|
4983
|
+
function pc({ open: e, onClose: t, onNavigatePrev: n, onNavigateNext: r, children: i }) {
|
|
4982
4984
|
let [a, o] = M(!1), s = O(() => {
|
|
4983
4985
|
o(!1), t();
|
|
4984
4986
|
}, [t]), c = O((e) => {
|
|
@@ -4989,10 +4991,10 @@ function fc({ open: e, onClose: t, onNavigatePrev: n, onNavigateNext: r, childre
|
|
|
4989
4991
|
t.preventDefault(), a ? o(!1) : s();
|
|
4990
4992
|
break;
|
|
4991
4993
|
case "ArrowUp":
|
|
4992
|
-
|
|
4994
|
+
fc(t.target) && (t.preventDefault(), n?.());
|
|
4993
4995
|
break;
|
|
4994
4996
|
case "ArrowDown":
|
|
4995
|
-
|
|
4997
|
+
fc(t.target) && (t.preventDefault(), r?.());
|
|
4996
4998
|
break;
|
|
4997
4999
|
}
|
|
4998
5000
|
}, [
|
|
@@ -5007,7 +5009,7 @@ function fc({ open: e, onClose: t, onNavigatePrev: n, onNavigateNext: r, childre
|
|
|
5007
5009
|
expanded: a,
|
|
5008
5010
|
setExpanded: o
|
|
5009
5011
|
}), [a]);
|
|
5010
|
-
return /* @__PURE__ */ P(
|
|
5012
|
+
return /* @__PURE__ */ P(lc.Provider, {
|
|
5011
5013
|
value: f,
|
|
5012
5014
|
children: /* @__PURE__ */ P(vt, {
|
|
5013
5015
|
open: e,
|
|
@@ -5043,7 +5045,7 @@ function fc({ open: e, onClose: t, onNavigatePrev: n, onNavigateNext: r, childre
|
|
|
5043
5045
|
}
|
|
5044
5046
|
//#endregion
|
|
5045
5047
|
//#region src/logs/detail/components/LogDetailHeader.tsx
|
|
5046
|
-
var
|
|
5048
|
+
var mc = {
|
|
5047
5049
|
GET: "success",
|
|
5048
5050
|
POST: "default",
|
|
5049
5051
|
PUT: "warning",
|
|
@@ -5052,33 +5054,25 @@ var pc = {
|
|
|
5052
5054
|
HEAD: "secondary",
|
|
5053
5055
|
OPTIONS: "secondary"
|
|
5054
5056
|
};
|
|
5055
|
-
function
|
|
5057
|
+
function hc(e) {
|
|
5056
5058
|
return e >= 500 ? "text-destructive" : e >= 400 ? "text-warning" : "text-success";
|
|
5057
5059
|
}
|
|
5058
|
-
function
|
|
5060
|
+
function gc(e) {
|
|
5059
5061
|
let t = new Date(e), n = (/* @__PURE__ */ new Date()).getTime() - t.getTime(), r = Math.floor(n / 1e3), i;
|
|
5060
5062
|
i = r < 60 ? `${r}s ago` : r < 3600 ? `${Math.floor(r / 60)}m ago` : r < 86400 ? `${Math.floor(r / 3600)}h ago` : t.toLocaleDateString(void 0, {
|
|
5061
5063
|
month: "short",
|
|
5062
5064
|
day: "numeric"
|
|
5063
5065
|
});
|
|
5064
|
-
let a =
|
|
5065
|
-
year: "numeric",
|
|
5066
|
-
month: "short",
|
|
5067
|
-
day: "numeric",
|
|
5068
|
-
hour: "2-digit",
|
|
5069
|
-
minute: "2-digit",
|
|
5070
|
-
second: "2-digit",
|
|
5071
|
-
fractionalSecondDigits: 3
|
|
5072
|
-
});
|
|
5066
|
+
let a = qo(e, { fractionalSecondDigits: 3 });
|
|
5073
5067
|
return {
|
|
5074
5068
|
relative: i,
|
|
5075
5069
|
full: a
|
|
5076
5070
|
};
|
|
5077
5071
|
}
|
|
5078
|
-
function
|
|
5079
|
-
let { expanded: d, setExpanded: f } =
|
|
5072
|
+
function _c({ method: e, status: t, uri: n, timestamp: r, onClose: i, onNavigatePrev: a, onNavigateNext: o, onCopyJson: s, hasPrev: c = !0, hasNext: l = !0, showExpandToggle: u = !0 }) {
|
|
5073
|
+
let { expanded: d, setExpanded: f } = uc(), p = O((e) => {
|
|
5080
5074
|
e.key === "Escape" && i?.();
|
|
5081
|
-
}, [i]), m = r ?
|
|
5075
|
+
}, [i]), m = r ? gc(r) : null;
|
|
5082
5076
|
return /* @__PURE__ */ F("div", {
|
|
5083
5077
|
className: "sticky top-0 z-10 border-b bg-background/95 backdrop-blur-sm",
|
|
5084
5078
|
role: "toolbar",
|
|
@@ -5123,7 +5117,7 @@ function gc({ method: e, status: t, uri: n, timestamp: r, onClose: i, onNavigate
|
|
|
5123
5117
|
size: "icon",
|
|
5124
5118
|
onClick: () => f(!d),
|
|
5125
5119
|
"aria-label": d ? "Exit full screen" : "Full screen",
|
|
5126
|
-
children: P(d ?
|
|
5120
|
+
children: P(d ? E : se, { className: "size-4" })
|
|
5127
5121
|
})
|
|
5128
5122
|
}), /* @__PURE__ */ P(V, { children: d ? "Exit full screen" : "Full screen" })] }) }),
|
|
5129
5123
|
i && /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(_t, {
|
|
@@ -5134,7 +5128,7 @@ function gc({ method: e, status: t, uri: n, timestamp: r, onClose: i, onNavigate
|
|
|
5134
5128
|
size: "icon",
|
|
5135
5129
|
onClick: i,
|
|
5136
5130
|
"aria-label": "Close",
|
|
5137
|
-
children: /* @__PURE__ */ P(
|
|
5131
|
+
children: /* @__PURE__ */ P(ge, { className: "size-4" })
|
|
5138
5132
|
})] })
|
|
5139
5133
|
]
|
|
5140
5134
|
})]
|
|
@@ -5144,11 +5138,11 @@ function gc({ method: e, status: t, uri: n, timestamp: r, onClose: i, onNavigate
|
|
|
5144
5138
|
className: "flex items-center gap-3",
|
|
5145
5139
|
children: [
|
|
5146
5140
|
e && /* @__PURE__ */ P(L, {
|
|
5147
|
-
variant:
|
|
5141
|
+
variant: mc[e] ?? "secondary",
|
|
5148
5142
|
children: e
|
|
5149
5143
|
}),
|
|
5150
5144
|
t !== void 0 && /* @__PURE__ */ P("span", {
|
|
5151
|
-
className: `font-mono text-sm font-semibold tabular-nums ${
|
|
5145
|
+
className: `font-mono text-sm font-semibold tabular-nums ${hc(t)}`,
|
|
5152
5146
|
children: t
|
|
5153
5147
|
}),
|
|
5154
5148
|
m && /* @__PURE__ */ P(H, { children: /* @__PURE__ */ F(B, { children: [/* @__PURE__ */ P(U, {
|
|
@@ -5180,9 +5174,9 @@ function gc({ method: e, status: t, uri: n, timestamp: r, onClose: i, onNavigate
|
|
|
5180
5174
|
}
|
|
5181
5175
|
//#endregion
|
|
5182
5176
|
//#region src/logs/detail/components/LogDetailMetrics.tsx
|
|
5183
|
-
function
|
|
5177
|
+
function vc({ items: e }) {
|
|
5184
5178
|
let t = e.filter((e) => e.value !== void 0 && e.value !== null), n = A(() => t.map((e) => ({
|
|
5185
|
-
value:
|
|
5179
|
+
value: yc(e.value, e.unit),
|
|
5186
5180
|
label: e.label
|
|
5187
5181
|
})), [t]);
|
|
5188
5182
|
return n.length === 0 ? null : /* @__PURE__ */ P("div", {
|
|
@@ -5195,12 +5189,12 @@ function _c({ items: e }) {
|
|
|
5195
5189
|
})
|
|
5196
5190
|
});
|
|
5197
5191
|
}
|
|
5198
|
-
function
|
|
5192
|
+
function yc(e, t) {
|
|
5199
5193
|
return t === "ms" || !t ? e >= 1e4 ? `${(e / 1e3).toFixed(1)}s` : e >= 1e3 ? `${(e / 1e3).toFixed(2)}s` : `${Math.round(e)}ms` : t === "B" ? e >= 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(1)} MB` : e >= 1024 ? `${(e / 1024).toFixed(1)} KB` : `${e} B` : t === "" ? String(e) : `${e}${t}`;
|
|
5200
5194
|
}
|
|
5201
5195
|
//#endregion
|
|
5202
5196
|
//#region src/logs/detail/components/LogDetailSection.tsx
|
|
5203
|
-
function
|
|
5197
|
+
function bc({ children: e, defaultValue: t }) {
|
|
5204
5198
|
let [n, r] = M(t ?? "");
|
|
5205
5199
|
return /* @__PURE__ */ P(je, {
|
|
5206
5200
|
type: "single",
|
|
@@ -5210,7 +5204,7 @@ function yc({ children: e, defaultValue: t }) {
|
|
|
5210
5204
|
children: e
|
|
5211
5205
|
});
|
|
5212
5206
|
}
|
|
5213
|
-
function
|
|
5207
|
+
function xc({ title: e, badge: t, children: n }) {
|
|
5214
5208
|
return /* @__PURE__ */ F(Ne, {
|
|
5215
5209
|
value: e,
|
|
5216
5210
|
className: "border-b last:border-b-0",
|
|
@@ -5232,26 +5226,26 @@ function bc({ title: e, badge: t, children: n }) {
|
|
|
5232
5226
|
}
|
|
5233
5227
|
//#endregion
|
|
5234
5228
|
//#region src/logs/detail/components/LogDetailContent.tsx
|
|
5235
|
-
var
|
|
5236
|
-
Header:
|
|
5237
|
-
Section:
|
|
5229
|
+
var Sc = {
|
|
5230
|
+
Header: _c,
|
|
5231
|
+
Section: xc,
|
|
5238
5232
|
KeyValueGrid: $,
|
|
5239
5233
|
HeadersTable: Q,
|
|
5240
5234
|
CodeBlock: Z,
|
|
5241
|
-
Metrics:
|
|
5235
|
+
Metrics: vc
|
|
5242
5236
|
};
|
|
5243
|
-
function
|
|
5244
|
-
let f =
|
|
5237
|
+
function Cc({ config: e, log: t, logId: n, onClose: r, onCopyJson: i, onNavigatePrev: a, onNavigateNext: o, onFilter: s, hasPrev: c, hasNext: l, showExpandToggle: u = !0, showNavigation: d = !0 }) {
|
|
5238
|
+
let f = tc(e, t);
|
|
5245
5239
|
if (!f) return /* @__PURE__ */ P("div", {
|
|
5246
5240
|
className: "flex items-center justify-center p-8 text-sm text-muted-foreground",
|
|
5247
5241
|
children: "No detail view configured for this log type."
|
|
5248
5242
|
});
|
|
5249
|
-
if (f.type === "custom") return /* @__PURE__ */ P(N, { children: f.render(t,
|
|
5250
|
-
let p =
|
|
5243
|
+
if (f.type === "custom") return /* @__PURE__ */ P(N, { children: f.render(t, Sc) });
|
|
5244
|
+
let p = nc(f, t);
|
|
5251
5245
|
if (!p) return null;
|
|
5252
5246
|
let m = e.contextChart;
|
|
5253
5247
|
return /* @__PURE__ */ F(N, { children: [
|
|
5254
|
-
/* @__PURE__ */ P(
|
|
5248
|
+
/* @__PURE__ */ P(_c, {
|
|
5255
5249
|
method: p.header.method(t),
|
|
5256
5250
|
status: p.header.status(t),
|
|
5257
5251
|
uri: p.header.uri(t),
|
|
@@ -5264,21 +5258,21 @@ function Sc({ config: e, log: t, logId: n, onClose: r, onCopyJson: i, onNavigate
|
|
|
5264
5258
|
hasNext: d ? l : !1,
|
|
5265
5259
|
showExpandToggle: u
|
|
5266
5260
|
}),
|
|
5267
|
-
m && /* @__PURE__ */ P(
|
|
5261
|
+
m && /* @__PURE__ */ P(cc, {
|
|
5268
5262
|
apiId: m.extractApiId(t),
|
|
5269
5263
|
timestamp: m.extractTimestamp?.(t) ?? p.header.timestamp(t),
|
|
5270
5264
|
metric: m.metric,
|
|
5271
5265
|
measure: m.measure,
|
|
5272
5266
|
filterField: m.filterField
|
|
5273
5267
|
}),
|
|
5274
|
-
p.metrics && p.metrics.length > 0 && /* @__PURE__ */ P(
|
|
5268
|
+
p.metrics && p.metrics.length > 0 && /* @__PURE__ */ P(vc, { items: p.metrics.map((e) => ({
|
|
5275
5269
|
label: e.label,
|
|
5276
5270
|
value: e.value(t),
|
|
5277
5271
|
unit: e.unit
|
|
5278
5272
|
})) }),
|
|
5279
|
-
/* @__PURE__ */ P(
|
|
5273
|
+
/* @__PURE__ */ P(bc, {
|
|
5280
5274
|
defaultValue: p.sections.find((e) => e.defaultOpen)?.title,
|
|
5281
|
-
children: p.sections.map((e) => /* @__PURE__ */ P(
|
|
5275
|
+
children: p.sections.map((e) => /* @__PURE__ */ P(xc, {
|
|
5282
5276
|
title: e.title,
|
|
5283
5277
|
badge: e.badge?.(t),
|
|
5284
5278
|
children: e.render(t, s)
|
|
@@ -5288,23 +5282,23 @@ function Sc({ config: e, log: t, logId: n, onClose: r, onCopyJson: i, onNavigate
|
|
|
5288
5282
|
}
|
|
5289
5283
|
//#endregion
|
|
5290
5284
|
//#region src/logs/detail/utils/clipboard.ts
|
|
5291
|
-
function
|
|
5285
|
+
function wc(e) {
|
|
5292
5286
|
navigator.clipboard.writeText(JSON.stringify(e, null, 2)).then(() => At.success("Full JSON copied to clipboard"), () => At.error("Failed to copy to clipboard"));
|
|
5293
5287
|
}
|
|
5294
5288
|
//#endregion
|
|
5295
5289
|
//#region src/logs/detail/components/LogDetailDrawer.tsx
|
|
5296
|
-
function
|
|
5290
|
+
function Tc({ config: e, logId: t, apiId: n, onClose: r, onNavigatePrev: i, onNavigateNext: a, onFilter: o, hasPrev: s, hasNext: c }) {
|
|
5297
5291
|
let { data: l, isLoading: u, isError: d, isNotFound: f, isUnsupported: p, refetch: m } = cr({
|
|
5298
5292
|
id: t,
|
|
5299
5293
|
apiId: n
|
|
5300
5294
|
});
|
|
5301
|
-
return /* @__PURE__ */ F(
|
|
5295
|
+
return /* @__PURE__ */ F(pc, {
|
|
5302
5296
|
open: !!t,
|
|
5303
5297
|
onClose: r,
|
|
5304
5298
|
onNavigatePrev: i,
|
|
5305
5299
|
onNavigateNext: a,
|
|
5306
5300
|
children: [
|
|
5307
|
-
u && /* @__PURE__ */ P(
|
|
5301
|
+
u && /* @__PURE__ */ P(Ec, {}),
|
|
5308
5302
|
p && /* @__PURE__ */ F("div", {
|
|
5309
5303
|
className: "flex flex-col items-center justify-center gap-2 p-8 text-center text-muted-foreground",
|
|
5310
5304
|
children: [/* @__PURE__ */ P("p", {
|
|
@@ -5341,13 +5335,13 @@ function wc({ config: e, logId: t, apiId: n, onClose: r, onNavigatePrev: i, onNa
|
|
|
5341
5335
|
})
|
|
5342
5336
|
]
|
|
5343
5337
|
}),
|
|
5344
|
-
l != null && /* @__PURE__ */ P(
|
|
5338
|
+
l != null && /* @__PURE__ */ P(Cc, {
|
|
5345
5339
|
config: e,
|
|
5346
5340
|
log: l,
|
|
5347
5341
|
logId: t,
|
|
5348
5342
|
onClose: r,
|
|
5349
5343
|
onCopyJson: () => {
|
|
5350
|
-
l &&
|
|
5344
|
+
l && wc(l);
|
|
5351
5345
|
},
|
|
5352
5346
|
onNavigatePrev: i,
|
|
5353
5347
|
onNavigateNext: a,
|
|
@@ -5358,7 +5352,7 @@ function wc({ config: e, logId: t, apiId: n, onClose: r, onNavigatePrev: i, onNa
|
|
|
5358
5352
|
]
|
|
5359
5353
|
});
|
|
5360
5354
|
}
|
|
5361
|
-
function
|
|
5355
|
+
function Ec() {
|
|
5362
5356
|
return /* @__PURE__ */ F("div", {
|
|
5363
5357
|
className: "space-y-4 p-4",
|
|
5364
5358
|
children: [
|
|
@@ -5386,7 +5380,7 @@ function Tc() {
|
|
|
5386
5380
|
}
|
|
5387
5381
|
//#endregion
|
|
5388
5382
|
//#region src/logs/detail/components/LogDetailPage.tsx
|
|
5389
|
-
function
|
|
5383
|
+
function Dc({ config: e, onFilter: t }) {
|
|
5390
5384
|
let { logId: n } = un(), [r] = dn(), i = r.get("apiId") ?? void 0, a = ln(), { data: o, isLoading: s, isError: c, isNotFound: l, isUnsupported: u, refetch: d } = cr({
|
|
5391
5385
|
id: n,
|
|
5392
5386
|
apiId: i
|
|
@@ -5450,13 +5444,13 @@ function Ec({ config: e, onFilter: t }) {
|
|
|
5450
5444
|
})
|
|
5451
5445
|
}), /* @__PURE__ */ P(Re, {
|
|
5452
5446
|
className: "mx-6 mt-4 overflow-hidden",
|
|
5453
|
-
children: /* @__PURE__ */ P(
|
|
5447
|
+
children: /* @__PURE__ */ P(Cc, {
|
|
5454
5448
|
config: e,
|
|
5455
5449
|
log: o,
|
|
5456
5450
|
logId: n,
|
|
5457
5451
|
onClose: f,
|
|
5458
5452
|
onCopyJson: () => {
|
|
5459
|
-
o &&
|
|
5453
|
+
o && wc(o);
|
|
5460
5454
|
},
|
|
5461
5455
|
onFilter: t,
|
|
5462
5456
|
showExpandToggle: !1,
|
|
@@ -5467,7 +5461,7 @@ function Ec({ config: e, onFilter: t }) {
|
|
|
5467
5461
|
}
|
|
5468
5462
|
//#endregion
|
|
5469
5463
|
//#region src/traces/TraceStatusBadge.tsx
|
|
5470
|
-
var
|
|
5464
|
+
var Oc = {
|
|
5471
5465
|
ok: {
|
|
5472
5466
|
label: "OK",
|
|
5473
5467
|
variant: "success"
|
|
@@ -5481,8 +5475,8 @@ var Dc = {
|
|
|
5481
5475
|
variant: "default"
|
|
5482
5476
|
}
|
|
5483
5477
|
};
|
|
5484
|
-
function
|
|
5485
|
-
let t =
|
|
5478
|
+
function kc({ status: e }) {
|
|
5479
|
+
let t = Oc[e];
|
|
5486
5480
|
return /* @__PURE__ */ P(L, {
|
|
5487
5481
|
variant: t.variant,
|
|
5488
5482
|
children: t.label
|
|
@@ -5490,23 +5484,15 @@ function Oc({ status: e }) {
|
|
|
5490
5484
|
}
|
|
5491
5485
|
//#endregion
|
|
5492
5486
|
//#region src/traces/format-utils.ts
|
|
5493
|
-
function kc(e) {
|
|
5494
|
-
return new Date(e).toLocaleString(void 0, {
|
|
5495
|
-
year: "numeric",
|
|
5496
|
-
month: "2-digit",
|
|
5497
|
-
day: "2-digit",
|
|
5498
|
-
hour: "2-digit",
|
|
5499
|
-
minute: "2-digit",
|
|
5500
|
-
second: "2-digit",
|
|
5501
|
-
hour12: !1
|
|
5502
|
-
});
|
|
5503
|
-
}
|
|
5504
5487
|
function Ac(e) {
|
|
5488
|
+
return qo(e);
|
|
5489
|
+
}
|
|
5490
|
+
function jc(e) {
|
|
5505
5491
|
return e < 1 ? `${(e * 1e3).toFixed(0)} µs` : e < 1e3 ? `${e.toFixed(+(e < 10))} ms` : e < 6e4 ? `${(e / 1e3).toFixed(2)} s` : `${Math.floor(e / 6e4)}m ${(e % 6e4 / 1e3).toFixed(1)}s`;
|
|
5506
5492
|
}
|
|
5507
5493
|
//#endregion
|
|
5508
5494
|
//#region src/traces/TraceTable.tsx
|
|
5509
|
-
var
|
|
5495
|
+
var Mc = {
|
|
5510
5496
|
"no-traces": {
|
|
5511
5497
|
title: "No traces found",
|
|
5512
5498
|
description: "No traces in this time range for this API."
|
|
@@ -5519,15 +5505,15 @@ var jc = {
|
|
|
5519
5505
|
title: "No API selected",
|
|
5520
5506
|
description: "Open tracing from an API to view its traces."
|
|
5521
5507
|
}
|
|
5522
|
-
},
|
|
5508
|
+
}, Nc = {
|
|
5523
5509
|
startTime: !0,
|
|
5524
5510
|
rootServiceName: !0,
|
|
5525
5511
|
rootOperationName: !0,
|
|
5526
5512
|
duration: !0,
|
|
5527
5513
|
status: !0
|
|
5528
|
-
},
|
|
5529
|
-
function
|
|
5530
|
-
let f =
|
|
5514
|
+
}, Pc = (e) => e.traceId;
|
|
5515
|
+
function Fc({ data: e, loading: t, totalCount: n, page: r, pageSize: i, onPageChange: a, onPageSizeChange: o, pageSizeOptions: s, onRowClick: c, selectedRowId: l, columnVisibilityStorageKey: u, emptyVariant: d = "no-traces" }) {
|
|
5516
|
+
let f = Mc[d];
|
|
5531
5517
|
return /* @__PURE__ */ P(Ho, {
|
|
5532
5518
|
columns: A(() => [
|
|
5533
5519
|
{
|
|
@@ -5536,14 +5522,14 @@ function Pc({ data: e, loading: t, totalCount: n, page: r, pageSize: i, onPageCh
|
|
|
5536
5522
|
accessorFn: (e) => e.startTime,
|
|
5537
5523
|
cell: ({ getValue: e }) => /* @__PURE__ */ P("span", {
|
|
5538
5524
|
className: "whitespace-nowrap text-sm tabular-nums",
|
|
5539
|
-
children:
|
|
5525
|
+
children: Ac(e())
|
|
5540
5526
|
})
|
|
5541
5527
|
},
|
|
5542
5528
|
{
|
|
5543
5529
|
id: "status",
|
|
5544
5530
|
header: "Status",
|
|
5545
5531
|
accessorFn: (e) => e.status,
|
|
5546
|
-
cell: ({ row: e }) => /* @__PURE__ */ P(
|
|
5532
|
+
cell: ({ row: e }) => /* @__PURE__ */ P(kc, { status: e.original.status })
|
|
5547
5533
|
},
|
|
5548
5534
|
{
|
|
5549
5535
|
id: "rootServiceName",
|
|
@@ -5569,7 +5555,7 @@ function Pc({ data: e, loading: t, totalCount: n, page: r, pageSize: i, onPageCh
|
|
|
5569
5555
|
accessorFn: (e) => e.duration,
|
|
5570
5556
|
cell: ({ getValue: e }) => /* @__PURE__ */ P("span", {
|
|
5571
5557
|
className: "whitespace-nowrap text-sm tabular-nums",
|
|
5572
|
-
children:
|
|
5558
|
+
children: jc(e())
|
|
5573
5559
|
})
|
|
5574
5560
|
}
|
|
5575
5561
|
], []),
|
|
@@ -5582,10 +5568,10 @@ function Pc({ data: e, loading: t, totalCount: n, page: r, pageSize: i, onPageCh
|
|
|
5582
5568
|
onPageSizeChange: o,
|
|
5583
5569
|
pageSizeOptions: s,
|
|
5584
5570
|
onRowClick: c,
|
|
5585
|
-
getRowId:
|
|
5571
|
+
getRowId: Pc,
|
|
5586
5572
|
selectedRowId: l,
|
|
5587
5573
|
columnVisibilityStorageKey: u,
|
|
5588
|
-
defaultColumnVisibility:
|
|
5574
|
+
defaultColumnVisibility: Nc,
|
|
5589
5575
|
emptyMessage: /* @__PURE__ */ P(Ze, { children: /* @__PURE__ */ F($e, { children: [
|
|
5590
5576
|
/* @__PURE__ */ P(et, {
|
|
5591
5577
|
variant: "icon",
|
|
@@ -5598,8 +5584,8 @@ function Pc({ data: e, loading: t, totalCount: n, page: r, pageSize: i, onPageCh
|
|
|
5598
5584
|
}
|
|
5599
5585
|
//#endregion
|
|
5600
5586
|
//#region src/traces/TraceExplorerPage.tsx
|
|
5601
|
-
var
|
|
5602
|
-
function
|
|
5587
|
+
var Ic = "observability-traces-columns";
|
|
5588
|
+
function Lc({ onRowClick: e, pageSize: t = 25, selectedRowId: n, columnVisibilityStorageKey: r = Ic, onPageDataChange: i, toolbarStart: a, emptyVariant: o }) {
|
|
5603
5589
|
let { apiId: s } = un(), { timeRange: c, setTimeRange: l, filters: u, setFilters: d } = Ko(), f = p(), m = A(() => ai(u, f, "TRACES").matching, [u, f]), h = yr({
|
|
5604
5590
|
apiId: s ?? "",
|
|
5605
5591
|
timeRange: c,
|
|
@@ -5607,7 +5593,7 @@ function Ic({ onRowClick: e, pageSize: t = 25, selectedRowId: n, columnVisibilit
|
|
|
5607
5593
|
pageSize: t,
|
|
5608
5594
|
enabled: !!s
|
|
5609
5595
|
});
|
|
5610
|
-
return
|
|
5596
|
+
return Rc(h.data, i), /* @__PURE__ */ F("div", {
|
|
5611
5597
|
className: "space-y-4 p-4",
|
|
5612
5598
|
children: [
|
|
5613
5599
|
/* @__PURE__ */ P("h1", {
|
|
@@ -5636,7 +5622,7 @@ function Ic({ onRowClick: e, pageSize: t = 25, selectedRowId: n, columnVisibilit
|
|
|
5636
5622
|
message: h.error?.message ?? "Failed to load traces.",
|
|
5637
5623
|
onRetry: h.refetch
|
|
5638
5624
|
}),
|
|
5639
|
-
/* @__PURE__ */ P(
|
|
5625
|
+
/* @__PURE__ */ P(Fc, {
|
|
5640
5626
|
data: h.data,
|
|
5641
5627
|
loading: h.isLoading,
|
|
5642
5628
|
totalCount: h.totalCount,
|
|
@@ -5652,7 +5638,7 @@ function Ic({ onRowClick: e, pageSize: t = 25, selectedRowId: n, columnVisibilit
|
|
|
5652
5638
|
]
|
|
5653
5639
|
});
|
|
5654
5640
|
}
|
|
5655
|
-
function
|
|
5641
|
+
function Rc(e, t) {
|
|
5656
5642
|
let n = j(t);
|
|
5657
5643
|
k(() => {
|
|
5658
5644
|
n.current = t;
|
|
@@ -5662,10 +5648,10 @@ function Lc(e, t) {
|
|
|
5662
5648
|
}
|
|
5663
5649
|
//#endregion
|
|
5664
5650
|
//#region src/traces/use-tracing-api-paginated-options.ts
|
|
5665
|
-
function
|
|
5651
|
+
function zc(e, t) {
|
|
5666
5652
|
return !e || t.some((t) => t.id === e.id) ? [...t] : [e, ...t];
|
|
5667
5653
|
}
|
|
5668
|
-
function
|
|
5654
|
+
function Bc({ loader: e, resolveApiLabel: t, value: n }) {
|
|
5669
5655
|
let { options: r, searchQuery: i, onSearchChange: a, clearSearch: o, isLoading: s, isFetchingNextPage: c, hasNextPage: l, loadError: u, anchorRef: d } = Un({
|
|
5670
5656
|
loader: e,
|
|
5671
5657
|
queryKey: O((e) => q.tracingApisPaginated(e), [])
|
|
@@ -5714,7 +5700,7 @@ function zc({ loader: e, resolveApiLabel: t, value: n }) {
|
|
|
5714
5700
|
p
|
|
5715
5701
|
]);
|
|
5716
5702
|
return {
|
|
5717
|
-
listOptions: A(() =>
|
|
5703
|
+
listOptions: A(() => zc(g, r), [g, r]),
|
|
5718
5704
|
selected: g,
|
|
5719
5705
|
searchQuery: i,
|
|
5720
5706
|
isLoading: s,
|
|
@@ -5728,7 +5714,7 @@ function zc({ loader: e, resolveApiLabel: t, value: n }) {
|
|
|
5728
5714
|
}
|
|
5729
5715
|
//#endregion
|
|
5730
5716
|
//#region src/traces/TracingApiSelector.tsx
|
|
5731
|
-
function
|
|
5717
|
+
function Vc({ text: e, query: t }) {
|
|
5732
5718
|
if (!t.trim()) return /* @__PURE__ */ P(N, { children: e });
|
|
5733
5719
|
let n = t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
5734
5720
|
return /* @__PURE__ */ P(N, { children: e.split(RegExp(`(${n})`, "gi")).map((e, n) => e.toLowerCase() === t.toLowerCase() ? /* @__PURE__ */ P("mark", {
|
|
@@ -5736,14 +5722,14 @@ function Bc({ text: e, query: t }) {
|
|
|
5736
5722
|
children: e
|
|
5737
5723
|
}, n) : e) });
|
|
5738
5724
|
}
|
|
5739
|
-
function
|
|
5725
|
+
function Hc({ option: e, searchQuery: t }) {
|
|
5740
5726
|
return /* @__PURE__ */ P(Ke, {
|
|
5741
5727
|
value: e,
|
|
5742
5728
|
children: /* @__PURE__ */ F("span", {
|
|
5743
5729
|
className: "flex min-w-0 flex-col",
|
|
5744
5730
|
children: [/* @__PURE__ */ P("span", {
|
|
5745
5731
|
className: "truncate text-sm",
|
|
5746
|
-
children: /* @__PURE__ */ P(
|
|
5732
|
+
children: /* @__PURE__ */ P(Vc, {
|
|
5747
5733
|
text: e.label,
|
|
5748
5734
|
query: t
|
|
5749
5735
|
})
|
|
@@ -5754,7 +5740,7 @@ function Vc({ option: e, searchQuery: t }) {
|
|
|
5754
5740
|
})
|
|
5755
5741
|
});
|
|
5756
5742
|
}
|
|
5757
|
-
function
|
|
5743
|
+
function Uc() {
|
|
5758
5744
|
return /* @__PURE__ */ P("div", {
|
|
5759
5745
|
className: "flex flex-col gap-0.5 p-1",
|
|
5760
5746
|
role: "status",
|
|
@@ -5765,7 +5751,7 @@ function Hc() {
|
|
|
5765
5751
|
}, t))
|
|
5766
5752
|
});
|
|
5767
5753
|
}
|
|
5768
|
-
function
|
|
5754
|
+
function Wc({ inputId: e, errorId: t, loadError: n, children: r }) {
|
|
5769
5755
|
return /* @__PURE__ */ F("div", {
|
|
5770
5756
|
className: "flex items-center gap-2",
|
|
5771
5757
|
children: [/* @__PURE__ */ F(ot, {
|
|
@@ -5786,8 +5772,8 @@ function Uc({ inputId: e, errorId: t, loadError: n, children: r }) {
|
|
|
5786
5772
|
})] }) : r]
|
|
5787
5773
|
});
|
|
5788
5774
|
}
|
|
5789
|
-
function
|
|
5790
|
-
let { open: i, handleOpenChange: a, handleInputFocus: o, handleInputKeyDown: s } = qr(), c = Ee(), l = Ee(), { listOptions: u, selected: d, searchQuery: f, isLoading: p, isFetchingNextPage: m, hasNextPage: h, loadError: g, onSearchChange: _, clearSearch: v, anchorRef: y } =
|
|
5775
|
+
function Gc({ paginatedLoader: e, resolveApiLabel: t, value: n, onSelect: r }) {
|
|
5776
|
+
let { open: i, handleOpenChange: a, handleInputFocus: o, handleInputKeyDown: s } = qr(), c = Ee(), l = Ee(), { listOptions: u, selected: d, searchQuery: f, isLoading: p, isFetchingNextPage: m, hasNextPage: h, loadError: g, onSearchChange: _, clearSearch: v, anchorRef: y } = Bc({
|
|
5791
5777
|
loader: e,
|
|
5792
5778
|
resolveApiLabel: t,
|
|
5793
5779
|
value: n
|
|
@@ -5806,7 +5792,7 @@ function Wc({ paginatedLoader: e, resolveApiLabel: t, value: n, onSelect: r }) {
|
|
|
5806
5792
|
}), "Loading…"]
|
|
5807
5793
|
}) : null
|
|
5808
5794
|
}) : null;
|
|
5809
|
-
return /* @__PURE__ */ P(
|
|
5795
|
+
return /* @__PURE__ */ P(Wc, {
|
|
5810
5796
|
inputId: c,
|
|
5811
5797
|
errorId: l,
|
|
5812
5798
|
loadError: g,
|
|
@@ -5842,12 +5828,12 @@ function Wc({ paginatedLoader: e, resolveApiLabel: t, value: n, onSelect: r }) {
|
|
|
5842
5828
|
onKeyDown: s
|
|
5843
5829
|
}), /* @__PURE__ */ P(Ue, {
|
|
5844
5830
|
className: "max-h-56",
|
|
5845
|
-
children: p && u.length === 0 ? /* @__PURE__ */ P(
|
|
5831
|
+
children: p && u.length === 0 ? /* @__PURE__ */ P(Uc, {}) : /* @__PURE__ */ F(N, { children: [
|
|
5846
5832
|
/* @__PURE__ */ P(We, { children: /* @__PURE__ */ P("span", {
|
|
5847
5833
|
className: "block px-3 py-6 text-center text-sm text-muted-foreground",
|
|
5848
5834
|
children: "No API found."
|
|
5849
5835
|
}) }),
|
|
5850
|
-
/* @__PURE__ */ P(qe, { children: (e) => /* @__PURE__ */ P(
|
|
5836
|
+
/* @__PURE__ */ P(qe, { children: (e) => /* @__PURE__ */ P(Hc, {
|
|
5851
5837
|
option: e,
|
|
5852
5838
|
searchQuery: f
|
|
5853
5839
|
}, e.id) }),
|
|
@@ -5857,9 +5843,9 @@ function Wc({ paginatedLoader: e, resolveApiLabel: t, value: n, onSelect: r }) {
|
|
|
5857
5843
|
})
|
|
5858
5844
|
});
|
|
5859
5845
|
}
|
|
5860
|
-
function
|
|
5846
|
+
function Kc({ options: e, value: t, onSelect: n, loading: r }) {
|
|
5861
5847
|
let { open: i, handleOpenChange: a, handleInputFocus: o, handleInputKeyDown: s } = qr(), c = Ee();
|
|
5862
|
-
return /* @__PURE__ */ P(
|
|
5848
|
+
return /* @__PURE__ */ P(Wc, {
|
|
5863
5849
|
inputId: c,
|
|
5864
5850
|
errorId: c,
|
|
5865
5851
|
loadError: null,
|
|
@@ -5892,7 +5878,7 @@ function Gc({ options: e, value: t, onSelect: n, loading: r }) {
|
|
|
5892
5878
|
children: [/* @__PURE__ */ P(We, { children: /* @__PURE__ */ P("span", {
|
|
5893
5879
|
className: "block px-3 py-6 text-center text-sm text-muted-foreground",
|
|
5894
5880
|
children: "No API found."
|
|
5895
|
-
}) }), /* @__PURE__ */ P(qe, { children: (e) => /* @__PURE__ */ P(
|
|
5881
|
+
}) }), /* @__PURE__ */ P(qe, { children: (e) => /* @__PURE__ */ P(Hc, {
|
|
5896
5882
|
option: e,
|
|
5897
5883
|
searchQuery: ""
|
|
5898
5884
|
}, e.id) })]
|
|
@@ -5900,7 +5886,7 @@ function Gc({ options: e, value: t, onSelect: n, loading: r }) {
|
|
|
5900
5886
|
})
|
|
5901
5887
|
});
|
|
5902
5888
|
}
|
|
5903
|
-
function
|
|
5889
|
+
function qc({ options: e = [], paginatedLoader: t, resolveApiLabel: n, value: r, onSelect: i, loading: a, error: o, onRetry: s }) {
|
|
5904
5890
|
return o ? /* @__PURE__ */ F("div", {
|
|
5905
5891
|
className: "flex flex-1 items-center gap-3 rounded-lg border border-destructive/20 bg-destructive/5 px-3 py-2",
|
|
5906
5892
|
children: [
|
|
@@ -5913,15 +5899,15 @@ function Kc({ options: e = [], paginatedLoader: t, resolveApiLabel: n, value: r,
|
|
|
5913
5899
|
variant: "outline",
|
|
5914
5900
|
size: "sm",
|
|
5915
5901
|
onClick: s,
|
|
5916
|
-
children: [/* @__PURE__ */ P(
|
|
5902
|
+
children: [/* @__PURE__ */ P(pe, { className: "size-3.5" }), "Retry"]
|
|
5917
5903
|
})
|
|
5918
5904
|
]
|
|
5919
|
-
}) : t ? /* @__PURE__ */ P(
|
|
5905
|
+
}) : t ? /* @__PURE__ */ P(Gc, {
|
|
5920
5906
|
paginatedLoader: t,
|
|
5921
5907
|
resolveApiLabel: n,
|
|
5922
5908
|
value: r,
|
|
5923
5909
|
onSelect: i
|
|
5924
|
-
}) : /* @__PURE__ */ P(
|
|
5910
|
+
}) : /* @__PURE__ */ P(Kc, {
|
|
5925
5911
|
options: e,
|
|
5926
5912
|
value: r,
|
|
5927
5913
|
onSelect: i,
|
|
@@ -5930,27 +5916,27 @@ function Kc({ options: e = [], paginatedLoader: t, resolveApiLabel: n, value: r,
|
|
|
5930
5916
|
}
|
|
5931
5917
|
//#endregion
|
|
5932
5918
|
//#region src/traces/tracing-api.ts
|
|
5933
|
-
function
|
|
5919
|
+
function Jc(e) {
|
|
5934
5920
|
return typeof e == "object" && !!e && !Array.isArray(e) && "load" in e;
|
|
5935
5921
|
}
|
|
5936
|
-
function
|
|
5922
|
+
function Yc(e) {
|
|
5937
5923
|
return typeof e == "function" && e.length >= 1;
|
|
5938
5924
|
}
|
|
5939
|
-
function
|
|
5925
|
+
function Xc(e) {
|
|
5940
5926
|
return typeof e == "function" && e.length === 0;
|
|
5941
5927
|
}
|
|
5942
|
-
function
|
|
5943
|
-
return
|
|
5928
|
+
function Zc(e) {
|
|
5929
|
+
return Jc(e) ? {
|
|
5944
5930
|
load: e.load,
|
|
5945
5931
|
resolveApiLabel: e.resolveApiLabel
|
|
5946
5932
|
} : { load: e };
|
|
5947
5933
|
}
|
|
5948
|
-
function
|
|
5949
|
-
return
|
|
5934
|
+
function Qc(e) {
|
|
5935
|
+
return Yc(e) || Jc(e);
|
|
5950
5936
|
}
|
|
5951
5937
|
//#endregion
|
|
5952
5938
|
//#region src/traces/build-traces-deep-link.ts
|
|
5953
|
-
function
|
|
5939
|
+
function $c({ basePath: e, apiId: t, timeRange: n = Or, filters: r = [] }) {
|
|
5954
5940
|
let i = Mr({
|
|
5955
5941
|
conditions: r,
|
|
5956
5942
|
timeRange: n
|
|
@@ -5961,26 +5947,26 @@ function Qc({ basePath: e, apiId: t, timeRange: n = Or, filters: r = [] }) {
|
|
|
5961
5947
|
}
|
|
5962
5948
|
//#endregion
|
|
5963
5949
|
//#region src/traces/detail/PolicyAttributeDiff.tsx
|
|
5964
|
-
var
|
|
5950
|
+
var el = {
|
|
5965
5951
|
added: "Added",
|
|
5966
5952
|
removed: "Removed",
|
|
5967
5953
|
changed: "Changed",
|
|
5968
5954
|
unchanged: "Unchanged"
|
|
5969
|
-
},
|
|
5955
|
+
}, tl = {
|
|
5970
5956
|
added: "border-l-success",
|
|
5971
5957
|
removed: "border-l-destructive",
|
|
5972
5958
|
changed: "border-l-warning",
|
|
5973
5959
|
unchanged: "border-l-transparent"
|
|
5974
|
-
},
|
|
5960
|
+
}, nl = {
|
|
5975
5961
|
added: "text-success",
|
|
5976
5962
|
removed: "text-destructive",
|
|
5977
5963
|
changed: "text-warning",
|
|
5978
5964
|
unchanged: "text-muted-foreground/60"
|
|
5979
|
-
},
|
|
5980
|
-
function
|
|
5965
|
+
}, rl = "—";
|
|
5966
|
+
function il({ diff: e }) {
|
|
5981
5967
|
return /* @__PURE__ */ F("div", {
|
|
5982
5968
|
className: "flex flex-col gap-2",
|
|
5983
|
-
children: [/* @__PURE__ */ P(
|
|
5969
|
+
children: [/* @__PURE__ */ P(ol, { diff: e }), /* @__PURE__ */ P("div", {
|
|
5984
5970
|
className: "overflow-hidden rounded-md border",
|
|
5985
5971
|
children: /* @__PURE__ */ F("table", {
|
|
5986
5972
|
className: "w-full table-fixed border-collapse text-sm",
|
|
@@ -6015,7 +6001,7 @@ function rl({ diff: e }) {
|
|
|
6015
6001
|
]
|
|
6016
6002
|
}) }),
|
|
6017
6003
|
/* @__PURE__ */ P("tbody", { children: e.rows.map((e) => /* @__PURE__ */ F("tr", {
|
|
6018
|
-
className: W("border-b border-l-2 last:border-b-0 align-top",
|
|
6004
|
+
className: W("border-b border-l-2 last:border-b-0 align-top", tl[e.status]),
|
|
6019
6005
|
children: [
|
|
6020
6006
|
/* @__PURE__ */ F("th", {
|
|
6021
6007
|
scope: "row",
|
|
@@ -6024,15 +6010,15 @@ function rl({ diff: e }) {
|
|
|
6024
6010
|
className: "block break-all font-medium text-foreground",
|
|
6025
6011
|
children: e.key
|
|
6026
6012
|
}), /* @__PURE__ */ P("span", {
|
|
6027
|
-
className: W("text-[10px] font-semibold uppercase tracking-wide",
|
|
6028
|
-
children:
|
|
6013
|
+
className: W("text-[10px] font-semibold uppercase tracking-wide", nl[e.status]),
|
|
6014
|
+
children: el[e.status]
|
|
6029
6015
|
})]
|
|
6030
6016
|
}),
|
|
6031
|
-
/* @__PURE__ */ P(
|
|
6017
|
+
/* @__PURE__ */ P(al, {
|
|
6032
6018
|
value: e.before,
|
|
6033
6019
|
muted: e.status === "added"
|
|
6034
6020
|
}),
|
|
6035
|
-
/* @__PURE__ */ P(
|
|
6021
|
+
/* @__PURE__ */ P(al, {
|
|
6036
6022
|
value: e.after,
|
|
6037
6023
|
muted: e.status === "removed"
|
|
6038
6024
|
})
|
|
@@ -6043,12 +6029,12 @@ function rl({ diff: e }) {
|
|
|
6043
6029
|
})]
|
|
6044
6030
|
});
|
|
6045
6031
|
}
|
|
6046
|
-
function
|
|
6032
|
+
function al({ value: e, muted: t }) {
|
|
6047
6033
|
return e === void 0 ? /* @__PURE__ */ F("td", {
|
|
6048
6034
|
className: "px-3 py-2 text-muted-foreground/50",
|
|
6049
6035
|
children: [/* @__PURE__ */ P("span", {
|
|
6050
6036
|
"aria-hidden": !0,
|
|
6051
|
-
children:
|
|
6037
|
+
children: rl
|
|
6052
6038
|
}), /* @__PURE__ */ P("span", {
|
|
6053
6039
|
className: "sr-only",
|
|
6054
6040
|
children: "absent"
|
|
@@ -6058,22 +6044,22 @@ function il({ value: e, muted: t }) {
|
|
|
6058
6044
|
children: e
|
|
6059
6045
|
});
|
|
6060
6046
|
}
|
|
6061
|
-
function
|
|
6047
|
+
function ol({ diff: e }) {
|
|
6062
6048
|
let t = [
|
|
6063
6049
|
{
|
|
6064
6050
|
label: "added",
|
|
6065
6051
|
count: e.addedCount,
|
|
6066
|
-
className:
|
|
6052
|
+
className: nl.added
|
|
6067
6053
|
},
|
|
6068
6054
|
{
|
|
6069
6055
|
label: "removed",
|
|
6070
6056
|
count: e.removedCount,
|
|
6071
|
-
className:
|
|
6057
|
+
className: nl.removed
|
|
6072
6058
|
},
|
|
6073
6059
|
{
|
|
6074
6060
|
label: "changed",
|
|
6075
6061
|
count: e.changedCount,
|
|
6076
|
-
className:
|
|
6062
|
+
className: nl.changed
|
|
6077
6063
|
}
|
|
6078
6064
|
].filter((e) => e.count > 0);
|
|
6079
6065
|
return t.length === 0 ? /* @__PURE__ */ P("p", {
|
|
@@ -6093,28 +6079,28 @@ function al({ diff: e }) {
|
|
|
6093
6079
|
}
|
|
6094
6080
|
//#endregion
|
|
6095
6081
|
//#region src/traces/detail/policy-attribute-diff.ts
|
|
6096
|
-
var
|
|
6097
|
-
function
|
|
6082
|
+
var sl = "gravitee.policy.pre", cl = "gravitee.policy.post";
|
|
6083
|
+
function ll(e) {
|
|
6098
6084
|
return Array.isArray(e) ? e.join(", ") : String(e);
|
|
6099
6085
|
}
|
|
6100
|
-
function
|
|
6086
|
+
function ul(e, t) {
|
|
6101
6087
|
return e.find((e) => e.name === t);
|
|
6102
6088
|
}
|
|
6103
|
-
function
|
|
6089
|
+
function dl(e, t) {
|
|
6104
6090
|
let n = Object.keys(e);
|
|
6105
6091
|
for (let r of Object.keys(t)) r in e || n.push(r);
|
|
6106
6092
|
return n;
|
|
6107
6093
|
}
|
|
6108
|
-
function
|
|
6094
|
+
function fl(e, t, n) {
|
|
6109
6095
|
return e ? t ? n ? "unchanged" : "changed" : "removed" : "added";
|
|
6110
6096
|
}
|
|
6111
|
-
function
|
|
6112
|
-
let t =
|
|
6097
|
+
function pl(e) {
|
|
6098
|
+
let t = ul(e.events, sl), n = ul(e.events, cl);
|
|
6113
6099
|
if (!t || !n) return null;
|
|
6114
6100
|
let r = t.attributes ?? {}, i = n.attributes ?? {}, a = 0, o = 0, s = 0;
|
|
6115
6101
|
return {
|
|
6116
|
-
rows:
|
|
6117
|
-
let t = e in r, n = e in i, c = t ?
|
|
6102
|
+
rows: dl(r, i).map((e) => {
|
|
6103
|
+
let t = e in r, n = e in i, c = t ? ll(r[e]) : void 0, l = n ? ll(i[e]) : void 0, u = fl(t, n, c === l);
|
|
6118
6104
|
return u === "added" ? a += 1 : u === "removed" ? o += 1 : u === "changed" && (s += 1), {
|
|
6119
6105
|
key: e,
|
|
6120
6106
|
status: u,
|
|
@@ -6129,22 +6115,22 @@ function fl(e) {
|
|
|
6129
6115
|
}
|
|
6130
6116
|
//#endregion
|
|
6131
6117
|
//#region src/traces/detail/SpanDetailPanel.tsx
|
|
6132
|
-
function
|
|
6118
|
+
function ml(e) {
|
|
6133
6119
|
return Array.isArray(e) ? e.join(", ") : typeof e == "boolean" ? String(e) : e;
|
|
6134
6120
|
}
|
|
6135
|
-
function
|
|
6121
|
+
function hl(e) {
|
|
6136
6122
|
return Object.entries(e).map(([e, t]) => ({
|
|
6137
6123
|
label: e,
|
|
6138
|
-
value:
|
|
6124
|
+
value: ml(t)
|
|
6139
6125
|
}));
|
|
6140
6126
|
}
|
|
6141
|
-
function
|
|
6142
|
-
return e ? /* @__PURE__ */ P(
|
|
6127
|
+
function gl({ span: e, onClose: t }) {
|
|
6128
|
+
return e ? /* @__PURE__ */ P(_l, {
|
|
6143
6129
|
span: e,
|
|
6144
6130
|
onClose: t
|
|
6145
6131
|
}) : null;
|
|
6146
6132
|
}
|
|
6147
|
-
function
|
|
6133
|
+
function _l({ span: e, onClose: t }) {
|
|
6148
6134
|
let n = j(null);
|
|
6149
6135
|
k(() => {
|
|
6150
6136
|
n.current?.focus();
|
|
@@ -6183,13 +6169,13 @@ function gl({ span: e, onClose: t }) {
|
|
|
6183
6169
|
},
|
|
6184
6170
|
{
|
|
6185
6171
|
label: "Start",
|
|
6186
|
-
value:
|
|
6172
|
+
value: Ac(e.startTime)
|
|
6187
6173
|
},
|
|
6188
6174
|
{
|
|
6189
6175
|
label: "Duration",
|
|
6190
|
-
value:
|
|
6176
|
+
value: jc(e.duration)
|
|
6191
6177
|
}
|
|
6192
|
-
], i = Object.entries(e.attributes), a =
|
|
6178
|
+
], i = Object.entries(e.attributes), a = pl(e);
|
|
6193
6179
|
return /* @__PURE__ */ F("section", {
|
|
6194
6180
|
ref: n,
|
|
6195
6181
|
tabIndex: -1,
|
|
@@ -6202,7 +6188,7 @@ function gl({ span: e, onClose: t }) {
|
|
|
6202
6188
|
className: "flex min-w-0 flex-col gap-1.5",
|
|
6203
6189
|
children: [/* @__PURE__ */ F("div", {
|
|
6204
6190
|
className: "flex items-center gap-2",
|
|
6205
|
-
children: [/* @__PURE__ */ P(
|
|
6191
|
+
children: [/* @__PURE__ */ P(kc, { status: e.status }), /* @__PURE__ */ P("span", {
|
|
6206
6192
|
className: "text-[11px] font-medium uppercase tracking-wide text-muted-foreground/70",
|
|
6207
6193
|
children: e.serviceName
|
|
6208
6194
|
})]
|
|
@@ -6216,29 +6202,29 @@ function gl({ span: e, onClose: t }) {
|
|
|
6216
6202
|
className: "size-7 shrink-0",
|
|
6217
6203
|
onClick: t,
|
|
6218
6204
|
"aria-label": "Close span detail",
|
|
6219
|
-
children: /* @__PURE__ */ P(
|
|
6205
|
+
children: /* @__PURE__ */ P(ge, { className: "size-4" })
|
|
6220
6206
|
})]
|
|
6221
6207
|
}), /* @__PURE__ */ F("div", {
|
|
6222
6208
|
className: "grid gap-x-8 gap-y-6 p-5 @2xl:grid-cols-2 @2xl:items-start",
|
|
6223
6209
|
children: [
|
|
6224
|
-
/* @__PURE__ */ P(
|
|
6210
|
+
/* @__PURE__ */ P(vl, {
|
|
6225
6211
|
title: "Overview",
|
|
6226
6212
|
children: /* @__PURE__ */ P($, { items: r })
|
|
6227
6213
|
}),
|
|
6228
|
-
i.length > 0 && /* @__PURE__ */ P(
|
|
6214
|
+
i.length > 0 && /* @__PURE__ */ P(vl, {
|
|
6229
6215
|
title: "Attributes",
|
|
6230
6216
|
badge: i.length,
|
|
6231
6217
|
children: /* @__PURE__ */ P($, {
|
|
6232
6218
|
wrap: !0,
|
|
6233
|
-
items:
|
|
6219
|
+
items: hl(e.attributes)
|
|
6234
6220
|
})
|
|
6235
6221
|
}),
|
|
6236
|
-
a && /* @__PURE__ */ P(
|
|
6222
|
+
a && /* @__PURE__ */ P(vl, {
|
|
6237
6223
|
title: "Policy Diff",
|
|
6238
6224
|
badge: a.rows.length,
|
|
6239
|
-
children: /* @__PURE__ */ P(
|
|
6225
|
+
children: /* @__PURE__ */ P(il, { diff: a })
|
|
6240
6226
|
}),
|
|
6241
|
-
e.events.length > 0 && /* @__PURE__ */ P(
|
|
6227
|
+
e.events.length > 0 && /* @__PURE__ */ P(vl, {
|
|
6242
6228
|
title: "Events",
|
|
6243
6229
|
badge: e.events.length,
|
|
6244
6230
|
children: /* @__PURE__ */ P("div", {
|
|
@@ -6252,16 +6238,16 @@ function gl({ span: e, onClose: t }) {
|
|
|
6252
6238
|
children: e.name
|
|
6253
6239
|
}), /* @__PURE__ */ P("span", {
|
|
6254
6240
|
className: "text-xs text-muted-foreground",
|
|
6255
|
-
children:
|
|
6241
|
+
children: Ac(e.timestampEpochMs)
|
|
6256
6242
|
})]
|
|
6257
6243
|
}), e.attributes && Object.keys(e.attributes).length > 0 && /* @__PURE__ */ P($, {
|
|
6258
6244
|
wrap: !0,
|
|
6259
|
-
items:
|
|
6245
|
+
items: hl(e.attributes)
|
|
6260
6246
|
})]
|
|
6261
6247
|
}, `${e.name}-${t}`))
|
|
6262
6248
|
})
|
|
6263
6249
|
}),
|
|
6264
|
-
e.payloadLogs.length > 0 && /* @__PURE__ */ P(
|
|
6250
|
+
e.payloadLogs.length > 0 && /* @__PURE__ */ P(vl, {
|
|
6265
6251
|
title: "Payload Logs",
|
|
6266
6252
|
badge: e.payloadLogs.length,
|
|
6267
6253
|
children: /* @__PURE__ */ P("div", {
|
|
@@ -6271,9 +6257,9 @@ function gl({ span: e, onClose: t }) {
|
|
|
6271
6257
|
children: [
|
|
6272
6258
|
/* @__PURE__ */ F("div", {
|
|
6273
6259
|
className: "flex items-baseline gap-2",
|
|
6274
|
-
children: [/* @__PURE__ */ P(
|
|
6260
|
+
children: [/* @__PURE__ */ P(Xo, { level: e.severity }), /* @__PURE__ */ P("span", {
|
|
6275
6261
|
className: "text-xs text-muted-foreground",
|
|
6276
|
-
children:
|
|
6262
|
+
children: Ac(e.timestampEpochMs)
|
|
6277
6263
|
})]
|
|
6278
6264
|
}),
|
|
6279
6265
|
/* @__PURE__ */ P("pre", {
|
|
@@ -6282,7 +6268,7 @@ function gl({ span: e, onClose: t }) {
|
|
|
6282
6268
|
}),
|
|
6283
6269
|
e.attributes && Object.keys(e.attributes).length > 0 && /* @__PURE__ */ P($, {
|
|
6284
6270
|
wrap: !0,
|
|
6285
|
-
items:
|
|
6271
|
+
items: hl(e.attributes)
|
|
6286
6272
|
})
|
|
6287
6273
|
]
|
|
6288
6274
|
}, `${e.timestampEpochMs}-${t}`))
|
|
@@ -6292,7 +6278,7 @@ function gl({ span: e, onClose: t }) {
|
|
|
6292
6278
|
})]
|
|
6293
6279
|
});
|
|
6294
6280
|
}
|
|
6295
|
-
function
|
|
6281
|
+
function vl({ title: e, badge: t, children: n }) {
|
|
6296
6282
|
return /* @__PURE__ */ F("section", {
|
|
6297
6283
|
className: "flex min-w-0 flex-col gap-2",
|
|
6298
6284
|
children: [/* @__PURE__ */ F("div", {
|
|
@@ -6310,13 +6296,13 @@ function _l({ title: e, badge: t, children: n }) {
|
|
|
6310
6296
|
}
|
|
6311
6297
|
//#endregion
|
|
6312
6298
|
//#region src/traces/detail/build-span-tree.ts
|
|
6313
|
-
var
|
|
6314
|
-
function
|
|
6299
|
+
var yl = (e, t) => e.startTime - t.startTime;
|
|
6300
|
+
function bl(e) {
|
|
6315
6301
|
let t = /* @__PURE__ */ new Map();
|
|
6316
6302
|
for (let n of e) t.set(n.spanId, n);
|
|
6317
6303
|
return t;
|
|
6318
6304
|
}
|
|
6319
|
-
function
|
|
6305
|
+
function xl(e) {
|
|
6320
6306
|
if (e.length === 0) return [];
|
|
6321
6307
|
let t = new Set(e.map((e) => e.spanId)), n = /* @__PURE__ */ new Map(), r = [];
|
|
6322
6308
|
for (let i of e) if (i.parentSpanId && t.has(i.parentSpanId)) {
|
|
@@ -6325,11 +6311,11 @@ function bl(e) {
|
|
|
6325
6311
|
} else r.push(i);
|
|
6326
6312
|
let i = (e) => ({
|
|
6327
6313
|
span: e,
|
|
6328
|
-
children: [...n.get(e.spanId) ?? []].sort(
|
|
6314
|
+
children: [...n.get(e.spanId) ?? []].sort(yl).map(i)
|
|
6329
6315
|
});
|
|
6330
|
-
return [...r].sort(
|
|
6316
|
+
return [...r].sort(yl).map(i);
|
|
6331
6317
|
}
|
|
6332
|
-
function
|
|
6318
|
+
function Sl(e) {
|
|
6333
6319
|
let t = [];
|
|
6334
6320
|
function n(e, r) {
|
|
6335
6321
|
t.push({
|
|
@@ -6343,12 +6329,12 @@ function xl(e) {
|
|
|
6343
6329
|
}
|
|
6344
6330
|
//#endregion
|
|
6345
6331
|
//#region src/traces/detail/TraceLineage.tsx
|
|
6346
|
-
var
|
|
6332
|
+
var Cl = Ce(() => import("./TraceLineageGraph.js")), wl = {
|
|
6347
6333
|
ok: "healthy",
|
|
6348
6334
|
error: "error",
|
|
6349
6335
|
unset: "healthy"
|
|
6350
6336
|
};
|
|
6351
|
-
function
|
|
6337
|
+
function Tl(e) {
|
|
6352
6338
|
let t = new Set(e.spans.map((e) => e.spanId));
|
|
6353
6339
|
return {
|
|
6354
6340
|
nodes: e.spans.map((e) => ({
|
|
@@ -6356,8 +6342,8 @@ function wl(e) {
|
|
|
6356
6342
|
data: {
|
|
6357
6343
|
label: e.operationName,
|
|
6358
6344
|
description: e.serviceName,
|
|
6359
|
-
badge:
|
|
6360
|
-
status:
|
|
6345
|
+
badge: jc(e.duration),
|
|
6346
|
+
status: wl[e.status]
|
|
6361
6347
|
}
|
|
6362
6348
|
})),
|
|
6363
6349
|
edges: e.spans.filter((e) => !!e.parentSpanId && t.has(e.parentSpanId)).map((e) => ({
|
|
@@ -6368,20 +6354,20 @@ function wl(e) {
|
|
|
6368
6354
|
}))
|
|
6369
6355
|
};
|
|
6370
6356
|
}
|
|
6371
|
-
function
|
|
6372
|
-
let { nodes: o, edges: s } = A(() => e ?
|
|
6357
|
+
function El({ trace: e, onSpanClick: t, selectedSpanId: n, state: r, edgeAnimation: i = "flow", className: a }) {
|
|
6358
|
+
let { nodes: o, edges: s } = A(() => e ? Tl(e) : {
|
|
6373
6359
|
nodes: [],
|
|
6374
6360
|
edges: []
|
|
6375
|
-
}, [e]), c = A(() =>
|
|
6361
|
+
}, [e]), c = A(() => bl(e?.spans ?? []), [e?.spans]), l = O((e) => {
|
|
6376
6362
|
if (!e) return;
|
|
6377
6363
|
let n = c.get(e.id);
|
|
6378
6364
|
n && t?.(n);
|
|
6379
6365
|
}, [c, t]), u = a ?? "h-[28rem]";
|
|
6380
|
-
return /* @__PURE__ */ P(
|
|
6381
|
-
fallback: /* @__PURE__ */ P(
|
|
6382
|
-
children: /* @__PURE__ */ P(
|
|
6383
|
-
fallback: /* @__PURE__ */ P(
|
|
6384
|
-
children: /* @__PURE__ */ P(
|
|
6366
|
+
return /* @__PURE__ */ P(kl, {
|
|
6367
|
+
fallback: /* @__PURE__ */ P(Ol, { className: u }),
|
|
6368
|
+
children: /* @__PURE__ */ P(ye, {
|
|
6369
|
+
fallback: /* @__PURE__ */ P(Dl, { className: u }),
|
|
6370
|
+
children: /* @__PURE__ */ P(Cl, {
|
|
6385
6371
|
nodes: o,
|
|
6386
6372
|
edges: s,
|
|
6387
6373
|
state: r,
|
|
@@ -6393,7 +6379,7 @@ function Tl({ trace: e, onSpanClick: t, selectedSpanId: n, state: r, edgeAnimati
|
|
|
6393
6379
|
})
|
|
6394
6380
|
});
|
|
6395
6381
|
}
|
|
6396
|
-
function
|
|
6382
|
+
function Dl({ className: e }) {
|
|
6397
6383
|
return /* @__PURE__ */ P("div", {
|
|
6398
6384
|
className: `flex animate-pulse items-center justify-center rounded-lg border border-border bg-card ${e}`,
|
|
6399
6385
|
role: "status",
|
|
@@ -6404,7 +6390,7 @@ function El({ className: e }) {
|
|
|
6404
6390
|
})
|
|
6405
6391
|
});
|
|
6406
6392
|
}
|
|
6407
|
-
function
|
|
6393
|
+
function Ol({ className: e }) {
|
|
6408
6394
|
return /* @__PURE__ */ F("div", {
|
|
6409
6395
|
className: `flex flex-col items-center justify-center gap-1 rounded-lg border border-border bg-card p-6 text-center ${e}`,
|
|
6410
6396
|
role: "alert",
|
|
@@ -6421,7 +6407,7 @@ function Dl({ className: e }) {
|
|
|
6421
6407
|
})]
|
|
6422
6408
|
});
|
|
6423
6409
|
}
|
|
6424
|
-
var
|
|
6410
|
+
var kl = class extends _e {
|
|
6425
6411
|
state = { hasError: !1 };
|
|
6426
6412
|
static getDerivedStateFromError() {
|
|
6427
6413
|
return { hasError: !0 };
|
|
@@ -6432,9 +6418,9 @@ var Ol = class extends ve {
|
|
|
6432
6418
|
render() {
|
|
6433
6419
|
return this.state.hasError ? this.props.fallback : this.props.children;
|
|
6434
6420
|
}
|
|
6435
|
-
},
|
|
6436
|
-
function
|
|
6437
|
-
let t = xl(
|
|
6421
|
+
}, Al = 1e6;
|
|
6422
|
+
function jl(e) {
|
|
6423
|
+
let t = Sl(xl(e.spans)), n = e.startTime;
|
|
6438
6424
|
return t.map((e) => ({
|
|
6439
6425
|
spanId: e.span.spanId,
|
|
6440
6426
|
parentSpanId: e.span.parentSpanId,
|
|
@@ -6442,13 +6428,13 @@ function Al(e) {
|
|
|
6442
6428
|
serviceName: e.span.serviceName,
|
|
6443
6429
|
kind: e.span.kind,
|
|
6444
6430
|
status: e.span.status,
|
|
6445
|
-
startOffsetNs: (e.span.startTime - n) *
|
|
6446
|
-
durationNs: e.span.duration *
|
|
6431
|
+
startOffsetNs: (e.span.startTime - n) * Al,
|
|
6432
|
+
durationNs: e.span.duration * Al,
|
|
6447
6433
|
depth: e.depth
|
|
6448
6434
|
}));
|
|
6449
6435
|
}
|
|
6450
|
-
function
|
|
6451
|
-
let a = A(() => e ?
|
|
6436
|
+
function Ml({ trace: e, onSpanClick: t, selectedSpanId: n, state: r, className: i }) {
|
|
6437
|
+
let a = A(() => e ? jl(e) : [], [e]), o = A(() => bl(e?.spans ?? []), [e?.spans]);
|
|
6452
6438
|
return /* @__PURE__ */ P(Zt, {
|
|
6453
6439
|
spans: a,
|
|
6454
6440
|
state: r,
|
|
@@ -6463,19 +6449,19 @@ function jl({ trace: e, onSpanClick: t, selectedSpanId: n, state: r, className:
|
|
|
6463
6449
|
}
|
|
6464
6450
|
//#endregion
|
|
6465
6451
|
//#region src/traces/detail/TraceDetailShell.tsx
|
|
6466
|
-
var
|
|
6452
|
+
var Nl = [{
|
|
6467
6453
|
key: "timeline",
|
|
6468
6454
|
label: "Timeline"
|
|
6469
6455
|
}, {
|
|
6470
6456
|
key: "lineage",
|
|
6471
6457
|
label: "Lineage"
|
|
6472
6458
|
}];
|
|
6473
|
-
function
|
|
6459
|
+
function Pl({ trace: e }) {
|
|
6474
6460
|
let [t, n] = M("timeline"), [r, i] = M(void 0), a = O((e) => i(e), []), o = O(() => i(void 0), []), s = r && e.spans.includes(r) ? r : void 0;
|
|
6475
6461
|
return /* @__PURE__ */ F("div", {
|
|
6476
6462
|
className: "flex flex-col gap-5 p-6",
|
|
6477
6463
|
children: [
|
|
6478
|
-
/* @__PURE__ */ P(
|
|
6464
|
+
/* @__PURE__ */ P(Fl, { trace: e }),
|
|
6479
6465
|
/* @__PURE__ */ F(Ct, {
|
|
6480
6466
|
value: t,
|
|
6481
6467
|
onValueChange: (e) => n(e),
|
|
@@ -6484,14 +6470,14 @@ function Nl({ trace: e }) {
|
|
|
6484
6470
|
/* @__PURE__ */ P(Tt, {
|
|
6485
6471
|
variant: "line",
|
|
6486
6472
|
"aria-label": "Trace view",
|
|
6487
|
-
children:
|
|
6473
|
+
children: Nl.map((e) => /* @__PURE__ */ P(Et, {
|
|
6488
6474
|
value: e.key,
|
|
6489
6475
|
children: e.label
|
|
6490
6476
|
}, e.key))
|
|
6491
6477
|
}),
|
|
6492
6478
|
/* @__PURE__ */ P(wt, {
|
|
6493
6479
|
value: "timeline",
|
|
6494
|
-
children: /* @__PURE__ */ P(
|
|
6480
|
+
children: /* @__PURE__ */ P(Ml, {
|
|
6495
6481
|
trace: e,
|
|
6496
6482
|
onSpanClick: a,
|
|
6497
6483
|
selectedSpanId: s?.spanId
|
|
@@ -6499,7 +6485,7 @@ function Nl({ trace: e }) {
|
|
|
6499
6485
|
}),
|
|
6500
6486
|
/* @__PURE__ */ P(wt, {
|
|
6501
6487
|
value: "lineage",
|
|
6502
|
-
children: /* @__PURE__ */ P(
|
|
6488
|
+
children: /* @__PURE__ */ P(El, {
|
|
6503
6489
|
trace: e,
|
|
6504
6490
|
onSpanClick: a,
|
|
6505
6491
|
selectedSpanId: s?.spanId
|
|
@@ -6507,14 +6493,14 @@ function Nl({ trace: e }) {
|
|
|
6507
6493
|
})
|
|
6508
6494
|
]
|
|
6509
6495
|
}),
|
|
6510
|
-
s && /* @__PURE__ */ P(
|
|
6496
|
+
s && /* @__PURE__ */ P(gl, {
|
|
6511
6497
|
span: s,
|
|
6512
6498
|
onClose: o
|
|
6513
6499
|
})
|
|
6514
6500
|
]
|
|
6515
6501
|
});
|
|
6516
6502
|
}
|
|
6517
|
-
function
|
|
6503
|
+
function Fl({ trace: e }) {
|
|
6518
6504
|
let t = [
|
|
6519
6505
|
{
|
|
6520
6506
|
label: "Service",
|
|
@@ -6522,7 +6508,7 @@ function Pl({ trace: e }) {
|
|
|
6522
6508
|
},
|
|
6523
6509
|
{
|
|
6524
6510
|
label: "Duration",
|
|
6525
|
-
value:
|
|
6511
|
+
value: jc(e.duration)
|
|
6526
6512
|
},
|
|
6527
6513
|
{
|
|
6528
6514
|
label: "Spans",
|
|
@@ -6530,7 +6516,7 @@ function Pl({ trace: e }) {
|
|
|
6530
6516
|
},
|
|
6531
6517
|
{
|
|
6532
6518
|
label: "Started",
|
|
6533
|
-
value:
|
|
6519
|
+
value: Ac(e.startTime)
|
|
6534
6520
|
}
|
|
6535
6521
|
];
|
|
6536
6522
|
return /* @__PURE__ */ F("header", {
|
|
@@ -6538,7 +6524,7 @@ function Pl({ trace: e }) {
|
|
|
6538
6524
|
children: [
|
|
6539
6525
|
/* @__PURE__ */ F("div", {
|
|
6540
6526
|
className: "flex items-center gap-3",
|
|
6541
|
-
children: [/* @__PURE__ */ P(
|
|
6527
|
+
children: [/* @__PURE__ */ P(kc, { status: e.status }), /* @__PURE__ */ P("h2", {
|
|
6542
6528
|
className: "truncate text-lg font-semibold tracking-tight",
|
|
6543
6529
|
children: e.rootOperationName
|
|
6544
6530
|
})]
|
|
@@ -6565,13 +6551,13 @@ function Pl({ trace: e }) {
|
|
|
6565
6551
|
}
|
|
6566
6552
|
//#endregion
|
|
6567
6553
|
//#region src/traces/detail/TraceDetailStates.tsx
|
|
6568
|
-
function
|
|
6554
|
+
function Il() {
|
|
6569
6555
|
return /* @__PURE__ */ P("div", {
|
|
6570
6556
|
className: "p-6",
|
|
6571
|
-
children: /* @__PURE__ */ P(
|
|
6557
|
+
children: /* @__PURE__ */ P(Ml, { state: "loading" })
|
|
6572
6558
|
});
|
|
6573
6559
|
}
|
|
6574
|
-
function
|
|
6560
|
+
function Ll({ onRetry: e }) {
|
|
6575
6561
|
return /* @__PURE__ */ F("div", {
|
|
6576
6562
|
className: "flex flex-col items-center gap-3 p-12",
|
|
6577
6563
|
children: [
|
|
@@ -6589,7 +6575,7 @@ function Il({ onRetry: e }) {
|
|
|
6589
6575
|
]
|
|
6590
6576
|
});
|
|
6591
6577
|
}
|
|
6592
|
-
function
|
|
6578
|
+
function Rl({ onBack: e }) {
|
|
6593
6579
|
return /* @__PURE__ */ F("div", {
|
|
6594
6580
|
className: "flex flex-col items-center justify-center gap-4 p-12 text-center",
|
|
6595
6581
|
children: [/* @__PURE__ */ P("p", {
|
|
@@ -6605,7 +6591,7 @@ function Ll({ onBack: e }) {
|
|
|
6605
6591
|
}
|
|
6606
6592
|
//#endregion
|
|
6607
6593
|
//#region src/traces/detail/TraceDetailPage.tsx
|
|
6608
|
-
function
|
|
6594
|
+
function zl({ apiId: e }) {
|
|
6609
6595
|
let t = un(), n = ln(), r = e ?? t.apiId ?? "", i = t.traceId, { data: a, isLoading: o, isError: s, refetch: c } = gr({
|
|
6610
6596
|
apiId: r,
|
|
6611
6597
|
traceId: i
|
|
@@ -6620,33 +6606,33 @@ function Rl({ apiId: e }) {
|
|
|
6620
6606
|
onClick: l,
|
|
6621
6607
|
children: [/* @__PURE__ */ P(x, { className: "mr-1.5 size-4" }), "Back to traces"]
|
|
6622
6608
|
})
|
|
6623
|
-
}), o ? /* @__PURE__ */ P(
|
|
6609
|
+
}), o ? /* @__PURE__ */ P(Il, {}) : s ? /* @__PURE__ */ P(Ll, { onRetry: () => c() }) : a ? /* @__PURE__ */ P(Pl, { trace: a }) : /* @__PURE__ */ P(Rl, { onBack: l })]
|
|
6624
6610
|
});
|
|
6625
6611
|
}
|
|
6626
6612
|
//#endregion
|
|
6627
6613
|
//#region src/traces/detail/TraceDetailDrawer.tsx
|
|
6628
|
-
function
|
|
6614
|
+
function Bl({ apiId: e, traceId: t, onClose: n, onNavigatePrev: r, onNavigateNext: i, hasPrev: a = !0, hasNext: o = !0 }) {
|
|
6629
6615
|
let { data: s, isLoading: c, isError: l, refetch: u } = gr({
|
|
6630
6616
|
apiId: e,
|
|
6631
6617
|
traceId: t,
|
|
6632
6618
|
keepPreviousData: !0
|
|
6633
6619
|
});
|
|
6634
|
-
return /* @__PURE__ */ F(
|
|
6620
|
+
return /* @__PURE__ */ F(pc, {
|
|
6635
6621
|
open: !!t,
|
|
6636
6622
|
onClose: n,
|
|
6637
6623
|
onNavigatePrev: r,
|
|
6638
6624
|
onNavigateNext: i,
|
|
6639
|
-
children: [/* @__PURE__ */ P(
|
|
6625
|
+
children: [/* @__PURE__ */ P(Vl, {
|
|
6640
6626
|
onClose: n,
|
|
6641
6627
|
onNavigatePrev: r,
|
|
6642
6628
|
onNavigateNext: i,
|
|
6643
6629
|
hasPrev: a,
|
|
6644
6630
|
hasNext: o
|
|
6645
|
-
}), t ? l ? /* @__PURE__ */ P(
|
|
6631
|
+
}), t ? l ? /* @__PURE__ */ P(Ll, { onRetry: () => u() }) : s ? /* @__PURE__ */ P(Pl, { trace: s }) : c ? /* @__PURE__ */ P(Il, {}) : null : s ? /* @__PURE__ */ P(Pl, { trace: s }) : null]
|
|
6646
6632
|
});
|
|
6647
6633
|
}
|
|
6648
|
-
function
|
|
6649
|
-
let { expanded: a, setExpanded: o } =
|
|
6634
|
+
function Vl({ onClose: e, onNavigatePrev: t, onNavigateNext: n, hasPrev: r, hasNext: i }) {
|
|
6635
|
+
let { expanded: a, setExpanded: o } = uc();
|
|
6650
6636
|
return /* @__PURE__ */ F("div", {
|
|
6651
6637
|
className: "sticky top-0 z-10 flex items-center justify-between gap-1 border-b bg-background/95 px-3 py-2 backdrop-blur",
|
|
6652
6638
|
role: "toolbar",
|
|
@@ -6680,7 +6666,7 @@ function Bl({ onClose: e, onNavigatePrev: t, onNavigateNext: n, hasPrev: r, hasN
|
|
|
6680
6666
|
className: "size-7",
|
|
6681
6667
|
onClick: () => o(!a),
|
|
6682
6668
|
"aria-label": a ? "Exit full screen" : "Full screen",
|
|
6683
|
-
children: P(a ?
|
|
6669
|
+
children: P(a ? E : se, { className: "size-4" })
|
|
6684
6670
|
})
|
|
6685
6671
|
}), /* @__PURE__ */ P(V, { children: a ? "Exit full screen" : "Full screen" })] }) }), /* @__PURE__ */ P(R, {
|
|
6686
6672
|
variant: "ghost",
|
|
@@ -6688,36 +6674,36 @@ function Bl({ onClose: e, onNavigatePrev: t, onNavigateNext: n, hasPrev: r, hasN
|
|
|
6688
6674
|
className: "size-7",
|
|
6689
6675
|
onClick: e,
|
|
6690
6676
|
"aria-label": "Close trace detail",
|
|
6691
|
-
children: /* @__PURE__ */ P(
|
|
6677
|
+
children: /* @__PURE__ */ P(ge, { className: "size-4" })
|
|
6692
6678
|
})]
|
|
6693
6679
|
})]
|
|
6694
6680
|
});
|
|
6695
6681
|
}
|
|
6696
6682
|
//#endregion
|
|
6697
6683
|
//#region src/data-sources/filter-serialization.ts
|
|
6698
|
-
var
|
|
6684
|
+
var Hl = [
|
|
6699
6685
|
"eq",
|
|
6700
6686
|
"in",
|
|
6701
6687
|
"lte",
|
|
6702
6688
|
"gte",
|
|
6703
6689
|
"contains"
|
|
6704
6690
|
];
|
|
6705
|
-
function
|
|
6706
|
-
return
|
|
6691
|
+
function Ul(e) {
|
|
6692
|
+
return Hl.includes(e);
|
|
6707
6693
|
}
|
|
6708
|
-
var
|
|
6694
|
+
var Wl = {
|
|
6709
6695
|
eq: "EQ",
|
|
6710
6696
|
in: "IN",
|
|
6711
6697
|
lte: "LTE",
|
|
6712
6698
|
gte: "GTE",
|
|
6713
6699
|
contains: "CONTAINS"
|
|
6714
6700
|
};
|
|
6715
|
-
function
|
|
6716
|
-
if (!
|
|
6701
|
+
function Gl(e) {
|
|
6702
|
+
if (!Ul(e.operator)) throw Error(`[gamma-lib-observability] Filter operator "${e.operator}" on field "${e.field}" is not supported by the Gravitee Management v2 API. Supported operators: ${Hl.join(", ")}.`);
|
|
6717
6703
|
let t = e.value[0];
|
|
6718
6704
|
if (t === void 0) throw Error(`[gamma-lib-observability] Filter on field "${e.field}" with operator "${e.operator}" has no value — every supported operator requires at least one value.`);
|
|
6719
6705
|
switch (e.operator) {
|
|
6720
|
-
case "eq": return
|
|
6706
|
+
case "eq": return Kl(e, "eq", "in"), {
|
|
6721
6707
|
name: e.field,
|
|
6722
6708
|
operator: "EQ",
|
|
6723
6709
|
value: t
|
|
@@ -6729,17 +6715,17 @@ function Wl(e) {
|
|
|
6729
6715
|
};
|
|
6730
6716
|
case "lte":
|
|
6731
6717
|
case "gte": {
|
|
6732
|
-
|
|
6733
|
-
let n =
|
|
6718
|
+
Kl(e, e.operator);
|
|
6719
|
+
let n = ql(e, t);
|
|
6734
6720
|
return {
|
|
6735
6721
|
name: e.field,
|
|
6736
|
-
operator:
|
|
6722
|
+
operator: Wl[e.operator],
|
|
6737
6723
|
value: n
|
|
6738
6724
|
};
|
|
6739
6725
|
}
|
|
6740
|
-
case "contains": return
|
|
6726
|
+
case "contains": return Kl(e, "contains"), {
|
|
6741
6727
|
name: e.field,
|
|
6742
|
-
operator:
|
|
6728
|
+
operator: Wl[e.operator],
|
|
6743
6729
|
value: t
|
|
6744
6730
|
};
|
|
6745
6731
|
default: {
|
|
@@ -6748,50 +6734,50 @@ function Wl(e) {
|
|
|
6748
6734
|
}
|
|
6749
6735
|
}
|
|
6750
6736
|
}
|
|
6751
|
-
function
|
|
6737
|
+
function Kl(e, t, n) {
|
|
6752
6738
|
if (e.value.length <= 1) return;
|
|
6753
6739
|
let r = n ? ` Use "${n}" for multi-value membership.` : "";
|
|
6754
6740
|
throw Error(`[gamma-lib-observability] Filter on field "${e.field}" with operator "${t}" received ${e.value.length} values; "${t}" expects a single value.${r}`);
|
|
6755
6741
|
}
|
|
6756
|
-
function
|
|
6742
|
+
function ql(e, t) {
|
|
6757
6743
|
let n = t.trim();
|
|
6758
6744
|
if (n === "") throw Error(`[gamma-lib-observability] Filter on field "${e.field}" with operator "${e.operator}" expects a numeric value but received an empty string.`);
|
|
6759
6745
|
let r = Number(n);
|
|
6760
6746
|
if (Number.isNaN(r)) throw Error(`[gamma-lib-observability] Filter on field "${e.field}" with operator "${e.operator}" expects a numeric value but received "${t}".`);
|
|
6761
6747
|
return r;
|
|
6762
6748
|
}
|
|
6763
|
-
function
|
|
6764
|
-
if (e?.length) return e.map(
|
|
6749
|
+
function Jl(e) {
|
|
6750
|
+
if (e?.length) return e.map(Gl);
|
|
6765
6751
|
}
|
|
6766
6752
|
//#endregion
|
|
6767
6753
|
//#region src/data-sources/http-utils.ts
|
|
6768
|
-
function
|
|
6754
|
+
function Yl(e) {
|
|
6769
6755
|
if (e) return typeof e == "function" ? e() : e;
|
|
6770
6756
|
}
|
|
6771
|
-
function
|
|
6757
|
+
function Xl(...e) {
|
|
6772
6758
|
let t = new Headers();
|
|
6773
6759
|
for (let n of e) n && new Headers(n).forEach((e, n) => t.set(n, e));
|
|
6774
6760
|
return t;
|
|
6775
6761
|
}
|
|
6776
6762
|
//#endregion
|
|
6777
6763
|
//#region src/data-sources/http-data-source.ts
|
|
6778
|
-
var
|
|
6764
|
+
var Zl = {
|
|
6779
6765
|
name: "HTTP_REQUESTS",
|
|
6780
6766
|
measures: [Tn]
|
|
6781
6767
|
};
|
|
6782
|
-
function
|
|
6768
|
+
function Ql(e) {
|
|
6783
6769
|
return e.metrics.map((e) => ({
|
|
6784
6770
|
name: e.name,
|
|
6785
6771
|
unit: e.unit,
|
|
6786
6772
|
measures: e.measures ?? []
|
|
6787
6773
|
}));
|
|
6788
6774
|
}
|
|
6789
|
-
function
|
|
6775
|
+
function $l(e, t = "", n = "") {
|
|
6790
6776
|
let r = [];
|
|
6791
6777
|
for (let i of e) {
|
|
6792
6778
|
let e = t ? `${t} / ${i.key}` : i.key, a = n ? `${n}${ta}${i.name ?? i.key}` : i.name ?? i.key;
|
|
6793
6779
|
if (i.type === "GROUP" && i.buckets?.length) {
|
|
6794
|
-
r.push(
|
|
6780
|
+
r.push(...$l(i.buckets, e, a));
|
|
6795
6781
|
continue;
|
|
6796
6782
|
}
|
|
6797
6783
|
r.push({
|
|
@@ -6802,12 +6788,12 @@ function Ql(e, t = "", n = "") {
|
|
|
6802
6788
|
}
|
|
6803
6789
|
return r;
|
|
6804
6790
|
}
|
|
6805
|
-
function
|
|
6791
|
+
function eu(e) {
|
|
6806
6792
|
let t = [];
|
|
6807
|
-
for (let n of e.metrics) n.buckets && t.push(
|
|
6793
|
+
for (let n of e.metrics) n.buckets && t.push(...$l(n.buckets));
|
|
6808
6794
|
return t;
|
|
6809
6795
|
}
|
|
6810
|
-
function
|
|
6796
|
+
function tu(e) {
|
|
6811
6797
|
let t = [];
|
|
6812
6798
|
for (let n of e.metrics) if (n.buckets) if (n.buckets.some((e) => e.type === "GROUP" && e.buckets?.length)) {
|
|
6813
6799
|
let e = /* @__PURE__ */ new Map();
|
|
@@ -6844,47 +6830,47 @@ function eu(e) {
|
|
|
6844
6830
|
}
|
|
6845
6831
|
return t;
|
|
6846
6832
|
}
|
|
6847
|
-
function
|
|
6833
|
+
function nu(e) {
|
|
6848
6834
|
return {
|
|
6849
6835
|
...e,
|
|
6850
6836
|
measures: e.measures?.length ? e.measures : [Tn]
|
|
6851
6837
|
};
|
|
6852
6838
|
}
|
|
6853
|
-
function nu(e) {
|
|
6854
|
-
let t = au(e);
|
|
6855
|
-
return t.metrics = e.metrics.map(ou), t;
|
|
6856
|
-
}
|
|
6857
6839
|
function ru(e) {
|
|
6858
|
-
let t =
|
|
6859
|
-
return t.
|
|
6840
|
+
let t = ou(e);
|
|
6841
|
+
return t.metrics = e.metrics.map(su), t;
|
|
6842
|
+
}
|
|
6843
|
+
function iu(e) {
|
|
6844
|
+
let t = ou(e);
|
|
6845
|
+
return t.interval = e.interval, t.metrics = e.metrics.map(su), e.by?.length && (t.by = e.by), e.ranges?.length && (t.ranges = e.ranges), e.limit !== void 0 && (t.limit = e.limit), t;
|
|
6860
6846
|
}
|
|
6861
|
-
function
|
|
6862
|
-
let n =
|
|
6863
|
-
return n.by = e.by, n.metrics = (e.metrics?.length ? e.metrics : [t]).map(
|
|
6847
|
+
function au(e, t) {
|
|
6848
|
+
let n = ou(e);
|
|
6849
|
+
return n.by = e.by, n.metrics = (e.metrics?.length ? e.metrics : [t]).map(su), e.ranges?.length && (n.ranges = e.ranges), e.limit !== void 0 && (n.limit = e.limit), n;
|
|
6864
6850
|
}
|
|
6865
|
-
function
|
|
6851
|
+
function ou(e) {
|
|
6866
6852
|
let t = ir(e.timeRange), n = { timeRange: {
|
|
6867
6853
|
from: new Date(t.from).toISOString(),
|
|
6868
6854
|
to: new Date(t.to).toISOString()
|
|
6869
|
-
} }, r =
|
|
6855
|
+
} }, r = Jl(e.filters);
|
|
6870
6856
|
return r && (n.filters = r), n;
|
|
6871
6857
|
}
|
|
6872
|
-
function
|
|
6873
|
-
let t =
|
|
6858
|
+
function su(e) {
|
|
6859
|
+
let t = nu(e), n = {
|
|
6874
6860
|
name: t.name,
|
|
6875
6861
|
measures: t.measures
|
|
6876
|
-
}, r =
|
|
6862
|
+
}, r = Jl(e.filters);
|
|
6877
6863
|
return r && (n.filters = r), "sorts" in e && e.sorts?.length && (n.sorts = e.sorts), n;
|
|
6878
6864
|
}
|
|
6879
|
-
function
|
|
6865
|
+
function cu(e, t) {
|
|
6880
6866
|
let n = t?.fetch ?? globalThis.fetch.bind(globalThis), r = t?.credentials, i = {
|
|
6881
|
-
name: t?.defaultFacetMetric?.name ??
|
|
6882
|
-
measures: t?.defaultFacetMetric?.measures?.length ? [...t.defaultFacetMetric.measures] : [...
|
|
6867
|
+
name: t?.defaultFacetMetric?.name ?? Zl.name,
|
|
6868
|
+
measures: t?.defaultFacetMetric?.measures?.length ? [...t.defaultFacetMetric.measures] : [...Zl.measures]
|
|
6883
6869
|
};
|
|
6884
6870
|
async function a(i, a, o) {
|
|
6885
6871
|
let s = {
|
|
6886
6872
|
method: "POST",
|
|
6887
|
-
headers:
|
|
6873
|
+
headers: Xl({ "Content-Type": "application/json" }, Yl(t?.headers)),
|
|
6888
6874
|
body: JSON.stringify(a),
|
|
6889
6875
|
signal: o
|
|
6890
6876
|
};
|
|
@@ -6895,19 +6881,19 @@ function su(e, t) {
|
|
|
6895
6881
|
}
|
|
6896
6882
|
return {
|
|
6897
6883
|
async fetchTimeSeries(e) {
|
|
6898
|
-
return
|
|
6884
|
+
return tu(await a("/observability/analytics/time-series", iu(e), e.signal));
|
|
6899
6885
|
},
|
|
6900
6886
|
async fetchFacets(e) {
|
|
6901
|
-
return
|
|
6887
|
+
return eu(await a("/observability/analytics/facets", au(e, i), e.signal));
|
|
6902
6888
|
},
|
|
6903
6889
|
async fetchMeasures(e) {
|
|
6904
|
-
return
|
|
6890
|
+
return Ql(await a("/observability/analytics/measures", ru(e), e.signal));
|
|
6905
6891
|
}
|
|
6906
6892
|
};
|
|
6907
6893
|
}
|
|
6908
6894
|
//#endregion
|
|
6909
6895
|
//#region src/data-sources/http-filter-source.ts
|
|
6910
|
-
function
|
|
6896
|
+
function lu(e) {
|
|
6911
6897
|
return {
|
|
6912
6898
|
EQ: "eq",
|
|
6913
6899
|
IN: "in",
|
|
@@ -6920,14 +6906,14 @@ function cu(e) {
|
|
|
6920
6906
|
CONTAINS: "contains"
|
|
6921
6907
|
}[e] ?? e.toLowerCase();
|
|
6922
6908
|
}
|
|
6923
|
-
function
|
|
6909
|
+
function uu(e) {
|
|
6924
6910
|
return e.toUpperCase() === "ENUM" ? "enum" : "async";
|
|
6925
6911
|
}
|
|
6926
|
-
function
|
|
6912
|
+
function du(e, t) {
|
|
6927
6913
|
let n = t?.fetch ?? globalThis.fetch.bind(globalThis), r = t?.credentials;
|
|
6928
6914
|
function i(e) {
|
|
6929
|
-
let n = { ...e }, i =
|
|
6930
|
-
return (e?.headers || i) && (n.headers =
|
|
6915
|
+
let n = { ...e }, i = Yl(t?.headers);
|
|
6916
|
+
return (e?.headers || i) && (n.headers = Xl(e?.headers, i)), r && (n.credentials = r), n;
|
|
6931
6917
|
}
|
|
6932
6918
|
function a(t) {
|
|
6933
6919
|
return async (r) => {
|
|
@@ -6953,7 +6939,7 @@ function uu(e, t) {
|
|
|
6953
6939
|
let r = await n(`${e}/observability/filters/definition`, i({ signal: t }));
|
|
6954
6940
|
if (!r.ok) throw Error(`[gamma-lib-observability] HTTP ${r.status} on GET filters/definition`);
|
|
6955
6941
|
return (await r.json()).data.map((e) => {
|
|
6956
|
-
let t =
|
|
6942
|
+
let t = uu(e.type), n = e.operators.map(lu), r = e.type.toUpperCase(), i = e.apiTypes, o = e.signals;
|
|
6957
6943
|
if (t === "enum") {
|
|
6958
6944
|
let r = (e.enumValues ?? []).map((e) => typeof e == "string" ? {
|
|
6959
6945
|
value: e,
|
|
@@ -7008,20 +6994,20 @@ function uu(e, t) {
|
|
|
7008
6994
|
}
|
|
7009
6995
|
//#endregion
|
|
7010
6996
|
//#region src/data-sources/http-logs-source.ts
|
|
7011
|
-
var
|
|
7012
|
-
function
|
|
7013
|
-
let n = t?.fetch ?? globalThis.fetch.bind(globalThis), r = t?.credentials, i = t?.searchPath ??
|
|
6997
|
+
var fu = "/observability/logs/search";
|
|
6998
|
+
function pu(e, t) {
|
|
6999
|
+
let n = t?.fetch ?? globalThis.fetch.bind(globalThis), r = t?.credentials, i = t?.searchPath ?? fu;
|
|
7014
7000
|
function a(e) {
|
|
7015
7001
|
let n = {
|
|
7016
7002
|
method: "POST",
|
|
7017
|
-
headers:
|
|
7003
|
+
headers: Xl({ "Content-Type": "application/json" }, e, Yl(t?.headers))
|
|
7018
7004
|
};
|
|
7019
7005
|
return r && (n.credentials = r), n;
|
|
7020
7006
|
}
|
|
7021
7007
|
function o() {
|
|
7022
7008
|
let e = {
|
|
7023
7009
|
method: "GET",
|
|
7024
|
-
headers: Yl(
|
|
7010
|
+
headers: Xl(Yl(t?.headers))
|
|
7025
7011
|
};
|
|
7026
7012
|
return r && (e.credentials = r), e;
|
|
7027
7013
|
}
|
|
@@ -7033,7 +7019,7 @@ function fu(e, t) {
|
|
|
7033
7019
|
}
|
|
7034
7020
|
return {
|
|
7035
7021
|
async fetchLogs(e) {
|
|
7036
|
-
let t = ir(e.timeRange), r =
|
|
7022
|
+
let t = ir(e.timeRange), r = Jl(e.filters), o = { timeRange: {
|
|
7037
7023
|
from: new Date(t.from).toISOString(),
|
|
7038
7024
|
to: new Date(t.to).toISOString()
|
|
7039
7025
|
} };
|
|
@@ -7064,30 +7050,30 @@ function fu(e, t) {
|
|
|
7064
7050
|
}
|
|
7065
7051
|
//#endregion
|
|
7066
7052
|
//#region src/data-sources/http-traces-source.ts
|
|
7067
|
-
var
|
|
7068
|
-
function
|
|
7053
|
+
var mu = "/observability/traces/search";
|
|
7054
|
+
function hu(e) {
|
|
7069
7055
|
return e / 1e6;
|
|
7070
7056
|
}
|
|
7071
|
-
function
|
|
7057
|
+
function gu(e) {
|
|
7072
7058
|
return e;
|
|
7073
7059
|
}
|
|
7074
|
-
function
|
|
7060
|
+
function _u(e) {
|
|
7075
7061
|
return {
|
|
7076
7062
|
name: e.name,
|
|
7077
7063
|
timestampEpochMs: e.timestampEpochMs,
|
|
7078
|
-
attributes:
|
|
7064
|
+
attributes: gu(e.attributes)
|
|
7079
7065
|
};
|
|
7080
7066
|
}
|
|
7081
|
-
function
|
|
7067
|
+
function vu(e) {
|
|
7082
7068
|
return {
|
|
7083
7069
|
timestampEpochMs: e.timestampEpochMs,
|
|
7084
7070
|
body: e.body,
|
|
7085
7071
|
severity: e.severity,
|
|
7086
|
-
attributes:
|
|
7072
|
+
attributes: gu(e.attributes)
|
|
7087
7073
|
};
|
|
7088
7074
|
}
|
|
7089
|
-
function
|
|
7090
|
-
let t =
|
|
7075
|
+
function yu(e) {
|
|
7076
|
+
let t = hu(e.durationNanos);
|
|
7091
7077
|
return {
|
|
7092
7078
|
traceId: e.traceId,
|
|
7093
7079
|
rootOperationName: e.rootOperationName,
|
|
@@ -7098,8 +7084,8 @@ function vu(e) {
|
|
|
7098
7084
|
status: e.status
|
|
7099
7085
|
};
|
|
7100
7086
|
}
|
|
7101
|
-
function
|
|
7102
|
-
let t = e.startTimeEpochMs, n =
|
|
7087
|
+
function bu(e) {
|
|
7088
|
+
let t = e.startTimeEpochMs, n = hu(e.durationNanos);
|
|
7103
7089
|
return {
|
|
7104
7090
|
traceId: e.traceId,
|
|
7105
7091
|
spanId: e.spanId,
|
|
@@ -7112,27 +7098,27 @@ function yu(e) {
|
|
|
7112
7098
|
status: e.status,
|
|
7113
7099
|
kind: e.kind,
|
|
7114
7100
|
attributes: e.attributes,
|
|
7115
|
-
events: e.events.map(
|
|
7116
|
-
payloadLogs: e.payloadLogs.map(
|
|
7101
|
+
events: e.events.map(_u),
|
|
7102
|
+
payloadLogs: e.payloadLogs.map(vu)
|
|
7117
7103
|
};
|
|
7118
7104
|
}
|
|
7119
|
-
function
|
|
7120
|
-
let t = e.spans.map(
|
|
7105
|
+
function xu(e) {
|
|
7106
|
+
let t = e.spans.map(bu);
|
|
7121
7107
|
return {
|
|
7122
|
-
...
|
|
7108
|
+
...yu(e),
|
|
7123
7109
|
spanCount: t.length,
|
|
7124
7110
|
spans: t
|
|
7125
7111
|
};
|
|
7126
7112
|
}
|
|
7127
|
-
function
|
|
7113
|
+
function Su(e) {
|
|
7128
7114
|
return e.endsWith("/search") ? e.slice(0, -7) : e;
|
|
7129
7115
|
}
|
|
7130
|
-
function
|
|
7131
|
-
let n = t?.fetch ?? globalThis.fetch.bind(globalThis), r = t?.credentials, i = t?.searchPath ??
|
|
7116
|
+
function Cu(e, t) {
|
|
7117
|
+
let n = t?.fetch ?? globalThis.fetch.bind(globalThis), r = t?.credentials, i = t?.searchPath ?? mu, a = Su(i);
|
|
7132
7118
|
function o(e) {
|
|
7133
7119
|
let n = {
|
|
7134
7120
|
method: e,
|
|
7135
|
-
headers:
|
|
7121
|
+
headers: Xl(e === "GET" ? void 0 : { "Content-Type": "application/json" }, Yl(t?.headers))
|
|
7136
7122
|
};
|
|
7137
7123
|
return r && (n.credentials = r), n;
|
|
7138
7124
|
}
|
|
@@ -7150,7 +7136,7 @@ function Su(e, t) {
|
|
|
7150
7136
|
}
|
|
7151
7137
|
return {
|
|
7152
7138
|
async fetchTraces(e) {
|
|
7153
|
-
let t = ir(e.timeRange), r =
|
|
7139
|
+
let t = ir(e.timeRange), r = Jl(e.filters), a = {
|
|
7154
7140
|
apiId: e.apiId,
|
|
7155
7141
|
timeRange: c(t)
|
|
7156
7142
|
};
|
|
@@ -7161,7 +7147,7 @@ function Su(e, t) {
|
|
|
7161
7147
|
if (!u.ok) throw Error(`[gamma-lib-observability] HTTP ${u.status} on POST ${i}`);
|
|
7162
7148
|
let d = await u.json();
|
|
7163
7149
|
return {
|
|
7164
|
-
entries: (d.data ?? []).map(
|
|
7150
|
+
entries: (d.data ?? []).map(yu),
|
|
7165
7151
|
totalCount: d.pagination?.totalCount,
|
|
7166
7152
|
page: d.pagination?.page,
|
|
7167
7153
|
pageCount: d.pagination?.pageCount
|
|
@@ -7172,13 +7158,13 @@ function Su(e, t) {
|
|
|
7172
7158
|
t.signal && (i.signal = t.signal);
|
|
7173
7159
|
let s = await n(r, i);
|
|
7174
7160
|
if (!s.ok) throw Error(`[gamma-lib-observability] HTTP ${s.status} on GET ${a}/${t.traceId}`);
|
|
7175
|
-
return
|
|
7161
|
+
return xu(await s.json());
|
|
7176
7162
|
}
|
|
7177
7163
|
};
|
|
7178
7164
|
}
|
|
7179
7165
|
//#endregion
|
|
7180
7166
|
//#region src/routing/DashboardListPage.tsx
|
|
7181
|
-
function
|
|
7167
|
+
function wu({ templates: e }) {
|
|
7182
7168
|
let t = a(), n = A(() => No(e, t), [e, t]), r = A(() => [{
|
|
7183
7169
|
id: "name",
|
|
7184
7170
|
accessorKey: "label",
|
|
@@ -7212,7 +7198,7 @@ function Cu({ templates: e }) {
|
|
|
7212
7198
|
}
|
|
7213
7199
|
//#endregion
|
|
7214
7200
|
//#region src/routing/detail-filter.ts
|
|
7215
|
-
function
|
|
7201
|
+
function Tu(e, t, n) {
|
|
7216
7202
|
let r = e.filter((e) => e.field !== t);
|
|
7217
7203
|
return r.push({
|
|
7218
7204
|
field: t,
|
|
@@ -7221,7 +7207,7 @@ function wu(e, t, n) {
|
|
|
7221
7207
|
value: [n]
|
|
7222
7208
|
}), r;
|
|
7223
7209
|
}
|
|
7224
|
-
function
|
|
7210
|
+
function Eu(e, t) {
|
|
7225
7211
|
let n = Mr({
|
|
7226
7212
|
conditions: [...e],
|
|
7227
7213
|
timeRange: t
|
|
@@ -7230,9 +7216,9 @@ function Tu(e, t) {
|
|
|
7230
7216
|
}
|
|
7231
7217
|
//#endregion
|
|
7232
7218
|
//#region src/routing/LogsRouteElement.tsx
|
|
7233
|
-
function
|
|
7219
|
+
function Du({ columns: e, getRowId: t, getApiId: n, onRowClickOverride: r, detailConfig: i, detailMode: a, pageSize: o, scopeFilterField: s, columnVisibilityStorageKey: c }) {
|
|
7234
7220
|
let l = !r && !!i && !!t;
|
|
7235
|
-
return l && a === "drawer" && i && t ? /* @__PURE__ */ P(
|
|
7221
|
+
return l && a === "drawer" && i && t ? /* @__PURE__ */ P(Ou, {
|
|
7236
7222
|
columns: e,
|
|
7237
7223
|
getRowId: t,
|
|
7238
7224
|
getApiId: n,
|
|
@@ -7240,7 +7226,7 @@ function Eu({ columns: e, getRowId: t, getApiId: n, onRowClickOverride: r, detai
|
|
|
7240
7226
|
pageSize: o,
|
|
7241
7227
|
scopeFilterField: s,
|
|
7242
7228
|
columnVisibilityStorageKey: c
|
|
7243
|
-
}) : /* @__PURE__ */ P(
|
|
7229
|
+
}) : /* @__PURE__ */ P(ku, {
|
|
7244
7230
|
columns: e,
|
|
7245
7231
|
getRowId: t,
|
|
7246
7232
|
getApiId: n,
|
|
@@ -7251,7 +7237,7 @@ function Eu({ columns: e, getRowId: t, getApiId: n, onRowClickOverride: r, detai
|
|
|
7251
7237
|
columnVisibilityStorageKey: c
|
|
7252
7238
|
});
|
|
7253
7239
|
}
|
|
7254
|
-
function
|
|
7240
|
+
function Ou({ columns: e, getRowId: t, getApiId: n, detailConfig: r, pageSize: i, scopeFilterField: a, columnVisibilityStorageKey: o }) {
|
|
7255
7241
|
let [s, c] = M(void 0), [l, u] = M(void 0), [d, f] = M([]), { filters: p, setFilters: m } = Ko(), h = A(() => s ? d.findIndex((e) => t(e) === s) : -1, [
|
|
7256
7242
|
s,
|
|
7257
7243
|
d,
|
|
@@ -7259,7 +7245,7 @@ function Du({ columns: e, getRowId: t, getApiId: n, detailConfig: r, pageSize: i
|
|
|
7259
7245
|
]), g = O((e) => {
|
|
7260
7246
|
c(t(e)), u(n?.(e));
|
|
7261
7247
|
}, [t, n]), _ = O((e, t) => {
|
|
7262
|
-
m(
|
|
7248
|
+
m(Tu(p, e, t)), c(void 0), u(void 0);
|
|
7263
7249
|
}, [p, m]), v = O(() => {
|
|
7264
7250
|
let e = d[h - 1];
|
|
7265
7251
|
e && (c(t(e)), u(n?.(e)));
|
|
@@ -7277,7 +7263,7 @@ function Du({ columns: e, getRowId: t, getApiId: n, detailConfig: r, pageSize: i
|
|
|
7277
7263
|
t,
|
|
7278
7264
|
n
|
|
7279
7265
|
]);
|
|
7280
|
-
return /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(
|
|
7266
|
+
return /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(Cs, {
|
|
7281
7267
|
columns: e,
|
|
7282
7268
|
onRowClick: g,
|
|
7283
7269
|
getRowId: t,
|
|
@@ -7286,7 +7272,7 @@ function Du({ columns: e, getRowId: t, getApiId: n, detailConfig: r, pageSize: i
|
|
|
7286
7272
|
pageSize: i,
|
|
7287
7273
|
scopeFilterField: a,
|
|
7288
7274
|
columnVisibilityStorageKey: o
|
|
7289
|
-
}), /* @__PURE__ */ P(
|
|
7275
|
+
}), /* @__PURE__ */ P(Tc, {
|
|
7290
7276
|
config: r,
|
|
7291
7277
|
logId: s,
|
|
7292
7278
|
apiId: l,
|
|
@@ -7300,9 +7286,9 @@ function Du({ columns: e, getRowId: t, getApiId: n, detailConfig: r, pageSize: i
|
|
|
7300
7286
|
hasNext: h >= 0 && h < d.length - 1
|
|
7301
7287
|
})] });
|
|
7302
7288
|
}
|
|
7303
|
-
function
|
|
7289
|
+
function ku({ columns: e, getRowId: t, getApiId: n, onRowClickOverride: r, builtInDetailEnabled: i, pageSize: a, scopeFilterField: o, columnVisibilityStorageKey: s }) {
|
|
7304
7290
|
let c = ln(), { pathname: l } = cn();
|
|
7305
|
-
return /* @__PURE__ */ P(
|
|
7291
|
+
return /* @__PURE__ */ P(Cs, {
|
|
7306
7292
|
columns: e,
|
|
7307
7293
|
onRowClick: A(() => {
|
|
7308
7294
|
if (r) return r;
|
|
@@ -7329,18 +7315,18 @@ function Ou({ columns: e, getRowId: t, getApiId: n, onRowClickOverride: r, built
|
|
|
7329
7315
|
}
|
|
7330
7316
|
//#endregion
|
|
7331
7317
|
//#region src/routing/ObservabilityDashboardPage.tsx
|
|
7332
|
-
var
|
|
7333
|
-
function
|
|
7318
|
+
var Au = ["ANALYTICS"];
|
|
7319
|
+
function ju(e) {
|
|
7334
7320
|
let [t] = dn(), n = Ae(), r = t.get("live");
|
|
7335
7321
|
return /* @__PURE__ */ P(On, {
|
|
7336
7322
|
config: {
|
|
7337
7323
|
defaultEnabled: r === "1" || r === "true",
|
|
7338
7324
|
onResume: O(() => n.invalidateQueries({ queryKey: q.all }), [n])
|
|
7339
7325
|
},
|
|
7340
|
-
children: /* @__PURE__ */ P(
|
|
7326
|
+
children: /* @__PURE__ */ P(Mu, { ...e })
|
|
7341
7327
|
});
|
|
7342
7328
|
}
|
|
7343
|
-
function
|
|
7329
|
+
function Mu({ templates: e, scopeFilterField: t, externalLinks: n }) {
|
|
7344
7330
|
let { dashboardId: r } = un(), i = a(), o = An(), [, s] = dn(), c = A(() => No(e, i), [e, i]).find((e) => e.id === r), { timeRange: l, filters: u, setTimeRange: d, setFilters: f } = Ko(), m = Nn(), h = p(), { analyticsFilters: g, excludedFilters: _ } = A(() => {
|
|
7345
7331
|
let { matching: e, excluded: t } = ai(u, h, "ANALYTICS");
|
|
7346
7332
|
return {
|
|
@@ -7386,7 +7372,7 @@ function ju({ templates: e, scopeFilterField: t, externalLinks: n }) {
|
|
|
7386
7372
|
filters: v,
|
|
7387
7373
|
onFiltersChange: y,
|
|
7388
7374
|
scopeFilterField: t,
|
|
7389
|
-
visibleSignals:
|
|
7375
|
+
visibleSignals: Au
|
|
7390
7376
|
})
|
|
7391
7377
|
}),
|
|
7392
7378
|
n?.map((e) => /* @__PURE__ */ F("a", {
|
|
@@ -7411,7 +7397,7 @@ function ju({ templates: e, scopeFilterField: t, externalLinks: n }) {
|
|
|
7411
7397
|
}
|
|
7412
7398
|
//#endregion
|
|
7413
7399
|
//#region src/data-sources/http-traces-filter-source.ts
|
|
7414
|
-
function
|
|
7400
|
+
function Nu(e) {
|
|
7415
7401
|
return {
|
|
7416
7402
|
EQ: "eq",
|
|
7417
7403
|
IN: "in",
|
|
@@ -7424,15 +7410,15 @@ function Mu(e) {
|
|
|
7424
7410
|
CONTAINS: "contains"
|
|
7425
7411
|
}[e] ?? e.toLowerCase();
|
|
7426
7412
|
}
|
|
7427
|
-
function
|
|
7413
|
+
function Pu(e) {
|
|
7428
7414
|
let t = e.toUpperCase();
|
|
7429
7415
|
return t === "ENUM" || t === "BOOLEAN" ? "enum" : "async";
|
|
7430
7416
|
}
|
|
7431
|
-
function
|
|
7417
|
+
function Fu(e, t) {
|
|
7432
7418
|
let n = t?.fetch ?? globalThis.fetch.bind(globalThis), r = t?.credentials, i = t?.module;
|
|
7433
7419
|
function a(e) {
|
|
7434
|
-
let n = { ...e }, i =
|
|
7435
|
-
return (e?.headers || i) && (n.headers =
|
|
7420
|
+
let n = { ...e }, i = Yl(t?.headers);
|
|
7421
|
+
return (e?.headers || i) && (n.headers = Xl(e?.headers, i)), r && (n.credentials = r), n;
|
|
7436
7422
|
}
|
|
7437
7423
|
function o(t) {
|
|
7438
7424
|
return async (r) => {
|
|
@@ -7458,7 +7444,7 @@ function Pu(e, t) {
|
|
|
7458
7444
|
let r = await n(`${e}/observability/traces/filters/definition`, a({ signal: t }));
|
|
7459
7445
|
if (!r.ok) throw Error(`[gamma-lib-observability] HTTP ${r.status} on GET traces/filters/definition`);
|
|
7460
7446
|
return (await r.json()).data.map((e) => {
|
|
7461
|
-
let t =
|
|
7447
|
+
let t = Pu(e.type), n = e.operators.map(Nu), r = e.type.toUpperCase();
|
|
7462
7448
|
if (r === "BOOLEAN") return {
|
|
7463
7449
|
field: e.name,
|
|
7464
7450
|
label: e.label,
|
|
@@ -7508,8 +7494,8 @@ function Pu(e, t) {
|
|
|
7508
7494
|
}
|
|
7509
7495
|
//#endregion
|
|
7510
7496
|
//#region src/routing/TracingFilterProvider.tsx
|
|
7511
|
-
function
|
|
7512
|
-
let i = A(() =>
|
|
7497
|
+
function Iu({ baseUrl: e, http: t, module: n, children: r }) {
|
|
7498
|
+
let i = A(() => Fu(e, {
|
|
7513
7499
|
...t,
|
|
7514
7500
|
module: n
|
|
7515
7501
|
}), [
|
|
@@ -7531,15 +7517,15 @@ function Fu({ baseUrl: e, http: t, module: n, children: r }) {
|
|
|
7531
7517
|
}
|
|
7532
7518
|
//#endregion
|
|
7533
7519
|
//#region src/routing/TracesRouteElement.tsx
|
|
7534
|
-
function
|
|
7535
|
-
return P(e === "drawer" ?
|
|
7520
|
+
function Lu({ detailMode: e, pageSize: t, columnVisibilityStorageKey: n, toolbarStart: r, emptyVariant: i }) {
|
|
7521
|
+
return P(e === "drawer" ? Ru : zu, {
|
|
7536
7522
|
pageSize: t,
|
|
7537
7523
|
columnVisibilityStorageKey: n,
|
|
7538
7524
|
toolbarStart: r,
|
|
7539
7525
|
emptyVariant: i
|
|
7540
7526
|
});
|
|
7541
7527
|
}
|
|
7542
|
-
function
|
|
7528
|
+
function Ru({ pageSize: e, columnVisibilityStorageKey: t, toolbarStart: n, emptyVariant: r }) {
|
|
7543
7529
|
let { apiId: i } = un(), [a, o] = M(void 0), [s, c] = M([]), l = A(() => a ? s.findIndex((e) => e.traceId === a) : -1, [a, s]), u = O((e) => o(e.traceId), []), d = O(() => o(void 0), []), f = O(() => {
|
|
7544
7530
|
let e = s[l - 1];
|
|
7545
7531
|
e && o(e.traceId);
|
|
@@ -7547,7 +7533,7 @@ function Lu({ pageSize: e, columnVisibilityStorageKey: t, toolbarStart: n, empty
|
|
|
7547
7533
|
let e = s[l + 1];
|
|
7548
7534
|
e && o(e.traceId);
|
|
7549
7535
|
}, [s, l]);
|
|
7550
|
-
return /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(
|
|
7536
|
+
return /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(Lc, {
|
|
7551
7537
|
onRowClick: u,
|
|
7552
7538
|
onPageDataChange: c,
|
|
7553
7539
|
selectedRowId: a,
|
|
@@ -7555,7 +7541,7 @@ function Lu({ pageSize: e, columnVisibilityStorageKey: t, toolbarStart: n, empty
|
|
|
7555
7541
|
columnVisibilityStorageKey: t,
|
|
7556
7542
|
toolbarStart: n,
|
|
7557
7543
|
emptyVariant: r
|
|
7558
|
-
}), /* @__PURE__ */ P(
|
|
7544
|
+
}), /* @__PURE__ */ P(Bl, {
|
|
7559
7545
|
apiId: i ?? "",
|
|
7560
7546
|
traceId: a,
|
|
7561
7547
|
onClose: d,
|
|
@@ -7565,9 +7551,9 @@ function Lu({ pageSize: e, columnVisibilityStorageKey: t, toolbarStart: n, empty
|
|
|
7565
7551
|
hasNext: l >= 0 && l < s.length - 1
|
|
7566
7552
|
})] });
|
|
7567
7553
|
}
|
|
7568
|
-
function
|
|
7554
|
+
function zu({ pageSize: e, columnVisibilityStorageKey: t, toolbarStart: n, emptyVariant: r }) {
|
|
7569
7555
|
let i = ln(), { pathname: a } = cn(), { apiId: o } = un();
|
|
7570
|
-
return /* @__PURE__ */ P(
|
|
7556
|
+
return /* @__PURE__ */ P(Lc, {
|
|
7571
7557
|
onRowClick: A(() => {
|
|
7572
7558
|
if (!o) return;
|
|
7573
7559
|
let e = a.replace(/\/$/, "");
|
|
@@ -7585,14 +7571,14 @@ function Ru({ pageSize: e, columnVisibilityStorageKey: t, toolbarStart: n, empty
|
|
|
7585
7571
|
}
|
|
7586
7572
|
//#endregion
|
|
7587
7573
|
//#region src/routing/TracingScreen.tsx
|
|
7588
|
-
function
|
|
7589
|
-
let t = e !== void 0 &&
|
|
7574
|
+
function Bu(e) {
|
|
7575
|
+
let t = e !== void 0 && Xc(e), n = I({
|
|
7590
7576
|
queryKey: q.tracingApis(),
|
|
7591
7577
|
queryFn: ({ signal: t }) => e(t),
|
|
7592
7578
|
enabled: t,
|
|
7593
7579
|
staleTime: 300 * 1e3
|
|
7594
7580
|
});
|
|
7595
|
-
return e === void 0 ||
|
|
7581
|
+
return e === void 0 || Qc(e) ? {
|
|
7596
7582
|
options: void 0,
|
|
7597
7583
|
loading: !1,
|
|
7598
7584
|
error: !1,
|
|
@@ -7609,28 +7595,28 @@ function zu(e) {
|
|
|
7609
7595
|
refetch: () => {}
|
|
7610
7596
|
};
|
|
7611
7597
|
}
|
|
7612
|
-
function
|
|
7598
|
+
function Vu(e) {
|
|
7613
7599
|
return A(() => {
|
|
7614
|
-
if (!(e === void 0 || !
|
|
7600
|
+
if (!(e === void 0 || !Qc(e))) return Zc(e);
|
|
7615
7601
|
}, [e]);
|
|
7616
7602
|
}
|
|
7617
|
-
function
|
|
7618
|
-
let { apiId: i } = un(), a = ln(), { pathname: o } = cn(), { options: s, loading: c, error: l, refetch: u } =
|
|
7603
|
+
function Hu({ loadTracingApis: e, detailMode: t = "drawer", pageSize: n, columnVisibilityStorageKey: r }) {
|
|
7604
|
+
let { apiId: i } = un(), a = ln(), { pathname: o } = cn(), { options: s, loading: c, error: l, refetch: u } = Bu(e), d = Vu(e), f = e !== void 0, p = A(() => {
|
|
7619
7605
|
let e = o.replace(/\/+$/, "");
|
|
7620
7606
|
if (!i) return e;
|
|
7621
7607
|
let t = e.lastIndexOf("/");
|
|
7622
7608
|
return t > 0 ? e.slice(0, t) : e;
|
|
7623
7609
|
}, [o, i]), m = O((e) => a(`${p}/${encodeURIComponent(e)}`), [a, p]);
|
|
7624
|
-
return /* @__PURE__ */ P(
|
|
7610
|
+
return /* @__PURE__ */ P(Lu, {
|
|
7625
7611
|
detailMode: t,
|
|
7626
7612
|
pageSize: n,
|
|
7627
7613
|
columnVisibilityStorageKey: r,
|
|
7628
|
-
toolbarStart: f ? d ? /* @__PURE__ */ P(
|
|
7614
|
+
toolbarStart: f ? d ? /* @__PURE__ */ P(qc, {
|
|
7629
7615
|
paginatedLoader: d.load,
|
|
7630
7616
|
resolveApiLabel: d.resolveApiLabel,
|
|
7631
7617
|
value: i,
|
|
7632
7618
|
onSelect: m
|
|
7633
|
-
}) : /* @__PURE__ */ P(
|
|
7619
|
+
}) : /* @__PURE__ */ P(qc, {
|
|
7634
7620
|
options: s ?? [],
|
|
7635
7621
|
value: i,
|
|
7636
7622
|
onSelect: m,
|
|
@@ -7643,9 +7629,9 @@ function Vu({ loadTracingApis: e, detailMode: t = "drawer", pageSize: n, columnV
|
|
|
7643
7629
|
}
|
|
7644
7630
|
//#endregion
|
|
7645
7631
|
//#region src/routing/ObservabilityRoutes.tsx
|
|
7646
|
-
var
|
|
7647
|
-
function
|
|
7648
|
-
let n = e?.scopeApiTypes ?? t, r = e?.contextFilters ??
|
|
7632
|
+
var Uu = [];
|
|
7633
|
+
function Wu(e, t) {
|
|
7634
|
+
let n = e?.scopeApiTypes ?? t, r = e?.contextFilters ?? Uu, i = e?.scopeFilterField;
|
|
7649
7635
|
return n?.length && (i ||= "API_TYPE", r.some((e) => e.field === "API_TYPE") || (r = [{
|
|
7650
7636
|
field: "API_TYPE",
|
|
7651
7637
|
label: "API Type",
|
|
@@ -7656,28 +7642,28 @@ function Uu(e, t) {
|
|
|
7656
7642
|
scopeFilterField: i
|
|
7657
7643
|
};
|
|
7658
7644
|
}
|
|
7659
|
-
function
|
|
7645
|
+
function Gu(e, t, n) {
|
|
7660
7646
|
return e ? /* @__PURE__ */ P(g, {
|
|
7661
7647
|
dataSource: t,
|
|
7662
7648
|
children: n
|
|
7663
7649
|
}) : n;
|
|
7664
7650
|
}
|
|
7665
|
-
function
|
|
7651
|
+
function Ku(e, t, n) {
|
|
7666
7652
|
return e ? /* @__PURE__ */ P(s, {
|
|
7667
7653
|
dataSource: t,
|
|
7668
7654
|
children: n
|
|
7669
7655
|
}) : n;
|
|
7670
7656
|
}
|
|
7671
|
-
function
|
|
7657
|
+
function qu({ children: e }) {
|
|
7672
7658
|
let t = Nn(), { data: n, isLoading: r, isError: i } = I({
|
|
7673
7659
|
queryKey: ["observability", "filter-definitions"],
|
|
7674
7660
|
queryFn: ({ signal: e }) => t.fetchFilterDefinitions(e),
|
|
7675
7661
|
enabled: !!t,
|
|
7676
7662
|
staleTime: 300 * 1e3
|
|
7677
7663
|
});
|
|
7678
|
-
return r ? /* @__PURE__ */ P(
|
|
7664
|
+
return r ? /* @__PURE__ */ P(Ju, {}) : i || !n ? /* @__PURE__ */ P(N, { children: e([]) }) : /* @__PURE__ */ P(N, { children: e(n) });
|
|
7679
7665
|
}
|
|
7680
|
-
function
|
|
7666
|
+
function Ju() {
|
|
7681
7667
|
return /* @__PURE__ */ F("div", {
|
|
7682
7668
|
className: "flex items-center gap-2 p-4",
|
|
7683
7669
|
children: [
|
|
@@ -7687,128 +7673,128 @@ function qu() {
|
|
|
7687
7673
|
]
|
|
7688
7674
|
});
|
|
7689
7675
|
}
|
|
7690
|
-
function
|
|
7676
|
+
function Yu({ baseUrl: e, http: t, children: n }) {
|
|
7691
7677
|
let { apiId: r } = un();
|
|
7692
|
-
return /* @__PURE__ */ P(
|
|
7678
|
+
return /* @__PURE__ */ P(Iu, {
|
|
7693
7679
|
baseUrl: e,
|
|
7694
7680
|
http: t,
|
|
7695
7681
|
module: r,
|
|
7696
7682
|
children: n
|
|
7697
7683
|
});
|
|
7698
7684
|
}
|
|
7699
|
-
function
|
|
7685
|
+
function Xu({ templates: e, contextFilters: t }) {
|
|
7700
7686
|
let n = a(), r = A(() => No(e, n), [e, n]);
|
|
7701
7687
|
return r.length === 1 && r[0] ? /* @__PURE__ */ P(an, {
|
|
7702
7688
|
to: `./${r[0].id}`,
|
|
7703
7689
|
replace: !0
|
|
7704
7690
|
}) : /* @__PURE__ */ P(Jn, {
|
|
7705
7691
|
filters: t,
|
|
7706
|
-
children: /* @__PURE__ */ P(
|
|
7692
|
+
children: /* @__PURE__ */ P(wu, { templates: e })
|
|
7707
7693
|
});
|
|
7708
7694
|
}
|
|
7709
|
-
function
|
|
7710
|
-
let x = In(), S = r ?? x, C = a(), w = c(), ee = A(() =>
|
|
7695
|
+
function Zu({ baseUrl: e, tracesBaseUrl: n, http: r, dataSource: o, filterProviders: s, logsPage: l, logsDataSource: u, logsColumns: d, logsOnRowClick: f, logsGetRowId: p, logsGetApiId: g, logsDetailBasePath: _, tracesDataSource: v, loadTracingApis: y, config: b }) {
|
|
7696
|
+
let x = In(), S = r ?? x, C = a(), w = c(), ee = A(() => cu(e, S), [e, S]), te = o !== void 0 || w === null, ne = o ?? w ?? ee, re = A(() => du(e, S), [e, S]), ie = i(), ae = A(() => b.features.logs?.enabled ? pu(e, S) : void 0, [
|
|
7711
7697
|
e,
|
|
7712
7698
|
S,
|
|
7713
7699
|
b.features.logs?.enabled
|
|
7714
|
-
]), oe = u ?? ie ?? ae, se = u !== void 0 || ie === null, ce = t(), le = n ?? e, ue = A(() => b.features.tracing?.enabled ?
|
|
7700
|
+
]), oe = u ?? ie ?? ae, se = u !== void 0 || ie === null, ce = t(), le = n ?? e, ue = A(() => b.features.tracing?.enabled ? Cu(le, S) : void 0, [
|
|
7715
7701
|
le,
|
|
7716
7702
|
S,
|
|
7717
7703
|
b.features.tracing?.enabled
|
|
7718
|
-
]), de = v ?? ce ?? ue, fe = v !== void 0 || ce === null,
|
|
7719
|
-
if (
|
|
7704
|
+
]), de = v ?? ce ?? ue, fe = v !== void 0 || ce === null, T = b.features.dashboards, E = b.features.logs, D = b.features.tracing, pe = Wu(T, b.scopeApiTypes), me = Wu(E, b.scopeApiTypes), he = E?.enabled, ge = E?.logDetail, _e = A(() => {
|
|
7705
|
+
if (he) return ge || rc({ basePath: _ ?? "" });
|
|
7720
7706
|
}, [
|
|
7707
|
+
he,
|
|
7721
7708
|
ge,
|
|
7722
|
-
_e,
|
|
7723
7709
|
_
|
|
7724
|
-
]),
|
|
7710
|
+
]), ve = E?.detailMode ?? "drawer", ye = A(() => d ?? Os(_ ?? ""), [d, _]), be = p ?? ((e) => e.requestId), xe = g ?? ((e) => e.apiId), Se = (e) => /* @__PURE__ */ P(h, {
|
|
7725
7711
|
providers: e,
|
|
7726
7712
|
children: /* @__PURE__ */ F(sn, { children: [
|
|
7727
|
-
|
|
7713
|
+
T?.enabled && /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(on, {
|
|
7728
7714
|
path: "dashboards",
|
|
7729
|
-
element: /* @__PURE__ */ P(
|
|
7730
|
-
templates:
|
|
7731
|
-
contextFilters:
|
|
7715
|
+
element: /* @__PURE__ */ P(Xu, {
|
|
7716
|
+
templates: T.templates,
|
|
7717
|
+
contextFilters: pe.contextFilters
|
|
7732
7718
|
})
|
|
7733
7719
|
}), /* @__PURE__ */ P(on, {
|
|
7734
7720
|
path: "dashboards/:dashboardId",
|
|
7735
7721
|
element: /* @__PURE__ */ P(Jn, {
|
|
7736
|
-
filters:
|
|
7737
|
-
children: /* @__PURE__ */ P(
|
|
7738
|
-
templates:
|
|
7739
|
-
scopeFilterField:
|
|
7740
|
-
externalLinks:
|
|
7722
|
+
filters: pe.contextFilters,
|
|
7723
|
+
children: /* @__PURE__ */ P(ju, {
|
|
7724
|
+
templates: T.templates,
|
|
7725
|
+
scopeFilterField: pe.scopeFilterField,
|
|
7726
|
+
externalLinks: T.externalLinks
|
|
7741
7727
|
})
|
|
7742
7728
|
})
|
|
7743
7729
|
})] }),
|
|
7744
7730
|
b.features.logs?.enabled && /* @__PURE__ */ P(on, {
|
|
7745
7731
|
path: "logs",
|
|
7746
7732
|
element: /* @__PURE__ */ P(Jn, {
|
|
7747
|
-
filters:
|
|
7748
|
-
children: l ?? (oe ?
|
|
7749
|
-
columns:
|
|
7750
|
-
getRowId:
|
|
7733
|
+
filters: me.contextFilters,
|
|
7734
|
+
children: l ?? (oe ? Gu(se, oe, /* @__PURE__ */ P(Du, {
|
|
7735
|
+
columns: ye,
|
|
7736
|
+
getRowId: be,
|
|
7751
7737
|
getApiId: xe,
|
|
7752
7738
|
onRowClickOverride: f,
|
|
7753
|
-
detailConfig:
|
|
7754
|
-
detailMode:
|
|
7755
|
-
pageSize:
|
|
7756
|
-
scopeFilterField:
|
|
7757
|
-
columnVisibilityStorageKey:
|
|
7739
|
+
detailConfig: _e,
|
|
7740
|
+
detailMode: ve,
|
|
7741
|
+
pageSize: E?.pageSize,
|
|
7742
|
+
scopeFilterField: me.scopeFilterField,
|
|
7743
|
+
columnVisibilityStorageKey: E?.columnVisibilityStorageKey
|
|
7758
7744
|
})) : /* @__PURE__ */ P("div", {
|
|
7759
7745
|
className: "flex items-center justify-center p-8 text-muted-foreground",
|
|
7760
7746
|
children: "Logs feature enabled but no page provided."
|
|
7761
7747
|
}))
|
|
7762
7748
|
})
|
|
7763
7749
|
}),
|
|
7764
|
-
b.features.logs?.enabled &&
|
|
7750
|
+
b.features.logs?.enabled && _e && oe && /* @__PURE__ */ P(on, {
|
|
7765
7751
|
path: "logs/:logId",
|
|
7766
7752
|
element: /* @__PURE__ */ P(Jn, {
|
|
7767
|
-
filters:
|
|
7768
|
-
children:
|
|
7753
|
+
filters: me.contextFilters,
|
|
7754
|
+
children: Gu(se, oe, /* @__PURE__ */ P(Qu, { config: _e }))
|
|
7769
7755
|
})
|
|
7770
7756
|
}),
|
|
7771
|
-
|
|
7757
|
+
D?.enabled && C["observability.traces.read"] && de && /* @__PURE__ */ F(N, { children: [
|
|
7772
7758
|
/* @__PURE__ */ P(on, {
|
|
7773
7759
|
path: "tracing",
|
|
7774
|
-
element:
|
|
7760
|
+
element: Ku(fe, de, /* @__PURE__ */ P(Yu, {
|
|
7775
7761
|
baseUrl: le,
|
|
7776
7762
|
http: S,
|
|
7777
|
-
children: /* @__PURE__ */ P(
|
|
7763
|
+
children: /* @__PURE__ */ P(Hu, {
|
|
7778
7764
|
loadTracingApis: y,
|
|
7779
|
-
detailMode:
|
|
7780
|
-
pageSize:
|
|
7781
|
-
columnVisibilityStorageKey:
|
|
7765
|
+
detailMode: D.detailMode ?? "drawer",
|
|
7766
|
+
pageSize: D.pageSize,
|
|
7767
|
+
columnVisibilityStorageKey: D.columnVisibilityStorageKey
|
|
7782
7768
|
})
|
|
7783
7769
|
}))
|
|
7784
7770
|
}),
|
|
7785
7771
|
/* @__PURE__ */ P(on, {
|
|
7786
7772
|
path: "tracing/:apiId",
|
|
7787
|
-
element:
|
|
7773
|
+
element: Ku(fe, de, /* @__PURE__ */ P(Yu, {
|
|
7788
7774
|
baseUrl: le,
|
|
7789
7775
|
http: S,
|
|
7790
|
-
children: /* @__PURE__ */ P(
|
|
7776
|
+
children: /* @__PURE__ */ P(Hu, {
|
|
7791
7777
|
loadTracingApis: y,
|
|
7792
|
-
detailMode:
|
|
7793
|
-
pageSize:
|
|
7794
|
-
columnVisibilityStorageKey:
|
|
7778
|
+
detailMode: D.detailMode ?? "drawer",
|
|
7779
|
+
pageSize: D.pageSize,
|
|
7780
|
+
columnVisibilityStorageKey: D.columnVisibilityStorageKey
|
|
7795
7781
|
})
|
|
7796
7782
|
}))
|
|
7797
7783
|
}),
|
|
7798
7784
|
/* @__PURE__ */ P(on, {
|
|
7799
7785
|
path: "tracing/:apiId/:traceId",
|
|
7800
|
-
element:
|
|
7786
|
+
element: Ku(fe, de, /* @__PURE__ */ P(zl, {}))
|
|
7801
7787
|
})
|
|
7802
7788
|
] }),
|
|
7803
7789
|
/* @__PURE__ */ P(on, {
|
|
7804
7790
|
path: "*",
|
|
7805
|
-
element:
|
|
7791
|
+
element: T?.enabled ? /* @__PURE__ */ P(an, {
|
|
7806
7792
|
to: "dashboards",
|
|
7807
7793
|
replace: !0
|
|
7808
7794
|
}) : b.features.logs?.enabled ? /* @__PURE__ */ P(an, {
|
|
7809
7795
|
to: "logs",
|
|
7810
7796
|
replace: !0
|
|
7811
|
-
}) :
|
|
7797
|
+
}) : D?.enabled ? /* @__PURE__ */ P(an, {
|
|
7812
7798
|
to: "tracing",
|
|
7813
7799
|
replace: !0
|
|
7814
7800
|
}) : /* @__PURE__ */ P("div", {
|
|
@@ -7817,23 +7803,23 @@ function Xu({ baseUrl: e, tracesBaseUrl: n, http: r, dataSource: o, filterProvid
|
|
|
7817
7803
|
})
|
|
7818
7804
|
})
|
|
7819
7805
|
] })
|
|
7820
|
-
}), Ce =
|
|
7806
|
+
}), Ce = T?.enabled || E?.enabled ? /* @__PURE__ */ P(Mn, {
|
|
7821
7807
|
source: re,
|
|
7822
|
-
children: s ? Se(s) : /* @__PURE__ */ P(
|
|
7808
|
+
children: s ? Se(s) : /* @__PURE__ */ P(qu, { children: (e) => Se(e) })
|
|
7823
7809
|
}) : Se(s ?? []);
|
|
7824
7810
|
return te ? /* @__PURE__ */ P(m, {
|
|
7825
7811
|
dataSource: ne,
|
|
7826
7812
|
children: Ce
|
|
7827
7813
|
}) : Ce;
|
|
7828
7814
|
}
|
|
7829
|
-
function
|
|
7815
|
+
function Qu({ config: e }) {
|
|
7830
7816
|
let t = ln(), { filters: n, timeRange: r } = Ko();
|
|
7831
|
-
return /* @__PURE__ */ P(
|
|
7817
|
+
return /* @__PURE__ */ P(Dc, {
|
|
7832
7818
|
config: e,
|
|
7833
7819
|
onFilter: O((e, i) => {
|
|
7834
7820
|
t({
|
|
7835
7821
|
pathname: "..",
|
|
7836
|
-
search: Tu(
|
|
7822
|
+
search: Eu(Tu(n, e, i), r)
|
|
7837
7823
|
}, { relative: "path" });
|
|
7838
7824
|
}, [
|
|
7839
7825
|
n,
|
|
@@ -7844,7 +7830,7 @@ function Zu({ config: e }) {
|
|
|
7844
7830
|
}
|
|
7845
7831
|
//#endregion
|
|
7846
7832
|
//#region src/routing/define-observability-features.ts
|
|
7847
|
-
var
|
|
7833
|
+
var $u = {
|
|
7848
7834
|
dashboards: {
|
|
7849
7835
|
icon: ne,
|
|
7850
7836
|
title: "Dashboards",
|
|
@@ -7864,10 +7850,10 @@ var Qu = {
|
|
|
7864
7850
|
showInNav: !0
|
|
7865
7851
|
}
|
|
7866
7852
|
};
|
|
7867
|
-
function
|
|
7868
|
-
let t = e.basePath ?? "observe", n =
|
|
7853
|
+
function ed(e) {
|
|
7854
|
+
let t = e.basePath ?? "observe", n = td(e), r = nd(e, n, t), i = n.map((e) => `${t}/${e}`), a = rd(n, t);
|
|
7869
7855
|
function o(t) {
|
|
7870
|
-
return xe(
|
|
7856
|
+
return xe(Zu, {
|
|
7871
7857
|
...t,
|
|
7872
7858
|
config: e
|
|
7873
7859
|
});
|
|
@@ -7896,13 +7882,13 @@ function $u(e) {
|
|
|
7896
7882
|
breadcrumbSegments: c
|
|
7897
7883
|
};
|
|
7898
7884
|
}
|
|
7899
|
-
function
|
|
7885
|
+
function td(e) {
|
|
7900
7886
|
let t = [];
|
|
7901
|
-
return e.features.dashboards?.enabled && t.push("dashboards"), e.features.logs?.enabled && t.push("logs"), e.features.tracing?.enabled && t.push("tracing"), t.sort((e, t) =>
|
|
7887
|
+
return e.features.dashboards?.enabled && t.push("dashboards"), e.features.logs?.enabled && t.push("logs"), e.features.tracing?.enabled && t.push("tracing"), t.sort((e, t) => $u[e].order - $u[t].order);
|
|
7902
7888
|
}
|
|
7903
|
-
function
|
|
7904
|
-
let r = t.filter((e) =>
|
|
7905
|
-
let r =
|
|
7889
|
+
function nd(e, t, n) {
|
|
7890
|
+
let r = t.filter((e) => $u[e].showInNav).map((t) => {
|
|
7891
|
+
let r = $u[t], i = e.nav.overrides?.[t];
|
|
7906
7892
|
return {
|
|
7907
7893
|
key: `${n}/${t}`,
|
|
7908
7894
|
title: i?.title ?? r.title,
|
|
@@ -7914,10 +7900,10 @@ function td(e, t, n) {
|
|
|
7914
7900
|
items: r
|
|
7915
7901
|
};
|
|
7916
7902
|
}
|
|
7917
|
-
function
|
|
7903
|
+
function rd(e, t) {
|
|
7918
7904
|
let n = {};
|
|
7919
7905
|
for (let r of e) {
|
|
7920
|
-
let e =
|
|
7906
|
+
let e = $u[r], i = `${t}/${r}`;
|
|
7921
7907
|
n[i] = {
|
|
7922
7908
|
path: `${t}/${r}`,
|
|
7923
7909
|
label: e.title
|
|
@@ -7927,7 +7913,7 @@ function nd(e, t) {
|
|
|
7927
7913
|
}
|
|
7928
7914
|
//#endregion
|
|
7929
7915
|
//#region src/build-observability-base-url.ts
|
|
7930
|
-
function
|
|
7916
|
+
function id(e, t, n, r) {
|
|
7931
7917
|
let i = e;
|
|
7932
7918
|
if (r?.useDevProxy) try {
|
|
7933
7919
|
i = new URL(i).pathname;
|
|
@@ -7936,8 +7922,8 @@ function rd(e, t, n, r) {
|
|
|
7936
7922
|
}
|
|
7937
7923
|
//#endregion
|
|
7938
7924
|
//#region src/build-traces-base-url.ts
|
|
7939
|
-
function
|
|
7940
|
-
return
|
|
7925
|
+
function ad(e, t, n, r) {
|
|
7926
|
+
return id(e, t, n, r);
|
|
7941
7927
|
}
|
|
7942
7928
|
//#endregion
|
|
7943
|
-
export { fn as API_TYPE_REGISTRY, Ea as BarPresentation, Dr as CODEC_VERSION, o as CapabilityProvider, $a as CartesianPresentation, Jn as ContextFiltersProvider, Za as DASHBOARD_BUCKET_TARGET, _ as DEFAULT_CAPABILITIES, Tn as DEFAULT_MEASURE, br as DEFAULT_PERIOD, En as DEFAULT_REFRESH_INTERVAL_MS, K as DEFAULT_STALE_TIME, Or as DEFAULT_TIME_RANGE, f as DashboardPersistenceProvider, Fo as DashboardTemplatesProvider, Do as DashboardView, oo as DoughnutPresentation, Ho as ExplorerTable, v as FILTER_OPERATORS, ti as FILTER_SCOPES, Xi as FilterBar, Bi as FilterChip, ji as FilterPopoverForm, pi as FilterPropertyCombobox, h as FilterProvidersProvider, sa as HTTP_STATUS_PALETTE, Fn as HttpProvider, Go as LiveIndicator, On as LiveRefreshProvider, Z as LogDetailCodeBlock,
|
|
7929
|
+
export { fn as API_TYPE_REGISTRY, Ea as BarPresentation, Dr as CODEC_VERSION, o as CapabilityProvider, $a as CartesianPresentation, Jn as ContextFiltersProvider, Za as DASHBOARD_BUCKET_TARGET, _ as DEFAULT_CAPABILITIES, Tn as DEFAULT_MEASURE, br as DEFAULT_PERIOD, En as DEFAULT_REFRESH_INTERVAL_MS, K as DEFAULT_STALE_TIME, Or as DEFAULT_TIME_RANGE, f as DashboardPersistenceProvider, Fo as DashboardTemplatesProvider, Do as DashboardView, oo as DoughnutPresentation, Ho as ExplorerTable, v as FILTER_OPERATORS, ti as FILTER_SCOPES, Xi as FilterBar, Bi as FilterChip, ji as FilterPopoverForm, pi as FilterPropertyCombobox, h as FilterProvidersProvider, sa as HTTP_STATUS_PALETTE, Fn as HttpProvider, Go as LiveIndicator, On as LiveRefreshProvider, Z as LogDetailCodeBlock, cc as LogDetailContextChart, Tc as LogDetailDrawer, pc as LogDetailDrawerShell, js as LogDetailEmptyField, _c as LogDetailHeader, Q as LogDetailHeadersTable, Ms as LogDetailJsonTree, $ as LogDetailKeyValueGrid, vc as LogDetailMetrics, Dc as LogDetailPage, xc as LogDetailSection, bc as LogDetailSections, Xo as LogSeverityBadge, os as LogTable, g as LogsDataSourceProvider, Cs as LogsExplorerPage, co as MetricGroupPresentation, mo as MetricPresentation, m as MetricsDataSourceProvider, wr as PERIOD_DISPLAY_LABELS, Cr as PERIOD_LABELS, cl as POLICY_POST_EVENT, sl as POLICY_PRE_EVENT, xr as PRESET_CATEGORIES, il as PolicyAttributeDiff, Uo as QueryErrorBanner, Sr as RELATIVE_PERIODS, ei as SCOPE_COMMON, $r as SIGNAL_DATA_TYPES, _n as SIGNAL_REGISTRY, gl as SpanDetailPanel, Hr as TimeRangePicker, Bl as TraceDetailDrawer, zl as TraceDetailPage, Pl as TraceDetailShell, Lc as TraceExplorerPage, El as TraceLineage, kc as TraceStatusBadge, Fc as TraceTable, Ml as TraceTimeline, s as TracesDataSourceProvider, qc as TracingApiSelector, Hu as TracingScreen, Ao as WidgetGroup, Co as WidgetItem, Ds as buildApiTypeLink, Ii as buildChipLabel, Li as buildChipLabelParts, Ri as buildChipTooltip, Os as buildDefaultConnectionLogColumns, rc as buildDefaultLogDetailConfig, li as buildFilterScopes, ws as buildLogsDeepLink, id as buildObservabilityBaseUrl, ri as buildScopeFromId, ad as buildTracesBaseUrl, $c as buildTracesDeepLink, yo as clearWidgetRenderers, Qa as computeBucketInterval, pl as computePolicyAttributeDiff, Ia as computePreviousTimeRange, Aa as computeTrend, Is as connectionLogPreset, cu as createHttpDataSource, du as createHttpFilterSource, pu as createHttpLogsSource, Fu as createHttpTracesFilterSource, Cu as createHttpTracesSource, Nr as decodeObservabilityState, jo as defineDashboardTemplate, Ur as defineFilterProvider, ec as defineLogDetail, ed as defineObservabilityFeatures, Mr as encodeObservabilityState, Oa as extractMeasureValue, ja as extractSparklineData, oa as facetsToBar, ia as facetsToDoughnut, jc as formatDuration, Ac as formatTraceTime, mn as getApiType, gn as getApiTypeOrFallback, Yn as getLocaleWeekStart, yn as getSignal, vo as getWidgetRenderer, Sn as isBarWidget, bn as isCartesianWidget, xn as isDoughnutWidget, wn as isMetricGroupWidget, Cn as isMetricWidget, Si as isMultiSelectForFilter, la as isStatusFacetField, Xc as isTracingApiLegacyLoader, Qc as isTracingApiPaginatedLoad, Yc as isTracingApiPaginatedLoader, Jc as isTracingApiPaginatedLoaderConfig, ka as measureResultToMetric, J as mergeFilters, Ga as mergeTimeSeriesToCartesian, Hs as messageLogPreset, Ci as normalizeMembershipOperatorForValues, ua as normalizeStatusGroupKey, q as observabilityQueryKeys, _i as operatorLabel, vi as operatorNeedsValue, xo as registerDefaultRenderers, _o as registerWidgetRenderer, Mo as resolveDashboardFromTemplate, fi as resolveDataTypeIds, ma as resolveGroupColor, tc as resolveLogDetailVariant, G as resolveMeasure, nc as resolvePreset, nr as resolveRelativePeriod, ir as resolveStableTimeRange, da as resolveStatusPaletteColor, Zc as resolveTracingApiPaginatedLoader, ui as toFilterItems, a as useCapabilities, e as useCapability, Y as useContextFilters, l as useDashboardPersistence, Lo as useDashboardTemplate, Io as useDashboardTemplates, sr as useFacetsQuery, u as useFilterProvider, p as useFilterProviders, In as useHttpOptions, Un as useInfiniteOptions, kn as useLiveRefresh, uc as useLogDetailDrawerExpand, cr as useLogDetailQuery, r as useLogsDataSource, fr as useLogsPagedQuery, lr as useLogsQuery, pr as useMeasuresQuery, ga as useMergedWidgetFilters, n as useMetricsDataSource, An as useOptionalLiveRefresh, i as useOptionalLogsDataSource, c as useOptionalMetricsDataSource, t as useOptionalTracesDataSource, X as useStableTimeRange, hr as useTimeSeriesQuery, gr as useTraceDetailQuery, d as useTracesDataSource, yr as useTracesPagedQuery, ea as useWidgetGroupContext, qs as webhookLogPreset };
|