@localstack/appinspector-ui 1.0.157 → 1.0.158
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.cjs +1212 -904
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1000 -683
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2421,8 +2421,8 @@ var init_event_streams = __esm({
|
|
|
2421
2421
|
});
|
|
2422
2422
|
|
|
2423
2423
|
// src/pages/spans-list-page.tsx
|
|
2424
|
-
import { Box as
|
|
2425
|
-
import { useCallback as useCallback12, useEffect as useEffect22, useRef as useRef17, useState as
|
|
2424
|
+
import { Box as Box20, Paper as Paper3 } from "@mui/material";
|
|
2425
|
+
import { useCallback as useCallback12, useEffect as useEffect22, useRef as useRef17, useState as useState21 } from "react";
|
|
2426
2426
|
|
|
2427
2427
|
// src/api/errors.ts
|
|
2428
2428
|
var AppInspectorDisabledError = class extends Error {
|
|
@@ -2507,6 +2507,10 @@ var SERVICE_NODE_TEST_ID = "service-node";
|
|
|
2507
2507
|
var SERVICE_NODE_SERVICE_NAME_TEST_ID = "service-node-service-name";
|
|
2508
2508
|
var SERVICE_NODE_OPERATION_NAME_TEST_ID = "service-node-operation-name";
|
|
2509
2509
|
var EMULATOR_VERSION_BANNER_TEST_ID = "emulator-version-banner";
|
|
2510
|
+
var SPANS_FILTER_PRODUCER_TEST_ID = "spans-filter-producer";
|
|
2511
|
+
var SPANS_FILTER_CONSUMER_TEST_ID = "spans-filter-consumer";
|
|
2512
|
+
var SPANS_FILTER_STATUS_TEST_ID = "spans-filter-status";
|
|
2513
|
+
var SPANS_FILTER_NO_MATCH_TEST_ID = "spans-filter-no-match";
|
|
2510
2514
|
|
|
2511
2515
|
// src/utils/emulator-version.ts
|
|
2512
2516
|
var import_semver = __toESM(require_semver2(), 1);
|
|
@@ -2594,15 +2598,14 @@ var EmulatorVersionBanner = ({
|
|
|
2594
2598
|
};
|
|
2595
2599
|
|
|
2596
2600
|
// src/components/spans-list/spans-list.tsx
|
|
2597
|
-
import { Alert as Alert2, Box as
|
|
2601
|
+
import { Alert as Alert2, Box as Box6, Button as Button4 } from "@mui/material";
|
|
2598
2602
|
|
|
2599
2603
|
// src/components/spans-list/spans-data-grid.tsx
|
|
2600
2604
|
import { Close, DeleteForeverOutlined, Search } from "@mui/icons-material";
|
|
2601
2605
|
import {
|
|
2602
|
-
Box as
|
|
2603
|
-
Button as
|
|
2606
|
+
Box as Box5,
|
|
2607
|
+
Button as Button3,
|
|
2604
2608
|
CircularProgress,
|
|
2605
|
-
FormControlLabel,
|
|
2606
2609
|
Grid,
|
|
2607
2610
|
IconButton as IconButton2,
|
|
2608
2611
|
InputAdornment,
|
|
@@ -2615,7 +2618,7 @@ import {
|
|
|
2615
2618
|
TableSortLabel,
|
|
2616
2619
|
TextField,
|
|
2617
2620
|
Tooltip as Tooltip4,
|
|
2618
|
-
Typography as
|
|
2621
|
+
Typography as Typography5,
|
|
2619
2622
|
useTheme as useTheme2
|
|
2620
2623
|
} from "@mui/material";
|
|
2621
2624
|
|
|
@@ -13074,7 +13077,7 @@ var motion = /* @__PURE__ */ createMotionProxy(function(Component, config) {
|
|
|
13074
13077
|
});
|
|
13075
13078
|
|
|
13076
13079
|
// src/components/spans-list/spans-data-grid.tsx
|
|
13077
|
-
import { memo as memo8, useCallback as useCallback2, useEffect as useEffect11, useLayoutEffect as useLayoutEffect3, useMemo as useMemo4, useRef as useRef6, useState as
|
|
13080
|
+
import { memo as memo8, useCallback as useCallback2, useEffect as useEffect11, useLayoutEffect as useLayoutEffect3, useMemo as useMemo4, useRef as useRef6, useState as useState6 } from "react";
|
|
13078
13081
|
|
|
13079
13082
|
// src/components/cells/responsive-timestamp-cell.tsx
|
|
13080
13083
|
import { memo as memo3 } from "react";
|
|
@@ -13084,9 +13087,21 @@ var ResponsiveTimestampCell = memo3(({ date }) => {
|
|
|
13084
13087
|
return /* @__PURE__ */ jsx3("div", { style: { width: "100%" }, children: formattedTime });
|
|
13085
13088
|
});
|
|
13086
13089
|
|
|
13087
|
-
// src/
|
|
13088
|
-
|
|
13089
|
-
|
|
13090
|
+
// src/types/error-levels.ts
|
|
13091
|
+
var ErrorLevel = {
|
|
13092
|
+
ERROR: 3,
|
|
13093
|
+
// General error
|
|
13094
|
+
IAM_PERMISSION: 5,
|
|
13095
|
+
// IAM permission issues
|
|
13096
|
+
OK: 2,
|
|
13097
|
+
// OK
|
|
13098
|
+
// Standard OTEL status codes
|
|
13099
|
+
UNSET: 1,
|
|
13100
|
+
// Unset
|
|
13101
|
+
// Extended custom levels
|
|
13102
|
+
WARNING: 4
|
|
13103
|
+
// Warning
|
|
13104
|
+
};
|
|
13090
13105
|
|
|
13091
13106
|
// src/utils/service-display-name.ts
|
|
13092
13107
|
var SERVICE_DISPLAY_NAME = {
|
|
@@ -13220,6 +13235,10 @@ var getServiceDisplayName = (code) => {
|
|
|
13220
13235
|
return SERVICE_DISPLAY_NAME[code] ?? code;
|
|
13221
13236
|
};
|
|
13222
13237
|
|
|
13238
|
+
// src/components/cells/service-cell.tsx
|
|
13239
|
+
import { Box, Stack, Typography, useTheme } from "@mui/material";
|
|
13240
|
+
import { memo as memo7 } from "react";
|
|
13241
|
+
|
|
13223
13242
|
// src/components/aws-service-icon/aws-service-icon.tsx
|
|
13224
13243
|
import { Tooltip } from "@mui/material";
|
|
13225
13244
|
import { memo as memo6 } from "react";
|
|
@@ -15196,22 +15215,6 @@ ServiceCell.displayName = "ServiceCell";
|
|
|
15196
15215
|
import { Cancel, Error as Error2, GppBad } from "@mui/icons-material";
|
|
15197
15216
|
import { Box as Box2, Divider, Tooltip as Tooltip2, Typography as Typography2 } from "@mui/material";
|
|
15198
15217
|
|
|
15199
|
-
// src/types/error-levels.ts
|
|
15200
|
-
var ErrorLevel = {
|
|
15201
|
-
ERROR: 3,
|
|
15202
|
-
// General error
|
|
15203
|
-
IAM_PERMISSION: 5,
|
|
15204
|
-
// IAM permission issues
|
|
15205
|
-
OK: 2,
|
|
15206
|
-
// OK
|
|
15207
|
-
// Standard OTEL status codes
|
|
15208
|
-
UNSET: 1,
|
|
15209
|
-
// Unset
|
|
15210
|
-
// Extended custom levels
|
|
15211
|
-
WARNING: 4
|
|
15212
|
-
// Warning
|
|
15213
|
-
};
|
|
15214
|
-
|
|
15215
15218
|
// src/utils/iam-utils.ts
|
|
15216
15219
|
function determinePermissionStatus(payload) {
|
|
15217
15220
|
if (payload.explicit_deny_count && payload.explicit_deny_count > 0) {
|
|
@@ -15401,7 +15404,7 @@ var StatRow = ({ label, value }) => /* @__PURE__ */ jsxs120(Box3, { sx: { alignI
|
|
|
15401
15404
|
/* @__PURE__ */ jsx125(Typography3, { color: "text.secondary", sx: { mr: 4 }, variant: "caption", children: label }),
|
|
15402
15405
|
/* @__PURE__ */ jsx125(Typography3, { fontWeight: 600, variant: "body2", children: fmtLimit(value) })
|
|
15403
15406
|
] });
|
|
15404
|
-
var SpanCountBadge = ({ licenseLimit,
|
|
15407
|
+
var SpanCountBadge = ({ licenseLimit, systemLimit, totalCount, visibleCount }) => {
|
|
15405
15408
|
const [anchorElement, setAnchorElement] = useState4();
|
|
15406
15409
|
const bindingLimit = resolveBindingLimit(systemLimit, licenseLimit);
|
|
15407
15410
|
if (totalCount === void 0 && bindingLimit === void 0) {
|
|
@@ -15416,7 +15419,7 @@ var SpanCountBadge = ({ licenseLimit, searchActive = false, systemLimit, totalCo
|
|
|
15416
15419
|
isLoading ? /* @__PURE__ */ jsx125(Skeleton, { sx: { minWidth: 120 } }) : /* @__PURE__ */ jsxs120(Box3, { sx: { alignItems: "baseline", display: "flex", gap: 0.5 }, children: [
|
|
15417
15420
|
/* @__PURE__ */ jsx125(Typography3, { color: "text.secondary", variant: "caption", children: "Showing" }),
|
|
15418
15421
|
/* @__PURE__ */ jsx125(Typography3, { variant: "body2", children: visibleCount === void 0 ? "\u2014" : fmt(visibleCount) }),
|
|
15419
|
-
/* @__PURE__ */ jsx125(Typography3, { color: "text.secondary", variant: "caption", children:
|
|
15422
|
+
/* @__PURE__ */ jsx125(Typography3, { color: "text.secondary", variant: "caption", children: "operations" })
|
|
15420
15423
|
] }),
|
|
15421
15424
|
/* @__PURE__ */ jsx125(Tooltip3, { title: "Operation count details", children: /* @__PURE__ */ jsx125(
|
|
15422
15425
|
IconButton,
|
|
@@ -15444,22 +15447,13 @@ var SpanCountBadge = ({ licenseLimit, searchActive = false, systemLimit, totalCo
|
|
|
15444
15447
|
children: /* @__PURE__ */ jsxs120(Box3, { sx: { minWidth: 240, p: 2 }, children: [
|
|
15445
15448
|
/* @__PURE__ */ jsx125(Typography3, { fontWeight: 700, variant: "body2", children: "Storage" }),
|
|
15446
15449
|
/* @__PURE__ */ jsx125(Typography3, { color: "text.secondary", sx: { mt: 0.25 }, variant: "caption", children: "How many operations are currently stored." }),
|
|
15447
|
-
/* @__PURE__ */
|
|
15448
|
-
|
|
15449
|
-
|
|
15450
|
-
{
|
|
15451
|
-
|
|
15452
|
-
|
|
15453
|
-
|
|
15454
|
-
),
|
|
15455
|
-
/* @__PURE__ */ jsx125(
|
|
15456
|
-
StatRow,
|
|
15457
|
-
{
|
|
15458
|
-
label: /* @__PURE__ */ jsx125(Tooltip3, { placement: "left", title: searchActive ? "The total number of operations matching the search." : "The total number of operations stored on the server.", children: /* @__PURE__ */ jsx125(Box3, { component: "span", sx: { borderBottom: "1px dashed", borderColor: "text.secondary", cursor: "help" }, children: searchActive ? "Total matches" : "Total stored" }) }),
|
|
15459
|
-
value: totalCount
|
|
15460
|
-
}
|
|
15461
|
-
)
|
|
15462
|
-
] }),
|
|
15450
|
+
/* @__PURE__ */ jsx125(Box3, { sx: { display: "flex", flexDirection: "column", gap: 0.75, mt: 1.5 }, children: /* @__PURE__ */ jsx125(
|
|
15451
|
+
StatRow,
|
|
15452
|
+
{
|
|
15453
|
+
label: /* @__PURE__ */ jsx125(Tooltip3, { placement: "left", title: "The number of operations currently loaded in the UI.", children: /* @__PURE__ */ jsx125(Box3, { component: "span", sx: { borderBottom: "1px dashed", borderColor: "text.secondary", cursor: "help" }, children: "Currently visible" }) }),
|
|
15454
|
+
value: visibleCount
|
|
15455
|
+
}
|
|
15456
|
+
) }),
|
|
15463
15457
|
(systemLimitReached || licenseLimit !== void 0 && licenseLimit !== "unlimited") && /* @__PURE__ */ jsxs120(Fragment3, { children: [
|
|
15464
15458
|
/* @__PURE__ */ jsx125(Divider2, { sx: { my: 1.5 } }),
|
|
15465
15459
|
/* @__PURE__ */ jsx125(Typography3, { color: "text.secondary", fontWeight: 600, variant: "caption", children: "Limits" }),
|
|
@@ -15512,8 +15506,239 @@ var SpanCountBadge = ({ licenseLimit, searchActive = false, systemLimit, totalCo
|
|
|
15512
15506
|
] });
|
|
15513
15507
|
};
|
|
15514
15508
|
|
|
15515
|
-
// src/components/spans-list/spans-
|
|
15509
|
+
// src/components/spans-list/spans-filter-bar.tsx
|
|
15510
|
+
import { ArrowDropDown, Cancel as Cancel2, FilterList, GppBad as GppBad2 } from "@mui/icons-material";
|
|
15511
|
+
import {
|
|
15512
|
+
Box as Box4,
|
|
15513
|
+
Button as Button2,
|
|
15514
|
+
Checkbox,
|
|
15515
|
+
Divider as Divider3,
|
|
15516
|
+
ListItemText,
|
|
15517
|
+
ListSubheader,
|
|
15518
|
+
Menu,
|
|
15519
|
+
MenuItem,
|
|
15520
|
+
Typography as Typography4
|
|
15521
|
+
} from "@mui/material";
|
|
15522
|
+
import { useState as useState5 } from "react";
|
|
15516
15523
|
import { Fragment as Fragment4, jsx as jsx126, jsxs as jsxs121 } from "react/jsx-runtime";
|
|
15524
|
+
var EMPTY_FILTERS = {
|
|
15525
|
+
consumerService: [],
|
|
15526
|
+
producerService: [],
|
|
15527
|
+
status: []
|
|
15528
|
+
};
|
|
15529
|
+
var EXTERNAL_PRODUCER_VALUE = "__external__";
|
|
15530
|
+
function applyFilters(spans, filters) {
|
|
15531
|
+
if (isFiltersEmpty(filters)) return spans;
|
|
15532
|
+
return spans.filter((span) => {
|
|
15533
|
+
if (filters.consumerService.length > 0 && !filters.consumerService.includes(span.service_name)) {
|
|
15534
|
+
return false;
|
|
15535
|
+
}
|
|
15536
|
+
if (filters.producerService.length > 0) {
|
|
15537
|
+
const includesExternal = filters.producerService.includes(EXTERNAL_PRODUCER_VALUE);
|
|
15538
|
+
const namedServices = filters.producerService.filter((value) => value !== EXTERNAL_PRODUCER_VALUE);
|
|
15539
|
+
const matchesExternal = includesExternal && !span.parent_service_name;
|
|
15540
|
+
const matchesNamed = namedServices.length > 0 && !!span.parent_service_name && namedServices.includes(span.parent_service_name);
|
|
15541
|
+
if (!matchesExternal && !matchesNamed) return false;
|
|
15542
|
+
}
|
|
15543
|
+
if (filters.status.length > 0) {
|
|
15544
|
+
if (!span.operation_status) return false;
|
|
15545
|
+
if (!filters.status.includes(collapseStatusValue(span.operation_status))) return false;
|
|
15546
|
+
}
|
|
15547
|
+
return true;
|
|
15548
|
+
});
|
|
15549
|
+
}
|
|
15550
|
+
function isFiltersEmpty(filters) {
|
|
15551
|
+
return filters.consumerService.length === 0 && filters.producerService.length === 0 && filters.status.length === 0;
|
|
15552
|
+
}
|
|
15553
|
+
var STATUS_LABELS = {
|
|
15554
|
+
error: "Error",
|
|
15555
|
+
iam_deny: "IAM Deny",
|
|
15556
|
+
iam_warn: "IAM Warning",
|
|
15557
|
+
ok: "Success"
|
|
15558
|
+
};
|
|
15559
|
+
var collapseStatusValue = (status) => {
|
|
15560
|
+
if (status === "iam_explicit_deny" || status === "iam_implicit_deny") return "iam_deny";
|
|
15561
|
+
if (status === "iam_explicit_warn" || status === "iam_implicit_warn") return "iam_warn";
|
|
15562
|
+
return status;
|
|
15563
|
+
};
|
|
15564
|
+
var statusOptionIcon = (value) => {
|
|
15565
|
+
switch (value) {
|
|
15566
|
+
case "error": {
|
|
15567
|
+
return /* @__PURE__ */ jsx126(Cancel2, { sx: { color: "error.main", fontSize: 16 } });
|
|
15568
|
+
}
|
|
15569
|
+
case "iam_deny": {
|
|
15570
|
+
return /* @__PURE__ */ jsx126(GppBad2, { sx: { color: "error.main", fontSize: 16 } });
|
|
15571
|
+
}
|
|
15572
|
+
case "iam_warn": {
|
|
15573
|
+
return /* @__PURE__ */ jsx126(GppBad2, { sx: { color: "warning.main", fontSize: 16 } });
|
|
15574
|
+
}
|
|
15575
|
+
default: {
|
|
15576
|
+
return void 0;
|
|
15577
|
+
}
|
|
15578
|
+
}
|
|
15579
|
+
};
|
|
15580
|
+
var FilterDropdown = ({ "data-testid": testId, label, onChange, options, selected }) => {
|
|
15581
|
+
const [anchorElement, setAnchorElement] = useState5();
|
|
15582
|
+
const open = Boolean(anchorElement);
|
|
15583
|
+
const hasSelection = selected.length > 0;
|
|
15584
|
+
const handleToggle = (value) => {
|
|
15585
|
+
if (selected.includes(value)) {
|
|
15586
|
+
onChange(selected.filter((item) => item !== value));
|
|
15587
|
+
} else {
|
|
15588
|
+
onChange([...selected, value]);
|
|
15589
|
+
}
|
|
15590
|
+
};
|
|
15591
|
+
return /* @__PURE__ */ jsxs121(Fragment4, { children: [
|
|
15592
|
+
/* @__PURE__ */ jsxs121(
|
|
15593
|
+
Button2,
|
|
15594
|
+
{
|
|
15595
|
+
color: hasSelection ? "primary" : "inherit",
|
|
15596
|
+
"data-testid": testId,
|
|
15597
|
+
endIcon: /* @__PURE__ */ jsx126(ArrowDropDown, {}),
|
|
15598
|
+
onClick: (event) => {
|
|
15599
|
+
setAnchorElement(event.currentTarget);
|
|
15600
|
+
},
|
|
15601
|
+
size: "small",
|
|
15602
|
+
startIcon: /* @__PURE__ */ jsx126(FilterList, { sx: { fontSize: "16px !important" } }),
|
|
15603
|
+
sx: {
|
|
15604
|
+
"& .MuiButton-endIcon": { ml: 0.25 },
|
|
15605
|
+
"color": hasSelection ? "primary.main" : "text.secondary",
|
|
15606
|
+
"flexShrink": 0,
|
|
15607
|
+
"textTransform": "none",
|
|
15608
|
+
"whiteSpace": "nowrap"
|
|
15609
|
+
},
|
|
15610
|
+
variant: hasSelection ? "outlined" : "text",
|
|
15611
|
+
children: [
|
|
15612
|
+
label,
|
|
15613
|
+
hasSelection && /* @__PURE__ */ jsx126(
|
|
15614
|
+
Box4,
|
|
15615
|
+
{
|
|
15616
|
+
component: "span",
|
|
15617
|
+
sx: {
|
|
15618
|
+
bgcolor: "primary.main",
|
|
15619
|
+
borderRadius: "10px",
|
|
15620
|
+
color: "primary.contrastText",
|
|
15621
|
+
fontSize: "0.65rem",
|
|
15622
|
+
fontWeight: 700,
|
|
15623
|
+
lineHeight: 1,
|
|
15624
|
+
ml: 0.5,
|
|
15625
|
+
px: 0.75,
|
|
15626
|
+
py: 0.25
|
|
15627
|
+
},
|
|
15628
|
+
children: selected.length
|
|
15629
|
+
}
|
|
15630
|
+
)
|
|
15631
|
+
]
|
|
15632
|
+
}
|
|
15633
|
+
),
|
|
15634
|
+
/* @__PURE__ */ jsxs121(
|
|
15635
|
+
Menu,
|
|
15636
|
+
{
|
|
15637
|
+
anchorEl: anchorElement,
|
|
15638
|
+
onClose: () => {
|
|
15639
|
+
setAnchorElement(void 0);
|
|
15640
|
+
},
|
|
15641
|
+
open,
|
|
15642
|
+
slotProps: { paper: { sx: { maxHeight: 320, minWidth: 200 } } },
|
|
15643
|
+
children: [
|
|
15644
|
+
/* @__PURE__ */ jsx126(ListSubheader, { sx: { fontSize: "0.7rem", letterSpacing: "0.08em", lineHeight: "2rem", textTransform: "uppercase" }, children: label }),
|
|
15645
|
+
options.length === 0 && /* @__PURE__ */ jsx126(MenuItem, { disabled: true, children: /* @__PURE__ */ jsx126(Typography4, { color: "text.secondary", variant: "body2", children: "No options available" }) }),
|
|
15646
|
+
options.map((option) => /* @__PURE__ */ jsxs121(
|
|
15647
|
+
MenuItem,
|
|
15648
|
+
{
|
|
15649
|
+
dense: true,
|
|
15650
|
+
onClick: () => {
|
|
15651
|
+
handleToggle(option.value);
|
|
15652
|
+
},
|
|
15653
|
+
children: [
|
|
15654
|
+
/* @__PURE__ */ jsx126(
|
|
15655
|
+
Checkbox,
|
|
15656
|
+
{
|
|
15657
|
+
checked: selected.includes(option.value),
|
|
15658
|
+
size: "small",
|
|
15659
|
+
sx: { mr: 1, p: 0.25 }
|
|
15660
|
+
}
|
|
15661
|
+
),
|
|
15662
|
+
!!option.serviceCode && /* @__PURE__ */ jsx126(Box4, { sx: { borderRadius: "4px", flexShrink: 0, lineHeight: 0, mr: 1, overflow: "hidden" }, children: /* @__PURE__ */ jsx126(AwsServiceIcon, { hideTooltip: true, service: option.serviceCode, size: "medium" }) }),
|
|
15663
|
+
!!option.icon && /* @__PURE__ */ jsx126(Box4, { sx: { alignItems: "center", display: "flex", flexShrink: 0, mr: 1 }, children: option.icon }),
|
|
15664
|
+
/* @__PURE__ */ jsx126(
|
|
15665
|
+
ListItemText,
|
|
15666
|
+
{
|
|
15667
|
+
primary: option.label,
|
|
15668
|
+
primaryTypographyProps: { variant: "body2" }
|
|
15669
|
+
}
|
|
15670
|
+
)
|
|
15671
|
+
]
|
|
15672
|
+
},
|
|
15673
|
+
option.value
|
|
15674
|
+
)),
|
|
15675
|
+
hasSelection && /* @__PURE__ */ jsxs121(Fragment4, { children: [
|
|
15676
|
+
/* @__PURE__ */ jsx126(Divider3, {}),
|
|
15677
|
+
/* @__PURE__ */ jsx126(
|
|
15678
|
+
MenuItem,
|
|
15679
|
+
{
|
|
15680
|
+
dense: true,
|
|
15681
|
+
onClick: () => {
|
|
15682
|
+
onChange([]);
|
|
15683
|
+
},
|
|
15684
|
+
children: /* @__PURE__ */ jsx126(Typography4, { color: "text.secondary", sx: { pl: 4 }, variant: "body2", children: "Clear" })
|
|
15685
|
+
}
|
|
15686
|
+
)
|
|
15687
|
+
] })
|
|
15688
|
+
]
|
|
15689
|
+
}
|
|
15690
|
+
)
|
|
15691
|
+
] });
|
|
15692
|
+
};
|
|
15693
|
+
var SpansFilterBar = ({
|
|
15694
|
+
consumerOptions,
|
|
15695
|
+
filters,
|
|
15696
|
+
onFiltersChange,
|
|
15697
|
+
producerOptions,
|
|
15698
|
+
statusOptions
|
|
15699
|
+
}) => {
|
|
15700
|
+
return /* @__PURE__ */ jsxs121(Box4, { sx: { alignItems: "center", display: "flex", gap: 1 }, children: [
|
|
15701
|
+
/* @__PURE__ */ jsx126(
|
|
15702
|
+
FilterDropdown,
|
|
15703
|
+
{
|
|
15704
|
+
"data-testid": SPANS_FILTER_PRODUCER_TEST_ID,
|
|
15705
|
+
label: "Producer",
|
|
15706
|
+
onChange: (producerService) => {
|
|
15707
|
+
onFiltersChange({ ...filters, producerService });
|
|
15708
|
+
},
|
|
15709
|
+
options: producerOptions,
|
|
15710
|
+
selected: filters.producerService
|
|
15711
|
+
}
|
|
15712
|
+
),
|
|
15713
|
+
/* @__PURE__ */ jsx126(
|
|
15714
|
+
FilterDropdown,
|
|
15715
|
+
{
|
|
15716
|
+
"data-testid": SPANS_FILTER_CONSUMER_TEST_ID,
|
|
15717
|
+
label: "Consumer",
|
|
15718
|
+
onChange: (consumerService) => {
|
|
15719
|
+
onFiltersChange({ ...filters, consumerService });
|
|
15720
|
+
},
|
|
15721
|
+
options: consumerOptions,
|
|
15722
|
+
selected: filters.consumerService
|
|
15723
|
+
}
|
|
15724
|
+
),
|
|
15725
|
+
/* @__PURE__ */ jsx126(
|
|
15726
|
+
FilterDropdown,
|
|
15727
|
+
{
|
|
15728
|
+
"data-testid": SPANS_FILTER_STATUS_TEST_ID,
|
|
15729
|
+
label: "Status",
|
|
15730
|
+
onChange: (status) => {
|
|
15731
|
+
onFiltersChange({ ...filters, status });
|
|
15732
|
+
},
|
|
15733
|
+
options: statusOptions,
|
|
15734
|
+
selected: filters.status
|
|
15735
|
+
}
|
|
15736
|
+
)
|
|
15737
|
+
] });
|
|
15738
|
+
};
|
|
15739
|
+
|
|
15740
|
+
// src/components/spans-list/spans-data-grid.tsx
|
|
15741
|
+
import { Fragment as Fragment5, jsx as jsx127, jsxs as jsxs122 } from "react/jsx-runtime";
|
|
15517
15742
|
var columnHelper = createColumnHelper();
|
|
15518
15743
|
var newSpanBackgroundColor = {
|
|
15519
15744
|
dark: { from: "rgba(136, 123, 2, 1)", to: "rgba(136, 123, 2, 0)" },
|
|
@@ -15525,28 +15750,29 @@ var LABEL_NO_SPANS = "There are no operations";
|
|
|
15525
15750
|
var SEARCH_MAX_LENGTH = 512;
|
|
15526
15751
|
var SEARCH_DEBOUNCE_MS = 300;
|
|
15527
15752
|
var STICK_TO_EDGE_THRESHOLD_PX = 4;
|
|
15528
|
-
var StreamBoundaryRow = ({ colSpan, label }) => /* @__PURE__ */
|
|
15529
|
-
var LoadingRow = ({ colSpan }) => /* @__PURE__ */
|
|
15530
|
-
var NoMatchRow = ({
|
|
15531
|
-
|
|
15532
|
-
|
|
15533
|
-
|
|
15534
|
-
|
|
15535
|
-
|
|
15536
|
-
|
|
15537
|
-
] }) }) });
|
|
15753
|
+
var StreamBoundaryRow = ({ colSpan, label }) => /* @__PURE__ */ jsx127(TableRow, { children: /* @__PURE__ */ jsx127(TableCell, { colSpan, sx: { fontStyle: "italic", textAlign: "center" }, children: /* @__PURE__ */ jsx127("span", { children: label }) }) });
|
|
15754
|
+
var LoadingRow = ({ colSpan }) => /* @__PURE__ */ jsx127(TableRow, { children: /* @__PURE__ */ jsx127(TableCell, { colSpan, sx: { textAlign: "center" }, children: /* @__PURE__ */ jsx127(CircularProgress, { size: 24, sx: { m: 2 } }) }) });
|
|
15755
|
+
var NoMatchRow = ({ colSpan, filtersActive, onClearAll, searchActive, term }) => {
|
|
15756
|
+
const message = searchActive && filtersActive ? `No operations match "${term}" and the active filters` : searchActive ? `No operations match "${term}"` : "No operations match the active filters";
|
|
15757
|
+
const clearLabel = searchActive && filtersActive ? "Clear search and filters" : searchActive ? "Clear search" : "Clear filters";
|
|
15758
|
+
const testId = searchActive ? SPANS_SEARCH_NO_MATCH_TEST_ID : SPANS_FILTER_NO_MATCH_TEST_ID;
|
|
15759
|
+
return /* @__PURE__ */ jsx127(TableRow, { children: /* @__PURE__ */ jsx127(TableCell, { colSpan, "data-testid": testId, sx: { textAlign: "center" }, children: /* @__PURE__ */ jsxs122(Box5, { sx: { alignItems: "center", display: "flex", flexDirection: "column", gap: 1, py: 3 }, children: [
|
|
15760
|
+
/* @__PURE__ */ jsx127(Typography5, { sx: { fontStyle: "italic" }, variant: "body2", children: message }),
|
|
15761
|
+
/* @__PURE__ */ jsx127(Button3, { onClick: onClearAll, size: "small", variant: "text", children: clearLabel })
|
|
15762
|
+
] }) }) });
|
|
15763
|
+
};
|
|
15538
15764
|
var SpansSearchField = ({ onChange, onClear, searchSupported, value }) => {
|
|
15539
|
-
const field = /* @__PURE__ */
|
|
15765
|
+
const field = /* @__PURE__ */ jsx127(
|
|
15540
15766
|
TextField,
|
|
15541
15767
|
{
|
|
15542
15768
|
disabled: !searchSupported,
|
|
15543
15769
|
inputProps: {
|
|
15544
|
-
"aria-label": "Search
|
|
15770
|
+
"aria-label": "Search",
|
|
15545
15771
|
"data-testid": SPANS_SEARCH_INPUT_TEST_ID,
|
|
15546
15772
|
"maxLength": SEARCH_MAX_LENGTH
|
|
15547
15773
|
},
|
|
15548
15774
|
InputProps: {
|
|
15549
|
-
endAdornment: value ? /* @__PURE__ */
|
|
15775
|
+
endAdornment: value ? /* @__PURE__ */ jsx127(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx127(
|
|
15550
15776
|
IconButton2,
|
|
15551
15777
|
{
|
|
15552
15778
|
"aria-label": "Clear search",
|
|
@@ -15554,27 +15780,31 @@ var SpansSearchField = ({ onChange, onClear, searchSupported, value }) => {
|
|
|
15554
15780
|
edge: "end",
|
|
15555
15781
|
onClick: onClear,
|
|
15556
15782
|
size: "small",
|
|
15557
|
-
children: /* @__PURE__ */
|
|
15783
|
+
children: /* @__PURE__ */ jsx127(Close, { sx: { fontSize: 16 } })
|
|
15558
15784
|
}
|
|
15559
15785
|
) }) : void 0,
|
|
15560
|
-
startAdornment: /* @__PURE__ */
|
|
15786
|
+
startAdornment: /* @__PURE__ */ jsx127(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx127(Search, { sx: { fontSize: 16 } }) })
|
|
15561
15787
|
},
|
|
15562
15788
|
onChange: (event) => {
|
|
15563
15789
|
onChange(event.target.value);
|
|
15564
15790
|
},
|
|
15565
|
-
placeholder: "Search
|
|
15791
|
+
placeholder: "Search\u2026",
|
|
15566
15792
|
size: "small",
|
|
15567
|
-
sx: {
|
|
15793
|
+
sx: {
|
|
15794
|
+
"& .MuiInputBase-input": { fontSize: "0.8125rem", py: "6px" },
|
|
15795
|
+
"minWidth": 160,
|
|
15796
|
+
"width": "100%"
|
|
15797
|
+
},
|
|
15568
15798
|
value
|
|
15569
15799
|
}
|
|
15570
15800
|
);
|
|
15571
15801
|
if (searchSupported) return field;
|
|
15572
|
-
return /* @__PURE__ */
|
|
15802
|
+
return /* @__PURE__ */ jsx127(Tooltip4, { title: `Search requires LocalStack \u2265 ${MIN_EMULATOR_VERSION_FOR_SEARCH}`, children: /* @__PURE__ */ jsx127("span", { children: field }) });
|
|
15573
15803
|
};
|
|
15574
15804
|
var SpansDataGridRow = memo8(
|
|
15575
15805
|
({ isNew, onSpanClick, row }) => {
|
|
15576
15806
|
const theme = useTheme2();
|
|
15577
|
-
return /* @__PURE__ */
|
|
15807
|
+
return /* @__PURE__ */ jsx127(
|
|
15578
15808
|
TableRow,
|
|
15579
15809
|
{
|
|
15580
15810
|
animate: {
|
|
@@ -15593,7 +15823,7 @@ var SpansDataGridRow = memo8(
|
|
|
15593
15823
|
transition: "background-color 1200ms ease-in"
|
|
15594
15824
|
},
|
|
15595
15825
|
children: row.getVisibleCells().map((cell) => {
|
|
15596
|
-
return /* @__PURE__ */
|
|
15826
|
+
return /* @__PURE__ */ jsx127(
|
|
15597
15827
|
TableCell,
|
|
15598
15828
|
{
|
|
15599
15829
|
sx: {
|
|
@@ -15601,8 +15831,8 @@ var SpansDataGridRow = memo8(
|
|
|
15601
15831
|
maxWidth: `${cell.column.getSize().toString()}px`,
|
|
15602
15832
|
minWidth: `${cell.column.getSize().toString()}px`
|
|
15603
15833
|
},
|
|
15604
|
-
children: /* @__PURE__ */
|
|
15605
|
-
|
|
15834
|
+
children: /* @__PURE__ */ jsx127(
|
|
15835
|
+
Box5,
|
|
15606
15836
|
{
|
|
15607
15837
|
sx: {
|
|
15608
15838
|
"alignItems": "center",
|
|
@@ -15614,7 +15844,7 @@ var SpansDataGridRow = memo8(
|
|
|
15614
15844
|
},
|
|
15615
15845
|
"width": "100%"
|
|
15616
15846
|
},
|
|
15617
|
-
children: /* @__PURE__ */
|
|
15847
|
+
children: /* @__PURE__ */ jsx127(Box5, { sx: { px: 1, width: "100%" }, children: flexRender(cell.column.columnDef.cell, cell.getContext()) })
|
|
15618
15848
|
}
|
|
15619
15849
|
)
|
|
15620
15850
|
},
|
|
@@ -15630,7 +15860,7 @@ var SpansDataGridRow = memo8(
|
|
|
15630
15860
|
);
|
|
15631
15861
|
var SpansDataGrid = ({
|
|
15632
15862
|
clearingSpans,
|
|
15633
|
-
errorCount,
|
|
15863
|
+
errorCount: _errorCount,
|
|
15634
15864
|
fetchingBackward,
|
|
15635
15865
|
fetchingForward,
|
|
15636
15866
|
hasMoreBackward,
|
|
@@ -15647,10 +15877,10 @@ var SpansDataGrid = ({
|
|
|
15647
15877
|
spans,
|
|
15648
15878
|
systemLimit,
|
|
15649
15879
|
totalCount,
|
|
15650
|
-
warningCount
|
|
15880
|
+
warningCount: _warningCount
|
|
15651
15881
|
}) => {
|
|
15652
15882
|
const searchActive = search.length > 0;
|
|
15653
|
-
const [searchDraft, setSearchDraft] =
|
|
15883
|
+
const [searchDraft, setSearchDraft] = useState6(search);
|
|
15654
15884
|
useEffect11(() => {
|
|
15655
15885
|
const handle = setTimeout(() => {
|
|
15656
15886
|
onSearchChange(searchDraft);
|
|
@@ -15659,18 +15889,86 @@ var SpansDataGrid = ({
|
|
|
15659
15889
|
clearTimeout(handle);
|
|
15660
15890
|
};
|
|
15661
15891
|
}, [searchDraft, onSearchChange]);
|
|
15892
|
+
const [filters, setFilters] = useState6(EMPTY_FILTERS);
|
|
15893
|
+
const filtersActive = !isFiltersEmpty(filters);
|
|
15894
|
+
const activeFilterNames = [
|
|
15895
|
+
filters.producerService.length > 0 && "Producer",
|
|
15896
|
+
filters.consumerService.length > 0 && "Consumer",
|
|
15897
|
+
filters.status.length > 0 && "Status"
|
|
15898
|
+
].filter(Boolean);
|
|
15899
|
+
const filteredByLabel = activeFilterNames.length <= 1 ? activeFilterNames[0] ?? "" : `${activeFilterNames.slice(0, -1).join(", ")} and ${activeFilterNames.at(-1) ?? ""}`;
|
|
15662
15900
|
const handleClearSearch = useCallback2(() => {
|
|
15663
15901
|
setSearchDraft("");
|
|
15664
15902
|
onSearchChange("");
|
|
15665
15903
|
}, [onSearchChange]);
|
|
15904
|
+
const handleClearAll = useCallback2(() => {
|
|
15905
|
+
setSearchDraft("");
|
|
15906
|
+
onSearchChange("");
|
|
15907
|
+
setFilters(EMPTY_FILTERS);
|
|
15908
|
+
}, [onSearchChange]);
|
|
15666
15909
|
const handleClearSpans = useCallback2(() => {
|
|
15667
15910
|
setSearchDraft("");
|
|
15911
|
+
setFilters(EMPTY_FILTERS);
|
|
15668
15912
|
onClearSpans();
|
|
15669
15913
|
}, [onClearSpans]);
|
|
15914
|
+
const producerOptions = useMemo4(() => {
|
|
15915
|
+
const services = new Set(
|
|
15916
|
+
spans?.map((span) => span.parent_service_name).filter(Boolean) ?? []
|
|
15917
|
+
);
|
|
15918
|
+
for (const value of filters.producerService) {
|
|
15919
|
+
if (value !== EXTERNAL_PRODUCER_VALUE) services.add(value);
|
|
15920
|
+
}
|
|
15921
|
+
const options = [...services].toSorted().map((service) => ({
|
|
15922
|
+
label: getServiceDisplayName(service),
|
|
15923
|
+
serviceCode: service,
|
|
15924
|
+
value: service
|
|
15925
|
+
}));
|
|
15926
|
+
const hasExternalProducer = spans?.some((span) => !span.parent_service_name);
|
|
15927
|
+
if (hasExternalProducer || filters.producerService.includes(EXTERNAL_PRODUCER_VALUE)) {
|
|
15928
|
+
options.push({ label: "External producer", value: EXTERNAL_PRODUCER_VALUE });
|
|
15929
|
+
}
|
|
15930
|
+
return options;
|
|
15931
|
+
}, [spans, filters.producerService]);
|
|
15932
|
+
const consumerOptions = useMemo4(() => {
|
|
15933
|
+
const services = new Set(spans?.map((span) => span.service_name) ?? []);
|
|
15934
|
+
for (const value of filters.consumerService) services.add(value);
|
|
15935
|
+
return [...services].toSorted().map((service) => ({
|
|
15936
|
+
label: getServiceDisplayName(service),
|
|
15937
|
+
serviceCode: service,
|
|
15938
|
+
value: service
|
|
15939
|
+
}));
|
|
15940
|
+
}, [spans, filters.consumerService]);
|
|
15941
|
+
const statusOptions = useMemo4(() => {
|
|
15942
|
+
const statuses = new Set(
|
|
15943
|
+
spans?.map((span) => span.operation_status).filter(Boolean).map((s) => collapseStatusValue(s))
|
|
15944
|
+
);
|
|
15945
|
+
for (const value of filters.status) statuses.add(value);
|
|
15946
|
+
return [...statuses].toSorted().map((status) => ({
|
|
15947
|
+
icon: statusOptionIcon(status),
|
|
15948
|
+
label: STATUS_LABELS[status] ?? status,
|
|
15949
|
+
value: status
|
|
15950
|
+
}));
|
|
15951
|
+
}, [spans, filters.status]);
|
|
15952
|
+
const filteredSpans = useMemo4(() => {
|
|
15953
|
+
if (!spans) return;
|
|
15954
|
+
if (!filtersActive) return spans;
|
|
15955
|
+
return applyFilters(spans, filters);
|
|
15956
|
+
}, [spans, filters, filtersActive]);
|
|
15957
|
+
const filteredErrorCount = useMemo4(
|
|
15958
|
+
() => filteredSpans?.filter((span) => {
|
|
15959
|
+
const level = calculateHighestErrorLevel(span);
|
|
15960
|
+
return level === ErrorLevel.ERROR || level === ErrorLevel.IAM_PERMISSION;
|
|
15961
|
+
}).length,
|
|
15962
|
+
[filteredSpans]
|
|
15963
|
+
);
|
|
15964
|
+
const filteredWarningCount = useMemo4(
|
|
15965
|
+
() => filteredSpans?.filter((span) => calculateHighestErrorLevel(span) === ErrorLevel.WARNING).length,
|
|
15966
|
+
[filteredSpans]
|
|
15967
|
+
);
|
|
15670
15968
|
const columns = useMemo4(() => [
|
|
15671
15969
|
columnHelper.accessor("startTime", {
|
|
15672
|
-
cell: (props) => /* @__PURE__ */
|
|
15673
|
-
header: () => /* @__PURE__ */
|
|
15970
|
+
cell: (props) => /* @__PURE__ */ jsx127(ResponsiveTimestampCell, { date: props.getValue() }),
|
|
15971
|
+
header: () => /* @__PURE__ */ jsx127(
|
|
15674
15972
|
TableSortLabel,
|
|
15675
15973
|
{
|
|
15676
15974
|
active: true,
|
|
@@ -15687,9 +15985,9 @@ var SpansDataGrid = ({
|
|
|
15687
15985
|
columnHelper.display({
|
|
15688
15986
|
cell: (props) => {
|
|
15689
15987
|
if (!props.row.original.parent_service_name || !props.row.original.parent_resource_name) {
|
|
15690
|
-
return /* @__PURE__ */
|
|
15988
|
+
return /* @__PURE__ */ jsx127(Typography5, { sx: { fontStyle: "italic" }, variant: "body2", children: "External producer" });
|
|
15691
15989
|
}
|
|
15692
|
-
return /* @__PURE__ */
|
|
15990
|
+
return /* @__PURE__ */ jsx127(
|
|
15693
15991
|
ServiceCell,
|
|
15694
15992
|
{
|
|
15695
15993
|
resource: props.row.original.parent_resource_name,
|
|
@@ -15702,14 +16000,14 @@ var SpansDataGrid = ({
|
|
|
15702
16000
|
size: 180
|
|
15703
16001
|
}),
|
|
15704
16002
|
columnHelper.accessor("operation_name", {
|
|
15705
|
-
cell: (props) => /* @__PURE__ */
|
|
15706
|
-
|
|
16003
|
+
cell: (props) => /* @__PURE__ */ jsx127(
|
|
16004
|
+
Box5,
|
|
15707
16005
|
{
|
|
15708
16006
|
sx: {
|
|
15709
16007
|
overflow: "hidden",
|
|
15710
16008
|
textOverflow: "ellipsis"
|
|
15711
16009
|
},
|
|
15712
|
-
children: /* @__PURE__ */
|
|
16010
|
+
children: /* @__PURE__ */ jsx127("span", { title: props.getValue(), children: props.getValue() })
|
|
15713
16011
|
}
|
|
15714
16012
|
),
|
|
15715
16013
|
header: "Action",
|
|
@@ -15718,7 +16016,7 @@ var SpansDataGrid = ({
|
|
|
15718
16016
|
}),
|
|
15719
16017
|
columnHelper.display({
|
|
15720
16018
|
cell: (props) => {
|
|
15721
|
-
return /* @__PURE__ */
|
|
16019
|
+
return /* @__PURE__ */ jsx127(ServiceCell, { resource: props.row.original.resource_name, service: props.row.original.service_name });
|
|
15722
16020
|
},
|
|
15723
16021
|
header: "Consumer",
|
|
15724
16022
|
id: "consumer",
|
|
@@ -15726,10 +16024,10 @@ var SpansDataGrid = ({
|
|
|
15726
16024
|
}),
|
|
15727
16025
|
columnHelper.display({
|
|
15728
16026
|
cell: (props) => {
|
|
15729
|
-
return /* @__PURE__ */
|
|
15730
|
-
/* @__PURE__ */
|
|
15731
|
-
/* @__PURE__ */
|
|
15732
|
-
|
|
16027
|
+
return /* @__PURE__ */ jsxs122(Box5, { sx: { alignItems: "center", display: "flex", gap: 0.5, justifyContent: "flex-end" }, children: [
|
|
16028
|
+
/* @__PURE__ */ jsx127(StatusIconWithTooltip, { span: props.row.original }),
|
|
16029
|
+
/* @__PURE__ */ jsx127(
|
|
16030
|
+
Button3,
|
|
15733
16031
|
{
|
|
15734
16032
|
"data-testid": VIEW_SPAN_DETAILS_TEST_ID,
|
|
15735
16033
|
onClick: (event) => {
|
|
@@ -15750,7 +16048,7 @@ var SpansDataGrid = ({
|
|
|
15750
16048
|
], [onSpanClick, onOrderChange, order2]);
|
|
15751
16049
|
const table = useReactTable({
|
|
15752
16050
|
columns,
|
|
15753
|
-
data:
|
|
16051
|
+
data: filteredSpans ?? [],
|
|
15754
16052
|
getCoreRowModel: getCoreRowModel()
|
|
15755
16053
|
});
|
|
15756
16054
|
const columnCount = table.getAllColumns().length;
|
|
@@ -15784,7 +16082,7 @@ var SpansDataGrid = ({
|
|
|
15784
16082
|
const paddingTop = virtualItems.length > 0 ? virtualItems[0]?.start ?? 0 : 0;
|
|
15785
16083
|
const paddingBottom = virtualItems.length > 0 ? totalVirtualSize - (virtualItems.at(-1)?.end ?? 0) : 0;
|
|
15786
16084
|
const seenSpanIdsRef = useRef6(void 0);
|
|
15787
|
-
seenSpanIdsRef.current ??= new Set((
|
|
16085
|
+
seenSpanIdsRef.current ??= new Set((filteredSpans ?? []).map((span) => span.span_id));
|
|
15788
16086
|
useLayoutEffect3(() => {
|
|
15789
16087
|
for (const virtualItem of virtualItems) {
|
|
15790
16088
|
const row = displayRows[virtualItem.index];
|
|
@@ -15792,9 +16090,9 @@ var SpansDataGrid = ({
|
|
|
15792
16090
|
}
|
|
15793
16091
|
});
|
|
15794
16092
|
useEffect11(() => {
|
|
15795
|
-
if (
|
|
15796
|
-
}, [
|
|
15797
|
-
const lastSpanId =
|
|
16093
|
+
if (filteredSpans?.length === 0) seenSpanIdsRef.current = void 0;
|
|
16094
|
+
}, [filteredSpans?.length]);
|
|
16095
|
+
const lastSpanId = filteredSpans?.at(-1)?.span_id;
|
|
15798
16096
|
useLayoutEffect3(() => {
|
|
15799
16097
|
handleScroll();
|
|
15800
16098
|
}, [handleScroll]);
|
|
@@ -15804,91 +16102,101 @@ var SpansDataGrid = ({
|
|
|
15804
16102
|
if (!element || !isAtLiveEdgeRef.current) return;
|
|
15805
16103
|
element.scrollTop = element.scrollHeight;
|
|
15806
16104
|
}, [order2, spans?.length, lastSpanId]);
|
|
15807
|
-
return /* @__PURE__ */
|
|
15808
|
-
/* @__PURE__ */
|
|
15809
|
-
/* @__PURE__ */
|
|
15810
|
-
|
|
15811
|
-
|
|
15812
|
-
onChange: setSearchDraft,
|
|
15813
|
-
onClear: handleClearSearch,
|
|
15814
|
-
searchSupported,
|
|
15815
|
-
value: searchDraft
|
|
15816
|
-
}
|
|
15817
|
-
),
|
|
15818
|
-
/* @__PURE__ */ jsx126(
|
|
15819
|
-
SpanCountBadge,
|
|
15820
|
-
{
|
|
15821
|
-
licenseLimit,
|
|
15822
|
-
searchActive,
|
|
15823
|
-
systemLimit,
|
|
15824
|
-
totalCount,
|
|
15825
|
-
visibleCount: spans?.length
|
|
15826
|
-
}
|
|
15827
|
-
),
|
|
15828
|
-
!searchActive && errorCount !== void 0 && errorCount > 0 && /* @__PURE__ */ jsxs121(Fragment4, { children: [
|
|
15829
|
-
/* @__PURE__ */ jsx126(Typography4, { color: "text.disabled", sx: { mr: 0.5 }, variant: "body2", children: "\u2014" }),
|
|
15830
|
-
/* @__PURE__ */ jsx126(Tooltip4, { title: "Number of errors detected across all operations", children: /* @__PURE__ */ jsxs121(
|
|
15831
|
-
Box4,
|
|
16105
|
+
return /* @__PURE__ */ jsxs122(Fragment5, { children: [
|
|
16106
|
+
/* @__PURE__ */ jsx127(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsxs122(Box5, { sx: { display: "flex", flexDirection: "column", gap: "0.5rem", pt: 1, px: 1 }, children: [
|
|
16107
|
+
/* @__PURE__ */ jsxs122(Box5, { sx: { alignItems: "center", display: "flex", flexWrap: "wrap", gap: "0.5rem" }, children: [
|
|
16108
|
+
/* @__PURE__ */ jsx127(Box5, { sx: { flex: 1, maxWidth: 220, minWidth: 96, order: 1 }, children: /* @__PURE__ */ jsx127(
|
|
16109
|
+
SpansSearchField,
|
|
15832
16110
|
{
|
|
15833
|
-
|
|
15834
|
-
|
|
15835
|
-
|
|
15836
|
-
|
|
15837
|
-
borderColor: "error.main",
|
|
15838
|
-
cursor: "help",
|
|
15839
|
-
display: "flex",
|
|
15840
|
-
gap: 0.5,
|
|
15841
|
-
mb: "-1px"
|
|
15842
|
-
},
|
|
15843
|
-
children: [
|
|
15844
|
-
/* @__PURE__ */ jsx126(Typography4, { color: "error", variant: "body2", children: errorCount.toLocaleString() }),
|
|
15845
|
-
/* @__PURE__ */ jsx126(Typography4, { color: "error", variant: "caption", children: errorCount === 1 ? "error" : "errors" })
|
|
15846
|
-
]
|
|
16111
|
+
onChange: setSearchDraft,
|
|
16112
|
+
onClear: handleClearSearch,
|
|
16113
|
+
searchSupported,
|
|
16114
|
+
value: searchDraft
|
|
15847
16115
|
}
|
|
15848
|
-
) })
|
|
15849
|
-
|
|
15850
|
-
|
|
15851
|
-
/* @__PURE__ */ jsx126(Typography4, { color: "text.disabled", sx: { mr: 0.5 }, variant: "body2", children: "\u2014" }),
|
|
15852
|
-
/* @__PURE__ */ jsx126(Tooltip4, { title: "Number of warnings detected across all operations", children: /* @__PURE__ */ jsxs121(
|
|
15853
|
-
Box4,
|
|
16116
|
+
) }),
|
|
16117
|
+
/* @__PURE__ */ jsx127(Box5, { sx: { order: { md: 2, xs: 4 }, width: { md: "auto", xs: "100%" } }, children: /* @__PURE__ */ jsx127(
|
|
16118
|
+
SpansFilterBar,
|
|
15854
16119
|
{
|
|
15855
|
-
|
|
15856
|
-
|
|
15857
|
-
|
|
15858
|
-
|
|
15859
|
-
|
|
15860
|
-
|
|
15861
|
-
|
|
15862
|
-
|
|
15863
|
-
|
|
15864
|
-
|
|
15865
|
-
|
|
15866
|
-
|
|
15867
|
-
|
|
15868
|
-
|
|
16120
|
+
consumerOptions,
|
|
16121
|
+
filters,
|
|
16122
|
+
onFiltersChange: setFilters,
|
|
16123
|
+
producerOptions,
|
|
16124
|
+
statusOptions
|
|
16125
|
+
}
|
|
16126
|
+
) }),
|
|
16127
|
+
/* @__PURE__ */ jsx127(Box5, { sx: { flex: 1, order: { md: 3, xs: 2 } } }),
|
|
16128
|
+
/* @__PURE__ */ jsx127(Box5, { sx: { flexShrink: 0, order: { md: 4, xs: 3 } }, children: /* @__PURE__ */ jsx127(
|
|
16129
|
+
Button3,
|
|
16130
|
+
{
|
|
16131
|
+
"data-testid": CLEAR_SPANS_TEST_ID,
|
|
16132
|
+
disabled: clearingSpans,
|
|
16133
|
+
onClick: handleClearSpans,
|
|
16134
|
+
startIcon: /* @__PURE__ */ jsx127(DeleteForeverOutlined, {}),
|
|
16135
|
+
children: "Clear Operations"
|
|
15869
16136
|
}
|
|
15870
16137
|
) })
|
|
15871
16138
|
] }),
|
|
15872
|
-
/* @__PURE__ */
|
|
15873
|
-
|
|
15874
|
-
|
|
15875
|
-
|
|
15876
|
-
|
|
15877
|
-
|
|
16139
|
+
/* @__PURE__ */ jsxs122(Box5, { sx: { alignItems: "center", display: "flex", gap: "0.5rem", pl: 0.5 }, children: [
|
|
16140
|
+
/* @__PURE__ */ jsx127(
|
|
16141
|
+
SpanCountBadge,
|
|
16142
|
+
{
|
|
16143
|
+
licenseLimit,
|
|
16144
|
+
systemLimit,
|
|
16145
|
+
totalCount: searchActive || filtersActive ? filteredSpans?.length : totalCount,
|
|
16146
|
+
visibleCount: filteredSpans?.length
|
|
16147
|
+
}
|
|
16148
|
+
),
|
|
16149
|
+
filtersActive && /* @__PURE__ */ jsxs122(Fragment5, { children: [
|
|
16150
|
+
/* @__PURE__ */ jsx127(Typography5, { color: "text.secondary", variant: "caption", children: "\xB7" }),
|
|
16151
|
+
/* @__PURE__ */ jsx127(Typography5, { color: "text.secondary", variant: "caption", children: `Filtered by ${filteredByLabel}` })
|
|
16152
|
+
] }),
|
|
16153
|
+
filteredErrorCount !== void 0 && filteredErrorCount > 0 && /* @__PURE__ */ jsxs122(Fragment5, { children: [
|
|
16154
|
+
/* @__PURE__ */ jsx127(Typography5, { color: "text.secondary", variant: "caption", children: "\xB7" }),
|
|
16155
|
+
/* @__PURE__ */ jsx127(Tooltip4, { title: "Number of errors detected across all operations", children: /* @__PURE__ */ jsxs122(
|
|
16156
|
+
Box5,
|
|
15878
16157
|
{
|
|
15879
|
-
"data-testid":
|
|
15880
|
-
|
|
15881
|
-
|
|
15882
|
-
|
|
16158
|
+
"data-testid": ERROR_COUNT_TEST_ID,
|
|
16159
|
+
sx: {
|
|
16160
|
+
alignItems: "center",
|
|
16161
|
+
borderBottom: "1px dotted",
|
|
16162
|
+
borderColor: "error.main",
|
|
16163
|
+
cursor: "help",
|
|
16164
|
+
display: "flex",
|
|
16165
|
+
gap: 0.5,
|
|
16166
|
+
mb: "-1px"
|
|
16167
|
+
},
|
|
16168
|
+
children: [
|
|
16169
|
+
/* @__PURE__ */ jsx127(Typography5, { color: "error", variant: "body2", children: filteredErrorCount.toLocaleString() }),
|
|
16170
|
+
/* @__PURE__ */ jsx127(Typography5, { color: "error", variant: "caption", children: filteredErrorCount === 1 ? "error" : "errors" })
|
|
16171
|
+
]
|
|
15883
16172
|
}
|
|
15884
|
-
)
|
|
15885
|
-
|
|
15886
|
-
|
|
15887
|
-
|
|
15888
|
-
|
|
15889
|
-
|
|
16173
|
+
) })
|
|
16174
|
+
] }),
|
|
16175
|
+
filteredWarningCount !== void 0 && filteredWarningCount > 0 && /* @__PURE__ */ jsxs122(Fragment5, { children: [
|
|
16176
|
+
/* @__PURE__ */ jsx127(Typography5, { color: "text.secondary", variant: "caption", children: "\xB7" }),
|
|
16177
|
+
/* @__PURE__ */ jsx127(Tooltip4, { title: "Number of warnings detected across all operations", children: /* @__PURE__ */ jsxs122(
|
|
16178
|
+
Box5,
|
|
16179
|
+
{
|
|
16180
|
+
"data-testid": WARNING_COUNT_TEST_ID,
|
|
16181
|
+
sx: {
|
|
16182
|
+
alignItems: "center",
|
|
16183
|
+
borderBottom: "1px dotted",
|
|
16184
|
+
borderColor: "warning.main",
|
|
16185
|
+
cursor: "help",
|
|
16186
|
+
display: "flex",
|
|
16187
|
+
gap: 0.5,
|
|
16188
|
+
mb: "-1px"
|
|
16189
|
+
},
|
|
16190
|
+
children: [
|
|
16191
|
+
/* @__PURE__ */ jsx127(Typography5, { color: "warning.main", variant: "body2", children: filteredWarningCount.toLocaleString() }),
|
|
16192
|
+
/* @__PURE__ */ jsx127(Typography5, { color: "warning.main", variant: "caption", children: filteredWarningCount === 1 ? "warning" : "warnings" })
|
|
16193
|
+
]
|
|
16194
|
+
}
|
|
16195
|
+
) })
|
|
16196
|
+
] })
|
|
16197
|
+
] })
|
|
15890
16198
|
] }) }),
|
|
15891
|
-
/* @__PURE__ */
|
|
16199
|
+
/* @__PURE__ */ jsx127(Box5, { sx: { flexGrow: 1, overflow: "hidden", position: "relative", width: "100%" }, children: /* @__PURE__ */ jsx127(
|
|
15892
16200
|
TableContainer,
|
|
15893
16201
|
{
|
|
15894
16202
|
onScroll: handleScroll,
|
|
@@ -15901,7 +16209,7 @@ var SpansDataGrid = ({
|
|
|
15901
16209
|
right: 0,
|
|
15902
16210
|
top: 0
|
|
15903
16211
|
},
|
|
15904
|
-
children: /* @__PURE__ */
|
|
16212
|
+
children: /* @__PURE__ */ jsxs122(
|
|
15905
16213
|
Table,
|
|
15906
16214
|
{
|
|
15907
16215
|
stickyHeader: true,
|
|
@@ -15913,8 +16221,8 @@ var SpansDataGrid = ({
|
|
|
15913
16221
|
"th+th": { pl: "8px !important" }
|
|
15914
16222
|
},
|
|
15915
16223
|
children: [
|
|
15916
|
-
/* @__PURE__ */
|
|
15917
|
-
return /* @__PURE__ */
|
|
16224
|
+
/* @__PURE__ */ jsx127(TableHead, { children: table.getHeaderGroups().map((headerGroup) => {
|
|
16225
|
+
return /* @__PURE__ */ jsx127(TableRow, { children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx127(
|
|
15918
16226
|
TableCell,
|
|
15919
16227
|
{
|
|
15920
16228
|
colSpan: header.colSpan,
|
|
@@ -15929,13 +16237,22 @@ var SpansDataGrid = ({
|
|
|
15929
16237
|
header.id
|
|
15930
16238
|
)) }, headerGroup.id);
|
|
15931
16239
|
}) }),
|
|
15932
|
-
/* @__PURE__ */
|
|
15933
|
-
(spans === void 0 || clearingSpans || searching) && /* @__PURE__ */
|
|
15934
|
-
!clearingSpans && !searching &&
|
|
15935
|
-
|
|
15936
|
-
|
|
15937
|
-
|
|
15938
|
-
|
|
16240
|
+
/* @__PURE__ */ jsxs122(TableBody, { children: [
|
|
16241
|
+
(spans === void 0 || clearingSpans || searching) && /* @__PURE__ */ jsx127(TableRow, { children: /* @__PURE__ */ jsx127(TableCell, { colSpan: columnCount, sx: { fontStyle: "italic", textAlign: "center" }, children: /* @__PURE__ */ jsx127(CircularProgress, { size: 48, sx: { m: 4 } }) }) }),
|
|
16242
|
+
!clearingSpans && !searching && filteredSpans?.length === 0 && (searchActive || filtersActive ? /* @__PURE__ */ jsx127(
|
|
16243
|
+
NoMatchRow,
|
|
16244
|
+
{
|
|
16245
|
+
colSpan: columnCount,
|
|
16246
|
+
filtersActive,
|
|
16247
|
+
onClearAll: handleClearAll,
|
|
16248
|
+
searchActive,
|
|
16249
|
+
term: search
|
|
16250
|
+
}
|
|
16251
|
+
) : /* @__PURE__ */ jsx127(StreamBoundaryRow, { colSpan: columnCount, label: LABEL_NO_SPANS })),
|
|
16252
|
+
!clearingSpans && order2 === "newest_first" && /* @__PURE__ */ jsxs122(Fragment5, { children: [
|
|
16253
|
+
hasRows && hasMoreForward && fetchingForward && /* @__PURE__ */ jsx127(LoadingRow, { colSpan: columnCount }),
|
|
16254
|
+
hasRows && !hasMoreForward && /* @__PURE__ */ jsx127(StreamBoundaryRow, { colSpan: columnCount, label: LABEL_END_OF_STREAM }),
|
|
16255
|
+
hasRows && paddingTop > 0 && /* @__PURE__ */ jsx127(TableRow, { children: /* @__PURE__ */ jsx127(
|
|
15939
16256
|
TableCell,
|
|
15940
16257
|
{
|
|
15941
16258
|
colSpan: columnCount,
|
|
@@ -15945,7 +16262,7 @@ var SpansDataGrid = ({
|
|
|
15945
16262
|
hasRows && virtualItems.map((virtualItem) => {
|
|
15946
16263
|
const row = displayRows[virtualItem.index];
|
|
15947
16264
|
const isNew = !(seenSpanIdsRef.current?.has(row.original.span_id) ?? false);
|
|
15948
|
-
return /* @__PURE__ */
|
|
16265
|
+
return /* @__PURE__ */ jsx127(
|
|
15949
16266
|
SpansDataGridRow,
|
|
15950
16267
|
{
|
|
15951
16268
|
isNew,
|
|
@@ -15955,20 +16272,20 @@ var SpansDataGrid = ({
|
|
|
15955
16272
|
row.original.span_id
|
|
15956
16273
|
);
|
|
15957
16274
|
}),
|
|
15958
|
-
hasRows && paddingBottom > 0 && /* @__PURE__ */
|
|
16275
|
+
hasRows && paddingBottom > 0 && /* @__PURE__ */ jsx127(TableRow, { children: /* @__PURE__ */ jsx127(
|
|
15959
16276
|
TableCell,
|
|
15960
16277
|
{
|
|
15961
16278
|
colSpan: columnCount,
|
|
15962
16279
|
sx: { border: 0, height: paddingBottom, p: 0 }
|
|
15963
16280
|
}
|
|
15964
16281
|
) }),
|
|
15965
|
-
hasRows && hasMoreBackward && fetchingBackward && /* @__PURE__ */
|
|
15966
|
-
hasRows && !hasMoreBackward && /* @__PURE__ */
|
|
16282
|
+
hasRows && hasMoreBackward && fetchingBackward && /* @__PURE__ */ jsx127(LoadingRow, { colSpan: columnCount }),
|
|
16283
|
+
hasRows && !hasMoreBackward && /* @__PURE__ */ jsx127(StreamBoundaryRow, { colSpan: columnCount, label: LABEL_BEGINNING_OF_STREAM })
|
|
15967
16284
|
] }),
|
|
15968
|
-
!clearingSpans && order2 === "oldest_first" && /* @__PURE__ */
|
|
15969
|
-
hasRows && !hasMoreBackward && /* @__PURE__ */
|
|
15970
|
-
hasRows && hasMoreBackward && fetchingBackward && /* @__PURE__ */
|
|
15971
|
-
hasRows && paddingTop > 0 && /* @__PURE__ */
|
|
16285
|
+
!clearingSpans && order2 === "oldest_first" && /* @__PURE__ */ jsxs122(Fragment5, { children: [
|
|
16286
|
+
hasRows && !hasMoreBackward && /* @__PURE__ */ jsx127(StreamBoundaryRow, { colSpan: columnCount, label: LABEL_BEGINNING_OF_STREAM }),
|
|
16287
|
+
hasRows && hasMoreBackward && fetchingBackward && /* @__PURE__ */ jsx127(LoadingRow, { colSpan: columnCount }),
|
|
16288
|
+
hasRows && paddingTop > 0 && /* @__PURE__ */ jsx127(TableRow, { children: /* @__PURE__ */ jsx127(
|
|
15972
16289
|
TableCell,
|
|
15973
16290
|
{
|
|
15974
16291
|
colSpan: columnCount,
|
|
@@ -15978,7 +16295,7 @@ var SpansDataGrid = ({
|
|
|
15978
16295
|
hasRows && virtualItems.map((virtualItem) => {
|
|
15979
16296
|
const row = displayRows[virtualItem.index];
|
|
15980
16297
|
const isNew = !(seenSpanIdsRef.current?.has(row.original.span_id) ?? false);
|
|
15981
|
-
return /* @__PURE__ */
|
|
16298
|
+
return /* @__PURE__ */ jsx127(
|
|
15982
16299
|
SpansDataGridRow,
|
|
15983
16300
|
{
|
|
15984
16301
|
isNew,
|
|
@@ -15988,15 +16305,15 @@ var SpansDataGrid = ({
|
|
|
15988
16305
|
row.original.span_id
|
|
15989
16306
|
);
|
|
15990
16307
|
}),
|
|
15991
|
-
hasRows && paddingBottom > 0 && /* @__PURE__ */
|
|
16308
|
+
hasRows && paddingBottom > 0 && /* @__PURE__ */ jsx127(TableRow, { children: /* @__PURE__ */ jsx127(
|
|
15992
16309
|
TableCell,
|
|
15993
16310
|
{
|
|
15994
16311
|
colSpan: columnCount,
|
|
15995
16312
|
sx: { border: 0, height: paddingBottom, p: 0 }
|
|
15996
16313
|
}
|
|
15997
16314
|
) }),
|
|
15998
|
-
hasRows && hasMoreForward && fetchingForward && /* @__PURE__ */
|
|
15999
|
-
hasRows && !hasMoreForward && /* @__PURE__ */
|
|
16315
|
+
hasRows && hasMoreForward && fetchingForward && /* @__PURE__ */ jsx127(LoadingRow, { colSpan: columnCount }),
|
|
16316
|
+
hasRows && !hasMoreForward && /* @__PURE__ */ jsx127(StreamBoundaryRow, { colSpan: columnCount, label: LABEL_END_OF_STREAM })
|
|
16000
16317
|
] })
|
|
16001
16318
|
] })
|
|
16002
16319
|
]
|
|
@@ -16008,13 +16325,13 @@ var SpansDataGrid = ({
|
|
|
16008
16325
|
};
|
|
16009
16326
|
|
|
16010
16327
|
// src/components/spans-list/spans-list.tsx
|
|
16011
|
-
import { jsx as
|
|
16328
|
+
import { jsx as jsx128, jsxs as jsxs123 } from "react/jsx-runtime";
|
|
16012
16329
|
var SpansList = (props) => {
|
|
16013
|
-
return /* @__PURE__ */
|
|
16014
|
-
props.fetchError && /* @__PURE__ */
|
|
16330
|
+
return /* @__PURE__ */ jsxs123(Box6, { "data-testid": SPANS_DATA_GRID_TEST_ID, sx: { display: "flex", flexDirection: "column", flexGrow: 1, gap: 1, width: "100%" }, children: [
|
|
16331
|
+
props.fetchError && /* @__PURE__ */ jsxs123(
|
|
16015
16332
|
Alert2,
|
|
16016
16333
|
{
|
|
16017
|
-
action: /* @__PURE__ */
|
|
16334
|
+
action: /* @__PURE__ */ jsx128(Button4, { onClick: props.onFetchForward, children: "Retry" }),
|
|
16018
16335
|
severity: "error",
|
|
16019
16336
|
sx: { mt: 1, mx: 2 },
|
|
16020
16337
|
children: [
|
|
@@ -16024,7 +16341,7 @@ var SpansList = (props) => {
|
|
|
16024
16341
|
]
|
|
16025
16342
|
}
|
|
16026
16343
|
),
|
|
16027
|
-
/* @__PURE__ */
|
|
16344
|
+
/* @__PURE__ */ jsx128(
|
|
16028
16345
|
SpansDataGrid,
|
|
16029
16346
|
{
|
|
16030
16347
|
clearingSpans: props.clearingSpans,
|
|
@@ -16053,17 +16370,17 @@ var SpansList = (props) => {
|
|
|
16053
16370
|
|
|
16054
16371
|
// src/components/status-message/status-message.tsx
|
|
16055
16372
|
import { ErrorOutline, InfoOutlined as InfoOutlined2 } from "@mui/icons-material";
|
|
16056
|
-
import { Alert as Alert3, AlertTitle, Box as
|
|
16057
|
-
import { useState as
|
|
16058
|
-
import { Fragment as
|
|
16373
|
+
import { Alert as Alert3, AlertTitle, Box as Box7, Button as Button5, CircularProgress as CircularProgress2, Link, Typography as Typography6 } from "@mui/material";
|
|
16374
|
+
import { useState as useState7 } from "react";
|
|
16375
|
+
import { Fragment as Fragment6, jsx as jsx129, jsxs as jsxs124 } from "react/jsx-runtime";
|
|
16059
16376
|
var StatusMessage = ({
|
|
16060
16377
|
localstackVersion,
|
|
16061
16378
|
onEnable,
|
|
16062
16379
|
onRetry,
|
|
16063
16380
|
phase
|
|
16064
16381
|
}) => {
|
|
16065
|
-
const [enabling, setEnabling] =
|
|
16066
|
-
const [enableError, setEnableError] =
|
|
16382
|
+
const [enabling, setEnabling] = useState7(false);
|
|
16383
|
+
const [enableError, setEnableError] = useState7();
|
|
16067
16384
|
const handleEnable = async () => {
|
|
16068
16385
|
if (!onEnable) return;
|
|
16069
16386
|
setEnabling(true);
|
|
@@ -16077,8 +16394,8 @@ var StatusMessage = ({
|
|
|
16077
16394
|
}
|
|
16078
16395
|
};
|
|
16079
16396
|
if (phase === "CHECKING_STATUS" || phase === "CONNECTING_WS") {
|
|
16080
|
-
return /* @__PURE__ */
|
|
16081
|
-
|
|
16397
|
+
return /* @__PURE__ */ jsx129(
|
|
16398
|
+
Box7,
|
|
16082
16399
|
{
|
|
16083
16400
|
sx: {
|
|
16084
16401
|
alignItems: "center",
|
|
@@ -16088,13 +16405,13 @@ var StatusMessage = ({
|
|
|
16088
16405
|
justifyContent: "center",
|
|
16089
16406
|
p: 4
|
|
16090
16407
|
},
|
|
16091
|
-
children: /* @__PURE__ */
|
|
16408
|
+
children: /* @__PURE__ */ jsx129(CircularProgress2, { size: 32 })
|
|
16092
16409
|
}
|
|
16093
16410
|
);
|
|
16094
16411
|
}
|
|
16095
16412
|
if (phase === "INCOMPATIBLE") {
|
|
16096
|
-
return /* @__PURE__ */
|
|
16097
|
-
|
|
16413
|
+
return /* @__PURE__ */ jsx129(
|
|
16414
|
+
Box7,
|
|
16098
16415
|
{
|
|
16099
16416
|
sx: {
|
|
16100
16417
|
alignItems: "center",
|
|
@@ -16104,18 +16421,18 @@ var StatusMessage = ({
|
|
|
16104
16421
|
justifyContent: "center",
|
|
16105
16422
|
p: 4
|
|
16106
16423
|
},
|
|
16107
|
-
children: /* @__PURE__ */
|
|
16424
|
+
children: /* @__PURE__ */ jsxs124(
|
|
16108
16425
|
Alert3,
|
|
16109
16426
|
{
|
|
16110
|
-
icon: /* @__PURE__ */
|
|
16427
|
+
icon: /* @__PURE__ */ jsx129(ErrorOutline, { fontSize: "large" }),
|
|
16111
16428
|
severity: "error",
|
|
16112
16429
|
sx: { maxWidth: 600, width: "100%" },
|
|
16113
16430
|
children: [
|
|
16114
|
-
/* @__PURE__ */
|
|
16115
|
-
/* @__PURE__ */
|
|
16116
|
-
/* @__PURE__ */
|
|
16117
|
-
/* @__PURE__ */
|
|
16118
|
-
|
|
16431
|
+
/* @__PURE__ */ jsx129(AlertTitle, { sx: { fontWeight: "bold" }, children: "App Inspector Not Available" }),
|
|
16432
|
+
/* @__PURE__ */ jsx129(Typography6, { sx: { mb: 2 }, variant: "body2", children: localstackVersion === void 0 ? `App Inspector requires LocalStack ${MINIMUM_EMULATOR_VERSION} or later. Please update LocalStack.` : `App Inspector requires LocalStack ${MINIMUM_EMULATOR_VERSION} or later. You are running version ${localstackVersion}. Please update LocalStack.` }),
|
|
16433
|
+
/* @__PURE__ */ jsx129(Typography6, { sx: { mb: 1 }, variant: "body2", children: /* @__PURE__ */ jsx129("strong", { children: "Update LocalStack:" }) }),
|
|
16434
|
+
/* @__PURE__ */ jsx129(
|
|
16435
|
+
Box7,
|
|
16119
16436
|
{
|
|
16120
16437
|
component: "pre",
|
|
16121
16438
|
sx: {
|
|
@@ -16127,8 +16444,8 @@ var StatusMessage = ({
|
|
|
16127
16444
|
children: "localstack update docker-images"
|
|
16128
16445
|
}
|
|
16129
16446
|
),
|
|
16130
|
-
onRetry && /* @__PURE__ */
|
|
16131
|
-
|
|
16447
|
+
onRetry && /* @__PURE__ */ jsx129(Box7, { sx: { display: "flex", gap: 1, mt: 2 }, children: /* @__PURE__ */ jsx129(
|
|
16448
|
+
Button5,
|
|
16132
16449
|
{
|
|
16133
16450
|
"aria-label": "Check App Inspector status again",
|
|
16134
16451
|
onClick: onRetry,
|
|
@@ -16143,8 +16460,8 @@ var StatusMessage = ({
|
|
|
16143
16460
|
);
|
|
16144
16461
|
}
|
|
16145
16462
|
if (phase === "UNREACHABLE") {
|
|
16146
|
-
return /* @__PURE__ */
|
|
16147
|
-
|
|
16463
|
+
return /* @__PURE__ */ jsx129(
|
|
16464
|
+
Box7,
|
|
16148
16465
|
{
|
|
16149
16466
|
sx: {
|
|
16150
16467
|
alignItems: "center",
|
|
@@ -16154,17 +16471,17 @@ var StatusMessage = ({
|
|
|
16154
16471
|
justifyContent: "center",
|
|
16155
16472
|
p: 4
|
|
16156
16473
|
},
|
|
16157
|
-
children: /* @__PURE__ */
|
|
16474
|
+
children: /* @__PURE__ */ jsxs124(
|
|
16158
16475
|
Alert3,
|
|
16159
16476
|
{
|
|
16160
|
-
icon: /* @__PURE__ */
|
|
16477
|
+
icon: /* @__PURE__ */ jsx129(ErrorOutline, { fontSize: "large" }),
|
|
16161
16478
|
severity: "error",
|
|
16162
16479
|
sx: { maxWidth: 600, width: "100%" },
|
|
16163
16480
|
children: [
|
|
16164
|
-
/* @__PURE__ */
|
|
16165
|
-
/* @__PURE__ */
|
|
16481
|
+
/* @__PURE__ */ jsx129(AlertTitle, { sx: { fontWeight: "bold" }, children: "Connection Error" }),
|
|
16482
|
+
/* @__PURE__ */ jsxs124(Typography6, { sx: { mb: 2 }, variant: "body2", children: [
|
|
16166
16483
|
"Failed to connect to LocalStack. Ensure ",
|
|
16167
|
-
/* @__PURE__ */
|
|
16484
|
+
/* @__PURE__ */ jsx129(
|
|
16168
16485
|
Link,
|
|
16169
16486
|
{
|
|
16170
16487
|
href: "https://docs.localstack.cloud/aws/getting-started/installation/",
|
|
@@ -16175,9 +16492,9 @@ var StatusMessage = ({
|
|
|
16175
16492
|
),
|
|
16176
16493
|
" is running and accessible."
|
|
16177
16494
|
] }),
|
|
16178
|
-
/* @__PURE__ */
|
|
16179
|
-
/* @__PURE__ */
|
|
16180
|
-
|
|
16495
|
+
/* @__PURE__ */ jsx129(Typography6, { sx: { mb: 1 }, variant: "body2", children: /* @__PURE__ */ jsx129("strong", { children: "Start LocalStack:" }) }),
|
|
16496
|
+
/* @__PURE__ */ jsx129(
|
|
16497
|
+
Box7,
|
|
16181
16498
|
{
|
|
16182
16499
|
component: "pre",
|
|
16183
16500
|
sx: {
|
|
@@ -16189,8 +16506,8 @@ var StatusMessage = ({
|
|
|
16189
16506
|
children: "localstack start"
|
|
16190
16507
|
}
|
|
16191
16508
|
),
|
|
16192
|
-
onRetry && /* @__PURE__ */
|
|
16193
|
-
|
|
16509
|
+
onRetry && /* @__PURE__ */ jsx129(Box7, { sx: { display: "flex", justifyContent: "flex-start", mt: 2 }, children: /* @__PURE__ */ jsx129(
|
|
16510
|
+
Button5,
|
|
16194
16511
|
{
|
|
16195
16512
|
"aria-label": "Retry connection to LocalStack",
|
|
16196
16513
|
onClick: onRetry,
|
|
@@ -16205,8 +16522,8 @@ var StatusMessage = ({
|
|
|
16205
16522
|
);
|
|
16206
16523
|
}
|
|
16207
16524
|
if (phase === "DISABLED") {
|
|
16208
|
-
return /* @__PURE__ */
|
|
16209
|
-
|
|
16525
|
+
return /* @__PURE__ */ jsx129(
|
|
16526
|
+
Box7,
|
|
16210
16527
|
{
|
|
16211
16528
|
sx: {
|
|
16212
16529
|
alignItems: "center",
|
|
@@ -16216,31 +16533,31 @@ var StatusMessage = ({
|
|
|
16216
16533
|
justifyContent: "center",
|
|
16217
16534
|
p: 4
|
|
16218
16535
|
},
|
|
16219
|
-
children: /* @__PURE__ */
|
|
16536
|
+
children: /* @__PURE__ */ jsxs124(
|
|
16220
16537
|
Alert3,
|
|
16221
16538
|
{
|
|
16222
|
-
icon: /* @__PURE__ */
|
|
16539
|
+
icon: /* @__PURE__ */ jsx129(InfoOutlined2, { fontSize: "large" }),
|
|
16223
16540
|
severity: "warning",
|
|
16224
16541
|
sx: { maxWidth: 600, width: "100%" },
|
|
16225
16542
|
children: [
|
|
16226
|
-
/* @__PURE__ */
|
|
16227
|
-
/* @__PURE__ */
|
|
16228
|
-
/* @__PURE__ */
|
|
16229
|
-
|
|
16543
|
+
/* @__PURE__ */ jsx129(AlertTitle, { sx: { fontWeight: "bold" }, children: "App Inspector Is Not Enabled" }),
|
|
16544
|
+
/* @__PURE__ */ jsx129(Typography6, { sx: { mb: 2 }, variant: "body2", children: "App Inspector is not currently enabled in LocalStack. You can enable it now, or at startup." }),
|
|
16545
|
+
/* @__PURE__ */ jsx129(Box7, { sx: { display: "flex", gap: 1, mb: 2 }, children: onEnable && /* @__PURE__ */ jsx129(
|
|
16546
|
+
Button5,
|
|
16230
16547
|
{
|
|
16231
16548
|
"aria-label": "Enable App Inspector Now",
|
|
16232
16549
|
disabled: enabling,
|
|
16233
16550
|
onClick: () => {
|
|
16234
16551
|
void handleEnable();
|
|
16235
16552
|
},
|
|
16236
|
-
startIcon: enabling ? /* @__PURE__ */
|
|
16553
|
+
startIcon: enabling ? /* @__PURE__ */ jsx129(CircularProgress2, { size: 16 }) : void 0,
|
|
16237
16554
|
variant: "contained",
|
|
16238
16555
|
children: "Enable App Inspector Now"
|
|
16239
16556
|
}
|
|
16240
16557
|
) }),
|
|
16241
|
-
/* @__PURE__ */
|
|
16242
|
-
/* @__PURE__ */
|
|
16243
|
-
|
|
16558
|
+
/* @__PURE__ */ jsx129(Typography6, { sx: { mb: 1 }, variant: "body2", children: "If you'd prefer to automatically enable App Inspector at start up, use:" }),
|
|
16559
|
+
/* @__PURE__ */ jsx129(
|
|
16560
|
+
Box7,
|
|
16244
16561
|
{
|
|
16245
16562
|
component: "pre",
|
|
16246
16563
|
sx: {
|
|
@@ -16252,28 +16569,28 @@ var StatusMessage = ({
|
|
|
16252
16569
|
children: "LOCALSTACK_APP_INSPECTOR=1 localstack start"
|
|
16253
16570
|
}
|
|
16254
16571
|
),
|
|
16255
|
-
Boolean(enableError) && /* @__PURE__ */
|
|
16572
|
+
Boolean(enableError) && /* @__PURE__ */ jsx129(Typography6, { color: "error", sx: { mt: 1 }, variant: "body2", children: enableError })
|
|
16256
16573
|
]
|
|
16257
16574
|
}
|
|
16258
16575
|
)
|
|
16259
16576
|
}
|
|
16260
16577
|
);
|
|
16261
16578
|
}
|
|
16262
|
-
return /* @__PURE__ */
|
|
16579
|
+
return /* @__PURE__ */ jsx129(Fragment6, {});
|
|
16263
16580
|
};
|
|
16264
16581
|
|
|
16265
16582
|
// src/hooks/status-provider.tsx
|
|
16266
16583
|
import { createContext as createContext8, useContext as useContext14 } from "react";
|
|
16267
16584
|
|
|
16268
16585
|
// src/hooks/use-connection-state-machine.ts
|
|
16269
|
-
import { useCallback as useCallback3, useEffect as useEffect12, useRef as useRef7, useState as
|
|
16586
|
+
import { useCallback as useCallback3, useEffect as useEffect12, useRef as useRef7, useState as useState8 } from "react";
|
|
16270
16587
|
var POLL_INTERVAL_MS = 5e3;
|
|
16271
16588
|
function useConnectionStateMachine() {
|
|
16272
16589
|
const api = useAppInspectorApi();
|
|
16273
|
-
const [phase, setPhase] =
|
|
16274
|
-
const [checking, setChecking] =
|
|
16275
|
-
const [status, setStatus] =
|
|
16276
|
-
const [statusError, setStatusError] =
|
|
16590
|
+
const [phase, setPhase] = useState8("CHECKING_STATUS");
|
|
16591
|
+
const [checking, setChecking] = useState8(true);
|
|
16592
|
+
const [status, setStatus] = useState8();
|
|
16593
|
+
const [statusError, setStatusError] = useState8();
|
|
16277
16594
|
const abortControllerRef = useRef7(null);
|
|
16278
16595
|
const dispatchStatus = useCallback3((result, error) => {
|
|
16279
16596
|
if (result === void 0) {
|
|
@@ -16348,11 +16665,11 @@ function useConnectionStateMachine() {
|
|
|
16348
16665
|
}
|
|
16349
16666
|
|
|
16350
16667
|
// src/hooks/status-provider.tsx
|
|
16351
|
-
import { jsx as
|
|
16668
|
+
import { jsx as jsx130 } from "react/jsx-runtime";
|
|
16352
16669
|
var AppInspectorStatusContext = createContext8(void 0);
|
|
16353
16670
|
var StatusProvider = ({ children }) => {
|
|
16354
16671
|
const value = useConnectionStateMachine();
|
|
16355
|
-
return /* @__PURE__ */
|
|
16672
|
+
return /* @__PURE__ */ jsx130(AppInspectorStatusContext.Provider, { value, children });
|
|
16356
16673
|
};
|
|
16357
16674
|
var useAppInspectorStatus = () => {
|
|
16358
16675
|
const value = useContext14(AppInspectorStatusContext);
|
|
@@ -16363,9 +16680,9 @@ var useAppInspectorStatus = () => {
|
|
|
16363
16680
|
};
|
|
16364
16681
|
|
|
16365
16682
|
// src/hooks/use-local-storage.tsx
|
|
16366
|
-
import { useCallback as useCallback4, useEffect as useEffect13, useState as
|
|
16683
|
+
import { useCallback as useCallback4, useEffect as useEffect13, useState as useState9 } from "react";
|
|
16367
16684
|
function useLocalStorage(key, initialValue) {
|
|
16368
|
-
const [storedValue, setStoredValue] =
|
|
16685
|
+
const [storedValue, setStoredValue] = useState9(() => {
|
|
16369
16686
|
try {
|
|
16370
16687
|
const item = globalThis.localStorage.getItem(key);
|
|
16371
16688
|
return item ? JSON.parse(item) : initialValue;
|
|
@@ -16408,7 +16725,7 @@ function useLocalStorage(key, initialValue) {
|
|
|
16408
16725
|
}
|
|
16409
16726
|
|
|
16410
16727
|
// src/hooks/use-spans.ts
|
|
16411
|
-
import { useCallback as useCallback7, useEffect as useEffect16, useRef as useRef10, useState as
|
|
16728
|
+
import { useCallback as useCallback7, useEffect as useEffect16, useRef as useRef10, useState as useState11 } from "react";
|
|
16412
16729
|
|
|
16413
16730
|
// src/utils/pagination-buffer.ts
|
|
16414
16731
|
var insertSorted = (array, item, compareFunction, hint = "back") => {
|
|
@@ -16625,7 +16942,7 @@ var createPaginationBuffer = (options) => {
|
|
|
16625
16942
|
};
|
|
16626
16943
|
|
|
16627
16944
|
// src/hooks/use-spans-ws.tsx
|
|
16628
|
-
import { useCallback as useCallback6, useEffect as useEffect15, useRef as useRef9, useState as
|
|
16945
|
+
import { useCallback as useCallback6, useEffect as useEffect15, useRef as useRef9, useState as useState10 } from "react";
|
|
16629
16946
|
|
|
16630
16947
|
// src/config.ts
|
|
16631
16948
|
var APPINSPECTOR_API_PREFIX = "/_localstack/appinspector";
|
|
@@ -18807,7 +19124,7 @@ var useAppInspectorOpenAnalytics = () => {
|
|
|
18807
19124
|
};
|
|
18808
19125
|
|
|
18809
19126
|
// src/context.tsx
|
|
18810
|
-
import { Fragment as
|
|
19127
|
+
import { Fragment as Fragment7, jsx as jsx131 } from "react/jsx-runtime";
|
|
18811
19128
|
var AppInspectorContext = createContext9(void 0);
|
|
18812
19129
|
var useAppInspector = () => {
|
|
18813
19130
|
const context = useContext15(AppInspectorContext);
|
|
@@ -18818,7 +19135,7 @@ var useAppInspector = () => {
|
|
|
18818
19135
|
};
|
|
18819
19136
|
var AppInspectorAnalyticsBoundary = ({ children }) => {
|
|
18820
19137
|
useAppInspectorOpenAnalytics();
|
|
18821
|
-
return /* @__PURE__ */
|
|
19138
|
+
return /* @__PURE__ */ jsx131(Fragment7, { children });
|
|
18822
19139
|
};
|
|
18823
19140
|
var AppInspectorContextProvider = (props) => {
|
|
18824
19141
|
const api = useMemo5(
|
|
@@ -18851,7 +19168,7 @@ var AppInspectorContextProvider = (props) => {
|
|
|
18851
19168
|
}),
|
|
18852
19169
|
[deploymentContainer, props.headerHeight, props.linkComponent, props.localstackEndpoint, resolveLink]
|
|
18853
19170
|
);
|
|
18854
|
-
return /* @__PURE__ */
|
|
19171
|
+
return /* @__PURE__ */ jsx131(ApiProvider, { api, children: /* @__PURE__ */ jsx131(StatusProvider, { children: /* @__PURE__ */ jsx131(AppInspectorContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx131(AppInspectorAnalyticsBoundary, { children: props.children }) }) }) });
|
|
18855
19172
|
};
|
|
18856
19173
|
|
|
18857
19174
|
// src/hooks/use-spans-ws.tsx
|
|
@@ -18869,7 +19186,7 @@ function useSpansWebSocket(options) {
|
|
|
18869
19186
|
useEffect15(() => {
|
|
18870
19187
|
onCloseRef.current = onClose;
|
|
18871
19188
|
}, [onClose]);
|
|
18872
|
-
const [connected, setConnected] =
|
|
19189
|
+
const [connected, setConnected] = useState10(false);
|
|
18873
19190
|
const wsRef = useRef9(void 0);
|
|
18874
19191
|
const { localstackEndpoint } = useAppInspector();
|
|
18875
19192
|
const connect = useCallback6(() => {
|
|
@@ -18930,22 +19247,22 @@ var PAGE_SIZE = 100;
|
|
|
18930
19247
|
var useSpans = () => {
|
|
18931
19248
|
const api = useAppInspectorApi();
|
|
18932
19249
|
const { onWsClose, onWsOpen, wsEnabled } = useAppInspectorStatus();
|
|
18933
|
-
const [spans, setSpans] =
|
|
18934
|
-
const [fetchError, setFetchError] =
|
|
18935
|
-
const [fetchingForward, setFetchingForward] =
|
|
18936
|
-
const [fetchingBackward, setFetchingBackward] =
|
|
18937
|
-
const [search, setSearch] =
|
|
19250
|
+
const [spans, setSpans] = useState11();
|
|
19251
|
+
const [fetchError, setFetchError] = useState11();
|
|
19252
|
+
const [fetchingForward, setFetchingForward] = useState11(false);
|
|
19253
|
+
const [fetchingBackward, setFetchingBackward] = useState11(false);
|
|
19254
|
+
const [search, setSearch] = useState11("");
|
|
18938
19255
|
const searchRef = useRef10("");
|
|
18939
|
-
const [searching, setSearching] =
|
|
19256
|
+
const [searching, setSearching] = useState11(false);
|
|
18940
19257
|
const searchSeqRef = useRef10(0);
|
|
18941
19258
|
const paginationBufferRef = useRef10();
|
|
18942
|
-
const [totalCount, setTotalCount] =
|
|
18943
|
-
const [licenseLimit, setLicenseLimit] =
|
|
18944
|
-
const [systemLimit, setSystemLimit] =
|
|
18945
|
-
const [errorCount, setErrorCount] =
|
|
18946
|
-
const [warningCount, setWarningCount] =
|
|
18947
|
-
const [hasMoreBackward, setHasMoreBackward] =
|
|
18948
|
-
const [hasMoreForward, setHasMoreForward] =
|
|
19259
|
+
const [totalCount, setTotalCount] = useState11();
|
|
19260
|
+
const [licenseLimit, setLicenseLimit] = useState11();
|
|
19261
|
+
const [systemLimit, setSystemLimit] = useState11();
|
|
19262
|
+
const [errorCount, setErrorCount] = useState11();
|
|
19263
|
+
const [warningCount, setWarningCount] = useState11();
|
|
19264
|
+
const [hasMoreBackward, setHasMoreBackward] = useState11();
|
|
19265
|
+
const [hasMoreForward, setHasMoreForward] = useState11();
|
|
18949
19266
|
const fetchForward = useCallback7(() => {
|
|
18950
19267
|
void paginationBufferRef.current?.fetchForward();
|
|
18951
19268
|
}, []);
|
|
@@ -19012,7 +19329,7 @@ var useSpans = () => {
|
|
|
19012
19329
|
paginationBufferRef.current = buffer;
|
|
19013
19330
|
void buffer.fetchForward();
|
|
19014
19331
|
}, [api]);
|
|
19015
|
-
const [clearingSpans, setClearingSpans] =
|
|
19332
|
+
const [clearingSpans, setClearingSpans] = useState11(false);
|
|
19016
19333
|
const clearSpans = useCallback7(async () => {
|
|
19017
19334
|
if (clearingSpans) {
|
|
19018
19335
|
return;
|
|
@@ -19087,15 +19404,15 @@ var useSpans = () => {
|
|
|
19087
19404
|
|
|
19088
19405
|
// src/pages/trace-graph-page.tsx
|
|
19089
19406
|
import { ArrowBack } from "@mui/icons-material";
|
|
19090
|
-
import { Box as
|
|
19407
|
+
import { Box as Box19, Button as Button7, Drawer, Paper as Paper2 } from "@mui/material";
|
|
19091
19408
|
import { styled } from "@mui/material/styles";
|
|
19092
19409
|
import { ReactFlowProvider } from "@xyflow/react";
|
|
19093
|
-
import { useCallback as useCallback11, useEffect as useEffect21, useRef as useRef16, useState as
|
|
19410
|
+
import { useCallback as useCallback11, useEffect as useEffect21, useRef as useRef16, useState as useState20 } from "react";
|
|
19094
19411
|
|
|
19095
19412
|
// src/components/event-details/event-details.tsx
|
|
19096
19413
|
import { Close as Close3 } from "@mui/icons-material";
|
|
19097
|
-
import { Alert as Alert4, Box as
|
|
19098
|
-
import { useMemo as useMemo10, useState as
|
|
19414
|
+
import { Alert as Alert4, Box as Box16, Chip as Chip3, Divider as Divider4, FormControlLabel, IconButton as IconButton5, Stack as Stack4, Switch, Typography as Typography12 } from "@mui/material";
|
|
19415
|
+
import { useMemo as useMemo10, useState as useState17 } from "react";
|
|
19099
19416
|
|
|
19100
19417
|
// src/utils/event-utils.ts
|
|
19101
19418
|
var iamEventParser = (eventName, attributes) => {
|
|
@@ -19208,10 +19525,10 @@ var getEventGroupsByType = (events) => {
|
|
|
19208
19525
|
// src/components/event-details/copy-button.tsx
|
|
19209
19526
|
import { Check, ContentCopy } from "@mui/icons-material";
|
|
19210
19527
|
import { IconButton as IconButton3, Tooltip as Tooltip5 } from "@mui/material";
|
|
19211
|
-
import { useCallback as useCallback8, useState as
|
|
19212
|
-
import { jsx as
|
|
19528
|
+
import { useCallback as useCallback8, useState as useState12 } from "react";
|
|
19529
|
+
import { jsx as jsx132 } from "react/jsx-runtime";
|
|
19213
19530
|
var CopyButton = ({ value }) => {
|
|
19214
|
-
const [copied, setCopied] =
|
|
19531
|
+
const [copied, setCopied] = useState12(false);
|
|
19215
19532
|
const handleCopy = useCallback8(() => {
|
|
19216
19533
|
const text2 = typeof value === "string" ? value : JSON.stringify(value, void 0, 2);
|
|
19217
19534
|
void navigator.clipboard.writeText(text2).then(() => {
|
|
@@ -19221,83 +19538,83 @@ var CopyButton = ({ value }) => {
|
|
|
19221
19538
|
}, 1500);
|
|
19222
19539
|
});
|
|
19223
19540
|
}, [value]);
|
|
19224
|
-
return /* @__PURE__ */
|
|
19541
|
+
return /* @__PURE__ */ jsx132(Tooltip5, { title: copied ? "Copied!" : "Copy", children: /* @__PURE__ */ jsx132(
|
|
19225
19542
|
IconButton3,
|
|
19226
19543
|
{
|
|
19227
19544
|
className: "copy-btn",
|
|
19228
19545
|
onClick: handleCopy,
|
|
19229
19546
|
size: "small",
|
|
19230
19547
|
sx: { ml: 0.5, opacity: copied ? 1 : 0, p: 0.25, transition: "opacity 0.15s" },
|
|
19231
|
-
children: copied ? /* @__PURE__ */
|
|
19548
|
+
children: copied ? /* @__PURE__ */ jsx132(Check, { sx: { fontSize: 14 } }) : /* @__PURE__ */ jsx132(ContentCopy, { sx: { fontSize: 14 } })
|
|
19232
19549
|
}
|
|
19233
19550
|
) });
|
|
19234
19551
|
};
|
|
19235
19552
|
|
|
19236
19553
|
// src/components/event-details/event-detail.tsx
|
|
19237
19554
|
import { KeyboardArrowDown, KeyboardArrowRight } from "@mui/icons-material";
|
|
19238
|
-
import { Box as
|
|
19239
|
-
import { useEffect as useEffect18, useMemo as useMemo8, useRef as useRef12, useState as
|
|
19555
|
+
import { Box as Box13, IconButton as IconButton4, Typography as Typography9 } from "@mui/material";
|
|
19556
|
+
import { useEffect as useEffect18, useMemo as useMemo8, useRef as useRef12, useState as useState14 } from "react";
|
|
19240
19557
|
|
|
19241
19558
|
// src/components/status-icon.tsx
|
|
19242
|
-
import { Cancel as
|
|
19243
|
-
import { Box as
|
|
19244
|
-
import { jsx as
|
|
19559
|
+
import { Cancel as Cancel3, CheckCircle, Error as Error3, Info, RemoveCircle } from "@mui/icons-material";
|
|
19560
|
+
import { Box as Box8 } from "@mui/material";
|
|
19561
|
+
import { jsx as jsx133 } from "react/jsx-runtime";
|
|
19245
19562
|
var StatusIcon2 = ({ errorLevel }) => {
|
|
19246
19563
|
switch (errorLevel) {
|
|
19247
19564
|
case EventLevel.LevelError: {
|
|
19248
|
-
return /* @__PURE__ */
|
|
19565
|
+
return /* @__PURE__ */ jsx133(Cancel3, { sx: { color: "red" } });
|
|
19249
19566
|
}
|
|
19250
19567
|
case EventLevel.LevelInfo: {
|
|
19251
|
-
return /* @__PURE__ */
|
|
19568
|
+
return /* @__PURE__ */ jsx133(Info, { sx: { color: "gray" } });
|
|
19252
19569
|
}
|
|
19253
19570
|
case EventLevel.LevelPermission: {
|
|
19254
|
-
return /* @__PURE__ */
|
|
19571
|
+
return /* @__PURE__ */ jsx133(RemoveCircle, { sx: { color: "blue" } });
|
|
19255
19572
|
}
|
|
19256
19573
|
case EventLevel.LevelWarning: {
|
|
19257
|
-
return /* @__PURE__ */
|
|
19574
|
+
return /* @__PURE__ */ jsx133(Error3, { sx: { color: "orange" } });
|
|
19258
19575
|
}
|
|
19259
19576
|
default: {
|
|
19260
|
-
return /* @__PURE__ */
|
|
19577
|
+
return /* @__PURE__ */ jsx133(CheckCircle, { sx: { color: "lightgray" } });
|
|
19261
19578
|
}
|
|
19262
19579
|
}
|
|
19263
19580
|
};
|
|
19264
19581
|
|
|
19265
19582
|
// src/components/event-details/iam-event-detail.tsx
|
|
19266
19583
|
import { CheckCircle as CheckCircle2, Error as ErrorIcon, Warning } from "@mui/icons-material";
|
|
19267
|
-
import { Box as
|
|
19268
|
-
import { jsx as
|
|
19269
|
-
var DetailRow = ({ content, label }) => /* @__PURE__ */
|
|
19270
|
-
/* @__PURE__ */
|
|
19271
|
-
/* @__PURE__ */
|
|
19584
|
+
import { Box as Box9, Chip, Typography as Typography7 } from "@mui/material";
|
|
19585
|
+
import { jsx as jsx134, jsxs as jsxs125 } from "react/jsx-runtime";
|
|
19586
|
+
var DetailRow = ({ content, label }) => /* @__PURE__ */ jsxs125(Box9, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr", mb: 0.5 }, children: [
|
|
19587
|
+
/* @__PURE__ */ jsx134(Typography7, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: label }),
|
|
19588
|
+
/* @__PURE__ */ jsx134(Box9, { children: typeof content === "string" ? /* @__PURE__ */ jsx134(Typography7, { sx: { color: "text.primary", wordBreak: "break-word" }, variant: "caption", children: content }) : content })
|
|
19272
19589
|
] });
|
|
19273
19590
|
var PermissionIcon = ({ status }) => {
|
|
19274
19591
|
switch (status) {
|
|
19275
19592
|
case "explicitly_allowed":
|
|
19276
19593
|
case "implicitly_allowed": {
|
|
19277
|
-
return /* @__PURE__ */
|
|
19594
|
+
return /* @__PURE__ */ jsx134(CheckCircle2, { sx: { color: "success.main", fontSize: "1rem" } });
|
|
19278
19595
|
}
|
|
19279
19596
|
case "explicitly_denied": {
|
|
19280
|
-
return /* @__PURE__ */
|
|
19597
|
+
return /* @__PURE__ */ jsx134(ErrorIcon, { sx: { color: "error.main", fontSize: "1rem" } });
|
|
19281
19598
|
}
|
|
19282
19599
|
case "implicitly_denied": {
|
|
19283
|
-
return /* @__PURE__ */
|
|
19600
|
+
return /* @__PURE__ */ jsx134(Warning, { sx: { color: "warning.main", fontSize: "1rem" } });
|
|
19284
19601
|
}
|
|
19285
19602
|
}
|
|
19286
19603
|
};
|
|
19287
19604
|
var IAMEventDetail = ({ event }) => {
|
|
19288
19605
|
const payloadString = event.attributes?.payload;
|
|
19289
19606
|
if (!payloadString) {
|
|
19290
|
-
return /* @__PURE__ */
|
|
19607
|
+
return /* @__PURE__ */ jsx134(Typography7, { color: "text.secondary", variant: "caption", children: "No IAM policy evaluation data available" });
|
|
19291
19608
|
}
|
|
19292
19609
|
const parsedIAM = parseIAMEvent(payloadString);
|
|
19293
19610
|
if (!parsedIAM) {
|
|
19294
|
-
return /* @__PURE__ */
|
|
19611
|
+
return /* @__PURE__ */ jsx134(Typography7, { color: "text.secondary", variant: "caption", children: "Failed to parse IAM event data" });
|
|
19295
19612
|
}
|
|
19296
|
-
return /* @__PURE__ */
|
|
19297
|
-
/* @__PURE__ */
|
|
19613
|
+
return /* @__PURE__ */ jsxs125(Box9, { children: [
|
|
19614
|
+
/* @__PURE__ */ jsx134(Box9, { sx: { mb: 1.5 }, children: /* @__PURE__ */ jsx134(
|
|
19298
19615
|
Chip,
|
|
19299
19616
|
{
|
|
19300
|
-
icon: /* @__PURE__ */
|
|
19617
|
+
icon: /* @__PURE__ */ jsx134(PermissionIcon, { status: parsedIAM.permission }),
|
|
19301
19618
|
label: formatPermissionStatus(parsedIAM.permission),
|
|
19302
19619
|
size: "small",
|
|
19303
19620
|
sx: {
|
|
@@ -19307,36 +19624,36 @@ var IAMEventDetail = ({ event }) => {
|
|
|
19307
19624
|
variant: "outlined"
|
|
19308
19625
|
}
|
|
19309
19626
|
) }),
|
|
19310
|
-
/* @__PURE__ */
|
|
19311
|
-
/* @__PURE__ */
|
|
19312
|
-
parsedIAM.details.actions && parsedIAM.details.actions.length > 0 && /* @__PURE__ */
|
|
19627
|
+
/* @__PURE__ */ jsx134(DetailRow, { content: `${parsedIAM.service}:${parsedIAM.operation}`, label: "Operation" }),
|
|
19628
|
+
/* @__PURE__ */ jsx134(DetailRow, { content: parsedIAM.principal, label: "Principal" }),
|
|
19629
|
+
parsedIAM.details.actions && parsedIAM.details.actions.length > 0 && /* @__PURE__ */ jsx134(
|
|
19313
19630
|
DetailRow,
|
|
19314
19631
|
{
|
|
19315
|
-
content: /* @__PURE__ */
|
|
19632
|
+
content: /* @__PURE__ */ jsx134(Box9, { children: parsedIAM.details.actions.map((action) => /* @__PURE__ */ jsx134(Typography7, { sx: { color: "text.primary", display: "block" }, variant: "caption", children: action }, action)) }),
|
|
19316
19633
|
label: "Actions"
|
|
19317
19634
|
}
|
|
19318
19635
|
),
|
|
19319
|
-
parsedIAM.details.resources && parsedIAM.details.resources.length > 0 && /* @__PURE__ */
|
|
19636
|
+
parsedIAM.details.resources && parsedIAM.details.resources.length > 0 && /* @__PURE__ */ jsx134(
|
|
19320
19637
|
DetailRow,
|
|
19321
19638
|
{
|
|
19322
|
-
content: /* @__PURE__ */
|
|
19639
|
+
content: /* @__PURE__ */ jsx134(Box9, { children: parsedIAM.details.resources.map((resource) => /* @__PURE__ */ jsx134(Typography7, { sx: { color: "text.primary", display: "block", wordBreak: "break-all" }, variant: "caption", children: resource }, resource)) }),
|
|
19323
19640
|
label: "Resources"
|
|
19324
19641
|
}
|
|
19325
19642
|
),
|
|
19326
|
-
(parsedIAM.details.explicitAllows !== void 0 || parsedIAM.details.explicitDenies !== void 0 || parsedIAM.details.implicitDenies !== void 0) && /* @__PURE__ */
|
|
19327
|
-
/* @__PURE__ */
|
|
19328
|
-
/* @__PURE__ */
|
|
19329
|
-
parsedIAM.details.explicitAllows !== void 0 && /* @__PURE__ */
|
|
19330
|
-
/* @__PURE__ */
|
|
19331
|
-
/* @__PURE__ */
|
|
19643
|
+
(parsedIAM.details.explicitAllows !== void 0 || parsedIAM.details.explicitDenies !== void 0 || parsedIAM.details.implicitDenies !== void 0) && /* @__PURE__ */ jsxs125(Box9, { sx: { mt: 1.5 }, children: [
|
|
19644
|
+
/* @__PURE__ */ jsx134(Typography7, { color: "text.secondary", sx: { display: "block", fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Policy Evaluation" }),
|
|
19645
|
+
/* @__PURE__ */ jsxs125(Box9, { sx: { display: "grid", gap: 1, gridTemplateColumns: "repeat(3, 1fr)" }, children: [
|
|
19646
|
+
parsedIAM.details.explicitAllows !== void 0 && /* @__PURE__ */ jsxs125(Box9, { sx: { textAlign: "center" }, children: [
|
|
19647
|
+
/* @__PURE__ */ jsx134(Typography7, { color: "success.main", sx: { display: "block", fontWeight: "bold" }, variant: "subtitle2", children: parsedIAM.details.explicitAllows }),
|
|
19648
|
+
/* @__PURE__ */ jsx134(Typography7, { color: "text.secondary", variant: "caption", children: "Explicit Allows" })
|
|
19332
19649
|
] }),
|
|
19333
|
-
parsedIAM.details.explicitDenies !== void 0 && /* @__PURE__ */
|
|
19334
|
-
/* @__PURE__ */
|
|
19335
|
-
/* @__PURE__ */
|
|
19650
|
+
parsedIAM.details.explicitDenies !== void 0 && /* @__PURE__ */ jsxs125(Box9, { sx: { textAlign: "center" }, children: [
|
|
19651
|
+
/* @__PURE__ */ jsx134(Typography7, { color: "error.main", sx: { display: "block", fontWeight: "bold" }, variant: "subtitle2", children: parsedIAM.details.explicitDenies }),
|
|
19652
|
+
/* @__PURE__ */ jsx134(Typography7, { color: "text.secondary", variant: "caption", children: "Explicit Denies" })
|
|
19336
19653
|
] }),
|
|
19337
|
-
parsedIAM.details.implicitDenies !== void 0 && /* @__PURE__ */
|
|
19338
|
-
/* @__PURE__ */
|
|
19339
|
-
/* @__PURE__ */
|
|
19654
|
+
parsedIAM.details.implicitDenies !== void 0 && /* @__PURE__ */ jsxs125(Box9, { sx: { textAlign: "center" }, children: [
|
|
19655
|
+
/* @__PURE__ */ jsx134(Typography7, { color: "warning.main", sx: { display: "block", fontWeight: "bold" }, variant: "subtitle2", children: parsedIAM.details.implicitDenies }),
|
|
19656
|
+
/* @__PURE__ */ jsx134(Typography7, { color: "text.secondary", variant: "caption", children: "Implicit Denies" })
|
|
19340
19657
|
] })
|
|
19341
19658
|
] })
|
|
19342
19659
|
] })
|
|
@@ -19344,9 +19661,9 @@ var IAMEventDetail = ({ event }) => {
|
|
|
19344
19661
|
};
|
|
19345
19662
|
|
|
19346
19663
|
// src/components/event-details/iam-permission-detail.tsx
|
|
19347
|
-
import { Box as
|
|
19664
|
+
import { Box as Box10, Chip as Chip2, Stack as Stack2, Typography as Typography8 } from "@mui/material";
|
|
19348
19665
|
import { useMemo as useMemo6 } from "react";
|
|
19349
|
-
import { jsx as
|
|
19666
|
+
import { jsx as jsx135, jsxs as jsxs126 } from "react/jsx-runtime";
|
|
19350
19667
|
var getChipColor = (isAllowed, spanStatusCode) => {
|
|
19351
19668
|
if (isAllowed) return "success.main";
|
|
19352
19669
|
if (spanStatusCode === 2) return "error.main";
|
|
@@ -19366,43 +19683,43 @@ var IAMPermissionItem = ({ event, spanStatusCode }) => {
|
|
|
19366
19683
|
const { parsedIAM } = parsedData;
|
|
19367
19684
|
const isAllowed = parsedIAM.permission === "explicitly_allowed" || parsedIAM.permission === "implicitly_allowed";
|
|
19368
19685
|
const chipColors = { backgroundColor: getChipColor(isAllowed, spanStatusCode), color: "white" };
|
|
19369
|
-
return /* @__PURE__ */
|
|
19370
|
-
/* @__PURE__ */
|
|
19371
|
-
/* @__PURE__ */
|
|
19372
|
-
/* @__PURE__ */
|
|
19373
|
-
/* @__PURE__ */
|
|
19374
|
-
/* @__PURE__ */
|
|
19375
|
-
/* @__PURE__ */
|
|
19376
|
-
/* @__PURE__ */
|
|
19686
|
+
return /* @__PURE__ */ jsxs126(Box10, { sx: { mb: 0.5 }, children: [
|
|
19687
|
+
/* @__PURE__ */ jsx135(Box10, { sx: { alignItems: "center", display: "flex", gap: 1, mb: 0.5 }, children: /* @__PURE__ */ jsx135(Chip2, { label: formatPermissionStatus(parsedIAM.permission), size: "small", sx: { ...chipColors, fontWeight: 500 } }) }),
|
|
19688
|
+
/* @__PURE__ */ jsxs126(Stack2, { spacing: 1, children: [
|
|
19689
|
+
/* @__PURE__ */ jsxs126(Box10, { "data-testid": EVENT_DETAILS_IAM_PRINCIPAL_TEST_ID, children: [
|
|
19690
|
+
/* @__PURE__ */ jsx135(Typography8, { sx: { display: "block", fontWeight: 600 }, variant: "caption", children: "Principal" }),
|
|
19691
|
+
/* @__PURE__ */ jsxs126(Stack2, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
|
|
19692
|
+
/* @__PURE__ */ jsx135(Typography8, { sx: { wordBreak: "break-all" }, variant: "body2", children: parsedIAM.principal }),
|
|
19693
|
+
/* @__PURE__ */ jsx135(CopyButton, { value: parsedIAM.principal })
|
|
19377
19694
|
] })
|
|
19378
19695
|
] }),
|
|
19379
|
-
parsedIAM.details.actions && parsedIAM.details.actions.length > 0 && /* @__PURE__ */
|
|
19380
|
-
/* @__PURE__ */
|
|
19381
|
-
parsedIAM.details.actions.map((action) => /* @__PURE__ */
|
|
19382
|
-
/* @__PURE__ */
|
|
19383
|
-
/* @__PURE__ */
|
|
19696
|
+
parsedIAM.details.actions && parsedIAM.details.actions.length > 0 && /* @__PURE__ */ jsxs126(Box10, { "data-testid": EVENT_DETAILS_IAM_ACTIONS_TEST_ID, children: [
|
|
19697
|
+
/* @__PURE__ */ jsx135(Typography8, { sx: { display: "block", fontWeight: 600 }, variant: "caption", children: "Actions" }),
|
|
19698
|
+
parsedIAM.details.actions.map((action) => /* @__PURE__ */ jsxs126(Stack2, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
|
|
19699
|
+
/* @__PURE__ */ jsx135(Typography8, { sx: { display: "block" }, variant: "body2", children: action }),
|
|
19700
|
+
/* @__PURE__ */ jsx135(CopyButton, { value: action })
|
|
19384
19701
|
] }, action))
|
|
19385
19702
|
] }),
|
|
19386
|
-
parsedIAM.details.resources && parsedIAM.details.resources.length > 0 && /* @__PURE__ */
|
|
19387
|
-
/* @__PURE__ */
|
|
19388
|
-
parsedIAM.details.resources.map((resource) => /* @__PURE__ */
|
|
19389
|
-
/* @__PURE__ */
|
|
19390
|
-
/* @__PURE__ */
|
|
19703
|
+
parsedIAM.details.resources && parsedIAM.details.resources.length > 0 && /* @__PURE__ */ jsxs126(Box10, { "data-testid": EVENT_DETAILS_IAM_RESOURCES_TEST_ID, children: [
|
|
19704
|
+
/* @__PURE__ */ jsx135(Typography8, { sx: { display: "block", fontWeight: 600 }, variant: "caption", children: "Resources" }),
|
|
19705
|
+
parsedIAM.details.resources.map((resource) => /* @__PURE__ */ jsxs126(Stack2, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
|
|
19706
|
+
/* @__PURE__ */ jsx135(Typography8, { sx: { display: "block", wordBreak: "break-all" }, variant: "body2", children: resource }),
|
|
19707
|
+
/* @__PURE__ */ jsx135(CopyButton, { value: resource })
|
|
19391
19708
|
] }, resource))
|
|
19392
19709
|
] })
|
|
19393
19710
|
] })
|
|
19394
19711
|
] });
|
|
19395
19712
|
};
|
|
19396
|
-
var IAMPermissionDetail = ({ events, spanStatusCode }) => /* @__PURE__ */
|
|
19713
|
+
var IAMPermissionDetail = ({ events, spanStatusCode }) => /* @__PURE__ */ jsx135(Box10, { children: events.map((event) => /* @__PURE__ */ jsx135(IAMPermissionItem, { event, spanStatusCode }, `${event.span_id}-${event.event_id}`)) });
|
|
19397
19714
|
|
|
19398
19715
|
// src/components/event-details/payload-viewer.tsx
|
|
19399
|
-
import { Box as
|
|
19716
|
+
import { Box as Box12, useTheme as useTheme3 } from "@mui/material";
|
|
19400
19717
|
|
|
19401
19718
|
// node_modules/.pnpm/@textea+json-viewer@3.5.0_@emotion+react@11.14.0_@types+react@17.0.91_react@17.0.2__@em_040507e953752247cb848fd3f764690c/node_modules/@textea/json-viewer/dist/index.mjs
|
|
19402
19719
|
var import_copy_to_clipboard = __toESM(require_copy_to_clipboard(), 1);
|
|
19403
|
-
import { jsx as
|
|
19404
|
-
import { Box as
|
|
19405
|
-
import { createContext as createContext10, useContext as useContext16, useState as
|
|
19720
|
+
import { jsx as jsx136, jsxs as jsxs127, Fragment as Fragment8 } from "react/jsx-runtime";
|
|
19721
|
+
import { Box as Box11, InputBase, NoSsr, SvgIcon, createTheme, ThemeProvider, Paper } from "@mui/material";
|
|
19722
|
+
import { createContext as createContext10, useContext as useContext16, useState as useState13, useRef as useRef11, useCallback as useCallback9, useMemo as useMemo7, useEffect as useEffect17, memo as memo9 } from "react";
|
|
19406
19723
|
import { create, useStore, createStore } from "zustand";
|
|
19407
19724
|
function r(e2) {
|
|
19408
19725
|
var t, f2, n = "";
|
|
@@ -19646,7 +19963,7 @@ async function copyString(value) {
|
|
|
19646
19963
|
}
|
|
19647
19964
|
function useClipboard() {
|
|
19648
19965
|
let { timeout = 2e3 } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
19649
|
-
const [copied, setCopied] =
|
|
19966
|
+
const [copied, setCopied] = useState13(false);
|
|
19650
19967
|
const copyTimeout = useRef11(null);
|
|
19651
19968
|
const handleCopyResult = useCallback9((value) => {
|
|
19652
19969
|
const current = copyTimeout.current;
|
|
@@ -19729,7 +20046,7 @@ function useInspect(path, value, nestedIndex) {
|
|
|
19729
20046
|
value,
|
|
19730
20047
|
setInspectCache
|
|
19731
20048
|
]);
|
|
19732
|
-
const [inspect, set] =
|
|
20049
|
+
const [inspect, set] = useState13(() => {
|
|
19733
20050
|
const shouldInspect = getInspectCache(path, nestedIndex);
|
|
19734
20051
|
if (shouldInspect !== void 0) {
|
|
19735
20052
|
return shouldInspect;
|
|
@@ -19755,7 +20072,7 @@ function useInspect(path, value, nestedIndex) {
|
|
|
19755
20072
|
setInspect
|
|
19756
20073
|
];
|
|
19757
20074
|
}
|
|
19758
|
-
var DataBox = (props) => /* @__PURE__ */
|
|
20075
|
+
var DataBox = (props) => /* @__PURE__ */ jsx136(Box11, {
|
|
19759
20076
|
component: "div",
|
|
19760
20077
|
...props,
|
|
19761
20078
|
sx: {
|
|
@@ -19766,7 +20083,7 @@ var DataBox = (props) => /* @__PURE__ */ jsx135(Box10, {
|
|
|
19766
20083
|
var DataTypeLabel = (param) => {
|
|
19767
20084
|
let { dataType, enable = true } = param;
|
|
19768
20085
|
if (!enable) return null;
|
|
19769
|
-
return /* @__PURE__ */
|
|
20086
|
+
return /* @__PURE__ */ jsx136(DataBox, {
|
|
19770
20087
|
className: "data-type-label",
|
|
19771
20088
|
sx: {
|
|
19772
20089
|
mx: 0.5,
|
|
@@ -19784,18 +20101,18 @@ function defineEasyType(param) {
|
|
|
19784
20101
|
const storeDisplayDataTypes = useJsonViewerStore((store) => store.displayDataTypes);
|
|
19785
20102
|
const color2 = useJsonViewerStore((store) => store.colorspace[colorKey]);
|
|
19786
20103
|
const onSelect = useJsonViewerStore((store) => store.onSelect);
|
|
19787
|
-
return /* @__PURE__ */
|
|
20104
|
+
return /* @__PURE__ */ jsxs127(DataBox, {
|
|
19788
20105
|
onClick: () => onSelect === null || onSelect === void 0 ? void 0 : onSelect(props.path, props.value),
|
|
19789
20106
|
sx: {
|
|
19790
20107
|
color: color2
|
|
19791
20108
|
},
|
|
19792
20109
|
children: [
|
|
19793
|
-
displayTypeLabel && storeDisplayDataTypes && /* @__PURE__ */
|
|
20110
|
+
displayTypeLabel && storeDisplayDataTypes && /* @__PURE__ */ jsx136(DataTypeLabel, {
|
|
19794
20111
|
dataType: type
|
|
19795
20112
|
}),
|
|
19796
|
-
/* @__PURE__ */
|
|
20113
|
+
/* @__PURE__ */ jsx136(DataBox, {
|
|
19797
20114
|
className: "".concat(type, "-value"),
|
|
19798
|
-
children: /* @__PURE__ */
|
|
20115
|
+
children: /* @__PURE__ */ jsx136(Render, {
|
|
19799
20116
|
path: props.path,
|
|
19800
20117
|
inspect: props.inspect,
|
|
19801
20118
|
setInspect: props.setInspect,
|
|
@@ -19835,7 +20152,7 @@ function defineEasyType(param) {
|
|
|
19835
20152
|
}, [
|
|
19836
20153
|
setValue
|
|
19837
20154
|
]);
|
|
19838
|
-
return /* @__PURE__ */
|
|
20155
|
+
return /* @__PURE__ */ jsx136(InputBase, {
|
|
19839
20156
|
autoFocus: true,
|
|
19840
20157
|
value,
|
|
19841
20158
|
onChange: handleChange,
|
|
@@ -19875,7 +20192,7 @@ var booleanType = defineEasyType({
|
|
|
19875
20192
|
},
|
|
19876
20193
|
Renderer: (param) => {
|
|
19877
20194
|
let { value } = param;
|
|
19878
|
-
return /* @__PURE__ */
|
|
20195
|
+
return /* @__PURE__ */ jsx136(Fragment8, {
|
|
19879
20196
|
children: value ? "true" : "false"
|
|
19880
20197
|
});
|
|
19881
20198
|
}
|
|
@@ -19894,7 +20211,7 @@ var dateType = defineEasyType({
|
|
|
19894
20211
|
colorKey: "base0D",
|
|
19895
20212
|
Renderer: (param) => {
|
|
19896
20213
|
let { value } = param;
|
|
19897
|
-
return /* @__PURE__ */
|
|
20214
|
+
return /* @__PURE__ */ jsx136(Fragment8, {
|
|
19898
20215
|
children: value.toLocaleTimeString("en-us", displayOptions)
|
|
19899
20216
|
});
|
|
19900
20217
|
}
|
|
@@ -19923,12 +20240,12 @@ var functionName = (func) => {
|
|
|
19923
20240
|
var lb = "{";
|
|
19924
20241
|
var rb = "}";
|
|
19925
20242
|
var PreFunctionType = (props) => {
|
|
19926
|
-
return /* @__PURE__ */
|
|
20243
|
+
return /* @__PURE__ */ jsxs127(NoSsr, {
|
|
19927
20244
|
children: [
|
|
19928
|
-
/* @__PURE__ */
|
|
20245
|
+
/* @__PURE__ */ jsx136(DataTypeLabel, {
|
|
19929
20246
|
dataType: "function"
|
|
19930
20247
|
}),
|
|
19931
|
-
/* @__PURE__ */
|
|
20248
|
+
/* @__PURE__ */ jsxs127(Box11, {
|
|
19932
20249
|
component: "span",
|
|
19933
20250
|
className: "data-function-start",
|
|
19934
20251
|
sx: {
|
|
@@ -19944,8 +20261,8 @@ var PreFunctionType = (props) => {
|
|
|
19944
20261
|
});
|
|
19945
20262
|
};
|
|
19946
20263
|
var PostFunctionType = () => {
|
|
19947
|
-
return /* @__PURE__ */
|
|
19948
|
-
children: /* @__PURE__ */
|
|
20264
|
+
return /* @__PURE__ */ jsx136(NoSsr, {
|
|
20265
|
+
children: /* @__PURE__ */ jsx136(Box11, {
|
|
19949
20266
|
component: "span",
|
|
19950
20267
|
className: "data-function-end",
|
|
19951
20268
|
children: rb
|
|
@@ -19954,15 +20271,15 @@ var PostFunctionType = () => {
|
|
|
19954
20271
|
};
|
|
19955
20272
|
var FunctionType = (props) => {
|
|
19956
20273
|
const functionColor = useJsonViewerStore((store) => store.colorspace.base05);
|
|
19957
|
-
return /* @__PURE__ */
|
|
19958
|
-
children: /* @__PURE__ */
|
|
20274
|
+
return /* @__PURE__ */ jsx136(NoSsr, {
|
|
20275
|
+
children: /* @__PURE__ */ jsx136(Box11, {
|
|
19959
20276
|
className: "data-function",
|
|
19960
20277
|
sx: {
|
|
19961
20278
|
display: props.inspect ? "block" : "inline-block",
|
|
19962
20279
|
pl: props.inspect ? 2 : 0,
|
|
19963
20280
|
color: functionColor
|
|
19964
20281
|
},
|
|
19965
|
-
children: props.inspect ? functionBody(props.value) : /* @__PURE__ */
|
|
20282
|
+
children: props.inspect ? functionBody(props.value) : /* @__PURE__ */ jsx136(Box11, {
|
|
19966
20283
|
component: "span",
|
|
19967
20284
|
className: "data-function-body",
|
|
19968
20285
|
onClick: () => props.setInspect(true),
|
|
@@ -19990,7 +20307,7 @@ var nullType = defineEasyType({
|
|
|
19990
20307
|
displayTypeLabel: false,
|
|
19991
20308
|
Renderer: () => {
|
|
19992
20309
|
const backgroundColor = useJsonViewerStore((store) => store.colorspace.base02);
|
|
19993
|
-
return /* @__PURE__ */
|
|
20310
|
+
return /* @__PURE__ */ jsx136(Box11, {
|
|
19994
20311
|
sx: {
|
|
19995
20312
|
fontSize: "0.8rem",
|
|
19996
20313
|
backgroundColor,
|
|
@@ -20013,7 +20330,7 @@ var nanType = defineEasyType({
|
|
|
20013
20330
|
deserialize: (value) => parseFloat(value),
|
|
20014
20331
|
Renderer: () => {
|
|
20015
20332
|
const backgroundColor = useJsonViewerStore((store) => store.colorspace.base02);
|
|
20016
|
-
return /* @__PURE__ */
|
|
20333
|
+
return /* @__PURE__ */ jsx136(Box11, {
|
|
20017
20334
|
sx: {
|
|
20018
20335
|
backgroundColor,
|
|
20019
20336
|
fontSize: "0.8rem",
|
|
@@ -20033,7 +20350,7 @@ var floatType = defineEasyType({
|
|
|
20033
20350
|
deserialize: (value) => parseFloat(value),
|
|
20034
20351
|
Renderer: (param) => {
|
|
20035
20352
|
let { value } = param;
|
|
20036
|
-
return /* @__PURE__ */
|
|
20353
|
+
return /* @__PURE__ */ jsx136(Fragment8, {
|
|
20037
20354
|
children: value
|
|
20038
20355
|
});
|
|
20039
20356
|
}
|
|
@@ -20047,7 +20364,7 @@ var intType = defineEasyType({
|
|
|
20047
20364
|
deserialize: (value) => parseFloat(value),
|
|
20048
20365
|
Renderer: (param) => {
|
|
20049
20366
|
let { value } = param;
|
|
20050
|
-
return /* @__PURE__ */
|
|
20367
|
+
return /* @__PURE__ */ jsx136(Fragment8, {
|
|
20051
20368
|
children: value
|
|
20052
20369
|
});
|
|
20053
20370
|
}
|
|
@@ -20060,16 +20377,16 @@ var bigIntType = defineEasyType({
|
|
|
20060
20377
|
deserialize: (value) => BigInt(value.replace(/\D/g, "")),
|
|
20061
20378
|
Renderer: (param) => {
|
|
20062
20379
|
let { value } = param;
|
|
20063
|
-
return /* @__PURE__ */
|
|
20380
|
+
return /* @__PURE__ */ jsx136(Fragment8, {
|
|
20064
20381
|
children: "".concat(value, "n")
|
|
20065
20382
|
});
|
|
20066
20383
|
}
|
|
20067
20384
|
});
|
|
20068
20385
|
var BaseIcon = (param) => {
|
|
20069
20386
|
let { d: d2, ...props } = param;
|
|
20070
|
-
return /* @__PURE__ */
|
|
20387
|
+
return /* @__PURE__ */ jsx136(SvgIcon, {
|
|
20071
20388
|
...props,
|
|
20072
|
-
children: /* @__PURE__ */
|
|
20389
|
+
children: /* @__PURE__ */ jsx136("path", {
|
|
20073
20390
|
d: d2
|
|
20074
20391
|
})
|
|
20075
20392
|
});
|
|
@@ -20084,55 +20401,55 @@ var Edit = "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.3
|
|
|
20084
20401
|
var ExpandMore = "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z";
|
|
20085
20402
|
var Delete = "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5l-1-1h-5l-1 1H5v2h14V4z";
|
|
20086
20403
|
var AddBoxIcon = (props) => {
|
|
20087
|
-
return /* @__PURE__ */
|
|
20404
|
+
return /* @__PURE__ */ jsx136(BaseIcon, {
|
|
20088
20405
|
d: AddBox,
|
|
20089
20406
|
...props
|
|
20090
20407
|
});
|
|
20091
20408
|
};
|
|
20092
20409
|
var CheckIcon = (props) => {
|
|
20093
|
-
return /* @__PURE__ */
|
|
20410
|
+
return /* @__PURE__ */ jsx136(BaseIcon, {
|
|
20094
20411
|
d: Check2,
|
|
20095
20412
|
...props
|
|
20096
20413
|
});
|
|
20097
20414
|
};
|
|
20098
20415
|
var ChevronRightIcon = (props) => {
|
|
20099
|
-
return /* @__PURE__ */
|
|
20416
|
+
return /* @__PURE__ */ jsx136(BaseIcon, {
|
|
20100
20417
|
d: ChevronRight,
|
|
20101
20418
|
...props
|
|
20102
20419
|
});
|
|
20103
20420
|
};
|
|
20104
20421
|
var CircularArrowsIcon = (props) => {
|
|
20105
|
-
return /* @__PURE__ */
|
|
20422
|
+
return /* @__PURE__ */ jsx136(BaseIcon, {
|
|
20106
20423
|
d: CircularArrows,
|
|
20107
20424
|
...props
|
|
20108
20425
|
});
|
|
20109
20426
|
};
|
|
20110
20427
|
var CloseIcon = (props) => {
|
|
20111
|
-
return /* @__PURE__ */
|
|
20428
|
+
return /* @__PURE__ */ jsx136(BaseIcon, {
|
|
20112
20429
|
d: Close2,
|
|
20113
20430
|
...props
|
|
20114
20431
|
});
|
|
20115
20432
|
};
|
|
20116
20433
|
var ContentCopyIcon = (props) => {
|
|
20117
|
-
return /* @__PURE__ */
|
|
20434
|
+
return /* @__PURE__ */ jsx136(BaseIcon, {
|
|
20118
20435
|
d: ContentCopy2,
|
|
20119
20436
|
...props
|
|
20120
20437
|
});
|
|
20121
20438
|
};
|
|
20122
20439
|
var EditIcon = (props) => {
|
|
20123
|
-
return /* @__PURE__ */
|
|
20440
|
+
return /* @__PURE__ */ jsx136(BaseIcon, {
|
|
20124
20441
|
d: Edit,
|
|
20125
20442
|
...props
|
|
20126
20443
|
});
|
|
20127
20444
|
};
|
|
20128
20445
|
var ExpandMoreIcon = (props) => {
|
|
20129
|
-
return /* @__PURE__ */
|
|
20446
|
+
return /* @__PURE__ */ jsx136(BaseIcon, {
|
|
20130
20447
|
d: ExpandMore,
|
|
20131
20448
|
...props
|
|
20132
20449
|
});
|
|
20133
20450
|
};
|
|
20134
20451
|
var DeleteIcon = (props) => {
|
|
20135
|
-
return /* @__PURE__ */
|
|
20452
|
+
return /* @__PURE__ */ jsx136(BaseIcon, {
|
|
20136
20453
|
d: Delete,
|
|
20137
20454
|
...props
|
|
20138
20455
|
});
|
|
@@ -20171,7 +20488,7 @@ var PreObjectType = (props) => {
|
|
|
20171
20488
|
props.value
|
|
20172
20489
|
]);
|
|
20173
20490
|
const isTrap = useIsCycleReference(props.path, props.value);
|
|
20174
|
-
return /* @__PURE__ */
|
|
20491
|
+
return /* @__PURE__ */ jsxs127(Box11, {
|
|
20175
20492
|
component: "span",
|
|
20176
20493
|
className: "data-object-start",
|
|
20177
20494
|
sx: {
|
|
@@ -20179,7 +20496,7 @@ var PreObjectType = (props) => {
|
|
|
20179
20496
|
},
|
|
20180
20497
|
children: [
|
|
20181
20498
|
isArrayLike ? arrayLb : objectLb,
|
|
20182
|
-
shouldDisplaySize && props.inspect && !isEmptyValue && /* @__PURE__ */
|
|
20499
|
+
shouldDisplaySize && props.inspect && !isEmptyValue && /* @__PURE__ */ jsx136(Box11, {
|
|
20183
20500
|
component: "span",
|
|
20184
20501
|
sx: {
|
|
20185
20502
|
pl: 0.5,
|
|
@@ -20189,16 +20506,16 @@ var PreObjectType = (props) => {
|
|
|
20189
20506
|
},
|
|
20190
20507
|
children: sizeOfValue
|
|
20191
20508
|
}),
|
|
20192
|
-
isTrap && !props.inspect && /* @__PURE__ */
|
|
20509
|
+
isTrap && !props.inspect && /* @__PURE__ */ jsxs127(Fragment8, {
|
|
20193
20510
|
children: [
|
|
20194
|
-
/* @__PURE__ */
|
|
20511
|
+
/* @__PURE__ */ jsx136(CircularArrowsIcon, {
|
|
20195
20512
|
sx: {
|
|
20196
20513
|
fontSize: 12,
|
|
20197
20514
|
color: textColor,
|
|
20198
20515
|
mx: 0.5
|
|
20199
20516
|
}
|
|
20200
20517
|
}),
|
|
20201
|
-
/* @__PURE__ */
|
|
20518
|
+
/* @__PURE__ */ jsx136(DataBox, {
|
|
20202
20519
|
sx: {
|
|
20203
20520
|
cursor: "pointer",
|
|
20204
20521
|
userSelect: "none"
|
|
@@ -20228,7 +20545,7 @@ var PostObjectType = (props) => {
|
|
|
20228
20545
|
props.path,
|
|
20229
20546
|
props.value
|
|
20230
20547
|
]);
|
|
20231
|
-
return /* @__PURE__ */
|
|
20548
|
+
return /* @__PURE__ */ jsxs127(Box11, {
|
|
20232
20549
|
component: "span",
|
|
20233
20550
|
className: "data-object-end",
|
|
20234
20551
|
sx: {
|
|
@@ -20239,7 +20556,7 @@ var PostObjectType = (props) => {
|
|
|
20239
20556
|
},
|
|
20240
20557
|
children: [
|
|
20241
20558
|
isArrayLike ? arrayRb : objectRb,
|
|
20242
|
-
shouldDisplaySize && (isEmptyValue || !props.inspect) ? /* @__PURE__ */
|
|
20559
|
+
shouldDisplaySize && (isEmptyValue || !props.inspect) ? /* @__PURE__ */ jsx136(Box11, {
|
|
20243
20560
|
component: "span",
|
|
20244
20561
|
sx: {
|
|
20245
20562
|
pl: 0.5,
|
|
@@ -20260,7 +20577,7 @@ var ObjectType = (props) => {
|
|
|
20260
20577
|
const borderColor = useJsonViewerStore((store) => store.colorspace.base02);
|
|
20261
20578
|
const groupArraysAfterLength = useJsonViewerStore((store) => store.groupArraysAfterLength);
|
|
20262
20579
|
const isTrap = useIsCycleReference(props.path, props.value);
|
|
20263
|
-
const [displayLength, setDisplayLength] =
|
|
20580
|
+
const [displayLength, setDisplayLength] = useState13(useJsonViewerStore((store) => store.maxDisplayLength));
|
|
20264
20581
|
const objectSortKeys = useJsonViewerStore((store) => store.objectSortKeys);
|
|
20265
20582
|
const elements = useMemo7(() => {
|
|
20266
20583
|
if (!props.inspect) {
|
|
@@ -20279,7 +20596,7 @@ var ObjectType = (props) => {
|
|
|
20279
20596
|
...props.path,
|
|
20280
20597
|
key
|
|
20281
20598
|
];
|
|
20282
|
-
elements3.push(/* @__PURE__ */
|
|
20599
|
+
elements3.push(/* @__PURE__ */ jsx136(DataKeyPair, {
|
|
20283
20600
|
path,
|
|
20284
20601
|
value: value2,
|
|
20285
20602
|
prevValue: props.prevValue instanceof Map ? props.prevValue.get(k2) : void 0,
|
|
@@ -20295,7 +20612,7 @@ var ObjectType = (props) => {
|
|
|
20295
20612
|
while (true) {
|
|
20296
20613
|
const nextResult = iterator2.next();
|
|
20297
20614
|
var _nextResult_done;
|
|
20298
|
-
elements3.push(/* @__PURE__ */
|
|
20615
|
+
elements3.push(/* @__PURE__ */ jsx136(DataKeyPair, {
|
|
20299
20616
|
path: [
|
|
20300
20617
|
...props.path,
|
|
20301
20618
|
"iterator:".concat(count2)
|
|
@@ -20323,7 +20640,7 @@ var ObjectType = (props) => {
|
|
|
20323
20640
|
...props.path,
|
|
20324
20641
|
index
|
|
20325
20642
|
];
|
|
20326
|
-
return /* @__PURE__ */
|
|
20643
|
+
return /* @__PURE__ */ jsx136(DataKeyPair, {
|
|
20327
20644
|
path,
|
|
20328
20645
|
value: value2,
|
|
20329
20646
|
prevValue: Array.isArray(props.prevValue) ? props.prevValue[index] : void 0,
|
|
@@ -20332,7 +20649,7 @@ var ObjectType = (props) => {
|
|
|
20332
20649
|
});
|
|
20333
20650
|
if (value.length > displayLength) {
|
|
20334
20651
|
const rest = value.length - displayLength;
|
|
20335
|
-
elements4.push(/* @__PURE__ */
|
|
20652
|
+
elements4.push(/* @__PURE__ */ jsxs127(DataBox, {
|
|
20336
20653
|
sx: {
|
|
20337
20654
|
cursor: "pointer",
|
|
20338
20655
|
lineHeight: 1.5,
|
|
@@ -20355,7 +20672,7 @@ var ObjectType = (props) => {
|
|
|
20355
20672
|
const prevElements = Array.isArray(props.prevValue) ? segmentArray(props.prevValue, groupArraysAfterLength) : void 0;
|
|
20356
20673
|
const elementsLastIndex = elements3.length - 1;
|
|
20357
20674
|
return elements3.map((list, index) => {
|
|
20358
|
-
return /* @__PURE__ */
|
|
20675
|
+
return /* @__PURE__ */ jsx136(DataKeyPair, {
|
|
20359
20676
|
path: props.path,
|
|
20360
20677
|
value: list,
|
|
20361
20678
|
nestedIndex: index,
|
|
@@ -20382,7 +20699,7 @@ var ObjectType = (props) => {
|
|
|
20382
20699
|
...props.path,
|
|
20383
20700
|
key
|
|
20384
20701
|
];
|
|
20385
|
-
return /* @__PURE__ */
|
|
20702
|
+
return /* @__PURE__ */ jsx136(DataKeyPair, {
|
|
20386
20703
|
path,
|
|
20387
20704
|
value: value2,
|
|
20388
20705
|
prevValue: (_props_prevValue = props.prevValue) === null || _props_prevValue === void 0 ? void 0 : _props_prevValue[key],
|
|
@@ -20391,7 +20708,7 @@ var ObjectType = (props) => {
|
|
|
20391
20708
|
});
|
|
20392
20709
|
if (entries.length > displayLength) {
|
|
20393
20710
|
const rest = entries.length - displayLength;
|
|
20394
|
-
elements2.push(/* @__PURE__ */
|
|
20711
|
+
elements2.push(/* @__PURE__ */ jsxs127(DataBox, {
|
|
20395
20712
|
sx: {
|
|
20396
20713
|
cursor: "pointer",
|
|
20397
20714
|
lineHeight: 1.5,
|
|
@@ -20429,7 +20746,7 @@ var ObjectType = (props) => {
|
|
|
20429
20746
|
if (isEmptyValue) {
|
|
20430
20747
|
return null;
|
|
20431
20748
|
}
|
|
20432
|
-
return /* @__PURE__ */
|
|
20749
|
+
return /* @__PURE__ */ jsx136(Box11, {
|
|
20433
20750
|
className: "data-object",
|
|
20434
20751
|
sx: {
|
|
20435
20752
|
display: props.inspect ? "block" : "inline-block",
|
|
@@ -20438,7 +20755,7 @@ var ObjectType = (props) => {
|
|
|
20438
20755
|
color: keyColor,
|
|
20439
20756
|
borderLeft: props.inspect ? "1px solid ".concat(borderColor) : "none"
|
|
20440
20757
|
},
|
|
20441
|
-
children: props.inspect ? elements : !isTrap && /* @__PURE__ */
|
|
20758
|
+
children: props.inspect ? elements : !isTrap && /* @__PURE__ */ jsx136(Box11, {
|
|
20442
20759
|
component: "span",
|
|
20443
20760
|
className: "data-object-body",
|
|
20444
20761
|
onClick: () => props.setInspect(true),
|
|
@@ -20466,11 +20783,11 @@ var stringType = defineEasyType({
|
|
|
20466
20783
|
serialize: (value) => value,
|
|
20467
20784
|
deserialize: (value) => value,
|
|
20468
20785
|
Renderer: (props) => {
|
|
20469
|
-
const [showRest, setShowRest] =
|
|
20786
|
+
const [showRest, setShowRest] = useState13(false);
|
|
20470
20787
|
const collapseStringsAfterLength = useJsonViewerStore((store) => store.collapseStringsAfterLength);
|
|
20471
20788
|
const value = showRest ? props.value : props.value.slice(0, collapseStringsAfterLength);
|
|
20472
20789
|
const hasRest = props.value.length > collapseStringsAfterLength;
|
|
20473
|
-
return /* @__PURE__ */
|
|
20790
|
+
return /* @__PURE__ */ jsxs127(Box11, {
|
|
20474
20791
|
component: "span",
|
|
20475
20792
|
sx: {
|
|
20476
20793
|
overflowWrap: "anywhere",
|
|
@@ -20488,7 +20805,7 @@ var stringType = defineEasyType({
|
|
|
20488
20805
|
children: [
|
|
20489
20806
|
'"',
|
|
20490
20807
|
value,
|
|
20491
|
-
hasRest && !showRest && /* @__PURE__ */
|
|
20808
|
+
hasRest && !showRest && /* @__PURE__ */ jsx136(Box11, {
|
|
20492
20809
|
component: "span",
|
|
20493
20810
|
sx: {
|
|
20494
20811
|
padding: 0.5
|
|
@@ -20507,7 +20824,7 @@ var undefinedType = defineEasyType({
|
|
|
20507
20824
|
displayTypeLabel: false,
|
|
20508
20825
|
Renderer: () => {
|
|
20509
20826
|
const backgroundColor = useJsonViewerStore((store) => store.colorspace.base02);
|
|
20510
|
-
return /* @__PURE__ */
|
|
20827
|
+
return /* @__PURE__ */ jsx136(Box11, {
|
|
20511
20828
|
sx: {
|
|
20512
20829
|
fontSize: "0.7rem",
|
|
20513
20830
|
backgroundColor,
|
|
@@ -20588,7 +20905,7 @@ function useTypeComponents(value, path) {
|
|
|
20588
20905
|
registry
|
|
20589
20906
|
]);
|
|
20590
20907
|
}
|
|
20591
|
-
var IconBox = (props) => /* @__PURE__ */
|
|
20908
|
+
var IconBox = (props) => /* @__PURE__ */ jsx136(Box11, {
|
|
20592
20909
|
component: "span",
|
|
20593
20910
|
...props,
|
|
20594
20911
|
sx: {
|
|
@@ -20620,7 +20937,7 @@ var DataKeyPair = (props) => {
|
|
|
20620
20937
|
storeEditable,
|
|
20621
20938
|
value
|
|
20622
20939
|
]);
|
|
20623
|
-
const [tempValue, setTempValue] =
|
|
20940
|
+
const [tempValue, setTempValue] = useState13("");
|
|
20624
20941
|
const depth = path.length;
|
|
20625
20942
|
const key = path[depth - 1];
|
|
20626
20943
|
const hoverPath = useJsonViewerStore((store) => store.hoverPath);
|
|
@@ -20634,7 +20951,7 @@ var DataKeyPair = (props) => {
|
|
|
20634
20951
|
const setHover = useJsonViewerStore((store) => store.setHover);
|
|
20635
20952
|
const root2 = useJsonViewerStore((store) => store.value);
|
|
20636
20953
|
const [inspect, setInspect] = useInspect(path, value, nestedIndex);
|
|
20637
|
-
const [editing, setEditing] =
|
|
20954
|
+
const [editing, setEditing] = useState13(false);
|
|
20638
20955
|
const onChange = useJsonViewerStore((store) => store.onChange);
|
|
20639
20956
|
const keyColor = useTextColor();
|
|
20640
20957
|
const numberKeyColor = useJsonViewerStore((store) => store.colorspace.base0C);
|
|
@@ -20774,18 +21091,18 @@ var DataKeyPair = (props) => {
|
|
|
20774
21091
|
]);
|
|
20775
21092
|
const actionIcons = useMemo7(() => {
|
|
20776
21093
|
if (editing) {
|
|
20777
|
-
return /* @__PURE__ */
|
|
21094
|
+
return /* @__PURE__ */ jsxs127(Fragment8, {
|
|
20778
21095
|
children: [
|
|
20779
|
-
/* @__PURE__ */
|
|
20780
|
-
children: /* @__PURE__ */
|
|
21096
|
+
/* @__PURE__ */ jsx136(IconBox, {
|
|
21097
|
+
children: /* @__PURE__ */ jsx136(CloseIcon, {
|
|
20781
21098
|
sx: {
|
|
20782
21099
|
fontSize: ".8rem"
|
|
20783
21100
|
},
|
|
20784
21101
|
onClick: abortEditing
|
|
20785
21102
|
})
|
|
20786
21103
|
}),
|
|
20787
|
-
/* @__PURE__ */
|
|
20788
|
-
children: /* @__PURE__ */
|
|
21104
|
+
/* @__PURE__ */ jsx136(IconBox, {
|
|
21105
|
+
children: /* @__PURE__ */ jsx136(CheckIcon, {
|
|
20789
21106
|
sx: {
|
|
20790
21107
|
fontSize: ".8rem"
|
|
20791
21108
|
},
|
|
@@ -20795,9 +21112,9 @@ var DataKeyPair = (props) => {
|
|
|
20795
21112
|
]
|
|
20796
21113
|
});
|
|
20797
21114
|
}
|
|
20798
|
-
return /* @__PURE__ */
|
|
21115
|
+
return /* @__PURE__ */ jsxs127(Fragment8, {
|
|
20799
21116
|
children: [
|
|
20800
|
-
enableClipboard && /* @__PURE__ */
|
|
21117
|
+
enableClipboard && /* @__PURE__ */ jsx136(IconBox, {
|
|
20801
21118
|
onClick: (event) => {
|
|
20802
21119
|
event.preventDefault();
|
|
20803
21120
|
try {
|
|
@@ -20806,41 +21123,41 @@ var DataKeyPair = (props) => {
|
|
|
20806
21123
|
console.error(e2);
|
|
20807
21124
|
}
|
|
20808
21125
|
},
|
|
20809
|
-
children: copied ? /* @__PURE__ */
|
|
21126
|
+
children: copied ? /* @__PURE__ */ jsx136(CheckIcon, {
|
|
20810
21127
|
sx: {
|
|
20811
21128
|
fontSize: ".8rem"
|
|
20812
21129
|
}
|
|
20813
|
-
}) : /* @__PURE__ */
|
|
21130
|
+
}) : /* @__PURE__ */ jsx136(ContentCopyIcon, {
|
|
20814
21131
|
sx: {
|
|
20815
21132
|
fontSize: ".8rem"
|
|
20816
21133
|
}
|
|
20817
21134
|
})
|
|
20818
21135
|
}),
|
|
20819
|
-
Editor && editable && serialize && deserialize && /* @__PURE__ */
|
|
21136
|
+
Editor && editable && serialize && deserialize && /* @__PURE__ */ jsx136(IconBox, {
|
|
20820
21137
|
onClick: startEditing,
|
|
20821
|
-
children: /* @__PURE__ */
|
|
21138
|
+
children: /* @__PURE__ */ jsx136(EditIcon, {
|
|
20822
21139
|
sx: {
|
|
20823
21140
|
fontSize: ".8rem"
|
|
20824
21141
|
}
|
|
20825
21142
|
})
|
|
20826
21143
|
}),
|
|
20827
|
-
enableAdd && /* @__PURE__ */
|
|
21144
|
+
enableAdd && /* @__PURE__ */ jsx136(IconBox, {
|
|
20828
21145
|
onClick: (event) => {
|
|
20829
21146
|
event.preventDefault();
|
|
20830
21147
|
onAdd === null || onAdd === void 0 ? void 0 : onAdd(path);
|
|
20831
21148
|
},
|
|
20832
|
-
children: /* @__PURE__ */
|
|
21149
|
+
children: /* @__PURE__ */ jsx136(AddBoxIcon, {
|
|
20833
21150
|
sx: {
|
|
20834
21151
|
fontSize: ".8rem"
|
|
20835
21152
|
}
|
|
20836
21153
|
})
|
|
20837
21154
|
}),
|
|
20838
|
-
enableDelete && /* @__PURE__ */
|
|
21155
|
+
enableDelete && /* @__PURE__ */ jsx136(IconBox, {
|
|
20839
21156
|
onClick: (event) => {
|
|
20840
21157
|
event.preventDefault();
|
|
20841
21158
|
onDelete === null || onDelete === void 0 ? void 0 : onDelete(path, value);
|
|
20842
21159
|
},
|
|
20843
|
-
children: /* @__PURE__ */
|
|
21160
|
+
children: /* @__PURE__ */ jsx136(DeleteIcon, {
|
|
20844
21161
|
sx: {
|
|
20845
21162
|
fontSize: ".9rem"
|
|
20846
21163
|
}
|
|
@@ -20888,7 +21205,7 @@ var DataKeyPair = (props) => {
|
|
|
20888
21205
|
prevValue,
|
|
20889
21206
|
nestedIndex
|
|
20890
21207
|
]);
|
|
20891
|
-
return /* @__PURE__ */
|
|
21208
|
+
return /* @__PURE__ */ jsxs127(Box11, {
|
|
20892
21209
|
className: "data-key-pair",
|
|
20893
21210
|
"data-testid": "data-key-pair" + path.join("."),
|
|
20894
21211
|
sx: {
|
|
@@ -20900,7 +21217,7 @@ var DataKeyPair = (props) => {
|
|
|
20900
21217
|
nestedIndex
|
|
20901
21218
|
]),
|
|
20902
21219
|
children: [
|
|
20903
|
-
/* @__PURE__ */
|
|
21220
|
+
/* @__PURE__ */ jsxs127(DataBox, {
|
|
20904
21221
|
component: "span",
|
|
20905
21222
|
className: "data-key",
|
|
20906
21223
|
sx: {
|
|
@@ -20921,7 +21238,7 @@ var DataKeyPair = (props) => {
|
|
|
20921
21238
|
setInspect
|
|
20922
21239
|
]),
|
|
20923
21240
|
children: [
|
|
20924
|
-
expandable ? inspect ? /* @__PURE__ */
|
|
21241
|
+
expandable ? inspect ? /* @__PURE__ */ jsx136(ExpandMoreIcon, {
|
|
20925
21242
|
className: "data-key-toggle-expanded",
|
|
20926
21243
|
sx: {
|
|
20927
21244
|
fontSize: ".8rem",
|
|
@@ -20929,7 +21246,7 @@ var DataKeyPair = (props) => {
|
|
|
20929
21246
|
cursor: "pointer"
|
|
20930
21247
|
}
|
|
20931
21248
|
}
|
|
20932
|
-
}) : /* @__PURE__ */
|
|
21249
|
+
}) : /* @__PURE__ */ jsx136(ChevronRightIcon, {
|
|
20933
21250
|
className: "data-key-toggle-collapsed",
|
|
20934
21251
|
sx: {
|
|
20935
21252
|
fontSize: ".8rem",
|
|
@@ -20938,44 +21255,44 @@ var DataKeyPair = (props) => {
|
|
|
20938
21255
|
}
|
|
20939
21256
|
}
|
|
20940
21257
|
}) : null,
|
|
20941
|
-
/* @__PURE__ */
|
|
21258
|
+
/* @__PURE__ */ jsx136(Box11, {
|
|
20942
21259
|
ref: highlightContainer,
|
|
20943
21260
|
className: "data-key-key",
|
|
20944
21261
|
component: "span",
|
|
20945
|
-
children: isRoot && depth === 0 ? rootName !== false ? quotesOnKeys ? /* @__PURE__ */
|
|
21262
|
+
children: isRoot && depth === 0 ? rootName !== false ? quotesOnKeys ? /* @__PURE__ */ jsxs127(Fragment8, {
|
|
20946
21263
|
children: [
|
|
20947
21264
|
'"',
|
|
20948
21265
|
rootName,
|
|
20949
21266
|
'"'
|
|
20950
21267
|
]
|
|
20951
|
-
}) : /* @__PURE__ */
|
|
21268
|
+
}) : /* @__PURE__ */ jsx136(Fragment8, {
|
|
20952
21269
|
children: rootName
|
|
20953
|
-
}) : null : KeyRenderer.when(downstreamProps) ? /* @__PURE__ */
|
|
21270
|
+
}) : null : KeyRenderer.when(downstreamProps) ? /* @__PURE__ */ jsx136(KeyRenderer, {
|
|
20954
21271
|
...downstreamProps
|
|
20955
|
-
}) : nestedIndex === void 0 && (isNumberKey ? /* @__PURE__ */
|
|
21272
|
+
}) : nestedIndex === void 0 && (isNumberKey ? /* @__PURE__ */ jsx136(Box11, {
|
|
20956
21273
|
component: "span",
|
|
20957
21274
|
style: {
|
|
20958
21275
|
color: numberKeyColor,
|
|
20959
21276
|
userSelect: isNumberKey ? "none" : "auto"
|
|
20960
21277
|
},
|
|
20961
21278
|
children: key
|
|
20962
|
-
}) : quotesOnKeys ? /* @__PURE__ */
|
|
21279
|
+
}) : quotesOnKeys ? /* @__PURE__ */ jsxs127(Fragment8, {
|
|
20963
21280
|
children: [
|
|
20964
21281
|
'"',
|
|
20965
21282
|
key,
|
|
20966
21283
|
'"'
|
|
20967
21284
|
]
|
|
20968
|
-
}) : /* @__PURE__ */
|
|
21285
|
+
}) : /* @__PURE__ */ jsx136(Fragment8, {
|
|
20969
21286
|
children: key
|
|
20970
21287
|
}))
|
|
20971
21288
|
}),
|
|
20972
|
-
isRoot ? rootName !== false && /* @__PURE__ */
|
|
21289
|
+
isRoot ? rootName !== false && /* @__PURE__ */ jsx136(DataBox, {
|
|
20973
21290
|
className: "data-key-colon",
|
|
20974
21291
|
sx: {
|
|
20975
21292
|
mr: 0.5
|
|
20976
21293
|
},
|
|
20977
21294
|
children: ":"
|
|
20978
|
-
}) : nestedIndex === void 0 && /* @__PURE__ */
|
|
21295
|
+
}) : nestedIndex === void 0 && /* @__PURE__ */ jsx136(DataBox, {
|
|
20979
21296
|
className: "data-key-colon",
|
|
20980
21297
|
sx: {
|
|
20981
21298
|
mr: 0.5,
|
|
@@ -20986,29 +21303,29 @@ var DataKeyPair = (props) => {
|
|
|
20986
21303
|
},
|
|
20987
21304
|
children: ":"
|
|
20988
21305
|
}),
|
|
20989
|
-
PreComponent && /* @__PURE__ */
|
|
21306
|
+
PreComponent && /* @__PURE__ */ jsx136(PreComponent, {
|
|
20990
21307
|
...downstreamProps
|
|
20991
21308
|
}),
|
|
20992
21309
|
isHover && expandable && inspect && actionIcons
|
|
20993
21310
|
]
|
|
20994
21311
|
}),
|
|
20995
|
-
editing && editable ? Editor && /* @__PURE__ */
|
|
21312
|
+
editing && editable ? Editor && /* @__PURE__ */ jsx136(Editor, {
|
|
20996
21313
|
path,
|
|
20997
21314
|
value: tempValue,
|
|
20998
21315
|
setValue: setTempValue,
|
|
20999
21316
|
abortEditing,
|
|
21000
21317
|
commitEditing
|
|
21001
|
-
}) : Component ? /* @__PURE__ */
|
|
21318
|
+
}) : Component ? /* @__PURE__ */ jsx136(Component, {
|
|
21002
21319
|
...downstreamProps
|
|
21003
|
-
}) : /* @__PURE__ */
|
|
21320
|
+
}) : /* @__PURE__ */ jsx136(Box11, {
|
|
21004
21321
|
component: "span",
|
|
21005
21322
|
className: "data-value-fallback",
|
|
21006
21323
|
children: "fallback: ".concat(value)
|
|
21007
21324
|
}),
|
|
21008
|
-
PostComponent && /* @__PURE__ */
|
|
21325
|
+
PostComponent && /* @__PURE__ */ jsx136(PostComponent, {
|
|
21009
21326
|
...downstreamProps
|
|
21010
21327
|
}),
|
|
21011
|
-
!last && displayComma && /* @__PURE__ */
|
|
21328
|
+
!last && displayComma && /* @__PURE__ */ jsx136(DataBox, {
|
|
21012
21329
|
children: ","
|
|
21013
21330
|
}),
|
|
21014
21331
|
isHover && expandable && !inspect && actionIcons,
|
|
@@ -21019,7 +21336,7 @@ var DataKeyPair = (props) => {
|
|
|
21019
21336
|
};
|
|
21020
21337
|
var query = "(prefers-color-scheme: dark)";
|
|
21021
21338
|
function useThemeDetector() {
|
|
21022
|
-
const [isDark, setIsDark] =
|
|
21339
|
+
const [isDark, setIsDark] = useState13(false);
|
|
21023
21340
|
useEffect17(() => {
|
|
21024
21341
|
const listener = (e2) => setIsDark(e2.matches);
|
|
21025
21342
|
setIsDark(window.matchMedia(query).matches);
|
|
@@ -21128,7 +21445,7 @@ var JsonViewerInner = (props) => {
|
|
|
21128
21445
|
const onMouseLeave = useCallback9(() => setHover(null), [
|
|
21129
21446
|
setHover
|
|
21130
21447
|
]);
|
|
21131
|
-
return /* @__PURE__ */
|
|
21448
|
+
return /* @__PURE__ */ jsx136(Paper, {
|
|
21132
21449
|
elevation: 0,
|
|
21133
21450
|
className: clsx(themeCls, props.className),
|
|
21134
21451
|
style: props.style,
|
|
@@ -21139,7 +21456,7 @@ var JsonViewerInner = (props) => {
|
|
|
21139
21456
|
...props.sx
|
|
21140
21457
|
},
|
|
21141
21458
|
onMouseLeave,
|
|
21142
|
-
children: /* @__PURE__ */
|
|
21459
|
+
children: /* @__PURE__ */ jsx136(DataKeyPair, {
|
|
21143
21460
|
value,
|
|
21144
21461
|
prevValue,
|
|
21145
21462
|
path: emptyPath,
|
|
@@ -21191,13 +21508,13 @@ var JsonViewer = function JsonViewer2(props) {
|
|
|
21191
21508
|
};
|
|
21192
21509
|
const jsonViewerStore = useMemo7(() => createJsonViewerStore(props), []);
|
|
21193
21510
|
const typeRegistryStore = useMemo7(() => createTypeRegistryStore(), []);
|
|
21194
|
-
return /* @__PURE__ */
|
|
21511
|
+
return /* @__PURE__ */ jsx136(ThemeProvider, {
|
|
21195
21512
|
theme,
|
|
21196
|
-
children: /* @__PURE__ */
|
|
21513
|
+
children: /* @__PURE__ */ jsx136(TypeRegistryStoreContext.Provider, {
|
|
21197
21514
|
value: typeRegistryStore,
|
|
21198
|
-
children: /* @__PURE__ */
|
|
21515
|
+
children: /* @__PURE__ */ jsx136(JsonViewerStoreContext.Provider, {
|
|
21199
21516
|
value: jsonViewerStore,
|
|
21200
|
-
children: /* @__PURE__ */
|
|
21517
|
+
children: /* @__PURE__ */ jsx136(JsonViewerInner, {
|
|
21201
21518
|
...mixedProps
|
|
21202
21519
|
})
|
|
21203
21520
|
})
|
|
@@ -21207,7 +21524,7 @@ var JsonViewer = function JsonViewer2(props) {
|
|
|
21207
21524
|
|
|
21208
21525
|
// src/components/event-details/payload-viewer.tsx
|
|
21209
21526
|
import { memo as memo10 } from "react";
|
|
21210
|
-
import { jsx as
|
|
21527
|
+
import { jsx as jsx137 } from "react/jsx-runtime";
|
|
21211
21528
|
function tryParseJson(value) {
|
|
21212
21529
|
if (typeof value !== "string") {
|
|
21213
21530
|
return value;
|
|
@@ -21220,7 +21537,7 @@ function tryParseJson(value) {
|
|
|
21220
21537
|
}
|
|
21221
21538
|
var PayloadViewer = memo10(({ sx, testId, value }) => {
|
|
21222
21539
|
const theme = useTheme3();
|
|
21223
|
-
return /* @__PURE__ */
|
|
21540
|
+
return /* @__PURE__ */ jsx137(Box12, { "data-testid": testId, sx: { backgroundColor: "background.default", borderRadius: 1, fontSize: 12, overflow: "auto", p: 1, ...sx }, children: /* @__PURE__ */ jsx137(
|
|
21224
21541
|
JsonViewer,
|
|
21225
21542
|
{
|
|
21226
21543
|
displayDataTypes: false,
|
|
@@ -21234,14 +21551,14 @@ var PayloadViewer = memo10(({ sx, testId, value }) => {
|
|
|
21234
21551
|
});
|
|
21235
21552
|
|
|
21236
21553
|
// src/components/event-details/event-detail.tsx
|
|
21237
|
-
import { Fragment as
|
|
21238
|
-
var DetailRow2 = ({ content, label }) => /* @__PURE__ */
|
|
21239
|
-
/* @__PURE__ */
|
|
21240
|
-
/* @__PURE__ */
|
|
21554
|
+
import { Fragment as Fragment9, jsx as jsx138, jsxs as jsxs128 } from "react/jsx-runtime";
|
|
21555
|
+
var DetailRow2 = ({ content, label }) => /* @__PURE__ */ jsxs128(Box13, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr", mb: 0.5 }, children: [
|
|
21556
|
+
/* @__PURE__ */ jsx138(Typography9, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: label }),
|
|
21557
|
+
/* @__PURE__ */ jsx138(Box13, { children: typeof content === "string" ? /* @__PURE__ */ jsx138(Typography9, { sx: { color: "text.primary", whiteSpace: "pre-wrap" }, variant: "caption", children: content }) : content })
|
|
21241
21558
|
] });
|
|
21242
21559
|
var EventMessage = ({ event }) => {
|
|
21243
|
-
const [isOpen, setIsOpen] =
|
|
21244
|
-
const [isOverflowing, setIsOverflowing] =
|
|
21560
|
+
const [isOpen, setIsOpen] = useState14(false);
|
|
21561
|
+
const [isOverflowing, setIsOverflowing] = useState14(false);
|
|
21245
21562
|
const textReference = useRef12(null);
|
|
21246
21563
|
const parsedMessage = useMemo8(() => parseEventMessage(event), [event]);
|
|
21247
21564
|
const isIAMPolicyEvent = useMemo8(
|
|
@@ -21269,9 +21586,9 @@ var EventMessage = ({ event }) => {
|
|
|
21269
21586
|
() => isOverflowing || hasAdditionalContent,
|
|
21270
21587
|
[isOverflowing, hasAdditionalContent]
|
|
21271
21588
|
);
|
|
21272
|
-
return /* @__PURE__ */
|
|
21273
|
-
/* @__PURE__ */
|
|
21274
|
-
Boolean(shouldShowToggle) && /* @__PURE__ */
|
|
21589
|
+
return /* @__PURE__ */ jsxs128(Box13, { sx: { display: "flex", flexDirection: "column" }, children: [
|
|
21590
|
+
/* @__PURE__ */ jsxs128(Box13, { sx: { alignItems: "center", display: "flex" }, children: [
|
|
21591
|
+
Boolean(shouldShowToggle) && /* @__PURE__ */ jsx138(
|
|
21275
21592
|
IconButton4,
|
|
21276
21593
|
{
|
|
21277
21594
|
onClick: () => {
|
|
@@ -21279,11 +21596,11 @@ var EventMessage = ({ event }) => {
|
|
|
21279
21596
|
},
|
|
21280
21597
|
size: "small",
|
|
21281
21598
|
sx: { mr: 1, p: 0 },
|
|
21282
|
-
children: isOpen ? /* @__PURE__ */
|
|
21599
|
+
children: isOpen ? /* @__PURE__ */ jsx138(KeyboardArrowDown, { sx: { fontSize: 16 } }) : /* @__PURE__ */ jsx138(KeyboardArrowRight, { sx: { fontSize: 16 } })
|
|
21283
21600
|
}
|
|
21284
21601
|
),
|
|
21285
|
-
/* @__PURE__ */
|
|
21286
|
-
|
|
21602
|
+
/* @__PURE__ */ jsx138(
|
|
21603
|
+
Typography9,
|
|
21287
21604
|
{
|
|
21288
21605
|
ref: textReference,
|
|
21289
21606
|
sx: {
|
|
@@ -21300,12 +21617,12 @@ var EventMessage = ({ event }) => {
|
|
|
21300
21617
|
}
|
|
21301
21618
|
)
|
|
21302
21619
|
] }),
|
|
21303
|
-
isOpen && /* @__PURE__ */
|
|
21304
|
-
Boolean(parsedMessage.message) && /* @__PURE__ */
|
|
21305
|
-
Boolean(parsedMessage.details) && /* @__PURE__ */
|
|
21620
|
+
isOpen && /* @__PURE__ */ jsx138(Box13, { sx: { borderColor: "divider", borderLeft: "2px solid", ml: 1, mt: 0.5, pl: 1.5, py: 0.5 }, children: isIAMPolicyEvent ? /* @__PURE__ */ jsx138(IAMEventDetail, { event }) : /* @__PURE__ */ jsxs128(Fragment9, { children: [
|
|
21621
|
+
Boolean(parsedMessage.message) && /* @__PURE__ */ jsx138(DetailRow2, { content: parsedMessage.message, label: "Message" }),
|
|
21622
|
+
Boolean(parsedMessage.details) && /* @__PURE__ */ jsx138(
|
|
21306
21623
|
DetailRow2,
|
|
21307
21624
|
{
|
|
21308
|
-
content: /* @__PURE__ */
|
|
21625
|
+
content: /* @__PURE__ */ jsx138(PayloadViewer, { sx: { px: 0 }, value: tryParseJson(parsedMessage.details) }),
|
|
21309
21626
|
label: "Details"
|
|
21310
21627
|
}
|
|
21311
21628
|
)
|
|
@@ -21338,15 +21655,15 @@ var EventDetail = ({
|
|
|
21338
21655
|
type
|
|
21339
21656
|
}) => {
|
|
21340
21657
|
if (type === "permission") {
|
|
21341
|
-
return /* @__PURE__ */
|
|
21658
|
+
return /* @__PURE__ */ jsx138(IAMPermissionDetail, { events, spanStatusCode });
|
|
21342
21659
|
}
|
|
21343
21660
|
const eventLevel = getEventLevelFromGroup(type);
|
|
21344
|
-
return /* @__PURE__ */
|
|
21345
|
-
/* @__PURE__ */
|
|
21346
|
-
/* @__PURE__ */
|
|
21347
|
-
/* @__PURE__ */
|
|
21661
|
+
return /* @__PURE__ */ jsxs128(Box13, { children: [
|
|
21662
|
+
/* @__PURE__ */ jsxs128(Box13, { sx: { alignItems: "center", display: "flex", mb: 0.5 }, children: [
|
|
21663
|
+
/* @__PURE__ */ jsx138(StatusIcon2, { errorLevel: eventLevel }),
|
|
21664
|
+
/* @__PURE__ */ jsx138(Typography9, { color: "text.secondary", sx: { fontWeight: 600, ml: 0.5 }, variant: "caption", children: displayText })
|
|
21348
21665
|
] }),
|
|
21349
|
-
/* @__PURE__ */
|
|
21666
|
+
/* @__PURE__ */ jsx138(Box13, { children: events.map((event) => /* @__PURE__ */ jsx138(Box13, { sx: { maxWidth: "100%", mb: 0.5 }, children: /* @__PURE__ */ jsx138(EventMessage, { event }) }, `${event.span_id}-${event.event_id}`)) })
|
|
21350
21667
|
] });
|
|
21351
21668
|
};
|
|
21352
21669
|
|
|
@@ -31303,9 +31620,9 @@ var QueryStatus = {
|
|
|
31303
31620
|
};
|
|
31304
31621
|
|
|
31305
31622
|
// src/components/event-details/lambda-invoke-logs-section.tsx
|
|
31306
|
-
import { Box as
|
|
31307
|
-
import { useEffect as useEffect19, useMemo as useMemo9, useRef as useRef13, useState as
|
|
31308
|
-
import { jsx as
|
|
31623
|
+
import { Box as Box14, CircularProgress as CircularProgress3, Stack as Stack3, Typography as Typography10 } from "@mui/material";
|
|
31624
|
+
import { useEffect as useEffect19, useMemo as useMemo9, useRef as useRef13, useState as useState15 } from "react";
|
|
31625
|
+
import { jsx as jsx139, jsxs as jsxs129 } from "react/jsx-runtime";
|
|
31309
31626
|
var POLL_INTERVAL_MS2 = 1e3;
|
|
31310
31627
|
async function pollQueryResults(client, queryId) {
|
|
31311
31628
|
return client.send(new GetQueryResultsCommand({ queryId }));
|
|
@@ -31333,9 +31650,9 @@ function useCloudWatchLogsClient(region) {
|
|
|
31333
31650
|
return client;
|
|
31334
31651
|
}
|
|
31335
31652
|
function useLambdaInvokeLogs(functionName2, requestId, region, startTimeNano, endTimeNano) {
|
|
31336
|
-
const [loading, setLoading] =
|
|
31337
|
-
const [logs, setLogs] =
|
|
31338
|
-
const [error, setError] =
|
|
31653
|
+
const [loading, setLoading] = useState15(true);
|
|
31654
|
+
const [logs, setLogs] = useState15([]);
|
|
31655
|
+
const [error, setError] = useState15();
|
|
31339
31656
|
const pollTimerRef = useRef13(null);
|
|
31340
31657
|
const cloudWatchLogs = useCloudWatchLogsClient(region);
|
|
31341
31658
|
useEffect19(() => {
|
|
@@ -31395,30 +31712,30 @@ function useLambdaInvokeLogs(functionName2, requestId, region, startTimeNano, en
|
|
|
31395
31712
|
var LambdaInvokeLogsSection = ({ endTimeNano, functionName: functionName2, region, requestId, startTimeNano }) => {
|
|
31396
31713
|
const { error, loading, logs } = useLambdaInvokeLogs(functionName2, requestId, region, startTimeNano, endTimeNano);
|
|
31397
31714
|
if (loading) {
|
|
31398
|
-
return /* @__PURE__ */
|
|
31399
|
-
/* @__PURE__ */
|
|
31400
|
-
/* @__PURE__ */
|
|
31715
|
+
return /* @__PURE__ */ jsxs129(Stack3, { alignItems: "center", direction: "row", spacing: 1, children: [
|
|
31716
|
+
/* @__PURE__ */ jsx139(CircularProgress3, { size: 14 }),
|
|
31717
|
+
/* @__PURE__ */ jsx139(Typography10, { color: "text.secondary", variant: "body2", children: "Loading logs\u2026" })
|
|
31401
31718
|
] });
|
|
31402
31719
|
}
|
|
31403
31720
|
if (error !== void 0) {
|
|
31404
|
-
return /* @__PURE__ */
|
|
31721
|
+
return /* @__PURE__ */ jsx139(Typography10, { color: "error", variant: "body2", children: error.message });
|
|
31405
31722
|
}
|
|
31406
31723
|
if (logs.length === 0) {
|
|
31407
|
-
return /* @__PURE__ */
|
|
31724
|
+
return /* @__PURE__ */ jsx139(Typography10, { color: "text.secondary", variant: "body2", children: "No logs found for this invocation." });
|
|
31408
31725
|
}
|
|
31409
|
-
return /* @__PURE__ */
|
|
31726
|
+
return /* @__PURE__ */ jsx139(Box14, { sx: { backgroundColor: (theme) => theme.palette.background.default, borderRadius: 1, p: 1 }, children: /* @__PURE__ */ jsx139("pre", { style: { margin: 0, overflow: "auto" }, children: logs.map((log) => /* @__PURE__ */ jsx139(Typography10, { variant: "body2", children: `[${log.timestamp}] ${log.message}` }, log.ptr)) }) });
|
|
31410
31727
|
};
|
|
31411
31728
|
|
|
31412
31729
|
// src/components/event-details/toggle-section.tsx
|
|
31413
31730
|
import { KeyboardArrowDown as KeyboardArrowDown2, KeyboardArrowRight as KeyboardArrowRight2 } from "@mui/icons-material";
|
|
31414
|
-
import { Box as
|
|
31415
|
-
import { useState as
|
|
31416
|
-
import { jsx as
|
|
31731
|
+
import { Box as Box15, Typography as Typography11 } from "@mui/material";
|
|
31732
|
+
import { useState as useState16 } from "react";
|
|
31733
|
+
import { jsx as jsx140, jsxs as jsxs130 } from "react/jsx-runtime";
|
|
31417
31734
|
var ToggleSection = ({ action, children, headline, initialOpen = true }) => {
|
|
31418
|
-
const [isOpen, setIsOpen] =
|
|
31419
|
-
return /* @__PURE__ */
|
|
31420
|
-
/* @__PURE__ */
|
|
31421
|
-
|
|
31735
|
+
const [isOpen, setIsOpen] = useState16(initialOpen);
|
|
31736
|
+
return /* @__PURE__ */ jsxs130(Box15, { sx: { mt: 4 }, children: [
|
|
31737
|
+
/* @__PURE__ */ jsxs130(
|
|
31738
|
+
Box15,
|
|
31422
31739
|
{
|
|
31423
31740
|
onClick: () => {
|
|
31424
31741
|
setIsOpen(!isOpen);
|
|
@@ -31431,8 +31748,8 @@ var ToggleSection = ({ action, children, headline, initialOpen = true }) => {
|
|
|
31431
31748
|
mb: 1
|
|
31432
31749
|
},
|
|
31433
31750
|
children: [
|
|
31434
|
-
/* @__PURE__ */
|
|
31435
|
-
|
|
31751
|
+
/* @__PURE__ */ jsxs130(
|
|
31752
|
+
Box15,
|
|
31436
31753
|
{
|
|
31437
31754
|
role: "button",
|
|
31438
31755
|
sx: {
|
|
@@ -31441,23 +31758,23 @@ var ToggleSection = ({ action, children, headline, initialOpen = true }) => {
|
|
|
31441
31758
|
gap: 1
|
|
31442
31759
|
},
|
|
31443
31760
|
children: [
|
|
31444
|
-
/* @__PURE__ */
|
|
31445
|
-
isOpen ? /* @__PURE__ */
|
|
31761
|
+
/* @__PURE__ */ jsx140(Typography11, { sx: { fontWeight: 600 }, variant: "subtitle2", children: headline }),
|
|
31762
|
+
isOpen ? /* @__PURE__ */ jsx140(KeyboardArrowDown2, { sx: { color: "text.secondary", height: 20, width: 20 } }) : /* @__PURE__ */ jsx140(KeyboardArrowRight2, { sx: { color: "text.secondary", height: 20, width: 20 } })
|
|
31446
31763
|
]
|
|
31447
31764
|
}
|
|
31448
31765
|
),
|
|
31449
|
-
action !== false && /* @__PURE__ */
|
|
31766
|
+
action !== false && /* @__PURE__ */ jsx140(Box15, { onClick: (event) => {
|
|
31450
31767
|
event.stopPropagation();
|
|
31451
31768
|
}, children: action })
|
|
31452
31769
|
]
|
|
31453
31770
|
}
|
|
31454
31771
|
),
|
|
31455
|
-
isOpen && /* @__PURE__ */
|
|
31772
|
+
isOpen && /* @__PURE__ */ jsx140(Box15, { children })
|
|
31456
31773
|
] });
|
|
31457
31774
|
};
|
|
31458
31775
|
|
|
31459
31776
|
// src/components/event-details/event-details.tsx
|
|
31460
|
-
import { Fragment as
|
|
31777
|
+
import { Fragment as Fragment10, jsx as jsx141, jsxs as jsxs131 } from "react/jsx-runtime";
|
|
31461
31778
|
var checkIsLambdaInvoke = (span) => {
|
|
31462
31779
|
if (span.service_name !== "lambda") {
|
|
31463
31780
|
return false;
|
|
@@ -31476,9 +31793,9 @@ var EventDetails = ({ onClose, selectedEvent }) => {
|
|
|
31476
31793
|
() => getEventGroupsByType(selectedEvent?.events ?? []),
|
|
31477
31794
|
[selectedEvent?.events]
|
|
31478
31795
|
);
|
|
31479
|
-
const [parseNestedJson, setParseNestedJson] =
|
|
31796
|
+
const [parseNestedJson, setParseNestedJson] = useState17(true);
|
|
31480
31797
|
if (!selectedEvent) {
|
|
31481
|
-
return /* @__PURE__ */
|
|
31798
|
+
return /* @__PURE__ */ jsx141(Box16, { sx: { p: 3, textAlign: "center" }, children: /* @__PURE__ */ jsx141(Typography12, { color: "text.secondary", variant: "body2", children: "Select an operation to view graph" }) });
|
|
31482
31799
|
}
|
|
31483
31800
|
const isLambdaInvoke = checkIsLambdaInvoke(selectedEvent);
|
|
31484
31801
|
const isSqsSendMessage = checkIsSqsSendMessage(selectedEvent);
|
|
@@ -31504,9 +31821,9 @@ var EventDetails = ({ onClose, selectedEvent }) => {
|
|
|
31504
31821
|
const exceptionPayload = tryParseJson(selectedEvent.attributes?.["localstack.aws.service.exception"]);
|
|
31505
31822
|
const hasPayloads = requestPayload !== void 0 || responsePayload !== void 0 || exceptionPayload !== void 0 || isResponseSuppressed;
|
|
31506
31823
|
const duration = selectedEvent.end_time_unix_nano ? ((BigInt(selectedEvent.end_time_unix_nano) - BigInt(selectedEvent.start_time_unix_nano)) / BigInt("1000000")).toString() : void 0;
|
|
31507
|
-
return /* @__PURE__ */
|
|
31508
|
-
/* @__PURE__ */
|
|
31509
|
-
|
|
31824
|
+
return /* @__PURE__ */ jsxs131(Box16, { "data-testid": EVENT_DETAILS_TEST_ID, sx: { display: "flex", flexDirection: "column", height: "100%" }, children: [
|
|
31825
|
+
/* @__PURE__ */ jsxs131(
|
|
31826
|
+
Box16,
|
|
31510
31827
|
{
|
|
31511
31828
|
sx: {
|
|
31512
31829
|
alignItems: "center",
|
|
@@ -31518,90 +31835,90 @@ var EventDetails = ({ onClose, selectedEvent }) => {
|
|
|
31518
31835
|
py: 1
|
|
31519
31836
|
},
|
|
31520
31837
|
children: [
|
|
31521
|
-
/* @__PURE__ */
|
|
31522
|
-
onClose && /* @__PURE__ */
|
|
31838
|
+
/* @__PURE__ */ jsx141(Box16, { children: /* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600 }, variant: "h6", children: "Operation Details" }) }),
|
|
31839
|
+
onClose && /* @__PURE__ */ jsx141(IconButton5, { "data-testid": EVENT_DETAILS_CLOSE_BUTTON_TEST_ID, onClick: onClose, size: "small", children: /* @__PURE__ */ jsx141(Close3, {}) })
|
|
31523
31840
|
]
|
|
31524
31841
|
}
|
|
31525
31842
|
),
|
|
31526
|
-
/* @__PURE__ */
|
|
31527
|
-
/* @__PURE__ */
|
|
31528
|
-
/* @__PURE__ */
|
|
31529
|
-
/* @__PURE__ */
|
|
31530
|
-
/* @__PURE__ */
|
|
31531
|
-
/* @__PURE__ */
|
|
31532
|
-
/* @__PURE__ */
|
|
31533
|
-
/* @__PURE__ */
|
|
31843
|
+
/* @__PURE__ */ jsx141(Box16, { sx: { flexGrow: 1, overflow: "auto", p: 2 }, children: /* @__PURE__ */ jsxs131(Stack4, { spacing: 2, children: [
|
|
31844
|
+
/* @__PURE__ */ jsx141(ToggleSection, { headline: "Basic Information", children: /* @__PURE__ */ jsxs131(Stack4, { "data-testid": EVENT_DETAILS_SECTION_BASIC_INFORMATION_TEST_ID, spacing: 1, children: [
|
|
31845
|
+
/* @__PURE__ */ jsxs131(Box16, { sx: { display: "grid", gap: 2, gridTemplateColumns: "1.3fr 1fr" }, children: [
|
|
31846
|
+
/* @__PURE__ */ jsxs131(Box16, { children: [
|
|
31847
|
+
/* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600 }, variant: "caption", children: "Service" }),
|
|
31848
|
+
/* @__PURE__ */ jsxs131(Stack4, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
|
|
31849
|
+
/* @__PURE__ */ jsx141(Typography12, { "data-testid": EVENT_DETAILS_SERVICE_NAME_TEST_ID, variant: "body2", children: getServiceDisplayName(selectedEvent.service_name) }),
|
|
31850
|
+
/* @__PURE__ */ jsx141(CopyButton, { value: getServiceDisplayName(selectedEvent.service_name) })
|
|
31534
31851
|
] })
|
|
31535
31852
|
] }),
|
|
31536
|
-
/* @__PURE__ */
|
|
31537
|
-
/* @__PURE__ */
|
|
31538
|
-
/* @__PURE__ */
|
|
31539
|
-
/* @__PURE__ */
|
|
31540
|
-
/* @__PURE__ */
|
|
31853
|
+
/* @__PURE__ */ jsxs131(Box16, { children: [
|
|
31854
|
+
/* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600 }, variant: "caption", children: "Action" }),
|
|
31855
|
+
/* @__PURE__ */ jsxs131(Stack4, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
|
|
31856
|
+
/* @__PURE__ */ jsx141(Typography12, { "data-testid": EVENT_DETAILS_OPERATION_NAME_TEST_ID, variant: "body2", children: selectedEvent.operation_name }),
|
|
31857
|
+
/* @__PURE__ */ jsx141(CopyButton, { value: selectedEvent.operation_name })
|
|
31541
31858
|
] })
|
|
31542
31859
|
] })
|
|
31543
31860
|
] }),
|
|
31544
|
-
/* @__PURE__ */
|
|
31545
|
-
/* @__PURE__ */
|
|
31546
|
-
/* @__PURE__ */
|
|
31547
|
-
/* @__PURE__ */
|
|
31548
|
-
/* @__PURE__ */
|
|
31549
|
-
/* @__PURE__ */
|
|
31861
|
+
/* @__PURE__ */ jsxs131(Box16, { sx: cfnResourceType ? { display: "grid", gap: 2, gridTemplateColumns: "1.3fr 1fr" } : void 0, children: [
|
|
31862
|
+
/* @__PURE__ */ jsxs131(Box16, { children: [
|
|
31863
|
+
/* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600 }, variant: "caption", children: "Resource" }),
|
|
31864
|
+
/* @__PURE__ */ jsxs131(Stack4, { alignItems: "center", "data-testid": EVENT_DETAILS_RESOURCE_NAME_TEST_ID, direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
|
|
31865
|
+
/* @__PURE__ */ jsx141(Typography12, { variant: "body2", children: selectedEvent.resource_name }),
|
|
31866
|
+
/* @__PURE__ */ jsx141(CopyButton, { value: selectedEvent.resource_name })
|
|
31550
31867
|
] })
|
|
31551
31868
|
] }),
|
|
31552
|
-
Boolean(cfnResourceType) && /* @__PURE__ */
|
|
31553
|
-
/* @__PURE__ */
|
|
31554
|
-
/* @__PURE__ */
|
|
31555
|
-
/* @__PURE__ */
|
|
31556
|
-
/* @__PURE__ */
|
|
31869
|
+
Boolean(cfnResourceType) && /* @__PURE__ */ jsxs131(Box16, { children: [
|
|
31870
|
+
/* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600 }, variant: "caption", children: "Resource Type" }),
|
|
31871
|
+
/* @__PURE__ */ jsxs131(Stack4, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
|
|
31872
|
+
/* @__PURE__ */ jsx141(Typography12, { "data-testid": EVENT_DETAILS_CFN_RESOURCE_TYPE_TEST_ID, variant: "body2", children: cfnResourceType }),
|
|
31873
|
+
/* @__PURE__ */ jsx141(CopyButton, { value: cfnResourceType })
|
|
31557
31874
|
] })
|
|
31558
31875
|
] })
|
|
31559
31876
|
] }),
|
|
31560
|
-
Boolean(resourceArn) && /* @__PURE__ */
|
|
31561
|
-
/* @__PURE__ */
|
|
31562
|
-
/* @__PURE__ */
|
|
31563
|
-
/* @__PURE__ */
|
|
31564
|
-
/* @__PURE__ */
|
|
31877
|
+
Boolean(resourceArn) && /* @__PURE__ */ jsxs131(Box16, { children: [
|
|
31878
|
+
/* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600 }, variant: "caption", children: "Resource ARN" }),
|
|
31879
|
+
/* @__PURE__ */ jsxs131(Stack4, { alignItems: "center", "data-testid": EVENT_DETAILS_RESOURCE_ARN_TEST_ID, direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
|
|
31880
|
+
/* @__PURE__ */ jsx141(Typography12, { variant: "body2", children: resourceArn }),
|
|
31881
|
+
/* @__PURE__ */ jsx141(CopyButton, { value: resourceArn })
|
|
31565
31882
|
] })
|
|
31566
31883
|
] }),
|
|
31567
|
-
/* @__PURE__ */
|
|
31568
|
-
/* @__PURE__ */
|
|
31569
|
-
/* @__PURE__ */
|
|
31570
|
-
/* @__PURE__ */
|
|
31571
|
-
/* @__PURE__ */
|
|
31572
|
-
/* @__PURE__ */
|
|
31884
|
+
/* @__PURE__ */ jsxs131(Box16, { sx: { display: "grid", gap: 1, gridTemplateColumns: "1.3fr 1fr" }, children: [
|
|
31885
|
+
/* @__PURE__ */ jsxs131(Box16, { children: [
|
|
31886
|
+
/* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600 }, variant: "caption", children: "Account" }),
|
|
31887
|
+
/* @__PURE__ */ jsxs131(Stack4, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
|
|
31888
|
+
/* @__PURE__ */ jsx141(Typography12, { "data-testid": EVENT_DETAILS_ACCOUNT_TEST_ID, variant: "body2", children: selectedEvent.account_id }),
|
|
31889
|
+
/* @__PURE__ */ jsx141(CopyButton, { value: selectedEvent.account_id })
|
|
31573
31890
|
] })
|
|
31574
31891
|
] }),
|
|
31575
|
-
/* @__PURE__ */
|
|
31576
|
-
/* @__PURE__ */
|
|
31577
|
-
/* @__PURE__ */
|
|
31578
|
-
/* @__PURE__ */
|
|
31579
|
-
/* @__PURE__ */
|
|
31892
|
+
/* @__PURE__ */ jsxs131(Box16, { children: [
|
|
31893
|
+
/* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600 }, variant: "caption", children: "Region" }),
|
|
31894
|
+
/* @__PURE__ */ jsxs131(Stack4, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
|
|
31895
|
+
/* @__PURE__ */ jsx141(Typography12, { "data-testid": EVENT_DETAILS_REGION_TEST_ID, variant: "body2", children: selectedEvent.region }),
|
|
31896
|
+
/* @__PURE__ */ jsx141(CopyButton, { value: selectedEvent.region })
|
|
31580
31897
|
] })
|
|
31581
31898
|
] })
|
|
31582
31899
|
] }),
|
|
31583
|
-
/* @__PURE__ */
|
|
31584
|
-
/* @__PURE__ */
|
|
31585
|
-
/* @__PURE__ */
|
|
31586
|
-
/* @__PURE__ */
|
|
31587
|
-
/* @__PURE__ */
|
|
31588
|
-
/* @__PURE__ */
|
|
31900
|
+
/* @__PURE__ */ jsxs131(Box16, { sx: { display: "grid", gap: 1, gridTemplateColumns: duration === void 0 ? "1fr" : "1.3fr 1fr" }, children: [
|
|
31901
|
+
/* @__PURE__ */ jsxs131(Box16, { children: [
|
|
31902
|
+
/* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600 }, variant: "caption", children: "Start Time" }),
|
|
31903
|
+
/* @__PURE__ */ jsxs131(Stack4, { alignItems: "center", "data-testid": EVENT_DETAILS_START_TIME_TEST_ID, direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
|
|
31904
|
+
/* @__PURE__ */ jsx141(Typography12, { variant: "body2", children: /* @__PURE__ */ jsx141(ResponsiveTimestampCell, { date: unixNanoToDate(selectedEvent.start_time_unix_nano) }) }),
|
|
31905
|
+
/* @__PURE__ */ jsx141(CopyButton, { value: unixNanoToDate(selectedEvent.start_time_unix_nano)?.toISOString() })
|
|
31589
31906
|
] })
|
|
31590
31907
|
] }),
|
|
31591
|
-
duration !== void 0 && /* @__PURE__ */
|
|
31592
|
-
/* @__PURE__ */
|
|
31593
|
-
/* @__PURE__ */
|
|
31594
|
-
/* @__PURE__ */
|
|
31908
|
+
duration !== void 0 && /* @__PURE__ */ jsxs131(Box16, { children: [
|
|
31909
|
+
/* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600 }, variant: "caption", children: "Duration" }),
|
|
31910
|
+
/* @__PURE__ */ jsxs131(Stack4, { alignItems: "center", "data-testid": EVENT_DETAILS_DURATION_TEST_ID, direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
|
|
31911
|
+
/* @__PURE__ */ jsxs131(Typography12, { variant: "body2", children: [
|
|
31595
31912
|
duration,
|
|
31596
31913
|
"ms"
|
|
31597
31914
|
] }),
|
|
31598
|
-
/* @__PURE__ */
|
|
31915
|
+
/* @__PURE__ */ jsx141(CopyButton, { value: `${duration}ms` })
|
|
31599
31916
|
] })
|
|
31600
31917
|
] })
|
|
31601
31918
|
] }),
|
|
31602
|
-
/* @__PURE__ */
|
|
31603
|
-
/* @__PURE__ */
|
|
31604
|
-
/* @__PURE__ */
|
|
31919
|
+
/* @__PURE__ */ jsxs131(Box16, { children: [
|
|
31920
|
+
/* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600 }, variant: "caption", children: "Status" }),
|
|
31921
|
+
/* @__PURE__ */ jsx141(Stack4, { alignItems: "center", direction: "row", flexWrap: "wrap", gap: 1, sx: { mb: eventGroups.errors || eventGroups.warnings ? 1 : 0 }, children: /* @__PURE__ */ jsx141(
|
|
31605
31922
|
Chip3,
|
|
31606
31923
|
{
|
|
31607
31924
|
color: selectedEvent.status_code === 2 ? "error" : selectedEvent.status_code === 1 ? "success" : "default",
|
|
@@ -31612,50 +31929,50 @@ var EventDetails = ({ onClose, selectedEvent }) => {
|
|
|
31612
31929
|
) })
|
|
31613
31930
|
] })
|
|
31614
31931
|
] }) }),
|
|
31615
|
-
/* @__PURE__ */
|
|
31616
|
-
/* @__PURE__ */
|
|
31617
|
-
selectedEvent.iam_errors_suppressed && /* @__PURE__ */
|
|
31618
|
-
!selectedEvent.iam_errors_suppressed && !eventGroups.permissions && !eventGroups.errors && !eventGroups.warnings && /* @__PURE__ */
|
|
31619
|
-
eventGroups.permissions && /* @__PURE__ */
|
|
31620
|
-
eventGroups.errors && /* @__PURE__ */
|
|
31621
|
-
eventGroups.warnings && /* @__PURE__ */
|
|
31932
|
+
/* @__PURE__ */ jsx141(Divider4, {}),
|
|
31933
|
+
/* @__PURE__ */ jsxs131(ToggleSection, { headline: "Permissions", children: [
|
|
31934
|
+
selectedEvent.iam_errors_suppressed && /* @__PURE__ */ jsx141(Alert4, { "data-testid": EVENT_DETAILS_IAM_ERRORS_SUPPRESSED_TEST_ID, severity: "warning", sx: { mb: 1 }, children: "IAM errors are suppressed \u2014 upgrade your license to view" }),
|
|
31935
|
+
!selectedEvent.iam_errors_suppressed && !eventGroups.permissions && !eventGroups.errors && !eventGroups.warnings && /* @__PURE__ */ jsx141(Typography12, { color: "text.secondary", variant: "body2", children: "There is no permission information available." }),
|
|
31936
|
+
eventGroups.permissions && /* @__PURE__ */ jsx141(EventDetail, { displayText: "Permissions", events: eventGroups.permissions, spanStatusCode: selectedEvent.status_code, type: "permission" }),
|
|
31937
|
+
eventGroups.errors && /* @__PURE__ */ jsx141(EventDetail, { displayText: "Error", events: eventGroups.errors, type: "error" }),
|
|
31938
|
+
eventGroups.warnings && /* @__PURE__ */ jsx141(EventDetail, { displayText: "Warning", events: eventGroups.warnings, type: "warning" })
|
|
31622
31939
|
] }),
|
|
31623
|
-
hasPayloads && /* @__PURE__ */
|
|
31624
|
-
/* @__PURE__ */
|
|
31625
|
-
/* @__PURE__ */
|
|
31940
|
+
hasPayloads && /* @__PURE__ */ jsxs131(Fragment10, { children: [
|
|
31941
|
+
/* @__PURE__ */ jsx141(Divider4, {}),
|
|
31942
|
+
/* @__PURE__ */ jsx141(
|
|
31626
31943
|
ToggleSection,
|
|
31627
31944
|
{
|
|
31628
|
-
action: /* @__PURE__ */
|
|
31629
|
-
|
|
31945
|
+
action: /* @__PURE__ */ jsx141(
|
|
31946
|
+
FormControlLabel,
|
|
31630
31947
|
{
|
|
31631
|
-
control: /* @__PURE__ */
|
|
31948
|
+
control: /* @__PURE__ */ jsx141(Switch, { checked: !parseNestedJson, onChange: (event) => {
|
|
31632
31949
|
setParseNestedJson(!event.target.checked);
|
|
31633
31950
|
}, size: "small" }),
|
|
31634
|
-
label: /* @__PURE__ */
|
|
31951
|
+
label: /* @__PURE__ */ jsx141(Typography12, { variant: "caption", children: "View raw data" }),
|
|
31635
31952
|
sx: { mr: 0 }
|
|
31636
31953
|
}
|
|
31637
31954
|
),
|
|
31638
31955
|
headline: "Payloads",
|
|
31639
|
-
children: /* @__PURE__ */
|
|
31640
|
-
requestPayload !== void 0 && /* @__PURE__ */
|
|
31641
|
-
/* @__PURE__ */
|
|
31642
|
-
/* @__PURE__ */
|
|
31956
|
+
children: /* @__PURE__ */ jsxs131(Stack4, { spacing: 2, children: [
|
|
31957
|
+
requestPayload !== void 0 && /* @__PURE__ */ jsxs131(Box16, { children: [
|
|
31958
|
+
/* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Request" }),
|
|
31959
|
+
/* @__PURE__ */ jsx141(PayloadViewer, { testId: EVENT_DETAILS_REQUEST_PAYLOAD, value: requestPayload })
|
|
31643
31960
|
] }),
|
|
31644
|
-
(responsePayload !== void 0 || isResponseSuppressed) && /* @__PURE__ */
|
|
31645
|
-
/* @__PURE__ */
|
|
31646
|
-
isResponseSuppressed ? /* @__PURE__ */
|
|
31961
|
+
(responsePayload !== void 0 || isResponseSuppressed) && /* @__PURE__ */ jsxs131(Box16, { children: [
|
|
31962
|
+
/* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Response" }),
|
|
31963
|
+
isResponseSuppressed ? /* @__PURE__ */ jsx141(Box16, { sx: { py: 1 }, children: /* @__PURE__ */ jsx141(Alert4, { severity: "warning", sx: { mb: 1 }, children: "Response payload is available \u2014 upgrade your license to view" }) }) : /* @__PURE__ */ jsx141(PayloadViewer, { testId: EVENT_DETAILS_RESPONSE_PAYLOAD_TEST_ID, value: responsePayload })
|
|
31647
31964
|
] }),
|
|
31648
|
-
exceptionPayload !== void 0 && /* @__PURE__ */
|
|
31649
|
-
/* @__PURE__ */
|
|
31650
|
-
/* @__PURE__ */
|
|
31965
|
+
exceptionPayload !== void 0 && /* @__PURE__ */ jsxs131(Box16, { children: [
|
|
31966
|
+
/* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Exception" }),
|
|
31967
|
+
/* @__PURE__ */ jsx141(PayloadViewer, { testId: EVENT_DETAILS_EXCEPTION_PAYLOAD_TEST_ID, value: exceptionPayload })
|
|
31651
31968
|
] })
|
|
31652
31969
|
] })
|
|
31653
31970
|
}
|
|
31654
31971
|
)
|
|
31655
31972
|
] }),
|
|
31656
|
-
isLambdaInvoke && requestId !== void 0 && /* @__PURE__ */
|
|
31657
|
-
/* @__PURE__ */
|
|
31658
|
-
/* @__PURE__ */
|
|
31973
|
+
isLambdaInvoke && requestId !== void 0 && /* @__PURE__ */ jsxs131(Fragment10, { children: [
|
|
31974
|
+
/* @__PURE__ */ jsx141(Divider4, {}),
|
|
31975
|
+
/* @__PURE__ */ jsx141(ToggleSection, { headline: "Lambda Logs", children: /* @__PURE__ */ jsx141(
|
|
31659
31976
|
LambdaInvokeLogsSection,
|
|
31660
31977
|
{
|
|
31661
31978
|
endTimeNano: selectedEvent.end_time_unix_nano ?? selectedEvent.start_time_unix_nano,
|
|
@@ -31666,30 +31983,30 @@ var EventDetails = ({ onClose, selectedEvent }) => {
|
|
|
31666
31983
|
}
|
|
31667
31984
|
) })
|
|
31668
31985
|
] }),
|
|
31669
|
-
/* @__PURE__ */
|
|
31670
|
-
/* @__PURE__ */
|
|
31671
|
-
/* @__PURE__ */
|
|
31672
|
-
/* @__PURE__ */
|
|
31673
|
-
/* @__PURE__ */
|
|
31674
|
-
/* @__PURE__ */
|
|
31675
|
-
/* @__PURE__ */
|
|
31986
|
+
/* @__PURE__ */ jsx141(Divider4, {}),
|
|
31987
|
+
/* @__PURE__ */ jsx141(ToggleSection, { headline: "Advanced Information", initialOpen: false, children: /* @__PURE__ */ jsxs131(Stack4, { spacing: 1, children: [
|
|
31988
|
+
/* @__PURE__ */ jsxs131(Box16, { children: [
|
|
31989
|
+
/* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600 }, variant: "caption", children: "Span ID" }),
|
|
31990
|
+
/* @__PURE__ */ jsxs131(Stack4, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
|
|
31991
|
+
/* @__PURE__ */ jsx141(Typography12, { "data-testid": EVENT_DETAILS_SPAN_ID_TEST_ID, variant: "body2", children: selectedEvent.span_id }),
|
|
31992
|
+
/* @__PURE__ */ jsx141(CopyButton, { value: selectedEvent.span_id })
|
|
31676
31993
|
] })
|
|
31677
31994
|
] }),
|
|
31678
|
-
/* @__PURE__ */
|
|
31679
|
-
/* @__PURE__ */
|
|
31680
|
-
/* @__PURE__ */
|
|
31681
|
-
/* @__PURE__ */
|
|
31682
|
-
/* @__PURE__ */
|
|
31995
|
+
/* @__PURE__ */ jsxs131(Box16, { children: [
|
|
31996
|
+
/* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600 }, variant: "caption", children: "Trace ID" }),
|
|
31997
|
+
/* @__PURE__ */ jsxs131(Stack4, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
|
|
31998
|
+
/* @__PURE__ */ jsx141(Typography12, { "data-testid": EVENT_DETAILS_TRACE_ID_TEST_ID, variant: "body2", children: selectedEvent.trace_id }),
|
|
31999
|
+
/* @__PURE__ */ jsx141(CopyButton, { value: selectedEvent.trace_id })
|
|
31683
32000
|
] })
|
|
31684
32001
|
] }),
|
|
31685
|
-
requestId !== void 0 && /* @__PURE__ */
|
|
31686
|
-
/* @__PURE__ */
|
|
31687
|
-
/* @__PURE__ */
|
|
31688
|
-
/* @__PURE__ */
|
|
31689
|
-
/* @__PURE__ */
|
|
32002
|
+
requestId !== void 0 && /* @__PURE__ */ jsxs131(Box16, { children: [
|
|
32003
|
+
/* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600 }, variant: "caption", children: "Request ID" }),
|
|
32004
|
+
/* @__PURE__ */ jsxs131(Stack4, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
|
|
32005
|
+
/* @__PURE__ */ jsx141(Typography12, { "data-testid": EVENT_DETAILS_REQUEST_ID_TEST_ID, variant: "body2", children: requestId }),
|
|
32006
|
+
/* @__PURE__ */ jsx141(CopyButton, { value: requestId })
|
|
31690
32007
|
] })
|
|
31691
32008
|
] }),
|
|
31692
|
-
eventGroups.info && /* @__PURE__ */
|
|
32009
|
+
eventGroups.info && /* @__PURE__ */ jsx141(EventDetail, { displayText: "Info", events: eventGroups.info, type: "info" })
|
|
31693
32010
|
] }) })
|
|
31694
32011
|
] }) })
|
|
31695
32012
|
] });
|
|
@@ -31697,18 +32014,18 @@ var EventDetails = ({ onClose, selectedEvent }) => {
|
|
|
31697
32014
|
|
|
31698
32015
|
// src/components/trace-graph/trace-graph.tsx
|
|
31699
32016
|
import "@xyflow/react/dist/base.css";
|
|
31700
|
-
import { Alert as Alert5, Button as
|
|
32017
|
+
import { Alert as Alert5, Button as Button6, useTheme as useTheme6 } from "@mui/material";
|
|
31701
32018
|
import { Background, MarkerType, MiniMap, Position as Position2, ReactFlow, useEdgesState, useNodesState, useStore as useStore4 } from "@xyflow/react";
|
|
31702
|
-
import { useCallback as useCallback10, useEffect as useEffect20, useRef as useRef15, useState as
|
|
32019
|
+
import { useCallback as useCallback10, useEffect as useEffect20, useRef as useRef15, useState as useState19 } from "react";
|
|
31703
32020
|
|
|
31704
32021
|
// src/components/trace-graph/service-node.tsx
|
|
31705
|
-
import { Cancel as
|
|
31706
|
-
import { Box as
|
|
32022
|
+
import { Cancel as Cancel4, GppBad as GppBad3 } from "@mui/icons-material";
|
|
32023
|
+
import { Box as Box17, Divider as Divider5, Stack as Stack5, Tooltip as Tooltip6, Typography as Typography13, useTheme as useTheme4 } from "@mui/material";
|
|
31707
32024
|
import { Handle, Position } from "@xyflow/react";
|
|
31708
32025
|
import "@xyflow/react/dist/style.css";
|
|
31709
32026
|
import "react";
|
|
31710
|
-
import { memo as memo11, useMemo as useMemo11, useRef as useRef14, useState as
|
|
31711
|
-
import { Fragment as
|
|
32027
|
+
import { memo as memo11, useMemo as useMemo11, useRef as useRef14, useState as useState18 } from "react";
|
|
32028
|
+
import { Fragment as Fragment11, jsx as jsx142, jsxs as jsxs132 } from "react/jsx-runtime";
|
|
31712
32029
|
var handleStyle = {
|
|
31713
32030
|
backgroundColor: "white",
|
|
31714
32031
|
borderColor: "lightgray",
|
|
@@ -31716,20 +32033,20 @@ var handleStyle = {
|
|
|
31716
32033
|
};
|
|
31717
32034
|
var NodeContent = ({ event, expanded, hasPermissionEvents, isError, isWarning }) => {
|
|
31718
32035
|
const theme = useTheme4();
|
|
31719
|
-
return /* @__PURE__ */
|
|
31720
|
-
/* @__PURE__ */
|
|
31721
|
-
/* @__PURE__ */
|
|
31722
|
-
/* @__PURE__ */
|
|
32036
|
+
return /* @__PURE__ */ jsxs132(Fragment11, { children: [
|
|
32037
|
+
/* @__PURE__ */ jsx142(Handle, { position: Position.Left, style: handleStyle, type: "target" }),
|
|
32038
|
+
/* @__PURE__ */ jsx142(Handle, { position: Position.Right, style: handleStyle, type: "source" }),
|
|
32039
|
+
/* @__PURE__ */ jsxs132(
|
|
31723
32040
|
Stack5,
|
|
31724
32041
|
{
|
|
31725
32042
|
alignItems: "center",
|
|
31726
32043
|
direction: "row",
|
|
31727
32044
|
sx: { gap: "8px", pb: "2px", pt: "6px", px: "8px" },
|
|
31728
32045
|
children: [
|
|
31729
|
-
/* @__PURE__ */
|
|
31730
|
-
/* @__PURE__ */
|
|
31731
|
-
/* @__PURE__ */
|
|
31732
|
-
|
|
32046
|
+
/* @__PURE__ */ jsx142(Box17, { sx: { borderRadius: "4px", flexShrink: 0, lineHeight: 0, overflow: "hidden" }, children: /* @__PURE__ */ jsx142(AwsServiceIcon, { hideTooltip: true, service: event.service_name, size: "medium" }) }),
|
|
32047
|
+
/* @__PURE__ */ jsxs132(Stack5, { sx: expanded ? void 0 : { minWidth: 0 }, children: [
|
|
32048
|
+
/* @__PURE__ */ jsx142(
|
|
32049
|
+
Typography13,
|
|
31733
32050
|
{
|
|
31734
32051
|
noWrap: !expanded,
|
|
31735
32052
|
sx: { fontWeight: 700, lineHeight: 1.25, ...expanded && { whiteSpace: "nowrap" } },
|
|
@@ -31737,8 +32054,8 @@ var NodeContent = ({ event, expanded, hasPermissionEvents, isError, isWarning })
|
|
|
31737
32054
|
children: getServiceDisplayName(event.service_name)
|
|
31738
32055
|
}
|
|
31739
32056
|
),
|
|
31740
|
-
event.resource_name != "" && /* @__PURE__ */
|
|
31741
|
-
|
|
32057
|
+
event.resource_name != "" && /* @__PURE__ */ jsx142(
|
|
32058
|
+
Typography13,
|
|
31742
32059
|
{
|
|
31743
32060
|
color: "text.secondary",
|
|
31744
32061
|
noWrap: !expanded,
|
|
@@ -31751,16 +32068,16 @@ var NodeContent = ({ event, expanded, hasPermissionEvents, isError, isWarning })
|
|
|
31751
32068
|
]
|
|
31752
32069
|
}
|
|
31753
32070
|
),
|
|
31754
|
-
/* @__PURE__ */
|
|
31755
|
-
/* @__PURE__ */
|
|
32071
|
+
/* @__PURE__ */ jsx142(Divider5, { sx: { ml: "38px", mr: "8px", my: "5px" } }),
|
|
32072
|
+
/* @__PURE__ */ jsxs132(
|
|
31756
32073
|
Stack5,
|
|
31757
32074
|
{
|
|
31758
32075
|
alignItems: "center",
|
|
31759
32076
|
direction: "row",
|
|
31760
32077
|
sx: expanded ? { pb: "5px", pr: "8px", pt: "1px" } : { minWidth: 0, pb: "5px", pr: "8px", pt: "1px" },
|
|
31761
32078
|
children: [
|
|
31762
|
-
/* @__PURE__ */
|
|
31763
|
-
|
|
32079
|
+
/* @__PURE__ */ jsxs132(
|
|
32080
|
+
Box17,
|
|
31764
32081
|
{
|
|
31765
32082
|
sx: {
|
|
31766
32083
|
alignItems: "center",
|
|
@@ -31770,13 +32087,13 @@ var NodeContent = ({ event, expanded, hasPermissionEvents, isError, isWarning })
|
|
|
31770
32087
|
width: "38px"
|
|
31771
32088
|
},
|
|
31772
32089
|
children: [
|
|
31773
|
-
(isError || isWarning) && hasPermissionEvents && /* @__PURE__ */
|
|
31774
|
-
isError && !hasPermissionEvents && /* @__PURE__ */
|
|
32090
|
+
(isError || isWarning) && hasPermissionEvents && /* @__PURE__ */ jsx142(Tooltip6, { arrow: true, title: "Permission denied", children: /* @__PURE__ */ jsx142(GppBad3, { sx: { color: isError ? theme.palette.error.main : theme.palette.warning.main, fontSize: "16px" } }) }),
|
|
32091
|
+
isError && !hasPermissionEvents && /* @__PURE__ */ jsx142(Tooltip6, { arrow: true, title: "Error", children: /* @__PURE__ */ jsx142(Cancel4, { sx: { color: theme.palette.error.main, fontSize: "16px" } }) })
|
|
31775
32092
|
]
|
|
31776
32093
|
}
|
|
31777
32094
|
),
|
|
31778
|
-
/* @__PURE__ */
|
|
31779
|
-
|
|
32095
|
+
/* @__PURE__ */ jsx142(
|
|
32096
|
+
Typography13,
|
|
31780
32097
|
{
|
|
31781
32098
|
"data-testid": SERVICE_NODE_OPERATION_NAME_TEST_ID,
|
|
31782
32099
|
noWrap: !expanded,
|
|
@@ -31792,7 +32109,7 @@ var NodeContent = ({ event, expanded, hasPermissionEvents, isError, isWarning })
|
|
|
31792
32109
|
};
|
|
31793
32110
|
var ServiceNode = memo11(({ data, selected }) => {
|
|
31794
32111
|
const theme = useTheme4();
|
|
31795
|
-
const [isHovered, setIsHovered] =
|
|
32112
|
+
const [isHovered, setIsHovered] = useState18(false);
|
|
31796
32113
|
const nodeRef = useRef14(null);
|
|
31797
32114
|
const { operation_status } = data.event;
|
|
31798
32115
|
const hasPermissionEventsLegacy = useMemo11(
|
|
@@ -31826,8 +32143,8 @@ var ServiceNode = memo11(({ data, selected }) => {
|
|
|
31826
32143
|
const xyNode = nodeRef.current?.closest(".react-flow__node");
|
|
31827
32144
|
if (xyNode) xyNode.style.zIndex = "";
|
|
31828
32145
|
};
|
|
31829
|
-
return /* @__PURE__ */
|
|
31830
|
-
|
|
32146
|
+
return /* @__PURE__ */ jsxs132(
|
|
32147
|
+
Box17,
|
|
31831
32148
|
{
|
|
31832
32149
|
"data-testid": SERVICE_NODE_TEST_ID,
|
|
31833
32150
|
onMouseEnter: handleMouseEnter,
|
|
@@ -31837,8 +32154,8 @@ var ServiceNode = memo11(({ data, selected }) => {
|
|
|
31837
32154
|
sx: { display: "inline-block", position: "relative" },
|
|
31838
32155
|
tabIndex: 0,
|
|
31839
32156
|
children: [
|
|
31840
|
-
/* @__PURE__ */
|
|
31841
|
-
|
|
32157
|
+
/* @__PURE__ */ jsx142(
|
|
32158
|
+
Box17,
|
|
31842
32159
|
{
|
|
31843
32160
|
sx: {
|
|
31844
32161
|
...sharedBoxSx,
|
|
@@ -31846,11 +32163,11 @@ var ServiceNode = memo11(({ data, selected }) => {
|
|
|
31846
32163
|
maxWidth: 220,
|
|
31847
32164
|
overflow: "hidden"
|
|
31848
32165
|
},
|
|
31849
|
-
children: /* @__PURE__ */
|
|
32166
|
+
children: /* @__PURE__ */ jsx142(NodeContent, { ...contentProps, expanded: false })
|
|
31850
32167
|
}
|
|
31851
32168
|
),
|
|
31852
|
-
/* @__PURE__ */
|
|
31853
|
-
|
|
32169
|
+
/* @__PURE__ */ jsx142(
|
|
32170
|
+
Box17,
|
|
31854
32171
|
{
|
|
31855
32172
|
onMouseLeave: handleMouseLeave,
|
|
31856
32173
|
sx: {
|
|
@@ -31864,7 +32181,7 @@ var ServiceNode = memo11(({ data, selected }) => {
|
|
|
31864
32181
|
width: "max-content",
|
|
31865
32182
|
zIndex: 10
|
|
31866
32183
|
},
|
|
31867
|
-
children: /* @__PURE__ */
|
|
32184
|
+
children: /* @__PURE__ */ jsx142(NodeContent, { ...contentProps, expanded: true })
|
|
31868
32185
|
}
|
|
31869
32186
|
)
|
|
31870
32187
|
]
|
|
@@ -31959,11 +32276,11 @@ var getLayoutedNodesAndEdges = (inputNodes, inputEdges) => {
|
|
|
31959
32276
|
|
|
31960
32277
|
// src/components/trace-graph/xyflow/controls.tsx
|
|
31961
32278
|
import { Add, FitScreen, Remove } from "@mui/icons-material";
|
|
31962
|
-
import { Box as
|
|
32279
|
+
import { Box as Box18, IconButton as IconButton6 } from "@mui/material";
|
|
31963
32280
|
import { useReactFlow, useStore as useStore2 } from "@xyflow/react";
|
|
31964
32281
|
import { memo as memo12 } from "react";
|
|
31965
32282
|
import { shallow } from "zustand/shallow";
|
|
31966
|
-
import { jsx as
|
|
32283
|
+
import { jsx as jsx143, jsxs as jsxs133 } from "react/jsx-runtime";
|
|
31967
32284
|
var selector = (s) => ({
|
|
31968
32285
|
isInteractive: s.nodesDraggable || s.nodesConnectable || s.elementsSelectable,
|
|
31969
32286
|
maxZoomReached: s.transform[2] >= s.maxZoom,
|
|
@@ -31981,8 +32298,8 @@ var Controls = memo12(() => {
|
|
|
31981
32298
|
const onFitViewHandler = () => {
|
|
31982
32299
|
void fitView();
|
|
31983
32300
|
};
|
|
31984
|
-
return /* @__PURE__ */
|
|
31985
|
-
|
|
32301
|
+
return /* @__PURE__ */ jsxs133(
|
|
32302
|
+
Box18,
|
|
31986
32303
|
{
|
|
31987
32304
|
sx: {
|
|
31988
32305
|
bottom: 0,
|
|
@@ -31995,33 +32312,33 @@ var Controls = memo12(() => {
|
|
|
31995
32312
|
zIndex: 5
|
|
31996
32313
|
},
|
|
31997
32314
|
children: [
|
|
31998
|
-
/* @__PURE__ */
|
|
32315
|
+
/* @__PURE__ */ jsx143(
|
|
31999
32316
|
IconButton6,
|
|
32000
32317
|
{
|
|
32001
32318
|
className: "react-flow__controls-zoomin",
|
|
32002
32319
|
disabled: maxZoomReached,
|
|
32003
32320
|
onClick: onZoomInHandler,
|
|
32004
32321
|
size: "small",
|
|
32005
|
-
children: /* @__PURE__ */
|
|
32322
|
+
children: /* @__PURE__ */ jsx143(Add, {})
|
|
32006
32323
|
}
|
|
32007
32324
|
),
|
|
32008
|
-
/* @__PURE__ */
|
|
32325
|
+
/* @__PURE__ */ jsx143(
|
|
32009
32326
|
IconButton6,
|
|
32010
32327
|
{
|
|
32011
32328
|
className: "react-flow__controls-zoomout",
|
|
32012
32329
|
disabled: minZoomReached,
|
|
32013
32330
|
onClick: onZoomOutHandler,
|
|
32014
32331
|
size: "small",
|
|
32015
|
-
children: /* @__PURE__ */
|
|
32332
|
+
children: /* @__PURE__ */ jsx143(Remove, {})
|
|
32016
32333
|
}
|
|
32017
32334
|
),
|
|
32018
|
-
/* @__PURE__ */
|
|
32335
|
+
/* @__PURE__ */ jsx143(
|
|
32019
32336
|
IconButton6,
|
|
32020
32337
|
{
|
|
32021
32338
|
className: "react-flow__controls-fitview",
|
|
32022
32339
|
onClick: onFitViewHandler,
|
|
32023
32340
|
size: "small",
|
|
32024
|
-
children: /* @__PURE__ */
|
|
32341
|
+
children: /* @__PURE__ */ jsx143(FitScreen, {})
|
|
32025
32342
|
}
|
|
32026
32343
|
)
|
|
32027
32344
|
]
|
|
@@ -32033,7 +32350,7 @@ var Controls = memo12(() => {
|
|
|
32033
32350
|
import { useTheme as useTheme5 } from "@mui/material";
|
|
32034
32351
|
import { useStore as useStore3 } from "@xyflow/react";
|
|
32035
32352
|
import { memo as memo13 } from "react";
|
|
32036
|
-
import { jsx as
|
|
32353
|
+
import { jsx as jsx144, jsxs as jsxs134 } from "react/jsx-runtime";
|
|
32037
32354
|
var ICON_FRACTION = 0.35;
|
|
32038
32355
|
var PADDING_FRACTION = 0.18;
|
|
32039
32356
|
var ICON_NATIVE_SIZE = 80;
|
|
@@ -32062,10 +32379,10 @@ var MinimapServiceNode = memo13(({
|
|
|
32062
32379
|
const dotY = y + height - padding - dotRadius;
|
|
32063
32380
|
const outlineColor = selected ? isError ? errorColor : "#1a73e8" : "#cccccc";
|
|
32064
32381
|
const outlineWidth = selected ? 2 : 1;
|
|
32065
|
-
return /* @__PURE__ */
|
|
32382
|
+
return /* @__PURE__ */ jsxs134("g", { onClick: onClick ? (event2) => {
|
|
32066
32383
|
onClick(event2, id2);
|
|
32067
32384
|
} : void 0, children: [
|
|
32068
|
-
/* @__PURE__ */
|
|
32385
|
+
/* @__PURE__ */ jsx144(
|
|
32069
32386
|
"rect",
|
|
32070
32387
|
{
|
|
32071
32388
|
fill: "white",
|
|
@@ -32079,7 +32396,7 @@ var MinimapServiceNode = memo13(({
|
|
|
32079
32396
|
y
|
|
32080
32397
|
}
|
|
32081
32398
|
),
|
|
32082
|
-
isError && /* @__PURE__ */
|
|
32399
|
+
isError && /* @__PURE__ */ jsx144(
|
|
32083
32400
|
"rect",
|
|
32084
32401
|
{
|
|
32085
32402
|
fill: errorColor,
|
|
@@ -32091,8 +32408,8 @@ var MinimapServiceNode = memo13(({
|
|
|
32091
32408
|
y: y + 3
|
|
32092
32409
|
}
|
|
32093
32410
|
),
|
|
32094
|
-
Icon && /* @__PURE__ */
|
|
32095
|
-
isError && Icon && /* @__PURE__ */
|
|
32411
|
+
Icon && /* @__PURE__ */ jsx144("g", { transform: `translate(${String(x + padding)}, ${String(y + padding)}) scale(${String(scale2)})`, children: /* @__PURE__ */ jsx144(Icon, { height: ICON_NATIVE_SIZE, width: ICON_NATIVE_SIZE }) }),
|
|
32412
|
+
isError && Icon && /* @__PURE__ */ jsx144(
|
|
32096
32413
|
"circle",
|
|
32097
32414
|
{
|
|
32098
32415
|
cx: dotX,
|
|
@@ -32105,7 +32422,7 @@ var MinimapServiceNode = memo13(({
|
|
|
32105
32422
|
});
|
|
32106
32423
|
|
|
32107
32424
|
// src/components/trace-graph/trace-graph.tsx
|
|
32108
|
-
import { Fragment as
|
|
32425
|
+
import { Fragment as Fragment12, jsx as jsx145, jsxs as jsxs135 } from "react/jsx-runtime";
|
|
32109
32426
|
var nodeTypes = {
|
|
32110
32427
|
service: ServiceNode
|
|
32111
32428
|
};
|
|
@@ -32127,7 +32444,7 @@ var TraceGraph = ({
|
|
|
32127
32444
|
}) => {
|
|
32128
32445
|
const [nodes2, setNodes, onNodesChange] = useNodesState([]);
|
|
32129
32446
|
const [edges, setEdges] = useEdgesState([]);
|
|
32130
|
-
const [translateExtent, setTranslateExtent] =
|
|
32447
|
+
const [translateExtent, setTranslateExtent] = useState19();
|
|
32131
32448
|
const nodeBoundsRef = useRef15(null);
|
|
32132
32449
|
const viewportRef = useRef15({ height: 0, width: 0, zoom: 1 });
|
|
32133
32450
|
const updateExtent = useCallback10(() => {
|
|
@@ -32216,11 +32533,11 @@ var TraceGraph = ({
|
|
|
32216
32533
|
}
|
|
32217
32534
|
}, [spans.data, initialFocusEventId, setNodes, setEdges, updateExtent]);
|
|
32218
32535
|
const theme = useTheme6();
|
|
32219
|
-
return /* @__PURE__ */
|
|
32220
|
-
spans.error && /* @__PURE__ */
|
|
32536
|
+
return /* @__PURE__ */ jsxs135(Fragment12, { children: [
|
|
32537
|
+
spans.error && /* @__PURE__ */ jsxs135(
|
|
32221
32538
|
Alert5,
|
|
32222
32539
|
{
|
|
32223
|
-
action: /* @__PURE__ */
|
|
32540
|
+
action: /* @__PURE__ */ jsx145(Button6, { onClick: () => {
|
|
32224
32541
|
onRefresh();
|
|
32225
32542
|
}, children: "Retry" }),
|
|
32226
32543
|
severity: "error",
|
|
@@ -32232,7 +32549,7 @@ var TraceGraph = ({
|
|
|
32232
32549
|
]
|
|
32233
32550
|
}
|
|
32234
32551
|
),
|
|
32235
|
-
/* @__PURE__ */
|
|
32552
|
+
/* @__PURE__ */ jsxs135(
|
|
32236
32553
|
ReactFlow,
|
|
32237
32554
|
{
|
|
32238
32555
|
"data-testid": TRACE_GRAPH_TEST_ID,
|
|
@@ -32251,9 +32568,9 @@ var TraceGraph = ({
|
|
|
32251
32568
|
selectNodesOnDrag: false,
|
|
32252
32569
|
translateExtent,
|
|
32253
32570
|
children: [
|
|
32254
|
-
/* @__PURE__ */
|
|
32255
|
-
/* @__PURE__ */
|
|
32256
|
-
/* @__PURE__ */
|
|
32571
|
+
/* @__PURE__ */ jsx145(ExtentUpdater, { onUpdate: updateExtent, viewportRef }),
|
|
32572
|
+
/* @__PURE__ */ jsx145(Controls, {}),
|
|
32573
|
+
/* @__PURE__ */ jsx145(
|
|
32257
32574
|
MiniMap,
|
|
32258
32575
|
{
|
|
32259
32576
|
nodeComponent: MinimapServiceNode,
|
|
@@ -32261,7 +32578,7 @@ var TraceGraph = ({
|
|
|
32261
32578
|
zoomable: true
|
|
32262
32579
|
}
|
|
32263
32580
|
),
|
|
32264
|
-
/* @__PURE__ */
|
|
32581
|
+
/* @__PURE__ */ jsx145(
|
|
32265
32582
|
Background,
|
|
32266
32583
|
{
|
|
32267
32584
|
bgColor: theme.palette.background.default,
|
|
@@ -32275,7 +32592,7 @@ var TraceGraph = ({
|
|
|
32275
32592
|
};
|
|
32276
32593
|
|
|
32277
32594
|
// src/pages/trace-graph-page.tsx
|
|
32278
|
-
import { jsx as
|
|
32595
|
+
import { jsx as jsx146, jsxs as jsxs136 } from "react/jsx-runtime";
|
|
32279
32596
|
var DRAWER_WIDTH = "35%";
|
|
32280
32597
|
var Main = styled("main", { shouldForwardProp: (property) => property !== "open" })(({ open, theme }) => ({
|
|
32281
32598
|
flexGrow: 1,
|
|
@@ -32319,7 +32636,7 @@ var TraceGraphView = ({
|
|
|
32319
32636
|
spans,
|
|
32320
32637
|
traceId
|
|
32321
32638
|
}) => {
|
|
32322
|
-
return /* @__PURE__ */
|
|
32639
|
+
return /* @__PURE__ */ jsxs136(
|
|
32323
32640
|
Paper2,
|
|
32324
32641
|
{
|
|
32325
32642
|
"data-testid": TRACE_GRAPH_PAGE_TEST_ID,
|
|
@@ -32332,11 +32649,11 @@ var TraceGraphView = ({
|
|
|
32332
32649
|
width: "100%"
|
|
32333
32650
|
},
|
|
32334
32651
|
children: [
|
|
32335
|
-
/* @__PURE__ */
|
|
32336
|
-
/* @__PURE__ */
|
|
32652
|
+
/* @__PURE__ */ jsx146(Main, { open, children: /* @__PURE__ */ jsxs136(Box19, { sx: { display: "flex", flexDirection: "column", height: "100%" }, children: [
|
|
32653
|
+
/* @__PURE__ */ jsx146(Box19, { sx: { display: "flex", px: 1, py: 1 }, children: /* @__PURE__ */ jsx146(Button7, { onClick: () => {
|
|
32337
32654
|
navigateToSpansList();
|
|
32338
|
-
}, startIcon: /* @__PURE__ */
|
|
32339
|
-
/* @__PURE__ */
|
|
32655
|
+
}, startIcon: /* @__PURE__ */ jsx146(ArrowBack, {}), children: "Go back" }) }),
|
|
32656
|
+
/* @__PURE__ */ jsx146(Box19, { sx: { flexGrow: 1, overflow: "auto" }, children: traceId !== void 0 && /* @__PURE__ */ jsx146(ReactFlowProvider, { children: /* @__PURE__ */ jsx146(
|
|
32340
32657
|
TraceGraph,
|
|
32341
32658
|
{
|
|
32342
32659
|
initialFocusEventId: spanId,
|
|
@@ -32352,7 +32669,7 @@ var TraceGraphView = ({
|
|
|
32352
32669
|
}
|
|
32353
32670
|
) }) })
|
|
32354
32671
|
] }) }),
|
|
32355
|
-
/* @__PURE__ */
|
|
32672
|
+
/* @__PURE__ */ jsx146(StyledDrawer, { anchor: "right", open, variant: "persistent", children: /* @__PURE__ */ jsx146(EventDetails, { onClose: handleClose, selectedEvent }) })
|
|
32356
32673
|
]
|
|
32357
32674
|
}
|
|
32358
32675
|
);
|
|
@@ -32400,9 +32717,9 @@ async function fetchConnectedTracesWaterfall(api, traceIds, allSpans = /* @__PUR
|
|
|
32400
32717
|
}
|
|
32401
32718
|
var TraceGraphPage = ({ onClose, spanId, traceId }) => {
|
|
32402
32719
|
const api = useAppInspectorApi();
|
|
32403
|
-
const [spans, setSpans] =
|
|
32404
|
-
const [loading, setLoading] =
|
|
32405
|
-
const [fetchError, setFetchError] =
|
|
32720
|
+
const [spans, setSpans] = useState20();
|
|
32721
|
+
const [loading, setLoading] = useState20(false);
|
|
32722
|
+
const [fetchError, setFetchError] = useState20();
|
|
32406
32723
|
const fetchSpans = useCallback11(async () => {
|
|
32407
32724
|
setLoading(true);
|
|
32408
32725
|
try {
|
|
@@ -32419,8 +32736,8 @@ var TraceGraphPage = ({ onClose, spanId, traceId }) => {
|
|
|
32419
32736
|
useEffect21(() => {
|
|
32420
32737
|
void fetchSpans();
|
|
32421
32738
|
}, [fetchSpans]);
|
|
32422
|
-
const [open, setOpen] =
|
|
32423
|
-
const [selectedEvent, setSelectedEvent] =
|
|
32739
|
+
const [open, setOpen] = useState20(true);
|
|
32740
|
+
const [selectedEvent, setSelectedEvent] = useState20(() => spans?.find((span) => span.span_id === spanId));
|
|
32424
32741
|
const spansReference = useRef16();
|
|
32425
32742
|
useEffect21(() => {
|
|
32426
32743
|
if (!spansReference.current && spans) {
|
|
@@ -32436,7 +32753,7 @@ var TraceGraphPage = ({ onClose, spanId, traceId }) => {
|
|
|
32436
32753
|
const navigateToSpansList = useCallback11(() => {
|
|
32437
32754
|
onClose?.();
|
|
32438
32755
|
}, [onClose]);
|
|
32439
|
-
return /* @__PURE__ */
|
|
32756
|
+
return /* @__PURE__ */ jsx146(
|
|
32440
32757
|
TraceGraphView,
|
|
32441
32758
|
{
|
|
32442
32759
|
fetchError,
|
|
@@ -32457,7 +32774,7 @@ var TraceGraphPage = ({ onClose, spanId, traceId }) => {
|
|
|
32457
32774
|
};
|
|
32458
32775
|
|
|
32459
32776
|
// src/pages/spans-list-page.tsx
|
|
32460
|
-
import { jsx as
|
|
32777
|
+
import { jsx as jsx147, jsxs as jsxs137 } from "react/jsx-runtime";
|
|
32461
32778
|
var SpansListPage = () => {
|
|
32462
32779
|
const api = useAppInspectorApi();
|
|
32463
32780
|
const {
|
|
@@ -32487,10 +32804,10 @@ var SpansListPage = () => {
|
|
|
32487
32804
|
const localstackVersion = status?.localstackVersion ?? (statusError instanceof AppInspectorNotFoundError ? statusError.localstackVersion : void 0);
|
|
32488
32805
|
const versionCompatibility = checkEmulatorVersion(localstackVersion);
|
|
32489
32806
|
const searchSupported = emulatorSupportsSearch(localstackVersion);
|
|
32490
|
-
const [bannerDismissed, setBannerDismissed] =
|
|
32807
|
+
const [bannerDismissed, setBannerDismissed] = useState21(false);
|
|
32491
32808
|
const [order2, setOrder] = useLocalStorage("spans-order", "oldest_first");
|
|
32492
|
-
const [selectedTraceId, setSelectedTraceId] =
|
|
32493
|
-
const [selectedSpanId, setSelectedSpanId] =
|
|
32809
|
+
const [selectedTraceId, setSelectedTraceId] = useState21();
|
|
32810
|
+
const [selectedSpanId, setSelectedSpanId] = useState21();
|
|
32494
32811
|
const navigateToSpan = useCallback12((span) => {
|
|
32495
32812
|
setSelectedTraceId(span.trace_id);
|
|
32496
32813
|
setSelectedSpanId(span.span_id);
|
|
@@ -32528,10 +32845,10 @@ var SpansListPage = () => {
|
|
|
32528
32845
|
switch (phase) {
|
|
32529
32846
|
case "CHECKING_STATUS":
|
|
32530
32847
|
case "CONNECTING_WS": {
|
|
32531
|
-
return /* @__PURE__ */
|
|
32848
|
+
return /* @__PURE__ */ jsx147(StatusMessage, { phase });
|
|
32532
32849
|
}
|
|
32533
32850
|
case "DISABLED": {
|
|
32534
|
-
return /* @__PURE__ */
|
|
32851
|
+
return /* @__PURE__ */ jsx147(
|
|
32535
32852
|
StatusMessage,
|
|
32536
32853
|
{
|
|
32537
32854
|
onEnable: handleEnable,
|
|
@@ -32540,7 +32857,7 @@ var SpansListPage = () => {
|
|
|
32540
32857
|
);
|
|
32541
32858
|
}
|
|
32542
32859
|
case "INCOMPATIBLE": {
|
|
32543
|
-
return /* @__PURE__ */
|
|
32860
|
+
return /* @__PURE__ */ jsx147(
|
|
32544
32861
|
StatusMessage,
|
|
32545
32862
|
{
|
|
32546
32863
|
localstackVersion,
|
|
@@ -32553,7 +32870,7 @@ var SpansListPage = () => {
|
|
|
32553
32870
|
break;
|
|
32554
32871
|
}
|
|
32555
32872
|
case "UNREACHABLE": {
|
|
32556
|
-
return /* @__PURE__ */
|
|
32873
|
+
return /* @__PURE__ */ jsx147(
|
|
32557
32874
|
StatusMessage,
|
|
32558
32875
|
{
|
|
32559
32876
|
onRetry: handleRetry,
|
|
@@ -32562,9 +32879,9 @@ var SpansListPage = () => {
|
|
|
32562
32879
|
);
|
|
32563
32880
|
}
|
|
32564
32881
|
}
|
|
32565
|
-
return /* @__PURE__ */
|
|
32566
|
-
/* @__PURE__ */
|
|
32567
|
-
|
|
32882
|
+
return /* @__PURE__ */ jsxs137(Paper3, { square: true, sx: { display: "flex", flexDirection: "column", flexGrow: 1 }, children: [
|
|
32883
|
+
/* @__PURE__ */ jsxs137(
|
|
32884
|
+
Box20,
|
|
32568
32885
|
{
|
|
32569
32886
|
"data-testid": SPANS_LIST_PAGE_TEST_ID,
|
|
32570
32887
|
sx: {
|
|
@@ -32579,7 +32896,7 @@ var SpansListPage = () => {
|
|
|
32579
32896
|
width: "100%"
|
|
32580
32897
|
},
|
|
32581
32898
|
children: [
|
|
32582
|
-
/* @__PURE__ */
|
|
32899
|
+
/* @__PURE__ */ jsx147(
|
|
32583
32900
|
EmulatorVersionBanner,
|
|
32584
32901
|
{
|
|
32585
32902
|
compatibility: bannerDismissed && versionCompatibility === "warning" ? "ok" : versionCompatibility,
|
|
@@ -32589,7 +32906,7 @@ var SpansListPage = () => {
|
|
|
32589
32906
|
} : void 0
|
|
32590
32907
|
}
|
|
32591
32908
|
),
|
|
32592
|
-
/* @__PURE__ */
|
|
32909
|
+
/* @__PURE__ */ jsx147(
|
|
32593
32910
|
SpansList,
|
|
32594
32911
|
{
|
|
32595
32912
|
clearingSpans,
|
|
@@ -32618,7 +32935,7 @@ var SpansListPage = () => {
|
|
|
32618
32935
|
]
|
|
32619
32936
|
}
|
|
32620
32937
|
),
|
|
32621
|
-
selectedTraceId !== void 0 && /* @__PURE__ */
|
|
32938
|
+
selectedTraceId !== void 0 && /* @__PURE__ */ jsx147(TraceGraphPage, { onClose: () => {
|
|
32622
32939
|
setSelectedTraceId(void 0);
|
|
32623
32940
|
}, spanId: selectedSpanId, traceId: selectedTraceId })
|
|
32624
32941
|
] });
|