@localstack/appinspector-ui 1.0.115 → 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.js CHANGED
@@ -2414,7 +2414,7 @@ var init_event_streams = __esm({
2414
2414
 
2415
2415
  // src/pages/spans-list-page.tsx
2416
2416
  import { Box as Box21 } from "@mui/material";
2417
- import { useCallback as useCallback12, useState as useState18 } from "react";
2417
+ import { useCallback as useCallback12, useState as useState17 } from "react";
2418
2418
 
2419
2419
  // src/api/errors.ts
2420
2420
  var AppInspectorDisabledError = class extends Error {
@@ -2487,6 +2487,9 @@ var EVENT_DETAILS_REQUEST_PAYLOAD = "event-details-request-payload";
2487
2487
  var EVENT_DETAILS_RESPONSE_PAYLOAD_TEST_ID = "event-details-response-payload";
2488
2488
  var EVENT_DETAILS_EXCEPTION_PAYLOAD_TEST_ID = "event-details-exception-payload";
2489
2489
  var EVENT_DETAILS_IAM_ERRORS_SUPPRESSED_TEST_ID = "event-details-iam-errors-suppressed";
2490
+ var EVENT_DETAILS_IAM_PRINCIPAL_TEST_ID = "event-details-iam-principal";
2491
+ var EVENT_DETAILS_IAM_ACTIONS_TEST_ID = "event-details-iam-actions";
2492
+ var EVENT_DETAILS_IAM_RESOURCES_TEST_ID = "event-details-iam-resources";
2490
2493
  var ERROR_COUNT_TEST_ID = "error-count";
2491
2494
  var WARNING_COUNT_TEST_ID = "warning-count";
2492
2495
  var SERVICE_NODE_TEST_ID = "service-node";
@@ -15729,31 +15732,19 @@ var StatusMessage = ({
15729
15732
  children: [
15730
15733
  /* @__PURE__ */ jsx130(AlertTitle, { sx: { fontWeight: "bold" }, children: "App Inspector Is Not Enabled" }),
15731
15734
  /* @__PURE__ */ jsx130(Typography5, { sx: { mb: 2 }, variant: "body2", children: "App Inspector is not currently enabled in LocalStack. You can enable it now, or at startup." }),
15732
- /* @__PURE__ */ jsxs124(Box7, { sx: { display: "flex", gap: 1, mb: 2 }, children: [
15733
- onEnable && /* @__PURE__ */ jsx130(
15734
- Button4,
15735
- {
15736
- "aria-label": "Enable App Inspector Now",
15737
- disabled: enabling,
15738
- onClick: () => {
15739
- void handleEnable();
15740
- },
15741
- startIcon: enabling ? /* @__PURE__ */ jsx130(CircularProgress2, { size: 16 }) : void 0,
15742
- variant: "contained",
15743
- children: "Enable App Inspector Now"
15744
- }
15745
- ),
15746
- onRetry && /* @__PURE__ */ jsx130(
15747
- Button4,
15748
- {
15749
- "aria-label": "Check if App Inspector is enabled",
15750
- disabled: enabling,
15751
- onClick: onRetry,
15752
- variant: "outlined",
15753
- children: "Check Again"
15754
- }
15755
- )
15756
- ] }),
15735
+ /* @__PURE__ */ jsx130(Box7, { sx: { display: "flex", gap: 1, mb: 2 }, children: onEnable && /* @__PURE__ */ jsx130(
15736
+ Button4,
15737
+ {
15738
+ "aria-label": "Enable App Inspector Now",
15739
+ disabled: enabling,
15740
+ onClick: () => {
15741
+ void handleEnable();
15742
+ },
15743
+ startIcon: enabling ? /* @__PURE__ */ jsx130(CircularProgress2, { size: 16 }) : void 0,
15744
+ variant: "contained",
15745
+ children: "Enable App Inspector Now"
15746
+ }
15747
+ ) }),
15757
15748
  /* @__PURE__ */ jsx130(Typography5, { sx: { mb: 1 }, variant: "body2", children: "If you'd prefer to automatically enable App Inspector at start up, use:" }),
15758
15749
  /* @__PURE__ */ jsx130(
15759
15750
  Box7,
@@ -18623,12 +18614,12 @@ import { ArrowBack } from "@mui/icons-material";
18623
18614
  import { Box as Box20, Button as Button6, Drawer, Paper as Paper3 } from "@mui/material";
18624
18615
  import { styled } from "@mui/material/styles";
18625
18616
  import { ReactFlowProvider } from "@xyflow/react";
18626
- import { useCallback as useCallback11, useEffect as useEffect21, useRef as useRef17, useState as useState17 } from "react";
18617
+ import { useCallback as useCallback11, useEffect as useEffect21, useRef as useRef17, useState as useState16 } from "react";
18627
18618
 
18628
18619
  // src/components/event-details/event-details.tsx
18629
18620
  import { Close as Close2 } from "@mui/icons-material";
18630
- import { Alert as Alert4, Box as Box16, Chip as Chip3, Divider as Divider4, FormControlLabel as FormControlLabel2, IconButton as IconButton4, Stack as Stack2, Switch, Typography as Typography11 } from "@mui/material";
18631
- import { useMemo as useMemo12, useState as useState16 } from "react";
18621
+ import { Alert as Alert4, Box as Box16, Chip as Chip3, Divider as Divider4, FormControlLabel as FormControlLabel2, IconButton as IconButton3, Stack as Stack3, Switch, Typography as Typography11 } from "@mui/material";
18622
+ import { useMemo as useMemo12, useState as useState15 } from "react";
18632
18623
 
18633
18624
  // src/utils/event-utils.ts
18634
18625
  var iamEventParser = (eventName, attributes) => {
@@ -18739,9 +18730,9 @@ var getEventGroupsByType = (events) => {
18739
18730
  };
18740
18731
 
18741
18732
  // src/components/event-details/event-detail.tsx
18742
- import { KeyboardArrowDown as KeyboardArrowDown2, KeyboardArrowRight as KeyboardArrowRight2 } from "@mui/icons-material";
18743
- import { Box as Box13, IconButton as IconButton3, Typography as Typography8 } from "@mui/material";
18744
- import { useEffect as useEffect18, useMemo as useMemo10, useRef as useRef15, useState as useState13 } from "react";
18733
+ import { KeyboardArrowDown, KeyboardArrowRight } from "@mui/icons-material";
18734
+ import { Box as Box13, IconButton as IconButton2, Typography as Typography8 } from "@mui/material";
18735
+ import { useEffect as useEffect18, useMemo as useMemo10, useRef as useRef15, useState as useState12 } from "react";
18745
18736
 
18746
18737
  // src/components/status-icon.tsx
18747
18738
  import { Cancel as Cancel2, CheckCircle, Error as Error3, Info, RemoveCircle } from "@mui/icons-material";
@@ -18849,57 +18840,48 @@ var IAMEventDetail = ({ event }) => {
18849
18840
  };
18850
18841
 
18851
18842
  // src/components/event-details/iam-permission-detail.tsx
18852
- import { KeyboardArrowDown, KeyboardArrowRight } from "@mui/icons-material";
18853
- import { Box as Box10, Chip as Chip2, IconButton as IconButton2, Typography as Typography7 } from "@mui/material";
18854
- import { useMemo as useMemo8, useState as useState11 } from "react";
18843
+ import { Box as Box10, Chip as Chip2, Stack, Typography as Typography7 } from "@mui/material";
18844
+ import { useMemo as useMemo8 } from "react";
18855
18845
  import { jsx as jsx135, jsxs as jsxs126 } from "react/jsx-runtime";
18856
- var getChipColors = (status) => ({
18857
- backgroundColor: getPermissionStatusColor(status),
18858
- color: "white"
18859
- });
18860
- var LabelValue = ({ label, value }) => /* @__PURE__ */ jsxs126(Box10, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr", mb: 0.5 }, children: [
18861
- /* @__PURE__ */ jsx135(Typography7, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: label }),
18862
- /* @__PURE__ */ jsx135(Typography7, { sx: { wordBreak: "break-all" }, variant: "caption", children: value })
18846
+ var getChipColor = (isAllowed, spanStatusCode) => {
18847
+ if (isAllowed) return "success.main";
18848
+ if (spanStatusCode === 2) return "error.main";
18849
+ return "warning.main";
18850
+ };
18851
+ var LabelValue = ({ label, value }) => /* @__PURE__ */ jsxs126(Box10, { children: [
18852
+ /* @__PURE__ */ jsx135(Typography7, { sx: { display: "block", fontWeight: 600 }, variant: "caption", children: label }),
18853
+ /* @__PURE__ */ jsx135(Typography7, { sx: { wordBreak: "break-all" }, variant: "body2", children: value })
18863
18854
  ] });
18864
- var IAMPermissionItem = ({ event }) => {
18865
- const [isOpen, setIsOpen] = useState11(false);
18855
+ var IAMPermissionItem = ({ event, spanStatusCode }) => {
18866
18856
  const parsedData = useMemo8(() => {
18867
18857
  const payloadString = event.attributes?.payload;
18868
18858
  if (!payloadString) return;
18869
18859
  const parsedIAM2 = parseIAMEvent(payloadString);
18870
18860
  if (!parsedIAM2) return;
18871
- return { chipColors: getChipColors(parsedIAM2.permission), parsedIAM: parsedIAM2 };
18861
+ return { parsedIAM: parsedIAM2 };
18872
18862
  }, [event.attributes?.payload]);
18873
18863
  if (!parsedData) {
18874
18864
  return null;
18875
18865
  }
18876
- const { chipColors, parsedIAM } = parsedData;
18866
+ const { parsedIAM } = parsedData;
18867
+ const isAllowed = parsedIAM.permission === "explicitly_allowed" || parsedIAM.permission === "implicitly_allowed";
18868
+ const chipColors = { backgroundColor: getChipColor(isAllowed, spanStatusCode), color: "white" };
18877
18869
  return /* @__PURE__ */ jsxs126(Box10, { sx: { mb: 0.5 }, children: [
18878
- /* @__PURE__ */ jsxs126(Box10, { sx: { alignItems: "center", display: "flex", gap: 1 }, children: [
18879
- /* @__PURE__ */ jsx135(IconButton2, { onClick: () => {
18880
- setIsOpen(!isOpen);
18881
- }, size: "small", sx: { p: 0 }, children: isOpen ? /* @__PURE__ */ jsx135(KeyboardArrowDown, { sx: { fontSize: 16 } }) : /* @__PURE__ */ jsx135(KeyboardArrowRight, { sx: { fontSize: 16 } }) }),
18882
- /* @__PURE__ */ jsx135(Chip2, { label: formatPermissionStatus(parsedIAM.permission), size: "small", sx: { ...chipColors, fontWeight: 500 } }),
18883
- /* @__PURE__ */ jsxs126(Typography7, { color: "text.secondary", noWrap: true, sx: { flex: 1, overflow: "hidden", textOverflow: "ellipsis" }, variant: "caption", children: [
18884
- parsedIAM.service,
18885
- ":",
18886
- parsedIAM.operation
18887
- ] })
18888
- ] }),
18889
- isOpen && /* @__PURE__ */ jsxs126(Box10, { sx: { borderColor: "divider", borderLeft: "2px solid", ml: 1, mt: 0.5, pl: 1.5, py: 0.5 }, children: [
18890
- /* @__PURE__ */ jsx135(LabelValue, { label: "Principal", value: parsedIAM.principal }),
18891
- parsedIAM.details.actions && parsedIAM.details.actions.length > 0 && /* @__PURE__ */ jsxs126(Box10, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr", mb: 0.5 }, children: [
18892
- /* @__PURE__ */ jsx135(Typography7, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: "Actions" }),
18893
- /* @__PURE__ */ jsx135(Box10, { children: parsedIAM.details.actions.map((action) => /* @__PURE__ */ jsx135(Typography7, { sx: { display: "block" }, variant: "caption", children: action }, action)) })
18870
+ /* @__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 } }) }),
18871
+ /* @__PURE__ */ jsxs126(Stack, { spacing: 1, children: [
18872
+ /* @__PURE__ */ jsx135(Box10, { "data-testid": EVENT_DETAILS_IAM_PRINCIPAL_TEST_ID, children: /* @__PURE__ */ jsx135(LabelValue, { label: "Principal", value: parsedIAM.principal }) }),
18873
+ parsedIAM.details.actions && parsedIAM.details.actions.length > 0 && /* @__PURE__ */ jsxs126(Box10, { "data-testid": EVENT_DETAILS_IAM_ACTIONS_TEST_ID, children: [
18874
+ /* @__PURE__ */ jsx135(Typography7, { sx: { display: "block", fontWeight: 600 }, variant: "caption", children: "Actions" }),
18875
+ parsedIAM.details.actions.map((action) => /* @__PURE__ */ jsx135(Typography7, { sx: { display: "block" }, variant: "body2", children: action }, action))
18894
18876
  ] }),
18895
- parsedIAM.details.resources && parsedIAM.details.resources.length > 0 && /* @__PURE__ */ jsxs126(Box10, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr" }, children: [
18896
- /* @__PURE__ */ jsx135(Typography7, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: "Resources" }),
18897
- /* @__PURE__ */ jsx135(Box10, { children: parsedIAM.details.resources.map((resource) => /* @__PURE__ */ jsx135(Typography7, { sx: { display: "block", wordBreak: "break-all" }, variant: "caption", children: resource }, resource)) })
18877
+ parsedIAM.details.resources && parsedIAM.details.resources.length > 0 && /* @__PURE__ */ jsxs126(Box10, { "data-testid": EVENT_DETAILS_IAM_RESOURCES_TEST_ID, children: [
18878
+ /* @__PURE__ */ jsx135(Typography7, { sx: { display: "block", fontWeight: 600 }, variant: "caption", children: "Resources" }),
18879
+ parsedIAM.details.resources.map((resource) => /* @__PURE__ */ jsx135(Typography7, { sx: { display: "block", wordBreak: "break-all" }, variant: "body2", children: resource }, resource))
18898
18880
  ] })
18899
18881
  ] })
18900
18882
  ] });
18901
18883
  };
18902
- var IAMPermissionDetail = ({ events }) => /* @__PURE__ */ jsx135(Box10, { children: events.map((event) => /* @__PURE__ */ jsx135(IAMPermissionItem, { event }, `${event.span_id}-${event.event_id}`)) });
18884
+ var IAMPermissionDetail = ({ events, spanStatusCode }) => /* @__PURE__ */ jsx135(Box10, { children: events.map((event) => /* @__PURE__ */ jsx135(IAMPermissionItem, { event, spanStatusCode }, `${event.span_id}-${event.event_id}`)) });
18903
18885
 
18904
18886
  // src/components/event-details/payload-viewer.tsx
18905
18887
  import { Box as Box12, useTheme as useTheme3 } from "@mui/material";
@@ -18908,7 +18890,7 @@ import { Box as Box12, useTheme as useTheme3 } from "@mui/material";
18908
18890
  var import_copy_to_clipboard = __toESM(require_copy_to_clipboard(), 1);
18909
18891
  import { jsx as jsx136, jsxs as jsxs127, Fragment as Fragment9 } from "react/jsx-runtime";
18910
18892
  import { Box as Box11, InputBase, NoSsr, SvgIcon, createTheme, ThemeProvider, Paper as Paper2 } from "@mui/material";
18911
- import { createContext as createContext10, useContext as useContext17, useState as useState12, useRef as useRef14, useCallback as useCallback10, useMemo as useMemo9, useEffect as useEffect17, memo as memo9 } from "react";
18893
+ import { createContext as createContext10, useContext as useContext17, useState as useState11, useRef as useRef14, useCallback as useCallback10, useMemo as useMemo9, useEffect as useEffect17, memo as memo9 } from "react";
18912
18894
  import { create, useStore, createStore } from "zustand";
18913
18895
  function r(e2) {
18914
18896
  var t2, f2, n2 = "";
@@ -19152,7 +19134,7 @@ async function copyString(value) {
19152
19134
  }
19153
19135
  function useClipboard() {
19154
19136
  let { timeout = 2e3 } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
19155
- const [copied, setCopied] = useState12(false);
19137
+ const [copied, setCopied] = useState11(false);
19156
19138
  const copyTimeout = useRef14(null);
19157
19139
  const handleCopyResult = useCallback10((value) => {
19158
19140
  const current = copyTimeout.current;
@@ -19235,7 +19217,7 @@ function useInspect(path, value, nestedIndex) {
19235
19217
  value,
19236
19218
  setInspectCache
19237
19219
  ]);
19238
- const [inspect, set] = useState12(() => {
19220
+ const [inspect, set] = useState11(() => {
19239
19221
  const shouldInspect = getInspectCache(path, nestedIndex);
19240
19222
  if (shouldInspect !== void 0) {
19241
19223
  return shouldInspect;
@@ -19766,7 +19748,7 @@ var ObjectType = (props) => {
19766
19748
  const borderColor = useJsonViewerStore((store) => store.colorspace.base02);
19767
19749
  const groupArraysAfterLength = useJsonViewerStore((store) => store.groupArraysAfterLength);
19768
19750
  const isTrap = useIsCycleReference(props.path, props.value);
19769
- const [displayLength, setDisplayLength] = useState12(useJsonViewerStore((store) => store.maxDisplayLength));
19751
+ const [displayLength, setDisplayLength] = useState11(useJsonViewerStore((store) => store.maxDisplayLength));
19770
19752
  const objectSortKeys = useJsonViewerStore((store) => store.objectSortKeys);
19771
19753
  const elements = useMemo9(() => {
19772
19754
  if (!props.inspect) {
@@ -19972,7 +19954,7 @@ var stringType = defineEasyType({
19972
19954
  serialize: (value) => value,
19973
19955
  deserialize: (value) => value,
19974
19956
  Renderer: (props) => {
19975
- const [showRest, setShowRest] = useState12(false);
19957
+ const [showRest, setShowRest] = useState11(false);
19976
19958
  const collapseStringsAfterLength = useJsonViewerStore((store) => store.collapseStringsAfterLength);
19977
19959
  const value = showRest ? props.value : props.value.slice(0, collapseStringsAfterLength);
19978
19960
  const hasRest = props.value.length > collapseStringsAfterLength;
@@ -20126,7 +20108,7 @@ var DataKeyPair = (props) => {
20126
20108
  storeEditable,
20127
20109
  value
20128
20110
  ]);
20129
- const [tempValue, setTempValue] = useState12("");
20111
+ const [tempValue, setTempValue] = useState11("");
20130
20112
  const depth = path.length;
20131
20113
  const key = path[depth - 1];
20132
20114
  const hoverPath = useJsonViewerStore((store) => store.hoverPath);
@@ -20140,7 +20122,7 @@ var DataKeyPair = (props) => {
20140
20122
  const setHover = useJsonViewerStore((store) => store.setHover);
20141
20123
  const root = useJsonViewerStore((store) => store.value);
20142
20124
  const [inspect, setInspect] = useInspect(path, value, nestedIndex);
20143
- const [editing, setEditing] = useState12(false);
20125
+ const [editing, setEditing] = useState11(false);
20144
20126
  const onChange = useJsonViewerStore((store) => store.onChange);
20145
20127
  const keyColor = useTextColor();
20146
20128
  const numberKeyColor = useJsonViewerStore((store) => store.colorspace.base0C);
@@ -20525,7 +20507,7 @@ var DataKeyPair = (props) => {
20525
20507
  };
20526
20508
  var query = "(prefers-color-scheme: dark)";
20527
20509
  function useThemeDetector() {
20528
- const [isDark, setIsDark] = useState12(false);
20510
+ const [isDark, setIsDark] = useState11(false);
20529
20511
  useEffect17(() => {
20530
20512
  const listener = (e2) => setIsDark(e2.matches);
20531
20513
  setIsDark(window.matchMedia(query).matches);
@@ -20746,8 +20728,8 @@ var DetailRow2 = ({ content, label }) => /* @__PURE__ */ jsxs128(Box13, { sx: {
20746
20728
  /* @__PURE__ */ jsx138(Box13, { children: typeof content === "string" ? /* @__PURE__ */ jsx138(Typography8, { sx: { color: "text.primary", whiteSpace: "pre-wrap" }, variant: "caption", children: content }) : content })
20747
20729
  ] });
20748
20730
  var EventMessage = ({ event }) => {
20749
- const [isOpen, setIsOpen] = useState13(false);
20750
- const [isOverflowing, setIsOverflowing] = useState13(false);
20731
+ const [isOpen, setIsOpen] = useState12(false);
20732
+ const [isOverflowing, setIsOverflowing] = useState12(false);
20751
20733
  const textReference = useRef15(null);
20752
20734
  const parsedMessage = useMemo10(() => parseEventMessage(event), [event]);
20753
20735
  const isIAMPolicyEvent = useMemo10(
@@ -20778,14 +20760,14 @@ var EventMessage = ({ event }) => {
20778
20760
  return /* @__PURE__ */ jsxs128(Box13, { sx: { display: "flex", flexDirection: "column" }, children: [
20779
20761
  /* @__PURE__ */ jsxs128(Box13, { sx: { alignItems: "center", display: "flex" }, children: [
20780
20762
  Boolean(shouldShowToggle) && /* @__PURE__ */ jsx138(
20781
- IconButton3,
20763
+ IconButton2,
20782
20764
  {
20783
20765
  onClick: () => {
20784
20766
  setIsOpen(!isOpen);
20785
20767
  },
20786
20768
  size: "small",
20787
20769
  sx: { mr: 1, p: 0 },
20788
- children: isOpen ? /* @__PURE__ */ jsx138(KeyboardArrowDown2, { sx: { fontSize: 16 } }) : /* @__PURE__ */ jsx138(KeyboardArrowRight2, { sx: { fontSize: 16 } })
20770
+ children: isOpen ? /* @__PURE__ */ jsx138(KeyboardArrowDown, { sx: { fontSize: 16 } }) : /* @__PURE__ */ jsx138(KeyboardArrowRight, { sx: { fontSize: 16 } })
20789
20771
  }
20790
20772
  ),
20791
20773
  /* @__PURE__ */ jsx138(
@@ -20840,10 +20822,11 @@ var getEventLevelFromGroup = (group4) => {
20840
20822
  var EventDetail = ({
20841
20823
  displayText,
20842
20824
  events,
20825
+ spanStatusCode,
20843
20826
  type
20844
20827
  }) => {
20845
20828
  if (type === "permission") {
20846
- return /* @__PURE__ */ jsx138(IAMPermissionDetail, { events });
20829
+ return /* @__PURE__ */ jsx138(IAMPermissionDetail, { events, spanStatusCode });
20847
20830
  }
20848
20831
  const eventLevel = getEventLevelFromGroup(type);
20849
20832
  return /* @__PURE__ */ jsxs128(Box13, { children: [
@@ -30542,8 +30525,8 @@ var QueryStatus = {
30542
30525
  };
30543
30526
 
30544
30527
  // src/components/event-details/lambda-invoke-logs-section.tsx
30545
- import { Box as Box14, CircularProgress as CircularProgress3, Stack, Typography as Typography9 } from "@mui/material";
30546
- import { useEffect as useEffect19, useMemo as useMemo11, useRef as useRef16, useState as useState14 } from "react";
30528
+ import { Box as Box14, CircularProgress as CircularProgress3, Stack as Stack2, Typography as Typography9 } from "@mui/material";
30529
+ import { useEffect as useEffect19, useMemo as useMemo11, useRef as useRef16, useState as useState13 } from "react";
30547
30530
  import { jsx as jsx139, jsxs as jsxs129 } from "react/jsx-runtime";
30548
30531
  var POLL_INTERVAL_MS = 1e3;
30549
30532
  async function pollQueryResults(client, queryId) {
@@ -30572,9 +30555,9 @@ function useCloudWatchLogsClient(region) {
30572
30555
  return client;
30573
30556
  }
30574
30557
  function useLambdaInvokeLogs(functionName2, requestId, region, startTimeNano, endTimeNano) {
30575
- const [loading, setLoading] = useState14(true);
30576
- const [logs, setLogs] = useState14([]);
30577
- const [error, setError] = useState14();
30558
+ const [loading, setLoading] = useState13(true);
30559
+ const [logs, setLogs] = useState13([]);
30560
+ const [error, setError] = useState13();
30578
30561
  const pollTimerRef = useRef16(null);
30579
30562
  const cloudWatchLogs = useCloudWatchLogsClient(region);
30580
30563
  useEffect19(() => {
@@ -30634,7 +30617,7 @@ function useLambdaInvokeLogs(functionName2, requestId, region, startTimeNano, en
30634
30617
  var LambdaInvokeLogsSection = ({ endTimeNano, functionName: functionName2, region, requestId, startTimeNano }) => {
30635
30618
  const { error, loading, logs } = useLambdaInvokeLogs(functionName2, requestId, region, startTimeNano, endTimeNano);
30636
30619
  if (loading) {
30637
- return /* @__PURE__ */ jsxs129(Stack, { alignItems: "center", direction: "row", spacing: 1, children: [
30620
+ return /* @__PURE__ */ jsxs129(Stack2, { alignItems: "center", direction: "row", spacing: 1, children: [
30638
30621
  /* @__PURE__ */ jsx139(CircularProgress3, { size: 14 }),
30639
30622
  /* @__PURE__ */ jsx139(Typography9, { color: "text.secondary", variant: "body2", children: "Loading logs\u2026" })
30640
30623
  ] });
@@ -30649,12 +30632,12 @@ var LambdaInvokeLogsSection = ({ endTimeNano, functionName: functionName2, regio
30649
30632
  };
30650
30633
 
30651
30634
  // src/components/event-details/toggle-section.tsx
30652
- import { KeyboardArrowDown as KeyboardArrowDown3, KeyboardArrowRight as KeyboardArrowRight3 } from "@mui/icons-material";
30635
+ import { KeyboardArrowDown as KeyboardArrowDown2, KeyboardArrowRight as KeyboardArrowRight2 } from "@mui/icons-material";
30653
30636
  import { Box as Box15, Typography as Typography10 } from "@mui/material";
30654
- import { useState as useState15 } from "react";
30637
+ import { useState as useState14 } from "react";
30655
30638
  import { jsx as jsx140, jsxs as jsxs130 } from "react/jsx-runtime";
30656
30639
  var ToggleSection = ({ action, children, headline, initialOpen = true }) => {
30657
- const [isOpen, setIsOpen] = useState15(initialOpen);
30640
+ const [isOpen, setIsOpen] = useState14(initialOpen);
30658
30641
  return /* @__PURE__ */ jsxs130(Box15, { sx: { mt: 4 }, children: [
30659
30642
  /* @__PURE__ */ jsxs130(
30660
30643
  Box15,
@@ -30681,7 +30664,7 @@ var ToggleSection = ({ action, children, headline, initialOpen = true }) => {
30681
30664
  },
30682
30665
  children: [
30683
30666
  /* @__PURE__ */ jsx140(Typography10, { sx: { fontWeight: 600 }, variant: "subtitle2", children: headline }),
30684
- isOpen ? /* @__PURE__ */ jsx140(KeyboardArrowDown3, { sx: { color: "text.secondary", height: 20, width: 20 } }) : /* @__PURE__ */ jsx140(KeyboardArrowRight3, { sx: { color: "text.secondary", height: 20, width: 20 } })
30667
+ isOpen ? /* @__PURE__ */ jsx140(KeyboardArrowDown2, { sx: { color: "text.secondary", height: 20, width: 20 } }) : /* @__PURE__ */ jsx140(KeyboardArrowRight2, { sx: { color: "text.secondary", height: 20, width: 20 } })
30685
30668
  ]
30686
30669
  }
30687
30670
  ),
@@ -30715,7 +30698,7 @@ var EventDetails = ({ onClose, selectedEvent }) => {
30715
30698
  () => getEventGroupsByType(selectedEvent?.events ?? []),
30716
30699
  [selectedEvent?.events]
30717
30700
  );
30718
- const [parseNestedJson, setParseNestedJson] = useState16(true);
30701
+ const [parseNestedJson, setParseNestedJson] = useState15(true);
30719
30702
  if (!selectedEvent) {
30720
30703
  return /* @__PURE__ */ jsx141(Box16, { sx: { p: 3, textAlign: "center" }, children: /* @__PURE__ */ jsx141(Typography11, { color: "text.secondary", variant: "body2", children: "Select an event to view details" }) });
30721
30704
  }
@@ -30755,12 +30738,12 @@ var EventDetails = ({ onClose, selectedEvent }) => {
30755
30738
  },
30756
30739
  children: [
30757
30740
  /* @__PURE__ */ jsx141(Box16, { children: /* @__PURE__ */ jsx141(Typography11, { sx: { fontWeight: 600 }, variant: "h6", children: "Operation Details" }) }),
30758
- onClose && /* @__PURE__ */ jsx141(IconButton4, { "data-testid": EVENT_DETAILS_CLOSE_BUTTON_TEST_ID, onClick: onClose, size: "small", children: /* @__PURE__ */ jsx141(Close2, {}) })
30741
+ onClose && /* @__PURE__ */ jsx141(IconButton3, { "data-testid": EVENT_DETAILS_CLOSE_BUTTON_TEST_ID, onClick: onClose, size: "small", children: /* @__PURE__ */ jsx141(Close2, {}) })
30759
30742
  ]
30760
30743
  }
30761
30744
  ),
30762
- /* @__PURE__ */ jsx141(Box16, { sx: { flexGrow: 1, overflow: "auto", p: 2 }, children: /* @__PURE__ */ jsxs131(Stack2, { spacing: 2, children: [
30763
- /* @__PURE__ */ jsx141(ToggleSection, { headline: "Basic Information", children: /* @__PURE__ */ jsxs131(Stack2, { "data-testid": EVENT_DETAILS_SECTION_BASIC_INFORMATION_TEST_ID, spacing: 1, children: [
30745
+ /* @__PURE__ */ jsx141(Box16, { sx: { flexGrow: 1, overflow: "auto", p: 2 }, children: /* @__PURE__ */ jsxs131(Stack3, { spacing: 2, children: [
30746
+ /* @__PURE__ */ jsx141(ToggleSection, { headline: "Basic Information", children: /* @__PURE__ */ jsxs131(Stack3, { "data-testid": EVENT_DETAILS_SECTION_BASIC_INFORMATION_TEST_ID, spacing: 1, children: [
30764
30747
  /* @__PURE__ */ jsxs131(Box16, { sx: { display: "grid", gap: 2, gridTemplateColumns: "1.3fr 1fr" }, children: [
30765
30748
  /* @__PURE__ */ jsxs131(Box16, { children: [
30766
30749
  /* @__PURE__ */ jsx141(Typography11, { sx: { fontWeight: 600 }, variant: "caption", children: "Service" }),
@@ -30810,7 +30793,7 @@ var EventDetails = ({ onClose, selectedEvent }) => {
30810
30793
  ] }),
30811
30794
  /* @__PURE__ */ jsxs131(Box16, { children: [
30812
30795
  /* @__PURE__ */ jsx141(Typography11, { sx: { fontWeight: 600 }, variant: "caption", children: "Status" }),
30813
- /* @__PURE__ */ jsx141(Stack2, { alignItems: "center", direction: "row", flexWrap: "wrap", gap: 1, sx: { mb: eventGroups.errors || eventGroups.warnings ? 1 : 0 }, children: /* @__PURE__ */ jsx141(
30796
+ /* @__PURE__ */ jsx141(Stack3, { alignItems: "center", direction: "row", flexWrap: "wrap", gap: 1, sx: { mb: eventGroups.errors || eventGroups.warnings ? 1 : 0 }, children: /* @__PURE__ */ jsx141(
30814
30797
  Chip3,
30815
30798
  {
30816
30799
  color: selectedEvent.status_code === 2 ? "error" : selectedEvent.status_code === 1 ? "success" : "default",
@@ -30825,7 +30808,7 @@ var EventDetails = ({ onClose, selectedEvent }) => {
30825
30808
  /* @__PURE__ */ jsxs131(ToggleSection, { headline: "Permissions", children: [
30826
30809
  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" }),
30827
30810
  !selectedEvent.iam_errors_suppressed && !eventGroups.permissions && !eventGroups.errors && !eventGroups.warnings && /* @__PURE__ */ jsx141(Typography11, { color: "text.secondary", variant: "body2", children: "There is no permission information available." }),
30828
- eventGroups.permissions && /* @__PURE__ */ jsx141(EventDetail, { displayText: "Permissions", events: eventGroups.permissions, type: "permission" }),
30811
+ eventGroups.permissions && /* @__PURE__ */ jsx141(EventDetail, { displayText: "Permissions", events: eventGroups.permissions, spanStatusCode: selectedEvent.status_code, type: "permission" }),
30829
30812
  eventGroups.errors && /* @__PURE__ */ jsx141(EventDetail, { displayText: "Error", events: eventGroups.errors, type: "error" }),
30830
30813
  eventGroups.warnings && /* @__PURE__ */ jsx141(EventDetail, { displayText: "Warning", events: eventGroups.warnings, type: "warning" })
30831
30814
  ] }),
@@ -30845,7 +30828,7 @@ var EventDetails = ({ onClose, selectedEvent }) => {
30845
30828
  }
30846
30829
  ),
30847
30830
  headline: "Payloads",
30848
- children: /* @__PURE__ */ jsxs131(Stack2, { spacing: 2, children: [
30831
+ children: /* @__PURE__ */ jsxs131(Stack3, { spacing: 2, children: [
30849
30832
  requestPayload !== void 0 && /* @__PURE__ */ jsxs131(Box16, { children: [
30850
30833
  /* @__PURE__ */ jsx141(Typography11, { sx: { fontWeight: 600 }, variant: "caption", children: "Request" }),
30851
30834
  /* @__PURE__ */ jsx141(PayloadViewer, { testId: EVENT_DETAILS_REQUEST_PAYLOAD, value: requestPayload })
@@ -30876,7 +30859,7 @@ var EventDetails = ({ onClose, selectedEvent }) => {
30876
30859
  ) })
30877
30860
  ] }),
30878
30861
  /* @__PURE__ */ jsx141(Divider4, {}),
30879
- /* @__PURE__ */ jsx141(ToggleSection, { headline: "Advanced Information", initialOpen: false, children: /* @__PURE__ */ jsxs131(Stack2, { spacing: 1, children: [
30862
+ /* @__PURE__ */ jsx141(ToggleSection, { headline: "Advanced Information", initialOpen: false, children: /* @__PURE__ */ jsxs131(Stack3, { spacing: 1, children: [
30880
30863
  /* @__PURE__ */ jsxs131(Box16, { children: [
30881
30864
  /* @__PURE__ */ jsx141(Typography11, { sx: { fontWeight: 600 }, variant: "caption", children: "Span ID" }),
30882
30865
  /* @__PURE__ */ jsx141(Typography11, { "data-testid": EVENT_DETAILS_SPAN_ID_TEST_ID, variant: "body2", children: selectedEvent.span_id })
@@ -30902,7 +30885,7 @@ import { Background, MarkerType, Position as Position2, ReactFlow, useEdgesState
30902
30885
  import { useEffect as useEffect20 } from "react";
30903
30886
 
30904
30887
  // src/components/trace-graph/service-node.tsx
30905
- import { Box as Box18, Divider as Divider5, Stack as Stack3, Typography as Typography12, useTheme as useTheme4 } from "@mui/material";
30888
+ import { Box as Box18, Divider as Divider5, Stack as Stack4, Typography as Typography12, useTheme as useTheme4 } from "@mui/material";
30906
30889
  import "@xyflow/react/dist/style.css";
30907
30890
  import { Handle, Position } from "@xyflow/react";
30908
30891
  import { memo as memo11 } from "react";
@@ -30994,14 +30977,14 @@ var ServiceNode = memo11(({ data, selected }) => {
30994
30977
  /* @__PURE__ */ jsx143(Handle, { position: Position.Left, style: handleStyle, type: "target" }),
30995
30978
  /* @__PURE__ */ jsx143(Handle, { position: Position.Right, style: handleStyle, type: "source" }),
30996
30979
  /* @__PURE__ */ jsxs132(
30997
- Stack3,
30980
+ Stack4,
30998
30981
  {
30999
30982
  alignItems: "center",
31000
30983
  direction: "row",
31001
30984
  sx: { gap: "8px", pb: "2px", pt: "6px", px: "8px" },
31002
30985
  children: [
31003
30986
  /* @__PURE__ */ jsx143(Box18, { sx: { borderRadius: "4px", flexShrink: 0, lineHeight: 0, overflow: "hidden" }, children: /* @__PURE__ */ jsx143(AwsServiceIcon, { hideTooltip: true, service: data.event.service_name, size: "medium" }) }),
31004
- /* @__PURE__ */ jsxs132(Stack3, { sx: { minWidth: 0 }, children: [
30987
+ /* @__PURE__ */ jsxs132(Stack4, { sx: { minWidth: 0 }, children: [
31005
30988
  /* @__PURE__ */ jsx143(
31006
30989
  Typography12,
31007
30990
  {
@@ -31027,7 +31010,7 @@ var ServiceNode = memo11(({ data, selected }) => {
31027
31010
  ),
31028
31011
  /* @__PURE__ */ jsx143(Divider5, { sx: { ml: "38px", mr: "8px", my: "5px" } }),
31029
31012
  /* @__PURE__ */ jsxs132(
31030
- Stack3,
31013
+ Stack4,
31031
31014
  {
31032
31015
  alignItems: "center",
31033
31016
  direction: "row",
@@ -31120,7 +31103,7 @@ var getLayoutedNodesAndEdges = (inputNodes, inputEdges) => {
31120
31103
 
31121
31104
  // src/components/trace-graph/xyflow/controls.tsx
31122
31105
  import { Add, FitScreen, Remove } from "@mui/icons-material";
31123
- import { Box as Box19, IconButton as IconButton5 } from "@mui/material";
31106
+ import { Box as Box19, IconButton as IconButton4 } from "@mui/material";
31124
31107
  import { useReactFlow, useStore as useStore2 } from "@xyflow/react";
31125
31108
  import { memo as memo12 } from "react";
31126
31109
  import { shallow } from "zustand/shallow";
@@ -31157,7 +31140,7 @@ var Controls = memo12(() => {
31157
31140
  },
31158
31141
  children: [
31159
31142
  /* @__PURE__ */ jsx144(
31160
- IconButton5,
31143
+ IconButton4,
31161
31144
  {
31162
31145
  className: "react-flow__controls-zoomin",
31163
31146
  disabled: maxZoomReached,
@@ -31167,7 +31150,7 @@ var Controls = memo12(() => {
31167
31150
  }
31168
31151
  ),
31169
31152
  /* @__PURE__ */ jsx144(
31170
- IconButton5,
31153
+ IconButton4,
31171
31154
  {
31172
31155
  className: "react-flow__controls-zoomout",
31173
31156
  disabled: minZoomReached,
@@ -31177,7 +31160,7 @@ var Controls = memo12(() => {
31177
31160
  }
31178
31161
  ),
31179
31162
  /* @__PURE__ */ jsx144(
31180
- IconButton5,
31163
+ IconButton4,
31181
31164
  {
31182
31165
  className: "react-flow__controls-fitview",
31183
31166
  onClick: onFitViewHandler,
@@ -31457,9 +31440,9 @@ async function fetchConnectedTraces(api, traceIds, allSpans = /* @__PURE__ */ ne
31457
31440
  }
31458
31441
  var TraceGraphPage = ({ onClose, spanId, traceId }) => {
31459
31442
  const api = useAppInspectorApi();
31460
- const [spans, setSpans] = useState17();
31461
- const [loading, setLoading] = useState17(false);
31462
- const [fetchError, setFetchError] = useState17();
31443
+ const [spans, setSpans] = useState16();
31444
+ const [loading, setLoading] = useState16(false);
31445
+ const [fetchError, setFetchError] = useState16();
31463
31446
  const fetchSpans = useCallback11(async () => {
31464
31447
  setLoading(true);
31465
31448
  try {
@@ -31476,8 +31459,8 @@ var TraceGraphPage = ({ onClose, spanId, traceId }) => {
31476
31459
  useEffect21(() => {
31477
31460
  void fetchSpans();
31478
31461
  }, [fetchSpans]);
31479
- const [open, setOpen] = useState17(true);
31480
- const [selectedEvent, setSelectedEvent] = useState17(() => spans?.find((span) => span.span_id === spanId));
31462
+ const [open, setOpen] = useState16(true);
31463
+ const [selectedEvent, setSelectedEvent] = useState16(() => spans?.find((span) => span.span_id === spanId));
31481
31464
  const spansReference = useRef17();
31482
31465
  useEffect21(() => {
31483
31466
  if (!spansReference.current && spans) {
@@ -31560,10 +31543,10 @@ var SpansListPage = () => {
31560
31543
  }, [clearSpans]);
31561
31544
  const localstackVersion = status?.localstackVersion ?? (statusError instanceof AppInspectorNotFoundError ? statusError.localstackVersion : void 0);
31562
31545
  const versionCompatibility = checkEmulatorVersion(localstackVersion);
31563
- const [bannerDismissed, setBannerDismissed] = useState18(false);
31546
+ const [bannerDismissed, setBannerDismissed] = useState17(false);
31564
31547
  const [order2, setOrder] = useLocalStorage("spans-order", "oldest_first");
31565
- const [selectedTraceId, setSelectedTraceId] = useState18();
31566
- const [selectedSpanId, setSelectedSpanId] = useState18();
31548
+ const [selectedTraceId, setSelectedTraceId] = useState17();
31549
+ const [selectedSpanId, setSelectedSpanId] = useState17();
31567
31550
  const navigateToSpan = useCallback12((span) => {
31568
31551
  setSelectedTraceId(span.trace_id);
31569
31552
  setSelectedSpanId(span.span_id);