@localstack/appinspector-ui 1.0.93 → 1.0.94

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
@@ -12682,12 +12682,13 @@ var ServiceCell = (0, import_react40.memo)(({
12682
12682
  sx: {
12683
12683
  borderBottomRightRadius: "15px",
12684
12684
  borderTopRightRadius: "15px",
12685
+ color: "text.secondary",
12685
12686
  overflow: "hidden",
12686
12687
  padding: "1px 8px",
12687
12688
  textOverflow: "ellipsis",
12688
12689
  whiteSpace: "nowrap"
12689
12690
  },
12690
- variant: "body2",
12691
+ variant: "caption",
12691
12692
  children: resource
12692
12693
  }
12693
12694
  )
@@ -26666,87 +26667,102 @@ var handleStyle = {
26666
26667
  opacity: 0
26667
26668
  };
26668
26669
  var ServiceNode = (0, import_react60.memo)(({ data, selected }) => {
26670
+ const theme = (0, import_material18.useTheme)();
26669
26671
  const hasErrors = (data.event.errors && data.event.errors.length > 0) ?? false;
26670
- return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Box, { "data-testid": SERVICE_NODE_TEST_ID, sx: { maxWidth: 200 }, children: [
26671
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
26672
- import_material18.Box,
26673
- {
26674
- role: "button",
26675
- sx: {
26676
- "&:hover": {
26677
- opacity: 1
26678
- },
26679
- "alignItems": "flex-start",
26680
- "borderRadius": 1,
26681
- "cursor": "pointer",
26682
- "display": "flex",
26683
- "flexDirection": "column",
26684
- "maxWidth": "100%",
26685
- "opacity": selected ? 1 : 0.7,
26686
- "position": "relative",
26687
- "transition": "all 0.3s ease",
26688
- "width": "min-content"
26689
- },
26690
- tabIndex: 0,
26691
- children: [
26692
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_react59.Handle, { position: import_react59.Position.Left, style: handleStyle, type: "target" }),
26693
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_react59.Handle, { position: import_react59.Position.Right, style: handleStyle, type: "source" }),
26694
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
26695
- ServiceCell,
26696
- {
26697
- height: "32px",
26698
- resource: data.event.resource_name,
26699
- selected,
26700
- service: data.event.service_name,
26701
- width: "32px"
26702
- }
26703
- )
26704
- ]
26705
- }
26706
- ),
26707
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
26708
- import_material18.Stack,
26709
- {
26710
- alignItems: "center",
26711
- direction: "row",
26712
- spacing: 0.5,
26713
- sx: {
26714
- ml: 1,
26715
- mt: 0.5
26672
+ return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
26673
+ import_material18.Box,
26674
+ {
26675
+ "data-testid": SERVICE_NODE_TEST_ID,
26676
+ role: "button",
26677
+ sx: {
26678
+ "&:hover": {
26679
+ boxShadow: theme.palette.mode === "dark" ? "0 4px 12px rgba(0,0,0,0.6)" : "0 4px 12px rgba(0,0,0,0.22)"
26716
26680
  },
26717
- children: [
26718
- hasErrors && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
26719
- import_material18.Stack,
26720
- {
26721
- direction: "row",
26722
- spacing: 0.5,
26723
- sx: {
26724
- flexWrap: "wrap",
26725
- gap: "2px"
26726
- },
26727
- children: data.event.errors?.map((error) => /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(ProblemIndicator, { error }, error.span_id))
26728
- }
26729
- ),
26730
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
26731
- import_material18.Typography,
26732
- {
26733
- "data-testid": SERVICE_NODE_OPERATION_NAME_TEST_ID,
26734
- sx: {
26735
- fontSize: "0.9rem",
26736
- maxWidth: "100%",
26737
- ml: hasErrors ? 2 : 0,
26738
- overflow: "hidden",
26739
- textOverflow: "ellipsis",
26740
- whiteSpace: "nowrap"
26741
- },
26742
- variant: "caption",
26743
- children: data.event.operation_name
26744
- }
26745
- )
26746
- ]
26747
- }
26748
- )
26749
- ] });
26681
+ "backgroundColor": theme.palette.background.paper,
26682
+ "borderLeft": `3px solid ${hasErrors ? theme.palette.error.main : "transparent"}`,
26683
+ "borderRadius": 1,
26684
+ "boxShadow": theme.palette.mode === "dark" ? "0 1px 4px rgba(0,0,0,0.5)" : "0 1px 4px rgba(0,0,0,0.13)",
26685
+ "cursor": "pointer",
26686
+ "maxWidth": 220,
26687
+ "minWidth": 140,
26688
+ "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}`,
26689
+ "overflow": "hidden",
26690
+ "position": "relative",
26691
+ "transition": "all 0.3s ease"
26692
+ },
26693
+ tabIndex: 0,
26694
+ children: [
26695
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_react59.Handle, { position: import_react59.Position.Left, style: handleStyle, type: "target" }),
26696
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_react59.Handle, { position: import_react59.Position.Right, style: handleStyle, type: "source" }),
26697
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
26698
+ import_material18.Stack,
26699
+ {
26700
+ alignItems: "center",
26701
+ direction: "row",
26702
+ sx: { gap: "8px", pb: "2px", pt: "6px", px: "8px" },
26703
+ children: [
26704
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Box, { sx: { borderRadius: "4px", flexShrink: 0, lineHeight: 0, overflow: "hidden" }, children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(AwsServiceIcon, { hideTooltip: true, service: data.event.service_name, size: "medium" }) }),
26705
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Stack, { sx: { minWidth: 0 }, children: [
26706
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
26707
+ import_material18.Typography,
26708
+ {
26709
+ noWrap: true,
26710
+ sx: { fontWeight: 700, lineHeight: 1.25 },
26711
+ variant: "body2",
26712
+ children: data.event.service_name
26713
+ }
26714
+ ),
26715
+ data.event.resource_name != "" && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
26716
+ import_material18.Typography,
26717
+ {
26718
+ color: "text.secondary",
26719
+ noWrap: true,
26720
+ sx: { lineHeight: 1.2 },
26721
+ variant: "caption",
26722
+ children: data.event.resource_name
26723
+ }
26724
+ )
26725
+ ] })
26726
+ ]
26727
+ }
26728
+ ),
26729
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Divider, { sx: { ml: "38px", mr: "8px", my: "5px" } }),
26730
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
26731
+ import_material18.Stack,
26732
+ {
26733
+ alignItems: "center",
26734
+ direction: "row",
26735
+ sx: { minWidth: 0, pb: "5px", pr: "8px", pt: "1px" },
26736
+ children: [
26737
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
26738
+ import_material18.Box,
26739
+ {
26740
+ sx: {
26741
+ alignItems: "center",
26742
+ display: "flex",
26743
+ flexShrink: 0,
26744
+ justifyContent: "center",
26745
+ width: "38px"
26746
+ },
26747
+ children: hasErrors && data.event.errors?.map((error) => /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(ProblemIndicator, { error }, error.span_id))
26748
+ }
26749
+ ),
26750
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
26751
+ import_material18.Typography,
26752
+ {
26753
+ "data-testid": SERVICE_NODE_OPERATION_NAME_TEST_ID,
26754
+ noWrap: true,
26755
+ sx: { flex: 1, fontSize: "0.72rem", minWidth: 0 },
26756
+ variant: "caption",
26757
+ children: data.event.operation_name
26758
+ }
26759
+ )
26760
+ ]
26761
+ }
26762
+ )
26763
+ ]
26764
+ }
26765
+ );
26750
26766
  });
26751
26767
 
26752
26768
  // src/components/trace-graph/utils.ts
@@ -26755,7 +26771,7 @@ var getLayoutedNodesAndEdges = (inputNodes, inputEdges, order2 = "oldest_first")
26755
26771
  const dagreGraph = new import_dagre.default.graphlib.Graph().setDefaultEdgeLabel(() => ({}));
26756
26772
  const direction = "LR";
26757
26773
  const nodeWidth = 200;
26758
- const nodeHeight = 70;
26774
+ const nodeHeight = 80;
26759
26775
  dagreGraph.setGraph({ rankdir: direction });
26760
26776
  const timestampMap = new Map(
26761
26777
  inputNodes.map((n2) => [n2.id, n2.data.event.start_time_unix_nano])