@localstack/appinspector-ui 1.0.116 → 1.0.118

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
@@ -2413,8 +2413,8 @@ var init_event_streams = __esm({
2413
2413
  });
2414
2414
 
2415
2415
  // src/pages/spans-list-page.tsx
2416
- import { Box as Box21 } from "@mui/material";
2417
- import { useCallback as useCallback12, useState as useState18 } from "react";
2416
+ import { Box as Box20 } from "@mui/material";
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";
@@ -18608,15 +18611,15 @@ var useSpans = () => {
18608
18611
 
18609
18612
  // src/pages/trace-graph-page.tsx
18610
18613
  import { ArrowBack } from "@mui/icons-material";
18611
- import { Box as Box20, Button as Button6, Drawer, Paper as Paper3 } from "@mui/material";
18614
+ import { Box as Box19, Button as Button6, Drawer, Paper as Paper3 } from "@mui/material";
18612
18615
  import { styled } from "@mui/material/styles";
18613
18616
  import { ReactFlowProvider } from "@xyflow/react";
18614
- 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";
18615
18618
 
18616
18619
  // src/components/event-details/event-details.tsx
18617
18620
  import { Close as Close2 } from "@mui/icons-material";
18618
- 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";
18619
- 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";
18620
18623
 
18621
18624
  // src/utils/event-utils.ts
18622
18625
  var iamEventParser = (eventName, attributes) => {
@@ -18727,9 +18730,9 @@ var getEventGroupsByType = (events) => {
18727
18730
  };
18728
18731
 
18729
18732
  // src/components/event-details/event-detail.tsx
18730
- import { KeyboardArrowDown as KeyboardArrowDown2, KeyboardArrowRight as KeyboardArrowRight2 } from "@mui/icons-material";
18731
- import { Box as Box13, IconButton as IconButton3, Typography as Typography8 } from "@mui/material";
18732
- 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";
18733
18736
 
18734
18737
  // src/components/status-icon.tsx
18735
18738
  import { Cancel as Cancel2, CheckCircle, Error as Error3, Info, RemoveCircle } from "@mui/icons-material";
@@ -18837,57 +18840,48 @@ var IAMEventDetail = ({ event }) => {
18837
18840
  };
18838
18841
 
18839
18842
  // src/components/event-details/iam-permission-detail.tsx
18840
- import { KeyboardArrowDown, KeyboardArrowRight } from "@mui/icons-material";
18841
- import { Box as Box10, Chip as Chip2, IconButton as IconButton2, Typography as Typography7 } from "@mui/material";
18842
- 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";
18843
18845
  import { jsx as jsx135, jsxs as jsxs126 } from "react/jsx-runtime";
18844
- var getChipColors = (status) => ({
18845
- backgroundColor: getPermissionStatusColor(status),
18846
- color: "white"
18847
- });
18848
- var LabelValue = ({ label, value }) => /* @__PURE__ */ jsxs126(Box10, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr", mb: 0.5 }, children: [
18849
- /* @__PURE__ */ jsx135(Typography7, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: label }),
18850
- /* @__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 })
18851
18854
  ] });
18852
- var IAMPermissionItem = ({ event }) => {
18853
- const [isOpen, setIsOpen] = useState11(false);
18855
+ var IAMPermissionItem = ({ event, spanStatusCode }) => {
18854
18856
  const parsedData = useMemo8(() => {
18855
18857
  const payloadString = event.attributes?.payload;
18856
18858
  if (!payloadString) return;
18857
18859
  const parsedIAM2 = parseIAMEvent(payloadString);
18858
18860
  if (!parsedIAM2) return;
18859
- return { chipColors: getChipColors(parsedIAM2.permission), parsedIAM: parsedIAM2 };
18861
+ return { parsedIAM: parsedIAM2 };
18860
18862
  }, [event.attributes?.payload]);
18861
18863
  if (!parsedData) {
18862
18864
  return null;
18863
18865
  }
18864
- 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" };
18865
18869
  return /* @__PURE__ */ jsxs126(Box10, { sx: { mb: 0.5 }, children: [
18866
- /* @__PURE__ */ jsxs126(Box10, { sx: { alignItems: "center", display: "flex", gap: 1 }, children: [
18867
- /* @__PURE__ */ jsx135(IconButton2, { onClick: () => {
18868
- setIsOpen(!isOpen);
18869
- }, size: "small", sx: { p: 0 }, children: isOpen ? /* @__PURE__ */ jsx135(KeyboardArrowDown, { sx: { fontSize: 16 } }) : /* @__PURE__ */ jsx135(KeyboardArrowRight, { sx: { fontSize: 16 } }) }),
18870
- /* @__PURE__ */ jsx135(Chip2, { label: formatPermissionStatus(parsedIAM.permission), size: "small", sx: { ...chipColors, fontWeight: 500 } }),
18871
- /* @__PURE__ */ jsxs126(Typography7, { color: "text.secondary", noWrap: true, sx: { flex: 1, overflow: "hidden", textOverflow: "ellipsis" }, variant: "caption", children: [
18872
- parsedIAM.service,
18873
- ":",
18874
- parsedIAM.operation
18875
- ] })
18876
- ] }),
18877
- isOpen && /* @__PURE__ */ jsxs126(Box10, { sx: { borderColor: "divider", borderLeft: "2px solid", ml: 1, mt: 0.5, pl: 1.5, py: 0.5 }, children: [
18878
- /* @__PURE__ */ jsx135(LabelValue, { label: "Principal", value: parsedIAM.principal }),
18879
- parsedIAM.details.actions && parsedIAM.details.actions.length > 0 && /* @__PURE__ */ jsxs126(Box10, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr", mb: 0.5 }, children: [
18880
- /* @__PURE__ */ jsx135(Typography7, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: "Actions" }),
18881
- /* @__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))
18882
18876
  ] }),
18883
- parsedIAM.details.resources && parsedIAM.details.resources.length > 0 && /* @__PURE__ */ jsxs126(Box10, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr" }, children: [
18884
- /* @__PURE__ */ jsx135(Typography7, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: "Resources" }),
18885
- /* @__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))
18886
18880
  ] })
18887
18881
  ] })
18888
18882
  ] });
18889
18883
  };
18890
- 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}`)) });
18891
18885
 
18892
18886
  // src/components/event-details/payload-viewer.tsx
18893
18887
  import { Box as Box12, useTheme as useTheme3 } from "@mui/material";
@@ -18896,7 +18890,7 @@ import { Box as Box12, useTheme as useTheme3 } from "@mui/material";
18896
18890
  var import_copy_to_clipboard = __toESM(require_copy_to_clipboard(), 1);
18897
18891
  import { jsx as jsx136, jsxs as jsxs127, Fragment as Fragment9 } from "react/jsx-runtime";
18898
18892
  import { Box as Box11, InputBase, NoSsr, SvgIcon, createTheme, ThemeProvider, Paper as Paper2 } from "@mui/material";
18899
- 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";
18900
18894
  import { create, useStore, createStore } from "zustand";
18901
18895
  function r(e2) {
18902
18896
  var t2, f2, n2 = "";
@@ -19140,7 +19134,7 @@ async function copyString(value) {
19140
19134
  }
19141
19135
  function useClipboard() {
19142
19136
  let { timeout = 2e3 } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
19143
- const [copied, setCopied] = useState12(false);
19137
+ const [copied, setCopied] = useState11(false);
19144
19138
  const copyTimeout = useRef14(null);
19145
19139
  const handleCopyResult = useCallback10((value) => {
19146
19140
  const current = copyTimeout.current;
@@ -19223,7 +19217,7 @@ function useInspect(path, value, nestedIndex) {
19223
19217
  value,
19224
19218
  setInspectCache
19225
19219
  ]);
19226
- const [inspect, set] = useState12(() => {
19220
+ const [inspect, set] = useState11(() => {
19227
19221
  const shouldInspect = getInspectCache(path, nestedIndex);
19228
19222
  if (shouldInspect !== void 0) {
19229
19223
  return shouldInspect;
@@ -19754,7 +19748,7 @@ var ObjectType = (props) => {
19754
19748
  const borderColor = useJsonViewerStore((store) => store.colorspace.base02);
19755
19749
  const groupArraysAfterLength = useJsonViewerStore((store) => store.groupArraysAfterLength);
19756
19750
  const isTrap = useIsCycleReference(props.path, props.value);
19757
- const [displayLength, setDisplayLength] = useState12(useJsonViewerStore((store) => store.maxDisplayLength));
19751
+ const [displayLength, setDisplayLength] = useState11(useJsonViewerStore((store) => store.maxDisplayLength));
19758
19752
  const objectSortKeys = useJsonViewerStore((store) => store.objectSortKeys);
19759
19753
  const elements = useMemo9(() => {
19760
19754
  if (!props.inspect) {
@@ -19960,7 +19954,7 @@ var stringType = defineEasyType({
19960
19954
  serialize: (value) => value,
19961
19955
  deserialize: (value) => value,
19962
19956
  Renderer: (props) => {
19963
- const [showRest, setShowRest] = useState12(false);
19957
+ const [showRest, setShowRest] = useState11(false);
19964
19958
  const collapseStringsAfterLength = useJsonViewerStore((store) => store.collapseStringsAfterLength);
19965
19959
  const value = showRest ? props.value : props.value.slice(0, collapseStringsAfterLength);
19966
19960
  const hasRest = props.value.length > collapseStringsAfterLength;
@@ -20114,7 +20108,7 @@ var DataKeyPair = (props) => {
20114
20108
  storeEditable,
20115
20109
  value
20116
20110
  ]);
20117
- const [tempValue, setTempValue] = useState12("");
20111
+ const [tempValue, setTempValue] = useState11("");
20118
20112
  const depth = path.length;
20119
20113
  const key = path[depth - 1];
20120
20114
  const hoverPath = useJsonViewerStore((store) => store.hoverPath);
@@ -20128,7 +20122,7 @@ var DataKeyPair = (props) => {
20128
20122
  const setHover = useJsonViewerStore((store) => store.setHover);
20129
20123
  const root = useJsonViewerStore((store) => store.value);
20130
20124
  const [inspect, setInspect] = useInspect(path, value, nestedIndex);
20131
- const [editing, setEditing] = useState12(false);
20125
+ const [editing, setEditing] = useState11(false);
20132
20126
  const onChange = useJsonViewerStore((store) => store.onChange);
20133
20127
  const keyColor = useTextColor();
20134
20128
  const numberKeyColor = useJsonViewerStore((store) => store.colorspace.base0C);
@@ -20513,7 +20507,7 @@ var DataKeyPair = (props) => {
20513
20507
  };
20514
20508
  var query = "(prefers-color-scheme: dark)";
20515
20509
  function useThemeDetector() {
20516
- const [isDark, setIsDark] = useState12(false);
20510
+ const [isDark, setIsDark] = useState11(false);
20517
20511
  useEffect17(() => {
20518
20512
  const listener = (e2) => setIsDark(e2.matches);
20519
20513
  setIsDark(window.matchMedia(query).matches);
@@ -20734,8 +20728,8 @@ var DetailRow2 = ({ content, label }) => /* @__PURE__ */ jsxs128(Box13, { sx: {
20734
20728
  /* @__PURE__ */ jsx138(Box13, { children: typeof content === "string" ? /* @__PURE__ */ jsx138(Typography8, { sx: { color: "text.primary", whiteSpace: "pre-wrap" }, variant: "caption", children: content }) : content })
20735
20729
  ] });
20736
20730
  var EventMessage = ({ event }) => {
20737
- const [isOpen, setIsOpen] = useState13(false);
20738
- const [isOverflowing, setIsOverflowing] = useState13(false);
20731
+ const [isOpen, setIsOpen] = useState12(false);
20732
+ const [isOverflowing, setIsOverflowing] = useState12(false);
20739
20733
  const textReference = useRef15(null);
20740
20734
  const parsedMessage = useMemo10(() => parseEventMessage(event), [event]);
20741
20735
  const isIAMPolicyEvent = useMemo10(
@@ -20766,14 +20760,14 @@ var EventMessage = ({ event }) => {
20766
20760
  return /* @__PURE__ */ jsxs128(Box13, { sx: { display: "flex", flexDirection: "column" }, children: [
20767
20761
  /* @__PURE__ */ jsxs128(Box13, { sx: { alignItems: "center", display: "flex" }, children: [
20768
20762
  Boolean(shouldShowToggle) && /* @__PURE__ */ jsx138(
20769
- IconButton3,
20763
+ IconButton2,
20770
20764
  {
20771
20765
  onClick: () => {
20772
20766
  setIsOpen(!isOpen);
20773
20767
  },
20774
20768
  size: "small",
20775
20769
  sx: { mr: 1, p: 0 },
20776
- 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 } })
20777
20771
  }
20778
20772
  ),
20779
20773
  /* @__PURE__ */ jsx138(
@@ -20828,10 +20822,11 @@ var getEventLevelFromGroup = (group4) => {
20828
20822
  var EventDetail = ({
20829
20823
  displayText,
20830
20824
  events,
20825
+ spanStatusCode,
20831
20826
  type
20832
20827
  }) => {
20833
20828
  if (type === "permission") {
20834
- return /* @__PURE__ */ jsx138(IAMPermissionDetail, { events });
20829
+ return /* @__PURE__ */ jsx138(IAMPermissionDetail, { events, spanStatusCode });
20835
20830
  }
20836
20831
  const eventLevel = getEventLevelFromGroup(type);
20837
20832
  return /* @__PURE__ */ jsxs128(Box13, { children: [
@@ -30530,8 +30525,8 @@ var QueryStatus = {
30530
30525
  };
30531
30526
 
30532
30527
  // src/components/event-details/lambda-invoke-logs-section.tsx
30533
- import { Box as Box14, CircularProgress as CircularProgress3, Stack, Typography as Typography9 } from "@mui/material";
30534
- 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";
30535
30530
  import { jsx as jsx139, jsxs as jsxs129 } from "react/jsx-runtime";
30536
30531
  var POLL_INTERVAL_MS = 1e3;
30537
30532
  async function pollQueryResults(client, queryId) {
@@ -30560,9 +30555,9 @@ function useCloudWatchLogsClient(region) {
30560
30555
  return client;
30561
30556
  }
30562
30557
  function useLambdaInvokeLogs(functionName2, requestId, region, startTimeNano, endTimeNano) {
30563
- const [loading, setLoading] = useState14(true);
30564
- const [logs, setLogs] = useState14([]);
30565
- const [error, setError] = useState14();
30558
+ const [loading, setLoading] = useState13(true);
30559
+ const [logs, setLogs] = useState13([]);
30560
+ const [error, setError] = useState13();
30566
30561
  const pollTimerRef = useRef16(null);
30567
30562
  const cloudWatchLogs = useCloudWatchLogsClient(region);
30568
30563
  useEffect19(() => {
@@ -30622,7 +30617,7 @@ function useLambdaInvokeLogs(functionName2, requestId, region, startTimeNano, en
30622
30617
  var LambdaInvokeLogsSection = ({ endTimeNano, functionName: functionName2, region, requestId, startTimeNano }) => {
30623
30618
  const { error, loading, logs } = useLambdaInvokeLogs(functionName2, requestId, region, startTimeNano, endTimeNano);
30624
30619
  if (loading) {
30625
- return /* @__PURE__ */ jsxs129(Stack, { alignItems: "center", direction: "row", spacing: 1, children: [
30620
+ return /* @__PURE__ */ jsxs129(Stack2, { alignItems: "center", direction: "row", spacing: 1, children: [
30626
30621
  /* @__PURE__ */ jsx139(CircularProgress3, { size: 14 }),
30627
30622
  /* @__PURE__ */ jsx139(Typography9, { color: "text.secondary", variant: "body2", children: "Loading logs\u2026" })
30628
30623
  ] });
@@ -30637,12 +30632,12 @@ var LambdaInvokeLogsSection = ({ endTimeNano, functionName: functionName2, regio
30637
30632
  };
30638
30633
 
30639
30634
  // src/components/event-details/toggle-section.tsx
30640
- import { KeyboardArrowDown as KeyboardArrowDown3, KeyboardArrowRight as KeyboardArrowRight3 } from "@mui/icons-material";
30635
+ import { KeyboardArrowDown as KeyboardArrowDown2, KeyboardArrowRight as KeyboardArrowRight2 } from "@mui/icons-material";
30641
30636
  import { Box as Box15, Typography as Typography10 } from "@mui/material";
30642
- import { useState as useState15 } from "react";
30637
+ import { useState as useState14 } from "react";
30643
30638
  import { jsx as jsx140, jsxs as jsxs130 } from "react/jsx-runtime";
30644
30639
  var ToggleSection = ({ action, children, headline, initialOpen = true }) => {
30645
- const [isOpen, setIsOpen] = useState15(initialOpen);
30640
+ const [isOpen, setIsOpen] = useState14(initialOpen);
30646
30641
  return /* @__PURE__ */ jsxs130(Box15, { sx: { mt: 4 }, children: [
30647
30642
  /* @__PURE__ */ jsxs130(
30648
30643
  Box15,
@@ -30669,7 +30664,7 @@ var ToggleSection = ({ action, children, headline, initialOpen = true }) => {
30669
30664
  },
30670
30665
  children: [
30671
30666
  /* @__PURE__ */ jsx140(Typography10, { sx: { fontWeight: 600 }, variant: "subtitle2", children: headline }),
30672
- 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 } })
30673
30668
  ]
30674
30669
  }
30675
30670
  ),
@@ -30703,7 +30698,7 @@ var EventDetails = ({ onClose, selectedEvent }) => {
30703
30698
  () => getEventGroupsByType(selectedEvent?.events ?? []),
30704
30699
  [selectedEvent?.events]
30705
30700
  );
30706
- const [parseNestedJson, setParseNestedJson] = useState16(true);
30701
+ const [parseNestedJson, setParseNestedJson] = useState15(true);
30707
30702
  if (!selectedEvent) {
30708
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" }) });
30709
30704
  }
@@ -30743,12 +30738,12 @@ var EventDetails = ({ onClose, selectedEvent }) => {
30743
30738
  },
30744
30739
  children: [
30745
30740
  /* @__PURE__ */ jsx141(Box16, { children: /* @__PURE__ */ jsx141(Typography11, { sx: { fontWeight: 600 }, variant: "h6", children: "Operation Details" }) }),
30746
- 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, {}) })
30747
30742
  ]
30748
30743
  }
30749
30744
  ),
30750
- /* @__PURE__ */ jsx141(Box16, { sx: { flexGrow: 1, overflow: "auto", p: 2 }, children: /* @__PURE__ */ jsxs131(Stack2, { spacing: 2, children: [
30751
- /* @__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: [
30752
30747
  /* @__PURE__ */ jsxs131(Box16, { sx: { display: "grid", gap: 2, gridTemplateColumns: "1.3fr 1fr" }, children: [
30753
30748
  /* @__PURE__ */ jsxs131(Box16, { children: [
30754
30749
  /* @__PURE__ */ jsx141(Typography11, { sx: { fontWeight: 600 }, variant: "caption", children: "Service" }),
@@ -30798,7 +30793,7 @@ var EventDetails = ({ onClose, selectedEvent }) => {
30798
30793
  ] }),
30799
30794
  /* @__PURE__ */ jsxs131(Box16, { children: [
30800
30795
  /* @__PURE__ */ jsx141(Typography11, { sx: { fontWeight: 600 }, variant: "caption", children: "Status" }),
30801
- /* @__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(
30802
30797
  Chip3,
30803
30798
  {
30804
30799
  color: selectedEvent.status_code === 2 ? "error" : selectedEvent.status_code === 1 ? "success" : "default",
@@ -30813,7 +30808,7 @@ var EventDetails = ({ onClose, selectedEvent }) => {
30813
30808
  /* @__PURE__ */ jsxs131(ToggleSection, { headline: "Permissions", children: [
30814
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" }),
30815
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." }),
30816
- 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" }),
30817
30812
  eventGroups.errors && /* @__PURE__ */ jsx141(EventDetail, { displayText: "Error", events: eventGroups.errors, type: "error" }),
30818
30813
  eventGroups.warnings && /* @__PURE__ */ jsx141(EventDetail, { displayText: "Warning", events: eventGroups.warnings, type: "warning" })
30819
30814
  ] }),
@@ -30833,7 +30828,7 @@ var EventDetails = ({ onClose, selectedEvent }) => {
30833
30828
  }
30834
30829
  ),
30835
30830
  headline: "Payloads",
30836
- children: /* @__PURE__ */ jsxs131(Stack2, { spacing: 2, children: [
30831
+ children: /* @__PURE__ */ jsxs131(Stack3, { spacing: 2, children: [
30837
30832
  requestPayload !== void 0 && /* @__PURE__ */ jsxs131(Box16, { children: [
30838
30833
  /* @__PURE__ */ jsx141(Typography11, { sx: { fontWeight: 600 }, variant: "caption", children: "Request" }),
30839
30834
  /* @__PURE__ */ jsx141(PayloadViewer, { testId: EVENT_DETAILS_REQUEST_PAYLOAD, value: requestPayload })
@@ -30864,7 +30859,7 @@ var EventDetails = ({ onClose, selectedEvent }) => {
30864
30859
  ) })
30865
30860
  ] }),
30866
30861
  /* @__PURE__ */ jsx141(Divider4, {}),
30867
- /* @__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: [
30868
30863
  /* @__PURE__ */ jsxs131(Box16, { children: [
30869
30864
  /* @__PURE__ */ jsx141(Typography11, { sx: { fontWeight: 600 }, variant: "caption", children: "Span ID" }),
30870
30865
  /* @__PURE__ */ jsx141(Typography11, { "data-testid": EVENT_DETAILS_SPAN_ID_TEST_ID, variant: "body2", children: selectedEvent.span_id })
@@ -30890,64 +30885,12 @@ import { Background, MarkerType, Position as Position2, ReactFlow, useEdgesState
30890
30885
  import { useEffect as useEffect20 } from "react";
30891
30886
 
30892
30887
  // src/components/trace-graph/service-node.tsx
30893
- import { Box as Box18, Divider as Divider5, Stack as Stack3, Typography as Typography12, useTheme as useTheme4 } from "@mui/material";
30888
+ import { Cancel as Cancel3, GppBad as GppBad2 } from "@mui/icons-material";
30889
+ import { Box as Box17, Divider as Divider5, Stack as Stack4, Tooltip as Tooltip5, Typography as Typography12, useTheme as useTheme4 } from "@mui/material";
30894
30890
  import "@xyflow/react/dist/style.css";
30895
30891
  import { Handle, Position } from "@xyflow/react";
30896
- import { memo as memo11 } from "react";
30897
-
30898
- // src/components/trace-graph/problem-indicator.tsx
30899
- import { Error as ErrorIcon2, Info as Info2, Warning as Warning2 } from "@mui/icons-material";
30900
- import { Box as Box17, Tooltip as Tooltip5 } from "@mui/material";
30901
- import { useMemo as useMemo13 } from "react";
30902
- import { jsx as jsx142 } from "react/jsx-runtime";
30903
- var ProblemIndicator = ({ error }) => {
30904
- const icon = useMemo13(() => {
30905
- switch (error.level) {
30906
- case "error": {
30907
- return /* @__PURE__ */ jsx142(ErrorIcon2, { sx: { color: "#d32f2f", fontSize: "14px" } });
30908
- }
30909
- case "warning": {
30910
- return /* @__PURE__ */ jsx142(Warning2, { sx: { color: "#ff9800", fontSize: "14px" } });
30911
- }
30912
- default: {
30913
- return /* @__PURE__ */ jsx142(Info2, { sx: { color: "#2196f3", fontSize: "14px" } });
30914
- }
30915
- }
30916
- }, [error.level]);
30917
- const color2 = useMemo13(() => {
30918
- switch (error.level) {
30919
- case "error": {
30920
- return "#d32f2f";
30921
- }
30922
- case "warning": {
30923
- return "#ff9800";
30924
- }
30925
- default: {
30926
- return "#2196f3";
30927
- }
30928
- }
30929
- }, [error.level]);
30930
- return /* @__PURE__ */ jsx142(Tooltip5, { arrow: true, title: error.message ?? "Issue detected", children: /* @__PURE__ */ jsx142(
30931
- Box17,
30932
- {
30933
- sx: {
30934
- alignItems: "center",
30935
- backgroundColor: `${color2}15`,
30936
- border: `1px solid ${color2}`,
30937
- borderRadius: "50%",
30938
- cursor: "pointer",
30939
- display: "inline-flex",
30940
- height: "18px",
30941
- justifyContent: "center",
30942
- width: "18px"
30943
- },
30944
- children: icon
30945
- }
30946
- ) });
30947
- };
30948
-
30949
- // src/components/trace-graph/service-node.tsx
30950
- import { jsx as jsx143, jsxs as jsxs132 } from "react/jsx-runtime";
30892
+ import { memo as memo11, useMemo as useMemo13 } from "react";
30893
+ import { jsx as jsx142, jsxs as jsxs132 } from "react/jsx-runtime";
30951
30894
  var handleStyle = {
30952
30895
  backgroundColor: "white",
30953
30896
  borderColor: "lightgray",
@@ -30955,9 +30898,17 @@ var handleStyle = {
30955
30898
  };
30956
30899
  var ServiceNode = memo11(({ data, selected }) => {
30957
30900
  const theme = useTheme4();
30958
- const hasErrors = (data.event.errors && data.event.errors.length > 0) ?? false;
30901
+ const isError = data.event.status_code === 2;
30902
+ const hasPermissionEvents = useMemo13(
30903
+ () => data.event.events.some(
30904
+ (event) => event.event_type === "iam.policy_evaluation" && event.name === "iam.policy.denied"
30905
+ ),
30906
+ [data.event.events]
30907
+ );
30908
+ const isWarning = !isError && data.event.status_code === 1 && hasPermissionEvents;
30909
+ const outlineColor = isError ? theme.palette.error.main : isWarning ? theme.palette.warning.main : void 0;
30959
30910
  return /* @__PURE__ */ jsxs132(
30960
- Box18,
30911
+ Box17,
30961
30912
  {
30962
30913
  "data-testid": SERVICE_NODE_TEST_ID,
30963
30914
  role: "button",
@@ -30966,31 +30917,31 @@ var ServiceNode = memo11(({ data, selected }) => {
30966
30917
  boxShadow: theme.palette.mode === "dark" ? "0 4px 12px rgba(0,0,0,0.6)" : "0 4px 12px rgba(0,0,0,0.22)"
30967
30918
  },
30968
30919
  "backgroundColor": theme.palette.background.paper,
30969
- "borderLeft": `3px solid ${hasErrors ? theme.palette.error.main : "transparent"}`,
30920
+ "borderLeft": `3px solid ${outlineColor ?? "transparent"}`,
30970
30921
  "borderRadius": 1,
30971
30922
  "boxShadow": theme.palette.mode === "dark" ? "0 1px 4px rgba(0,0,0,0.5)" : "0 1px 4px rgba(0,0,0,0.13)",
30972
30923
  "cursor": "pointer",
30973
30924
  "maxWidth": 220,
30974
30925
  "minWidth": 140,
30975
- "outline": selected ? `2px solid ${hasErrors ? theme.palette.error.main : theme.palette.primary.main}` : hasErrors ? `1px solid ${theme.palette.error.main}` : `1px solid ${theme.palette.divider}`,
30926
+ "outline": selected ? `2px solid ${theme.palette.primary.main}` : `1px solid ${theme.palette.divider}`,
30976
30927
  "overflow": "hidden",
30977
30928
  "position": "relative",
30978
30929
  "transition": "all 0.3s ease"
30979
30930
  },
30980
30931
  tabIndex: 0,
30981
30932
  children: [
30982
- /* @__PURE__ */ jsx143(Handle, { position: Position.Left, style: handleStyle, type: "target" }),
30983
- /* @__PURE__ */ jsx143(Handle, { position: Position.Right, style: handleStyle, type: "source" }),
30933
+ /* @__PURE__ */ jsx142(Handle, { position: Position.Left, style: handleStyle, type: "target" }),
30934
+ /* @__PURE__ */ jsx142(Handle, { position: Position.Right, style: handleStyle, type: "source" }),
30984
30935
  /* @__PURE__ */ jsxs132(
30985
- Stack3,
30936
+ Stack4,
30986
30937
  {
30987
30938
  alignItems: "center",
30988
30939
  direction: "row",
30989
30940
  sx: { gap: "8px", pb: "2px", pt: "6px", px: "8px" },
30990
30941
  children: [
30991
- /* @__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" }) }),
30992
- /* @__PURE__ */ jsxs132(Stack3, { sx: { minWidth: 0 }, children: [
30993
- /* @__PURE__ */ jsx143(
30942
+ /* @__PURE__ */ jsx142(Box17, { sx: { borderRadius: "4px", flexShrink: 0, lineHeight: 0, overflow: "hidden" }, children: /* @__PURE__ */ jsx142(AwsServiceIcon, { hideTooltip: true, service: data.event.service_name, size: "medium" }) }),
30943
+ /* @__PURE__ */ jsxs132(Stack4, { sx: { minWidth: 0 }, children: [
30944
+ /* @__PURE__ */ jsx142(
30994
30945
  Typography12,
30995
30946
  {
30996
30947
  noWrap: true,
@@ -30999,7 +30950,7 @@ var ServiceNode = memo11(({ data, selected }) => {
30999
30950
  children: getServiceDisplayName(data.event.service_name)
31000
30951
  }
31001
30952
  ),
31002
- data.event.resource_name != "" && /* @__PURE__ */ jsx143(
30953
+ data.event.resource_name != "" && /* @__PURE__ */ jsx142(
31003
30954
  Typography12,
31004
30955
  {
31005
30956
  color: "text.secondary",
@@ -31013,16 +30964,16 @@ var ServiceNode = memo11(({ data, selected }) => {
31013
30964
  ]
31014
30965
  }
31015
30966
  ),
31016
- /* @__PURE__ */ jsx143(Divider5, { sx: { ml: "38px", mr: "8px", my: "5px" } }),
30967
+ /* @__PURE__ */ jsx142(Divider5, { sx: { ml: "38px", mr: "8px", my: "5px" } }),
31017
30968
  /* @__PURE__ */ jsxs132(
31018
- Stack3,
30969
+ Stack4,
31019
30970
  {
31020
30971
  alignItems: "center",
31021
30972
  direction: "row",
31022
30973
  sx: { minWidth: 0, pb: "5px", pr: "8px", pt: "1px" },
31023
30974
  children: [
31024
- /* @__PURE__ */ jsx143(
31025
- Box18,
30975
+ /* @__PURE__ */ jsxs132(
30976
+ Box17,
31026
30977
  {
31027
30978
  sx: {
31028
30979
  alignItems: "center",
@@ -31031,10 +30982,13 @@ var ServiceNode = memo11(({ data, selected }) => {
31031
30982
  justifyContent: "center",
31032
30983
  width: "38px"
31033
30984
  },
31034
- children: hasErrors && data.event.errors?.map((error) => /* @__PURE__ */ jsx143(ProblemIndicator, { error }, error.span_id))
30985
+ children: [
30986
+ (isError || isWarning) && hasPermissionEvents && /* @__PURE__ */ jsx142(Tooltip5, { arrow: true, title: "Permission denied", children: /* @__PURE__ */ jsx142(GppBad2, { sx: { color: isError ? theme.palette.error.main : theme.palette.warning.main, fontSize: "16px" } }) }),
30987
+ isError && !hasPermissionEvents && /* @__PURE__ */ jsx142(Tooltip5, { arrow: true, title: "Error", children: /* @__PURE__ */ jsx142(Cancel3, { sx: { color: theme.palette.error.main, fontSize: "16px" } }) })
30988
+ ]
31035
30989
  }
31036
30990
  ),
31037
- /* @__PURE__ */ jsx143(
30991
+ /* @__PURE__ */ jsx142(
31038
30992
  Typography12,
31039
30993
  {
31040
30994
  "data-testid": SERVICE_NODE_OPERATION_NAME_TEST_ID,
@@ -31108,11 +31062,11 @@ var getLayoutedNodesAndEdges = (inputNodes, inputEdges) => {
31108
31062
 
31109
31063
  // src/components/trace-graph/xyflow/controls.tsx
31110
31064
  import { Add, FitScreen, Remove } from "@mui/icons-material";
31111
- import { Box as Box19, IconButton as IconButton5 } from "@mui/material";
31065
+ import { Box as Box18, IconButton as IconButton4 } from "@mui/material";
31112
31066
  import { useReactFlow, useStore as useStore2 } from "@xyflow/react";
31113
31067
  import { memo as memo12 } from "react";
31114
31068
  import { shallow } from "zustand/shallow";
31115
- import { jsx as jsx144, jsxs as jsxs133 } from "react/jsx-runtime";
31069
+ import { jsx as jsx143, jsxs as jsxs133 } from "react/jsx-runtime";
31116
31070
  var selector = (s2) => ({
31117
31071
  isInteractive: s2.nodesDraggable || s2.nodesConnectable || s2.elementsSelectable,
31118
31072
  maxZoomReached: s2.transform[2] >= s2.maxZoom,
@@ -31131,7 +31085,7 @@ var Controls = memo12(() => {
31131
31085
  void fitView();
31132
31086
  };
31133
31087
  return /* @__PURE__ */ jsxs133(
31134
- Box19,
31088
+ Box18,
31135
31089
  {
31136
31090
  sx: {
31137
31091
  bottom: 0,
@@ -31144,33 +31098,33 @@ var Controls = memo12(() => {
31144
31098
  zIndex: 5
31145
31099
  },
31146
31100
  children: [
31147
- /* @__PURE__ */ jsx144(
31148
- IconButton5,
31101
+ /* @__PURE__ */ jsx143(
31102
+ IconButton4,
31149
31103
  {
31150
31104
  className: "react-flow__controls-zoomin",
31151
31105
  disabled: maxZoomReached,
31152
31106
  onClick: onZoomInHandler,
31153
31107
  size: "small",
31154
- children: /* @__PURE__ */ jsx144(Add, {})
31108
+ children: /* @__PURE__ */ jsx143(Add, {})
31155
31109
  }
31156
31110
  ),
31157
- /* @__PURE__ */ jsx144(
31158
- IconButton5,
31111
+ /* @__PURE__ */ jsx143(
31112
+ IconButton4,
31159
31113
  {
31160
31114
  className: "react-flow__controls-zoomout",
31161
31115
  disabled: minZoomReached,
31162
31116
  onClick: onZoomOutHandler,
31163
31117
  size: "small",
31164
- children: /* @__PURE__ */ jsx144(Remove, {})
31118
+ children: /* @__PURE__ */ jsx143(Remove, {})
31165
31119
  }
31166
31120
  ),
31167
- /* @__PURE__ */ jsx144(
31168
- IconButton5,
31121
+ /* @__PURE__ */ jsx143(
31122
+ IconButton4,
31169
31123
  {
31170
31124
  className: "react-flow__controls-fitview",
31171
31125
  onClick: onFitViewHandler,
31172
31126
  size: "small",
31173
- children: /* @__PURE__ */ jsx144(FitScreen, {})
31127
+ children: /* @__PURE__ */ jsx143(FitScreen, {})
31174
31128
  }
31175
31129
  )
31176
31130
  ]
@@ -31179,7 +31133,7 @@ var Controls = memo12(() => {
31179
31133
  });
31180
31134
 
31181
31135
  // src/components/trace-graph/trace-graph.tsx
31182
- import { Fragment as Fragment12, jsx as jsx145, jsxs as jsxs134 } from "react/jsx-runtime";
31136
+ import { Fragment as Fragment12, jsx as jsx144, jsxs as jsxs134 } from "react/jsx-runtime";
31183
31137
  var nodeTypes = {
31184
31138
  service: ServiceNode
31185
31139
  };
@@ -31246,7 +31200,7 @@ var TraceGraph = ({
31246
31200
  spans.error && /* @__PURE__ */ jsxs134(
31247
31201
  Alert5,
31248
31202
  {
31249
- action: /* @__PURE__ */ jsx145(Button5, { onClick: () => {
31203
+ action: /* @__PURE__ */ jsx144(Button5, { onClick: () => {
31250
31204
  onRefresh();
31251
31205
  }, children: "Retry" }),
31252
31206
  severity: "error",
@@ -31275,8 +31229,8 @@ var TraceGraph = ({
31275
31229
  onNodesChange,
31276
31230
  selectNodesOnDrag: false,
31277
31231
  children: [
31278
- /* @__PURE__ */ jsx145(Controls, {}),
31279
- /* @__PURE__ */ jsx145(
31232
+ /* @__PURE__ */ jsx144(Controls, {}),
31233
+ /* @__PURE__ */ jsx144(
31280
31234
  Background,
31281
31235
  {
31282
31236
  bgColor: theme.palette.background.default,
@@ -31290,7 +31244,7 @@ var TraceGraph = ({
31290
31244
  };
31291
31245
 
31292
31246
  // src/pages/trace-graph-page.tsx
31293
- import { Fragment as Fragment13, jsx as jsx146, jsxs as jsxs135 } from "react/jsx-runtime";
31247
+ import { Fragment as Fragment13, jsx as jsx145, jsxs as jsxs135 } from "react/jsx-runtime";
31294
31248
  var HEADER_HEIGHT = 56;
31295
31249
  var DRAWER_WIDTH = "35%";
31296
31250
  var Main = styled("main", { shouldForwardProp: (property) => property !== "open" })(({ open, theme }) => ({
@@ -31340,7 +31294,7 @@ var TraceGraphView = ({
31340
31294
  }) => {
31341
31295
  const shouldShowStatusMessage = Boolean(statusError) || status?.status === "DISABLED";
31342
31296
  return /* @__PURE__ */ jsxs135(
31343
- Box20,
31297
+ Box19,
31344
31298
  {
31345
31299
  "data-testid": TRACE_GRAPH_PAGE_TEST_ID,
31346
31300
  sx: {
@@ -31352,13 +31306,13 @@ var TraceGraphView = ({
31352
31306
  overflow: "hidden"
31353
31307
  },
31354
31308
  children: [
31355
- /* @__PURE__ */ jsxs135(Box20, { sx: { display: "flex", width: "100%" }, children: [
31356
- /* @__PURE__ */ jsx146(Button6, { onClick: () => {
31309
+ /* @__PURE__ */ jsxs135(Box19, { sx: { display: "flex", width: "100%" }, children: [
31310
+ /* @__PURE__ */ jsx145(Button6, { onClick: () => {
31357
31311
  navigateToSpansList();
31358
- }, startIcon: /* @__PURE__ */ jsx146(ArrowBack, {}), children: "Go back" }),
31359
- /* @__PURE__ */ jsx146(Box20, { sx: { flexGrow: 1 } })
31312
+ }, startIcon: /* @__PURE__ */ jsx145(ArrowBack, {}), children: "Go back" }),
31313
+ /* @__PURE__ */ jsx145(Box19, { sx: { flexGrow: 1 } })
31360
31314
  ] }),
31361
- /* @__PURE__ */ jsx146(
31315
+ /* @__PURE__ */ jsx145(
31362
31316
  Paper3,
31363
31317
  {
31364
31318
  sx: {
@@ -31368,7 +31322,7 @@ var TraceGraphView = ({
31368
31322
  position: "relative",
31369
31323
  width: "100%"
31370
31324
  },
31371
- children: shouldShowStatusMessage ? /* @__PURE__ */ jsx146(
31325
+ children: shouldShowStatusMessage ? /* @__PURE__ */ jsx145(
31372
31326
  StatusMessage,
31373
31327
  {
31374
31328
  error: statusError,
@@ -31377,14 +31331,14 @@ var TraceGraphView = ({
31377
31331
  status
31378
31332
  }
31379
31333
  ) : /* @__PURE__ */ jsxs135(Fragment13, { children: [
31380
- /* @__PURE__ */ jsx146(Main, { open, children: /* @__PURE__ */ jsx146(
31381
- Box20,
31334
+ /* @__PURE__ */ jsx145(Main, { open, children: /* @__PURE__ */ jsx145(
31335
+ Box19,
31382
31336
  {
31383
31337
  sx: {
31384
31338
  height: "100%",
31385
31339
  overflow: "auto"
31386
31340
  },
31387
- children: traceId !== void 0 && /* @__PURE__ */ jsx146(ReactFlowProvider, { children: /* @__PURE__ */ jsx146(
31341
+ children: traceId !== void 0 && /* @__PURE__ */ jsx145(ReactFlowProvider, { children: /* @__PURE__ */ jsx145(
31388
31342
  TraceGraph,
31389
31343
  {
31390
31344
  initialFocusEventId: spanId,
@@ -31401,7 +31355,7 @@ var TraceGraphView = ({
31401
31355
  ) })
31402
31356
  }
31403
31357
  ) }),
31404
- /* @__PURE__ */ jsx146(StyledDrawer, { anchor: "right", open, variant: "persistent", children: /* @__PURE__ */ jsx146(EventDetails, { onClose: handleClose, selectedEvent }) })
31358
+ /* @__PURE__ */ jsx145(StyledDrawer, { anchor: "right", open, variant: "persistent", children: /* @__PURE__ */ jsx145(EventDetails, { onClose: handleClose, selectedEvent }) })
31405
31359
  ] })
31406
31360
  }
31407
31361
  )
@@ -31445,9 +31399,9 @@ async function fetchConnectedTraces(api, traceIds, allSpans = /* @__PURE__ */ ne
31445
31399
  }
31446
31400
  var TraceGraphPage = ({ onClose, spanId, traceId }) => {
31447
31401
  const api = useAppInspectorApi();
31448
- const [spans, setSpans] = useState17();
31449
- const [loading, setLoading] = useState17(false);
31450
- const [fetchError, setFetchError] = useState17();
31402
+ const [spans, setSpans] = useState16();
31403
+ const [loading, setLoading] = useState16(false);
31404
+ const [fetchError, setFetchError] = useState16();
31451
31405
  const fetchSpans = useCallback11(async () => {
31452
31406
  setLoading(true);
31453
31407
  try {
@@ -31464,8 +31418,8 @@ var TraceGraphPage = ({ onClose, spanId, traceId }) => {
31464
31418
  useEffect21(() => {
31465
31419
  void fetchSpans();
31466
31420
  }, [fetchSpans]);
31467
- const [open, setOpen] = useState17(true);
31468
- const [selectedEvent, setSelectedEvent] = useState17(() => spans?.find((span) => span.span_id === spanId));
31421
+ const [open, setOpen] = useState16(true);
31422
+ const [selectedEvent, setSelectedEvent] = useState16(() => spans?.find((span) => span.span_id === spanId));
31469
31423
  const spansReference = useRef17();
31470
31424
  useEffect21(() => {
31471
31425
  if (!spansReference.current && spans) {
@@ -31494,7 +31448,7 @@ var TraceGraphPage = ({ onClose, spanId, traceId }) => {
31494
31448
  const navigateToSpansList = useCallback11(() => {
31495
31449
  onClose?.();
31496
31450
  }, [onClose]);
31497
- return /* @__PURE__ */ jsx146(
31451
+ return /* @__PURE__ */ jsx145(
31498
31452
  TraceGraphView,
31499
31453
  {
31500
31454
  fetchError,
@@ -31519,7 +31473,7 @@ var TraceGraphPage = ({ onClose, spanId, traceId }) => {
31519
31473
  };
31520
31474
 
31521
31475
  // src/pages/spans-list-page.tsx
31522
- import { Fragment as Fragment14, jsx as jsx147, jsxs as jsxs136 } from "react/jsx-runtime";
31476
+ import { Fragment as Fragment14, jsx as jsx146, jsxs as jsxs136 } from "react/jsx-runtime";
31523
31477
  var SpansListPage = () => {
31524
31478
  const api = useAppInspectorApi();
31525
31479
  const {
@@ -31548,10 +31502,10 @@ var SpansListPage = () => {
31548
31502
  }, [clearSpans]);
31549
31503
  const localstackVersion = status?.localstackVersion ?? (statusError instanceof AppInspectorNotFoundError ? statusError.localstackVersion : void 0);
31550
31504
  const versionCompatibility = checkEmulatorVersion(localstackVersion);
31551
- const [bannerDismissed, setBannerDismissed] = useState18(false);
31505
+ const [bannerDismissed, setBannerDismissed] = useState17(false);
31552
31506
  const [order2, setOrder] = useLocalStorage("spans-order", "oldest_first");
31553
- const [selectedTraceId, setSelectedTraceId] = useState18();
31554
- const [selectedSpanId, setSelectedSpanId] = useState18();
31507
+ const [selectedTraceId, setSelectedTraceId] = useState17();
31508
+ const [selectedSpanId, setSelectedSpanId] = useState17();
31555
31509
  const navigateToSpan = useCallback12((span) => {
31556
31510
  setSelectedTraceId(span.trace_id);
31557
31511
  setSelectedSpanId(span.span_id);
@@ -31568,7 +31522,7 @@ var SpansListPage = () => {
31568
31522
  const shouldShowStatusMessage = Boolean(statusError) || status?.status === "DISABLED";
31569
31523
  return /* @__PURE__ */ jsxs136(Fragment14, { children: [
31570
31524
  /* @__PURE__ */ jsxs136(
31571
- Box21,
31525
+ Box20,
31572
31526
  {
31573
31527
  "data-testid": SPANS_LIST_PAGE_TEST_ID,
31574
31528
  sx: {
@@ -31583,7 +31537,7 @@ var SpansListPage = () => {
31583
31537
  width: "100%"
31584
31538
  },
31585
31539
  children: [
31586
- !checking && !shouldShowStatusMessage && /* @__PURE__ */ jsx147(
31540
+ !checking && !shouldShowStatusMessage && /* @__PURE__ */ jsx146(
31587
31541
  EmulatorVersionBanner,
31588
31542
  {
31589
31543
  compatibility: bannerDismissed && versionCompatibility === "warning" ? "ok" : versionCompatibility,
@@ -31593,7 +31547,7 @@ var SpansListPage = () => {
31593
31547
  } : void 0
31594
31548
  }
31595
31549
  ),
31596
- shouldShowStatusMessage ? /* @__PURE__ */ jsx147(
31550
+ shouldShowStatusMessage ? /* @__PURE__ */ jsx146(
31597
31551
  StatusMessage,
31598
31552
  {
31599
31553
  error: statusError,
@@ -31602,7 +31556,7 @@ var SpansListPage = () => {
31602
31556
  onRetry: handleRetry,
31603
31557
  status
31604
31558
  }
31605
- ) : /* @__PURE__ */ jsx147(
31559
+ ) : /* @__PURE__ */ jsx146(
31606
31560
  SpansList,
31607
31561
  {
31608
31562
  clearingSpans,
@@ -31630,7 +31584,7 @@ var SpansListPage = () => {
31630
31584
  ]
31631
31585
  }
31632
31586
  ),
31633
- selectedTraceId !== void 0 && /* @__PURE__ */ jsx147(TraceGraphPage, { onClose: () => {
31587
+ selectedTraceId !== void 0 && /* @__PURE__ */ jsx146(TraceGraphPage, { onClose: () => {
31634
31588
  setSelectedTraceId(void 0);
31635
31589
  }, spanId: selectedSpanId, traceId: selectedTraceId })
31636
31590
  ] });