@localstack/appinspector-ui 1.0.116 → 1.0.117
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 +45 -50
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +83 -88
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2491,6 +2491,9 @@ var EVENT_DETAILS_REQUEST_PAYLOAD = "event-details-request-payload";
|
|
|
2491
2491
|
var EVENT_DETAILS_RESPONSE_PAYLOAD_TEST_ID = "event-details-response-payload";
|
|
2492
2492
|
var EVENT_DETAILS_EXCEPTION_PAYLOAD_TEST_ID = "event-details-exception-payload";
|
|
2493
2493
|
var EVENT_DETAILS_IAM_ERRORS_SUPPRESSED_TEST_ID = "event-details-iam-errors-suppressed";
|
|
2494
|
+
var EVENT_DETAILS_IAM_PRINCIPAL_TEST_ID = "event-details-iam-principal";
|
|
2495
|
+
var EVENT_DETAILS_IAM_ACTIONS_TEST_ID = "event-details-iam-actions";
|
|
2496
|
+
var EVENT_DETAILS_IAM_RESOURCES_TEST_ID = "event-details-iam-resources";
|
|
2494
2497
|
var ERROR_COUNT_TEST_ID = "error-count";
|
|
2495
2498
|
var WARNING_COUNT_TEST_ID = "warning-count";
|
|
2496
2499
|
var SERVICE_NODE_TEST_ID = "service-node";
|
|
@@ -18594,14 +18597,14 @@ var useSpans = () => {
|
|
|
18594
18597
|
};
|
|
18595
18598
|
|
|
18596
18599
|
// src/pages/trace-graph-page.tsx
|
|
18597
|
-
var
|
|
18600
|
+
var import_icons_material12 = require("@mui/icons-material");
|
|
18598
18601
|
var import_material23 = require("@mui/material");
|
|
18599
18602
|
var import_styles = require("@mui/material/styles");
|
|
18600
18603
|
var import_react67 = require("@xyflow/react");
|
|
18601
18604
|
var import_react68 = require("react");
|
|
18602
18605
|
|
|
18603
18606
|
// src/components/event-details/event-details.tsx
|
|
18604
|
-
var
|
|
18607
|
+
var import_icons_material9 = require("@mui/icons-material");
|
|
18605
18608
|
var import_material18 = require("@mui/material");
|
|
18606
18609
|
var import_react59 = require("react");
|
|
18607
18610
|
|
|
@@ -18714,7 +18717,7 @@ var getEventGroupsByType = (events) => {
|
|
|
18714
18717
|
};
|
|
18715
18718
|
|
|
18716
18719
|
// src/components/event-details/event-detail.tsx
|
|
18717
|
-
var
|
|
18720
|
+
var import_icons_material7 = require("@mui/icons-material");
|
|
18718
18721
|
var import_material15 = require("@mui/material");
|
|
18719
18722
|
var import_react56 = require("react");
|
|
18720
18723
|
|
|
@@ -18824,57 +18827,48 @@ var IAMEventDetail = ({ event }) => {
|
|
|
18824
18827
|
};
|
|
18825
18828
|
|
|
18826
18829
|
// src/components/event-details/iam-permission-detail.tsx
|
|
18827
|
-
var import_icons_material7 = require("@mui/icons-material");
|
|
18828
18830
|
var import_material12 = require("@mui/material");
|
|
18829
18831
|
var import_react53 = require("react");
|
|
18830
18832
|
var import_jsx_runtime135 = require("react/jsx-runtime");
|
|
18831
|
-
var
|
|
18832
|
-
|
|
18833
|
-
|
|
18834
|
-
|
|
18835
|
-
|
|
18836
|
-
|
|
18837
|
-
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { sx: {
|
|
18833
|
+
var getChipColor = (isAllowed, spanStatusCode) => {
|
|
18834
|
+
if (isAllowed) return "success.main";
|
|
18835
|
+
if (spanStatusCode === 2) return "error.main";
|
|
18836
|
+
return "warning.main";
|
|
18837
|
+
};
|
|
18838
|
+
var LabelValue = ({ label, value }) => /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material12.Box, { children: [
|
|
18839
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { sx: { display: "block", fontWeight: 600 }, variant: "caption", children: label }),
|
|
18840
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { sx: { wordBreak: "break-all" }, variant: "body2", children: value })
|
|
18838
18841
|
] });
|
|
18839
|
-
var IAMPermissionItem = ({ event }) => {
|
|
18840
|
-
const [isOpen, setIsOpen] = (0, import_react53.useState)(false);
|
|
18842
|
+
var IAMPermissionItem = ({ event, spanStatusCode }) => {
|
|
18841
18843
|
const parsedData = (0, import_react53.useMemo)(() => {
|
|
18842
18844
|
const payloadString = event.attributes?.payload;
|
|
18843
18845
|
if (!payloadString) return;
|
|
18844
18846
|
const parsedIAM2 = parseIAMEvent(payloadString);
|
|
18845
18847
|
if (!parsedIAM2) return;
|
|
18846
|
-
return {
|
|
18848
|
+
return { parsedIAM: parsedIAM2 };
|
|
18847
18849
|
}, [event.attributes?.payload]);
|
|
18848
18850
|
if (!parsedData) {
|
|
18849
18851
|
return null;
|
|
18850
18852
|
}
|
|
18851
|
-
const {
|
|
18853
|
+
const { parsedIAM } = parsedData;
|
|
18854
|
+
const isAllowed = parsedIAM.permission === "explicitly_allowed" || parsedIAM.permission === "implicitly_allowed";
|
|
18855
|
+
const chipColors = { backgroundColor: getChipColor(isAllowed, spanStatusCode), color: "white" };
|
|
18852
18856
|
return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material12.Box, { sx: { mb: 0.5 }, children: [
|
|
18853
|
-
/* @__PURE__ */ (0, import_jsx_runtime135.
|
|
18854
|
-
|
|
18855
|
-
|
|
18856
|
-
|
|
18857
|
-
|
|
18858
|
-
|
|
18859
|
-
parsedIAM.service,
|
|
18860
|
-
":",
|
|
18861
|
-
parsedIAM.operation
|
|
18862
|
-
] })
|
|
18863
|
-
] }),
|
|
18864
|
-
isOpen && /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material12.Box, { sx: { borderColor: "divider", borderLeft: "2px solid", ml: 1, mt: 0.5, pl: 1.5, py: 0.5 }, children: [
|
|
18865
|
-
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(LabelValue, { label: "Principal", value: parsedIAM.principal }),
|
|
18866
|
-
parsedIAM.details.actions && parsedIAM.details.actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material12.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr", mb: 0.5 }, children: [
|
|
18867
|
-
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: "Actions" }),
|
|
18868
|
-
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Box, { children: parsedIAM.details.actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { sx: { display: "block" }, variant: "caption", children: action }, action)) })
|
|
18857
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Box, { sx: { alignItems: "center", display: "flex", gap: 1, mb: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Chip, { label: formatPermissionStatus(parsedIAM.permission), size: "small", sx: { ...chipColors, fontWeight: 500 } }) }),
|
|
18858
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material12.Stack, { spacing: 1, children: [
|
|
18859
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Box, { "data-testid": EVENT_DETAILS_IAM_PRINCIPAL_TEST_ID, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(LabelValue, { label: "Principal", value: parsedIAM.principal }) }),
|
|
18860
|
+
parsedIAM.details.actions && parsedIAM.details.actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material12.Box, { "data-testid": EVENT_DETAILS_IAM_ACTIONS_TEST_ID, children: [
|
|
18861
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { sx: { display: "block", fontWeight: 600 }, variant: "caption", children: "Actions" }),
|
|
18862
|
+
parsedIAM.details.actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { sx: { display: "block" }, variant: "body2", children: action }, action))
|
|
18869
18863
|
] }),
|
|
18870
|
-
parsedIAM.details.resources && parsedIAM.details.resources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material12.Box, {
|
|
18871
|
-
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, {
|
|
18872
|
-
|
|
18864
|
+
parsedIAM.details.resources && parsedIAM.details.resources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material12.Box, { "data-testid": EVENT_DETAILS_IAM_RESOURCES_TEST_ID, children: [
|
|
18865
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { sx: { display: "block", fontWeight: 600 }, variant: "caption", children: "Resources" }),
|
|
18866
|
+
parsedIAM.details.resources.map((resource) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { sx: { display: "block", wordBreak: "break-all" }, variant: "body2", children: resource }, resource))
|
|
18873
18867
|
] })
|
|
18874
18868
|
] })
|
|
18875
18869
|
] });
|
|
18876
18870
|
};
|
|
18877
|
-
var IAMPermissionDetail = ({ events }) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Box, { children: events.map((event) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(IAMPermissionItem, { event }, `${event.span_id}-${event.event_id}`)) });
|
|
18871
|
+
var IAMPermissionDetail = ({ events, spanStatusCode }) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Box, { children: events.map((event) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(IAMPermissionItem, { event, spanStatusCode }, `${event.span_id}-${event.event_id}`)) });
|
|
18878
18872
|
|
|
18879
18873
|
// src/components/event-details/payload-viewer.tsx
|
|
18880
18874
|
var import_material14 = require("@mui/material");
|
|
@@ -20760,7 +20754,7 @@ var EventMessage = ({ event }) => {
|
|
|
20760
20754
|
},
|
|
20761
20755
|
size: "small",
|
|
20762
20756
|
sx: { mr: 1, p: 0 },
|
|
20763
|
-
children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
20757
|
+
children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_icons_material7.KeyboardArrowDown, { sx: { fontSize: 16 } }) : /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_icons_material7.KeyboardArrowRight, { sx: { fontSize: 16 } })
|
|
20764
20758
|
}
|
|
20765
20759
|
),
|
|
20766
20760
|
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
@@ -20815,10 +20809,11 @@ var getEventLevelFromGroup = (group4) => {
|
|
|
20815
20809
|
var EventDetail = ({
|
|
20816
20810
|
displayText,
|
|
20817
20811
|
events,
|
|
20812
|
+
spanStatusCode,
|
|
20818
20813
|
type
|
|
20819
20814
|
}) => {
|
|
20820
20815
|
if (type === "permission") {
|
|
20821
|
-
return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(IAMPermissionDetail, { events });
|
|
20816
|
+
return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(IAMPermissionDetail, { events, spanStatusCode });
|
|
20822
20817
|
}
|
|
20823
20818
|
const eventLevel = getEventLevelFromGroup(type);
|
|
20824
20819
|
return /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material15.Box, { children: [
|
|
@@ -30624,7 +30619,7 @@ var LambdaInvokeLogsSection = ({ endTimeNano, functionName: functionName2, regio
|
|
|
30624
30619
|
};
|
|
30625
30620
|
|
|
30626
30621
|
// src/components/event-details/toggle-section.tsx
|
|
30627
|
-
var
|
|
30622
|
+
var import_icons_material8 = require("@mui/icons-material");
|
|
30628
30623
|
var import_material17 = require("@mui/material");
|
|
30629
30624
|
var import_react58 = require("react");
|
|
30630
30625
|
var import_jsx_runtime140 = require("react/jsx-runtime");
|
|
@@ -30656,7 +30651,7 @@ var ToggleSection = ({ action, children, headline, initialOpen = true }) => {
|
|
|
30656
30651
|
},
|
|
30657
30652
|
children: [
|
|
30658
30653
|
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "subtitle2", children: headline }),
|
|
30659
|
-
isOpen ? /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
30654
|
+
isOpen ? /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_icons_material8.KeyboardArrowDown, { sx: { color: "text.secondary", height: 20, width: 20 } }) : /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_icons_material8.KeyboardArrowRight, { sx: { color: "text.secondary", height: 20, width: 20 } })
|
|
30660
30655
|
]
|
|
30661
30656
|
}
|
|
30662
30657
|
),
|
|
@@ -30730,7 +30725,7 @@ var EventDetails = ({ onClose, selectedEvent }) => {
|
|
|
30730
30725
|
},
|
|
30731
30726
|
children: [
|
|
30732
30727
|
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "h6", children: "Operation Details" }) }),
|
|
30733
|
-
onClose && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.IconButton, { "data-testid": EVENT_DETAILS_CLOSE_BUTTON_TEST_ID, onClick: onClose, size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
30728
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.IconButton, { "data-testid": EVENT_DETAILS_CLOSE_BUTTON_TEST_ID, onClick: onClose, size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_icons_material9.Close, {}) })
|
|
30734
30729
|
]
|
|
30735
30730
|
}
|
|
30736
30731
|
),
|
|
@@ -30800,7 +30795,7 @@ var EventDetails = ({ onClose, selectedEvent }) => {
|
|
|
30800
30795
|
/* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(ToggleSection, { headline: "Permissions", children: [
|
|
30801
30796
|
selectedEvent.iam_errors_suppressed && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Alert, { "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" }),
|
|
30802
30797
|
!selectedEvent.iam_errors_suppressed && !eventGroups.permissions && !eventGroups.errors && !eventGroups.warnings && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { color: "text.secondary", variant: "body2", children: "There is no permission information available." }),
|
|
30803
|
-
eventGroups.permissions && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(EventDetail, { displayText: "Permissions", events: eventGroups.permissions, type: "permission" }),
|
|
30798
|
+
eventGroups.permissions && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(EventDetail, { displayText: "Permissions", events: eventGroups.permissions, spanStatusCode: selectedEvent.status_code, type: "permission" }),
|
|
30804
30799
|
eventGroups.errors && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(EventDetail, { displayText: "Error", events: eventGroups.errors, type: "error" }),
|
|
30805
30800
|
eventGroups.warnings && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(EventDetail, { displayText: "Warning", events: eventGroups.warnings, type: "warning" })
|
|
30806
30801
|
] }),
|
|
@@ -30883,7 +30878,7 @@ var import_react61 = require("@xyflow/react");
|
|
|
30883
30878
|
var import_react62 = require("react");
|
|
30884
30879
|
|
|
30885
30880
|
// src/components/trace-graph/problem-indicator.tsx
|
|
30886
|
-
var
|
|
30881
|
+
var import_icons_material10 = require("@mui/icons-material");
|
|
30887
30882
|
var import_material19 = require("@mui/material");
|
|
30888
30883
|
var import_react60 = require("react");
|
|
30889
30884
|
var import_jsx_runtime142 = require("react/jsx-runtime");
|
|
@@ -30891,13 +30886,13 @@ var ProblemIndicator = ({ error }) => {
|
|
|
30891
30886
|
const icon = (0, import_react60.useMemo)(() => {
|
|
30892
30887
|
switch (error.level) {
|
|
30893
30888
|
case "error": {
|
|
30894
|
-
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
30889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_icons_material10.Error, { sx: { color: "#d32f2f", fontSize: "14px" } });
|
|
30895
30890
|
}
|
|
30896
30891
|
case "warning": {
|
|
30897
|
-
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
30892
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_icons_material10.Warning, { sx: { color: "#ff9800", fontSize: "14px" } });
|
|
30898
30893
|
}
|
|
30899
30894
|
default: {
|
|
30900
|
-
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
30895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_icons_material10.Info, { sx: { color: "#2196f3", fontSize: "14px" } });
|
|
30901
30896
|
}
|
|
30902
30897
|
}
|
|
30903
30898
|
}, [error.level]);
|
|
@@ -31094,7 +31089,7 @@ var getLayoutedNodesAndEdges = (inputNodes, inputEdges) => {
|
|
|
31094
31089
|
};
|
|
31095
31090
|
|
|
31096
31091
|
// src/components/trace-graph/xyflow/controls.tsx
|
|
31097
|
-
var
|
|
31092
|
+
var import_icons_material11 = require("@mui/icons-material");
|
|
31098
31093
|
var import_material21 = require("@mui/material");
|
|
31099
31094
|
var import_react63 = require("@xyflow/react");
|
|
31100
31095
|
var import_react64 = require("react");
|
|
@@ -31138,7 +31133,7 @@ var Controls = (0, import_react64.memo)(() => {
|
|
|
31138
31133
|
disabled: maxZoomReached,
|
|
31139
31134
|
onClick: onZoomInHandler,
|
|
31140
31135
|
size: "small",
|
|
31141
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
31136
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_icons_material11.Add, {})
|
|
31142
31137
|
}
|
|
31143
31138
|
),
|
|
31144
31139
|
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
@@ -31148,7 +31143,7 @@ var Controls = (0, import_react64.memo)(() => {
|
|
|
31148
31143
|
disabled: minZoomReached,
|
|
31149
31144
|
onClick: onZoomOutHandler,
|
|
31150
31145
|
size: "small",
|
|
31151
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
31146
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_icons_material11.Remove, {})
|
|
31152
31147
|
}
|
|
31153
31148
|
),
|
|
31154
31149
|
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
@@ -31157,7 +31152,7 @@ var Controls = (0, import_react64.memo)(() => {
|
|
|
31157
31152
|
className: "react-flow__controls-fitview",
|
|
31158
31153
|
onClick: onFitViewHandler,
|
|
31159
31154
|
size: "small",
|
|
31160
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
31155
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_icons_material11.FitScreen, {})
|
|
31161
31156
|
}
|
|
31162
31157
|
)
|
|
31163
31158
|
]
|
|
@@ -31342,7 +31337,7 @@ var TraceGraphView = ({
|
|
|
31342
31337
|
/* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(import_material23.Box, { sx: { display: "flex", width: "100%" }, children: [
|
|
31343
31338
|
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_material23.Button, { onClick: () => {
|
|
31344
31339
|
navigateToSpansList();
|
|
31345
|
-
}, startIcon: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
31340
|
+
}, startIcon: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_icons_material12.ArrowBack, {}), children: "Go back" }),
|
|
31346
31341
|
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_material23.Box, { sx: { flexGrow: 1 } })
|
|
31347
31342
|
] }),
|
|
31348
31343
|
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|