@localstack/appinspector-ui 1.0.88 → 1.0.90
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 +38 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +41 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10234,6 +10234,7 @@ var EVENT_DETAILS_REQUEST_ID_TEST_ID = "event-details-request-id";
|
|
|
10234
10234
|
var EVENT_DETAILS_REQUEST_PAYLOAD = "event-details-request-payload";
|
|
10235
10235
|
var EVENT_DETAILS_RESPONSE_PAYLOAD_TEST_ID = "event-details-response-payload";
|
|
10236
10236
|
var EVENT_DETAILS_EXCEPTION_PAYLOAD_TEST_ID = "event-details-exception-payload";
|
|
10237
|
+
var EVENT_DETAILS_IAM_ERRORS_SUPPRESSED_TEST_ID = "event-details-iam-errors-suppressed";
|
|
10237
10238
|
var SERVICE_NODE_TEST_ID = "service-node";
|
|
10238
10239
|
var SERVICE_NODE_SERVICE_NAME_TEST_ID = "service-node-service-name";
|
|
10239
10240
|
var SERVICE_NODE_OPERATION_NAME_TEST_ID = "service-node-operation-name";
|
|
@@ -14235,7 +14236,7 @@ import { useCallback as useCallback9, useEffect as useEffect20, useRef as useRef
|
|
|
14235
14236
|
|
|
14236
14237
|
// src/components/event-details/event-details.tsx
|
|
14237
14238
|
import { Close as Close2 } from "@mui/icons-material";
|
|
14238
|
-
import { Box as Box14, Chip as Chip3, Divider as Divider3, FormControlLabel as FormControlLabel2, IconButton as IconButton4, Stack as Stack2, Switch, Typography as Typography10, useTheme as useTheme3 } from "@mui/material";
|
|
14239
|
+
import { Alert as Alert3, Box as Box14, Chip as Chip3, Divider as Divider3, FormControlLabel as FormControlLabel2, IconButton as IconButton4, Stack as Stack2, Switch, Typography as Typography10, useTheme as useTheme3 } from "@mui/material";
|
|
14239
14240
|
|
|
14240
14241
|
// node_modules/@textea/json-viewer/dist/index.mjs
|
|
14241
14242
|
var import_copy_to_clipboard = __toESM(require_copy_to_clipboard(), 1);
|
|
@@ -26610,7 +26611,8 @@ var EventDetails = ({ onClose, selectedEvent }) => {
|
|
|
26610
26611
|
] }) }),
|
|
26611
26612
|
/* @__PURE__ */ jsx137(Divider3, {}),
|
|
26612
26613
|
/* @__PURE__ */ jsxs130(ToggleSection, { headline: "Permissions", children: [
|
|
26613
|
-
|
|
26614
|
+
selectedEvent.iam_errors_suppressed && /* @__PURE__ */ jsx137(Alert3, { "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" }),
|
|
26615
|
+
!selectedEvent.iam_errors_suppressed && !eventGroups.permissions && !eventGroups.errors && !eventGroups.warnings && /* @__PURE__ */ jsx137(Typography10, { color: "text.secondary", variant: "body2", children: "There is no permission information available." }),
|
|
26614
26616
|
eventGroups.permissions && /* @__PURE__ */ jsx137(EventDetail, { displayText: "Permissions", events: eventGroups.permissions, type: "permission" }),
|
|
26615
26617
|
eventGroups.errors && /* @__PURE__ */ jsx137(EventDetail, { displayText: "Error", events: eventGroups.errors, type: "error" }),
|
|
26616
26618
|
eventGroups.warnings && /* @__PURE__ */ jsx137(EventDetail, { displayText: "Warning", events: eventGroups.warnings, type: "warning" })
|
|
@@ -26697,7 +26699,7 @@ var PayloadViewer = memo10(({ testId, value }) => {
|
|
|
26697
26699
|
|
|
26698
26700
|
// src/components/trace-graph/trace-graph.tsx
|
|
26699
26701
|
import "@xyflow/react/dist/base.css";
|
|
26700
|
-
import { Alert as
|
|
26702
|
+
import { Alert as Alert4, Button as Button5, useTheme as useTheme4 } from "@mui/material";
|
|
26701
26703
|
import { Background, MarkerType, Position as Position2, ReactFlow, useEdgesState, useNodesState } from "@xyflow/react";
|
|
26702
26704
|
import { useEffect as useEffect19 } from "react";
|
|
26703
26705
|
|
|
@@ -26851,19 +26853,44 @@ var ServiceNode = memo11(({ data, selected }) => {
|
|
|
26851
26853
|
|
|
26852
26854
|
// src/components/trace-graph/utils.ts
|
|
26853
26855
|
import dagre from "@dagrejs/dagre";
|
|
26854
|
-
var getLayoutedNodesAndEdges = (inputNodes, inputEdges) => {
|
|
26856
|
+
var getLayoutedNodesAndEdges = (inputNodes, inputEdges, order2 = "oldest_first") => {
|
|
26855
26857
|
const dagreGraph = new dagre.graphlib.Graph().setDefaultEdgeLabel(() => ({}));
|
|
26856
26858
|
const direction = "LR";
|
|
26857
26859
|
const nodeWidth = 200;
|
|
26858
26860
|
const nodeHeight = 70;
|
|
26859
26861
|
dagreGraph.setGraph({ rankdir: direction });
|
|
26862
|
+
const timestampMap = new Map(
|
|
26863
|
+
inputNodes.map((n2) => [n2.id, n2.data.event.start_time_unix_nano])
|
|
26864
|
+
);
|
|
26860
26865
|
for (const node of inputNodes) {
|
|
26861
26866
|
dagreGraph.setNode(node.id, { height: nodeHeight, width: nodeWidth });
|
|
26862
26867
|
}
|
|
26863
26868
|
for (const edge of inputEdges) {
|
|
26864
26869
|
dagreGraph.setEdge(edge.source, edge.target);
|
|
26865
26870
|
}
|
|
26866
|
-
dagre.layout(dagreGraph
|
|
26871
|
+
dagre.layout(dagreGraph, {
|
|
26872
|
+
customOrder: (g2) => {
|
|
26873
|
+
const rankMap = /* @__PURE__ */ new Map();
|
|
26874
|
+
for (const nodeId of g2.nodes()) {
|
|
26875
|
+
const rank = g2.node(nodeId).rank;
|
|
26876
|
+
if (rank === void 0) continue;
|
|
26877
|
+
const group4 = rankMap.get(rank) ?? [];
|
|
26878
|
+
group4.push(nodeId);
|
|
26879
|
+
rankMap.set(rank, group4);
|
|
26880
|
+
}
|
|
26881
|
+
for (const nodeIds of rankMap.values()) {
|
|
26882
|
+
nodeIds.sort((a3, b3) => {
|
|
26883
|
+
const tsA = timestampMap.get(a3) ?? "";
|
|
26884
|
+
const tsB = timestampMap.get(b3) ?? "";
|
|
26885
|
+
return order2 === "newest_first" ? tsB.localeCompare(tsA) : tsA.localeCompare(tsB);
|
|
26886
|
+
});
|
|
26887
|
+
for (const [index, nodeId] of nodeIds.entries()) {
|
|
26888
|
+
;
|
|
26889
|
+
g2.node(nodeId).order = index;
|
|
26890
|
+
}
|
|
26891
|
+
}
|
|
26892
|
+
}
|
|
26893
|
+
});
|
|
26867
26894
|
const layoutedNodes = inputNodes.map((node) => {
|
|
26868
26895
|
const nodeWithPosition = dagreGraph.node(node.id);
|
|
26869
26896
|
return {
|
|
@@ -26959,6 +26986,7 @@ var TraceGraph = ({
|
|
|
26959
26986
|
initialFocusEventId,
|
|
26960
26987
|
onEventSelect,
|
|
26961
26988
|
onRefresh,
|
|
26989
|
+
order: order2 = "oldest_first",
|
|
26962
26990
|
spans
|
|
26963
26991
|
}) => {
|
|
26964
26992
|
const [nodes, setNodes, onNodesChange] = useNodesState([]);
|
|
@@ -27004,7 +27032,7 @@ var TraceGraph = ({
|
|
|
27004
27032
|
});
|
|
27005
27033
|
}
|
|
27006
27034
|
}
|
|
27007
|
-
const { edges: layoutedEdges, nodes: layoutedNodes } = getLayoutedNodesAndEdges(allNodes, allEdges);
|
|
27035
|
+
const { edges: layoutedEdges, nodes: layoutedNodes } = getLayoutedNodesAndEdges(allNodes, allEdges, order2);
|
|
27008
27036
|
for (const node of layoutedNodes) {
|
|
27009
27037
|
if (node.id === initialFocusEventId) {
|
|
27010
27038
|
node.selected = true;
|
|
@@ -27012,11 +27040,11 @@ var TraceGraph = ({
|
|
|
27012
27040
|
}
|
|
27013
27041
|
setNodes(layoutedNodes);
|
|
27014
27042
|
setEdges(layoutedEdges);
|
|
27015
|
-
}, [spans.data, initialFocusEventId, setNodes, setEdges]);
|
|
27043
|
+
}, [spans.data, initialFocusEventId, order2, setNodes, setEdges]);
|
|
27016
27044
|
const theme = useTheme4();
|
|
27017
27045
|
return /* @__PURE__ */ jsxs133(Fragment9, { children: [
|
|
27018
27046
|
spans.error && /* @__PURE__ */ jsxs133(
|
|
27019
|
-
|
|
27047
|
+
Alert4,
|
|
27020
27048
|
{
|
|
27021
27049
|
action: /* @__PURE__ */ jsx141(Button5, { onClick: () => {
|
|
27022
27050
|
onRefresh();
|
|
@@ -27103,6 +27131,7 @@ var TraceGraphView = ({
|
|
|
27103
27131
|
loading,
|
|
27104
27132
|
navigateToSpansList,
|
|
27105
27133
|
open,
|
|
27134
|
+
order: order2,
|
|
27106
27135
|
selectedEvent,
|
|
27107
27136
|
spanId,
|
|
27108
27137
|
spans,
|
|
@@ -27164,6 +27193,7 @@ var TraceGraphView = ({
|
|
|
27164
27193
|
onRefresh: () => {
|
|
27165
27194
|
fetchSpans();
|
|
27166
27195
|
},
|
|
27196
|
+
order: order2,
|
|
27167
27197
|
spans: {
|
|
27168
27198
|
data: spans,
|
|
27169
27199
|
error: fetchError,
|
|
@@ -27215,7 +27245,7 @@ async function fetchConnectedTraces(api, traceIds, allSpans = /* @__PURE__ */ ne
|
|
|
27215
27245
|
}
|
|
27216
27246
|
return [...allSpans.values()];
|
|
27217
27247
|
}
|
|
27218
|
-
var TraceGraphPage = ({ onClose, spanId, traceId }) => {
|
|
27248
|
+
var TraceGraphPage = ({ onClose, order: order2 = "oldest_first", spanId, traceId }) => {
|
|
27219
27249
|
const api = useAppInspectorApi();
|
|
27220
27250
|
const [spans, setSpans] = useState17();
|
|
27221
27251
|
const [loading, setLoading] = useState17(false);
|
|
@@ -27275,6 +27305,7 @@ var TraceGraphPage = ({ onClose, spanId, traceId }) => {
|
|
|
27275
27305
|
loading,
|
|
27276
27306
|
navigateToSpansList,
|
|
27277
27307
|
open,
|
|
27308
|
+
order: order2,
|
|
27278
27309
|
selectedEvent,
|
|
27279
27310
|
spanId: spanId ?? void 0,
|
|
27280
27311
|
spans,
|
|
@@ -27378,7 +27409,7 @@ var SpansListPage = () => {
|
|
|
27378
27409
|
),
|
|
27379
27410
|
selectedTraceId !== void 0 && /* @__PURE__ */ jsx143(TraceGraphPage, { onClose: () => {
|
|
27380
27411
|
setSelectedTraceId(void 0);
|
|
27381
|
-
}, spanId: selectedSpanId, traceId: selectedTraceId })
|
|
27412
|
+
}, order: order2, spanId: selectedSpanId, traceId: selectedTraceId })
|
|
27382
27413
|
] });
|
|
27383
27414
|
};
|
|
27384
27415
|
|