@localstack/appinspector-ui 1.0.93 → 1.0.95
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 +98 -82
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +101 -85
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12695,12 +12695,13 @@ var ServiceCell = memo7(({
|
|
|
12695
12695
|
sx: {
|
|
12696
12696
|
borderBottomRightRadius: "15px",
|
|
12697
12697
|
borderTopRightRadius: "15px",
|
|
12698
|
+
color: "text.secondary",
|
|
12698
12699
|
overflow: "hidden",
|
|
12699
12700
|
padding: "1px 8px",
|
|
12700
12701
|
textOverflow: "ellipsis",
|
|
12701
12702
|
whiteSpace: "nowrap"
|
|
12702
12703
|
},
|
|
12703
|
-
variant: "
|
|
12704
|
+
variant: "caption",
|
|
12704
12705
|
children: resource
|
|
12705
12706
|
}
|
|
12706
12707
|
)
|
|
@@ -26610,12 +26611,12 @@ var EventDetails = ({ onClose, selectedEvent }) => {
|
|
|
26610
26611
|
|
|
26611
26612
|
// src/components/trace-graph/trace-graph.tsx
|
|
26612
26613
|
import "@xyflow/react/dist/base.css";
|
|
26613
|
-
import { Alert as Alert4, Button as Button5, useTheme as
|
|
26614
|
+
import { Alert as Alert4, Button as Button5, useTheme as useTheme5 } from "@mui/material";
|
|
26614
26615
|
import { Background, MarkerType, Position as Position2, ReactFlow, useEdgesState, useNodesState } from "@xyflow/react";
|
|
26615
26616
|
import { useEffect as useEffect19 } from "react";
|
|
26616
26617
|
|
|
26617
26618
|
// src/components/trace-graph/service-node.tsx
|
|
26618
|
-
import { Box as Box17, Stack as Stack3, Typography as Typography11 } from "@mui/material";
|
|
26619
|
+
import { Box as Box17, Divider as Divider4, Stack as Stack3, Typography as Typography11, useTheme as useTheme4 } from "@mui/material";
|
|
26619
26620
|
import "@xyflow/react/dist/style.css";
|
|
26620
26621
|
import { Handle, Position } from "@xyflow/react";
|
|
26621
26622
|
import { memo as memo11 } from "react";
|
|
@@ -26679,87 +26680,102 @@ var handleStyle = {
|
|
|
26679
26680
|
opacity: 0
|
|
26680
26681
|
};
|
|
26681
26682
|
var ServiceNode = memo11(({ data, selected }) => {
|
|
26683
|
+
const theme = useTheme4();
|
|
26682
26684
|
const hasErrors = (data.event.errors && data.event.errors.length > 0) ?? false;
|
|
26683
|
-
return /* @__PURE__ */ jsxs131(
|
|
26684
|
-
|
|
26685
|
-
|
|
26686
|
-
|
|
26687
|
-
|
|
26688
|
-
|
|
26689
|
-
|
|
26690
|
-
|
|
26691
|
-
},
|
|
26692
|
-
"alignItems": "flex-start",
|
|
26693
|
-
"borderRadius": 1,
|
|
26694
|
-
"cursor": "pointer",
|
|
26695
|
-
"display": "flex",
|
|
26696
|
-
"flexDirection": "column",
|
|
26697
|
-
"maxWidth": "100%",
|
|
26698
|
-
"opacity": selected ? 1 : 0.7,
|
|
26699
|
-
"position": "relative",
|
|
26700
|
-
"transition": "all 0.3s ease",
|
|
26701
|
-
"width": "min-content"
|
|
26702
|
-
},
|
|
26703
|
-
tabIndex: 0,
|
|
26704
|
-
children: [
|
|
26705
|
-
/* @__PURE__ */ jsx140(Handle, { position: Position.Left, style: handleStyle, type: "target" }),
|
|
26706
|
-
/* @__PURE__ */ jsx140(Handle, { position: Position.Right, style: handleStyle, type: "source" }),
|
|
26707
|
-
/* @__PURE__ */ jsx140(
|
|
26708
|
-
ServiceCell,
|
|
26709
|
-
{
|
|
26710
|
-
height: "32px",
|
|
26711
|
-
resource: data.event.resource_name,
|
|
26712
|
-
selected,
|
|
26713
|
-
service: data.event.service_name,
|
|
26714
|
-
width: "32px"
|
|
26715
|
-
}
|
|
26716
|
-
)
|
|
26717
|
-
]
|
|
26718
|
-
}
|
|
26719
|
-
),
|
|
26720
|
-
/* @__PURE__ */ jsxs131(
|
|
26721
|
-
Stack3,
|
|
26722
|
-
{
|
|
26723
|
-
alignItems: "center",
|
|
26724
|
-
direction: "row",
|
|
26725
|
-
spacing: 0.5,
|
|
26726
|
-
sx: {
|
|
26727
|
-
ml: 1,
|
|
26728
|
-
mt: 0.5
|
|
26685
|
+
return /* @__PURE__ */ jsxs131(
|
|
26686
|
+
Box17,
|
|
26687
|
+
{
|
|
26688
|
+
"data-testid": SERVICE_NODE_TEST_ID,
|
|
26689
|
+
role: "button",
|
|
26690
|
+
sx: {
|
|
26691
|
+
"&:hover": {
|
|
26692
|
+
boxShadow: theme.palette.mode === "dark" ? "0 4px 12px rgba(0,0,0,0.6)" : "0 4px 12px rgba(0,0,0,0.22)"
|
|
26729
26693
|
},
|
|
26730
|
-
|
|
26731
|
-
|
|
26732
|
-
|
|
26733
|
-
|
|
26734
|
-
|
|
26735
|
-
|
|
26736
|
-
|
|
26737
|
-
|
|
26738
|
-
|
|
26739
|
-
|
|
26740
|
-
|
|
26741
|
-
|
|
26742
|
-
|
|
26743
|
-
|
|
26744
|
-
|
|
26745
|
-
|
|
26746
|
-
|
|
26747
|
-
|
|
26748
|
-
|
|
26749
|
-
|
|
26750
|
-
|
|
26751
|
-
|
|
26752
|
-
|
|
26753
|
-
|
|
26754
|
-
},
|
|
26755
|
-
|
|
26756
|
-
|
|
26757
|
-
|
|
26758
|
-
|
|
26759
|
-
|
|
26760
|
-
|
|
26761
|
-
|
|
26762
|
-
|
|
26694
|
+
"backgroundColor": theme.palette.background.paper,
|
|
26695
|
+
"borderLeft": `3px solid ${hasErrors ? theme.palette.error.main : "transparent"}`,
|
|
26696
|
+
"borderRadius": 1,
|
|
26697
|
+
"boxShadow": theme.palette.mode === "dark" ? "0 1px 4px rgba(0,0,0,0.5)" : "0 1px 4px rgba(0,0,0,0.13)",
|
|
26698
|
+
"cursor": "pointer",
|
|
26699
|
+
"maxWidth": 220,
|
|
26700
|
+
"minWidth": 140,
|
|
26701
|
+
"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}`,
|
|
26702
|
+
"overflow": "hidden",
|
|
26703
|
+
"position": "relative",
|
|
26704
|
+
"transition": "all 0.3s ease"
|
|
26705
|
+
},
|
|
26706
|
+
tabIndex: 0,
|
|
26707
|
+
children: [
|
|
26708
|
+
/* @__PURE__ */ jsx140(Handle, { position: Position.Left, style: handleStyle, type: "target" }),
|
|
26709
|
+
/* @__PURE__ */ jsx140(Handle, { position: Position.Right, style: handleStyle, type: "source" }),
|
|
26710
|
+
/* @__PURE__ */ jsxs131(
|
|
26711
|
+
Stack3,
|
|
26712
|
+
{
|
|
26713
|
+
alignItems: "center",
|
|
26714
|
+
direction: "row",
|
|
26715
|
+
sx: { gap: "8px", pb: "2px", pt: "6px", px: "8px" },
|
|
26716
|
+
children: [
|
|
26717
|
+
/* @__PURE__ */ jsx140(Box17, { sx: { borderRadius: "4px", flexShrink: 0, lineHeight: 0, overflow: "hidden" }, children: /* @__PURE__ */ jsx140(AwsServiceIcon, { hideTooltip: true, service: data.event.service_name, size: "medium" }) }),
|
|
26718
|
+
/* @__PURE__ */ jsxs131(Stack3, { sx: { minWidth: 0 }, children: [
|
|
26719
|
+
/* @__PURE__ */ jsx140(
|
|
26720
|
+
Typography11,
|
|
26721
|
+
{
|
|
26722
|
+
noWrap: true,
|
|
26723
|
+
sx: { fontWeight: 700, lineHeight: 1.25 },
|
|
26724
|
+
variant: "body2",
|
|
26725
|
+
children: data.event.service_name
|
|
26726
|
+
}
|
|
26727
|
+
),
|
|
26728
|
+
data.event.resource_name != "" && /* @__PURE__ */ jsx140(
|
|
26729
|
+
Typography11,
|
|
26730
|
+
{
|
|
26731
|
+
color: "text.secondary",
|
|
26732
|
+
noWrap: true,
|
|
26733
|
+
sx: { lineHeight: 1.2 },
|
|
26734
|
+
variant: "caption",
|
|
26735
|
+
children: data.event.resource_name
|
|
26736
|
+
}
|
|
26737
|
+
)
|
|
26738
|
+
] })
|
|
26739
|
+
]
|
|
26740
|
+
}
|
|
26741
|
+
),
|
|
26742
|
+
/* @__PURE__ */ jsx140(Divider4, { sx: { ml: "38px", mr: "8px", my: "5px" } }),
|
|
26743
|
+
/* @__PURE__ */ jsxs131(
|
|
26744
|
+
Stack3,
|
|
26745
|
+
{
|
|
26746
|
+
alignItems: "center",
|
|
26747
|
+
direction: "row",
|
|
26748
|
+
sx: { minWidth: 0, pb: "5px", pr: "8px", pt: "1px" },
|
|
26749
|
+
children: [
|
|
26750
|
+
/* @__PURE__ */ jsx140(
|
|
26751
|
+
Box17,
|
|
26752
|
+
{
|
|
26753
|
+
sx: {
|
|
26754
|
+
alignItems: "center",
|
|
26755
|
+
display: "flex",
|
|
26756
|
+
flexShrink: 0,
|
|
26757
|
+
justifyContent: "center",
|
|
26758
|
+
width: "38px"
|
|
26759
|
+
},
|
|
26760
|
+
children: hasErrors && data.event.errors?.map((error) => /* @__PURE__ */ jsx140(ProblemIndicator, { error }, error.span_id))
|
|
26761
|
+
}
|
|
26762
|
+
),
|
|
26763
|
+
/* @__PURE__ */ jsx140(
|
|
26764
|
+
Typography11,
|
|
26765
|
+
{
|
|
26766
|
+
"data-testid": SERVICE_NODE_OPERATION_NAME_TEST_ID,
|
|
26767
|
+
noWrap: true,
|
|
26768
|
+
sx: { flex: 1, fontSize: "0.72rem", minWidth: 0 },
|
|
26769
|
+
variant: "caption",
|
|
26770
|
+
children: data.event.operation_name
|
|
26771
|
+
}
|
|
26772
|
+
)
|
|
26773
|
+
]
|
|
26774
|
+
}
|
|
26775
|
+
)
|
|
26776
|
+
]
|
|
26777
|
+
}
|
|
26778
|
+
);
|
|
26763
26779
|
});
|
|
26764
26780
|
|
|
26765
26781
|
// src/components/trace-graph/utils.ts
|
|
@@ -26768,7 +26784,7 @@ var getLayoutedNodesAndEdges = (inputNodes, inputEdges, order2 = "oldest_first")
|
|
|
26768
26784
|
const dagreGraph = new dagre.graphlib.Graph().setDefaultEdgeLabel(() => ({}));
|
|
26769
26785
|
const direction = "LR";
|
|
26770
26786
|
const nodeWidth = 200;
|
|
26771
|
-
const nodeHeight =
|
|
26787
|
+
const nodeHeight = 80;
|
|
26772
26788
|
dagreGraph.setGraph({ rankdir: direction });
|
|
26773
26789
|
const timestampMap = new Map(
|
|
26774
26790
|
inputNodes.map((n2) => [n2.id, n2.data.event.start_time_unix_nano])
|
|
@@ -26952,7 +26968,7 @@ var TraceGraph = ({
|
|
|
26952
26968
|
setNodes(layoutedNodes);
|
|
26953
26969
|
setEdges(layoutedEdges);
|
|
26954
26970
|
}, [spans.data, initialFocusEventId, order2, setNodes, setEdges]);
|
|
26955
|
-
const theme =
|
|
26971
|
+
const theme = useTheme5();
|
|
26956
26972
|
return /* @__PURE__ */ jsxs133(Fragment9, { children: [
|
|
26957
26973
|
spans.error && /* @__PURE__ */ jsxs133(
|
|
26958
26974
|
Alert4,
|
|
@@ -26990,7 +27006,7 @@ var TraceGraph = ({
|
|
|
26990
27006
|
/* @__PURE__ */ jsx142(
|
|
26991
27007
|
Background,
|
|
26992
27008
|
{
|
|
26993
|
-
bgColor: theme.palette.background.
|
|
27009
|
+
bgColor: theme.palette.background.default,
|
|
26994
27010
|
color: theme.palette.text.disabled
|
|
26995
27011
|
}
|
|
26996
27012
|
)
|