@localstack/appinspector-ui 1.0.109 → 1.0.111
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 +13 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -18384,7 +18384,11 @@ var useSpans = () => {
|
|
|
18384
18384
|
}
|
|
18385
18385
|
}
|
|
18386
18386
|
});
|
|
18387
|
+
const clearFetchError = (0, import_react52.useCallback)(() => {
|
|
18388
|
+
setFetchError(void 0);
|
|
18389
|
+
}, []);
|
|
18387
18390
|
return {
|
|
18391
|
+
clearFetchError,
|
|
18388
18392
|
clearingSpans,
|
|
18389
18393
|
clearSpans,
|
|
18390
18394
|
errorCount,
|
|
@@ -30939,7 +30943,7 @@ var ServiceNode = (0, import_react62.memo)(({ data, selected }) => {
|
|
|
30939
30943
|
|
|
30940
30944
|
// src/components/trace-graph/utils.ts
|
|
30941
30945
|
var import_dagre = __toESM(require("@dagrejs/dagre"), 1);
|
|
30942
|
-
var getLayoutedNodesAndEdges = (inputNodes, inputEdges
|
|
30946
|
+
var getLayoutedNodesAndEdges = (inputNodes, inputEdges) => {
|
|
30943
30947
|
const dagreGraph = new import_dagre.default.graphlib.Graph().setDefaultEdgeLabel(() => ({}));
|
|
30944
30948
|
const direction = "LR";
|
|
30945
30949
|
const nodeWidth = 200;
|
|
@@ -30968,7 +30972,7 @@ var getLayoutedNodesAndEdges = (inputNodes, inputEdges, order2 = "oldest_first")
|
|
|
30968
30972
|
nodeIds.sort((a3, b3) => {
|
|
30969
30973
|
const tsA = timestampMap.get(a3) ?? "";
|
|
30970
30974
|
const tsB = timestampMap.get(b3) ?? "";
|
|
30971
|
-
return
|
|
30975
|
+
return tsA.localeCompare(tsB);
|
|
30972
30976
|
});
|
|
30973
30977
|
for (const [index, nodeId] of nodeIds.entries()) {
|
|
30974
30978
|
;
|
|
@@ -31072,7 +31076,6 @@ var TraceGraph = ({
|
|
|
31072
31076
|
initialFocusEventId,
|
|
31073
31077
|
onEventSelect,
|
|
31074
31078
|
onRefresh,
|
|
31075
|
-
order: order2 = "oldest_first",
|
|
31076
31079
|
spans
|
|
31077
31080
|
}) => {
|
|
31078
31081
|
const [nodes, setNodes, onNodesChange] = (0, import_react65.useNodesState)([]);
|
|
@@ -31118,7 +31121,7 @@ var TraceGraph = ({
|
|
|
31118
31121
|
});
|
|
31119
31122
|
}
|
|
31120
31123
|
}
|
|
31121
|
-
const { edges: layoutedEdges, nodes: layoutedNodes } = getLayoutedNodesAndEdges(allNodes, allEdges
|
|
31124
|
+
const { edges: layoutedEdges, nodes: layoutedNodes } = getLayoutedNodesAndEdges(allNodes, allEdges);
|
|
31122
31125
|
for (const node of layoutedNodes) {
|
|
31123
31126
|
if (node.id === initialFocusEventId) {
|
|
31124
31127
|
node.selected = true;
|
|
@@ -31126,7 +31129,7 @@ var TraceGraph = ({
|
|
|
31126
31129
|
}
|
|
31127
31130
|
setNodes(layoutedNodes);
|
|
31128
31131
|
setEdges(layoutedEdges);
|
|
31129
|
-
}, [spans.data, initialFocusEventId,
|
|
31132
|
+
}, [spans.data, initialFocusEventId, setNodes, setEdges]);
|
|
31130
31133
|
const theme = (0, import_material21.useTheme)();
|
|
31131
31134
|
return /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(import_jsx_runtime144.Fragment, { children: [
|
|
31132
31135
|
spans.error && /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
|
|
@@ -31217,7 +31220,6 @@ var TraceGraphView = ({
|
|
|
31217
31220
|
loading,
|
|
31218
31221
|
navigateToSpansList,
|
|
31219
31222
|
open,
|
|
31220
|
-
order: order2,
|
|
31221
31223
|
selectedEvent,
|
|
31222
31224
|
spanId,
|
|
31223
31225
|
spans,
|
|
@@ -31279,7 +31281,6 @@ var TraceGraphView = ({
|
|
|
31279
31281
|
onRefresh: () => {
|
|
31280
31282
|
fetchSpans();
|
|
31281
31283
|
},
|
|
31282
|
-
order: order2,
|
|
31283
31284
|
spans: {
|
|
31284
31285
|
data: spans,
|
|
31285
31286
|
error: fetchError,
|
|
@@ -31331,7 +31332,7 @@ async function fetchConnectedTraces(api, traceIds, allSpans = /* @__PURE__ */ ne
|
|
|
31331
31332
|
}
|
|
31332
31333
|
return [...allSpans.values()];
|
|
31333
31334
|
}
|
|
31334
|
-
var TraceGraphPage = ({ onClose,
|
|
31335
|
+
var TraceGraphPage = ({ onClose, spanId, traceId }) => {
|
|
31335
31336
|
const api = useAppInspectorApi();
|
|
31336
31337
|
const [spans, setSpans] = (0, import_react68.useState)();
|
|
31337
31338
|
const [loading, setLoading] = (0, import_react68.useState)(false);
|
|
@@ -31391,7 +31392,6 @@ var TraceGraphPage = ({ onClose, order: order2 = "oldest_first", spanId, traceId
|
|
|
31391
31392
|
loading,
|
|
31392
31393
|
navigateToSpansList,
|
|
31393
31394
|
open,
|
|
31394
|
-
order: order2,
|
|
31395
31395
|
selectedEvent,
|
|
31396
31396
|
spanId: spanId ?? void 0,
|
|
31397
31397
|
spans,
|
|
@@ -31407,6 +31407,7 @@ var import_jsx_runtime146 = require("react/jsx-runtime");
|
|
|
31407
31407
|
var SpansListPage = () => {
|
|
31408
31408
|
const api = useAppInspectorApi();
|
|
31409
31409
|
const {
|
|
31410
|
+
clearFetchError,
|
|
31410
31411
|
clearingSpans,
|
|
31411
31412
|
clearSpans,
|
|
31412
31413
|
errorCount,
|
|
@@ -31445,8 +31446,9 @@ var SpansListPage = () => {
|
|
|
31445
31446
|
}, [checkStatus, fetchForward]);
|
|
31446
31447
|
const handleEnable = (0, import_react69.useCallback)(async () => {
|
|
31447
31448
|
await api.setStatus({ status: "ENABLED" });
|
|
31449
|
+
clearFetchError();
|
|
31448
31450
|
void checkStatus();
|
|
31449
|
-
}, [api, checkStatus]);
|
|
31451
|
+
}, [api, checkStatus, clearFetchError]);
|
|
31450
31452
|
const shouldShowStatusMessage = Boolean(statusError) || status?.status === "DISABLED";
|
|
31451
31453
|
return /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(import_jsx_runtime146.Fragment, { children: [
|
|
31452
31454
|
/* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(
|
|
@@ -31514,7 +31516,7 @@ var SpansListPage = () => {
|
|
|
31514
31516
|
),
|
|
31515
31517
|
selectedTraceId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(TraceGraphPage, { onClose: () => {
|
|
31516
31518
|
setSelectedTraceId(void 0);
|
|
31517
|
-
},
|
|
31519
|
+
}, spanId: selectedSpanId, traceId: selectedTraceId })
|
|
31518
31520
|
] });
|
|
31519
31521
|
};
|
|
31520
31522
|
|