@localstack/appinspector-ui 1.0.90 → 1.0.92

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -10223,6 +10223,7 @@ var EVENT_DETAILS_REQUEST_PAYLOAD = "event-details-request-payload";
10223
10223
  var EVENT_DETAILS_RESPONSE_PAYLOAD_TEST_ID = "event-details-response-payload";
10224
10224
  var EVENT_DETAILS_EXCEPTION_PAYLOAD_TEST_ID = "event-details-exception-payload";
10225
10225
  var EVENT_DETAILS_IAM_ERRORS_SUPPRESSED_TEST_ID = "event-details-iam-errors-suppressed";
10226
+ var IAM_ERROR_COUNT_TEST_ID = "iam-error-count";
10226
10227
  var SERVICE_NODE_TEST_ID = "service-node";
10227
10228
  var SERVICE_NODE_SERVICE_NAME_TEST_ID = "service-node-service-name";
10228
10229
  var SERVICE_NODE_OPERATION_NAME_TEST_ID = "service-node-operation-name";
@@ -12903,6 +12904,7 @@ var SpansDataGrid = ({
12903
12904
  fetchingForward,
12904
12905
  hasMoreBackward,
12905
12906
  hasMoreForward,
12907
+ iamErrorCount,
12906
12908
  licenseLimit,
12907
12909
  onClearSpans,
12908
12910
  onFetchBackward,
@@ -12999,6 +13001,24 @@ var SpansDataGrid = ({
12999
13001
  return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_jsx_runtime126.Fragment, { children: [
13000
13002
  /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Grid, { item: true, xs: 12, children: /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_material5.Box, { sx: { alignItems: "center", display: "flex", gap: "0.5rem" }, children: [
13001
13003
  /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(SpanCountBadge, { licenseLimit, systemLimit, totalCount, visibleCount: spans?.length }),
13004
+ iamErrorCount !== void 0 && iamErrorCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_jsx_runtime126.Fragment, { children: [
13005
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Typography, { color: "text.disabled", sx: { mr: 0.5 }, variant: "body2", children: "\u2014" }),
13006
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Tooltip, { title: "Number of IAM permission errors detected across all operations", children: /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
13007
+ import_material5.Box,
13008
+ {
13009
+ "data-testid": IAM_ERROR_COUNT_TEST_ID,
13010
+ sx: { alignItems: "center", borderBottom: "1px dotted", borderColor: "error.main", cursor: "default", display: "flex", gap: 0.5, mb: "-1px" },
13011
+ children: [
13012
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Typography, { color: "error", variant: "body2", children: iamErrorCount.toLocaleString() }),
13013
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_material5.Typography, { color: "error", variant: "caption", children: [
13014
+ "IAM",
13015
+ " ",
13016
+ iamErrorCount === 1 ? "error" : "errors"
13017
+ ] })
13018
+ ]
13019
+ }
13020
+ ) })
13021
+ ] }),
13002
13022
  /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Box, { sx: { flexGrow: 1 } }),
13003
13023
  /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
13004
13024
  import_material5.FormControlLabel,
@@ -13130,6 +13150,7 @@ var SpansList = (props) => {
13130
13150
  fetchingForward: props.fetchingForward,
13131
13151
  hasMoreBackward: props.hasMoreBackward,
13132
13152
  hasMoreForward: props.hasMoreForward,
13153
+ iamErrorCount: props.iamErrorCount,
13133
13154
  licenseLimit: props.licenseLimit,
13134
13155
  onClearSpans: props.onClearSpans,
13135
13156
  onFetchBackward: props.onFetchBackward,
@@ -14109,6 +14130,7 @@ var useSpans = () => {
14109
14130
  setTotalCount(response.pagination.total_count);
14110
14131
  setLicenseLimit(response.limits.span_count_limit_license);
14111
14132
  setSystemLimit(response.limits.span_count_limit_system);
14133
+ setIamErrorCount(response.iam_error_count);
14112
14134
  return {
14113
14135
  hasMoreBackward: response.pagination.has_prev,
14114
14136
  hasMoreForward: response.pagination.has_next,
@@ -14140,6 +14162,7 @@ var useSpans = () => {
14140
14162
  const [totalCount, setTotalCount] = (0, import_react50.useState)();
14141
14163
  const [licenseLimit, setLicenseLimit] = (0, import_react50.useState)();
14142
14164
  const [systemLimit, setSystemLimit] = (0, import_react50.useState)();
14165
+ const [iamErrorCount, setIamErrorCount] = (0, import_react50.useState)();
14143
14166
  const [hasMoreBackward, setHasMoreBackward] = (0, import_react50.useState)();
14144
14167
  const [hasMoreForward, setHasMoreForward] = (0, import_react50.useState)();
14145
14168
  const fetchForward = (0, import_react50.useCallback)(() => {
@@ -14204,6 +14227,7 @@ var useSpans = () => {
14204
14227
  fetchingForward,
14205
14228
  hasMoreBackward,
14206
14229
  hasMoreForward,
14230
+ iamErrorCount,
14207
14231
  licenseLimit,
14208
14232
  spans: throttledSpans.items,
14209
14233
  status,
@@ -26515,12 +26539,13 @@ var EventDetails = ({ onClose, selectedEvent }) => {
26515
26539
  requestPayload.MessageBody = tryParseJson(requestPayload.MessageBody);
26516
26540
  }
26517
26541
  }
26542
+ const isResponseSuppressed = selectedEvent.attributes?.["localstack.aws.service.response_suppressed"] === true;
26518
26543
  const responsePayload = tryParseJson(selectedEvent.attributes?.["localstack.aws.service.response"]);
26519
26544
  if (parseNestedJson && isLambdaInvoke && responsePayload && typeof responsePayload === "object" && "Payload" in responsePayload) {
26520
26545
  responsePayload.Payload = tryParseJson(responsePayload.Payload);
26521
26546
  }
26522
26547
  const exceptionPayload = tryParseJson(selectedEvent.attributes?.["localstack.aws.service.exception"]);
26523
- const hasPayloads = requestPayload !== void 0 || responsePayload !== void 0 || exceptionPayload !== void 0;
26548
+ const hasPayloads = requestPayload !== void 0 || responsePayload !== void 0 || exceptionPayload !== void 0 || isResponseSuppressed;
26524
26549
  const duration = selectedEvent.end_time_unix_nano ? ((BigInt(selectedEvent.end_time_unix_nano) - BigInt(selectedEvent.start_time_unix_nano)) / BigInt("1000000")).toString() : void 0;
26525
26550
  return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material15.Box, { "data-testid": EVENT_DETAILS_TEST_ID, sx: { display: "flex", flexDirection: "column", height: "100%" }, children: [
26526
26551
  /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(
@@ -26626,9 +26651,9 @@ var EventDetails = ({ onClose, selectedEvent }) => {
26626
26651
  /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material15.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Request" }),
26627
26652
  /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(PayloadViewer, { testId: EVENT_DETAILS_REQUEST_PAYLOAD, value: requestPayload })
26628
26653
  ] }),
26629
- responsePayload !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material15.Box, { children: [
26654
+ (responsePayload !== void 0 || isResponseSuppressed) && /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material15.Box, { children: [
26630
26655
  /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material15.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Response" }),
26631
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(PayloadViewer, { testId: EVENT_DETAILS_RESPONSE_PAYLOAD_TEST_ID, value: responsePayload })
26656
+ isResponseSuppressed ? /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material15.Box, { sx: { py: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material15.Alert, { severity: "warning", sx: { mb: 1 }, children: "Response payload is available \u2014 upgrade your license to view" }) }) : /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(PayloadViewer, { testId: EVENT_DETAILS_RESPONSE_PAYLOAD_TEST_ID, value: responsePayload })
26632
26657
  ] }),
26633
26658
  exceptionPayload !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material15.Box, { children: [
26634
26659
  /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material15.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Exception" }),
@@ -26672,7 +26697,7 @@ var EventDetails = ({ onClose, selectedEvent }) => {
26672
26697
  };
26673
26698
  var PayloadViewer = (0, import_react56.memo)(({ testId, value }) => {
26674
26699
  const theme = (0, import_material15.useTheme)();
26675
- return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material15.Box, { "data-testid": testId, sx: { backgroundColor: "background.default", borderRadius: 1, fontSize: 12, overflow: "auto", p: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
26700
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material15.Box, { "data-testid": testId, sx: { backgroundColor: "background.default", borderRadius: 1, fontSize: 12, overflow: "auto", py: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
26676
26701
  JsonViewer,
26677
26702
  {
26678
26703
  displayDataTypes: false,
@@ -27319,6 +27344,7 @@ var SpansListPage = () => {
27319
27344
  fetchingForward,
27320
27345
  hasMoreBackward,
27321
27346
  hasMoreForward,
27347
+ iamErrorCount,
27322
27348
  licenseLimit,
27323
27349
  spans,
27324
27350
  status,
@@ -27379,6 +27405,7 @@ var SpansListPage = () => {
27379
27405
  fetchingForward,
27380
27406
  hasMoreBackward,
27381
27407
  hasMoreForward,
27408
+ iamErrorCount,
27382
27409
  licenseLimit,
27383
27410
  onClearSpans: clearSpansSync,
27384
27411
  onFetchBackward: fetchBackward,