@localstack/appinspector-ui 1.0.215 → 1.0.217

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
@@ -2541,7 +2541,6 @@ var WATERFALL_ROW_TOGGLE_TEST_ID = "waterfall-row-toggle";
2541
2541
  var DETAIL_TAB_DETAILS_TEST_ID = "detail-tab-details";
2542
2542
  var DETAIL_TAB_REQUEST_TEST_ID = "detail-tab-request";
2543
2543
  var DETAIL_TAB_RESPONSE_TEST_ID = "detail-tab-response";
2544
- var DETAIL_TAB_ERROR_TEST_ID = "detail-tab-error";
2545
2544
  var DETAIL_TAB_PERMISSIONS_TEST_ID = "detail-tab-permissions";
2546
2545
  var DETAIL_TAB_LOGS_TEST_ID = "detail-tab-logs";
2547
2546
  var DETAIL_TAB_ADVANCED_TEST_ID = "detail-tab-advanced";
@@ -7158,12 +7157,12 @@ var isColorString = (type, testProp) => (v) => {
7158
7157
  var splitColor = (aName, bName, cName) => (v) => {
7159
7158
  if (!isString(v))
7160
7159
  return v;
7161
- const [a3, b3, c3, alpha7] = v.match(floatRegex);
7160
+ const [a3, b3, c3, alpha8] = v.match(floatRegex);
7162
7161
  return {
7163
7162
  [aName]: parseFloat(a3),
7164
7163
  [bName]: parseFloat(b3),
7165
7164
  [cName]: parseFloat(c3),
7166
- alpha: alpha7 !== void 0 ? parseFloat(alpha7) : 1
7165
+ alpha: alpha8 !== void 0 ? parseFloat(alpha8) : 1
7167
7166
  };
7168
7167
  };
7169
7168
 
@@ -8277,7 +8276,7 @@ function hueToRgb(p, q, t) {
8277
8276
  return p + (q - p) * (2 / 3 - t) * 6;
8278
8277
  return p;
8279
8278
  }
8280
- function hslaToRgba({ hue, saturation, lightness, alpha: alpha7 }) {
8279
+ function hslaToRgba({ hue, saturation, lightness, alpha: alpha8 }) {
8281
8280
  hue /= 360;
8282
8281
  saturation /= 100;
8283
8282
  lightness /= 100;
@@ -8297,7 +8296,7 @@ function hslaToRgba({ hue, saturation, lightness, alpha: alpha7 }) {
8297
8296
  red: Math.round(red * 255),
8298
8297
  green: Math.round(green * 255),
8299
8298
  blue: Math.round(blue * 255),
8300
- alpha: alpha7
8299
+ alpha: alpha8
8301
8300
  };
8302
8301
  }
8303
8302
 
@@ -15633,7 +15632,9 @@ var OperationIdentity = (0, import_react36.memo)(({
15633
15632
  service,
15634
15633
  sx,
15635
15634
  tailTestId,
15636
- testId
15635
+ testId,
15636
+ trailing,
15637
+ trailingRow = "title"
15637
15638
  }) => {
15638
15639
  const resource = shortResourceName(resourceName, arn);
15639
15640
  const hasResource = resource !== "" && resource !== "*";
@@ -15641,20 +15642,26 @@ var OperationIdentity = (0, import_react36.memo)(({
15641
15642
  const stackedIconSize = typeof iconSize === "number" ? iconSize : 32;
15642
15643
  if (density === "heading") {
15643
15644
  const isText = typeof children === "string";
15645
+ const trailingNode = (row) => trailing !== void 0 && trailingRow === row ? /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Box, { sx: { alignSelf: "center", flex: "none", ml: "auto", pl: 1 }, children: trailing }) : void 0;
15644
15646
  return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_material5.Box, { "data-testid": testId, sx: { minWidth: 0, ...sx }, children: [
15645
- label !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Typography, { color: "text.secondary", component: "div", sx: { fontSize: 11, fontWeight: 500, letterSpacing: "0.06em", lineHeight: "16px", textTransform: "uppercase" }, children: label }),
15647
+ label !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_material5.Box, { sx: { alignItems: "center", display: "flex", minWidth: 0 }, children: [
15648
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Typography, { color: "text.secondary", component: "div", sx: { fontSize: 11, fontWeight: 500, letterSpacing: "0.06em", lineHeight: "16px", textTransform: "uppercase" }, children: label }),
15649
+ trailingNode("label")
15650
+ ] }),
15646
15651
  /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_material5.Box, { sx: { alignItems: "center", columnGap: "10px", display: "flex", minWidth: 0 }, children: [
15647
15652
  /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Box, { sx: { borderRadius: "6px", flex: "none", lineHeight: 0, overflow: "hidden" }, children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(AwsServiceIcon, { hideTooltip: true, service, size: "large" }) }),
15648
15653
  /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_material5.Stack, { sx: { flex: 1, minWidth: 0 }, children: [
15649
15654
  /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_material5.Box, { sx: { alignItems: "baseline", columnGap: "6px", display: "flex", fontSize: 15, lineHeight: "20px", minWidth: 0 }, children: [
15650
15655
  /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Typography, { component: "span", noWrap: true, sx: { flex: "0 100 auto", fontWeight: 700, minWidth: "3ch" }, title: getServiceDisplayName(service), variant: "inherit", children: getServiceDisplayName(service) }),
15651
- hasOperation && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Typography, { component: "span", "data-testid": SERVICE_NODE_OPERATION_NAME_TEST_ID, noWrap: true, sx: { flex: "0 1 auto", minWidth: 0 }, variant: "inherit", children: operation2 })
15656
+ hasOperation && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Typography, { component: "span", "data-testid": SERVICE_NODE_OPERATION_NAME_TEST_ID, noWrap: true, sx: { flex: "0 1 auto", minWidth: 0 }, variant: "inherit", children: operation2 }),
15657
+ trailingNode("title")
15652
15658
  ] }),
15653
- (hasResource || resourcePlaceholder !== void 0 || children !== void 0) && /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_material5.Box, { sx: { alignItems: "center", color: "text.secondary", columnGap: "6px", display: "flex", flexWrap: isText ? "nowrap" : "wrap", fontSize: 12, lineHeight: "18px", minWidth: 0, rowGap: "4px" }, children: [
15659
+ (hasResource || resourcePlaceholder !== void 0 || children !== void 0 || trailingRow === "resource") && /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_material5.Box, { sx: { alignItems: "center", color: "text.secondary", columnGap: "6px", display: "flex", flexWrap: isText ? "nowrap" : "wrap", fontSize: 12, lineHeight: "18px", minWidth: 0, rowGap: "4px" }, children: [
15654
15660
  hasResource && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Typography, { component: "span", "data-testid": SERVICE_NODE_SERVICE_NAME_TEST_ID, noWrap: true, sx: { ...RESOURCE_CODE_SX, flex: "0 3 auto", minWidth: "3ch" }, title: resourceName || arn, variant: "inherit", children: resource }),
15655
15661
  !hasResource && resourcePlaceholder !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Box, { component: "span", sx: { color: "text.disabled", flex: "none" }, children: resourcePlaceholder }),
15656
15662
  (hasResource || resourcePlaceholder !== void 0) && isText && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Box, { "aria-hidden": true, component: "span", sx: { color: "text.disabled", flex: "none" }, children: "\xB7" }),
15657
- isText ? /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Typography, { component: "span", "data-testid": tailTestId, noWrap: true, sx: { flex: "1 1 0", minWidth: 0 }, title: children, variant: "inherit", children }) : children
15663
+ isText ? /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Typography, { component: "span", "data-testid": tailTestId, noWrap: true, sx: { flex: "1 1 0", minWidth: 0 }, title: children, variant: "inherit", children }) : children,
15664
+ trailingNode("resource")
15658
15665
  ] })
15659
15666
  ] })
15660
15667
  ] })
@@ -16954,6 +16961,12 @@ var import_icons_material11 = require("@mui/icons-material");
16954
16961
  var import_material21 = require("@mui/material");
16955
16962
  var import_react53 = require("react");
16956
16963
 
16964
+ // src/dev-settings.tsx
16965
+ var React122 = __toESM(require("react"), 1);
16966
+ var DEFAULT_DEV_SETTINGS = { allowedPillWhenSucceeded: "hide", headingPills: "resource-line", succeededIconColor: "green", waterfallLayout: "tree" };
16967
+ var DevSettingsContext = React122.createContext(DEFAULT_DEV_SETTINGS);
16968
+ var useDevSettings = () => React122.useContext(DevSettingsContext);
16969
+
16957
16970
  // src/utils/event-utils.ts
16958
16971
  var iamEventParser = (eventName, attributes) => {
16959
16972
  if (attributes?.payload && typeof attributes.payload === "string") {
@@ -31672,17 +31685,14 @@ var tint = (color2) => ({
31672
31685
  px: 0.75,
31673
31686
  py: 0.25
31674
31687
  });
31675
- var clickable = (onClick) => onClick === void 0 ? {} : {
31676
- component: import_material20.ButtonBase,
31677
- onClick,
31678
- sx: { "&:hover": { filter: "brightness(1.15)" }, "borderRadius": 1, "cursor": "pointer", "font": "inherit" }
31679
- };
31680
- var OperationStatusBadges = ({ iam, iamPermission, onIamClick, onStatusClick, status, statusLabel }) => {
31688
+ var OperationStatusBadges = ({ iam, iamPermission, status, statusLabel }) => {
31689
+ const { allowedPillWhenSucceeded, succeededIconColor } = useDevSettings();
31681
31690
  const isError = status === "error";
31682
31691
  const statusText = isError ? statusLabel ?? "Error" : "OK";
31683
31692
  const StatusIcon2 = isError ? import_icons_material10.Cancel : import_icons_material10.CheckCircle;
31684
31693
  const statusColor = isError ? "error" : "success";
31685
- const iamStyle = iam === void 0 ? void 0 : IAM[iam];
31694
+ const hideAllowed = iam === "allowed" && status === "ok" && allowedPillWhenSucceeded === "hide";
31695
+ const iamStyle = iam === void 0 || hideAllowed ? void 0 : IAM[iam];
31686
31696
  const iamLabel = iamPermission === void 0 || iam === "suppressed" ? iamStyle?.label : sentenceCase(formatPermissionStatus(iamPermission));
31687
31697
  const showStatus = status !== "unset";
31688
31698
  if (!showStatus && !iamStyle) {
@@ -31693,10 +31703,9 @@ var OperationStatusBadges = ({ iam, iamPermission, onIamClick, onStatusClick, st
31693
31703
  import_material20.Box,
31694
31704
  {
31695
31705
  "data-testid": EVENT_DETAILS_HEADING_STATUS_TEST_ID,
31696
- ...clickable(onStatusClick),
31697
- sx: { alignItems: "center", display: "flex", gap: 0.5, minWidth: 0, ...clickable(onStatusClick).sx, ...tint(statusColor) },
31706
+ sx: { alignItems: "center", display: "flex", gap: 0.5, minWidth: 0, ...tint(statusColor) },
31698
31707
  children: [
31699
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(StatusIcon2, { sx: { color: `${statusColor}.main`, fontSize: 14 } }),
31708
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(StatusIcon2, { sx: { color: !isError && succeededIconColor === "gray" ? "text.disabled" : `${statusColor}.main`, fontSize: 14 } }),
31700
31709
  /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_material20.Typography, { color: "inherit", noWrap: true, variant: "caption", children: isError ? `Failed \xB7 ${statusText}` : "Succeeded" })
31701
31710
  ]
31702
31711
  }
@@ -31705,8 +31714,7 @@ var OperationStatusBadges = ({ iam, iamPermission, onIamClick, onStatusClick, st
31705
31714
  import_material20.Box,
31706
31715
  {
31707
31716
  "data-testid": EVENT_DETAILS_HEADING_IAM_TEST_ID,
31708
- ...clickable(onIamClick),
31709
- sx: { alignItems: "center", display: "flex", flex: "none", gap: 0.5, ...clickable(onIamClick).sx, ...tint(iamStyle.color) },
31717
+ sx: { alignItems: "center", display: "flex", flex: "none", gap: 0.5, ...tint(iamStyle.color) },
31710
31718
  children: [
31711
31719
  /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(iamStyle.icon, { sx: { color: paletteColor(iamStyle.color), fontSize: 14 } }),
31712
31720
  /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_material20.Typography, { color: "inherit", variant: "caption", children: iamLabel })
@@ -31733,12 +31741,15 @@ var checkIsSqsSendMessage = (span) => {
31733
31741
  };
31734
31742
  var PERMISSION_SEVERITY = ["explicitly_denied", "implicitly_denied", "explicitly_allowed"];
31735
31743
  var getWorstPermission = (events) => PERMISSION_SEVERITY.find((permission) => events.some((event) => event.permission === permission));
31744
+ var ERROR_BOX_SX = { bgcolor: (theme) => (0, import_material21.alpha)(theme.palette.error.main, 0.08), borderLeft: 4, borderLeftColor: "error.main", borderRadius: 1, p: 1.5 };
31745
+ var TRAILING_ROW = { "bottom-right": "resource", "resource-line": "title", "title-row": "title", "top-right": "label" };
31736
31746
  var IAM_OUTCOME = { allowed: "allowed", error: "denied", none: void 0, warning: "warning" };
31737
- var OPTIONAL_TABS = ["error", "logs", "permissions"];
31747
+ var OPTIONAL_TABS = ["logs", "permissions", "response"];
31738
31748
  var getOptionalTabs = (span, eventGroups) => ({
31739
- error: getSpanIssues(span).error,
31740
31749
  logs: checkIsLambdaInvoke(span) && typeof span.attributes?.["localstack.request_id"] === "string",
31741
- permissions: span.iam_errors_suppressed === true || eventGroups.permissions !== void 0
31750
+ permissions: span.iam_errors_suppressed === true || eventGroups.permissions !== void 0,
31751
+ // A failed call has no response; its error is at the top of Details.
31752
+ response: span.attributes?.["localstack.aws.service.response_suppressed"] === true || tryParseJson(span.attributes?.["localstack.aws.service.response"]) !== void 0
31742
31753
  });
31743
31754
  var Field = ({ children, copy, label, testId, testIdOn = "value" }) => /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Box, { children: [
31744
31755
  /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: label }),
@@ -31753,6 +31764,7 @@ var EventDetails = ({ onClose, onOperationShown, selectedEvent }) => {
31753
31764
  () => getEventGroupsByType(selectedEvent?.events ?? []),
31754
31765
  [selectedEvent?.events]
31755
31766
  );
31767
+ const { headingPills } = useDevSettings();
31756
31768
  const [parseNestedJson, setParseNestedJson] = (0, import_react53.useState)(true);
31757
31769
  const [tab, setTab] = (0, import_react53.useState)("details");
31758
31770
  const optionalTabs = selectedEvent ? getOptionalTabs(selectedEvent, eventGroups) : void 0;
@@ -31797,7 +31809,8 @@ var EventDetails = ({ onClose, onOperationShown, selectedEvent }) => {
31797
31809
  const functionError = isLambdaInvoke ? getLambdaFunctionError(selectedEvent.attributes?.["localstack.aws.service.response"]) : void 0;
31798
31810
  const errorType = functionError?.errorType ?? issues.errorType;
31799
31811
  const duration = selectedEvent.end_time_unix_nano ? ((BigInt(selectedEvent.end_time_unix_nano) - BigInt(selectedEvent.start_time_unix_nano)) / BigInt("1000000")).toString() : void 0;
31800
- const { error: showError, logs: showLogs, permissions: showPermissions } = getOptionalTabs(selectedEvent, eventGroups);
31812
+ const showError = issues.error;
31813
+ const { logs: showLogs, permissions: showPermissions, response: showResponse } = getOptionalTabs(selectedEvent, eventGroups);
31801
31814
  const errorMessages = functionError?.errorMessage === void 0 ? [.../* @__PURE__ */ new Set([selectedEvent.status_message, ...(selectedEvent.errors ?? []).filter((item) => item.level === "error").map((item) => item.message)])].filter((message) => Boolean(message) && message !== errorType) : [functionError.errorMessage];
31802
31815
  const iamEvents = getIamEvents(selectedEvent);
31803
31816
  const iamPermission = getWorstPermission(iamEvents);
@@ -31807,12 +31820,6 @@ var EventDetails = ({ onClose, onOperationShown, selectedEvent }) => {
31807
31820
  {
31808
31821
  iam: iamOutcome,
31809
31822
  iamPermission,
31810
- onIamClick: showPermissions ? () => {
31811
- setTab("permissions");
31812
- } : void 0,
31813
- onStatusClick: () => {
31814
- setTab(showError ? "error" : "response");
31815
- },
31816
31823
  status: issues.error ? "error" : selectedEvent.status_code === 1 ? "ok" : "unset",
31817
31824
  statusLabel: errorType
31818
31825
  }
@@ -31845,7 +31852,7 @@ var EventDetails = ({ onClose, onOperationShown, selectedEvent }) => {
31845
31852
  py: 1.25
31846
31853
  },
31847
31854
  children: [
31848
- /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(OperationIdentity, { ...identity, density: "heading", label: "Selected operation", sx: { flex: 1 }, testId: EVENT_DETAILS_HEADING_TEST_ID, children: statusBadges }),
31855
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(OperationIdentity, { ...identity, density: "heading", label: "Selected operation", sx: { flex: 1 }, testId: EVENT_DETAILS_HEADING_TEST_ID, trailing: headingPills === "resource-line" ? void 0 : statusBadges, trailingRow: TRAILING_ROW[headingPills], children: headingPills === "resource-line" ? statusBadges : void 0 }),
31849
31856
  onClose && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.IconButton, { "data-testid": EVENT_DETAILS_CLOSE_BUTTON_TEST_ID, onClick: onClose, size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_icons_material11.Close, {}) })
31850
31857
  ]
31851
31858
  }
@@ -31873,10 +31880,9 @@ var EventDetails = ({ onClose, onOperationShown, selectedEvent }) => {
31873
31880
  value: activeTab,
31874
31881
  variant: "scrollable",
31875
31882
  children: [
31876
- /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Tab, { "data-testid": DETAIL_TAB_DETAILS_TEST_ID, label: "Details", value: "details" }),
31883
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Tab, { "data-testid": DETAIL_TAB_DETAILS_TEST_ID, icon: showError ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_icons_material11.Cancel, { color: "error", sx: { fontSize: 16 } }) : void 0, iconPosition: "end", label: "Details", value: "details" }),
31877
31884
  /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Tab, { "data-testid": DETAIL_TAB_REQUEST_TEST_ID, label: "Payload", value: "payload" }),
31878
- /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Tab, { "data-testid": DETAIL_TAB_RESPONSE_TEST_ID, label: "Response", value: "response" }),
31879
- showError && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Tab, { "data-testid": DETAIL_TAB_ERROR_TEST_ID, icon: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_icons_material11.Cancel, { color: "error", sx: { fontSize: 16 } }), iconPosition: "end", label: "Error", value: "error" }),
31885
+ showResponse && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Tab, { "data-testid": DETAIL_TAB_RESPONSE_TEST_ID, label: "Response", value: "response" }),
31880
31886
  showPermissions && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Tab, { "data-testid": DETAIL_TAB_PERMISSIONS_TEST_ID, icon: permissionsIcon, iconPosition: "end", label: "Permissions", value: "permissions" }),
31881
31887
  showLogs && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Tab, { "data-testid": DETAIL_TAB_LOGS_TEST_ID, label: "Logs", value: "logs" }),
31882
31888
  /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Tab, { "data-testid": DETAIL_TAB_ADVANCED_TEST_ID, label: "Advanced", value: "advanced" })
@@ -31885,6 +31891,35 @@ var EventDetails = ({ onClose, onOperationShown, selectedEvent }) => {
31885
31891
  ),
31886
31892
  /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Box, { sx: { p: 2 }, children: [
31887
31893
  activeTab === "details" && /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Stack, { spacing: 2, children: [
31894
+ showError && /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Stack, { spacing: 2, sx: ERROR_BOX_SX, children: [
31895
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Stack, { spacing: 1, children: [
31896
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Field, { label: "Type", children: errorType }),
31897
+ errorMessages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Field, { label: "Message", children: errorMessages.join(" \xB7 ") }),
31898
+ functionError && /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Box, { sx: { display: "grid", gap: 2, gridTemplateColumns: "1.3fr 1fr" }, children: [
31899
+ functionError.requestId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Field, { label: "Request ID", children: functionError.requestId }),
31900
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Field, { label: "Function Error", testId: EVENT_DETAILS_FUNCTION_ERROR_TEST_ID, children: functionError.functionError })
31901
+ ] })
31902
+ ] }),
31903
+ functionError?.stackTrace !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Box, { children: [
31904
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31905
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Stack Trace" }),
31906
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(CopyButton, { value: functionError.stackTrace })
31907
+ ] }),
31908
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
31909
+ import_material21.Box,
31910
+ {
31911
+ component: "pre",
31912
+ "data-testid": EVENT_DETAILS_STACK_TRACE_TEST_ID,
31913
+ sx: { backgroundColor: "background.default", borderRadius: 1, fontFamily: "monospace", fontSize: 12, m: 0, overflow: "auto", p: 1 },
31914
+ children: functionError.stackTrace
31915
+ }
31916
+ )
31917
+ ] }),
31918
+ exceptionPayload !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Box, { children: [
31919
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Typography, { sx: { fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Exception" }),
31920
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(PayloadViewer, { testId: EVENT_DETAILS_EXCEPTION_PAYLOAD_TEST_ID, value: exceptionPayload })
31921
+ ] })
31922
+ ] }),
31888
31923
  /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Stack, { "data-testid": EVENT_DETAILS_SECTION_BASIC_INFORMATION_TEST_ID, spacing: 1, children: [
31889
31924
  /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Box, { sx: { display: "grid", gap: 2, gridTemplateColumns: "1.3fr 1fr" }, children: [
31890
31925
  /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Field, { copy: getServiceDisplayName(selectedEvent.service_name), label: "Service", testId: EVENT_DETAILS_SERVICE_NAME_TEST_ID, children: getServiceDisplayName(selectedEvent.service_name) }),
@@ -31924,38 +31959,9 @@ var EventDetails = ({ onClose, onOperationShown, selectedEvent }) => {
31924
31959
  rawDataSwitch,
31925
31960
  /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(PayloadViewer, { testId: EVENT_DETAILS_REQUEST_PAYLOAD, value: requestPayload })
31926
31961
  ] })),
31927
- activeTab === "response" && (responsePayload === void 0 && !isResponseSuppressed ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(EmptyTab, { children: issues.error ? "No response: the call failed. See the Error tab." : "No response payload recorded." }) : /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_jsx_runtime145.Fragment, { children: [
31962
+ activeTab === "response" && /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_jsx_runtime145.Fragment, { children: [
31928
31963
  rawDataSwitch,
31929
31964
  isResponseSuppressed ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Alert, { severity: "warning", children: "Response payload is available \u2014 upgrade your license to view" }) : /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(PayloadViewer, { testId: EVENT_DETAILS_RESPONSE_PAYLOAD_TEST_ID, value: responsePayload })
31930
- ] })),
31931
- activeTab === "error" && /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Stack, { spacing: 2, children: [
31932
- /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Stack, { spacing: 1, children: [
31933
- /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Field, { label: "Type", children: errorType }),
31934
- errorMessages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Field, { label: "Message", children: errorMessages.join(" \xB7 ") }),
31935
- functionError && /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Box, { sx: { display: "grid", gap: 2, gridTemplateColumns: "1.3fr 1fr" }, children: [
31936
- functionError.requestId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Field, { label: "Request ID", children: functionError.requestId }),
31937
- /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Field, { label: "Function Error", testId: EVENT_DETAILS_FUNCTION_ERROR_TEST_ID, children: functionError.functionError })
31938
- ] })
31939
- ] }),
31940
- functionError?.stackTrace !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Box, { children: [
31941
- /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31942
- /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Stack Trace" }),
31943
- /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(CopyButton, { value: functionError.stackTrace })
31944
- ] }),
31945
- /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
31946
- import_material21.Box,
31947
- {
31948
- component: "pre",
31949
- "data-testid": EVENT_DETAILS_STACK_TRACE_TEST_ID,
31950
- sx: { backgroundColor: "background.default", borderRadius: 1, fontFamily: "monospace", fontSize: 12, m: 0, overflow: "auto", p: 1 },
31951
- children: functionError.stackTrace
31952
- }
31953
- )
31954
- ] }),
31955
- exceptionPayload !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Box, { children: [
31956
- /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Typography, { sx: { fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Exception" }),
31957
- /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(PayloadViewer, { testId: EVENT_DETAILS_EXCEPTION_PAYLOAD_TEST_ID, value: exceptionPayload })
31958
- ] })
31959
31965
  ] }),
31960
31966
  activeTab === "permissions" && /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_jsx_runtime145.Fragment, { children: [
31961
31967
  selectedEvent.iam_errors_suppressed && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Alert, { "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" }),
@@ -31992,7 +31998,7 @@ var import_icons_material12 = require("@mui/icons-material");
31992
31998
  var import_material22 = require("@mui/material");
31993
31999
  var import_react54 = require("@xyflow/react");
31994
32000
  var import_style = require("@xyflow/react/dist/style.css");
31995
- var React122 = require("react");
32001
+ var React123 = require("react");
31996
32002
  var import_react55 = require("react");
31997
32003
  var import_jsx_runtime146 = require("react/jsx-runtime");
31998
32004
  var handleStyle = {
@@ -32555,12 +32561,6 @@ var import_material26 = require("@mui/material");
32555
32561
  var import_styles4 = require("@mui/material/styles");
32556
32562
  var React124 = __toESM(require("react"), 1);
32557
32563
 
32558
- // src/dev-settings.tsx
32559
- var React123 = __toESM(require("react"), 1);
32560
- var DEFAULT_DEV_SETTINGS = { waterfallLayout: "tree" };
32561
- var DevSettingsContext = React123.createContext(DEFAULT_DEV_SETTINGS);
32562
- var useDevSettings = () => React123.useContext(DevSettingsContext);
32563
-
32564
32564
  // src/components/trace-panel/axis-ticks.ts
32565
32565
  var getAxisTicks = (durationMs, maxIntervals) => {
32566
32566
  if (durationMs <= 0 || maxIntervals < 1) return [0];