@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.cjs
CHANGED
|
@@ -10222,6 +10222,7 @@ var EVENT_DETAILS_REQUEST_ID_TEST_ID = "event-details-request-id";
|
|
|
10222
10222
|
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
|
+
var EVENT_DETAILS_IAM_ERRORS_SUPPRESSED_TEST_ID = "event-details-iam-errors-suppressed";
|
|
10225
10226
|
var SERVICE_NODE_TEST_ID = "service-node";
|
|
10226
10227
|
var SERVICE_NODE_SERVICE_NAME_TEST_ID = "service-node-service-name";
|
|
10227
10228
|
var SERVICE_NODE_OPERATION_NAME_TEST_ID = "service-node-operation-name";
|
|
@@ -26598,7 +26599,8 @@ var EventDetails = ({ onClose, selectedEvent }) => {
|
|
|
26598
26599
|
] }) }),
|
|
26599
26600
|
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material15.Divider, {}),
|
|
26600
26601
|
/* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(ToggleSection, { headline: "Permissions", children: [
|
|
26601
|
-
|
|
26602
|
+
selectedEvent.iam_errors_suppressed && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material15.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" }),
|
|
26603
|
+
!selectedEvent.iam_errors_suppressed && !eventGroups.permissions && !eventGroups.errors && !eventGroups.warnings && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material15.Typography, { color: "text.secondary", variant: "body2", children: "There is no permission information available." }),
|
|
26602
26604
|
eventGroups.permissions && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(EventDetail, { displayText: "Permissions", events: eventGroups.permissions, type: "permission" }),
|
|
26603
26605
|
eventGroups.errors && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(EventDetail, { displayText: "Error", events: eventGroups.errors, type: "error" }),
|
|
26604
26606
|
eventGroups.warnings && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(EventDetail, { displayText: "Warning", events: eventGroups.warnings, type: "warning" })
|
|
@@ -26839,19 +26841,44 @@ var ServiceNode = (0, import_react59.memo)(({ data, selected }) => {
|
|
|
26839
26841
|
|
|
26840
26842
|
// src/components/trace-graph/utils.ts
|
|
26841
26843
|
var import_dagre = __toESM(require("@dagrejs/dagre"), 1);
|
|
26842
|
-
var getLayoutedNodesAndEdges = (inputNodes, inputEdges) => {
|
|
26844
|
+
var getLayoutedNodesAndEdges = (inputNodes, inputEdges, order2 = "oldest_first") => {
|
|
26843
26845
|
const dagreGraph = new import_dagre.default.graphlib.Graph().setDefaultEdgeLabel(() => ({}));
|
|
26844
26846
|
const direction = "LR";
|
|
26845
26847
|
const nodeWidth = 200;
|
|
26846
26848
|
const nodeHeight = 70;
|
|
26847
26849
|
dagreGraph.setGraph({ rankdir: direction });
|
|
26850
|
+
const timestampMap = new Map(
|
|
26851
|
+
inputNodes.map((n2) => [n2.id, n2.data.event.start_time_unix_nano])
|
|
26852
|
+
);
|
|
26848
26853
|
for (const node of inputNodes) {
|
|
26849
26854
|
dagreGraph.setNode(node.id, { height: nodeHeight, width: nodeWidth });
|
|
26850
26855
|
}
|
|
26851
26856
|
for (const edge of inputEdges) {
|
|
26852
26857
|
dagreGraph.setEdge(edge.source, edge.target);
|
|
26853
26858
|
}
|
|
26854
|
-
import_dagre.default.layout(dagreGraph
|
|
26859
|
+
import_dagre.default.layout(dagreGraph, {
|
|
26860
|
+
customOrder: (g2) => {
|
|
26861
|
+
const rankMap = /* @__PURE__ */ new Map();
|
|
26862
|
+
for (const nodeId of g2.nodes()) {
|
|
26863
|
+
const rank = g2.node(nodeId).rank;
|
|
26864
|
+
if (rank === void 0) continue;
|
|
26865
|
+
const group4 = rankMap.get(rank) ?? [];
|
|
26866
|
+
group4.push(nodeId);
|
|
26867
|
+
rankMap.set(rank, group4);
|
|
26868
|
+
}
|
|
26869
|
+
for (const nodeIds of rankMap.values()) {
|
|
26870
|
+
nodeIds.sort((a3, b3) => {
|
|
26871
|
+
const tsA = timestampMap.get(a3) ?? "";
|
|
26872
|
+
const tsB = timestampMap.get(b3) ?? "";
|
|
26873
|
+
return order2 === "newest_first" ? tsB.localeCompare(tsA) : tsA.localeCompare(tsB);
|
|
26874
|
+
});
|
|
26875
|
+
for (const [index, nodeId] of nodeIds.entries()) {
|
|
26876
|
+
;
|
|
26877
|
+
g2.node(nodeId).order = index;
|
|
26878
|
+
}
|
|
26879
|
+
}
|
|
26880
|
+
}
|
|
26881
|
+
});
|
|
26855
26882
|
const layoutedNodes = inputNodes.map((node) => {
|
|
26856
26883
|
const nodeWithPosition = dagreGraph.node(node.id);
|
|
26857
26884
|
return {
|
|
@@ -26947,6 +26974,7 @@ var TraceGraph = ({
|
|
|
26947
26974
|
initialFocusEventId,
|
|
26948
26975
|
onEventSelect,
|
|
26949
26976
|
onRefresh,
|
|
26977
|
+
order: order2 = "oldest_first",
|
|
26950
26978
|
spans
|
|
26951
26979
|
}) => {
|
|
26952
26980
|
const [nodes, setNodes, onNodesChange] = (0, import_react62.useNodesState)([]);
|
|
@@ -26992,7 +27020,7 @@ var TraceGraph = ({
|
|
|
26992
27020
|
});
|
|
26993
27021
|
}
|
|
26994
27022
|
}
|
|
26995
|
-
const { edges: layoutedEdges, nodes: layoutedNodes } = getLayoutedNodesAndEdges(allNodes, allEdges);
|
|
27023
|
+
const { edges: layoutedEdges, nodes: layoutedNodes } = getLayoutedNodesAndEdges(allNodes, allEdges, order2);
|
|
26996
27024
|
for (const node of layoutedNodes) {
|
|
26997
27025
|
if (node.id === initialFocusEventId) {
|
|
26998
27026
|
node.selected = true;
|
|
@@ -27000,7 +27028,7 @@ var TraceGraph = ({
|
|
|
27000
27028
|
}
|
|
27001
27029
|
setNodes(layoutedNodes);
|
|
27002
27030
|
setEdges(layoutedEdges);
|
|
27003
|
-
}, [spans.data, initialFocusEventId, setNodes, setEdges]);
|
|
27031
|
+
}, [spans.data, initialFocusEventId, order2, setNodes, setEdges]);
|
|
27004
27032
|
const theme = (0, import_material19.useTheme)();
|
|
27005
27033
|
return /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_jsx_runtime141.Fragment, { children: [
|
|
27006
27034
|
spans.error && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
|
|
@@ -27091,6 +27119,7 @@ var TraceGraphView = ({
|
|
|
27091
27119
|
loading,
|
|
27092
27120
|
navigateToSpansList,
|
|
27093
27121
|
open,
|
|
27122
|
+
order: order2,
|
|
27094
27123
|
selectedEvent,
|
|
27095
27124
|
spanId,
|
|
27096
27125
|
spans,
|
|
@@ -27152,6 +27181,7 @@ var TraceGraphView = ({
|
|
|
27152
27181
|
onRefresh: () => {
|
|
27153
27182
|
fetchSpans();
|
|
27154
27183
|
},
|
|
27184
|
+
order: order2,
|
|
27155
27185
|
spans: {
|
|
27156
27186
|
data: spans,
|
|
27157
27187
|
error: fetchError,
|
|
@@ -27203,7 +27233,7 @@ async function fetchConnectedTraces(api, traceIds, allSpans = /* @__PURE__ */ ne
|
|
|
27203
27233
|
}
|
|
27204
27234
|
return [...allSpans.values()];
|
|
27205
27235
|
}
|
|
27206
|
-
var TraceGraphPage = ({ onClose, spanId, traceId }) => {
|
|
27236
|
+
var TraceGraphPage = ({ onClose, order: order2 = "oldest_first", spanId, traceId }) => {
|
|
27207
27237
|
const api = useAppInspectorApi();
|
|
27208
27238
|
const [spans, setSpans] = (0, import_react65.useState)();
|
|
27209
27239
|
const [loading, setLoading] = (0, import_react65.useState)(false);
|
|
@@ -27263,6 +27293,7 @@ var TraceGraphPage = ({ onClose, spanId, traceId }) => {
|
|
|
27263
27293
|
loading,
|
|
27264
27294
|
navigateToSpansList,
|
|
27265
27295
|
open,
|
|
27296
|
+
order: order2,
|
|
27266
27297
|
selectedEvent,
|
|
27267
27298
|
spanId: spanId ?? void 0,
|
|
27268
27299
|
spans,
|
|
@@ -27366,7 +27397,7 @@ var SpansListPage = () => {
|
|
|
27366
27397
|
),
|
|
27367
27398
|
selectedTraceId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(TraceGraphPage, { onClose: () => {
|
|
27368
27399
|
setSelectedTraceId(void 0);
|
|
27369
|
-
}, spanId: selectedSpanId, traceId: selectedTraceId })
|
|
27400
|
+
}, order: order2, spanId: selectedSpanId, traceId: selectedTraceId })
|
|
27370
27401
|
] });
|
|
27371
27402
|
};
|
|
27372
27403
|
|