@localstack/appinspector-ui 1.0.19 → 1.0.21

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
@@ -23,7 +23,7 @@ import { Alert, Box as Box5, Button as Button2 } from "@mui/material";
23
23
 
24
24
  // src/components/spans-list/spans-data-grid.tsx
25
25
  import { Cached, DeleteForeverOutlined, Search } from "@mui/icons-material";
26
- import { Box as Box4, Button, FormControlLabel, Grid, Paper, Switch, TextField, Typography as Typography2 } from "@mui/material";
26
+ import { Box as Box4, Button, FormControlLabel, Grid, Paper, Switch, TextField, Tooltip as Tooltip3, Typography as Typography2 } from "@mui/material";
27
27
  import { DataGrid } from "@mui/x-data-grid";
28
28
  import { useCallback, useMemo as useMemo2, useState as useState2 } from "react";
29
29
 
@@ -2690,16 +2690,28 @@ var columns = [
2690
2690
  field: "trace_id",
2691
2691
  headerName: "Trace",
2692
2692
  renderCell: (parameters) => {
2693
- return /* @__PURE__ */ jsx125("span", { children: parameters.value });
2693
+ return /* @__PURE__ */ jsx125(Tooltip3, { arrow: true, title: String(parameters.value), children: /* @__PURE__ */ jsx125(
2694
+ "span",
2695
+ {
2696
+ style: {
2697
+ maxWidth: "100%",
2698
+ overflow: "hidden",
2699
+ textOverflow: "ellipsis",
2700
+ whiteSpace: "nowrap"
2701
+ },
2702
+ children: parameters.value
2703
+ }
2704
+ ) });
2694
2705
  },
2695
- width: 300
2706
+ type: "string",
2707
+ width: 120
2696
2708
  },
2697
2709
  {
2698
2710
  field: "start_time_unix_nano",
2699
2711
  headerName: "Time",
2700
2712
  renderCell: (parameters) => /* @__PURE__ */ jsx125(ResponsiveTimestampCell, { value: parameters.value }),
2701
2713
  type: "string",
2702
- width: 200
2714
+ width: 180
2703
2715
  },
2704
2716
  {
2705
2717
  field: "producer",
@@ -2712,19 +2724,19 @@ var columns = [
2712
2724
  },
2713
2725
  sortable: true,
2714
2726
  sortComparator: resourceNameComparator,
2715
- width: 320
2727
+ width: 260
2716
2728
  },
2717
2729
  {
2718
2730
  field: "operation_name",
2719
2731
  headerName: "Action",
2720
2732
  type: "string",
2721
- width: 150
2733
+ width: 130
2722
2734
  },
2723
2735
  {
2724
2736
  field: "consumer",
2725
2737
  flex: 1,
2726
2738
  headerName: "Consumer",
2727
- minWidth: 280,
2739
+ maxWidth: 260,
2728
2740
  renderCell: (parameters) => {
2729
2741
  return /* @__PURE__ */ jsx125(ServiceCell, { resource: parameters.row.resource_name, service: parameters.row.service_name });
2730
2742
  },
@@ -3595,6 +3607,7 @@ import { useNavigate as useNavigate2, useParams, useSearchParams } from "react-r
3595
3607
 
3596
3608
  // src/components/event-details/event-details.tsx
3597
3609
  import { Box as Box15, Chip as Chip3, Divider as Divider2, Stack as Stack2, Typography as Typography9 } from "@mui/material";
3610
+ import { useMemo as useMemo7 } from "react";
3598
3611
 
3599
3612
  // src/utils/iam-utils.ts
3600
3613
  function determinePermissionStatus(payload) {
@@ -3864,7 +3877,7 @@ var DetailRow = ({ content, label }) => /* @__PURE__ */ jsxs124(Grid2, { contain
3864
3877
  {
3865
3878
  sx: {
3866
3879
  color: "text.secondary",
3867
- fontWeight: 500
3880
+ fontWeight: 600
3868
3881
  },
3869
3882
  variant: "body2",
3870
3883
  children: label
@@ -3899,11 +3912,11 @@ var PermissionIcon = ({ status }) => {
3899
3912
  var IAMEventDetail = ({ event }) => {
3900
3913
  const payloadString = event.attributes?.payload;
3901
3914
  if (!payloadString) {
3902
- return /* @__PURE__ */ jsx132(Box10, { sx: { p: 2 }, children: /* @__PURE__ */ jsx132(Typography5, { color: "text.secondary", variant: "body2", children: "No IAM policy evaluation data available" }) });
3915
+ return /* @__PURE__ */ jsx132(Box10, { sx: { p: 2 }, children: /* @__PURE__ */ jsx132(Typography5, { sx: { fontWeight: 600 }, variant: "body2", children: "No IAM policy evaluation data available" }) });
3903
3916
  }
3904
3917
  const parsedIAM = parseIAMEvent(payloadString);
3905
3918
  if (!parsedIAM) {
3906
- return /* @__PURE__ */ jsx132(Box10, { sx: { p: 2 }, children: /* @__PURE__ */ jsx132(Typography5, { color: "text.secondary", variant: "body2", children: "Failed to parse IAM event data" }) });
3919
+ return /* @__PURE__ */ jsx132(Box10, { sx: { p: 2 }, children: /* @__PURE__ */ jsx132(Typography5, { sx: { fontWeight: 600 }, variant: "body2", children: "Failed to parse IAM event data" }) });
3907
3920
  }
3908
3921
  return /* @__PURE__ */ jsxs124(Box10, { sx: { p: 2 }, children: [
3909
3922
  /* @__PURE__ */ jsx132(Box10, { sx: { mb: 2 }, children: /* @__PURE__ */ jsx132(
@@ -3928,9 +3941,7 @@ var IAMEventDetail = ({ event }) => {
3928
3941
  Typography5,
3929
3942
  {
3930
3943
  sx: {
3931
- color: "text.primary",
3932
- fontFamily: "monospace",
3933
- fontSize: "0.85rem"
3944
+ color: "text.primary"
3934
3945
  },
3935
3946
  variant: "body2",
3936
3947
  children: action
@@ -3948,8 +3959,6 @@ var IAMEventDetail = ({ event }) => {
3948
3959
  {
3949
3960
  sx: {
3950
3961
  color: "text.primary",
3951
- fontFamily: "monospace",
3952
- fontSize: "0.85rem",
3953
3962
  wordBreak: "break-all"
3954
3963
  },
3955
3964
  variant: "body2",
@@ -3961,19 +3970,19 @@ var IAMEventDetail = ({ event }) => {
3961
3970
  }
3962
3971
  ),
3963
3972
  /* @__PURE__ */ jsxs124(Box10, { sx: { mt: 2 }, children: [
3964
- /* @__PURE__ */ jsx132(Typography5, { color: "text.secondary", sx: { mb: 1 }, variant: "caption", children: "Policy Evaluation" }),
3973
+ /* @__PURE__ */ jsx132(Typography5, { sx: { fontWeight: 600, mb: 1 }, variant: "caption", children: "Policy Evaluation" }),
3965
3974
  /* @__PURE__ */ jsxs124(Grid2, { container: true, spacing: 2, children: [
3966
3975
  parsedIAM.details.explicitAllows !== void 0 && /* @__PURE__ */ jsx132(Grid2, { item: true, xs: 4, children: /* @__PURE__ */ jsxs124(Box10, { sx: { textAlign: "center" }, children: [
3967
3976
  /* @__PURE__ */ jsx132(Typography5, { color: "success.main", sx: { fontWeight: "bold" }, variant: "h6", children: parsedIAM.details.explicitAllows }),
3968
- /* @__PURE__ */ jsx132(Typography5, { color: "text.secondary", variant: "caption", children: "Explicit Allows" })
3977
+ /* @__PURE__ */ jsx132(Typography5, { sx: { fontWeight: 600 }, variant: "caption", children: "Explicit Allows" })
3969
3978
  ] }) }),
3970
3979
  parsedIAM.details.explicitDenies !== void 0 && /* @__PURE__ */ jsx132(Grid2, { item: true, xs: 4, children: /* @__PURE__ */ jsxs124(Box10, { sx: { textAlign: "center" }, children: [
3971
3980
  /* @__PURE__ */ jsx132(Typography5, { color: "error.main", sx: { fontWeight: "bold" }, variant: "h6", children: parsedIAM.details.explicitDenies }),
3972
- /* @__PURE__ */ jsx132(Typography5, { color: "text.secondary", variant: "caption", children: "Explicit Denies" })
3981
+ /* @__PURE__ */ jsx132(Typography5, { sx: { fontWeight: 600 }, variant: "caption", children: "Explicit Denies" })
3973
3982
  ] }) }),
3974
3983
  parsedIAM.details.implicitDenies !== void 0 && /* @__PURE__ */ jsx132(Grid2, { item: true, xs: 4, children: /* @__PURE__ */ jsxs124(Box10, { sx: { textAlign: "center" }, children: [
3975
3984
  /* @__PURE__ */ jsx132(Typography5, { color: "warning.main", sx: { fontWeight: "bold" }, variant: "h6", children: parsedIAM.details.implicitDenies }),
3976
- /* @__PURE__ */ jsx132(Typography5, { color: "text.secondary", variant: "caption", children: "Implicit Denies" })
3985
+ /* @__PURE__ */ jsx132(Typography5, { sx: { fontWeight: 600 }, variant: "caption", children: "Implicit Denies" })
3977
3986
  ] }) })
3978
3987
  ] })
3979
3988
  ] })
@@ -4030,8 +4039,8 @@ var IAMPermissionItem = ({ event }) => {
4030
4039
  )
4031
4040
  ] }),
4032
4041
  isOpen && /* @__PURE__ */ jsx133(Box11, { sx: { ml: 4, mt: 1 }, children: /* @__PURE__ */ jsxs125(Box11, { children: [
4033
- /* @__PURE__ */ jsx133(Typography6, { color: "text.secondary", variant: "caption", children: "Principal" }),
4034
- /* @__PURE__ */ jsx133(Typography6, { sx: { fontFamily: "monospace", fontSize: "0.85rem" }, variant: "body2", children: parsedIAM.principal })
4042
+ /* @__PURE__ */ jsx133(Typography6, { sx: { fontWeight: 600 }, variant: "caption", children: "Principal" }),
4043
+ /* @__PURE__ */ jsx133(Typography6, { variant: "body2", children: parsedIAM.principal })
4035
4044
  ] }) })
4036
4045
  ] });
4037
4046
  };
@@ -4045,7 +4054,7 @@ var DetailRow2 = ({ content, label }) => /* @__PURE__ */ jsxs126(Grid3, { contai
4045
4054
  {
4046
4055
  sx: {
4047
4056
  color: "text.primary",
4048
- fontWeight: 500
4057
+ fontWeight: 600
4049
4058
  },
4050
4059
  variant: "body1",
4051
4060
  children: label
@@ -4112,7 +4121,7 @@ var EventMessage = ({ event }) => {
4112
4121
  ref: textReference,
4113
4122
  sx: {
4114
4123
  color: "text.primary",
4115
- fontWeight: 500,
4124
+ fontWeight: 600,
4116
4125
  maxWidth: "100%",
4117
4126
  ml: shouldShowToggle ? 0 : 4,
4118
4127
  overflow: "hidden",
@@ -4169,10 +4178,9 @@ var EventDetail = ({
4169
4178
  {
4170
4179
  sx: {
4171
4180
  alignItems: "left",
4172
- color: "text.secondary",
4173
4181
  display: "flex",
4174
4182
  flexGrow: 1,
4175
- fontWeight: 500
4183
+ fontWeight: 600
4176
4184
  },
4177
4185
  variant: "subtitle1",
4178
4186
  children: displayText
@@ -4204,7 +4212,7 @@ var EventDetail = ({
4204
4212
  color: "text.secondary",
4205
4213
  display: "flex",
4206
4214
  flexGrow: 1,
4207
- fontWeight: 500,
4215
+ fontWeight: 600,
4208
4216
  ml: 1,
4209
4217
  mr: 2
4210
4218
  },
@@ -4311,6 +4319,10 @@ var EventSection = ({
4311
4319
  // src/components/event-details/event-details.tsx
4312
4320
  import { Fragment as Fragment6, jsx as jsx137, jsxs as jsxs129 } from "react/jsx-runtime";
4313
4321
  var EventDetails = ({ onClose, selectedEvent }) => {
4322
+ const attributes = useMemo7(() => {
4323
+ const attributes2 = Object.entries(selectedEvent?.attributes ?? {});
4324
+ return attributes2.filter(([key]) => key !== "localstack.aws.account_id" && key !== "localstack.aws.service");
4325
+ }, [selectedEvent?.attributes]);
4314
4326
  if (!selectedEvent) {
4315
4327
  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" }) });
4316
4328
  }
@@ -4319,41 +4331,41 @@ var EventDetails = ({ onClose, selectedEvent }) => {
4319
4331
  /* @__PURE__ */ jsx137(Box15, { sx: { flexGrow: 1, overflow: "auto", p: 2 }, children: /* @__PURE__ */ jsxs129(Stack2, { spacing: 2, children: [
4320
4332
  /* @__PURE__ */ jsx137(ToggleSection, { headline: "Basic Information", children: /* @__PURE__ */ jsxs129(Stack2, { spacing: 1, children: [
4321
4333
  /* @__PURE__ */ jsxs129(Box15, { children: [
4322
- /* @__PURE__ */ jsx137(Typography9, { color: "text.secondary", variant: "caption", children: "Span ID" }),
4334
+ /* @__PURE__ */ jsx137(Typography9, { sx: { fontWeight: 600 }, variant: "caption", children: "Span ID" }),
4323
4335
  /* @__PURE__ */ jsx137(Typography9, { variant: "body2", children: selectedEvent.span_id })
4324
4336
  ] }),
4325
4337
  /* @__PURE__ */ jsxs129(Box15, { children: [
4326
- /* @__PURE__ */ jsx137(Typography9, { color: "text.secondary", variant: "caption", children: "Trace ID" }),
4327
- /* @__PURE__ */ jsx137(Typography9, { sx: { fontFamily: "monospace", fontSize: "0.85rem" }, variant: "body2", children: selectedEvent.trace_id })
4338
+ /* @__PURE__ */ jsx137(Typography9, { sx: { fontWeight: 600 }, variant: "caption", children: "Trace ID" }),
4339
+ /* @__PURE__ */ jsx137(Typography9, { variant: "body2", children: selectedEvent.trace_id })
4328
4340
  ] }),
4329
4341
  /* @__PURE__ */ jsxs129(Box15, { children: [
4330
- /* @__PURE__ */ jsx137(Typography9, { color: "text.secondary", variant: "caption", children: "Operation" }),
4342
+ /* @__PURE__ */ jsx137(Typography9, { sx: { fontWeight: 600 }, variant: "caption", children: "Operation" }),
4331
4343
  /* @__PURE__ */ jsx137(Typography9, { variant: "body2", children: selectedEvent.operation_name })
4332
4344
  ] })
4333
4345
  ] }) }),
4334
4346
  /* @__PURE__ */ jsx137(Divider2, {}),
4335
4347
  /* @__PURE__ */ jsx137(ToggleSection, { headline: "Service Information", children: /* @__PURE__ */ jsxs129(Stack2, { spacing: 1, children: [
4336
4348
  /* @__PURE__ */ jsxs129(Box15, { children: [
4337
- /* @__PURE__ */ jsx137(Typography9, { color: "text.secondary", variant: "caption", children: "Service" }),
4349
+ /* @__PURE__ */ jsx137(Typography9, { sx: { fontWeight: 600 }, variant: "caption", children: "Service" }),
4338
4350
  /* @__PURE__ */ jsx137(Typography9, { variant: "body2", children: selectedEvent.service_name })
4339
4351
  ] }),
4340
4352
  /* @__PURE__ */ jsxs129(Box15, { children: [
4341
- /* @__PURE__ */ jsx137(Typography9, { color: "text.secondary", variant: "caption", children: "Resource" }),
4353
+ /* @__PURE__ */ jsx137(Typography9, { sx: { fontWeight: 600 }, variant: "caption", children: "Resource" }),
4342
4354
  /* @__PURE__ */ jsx137(Typography9, { variant: "body2", children: selectedEvent.resource_name })
4343
4355
  ] }),
4344
4356
  Boolean(selectedEvent.region) && /* @__PURE__ */ jsxs129(Box15, { children: [
4345
- /* @__PURE__ */ jsx137(Typography9, { color: "text.secondary", variant: "caption", children: "Region" }),
4357
+ /* @__PURE__ */ jsx137(Typography9, { sx: { fontWeight: 600 }, variant: "caption", children: "Region" }),
4346
4358
  /* @__PURE__ */ jsx137(Typography9, { variant: "body2", children: selectedEvent.region })
4347
4359
  ] })
4348
4360
  ] }) }),
4349
4361
  /* @__PURE__ */ jsx137(Divider2, {}),
4350
4362
  /* @__PURE__ */ jsx137(ToggleSection, { headline: "Timing", children: /* @__PURE__ */ jsxs129(Stack2, { spacing: 1, children: [
4351
4363
  /* @__PURE__ */ jsxs129(Box15, { children: [
4352
- /* @__PURE__ */ jsx137(Typography9, { color: "text.secondary", variant: "caption", children: "Start Time" }),
4364
+ /* @__PURE__ */ jsx137(Typography9, { sx: { fontWeight: 600 }, variant: "caption", children: "Start Time" }),
4353
4365
  /* @__PURE__ */ jsx137(Typography9, { variant: "body2", children: unixNanoToDate(selectedEvent.start_time_unix_nano)?.toISOString() })
4354
4366
  ] }),
4355
4367
  Boolean(selectedEvent.end_time_unix_nano) && /* @__PURE__ */ jsxs129(Box15, { children: [
4356
- /* @__PURE__ */ jsx137(Typography9, { color: "text.secondary", variant: "caption", children: "Duration" }),
4368
+ /* @__PURE__ */ jsx137(Typography9, { sx: { fontWeight: 600 }, variant: "caption", children: "Duration" }),
4357
4369
  /* @__PURE__ */ jsxs129(Typography9, { variant: "body2", children: [
4358
4370
  ((BigInt(selectedEvent.end_time_unix_nano) - BigInt(selectedEvent.start_time_unix_nano)) / BigInt("1000000")).toString(),
4359
4371
  " ",
@@ -4383,13 +4395,25 @@ var EventDetails = ({ onClose, selectedEvent }) => {
4383
4395
  }
4384
4396
  )
4385
4397
  ] }),
4386
- selectedEvent.attributes && Object.keys(selectedEvent.attributes).length > 0 && /* @__PURE__ */ jsxs129(Fragment6, { children: [
4398
+ attributes.length > 0 && /* @__PURE__ */ jsxs129(Fragment6, { children: [
4387
4399
  /* @__PURE__ */ jsx137(Divider2, {}),
4388
- /* @__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) }) }) })
4400
+ /* @__PURE__ */ jsx137(ToggleSection, { headline: "Attributes", children: /* @__PURE__ */ jsx137(Stack2, { spacing: 1, children: attributes.map(([key, value]) => /* @__PURE__ */ jsxs129(Box15, { children: [
4401
+ /* @__PURE__ */ jsx137(Typography9, { sx: { fontWeight: 600 }, variant: "caption", children: key }),
4402
+ /* @__PURE__ */ jsx137(Typography9, { variant: "body2", children: renderKeyValue(key, value) })
4403
+ ] }, key)) }) })
4389
4404
  ] })
4390
4405
  ] }) })
4391
4406
  ] });
4392
4407
  };
4408
+ function renderKeyValue(key, value) {
4409
+ if (typeof value === "string" && (key === "localstack.aws.service.request" || key === "localstack.aws.service.response" || key === "localstack.aws.service.exception")) {
4410
+ 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) }) }) });
4411
+ }
4412
+ if (typeof value === "boolean") {
4413
+ return /* @__PURE__ */ jsx137(Typography9, { variant: "body2", children: value ? "yes" : "no" });
4414
+ }
4415
+ return /* @__PURE__ */ jsx137(Typography9, { variant: "body2", children: value });
4416
+ }
4393
4417
 
4394
4418
  // src/components/trace-graph/trace-graph.tsx
4395
4419
  import "@xyflow/react/dist/base.css";
@@ -4405,11 +4429,11 @@ import { memo, useCallback as useCallback6 } from "react";
4405
4429
 
4406
4430
  // src/components/trace-graph/problem-indicator.tsx
4407
4431
  import { Error as ErrorIcon2, Info as Info2, Warning as Warning2 } from "@mui/icons-material";
4408
- import { Box as Box16, Tooltip as Tooltip3 } from "@mui/material";
4409
- import { useMemo as useMemo7 } from "react";
4432
+ import { Box as Box16, Tooltip as Tooltip4 } from "@mui/material";
4433
+ import { useMemo as useMemo8 } from "react";
4410
4434
  import { jsx as jsx138 } from "react/jsx-runtime";
4411
4435
  var ProblemIndicator = ({ error }) => {
4412
- const icon = useMemo7(() => {
4436
+ const icon = useMemo8(() => {
4413
4437
  switch (error.level) {
4414
4438
  case "error": {
4415
4439
  return /* @__PURE__ */ jsx138(ErrorIcon2, { sx: { color: "#d32f2f", fontSize: "14px" } });
@@ -4422,7 +4446,7 @@ var ProblemIndicator = ({ error }) => {
4422
4446
  }
4423
4447
  }
4424
4448
  }, [error.level]);
4425
- const color = useMemo7(() => {
4449
+ const color = useMemo8(() => {
4426
4450
  switch (error.level) {
4427
4451
  case "error": {
4428
4452
  return "#d32f2f";
@@ -4435,7 +4459,7 @@ var ProblemIndicator = ({ error }) => {
4435
4459
  }
4436
4460
  }
4437
4461
  }, [error.level]);
4438
- return /* @__PURE__ */ jsx138(Tooltip3, { arrow: true, title: error.message ?? "Issue detected", children: /* @__PURE__ */ jsx138(
4462
+ return /* @__PURE__ */ jsx138(Tooltip4, { arrow: true, title: error.message ?? "Issue detected", children: /* @__PURE__ */ jsx138(
4439
4463
  Box16,
4440
4464
  {
4441
4465
  sx: {