@localstack/appinspector-ui 1.0.18 → 1.0.20

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
@@ -149,7 +149,7 @@ var ResponsiveTimestampCell = ({ locale, value }) => {
149
149
  };
150
150
 
151
151
  // src/components/cells/service-cell.tsx
152
- import { Box as Box3, Typography } from "@mui/material";
152
+ import { Box as Box3, Divider, Typography } from "@mui/material";
153
153
 
154
154
  // src/components/aws-service-icon/aws-service-icon.tsx
155
155
  import { Tooltip as Tooltip2 } from "@mui/material";
@@ -2498,11 +2498,9 @@ var AwsServiceIcon = ({ hideTooltip, service, size = "medium", title }) => {
2498
2498
  // src/components/cells/pill-cell.tsx
2499
2499
  import { Box as Box2 } from "@mui/material";
2500
2500
  import { jsx as jsx123 } from "react/jsx-runtime";
2501
- var defaultBackgroundColor = "background.paper";
2502
- var defaultBorderColor = "palette.divider";
2503
2501
  var PillCell = ({
2504
- backgroundColor = defaultBackgroundColor,
2505
- borderColor = defaultBorderColor,
2502
+ backgroundColor,
2503
+ borderColor,
2506
2504
  borderWidth = "1px",
2507
2505
  children,
2508
2506
  height = "24px",
@@ -2514,8 +2512,8 @@ var PillCell = ({
2514
2512
  {
2515
2513
  sx: {
2516
2514
  alignItems: "center",
2517
- backgroundColor,
2518
- borderColor,
2515
+ backgroundColor: backgroundColor ?? ((theme) => theme.palette.background.paper),
2516
+ borderColor: borderColor ?? ((theme) => theme.palette.divider),
2519
2517
  borderRadius: "16px",
2520
2518
  borderStyle: "solid",
2521
2519
  borderWidth,
@@ -2532,10 +2530,10 @@ var PillCell = ({
2532
2530
  };
2533
2531
 
2534
2532
  // src/components/cells/service-cell.tsx
2535
- import { jsx as jsx124, jsxs as jsxs119 } from "react/jsx-runtime";
2533
+ import { Fragment as Fragment2, jsx as jsx124, jsxs as jsxs119 } from "react/jsx-runtime";
2536
2534
  var truncateName = (inputString, truncateLength = 15) => inputString.length > truncateLength ? `${inputString.slice(0, truncateLength - 3)}...` : inputString;
2537
2535
  var ServiceCell = ({
2538
- borderColor = defaultBorderColor,
2536
+ borderColor,
2539
2537
  borderWidth,
2540
2538
  height = "24px",
2541
2539
  resource,
@@ -2545,31 +2543,28 @@ var ServiceCell = ({
2545
2543
  width = "32px"
2546
2544
  }) => {
2547
2545
  return /* @__PURE__ */ jsx124(Box3, { sx: { width: "100%" }, children: /* @__PURE__ */ jsxs119(PillCell, { borderColor, borderWidth, height, children: [
2548
- showIcon ? /* @__PURE__ */ jsx124(
2549
- Box3,
2550
- {
2551
- sx: {
2552
- alignItems: "center",
2553
- borderRightColor: borderColor,
2554
- borderRightStyle: "solid",
2555
- borderRightWidth: `1px`,
2556
- display: "flex",
2557
- height,
2558
- justifyContent: "center",
2559
- overflow: "hidden",
2560
- padding: 0,
2561
- width
2562
- },
2563
- children: /* @__PURE__ */ jsx124(AwsServiceIcon, { hideTooltip: true, service, size: "large" })
2564
- }
2565
- ) : void 0,
2546
+ showIcon ? /* @__PURE__ */ jsxs119(Fragment2, { children: [
2547
+ /* @__PURE__ */ jsx124(
2548
+ Box3,
2549
+ {
2550
+ sx: {
2551
+ alignItems: "center",
2552
+ display: "flex",
2553
+ height,
2554
+ justifyContent: "center",
2555
+ overflow: "hidden",
2556
+ padding: 0,
2557
+ width
2558
+ },
2559
+ children: /* @__PURE__ */ jsx124(AwsServiceIcon, { hideTooltip: true, service, size: "large" })
2560
+ }
2561
+ ),
2562
+ /* @__PURE__ */ jsx124(Divider, { orientation: "vertical" })
2563
+ ] }) : void 0,
2566
2564
  /* @__PURE__ */ jsx124(
2567
2565
  Typography,
2568
2566
  {
2569
2567
  sx: {
2570
- borderRightColor: resource ? borderColor : "none",
2571
- borderRightStyle: resource ? "solid" : "none",
2572
- borderRightWidth: resource ? "1px" : "none",
2573
2568
  fontWeight: "bold",
2574
2569
  overflow: "hidden",
2575
2570
  padding: "1px 8px",
@@ -2588,21 +2583,24 @@ var ServiceCell = ({
2588
2583
  children: service
2589
2584
  }
2590
2585
  ),
2591
- resource ? /* @__PURE__ */ jsx124(
2592
- Typography,
2593
- {
2594
- sx: {
2595
- borderBottomRightRadius: "15px",
2596
- borderTopRightRadius: "15px",
2597
- overflow: "hidden",
2598
- padding: "1px 8px",
2599
- textOverflow: "ellipsis",
2600
- whiteSpace: "nowrap"
2601
- },
2602
- variant: "body2",
2603
- children: truncateName(resource, truncateLength)
2604
- }
2605
- ) : void 0
2586
+ resource ? /* @__PURE__ */ jsxs119(Fragment2, { children: [
2587
+ /* @__PURE__ */ jsx124(Box3, { sx: { height: "100%", paddingY: 0.5 }, children: /* @__PURE__ */ jsx124(Divider, { orientation: "vertical" }) }),
2588
+ /* @__PURE__ */ jsx124(
2589
+ Typography,
2590
+ {
2591
+ sx: {
2592
+ borderBottomRightRadius: "15px",
2593
+ borderTopRightRadius: "15px",
2594
+ overflow: "hidden",
2595
+ padding: "1px 8px",
2596
+ textOverflow: "ellipsis",
2597
+ whiteSpace: "nowrap"
2598
+ },
2599
+ variant: "body2",
2600
+ children: truncateName(resource, truncateLength)
2601
+ }
2602
+ )
2603
+ ] }) : void 0
2606
2604
  ] }) });
2607
2605
  };
2608
2606
  ServiceCell.displayName = "ServiceCell";
@@ -2677,7 +2675,7 @@ var searchInObject = (object, searchTerm, skipKeys = []) => {
2677
2675
  };
2678
2676
 
2679
2677
  // src/components/spans-list/spans-data-grid.tsx
2680
- import { Fragment as Fragment2, jsx as jsx125, jsxs as jsxs120 } from "react/jsx-runtime";
2678
+ import { Fragment as Fragment3, jsx as jsx125, jsxs as jsxs120 } from "react/jsx-runtime";
2681
2679
  var resourceNameComparator = (v1 = "", v2 = "") => {
2682
2680
  return v1.localeCompare(v2);
2683
2681
  };
@@ -2800,7 +2798,7 @@ var SpansDataGrid = ({
2800
2798
  () => rows.filter((row) => filtersToApply.every((filter) => filter(row))),
2801
2799
  [filtersToApply, rows]
2802
2800
  );
2803
- return /* @__PURE__ */ jsxs120(Fragment2, { children: [
2801
+ return /* @__PURE__ */ jsxs120(Fragment3, { children: [
2804
2802
  /* @__PURE__ */ jsx125(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsxs120(Box4, { sx: { alignItems: "center", display: "flex", gap: "0.5rem" }, children: [
2805
2803
  /* @__PURE__ */ jsx125(
2806
2804
  TextField,
@@ -2965,7 +2963,7 @@ var getAppInspectorApiUrl = (localstackEndpoint, endpoint) => {
2965
2963
  };
2966
2964
 
2967
2965
  // src/components/status-message/status-message.tsx
2968
- import { Fragment as Fragment3, jsx as jsx127, jsxs as jsxs122 } from "react/jsx-runtime";
2966
+ import { Fragment as Fragment4, jsx as jsx127, jsxs as jsxs122 } from "react/jsx-runtime";
2969
2967
  var StatusMessage = ({
2970
2968
  error,
2971
2969
  onRetry,
@@ -3214,7 +3212,7 @@ var StatusMessage = ({
3214
3212
  }
3215
3213
  );
3216
3214
  }
3217
- return /* @__PURE__ */ jsx127(Fragment3, {});
3215
+ return /* @__PURE__ */ jsx127(Fragment4, {});
3218
3216
  };
3219
3217
 
3220
3218
  // src/context.tsx
@@ -3596,7 +3594,8 @@ import { useCallback as useCallback8, useEffect as useEffect7, useState as useSt
3596
3594
  import { useNavigate as useNavigate2, useParams, useSearchParams } from "react-router-dom";
3597
3595
 
3598
3596
  // src/components/event-details/event-details.tsx
3599
- import { Box as Box15, Chip as Chip3, Divider, Stack as Stack2, Typography as Typography9 } from "@mui/material";
3597
+ import { Box as Box15, Chip as Chip3, Divider as Divider2, Stack as Stack2, Typography as Typography9 } from "@mui/material";
3598
+ import { useMemo as useMemo7 } from "react";
3600
3599
 
3601
3600
  // src/utils/iam-utils.ts
3602
3601
  function determinePermissionStatus(payload) {
@@ -3866,7 +3865,7 @@ var DetailRow = ({ content, label }) => /* @__PURE__ */ jsxs124(Grid2, { contain
3866
3865
  {
3867
3866
  sx: {
3868
3867
  color: "text.secondary",
3869
- fontWeight: 500
3868
+ fontWeight: 600
3870
3869
  },
3871
3870
  variant: "body2",
3872
3871
  children: label
@@ -3901,11 +3900,11 @@ var PermissionIcon = ({ status }) => {
3901
3900
  var IAMEventDetail = ({ event }) => {
3902
3901
  const payloadString = event.attributes?.payload;
3903
3902
  if (!payloadString) {
3904
- return /* @__PURE__ */ jsx132(Box10, { sx: { p: 2 }, children: /* @__PURE__ */ jsx132(Typography5, { color: "text.secondary", variant: "body2", children: "No IAM policy evaluation data available" }) });
3903
+ return /* @__PURE__ */ jsx132(Box10, { sx: { p: 2 }, children: /* @__PURE__ */ jsx132(Typography5, { sx: { fontWeight: 600 }, variant: "body2", children: "No IAM policy evaluation data available" }) });
3905
3904
  }
3906
3905
  const parsedIAM = parseIAMEvent(payloadString);
3907
3906
  if (!parsedIAM) {
3908
- return /* @__PURE__ */ jsx132(Box10, { sx: { p: 2 }, children: /* @__PURE__ */ jsx132(Typography5, { color: "text.secondary", variant: "body2", children: "Failed to parse IAM event data" }) });
3907
+ return /* @__PURE__ */ jsx132(Box10, { sx: { p: 2 }, children: /* @__PURE__ */ jsx132(Typography5, { sx: { fontWeight: 600 }, variant: "body2", children: "Failed to parse IAM event data" }) });
3909
3908
  }
3910
3909
  return /* @__PURE__ */ jsxs124(Box10, { sx: { p: 2 }, children: [
3911
3910
  /* @__PURE__ */ jsx132(Box10, { sx: { mb: 2 }, children: /* @__PURE__ */ jsx132(
@@ -3930,9 +3929,7 @@ var IAMEventDetail = ({ event }) => {
3930
3929
  Typography5,
3931
3930
  {
3932
3931
  sx: {
3933
- color: "text.primary",
3934
- fontFamily: "monospace",
3935
- fontSize: "0.85rem"
3932
+ color: "text.primary"
3936
3933
  },
3937
3934
  variant: "body2",
3938
3935
  children: action
@@ -3950,8 +3947,6 @@ var IAMEventDetail = ({ event }) => {
3950
3947
  {
3951
3948
  sx: {
3952
3949
  color: "text.primary",
3953
- fontFamily: "monospace",
3954
- fontSize: "0.85rem",
3955
3950
  wordBreak: "break-all"
3956
3951
  },
3957
3952
  variant: "body2",
@@ -3963,19 +3958,19 @@ var IAMEventDetail = ({ event }) => {
3963
3958
  }
3964
3959
  ),
3965
3960
  /* @__PURE__ */ jsxs124(Box10, { sx: { mt: 2 }, children: [
3966
- /* @__PURE__ */ jsx132(Typography5, { color: "text.secondary", sx: { mb: 1 }, variant: "caption", children: "Policy Evaluation" }),
3961
+ /* @__PURE__ */ jsx132(Typography5, { sx: { fontWeight: 600, mb: 1 }, variant: "caption", children: "Policy Evaluation" }),
3967
3962
  /* @__PURE__ */ jsxs124(Grid2, { container: true, spacing: 2, children: [
3968
3963
  parsedIAM.details.explicitAllows !== void 0 && /* @__PURE__ */ jsx132(Grid2, { item: true, xs: 4, children: /* @__PURE__ */ jsxs124(Box10, { sx: { textAlign: "center" }, children: [
3969
3964
  /* @__PURE__ */ jsx132(Typography5, { color: "success.main", sx: { fontWeight: "bold" }, variant: "h6", children: parsedIAM.details.explicitAllows }),
3970
- /* @__PURE__ */ jsx132(Typography5, { color: "text.secondary", variant: "caption", children: "Explicit Allows" })
3965
+ /* @__PURE__ */ jsx132(Typography5, { sx: { fontWeight: 600 }, variant: "caption", children: "Explicit Allows" })
3971
3966
  ] }) }),
3972
3967
  parsedIAM.details.explicitDenies !== void 0 && /* @__PURE__ */ jsx132(Grid2, { item: true, xs: 4, children: /* @__PURE__ */ jsxs124(Box10, { sx: { textAlign: "center" }, children: [
3973
3968
  /* @__PURE__ */ jsx132(Typography5, { color: "error.main", sx: { fontWeight: "bold" }, variant: "h6", children: parsedIAM.details.explicitDenies }),
3974
- /* @__PURE__ */ jsx132(Typography5, { color: "text.secondary", variant: "caption", children: "Explicit Denies" })
3969
+ /* @__PURE__ */ jsx132(Typography5, { sx: { fontWeight: 600 }, variant: "caption", children: "Explicit Denies" })
3975
3970
  ] }) }),
3976
3971
  parsedIAM.details.implicitDenies !== void 0 && /* @__PURE__ */ jsx132(Grid2, { item: true, xs: 4, children: /* @__PURE__ */ jsxs124(Box10, { sx: { textAlign: "center" }, children: [
3977
3972
  /* @__PURE__ */ jsx132(Typography5, { color: "warning.main", sx: { fontWeight: "bold" }, variant: "h6", children: parsedIAM.details.implicitDenies }),
3978
- /* @__PURE__ */ jsx132(Typography5, { color: "text.secondary", variant: "caption", children: "Implicit Denies" })
3973
+ /* @__PURE__ */ jsx132(Typography5, { sx: { fontWeight: 600 }, variant: "caption", children: "Implicit Denies" })
3979
3974
  ] }) })
3980
3975
  ] })
3981
3976
  ] })
@@ -4032,22 +4027,22 @@ var IAMPermissionItem = ({ event }) => {
4032
4027
  )
4033
4028
  ] }),
4034
4029
  isOpen && /* @__PURE__ */ jsx133(Box11, { sx: { ml: 4, mt: 1 }, children: /* @__PURE__ */ jsxs125(Box11, { children: [
4035
- /* @__PURE__ */ jsx133(Typography6, { color: "text.secondary", variant: "caption", children: "Principal" }),
4036
- /* @__PURE__ */ jsx133(Typography6, { sx: { fontFamily: "monospace", fontSize: "0.85rem" }, variant: "body2", children: parsedIAM.principal })
4030
+ /* @__PURE__ */ jsx133(Typography6, { sx: { fontWeight: 600 }, variant: "caption", children: "Principal" }),
4031
+ /* @__PURE__ */ jsx133(Typography6, { variant: "body2", children: parsedIAM.principal })
4037
4032
  ] }) })
4038
4033
  ] });
4039
4034
  };
4040
4035
  var IAMPermissionDetail = ({ events }) => /* @__PURE__ */ jsx133(Box11, { sx: { mt: 2 }, children: events.map((event) => /* @__PURE__ */ jsx133(IAMPermissionItem, { event }, `${event.span_id}-${event.event_id}`)) });
4041
4036
 
4042
4037
  // src/components/event-details/event-detail.tsx
4043
- import { Fragment as Fragment4, jsx as jsx134, jsxs as jsxs126 } from "react/jsx-runtime";
4038
+ import { Fragment as Fragment5, jsx as jsx134, jsxs as jsxs126 } from "react/jsx-runtime";
4044
4039
  var DetailRow2 = ({ content, label }) => /* @__PURE__ */ jsxs126(Grid3, { container: true, spacing: 0, sx: { mb: 1 }, children: [
4045
4040
  /* @__PURE__ */ jsx134(Grid3, { item: true, sx: { pr: 1 }, xs: 3, children: /* @__PURE__ */ jsx134(
4046
4041
  Typography7,
4047
4042
  {
4048
4043
  sx: {
4049
4044
  color: "text.primary",
4050
- fontWeight: 500
4045
+ fontWeight: 600
4051
4046
  },
4052
4047
  variant: "body1",
4053
4048
  children: label
@@ -4114,7 +4109,7 @@ var EventMessage = ({ event }) => {
4114
4109
  ref: textReference,
4115
4110
  sx: {
4116
4111
  color: "text.primary",
4117
- fontWeight: 500,
4112
+ fontWeight: 600,
4118
4113
  maxWidth: "100%",
4119
4114
  ml: shouldShowToggle ? 0 : 4,
4120
4115
  overflow: "hidden",
@@ -4126,7 +4121,7 @@ var EventMessage = ({ event }) => {
4126
4121
  }
4127
4122
  )
4128
4123
  ] }),
4129
- isOpen && /* @__PURE__ */ jsx134(Box12, { sx: { ml: 4, mt: 1 }, children: isIAMPolicyEvent ? /* @__PURE__ */ jsx134(IAMEventDetail, { event }) : /* @__PURE__ */ jsxs126(Fragment4, { children: [
4124
+ isOpen && /* @__PURE__ */ jsx134(Box12, { sx: { ml: 4, mt: 1 }, children: isIAMPolicyEvent ? /* @__PURE__ */ jsx134(IAMEventDetail, { event }) : /* @__PURE__ */ jsxs126(Fragment5, { children: [
4130
4125
  Boolean(parsedMessage.message) && /* @__PURE__ */ jsx134(DetailRow2, { content: parsedMessage.message, label: "Message:" }),
4131
4126
  Boolean(parsedMessage.details) && /* @__PURE__ */ jsx134(DetailRow2, { content: parsedMessage.details, label: "Details:" })
4132
4127
  ] }) })
@@ -4171,10 +4166,9 @@ var EventDetail = ({
4171
4166
  {
4172
4167
  sx: {
4173
4168
  alignItems: "left",
4174
- color: "text.secondary",
4175
4169
  display: "flex",
4176
4170
  flexGrow: 1,
4177
- fontWeight: 500
4171
+ fontWeight: 600
4178
4172
  },
4179
4173
  variant: "subtitle1",
4180
4174
  children: displayText
@@ -4206,7 +4200,7 @@ var EventDetail = ({
4206
4200
  color: "text.secondary",
4207
4201
  display: "flex",
4208
4202
  flexGrow: 1,
4209
- fontWeight: 500,
4203
+ fontWeight: 600,
4210
4204
  ml: 1,
4211
4205
  mr: 2
4212
4206
  },
@@ -4311,8 +4305,12 @@ var EventSection = ({
4311
4305
  ] }) });
4312
4306
 
4313
4307
  // src/components/event-details/event-details.tsx
4314
- import { Fragment as Fragment5, jsx as jsx137, jsxs as jsxs129 } from "react/jsx-runtime";
4308
+ import { Fragment as Fragment6, jsx as jsx137, jsxs as jsxs129 } from "react/jsx-runtime";
4315
4309
  var EventDetails = ({ onClose, selectedEvent }) => {
4310
+ const attributes = useMemo7(() => {
4311
+ const attributes2 = Object.entries(selectedEvent?.attributes ?? {});
4312
+ return attributes2.filter(([key]) => key !== "localstack.aws.account_id" && key !== "localstack.aws.service");
4313
+ }, [selectedEvent?.attributes]);
4316
4314
  if (!selectedEvent) {
4317
4315
  return /* @__PURE__ */ jsx137(Box15, { sx: { p: 3, textAlign: "center" }, children: /* @__PURE__ */ jsx137(Typography9, { color: "text.secondary", variant: "body2", children: "Select an event to view details" }) });
4318
4316
  }
@@ -4321,41 +4319,41 @@ var EventDetails = ({ onClose, selectedEvent }) => {
4321
4319
  /* @__PURE__ */ jsx137(Box15, { sx: { flexGrow: 1, overflow: "auto", p: 2 }, children: /* @__PURE__ */ jsxs129(Stack2, { spacing: 2, children: [
4322
4320
  /* @__PURE__ */ jsx137(ToggleSection, { headline: "Basic Information", children: /* @__PURE__ */ jsxs129(Stack2, { spacing: 1, children: [
4323
4321
  /* @__PURE__ */ jsxs129(Box15, { children: [
4324
- /* @__PURE__ */ jsx137(Typography9, { color: "text.secondary", variant: "caption", children: "Span ID" }),
4322
+ /* @__PURE__ */ jsx137(Typography9, { sx: { fontWeight: 600 }, variant: "caption", children: "Span ID" }),
4325
4323
  /* @__PURE__ */ jsx137(Typography9, { variant: "body2", children: selectedEvent.span_id })
4326
4324
  ] }),
4327
4325
  /* @__PURE__ */ jsxs129(Box15, { children: [
4328
- /* @__PURE__ */ jsx137(Typography9, { color: "text.secondary", variant: "caption", children: "Trace ID" }),
4329
- /* @__PURE__ */ jsx137(Typography9, { sx: { fontFamily: "monospace", fontSize: "0.85rem" }, variant: "body2", children: selectedEvent.trace_id })
4326
+ /* @__PURE__ */ jsx137(Typography9, { sx: { fontWeight: 600 }, variant: "caption", children: "Trace ID" }),
4327
+ /* @__PURE__ */ jsx137(Typography9, { variant: "body2", children: selectedEvent.trace_id })
4330
4328
  ] }),
4331
4329
  /* @__PURE__ */ jsxs129(Box15, { children: [
4332
- /* @__PURE__ */ jsx137(Typography9, { color: "text.secondary", variant: "caption", children: "Operation" }),
4330
+ /* @__PURE__ */ jsx137(Typography9, { sx: { fontWeight: 600 }, variant: "caption", children: "Operation" }),
4333
4331
  /* @__PURE__ */ jsx137(Typography9, { variant: "body2", children: selectedEvent.operation_name })
4334
4332
  ] })
4335
4333
  ] }) }),
4336
- /* @__PURE__ */ jsx137(Divider, {}),
4334
+ /* @__PURE__ */ jsx137(Divider2, {}),
4337
4335
  /* @__PURE__ */ jsx137(ToggleSection, { headline: "Service Information", children: /* @__PURE__ */ jsxs129(Stack2, { spacing: 1, children: [
4338
4336
  /* @__PURE__ */ jsxs129(Box15, { children: [
4339
- /* @__PURE__ */ jsx137(Typography9, { color: "text.secondary", variant: "caption", children: "Service" }),
4337
+ /* @__PURE__ */ jsx137(Typography9, { sx: { fontWeight: 600 }, variant: "caption", children: "Service" }),
4340
4338
  /* @__PURE__ */ jsx137(Typography9, { variant: "body2", children: selectedEvent.service_name })
4341
4339
  ] }),
4342
4340
  /* @__PURE__ */ jsxs129(Box15, { children: [
4343
- /* @__PURE__ */ jsx137(Typography9, { color: "text.secondary", variant: "caption", children: "Resource" }),
4341
+ /* @__PURE__ */ jsx137(Typography9, { sx: { fontWeight: 600 }, variant: "caption", children: "Resource" }),
4344
4342
  /* @__PURE__ */ jsx137(Typography9, { variant: "body2", children: selectedEvent.resource_name })
4345
4343
  ] }),
4346
4344
  Boolean(selectedEvent.region) && /* @__PURE__ */ jsxs129(Box15, { children: [
4347
- /* @__PURE__ */ jsx137(Typography9, { color: "text.secondary", variant: "caption", children: "Region" }),
4345
+ /* @__PURE__ */ jsx137(Typography9, { sx: { fontWeight: 600 }, variant: "caption", children: "Region" }),
4348
4346
  /* @__PURE__ */ jsx137(Typography9, { variant: "body2", children: selectedEvent.region })
4349
4347
  ] })
4350
4348
  ] }) }),
4351
- /* @__PURE__ */ jsx137(Divider, {}),
4349
+ /* @__PURE__ */ jsx137(Divider2, {}),
4352
4350
  /* @__PURE__ */ jsx137(ToggleSection, { headline: "Timing", children: /* @__PURE__ */ jsxs129(Stack2, { spacing: 1, children: [
4353
4351
  /* @__PURE__ */ jsxs129(Box15, { children: [
4354
- /* @__PURE__ */ jsx137(Typography9, { color: "text.secondary", variant: "caption", children: "Start Time" }),
4352
+ /* @__PURE__ */ jsx137(Typography9, { sx: { fontWeight: 600 }, variant: "caption", children: "Start Time" }),
4355
4353
  /* @__PURE__ */ jsx137(Typography9, { variant: "body2", children: unixNanoToDate(selectedEvent.start_time_unix_nano)?.toISOString() })
4356
4354
  ] }),
4357
4355
  Boolean(selectedEvent.end_time_unix_nano) && /* @__PURE__ */ jsxs129(Box15, { children: [
4358
- /* @__PURE__ */ jsx137(Typography9, { color: "text.secondary", variant: "caption", children: "Duration" }),
4356
+ /* @__PURE__ */ jsx137(Typography9, { sx: { fontWeight: 600 }, variant: "caption", children: "Duration" }),
4359
4357
  /* @__PURE__ */ jsxs129(Typography9, { variant: "body2", children: [
4360
4358
  ((BigInt(selectedEvent.end_time_unix_nano) - BigInt(selectedEvent.start_time_unix_nano)) / BigInt("1000000")).toString(),
4361
4359
  " ",
@@ -4363,7 +4361,7 @@ var EventDetails = ({ onClose, selectedEvent }) => {
4363
4361
  ] })
4364
4362
  ] })
4365
4363
  ] }) }),
4366
- /* @__PURE__ */ jsx137(Divider, {}),
4364
+ /* @__PURE__ */ jsx137(Divider2, {}),
4367
4365
  /* @__PURE__ */ jsx137(ToggleSection, { headline: "Status", children: /* @__PURE__ */ jsxs129(Stack2, { direction: "row", spacing: 1, children: [
4368
4366
  /* @__PURE__ */ jsx137(
4369
4367
  Chip3,
@@ -4375,8 +4373,8 @@ var EventDetails = ({ onClose, selectedEvent }) => {
4375
4373
  ),
4376
4374
  Boolean(selectedEvent.status_message) && /* @__PURE__ */ jsx137(Typography9, { variant: "body2", children: selectedEvent.status_message })
4377
4375
  ] }) }),
4378
- selectedEvent.events.length > 0 && /* @__PURE__ */ jsxs129(Fragment5, { children: [
4379
- /* @__PURE__ */ jsx137(Divider, {}),
4376
+ selectedEvent.events.length > 0 && /* @__PURE__ */ jsxs129(Fragment6, { children: [
4377
+ /* @__PURE__ */ jsx137(Divider2, {}),
4380
4378
  /* @__PURE__ */ jsx137(
4381
4379
  EventSection,
4382
4380
  {
@@ -4385,13 +4383,25 @@ var EventDetails = ({ onClose, selectedEvent }) => {
4385
4383
  }
4386
4384
  )
4387
4385
  ] }),
4388
- selectedEvent.attributes && Object.keys(selectedEvent.attributes).length > 0 && /* @__PURE__ */ jsxs129(Fragment5, { children: [
4389
- /* @__PURE__ */ jsx137(Divider, {}),
4390
- /* @__PURE__ */ jsx137(ToggleSection, { headline: "Attributes", children: /* @__PURE__ */ jsx137(Box15, { sx: { backgroundColor: "#f5f5f5", borderRadius: 1, p: 1 }, children: /* @__PURE__ */ jsx137("pre", { style: { fontSize: "0.85rem", margin: 0, overflow: "auto" }, children: JSON.stringify(selectedEvent.attributes, void 0, 2) }) }) })
4386
+ attributes.length > 0 && /* @__PURE__ */ jsxs129(Fragment6, { children: [
4387
+ /* @__PURE__ */ jsx137(Divider2, {}),
4388
+ /* @__PURE__ */ jsx137(ToggleSection, { headline: "Attributes", children: /* @__PURE__ */ jsx137(Stack2, { spacing: 1, children: attributes.map(([key, value]) => /* @__PURE__ */ jsxs129(Box15, { children: [
4389
+ /* @__PURE__ */ jsx137(Typography9, { sx: { fontWeight: 600 }, variant: "caption", children: key }),
4390
+ /* @__PURE__ */ jsx137(Typography9, { variant: "body2", children: renderKeyValue(key, value) })
4391
+ ] }, key)) }) })
4391
4392
  ] })
4392
4393
  ] }) })
4393
4394
  ] });
4394
4395
  };
4396
+ function renderKeyValue(key, value) {
4397
+ if (typeof value === "string" && (key === "localstack.aws.service.request" || key === "localstack.aws.service.response" || key === "localstack.aws.service.exception")) {
4398
+ return /* @__PURE__ */ jsx137(Box15, { sx: { backgroundColor: (theme) => theme.palette.background.default, borderRadius: 1, p: 1 }, children: /* @__PURE__ */ jsx137("pre", { style: { margin: 0, overflow: "auto" }, children: /* @__PURE__ */ jsx137(Typography9, { variant: "body2", children: JSON.stringify(JSON.parse(value), void 0, 2) }) }) });
4399
+ }
4400
+ if (typeof value === "boolean") {
4401
+ return /* @__PURE__ */ jsx137(Typography9, { variant: "body2", children: value ? "yes" : "no" });
4402
+ }
4403
+ return /* @__PURE__ */ jsx137(Typography9, { variant: "body2", children: value });
4404
+ }
4395
4405
 
4396
4406
  // src/components/trace-graph/trace-graph.tsx
4397
4407
  import "@xyflow/react/dist/base.css";
@@ -4408,10 +4418,10 @@ import { memo, useCallback as useCallback6 } from "react";
4408
4418
  // src/components/trace-graph/problem-indicator.tsx
4409
4419
  import { Error as ErrorIcon2, Info as Info2, Warning as Warning2 } from "@mui/icons-material";
4410
4420
  import { Box as Box16, Tooltip as Tooltip3 } from "@mui/material";
4411
- import { useMemo as useMemo7 } from "react";
4421
+ import { useMemo as useMemo8 } from "react";
4412
4422
  import { jsx as jsx138 } from "react/jsx-runtime";
4413
4423
  var ProblemIndicator = ({ error }) => {
4414
- const icon = useMemo7(() => {
4424
+ const icon = useMemo8(() => {
4415
4425
  switch (error.level) {
4416
4426
  case "error": {
4417
4427
  return /* @__PURE__ */ jsx138(ErrorIcon2, { sx: { color: "#d32f2f", fontSize: "14px" } });
@@ -4424,7 +4434,7 @@ var ProblemIndicator = ({ error }) => {
4424
4434
  }
4425
4435
  }
4426
4436
  }, [error.level]);
4427
- const color = useMemo7(() => {
4437
+ const color = useMemo8(() => {
4428
4438
  switch (error.level) {
4429
4439
  case "error": {
4430
4440
  return "#d32f2f";
@@ -4764,7 +4774,7 @@ var Controls = memo2(() => {
4764
4774
  });
4765
4775
 
4766
4776
  // src/components/trace-graph/trace-graph.tsx
4767
- import { Fragment as Fragment6, jsx as jsx141, jsxs as jsxs132 } from "react/jsx-runtime";
4777
+ import { Fragment as Fragment7, jsx as jsx141, jsxs as jsxs132 } from "react/jsx-runtime";
4768
4778
  var nodeTypes = {
4769
4779
  service: ServiceNode
4770
4780
  };
@@ -4853,7 +4863,7 @@ var TraceGraph = ({
4853
4863
  onEventSelect(node.data.event);
4854
4864
  updateSelectedNode(node.id);
4855
4865
  }, [onEventSelect, updateSelectedNode]);
4856
- return /* @__PURE__ */ jsxs132(Fragment6, { children: [
4866
+ return /* @__PURE__ */ jsxs132(Fragment7, { children: [
4857
4867
  spans.error && /* @__PURE__ */ jsxs132(
4858
4868
  Alert3,
4859
4869
  {
@@ -4891,7 +4901,7 @@ var TraceGraph = ({
4891
4901
  };
4892
4902
 
4893
4903
  // src/pages/trace-graph-page.tsx
4894
- import { Fragment as Fragment7, jsx as jsx142, jsxs as jsxs133 } from "react/jsx-runtime";
4904
+ import { Fragment as Fragment8, jsx as jsx142, jsxs as jsxs133 } from "react/jsx-runtime";
4895
4905
  var HEADER_HEIGHT = 56;
4896
4906
  var DRAWER_WIDTH = "35%";
4897
4907
  var Main = styled("main", { shouldForwardProp: (property) => property !== "open" })(({ open, theme }) => ({
@@ -4925,6 +4935,7 @@ var StyledDrawer = styled(Drawer)(() => ({
4925
4935
  var TraceGraphView = ({
4926
4936
  fetchError,
4927
4937
  fetchSpans,
4938
+ handleClose,
4928
4939
  handleEventSelect,
4929
4940
  handleRetry,
4930
4941
  loading,
@@ -4975,7 +4986,7 @@ var TraceGraphView = ({
4975
4986
  onRetry: handleRetry,
4976
4987
  status
4977
4988
  }
4978
- ) : /* @__PURE__ */ jsxs133(Fragment7, { children: [
4989
+ ) : /* @__PURE__ */ jsxs133(Fragment8, { children: [
4979
4990
  /* @__PURE__ */ jsx142(Main, { open, children: /* @__PURE__ */ jsx142(
4980
4991
  Box19,
4981
4992
  {
@@ -5001,7 +5012,7 @@ var TraceGraphView = ({
5001
5012
  ) })
5002
5013
  }
5003
5014
  ) }),
5004
- /* @__PURE__ */ jsx142(StyledDrawer, { anchor: "right", open, variant: "persistent", children: /* @__PURE__ */ jsx142(EventDetails, { selectedEvent }) })
5015
+ /* @__PURE__ */ jsx142(StyledDrawer, { anchor: "right", open, variant: "persistent", children: /* @__PURE__ */ jsx142(EventDetails, { onClose: handleClose, selectedEvent }) })
5005
5016
  ] })
5006
5017
  }
5007
5018
  )
@@ -5079,6 +5090,9 @@ var TraceGraphPage = () => {
5079
5090
  {
5080
5091
  fetchError,
5081
5092
  fetchSpans: () => void fetchSpans(),
5093
+ handleClose: () => {
5094
+ setOpen(false);
5095
+ },
5082
5096
  handleEventSelect,
5083
5097
  handleRetry,
5084
5098
  loading,