@localstack/appinspector-ui 1.0.105 → 1.0.107
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 +26 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +86 -61
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2414,7 +2414,7 @@ var init_event_streams = __esm({
|
|
|
2414
2414
|
|
|
2415
2415
|
// src/pages/spans-list-page.tsx
|
|
2416
2416
|
import { Box as Box20 } from "@mui/material";
|
|
2417
|
-
import { useCallback as
|
|
2417
|
+
import { useCallback as useCallback11, useState as useState18 } from "react";
|
|
2418
2418
|
|
|
2419
2419
|
// src/api/errors.ts
|
|
2420
2420
|
var AppInspectorNotFoundError = class extends Error {
|
|
@@ -2488,7 +2488,7 @@ var EMULATOR_VERSION_BANNER_TEST_ID = "emulator-version-banner";
|
|
|
2488
2488
|
|
|
2489
2489
|
// src/utils/emulator-version.ts
|
|
2490
2490
|
var import_semver = __toESM(require_semver2(), 1);
|
|
2491
|
-
var MINIMUM_EMULATOR_VERSION = "2026.
|
|
2491
|
+
var MINIMUM_EMULATOR_VERSION = "2026.4.0";
|
|
2492
2492
|
function checkEmulatorVersion(version, now = /* @__PURE__ */ new Date()) {
|
|
2493
2493
|
if (!version) return "error";
|
|
2494
2494
|
const coerced = import_semver.default.coerce(version);
|
|
@@ -12251,7 +12251,7 @@ var AnimatePresence = function(_a2) {
|
|
|
12251
12251
|
};
|
|
12252
12252
|
|
|
12253
12253
|
// src/components/spans-list/spans-data-grid.tsx
|
|
12254
|
-
import { memo as memo8, useMemo as useMemo5 } from "react";
|
|
12254
|
+
import { memo as memo8, useCallback as useCallback3, useLayoutEffect as useLayoutEffect2, useMemo as useMemo5, useRef as useRef8 } from "react";
|
|
12255
12255
|
|
|
12256
12256
|
// src/components/cells/responsive-timestamp-cell.tsx
|
|
12257
12257
|
import { memo as memo2 } from "react";
|
|
@@ -14884,6 +14884,7 @@ var LABEL_END_OF_STREAM = "This is the end of the stream";
|
|
|
14884
14884
|
var LABEL_NO_SPANS = "There are no operations";
|
|
14885
14885
|
var LABEL_LOAD_OLDER = "Load older operations";
|
|
14886
14886
|
var LABEL_LOAD_NEWER = "Load newer operations";
|
|
14887
|
+
var STICK_TO_EDGE_THRESHOLD_PX = 4;
|
|
14887
14888
|
var StreamBoundaryRow = ({ colSpan, label }) => /* @__PURE__ */ jsx127(TableRow, { children: /* @__PURE__ */ jsx127(TableCell, { colSpan, sx: { fontStyle: "italic", textAlign: "center" }, children: /* @__PURE__ */ jsx127("span", { children: label }) }) });
|
|
14888
14889
|
var LoadSpansRow = ({ colSpan, fetching, label, onFetch }) => /* @__PURE__ */ jsx127(TableRow, { children: /* @__PURE__ */ jsxs121(TableCell, { colSpan, sx: { textAlign: "center" }, children: [
|
|
14889
14890
|
!fetching && /* @__PURE__ */ jsx127(Button2, { onClick: onFetch, sx: { my: 1 }, children: label }),
|
|
@@ -15042,6 +15043,28 @@ var SpansDataGrid = ({
|
|
|
15042
15043
|
const columnCount = table.getAllColumns().length;
|
|
15043
15044
|
const rows = table.getRowModel().rows;
|
|
15044
15045
|
const hasRows = rows.length > 0;
|
|
15046
|
+
const containerRef = useRef8(null);
|
|
15047
|
+
const isAtLiveEdgeRef = useRef8(true);
|
|
15048
|
+
const handleScroll = useCallback3(() => {
|
|
15049
|
+
const element = containerRef.current;
|
|
15050
|
+
if (!element) return;
|
|
15051
|
+
if (order2 === "oldest_first") {
|
|
15052
|
+
const distanceFromBottom = element.scrollHeight - element.scrollTop - element.clientHeight;
|
|
15053
|
+
isAtLiveEdgeRef.current = distanceFromBottom <= STICK_TO_EDGE_THRESHOLD_PX;
|
|
15054
|
+
return;
|
|
15055
|
+
}
|
|
15056
|
+
isAtLiveEdgeRef.current = element.scrollTop <= STICK_TO_EDGE_THRESHOLD_PX;
|
|
15057
|
+
}, [order2]);
|
|
15058
|
+
const lastSpanId = spans?.at(-1)?.span_id;
|
|
15059
|
+
useLayoutEffect2(() => {
|
|
15060
|
+
handleScroll();
|
|
15061
|
+
}, [handleScroll]);
|
|
15062
|
+
useLayoutEffect2(() => {
|
|
15063
|
+
if (order2 !== "oldest_first") return;
|
|
15064
|
+
const element = containerRef.current;
|
|
15065
|
+
if (!element || !isAtLiveEdgeRef.current) return;
|
|
15066
|
+
element.scrollTop = element.scrollHeight;
|
|
15067
|
+
}, [order2, spans?.length, lastSpanId]);
|
|
15045
15068
|
return /* @__PURE__ */ jsxs121(Fragment5, { children: [
|
|
15046
15069
|
/* @__PURE__ */ jsx127(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsxs121(Box4, { sx: { alignItems: "center", display: "flex", gap: "0.5rem" }, children: [
|
|
15047
15070
|
/* @__PURE__ */ jsx127(SpanCountBadge, { licenseLimit, systemLimit, totalCount, visibleCount: spans?.length }),
|
|
@@ -15099,6 +15122,8 @@ var SpansDataGrid = ({
|
|
|
15099
15122
|
/* @__PURE__ */ jsx127(Paper, { sx: { flexGrow: 1, overflow: "hidden", position: "relative", width: "100%" }, children: /* @__PURE__ */ jsx127(
|
|
15100
15123
|
TableContainer,
|
|
15101
15124
|
{
|
|
15125
|
+
onScroll: handleScroll,
|
|
15126
|
+
ref: containerRef,
|
|
15102
15127
|
sx: {
|
|
15103
15128
|
bottom: 0,
|
|
15104
15129
|
flexGrow: 1,
|
|
@@ -15462,15 +15487,15 @@ var StatusMessage = ({
|
|
|
15462
15487
|
import { createContext as createContext8, useContext as useContext15, useMemo as useMemo6 } from "react";
|
|
15463
15488
|
|
|
15464
15489
|
// src/hooks/use-status.tsx
|
|
15465
|
-
import { useCallback as
|
|
15490
|
+
import { useCallback as useCallback4, useEffect as useEffect11, useRef as useRef9, useState as useState6 } from "react";
|
|
15466
15491
|
var useStatus = () => {
|
|
15467
15492
|
const api = useAppInspectorApi();
|
|
15468
15493
|
const [checking, setChecking] = useState6(true);
|
|
15469
15494
|
const [status, setStatus] = useState6();
|
|
15470
15495
|
const [error, setError] = useState6();
|
|
15471
|
-
const hasFetchedReference =
|
|
15472
|
-
const abortControllerReference =
|
|
15473
|
-
const checkStatus =
|
|
15496
|
+
const hasFetchedReference = useRef9(false);
|
|
15497
|
+
const abortControllerReference = useRef9(null);
|
|
15498
|
+
const checkStatus = useCallback4(async () => {
|
|
15474
15499
|
if (abortControllerReference.current !== null) {
|
|
15475
15500
|
abortControllerReference.current.abort();
|
|
15476
15501
|
}
|
|
@@ -15523,7 +15548,7 @@ var useAppInspectorStatus = () => {
|
|
|
15523
15548
|
};
|
|
15524
15549
|
|
|
15525
15550
|
// src/hooks/use-local-storage.tsx
|
|
15526
|
-
import { useCallback as
|
|
15551
|
+
import { useCallback as useCallback5, useEffect as useEffect12, useState as useState7 } from "react";
|
|
15527
15552
|
function useLocalStorage(key, initialValue) {
|
|
15528
15553
|
const [storedValue, setStoredValue] = useState7(() => {
|
|
15529
15554
|
try {
|
|
@@ -15534,7 +15559,7 @@ function useLocalStorage(key, initialValue) {
|
|
|
15534
15559
|
return initialValue;
|
|
15535
15560
|
}
|
|
15536
15561
|
});
|
|
15537
|
-
const setValue =
|
|
15562
|
+
const setValue = useCallback5((value) => {
|
|
15538
15563
|
try {
|
|
15539
15564
|
setStoredValue((previousState) => {
|
|
15540
15565
|
const next = typeof value === "function" ? value(previousState) : value;
|
|
@@ -15568,7 +15593,7 @@ function useLocalStorage(key, initialValue) {
|
|
|
15568
15593
|
}
|
|
15569
15594
|
|
|
15570
15595
|
// src/hooks/use-spans.ts
|
|
15571
|
-
import { useCallback as
|
|
15596
|
+
import { useCallback as useCallback8, useEffect as useEffect16, useRef as useRef13, useState as useState10 } from "react";
|
|
15572
15597
|
|
|
15573
15598
|
// src/utils/pagination-buffer.ts
|
|
15574
15599
|
var insertSorted = (array, item, compareFunction, hint = "back") => {
|
|
@@ -15749,7 +15774,7 @@ var createPaginationBuffer = (options) => {
|
|
|
15749
15774
|
};
|
|
15750
15775
|
|
|
15751
15776
|
// src/hooks/use-spans-ws.tsx
|
|
15752
|
-
import { useCallback as
|
|
15777
|
+
import { useCallback as useCallback7, useEffect as useEffect14, useRef as useRef11, useState as useState8 } from "react";
|
|
15753
15778
|
|
|
15754
15779
|
// src/config.ts
|
|
15755
15780
|
var APPINSPECTOR_API_PREFIX = "/_localstack/appinspector";
|
|
@@ -15779,7 +15804,7 @@ var LOCALSTACK_INFO_PATH = "/_localstack/info";
|
|
|
15779
15804
|
|
|
15780
15805
|
// src/context.tsx
|
|
15781
15806
|
import { createContext as createContext9, useContext as useContext16 } from "react";
|
|
15782
|
-
import { useCallback as
|
|
15807
|
+
import { useCallback as useCallback6, useMemo as useMemo7 } from "react";
|
|
15783
15808
|
|
|
15784
15809
|
// src/api/client.ts
|
|
15785
15810
|
var import_semver2 = __toESM(require_semver2(), 1);
|
|
@@ -16026,7 +16051,7 @@ var createApiClient = ({ localstackEndpoint }) => {
|
|
|
16026
16051
|
};
|
|
16027
16052
|
|
|
16028
16053
|
// src/hooks/use-appinspector-open-analytics.ts
|
|
16029
|
-
import { useEffect as useEffect13, useRef as
|
|
16054
|
+
import { useEffect as useEffect13, useRef as useRef10 } from "react";
|
|
16030
16055
|
|
|
16031
16056
|
// node_modules/ua-parser-js/src/main/ua-parser.mjs
|
|
16032
16057
|
var LIBVERSION = "2.0.9";
|
|
@@ -17908,7 +17933,7 @@ var useAppInspectorOpenAnalytics = () => {
|
|
|
17908
17933
|
const api = useAppInspectorApi();
|
|
17909
17934
|
const { deploymentContainer } = useAppInspector();
|
|
17910
17935
|
const { status, statusError } = useAppInspectorStatus();
|
|
17911
|
-
const firedRef =
|
|
17936
|
+
const firedRef = useRef10(false);
|
|
17912
17937
|
useEffect13(() => {
|
|
17913
17938
|
if (firedRef.current) {
|
|
17914
17939
|
return;
|
|
@@ -17947,7 +17972,7 @@ var AppInspectorContextProvider = (props) => {
|
|
|
17947
17972
|
() => createApiClient({ localstackEndpoint: props.localstackEndpoint }),
|
|
17948
17973
|
[props.localstackEndpoint]
|
|
17949
17974
|
);
|
|
17950
|
-
const resolveLink =
|
|
17975
|
+
const resolveLink = useCallback6(
|
|
17951
17976
|
(options) => {
|
|
17952
17977
|
if (options.to === "settings") {
|
|
17953
17978
|
return `${props.routePrefix}/settings`;
|
|
@@ -17978,15 +18003,15 @@ var AppInspectorContextProvider = (props) => {
|
|
|
17978
18003
|
// src/hooks/use-spans-ws.tsx
|
|
17979
18004
|
function useSpansWebSocket(options) {
|
|
17980
18005
|
const { onMessage } = options;
|
|
17981
|
-
const onMessageRef =
|
|
18006
|
+
const onMessageRef = useRef11(onMessage);
|
|
17982
18007
|
useEffect14(() => {
|
|
17983
18008
|
onMessageRef.current = onMessage;
|
|
17984
18009
|
}, [onMessage]);
|
|
17985
18010
|
const [connected, setConnected] = useState8(false);
|
|
17986
|
-
const wsRef =
|
|
17987
|
-
const reconnectRef =
|
|
18011
|
+
const wsRef = useRef11(void 0);
|
|
18012
|
+
const reconnectRef = useRef11(void 0);
|
|
17988
18013
|
const { localstackEndpoint } = useAppInspector();
|
|
17989
|
-
const connect =
|
|
18014
|
+
const connect = useCallback7(() => {
|
|
17990
18015
|
if (wsRef.current !== void 0) return;
|
|
17991
18016
|
const url = new URL(getAppInspectorApiUrl(localstackEndpoint, API_ENDPOINTS.WEBSOCKET_SPANS));
|
|
17992
18017
|
url.protocol = globalThis.location.protocol === "https:" ? "wss" : "ws";
|
|
@@ -18029,16 +18054,16 @@ function useSpansWebSocket(options) {
|
|
|
18029
18054
|
}
|
|
18030
18055
|
|
|
18031
18056
|
// src/hooks/use-throttled-items.ts
|
|
18032
|
-
import { useEffect as useEffect15, useRef as
|
|
18057
|
+
import { useEffect as useEffect15, useRef as useRef12, useState as useState9 } from "react";
|
|
18033
18058
|
function useThrottledItems(items, getId, catchUpIncrement = 10) {
|
|
18034
18059
|
const [displayedItems, setDisplayedItems] = useState9([]);
|
|
18035
18060
|
const [isCatchingUpForward, setIsCatchingUpForward] = useState9(false);
|
|
18036
18061
|
const [isCatchingUpBackward, setIsCatchingUpBackward] = useState9(false);
|
|
18037
|
-
const targetRef =
|
|
18038
|
-
const rafRef =
|
|
18039
|
-
const leftHiddenRef =
|
|
18040
|
-
const rightHiddenRef =
|
|
18041
|
-
const shrinkRafPendingRef =
|
|
18062
|
+
const targetRef = useRef12([]);
|
|
18063
|
+
const rafRef = useRef12(void 0);
|
|
18064
|
+
const leftHiddenRef = useRef12(0);
|
|
18065
|
+
const rightHiddenRef = useRef12(0);
|
|
18066
|
+
const shrinkRafPendingRef = useRef12(false);
|
|
18042
18067
|
useEffect15(() => {
|
|
18043
18068
|
const previousTarget = targetRef.current;
|
|
18044
18069
|
const target = items ?? [];
|
|
@@ -18130,7 +18155,7 @@ var useSpans = () => {
|
|
|
18130
18155
|
const [fetchError, setFetchError] = useState10();
|
|
18131
18156
|
const [fetchingForward, setFetchingForward] = useState10(false);
|
|
18132
18157
|
const [fetchingBackward, setFetchingBackward] = useState10(false);
|
|
18133
|
-
const paginationBufferRef =
|
|
18158
|
+
const paginationBufferRef = useRef13(createPaginationBuffer({
|
|
18134
18159
|
async fetchPage(token) {
|
|
18135
18160
|
const response = await api.getSpans({
|
|
18136
18161
|
limit: PAGE_SIZE,
|
|
@@ -18174,17 +18199,17 @@ var useSpans = () => {
|
|
|
18174
18199
|
const [iamErrorCount, setIamErrorCount] = useState10();
|
|
18175
18200
|
const [hasMoreBackward, setHasMoreBackward] = useState10();
|
|
18176
18201
|
const [hasMoreForward, setHasMoreForward] = useState10();
|
|
18177
|
-
const fetchForward =
|
|
18202
|
+
const fetchForward = useCallback8(() => {
|
|
18178
18203
|
void paginationBufferRef.current.fetchForward();
|
|
18179
18204
|
}, []);
|
|
18180
|
-
const fetchBackward =
|
|
18205
|
+
const fetchBackward = useCallback8(() => {
|
|
18181
18206
|
void paginationBufferRef.current.fetchBackward();
|
|
18182
18207
|
}, []);
|
|
18183
18208
|
useEffect16(() => {
|
|
18184
18209
|
fetchForward();
|
|
18185
18210
|
}, [fetchForward]);
|
|
18186
18211
|
const [clearingSpans, setClearingSpans] = useState10(false);
|
|
18187
|
-
const clearSpans =
|
|
18212
|
+
const clearSpans = useCallback8(async () => {
|
|
18188
18213
|
if (clearingSpans) {
|
|
18189
18214
|
return;
|
|
18190
18215
|
}
|
|
@@ -18202,7 +18227,7 @@ var useSpans = () => {
|
|
|
18202
18227
|
}
|
|
18203
18228
|
}, [clearingSpans, api]);
|
|
18204
18229
|
const [streamPaused, setStreamPaused] = useState10(false);
|
|
18205
|
-
const toggleStream =
|
|
18230
|
+
const toggleStream = useCallback8(() => {
|
|
18206
18231
|
setStreamPaused((previous) => !previous);
|
|
18207
18232
|
}, []);
|
|
18208
18233
|
useEffect16(() => {
|
|
@@ -18249,7 +18274,7 @@ import { ArrowBack } from "@mui/icons-material";
|
|
|
18249
18274
|
import { Box as Box19, Button as Button6, Drawer, Paper as Paper3 } from "@mui/material";
|
|
18250
18275
|
import { styled } from "@mui/material/styles";
|
|
18251
18276
|
import { ReactFlowProvider } from "@xyflow/react";
|
|
18252
|
-
import { useCallback as
|
|
18277
|
+
import { useCallback as useCallback10, useEffect as useEffect21, useRef as useRef17, useState as useState17 } from "react";
|
|
18253
18278
|
|
|
18254
18279
|
// src/components/event-details/event-details.tsx
|
|
18255
18280
|
import { Close as Close2 } from "@mui/icons-material";
|
|
@@ -18453,7 +18478,7 @@ var getEventGroupsByType = (events) => {
|
|
|
18453
18478
|
// src/components/event-details/event-detail.tsx
|
|
18454
18479
|
import { KeyboardArrowDown as KeyboardArrowDown2, KeyboardArrowRight as KeyboardArrowRight2 } from "@mui/icons-material";
|
|
18455
18480
|
import { Box as Box12, IconButton as IconButton3, Typography as Typography7 } from "@mui/material";
|
|
18456
|
-
import { useEffect as useEffect18, useMemo as useMemo10, useRef as
|
|
18481
|
+
import { useEffect as useEffect18, useMemo as useMemo10, useRef as useRef15, useState as useState13 } from "react";
|
|
18457
18482
|
|
|
18458
18483
|
// src/components/status-icon.tsx
|
|
18459
18484
|
import { Cancel, CheckCircle, Error as Error2, Info, RemoveCircle } from "@mui/icons-material";
|
|
@@ -18620,7 +18645,7 @@ import { Box as Box11, useTheme as useTheme3 } from "@mui/material";
|
|
|
18620
18645
|
var import_copy_to_clipboard = __toESM(require_copy_to_clipboard(), 1);
|
|
18621
18646
|
import { jsx as jsx135, jsxs as jsxs126, Fragment as Fragment8 } from "react/jsx-runtime";
|
|
18622
18647
|
import { Box as Box10, InputBase, NoSsr, SvgIcon, createTheme, ThemeProvider, Paper as Paper2 } from "@mui/material";
|
|
18623
|
-
import { createContext as createContext10, useContext as useContext17, useState as useState12, useRef as
|
|
18648
|
+
import { createContext as createContext10, useContext as useContext17, useState as useState12, useRef as useRef14, useCallback as useCallback9, useMemo as useMemo9, useEffect as useEffect17, memo as memo9 } from "react";
|
|
18624
18649
|
import { create, useStore, createStore } from "zustand";
|
|
18625
18650
|
function r(e2) {
|
|
18626
18651
|
var t2, f2, n2 = "";
|
|
@@ -18865,8 +18890,8 @@ async function copyString(value) {
|
|
|
18865
18890
|
function useClipboard() {
|
|
18866
18891
|
let { timeout = 2e3 } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
18867
18892
|
const [copied, setCopied] = useState12(false);
|
|
18868
|
-
const copyTimeout =
|
|
18869
|
-
const handleCopyResult =
|
|
18893
|
+
const copyTimeout = useRef14(null);
|
|
18894
|
+
const handleCopyResult = useCallback9((value) => {
|
|
18870
18895
|
const current = copyTimeout.current;
|
|
18871
18896
|
if (current) {
|
|
18872
18897
|
window.clearTimeout(current);
|
|
@@ -18877,7 +18902,7 @@ function useClipboard() {
|
|
|
18877
18902
|
timeout
|
|
18878
18903
|
]);
|
|
18879
18904
|
const onCopy = useJsonViewerStore((store) => store.onCopy);
|
|
18880
|
-
const copy =
|
|
18905
|
+
const copy = useCallback9(async (path, value) => {
|
|
18881
18906
|
if (typeof onCopy === "function") {
|
|
18882
18907
|
try {
|
|
18883
18908
|
await onCopy(path, value, copyString);
|
|
@@ -18898,7 +18923,7 @@ function useClipboard() {
|
|
|
18898
18923
|
handleCopyResult,
|
|
18899
18924
|
onCopy
|
|
18900
18925
|
]);
|
|
18901
|
-
const reset =
|
|
18926
|
+
const reset = useCallback9(() => {
|
|
18902
18927
|
setCopied(false);
|
|
18903
18928
|
if (copyTimeout.current) {
|
|
18904
18929
|
clearTimeout(copyTimeout.current);
|
|
@@ -18957,7 +18982,7 @@ function useInspect(path, value, nestedIndex) {
|
|
|
18957
18982
|
}
|
|
18958
18983
|
return isTrap ? false : typeof defaultInspectControl === "function" ? defaultInspectControl(path, value) : depth < defaultInspectDepth;
|
|
18959
18984
|
});
|
|
18960
|
-
const setInspect =
|
|
18985
|
+
const setInspect = useCallback9((apply) => {
|
|
18961
18986
|
set((oldState) => {
|
|
18962
18987
|
const newState = typeof apply === "boolean" ? apply : apply(oldState);
|
|
18963
18988
|
setInspectCache(path, newState, nestedIndex);
|
|
@@ -19034,7 +19059,7 @@ function defineEasyType(param) {
|
|
|
19034
19059
|
const EasyTypeEditor = (param2) => {
|
|
19035
19060
|
let { value, setValue, abortEditing, commitEditing } = param2;
|
|
19036
19061
|
const color2 = useJsonViewerStore((store) => store.colorspace[colorKey]);
|
|
19037
|
-
const handleKeyDown =
|
|
19062
|
+
const handleKeyDown = useCallback9((event) => {
|
|
19038
19063
|
if (event.key === "Enter") {
|
|
19039
19064
|
event.preventDefault();
|
|
19040
19065
|
commitEditing(value);
|
|
@@ -19048,7 +19073,7 @@ function defineEasyType(param) {
|
|
|
19048
19073
|
commitEditing,
|
|
19049
19074
|
value
|
|
19050
19075
|
]);
|
|
19051
|
-
const handleChange =
|
|
19076
|
+
const handleChange = useCallback9((event) => {
|
|
19052
19077
|
setValue(event.target.value);
|
|
19053
19078
|
}, [
|
|
19054
19079
|
setValue
|
|
@@ -19940,7 +19965,7 @@ var DataKeyPair = (props) => {
|
|
|
19940
19965
|
prevValue,
|
|
19941
19966
|
value
|
|
19942
19967
|
]);
|
|
19943
|
-
const highlightContainer =
|
|
19968
|
+
const highlightContainer = useRef14();
|
|
19944
19969
|
useEffect17(() => {
|
|
19945
19970
|
if (highlightContainer.current && isHighlight && "animate" in highlightContainer.current) {
|
|
19946
19971
|
highlightContainer.current.animate([
|
|
@@ -19961,7 +19986,7 @@ var DataKeyPair = (props) => {
|
|
|
19961
19986
|
prevValue,
|
|
19962
19987
|
value
|
|
19963
19988
|
]);
|
|
19964
|
-
const startEditing =
|
|
19989
|
+
const startEditing = useCallback9((event) => {
|
|
19965
19990
|
event.preventDefault();
|
|
19966
19991
|
if (serialize) setTempValue(serialize(value));
|
|
19967
19992
|
setEditing(true);
|
|
@@ -19969,14 +19994,14 @@ var DataKeyPair = (props) => {
|
|
|
19969
19994
|
serialize,
|
|
19970
19995
|
value
|
|
19971
19996
|
]);
|
|
19972
|
-
const abortEditing =
|
|
19997
|
+
const abortEditing = useCallback9(() => {
|
|
19973
19998
|
setEditing(false);
|
|
19974
19999
|
setTempValue("");
|
|
19975
20000
|
}, [
|
|
19976
20001
|
setEditing,
|
|
19977
20002
|
setTempValue
|
|
19978
20003
|
]);
|
|
19979
|
-
const commitEditing =
|
|
20004
|
+
const commitEditing = useCallback9((newValue) => {
|
|
19980
20005
|
setEditing(false);
|
|
19981
20006
|
if (!deserialize) return;
|
|
19982
20007
|
try {
|
|
@@ -20112,7 +20137,7 @@ var DataKeyPair = (props) => {
|
|
|
20112
20137
|
sx: {
|
|
20113
20138
|
userSelect: "text"
|
|
20114
20139
|
},
|
|
20115
|
-
onMouseEnter:
|
|
20140
|
+
onMouseEnter: useCallback9(() => setHover(path, nestedIndex), [
|
|
20116
20141
|
setHover,
|
|
20117
20142
|
path,
|
|
20118
20143
|
nestedIndex
|
|
@@ -20127,7 +20152,7 @@ var DataKeyPair = (props) => {
|
|
|
20127
20152
|
letterSpacing: 0.5,
|
|
20128
20153
|
opacity: 0.8
|
|
20129
20154
|
},
|
|
20130
|
-
onClick:
|
|
20155
|
+
onClick: useCallback9((event) => {
|
|
20131
20156
|
if (event.isDefaultPrevented()) {
|
|
20132
20157
|
return;
|
|
20133
20158
|
}
|
|
@@ -20315,7 +20340,7 @@ var JsonViewerInner = (props) => {
|
|
|
20315
20340
|
}, [
|
|
20316
20341
|
props.theme
|
|
20317
20342
|
]);
|
|
20318
|
-
const onceRef =
|
|
20343
|
+
const onceRef = useRef14(true);
|
|
20319
20344
|
const registerTypes = useTypeRegistryStore((store) => store.registerTypes);
|
|
20320
20345
|
if (onceRef.current) {
|
|
20321
20346
|
const allTypes = props.valueTypes ? [
|
|
@@ -20343,7 +20368,7 @@ var JsonViewerInner = (props) => {
|
|
|
20343
20368
|
const prevValue = useJsonViewerStore((store) => store.prevValue);
|
|
20344
20369
|
const emptyPath = useMemo9(() => [], []);
|
|
20345
20370
|
const setHover = useJsonViewerStore((store) => store.setHover);
|
|
20346
|
-
const onMouseLeave =
|
|
20371
|
+
const onMouseLeave = useCallback9(() => setHover(null), [
|
|
20347
20372
|
setHover
|
|
20348
20373
|
]);
|
|
20349
20374
|
return /* @__PURE__ */ jsx135(Paper2, {
|
|
@@ -20460,7 +20485,7 @@ var DetailRow2 = ({ content, label }) => /* @__PURE__ */ jsxs127(Box12, { sx: {
|
|
|
20460
20485
|
var EventMessage = ({ event }) => {
|
|
20461
20486
|
const [isOpen, setIsOpen] = useState13(false);
|
|
20462
20487
|
const [isOverflowing, setIsOverflowing] = useState13(false);
|
|
20463
|
-
const textReference =
|
|
20488
|
+
const textReference = useRef15(null);
|
|
20464
20489
|
const parsedMessage = useMemo10(() => parseEventMessage(event), [event]);
|
|
20465
20490
|
const isIAMPolicyEvent = useMemo10(
|
|
20466
20491
|
() => event.event_type === "iam.policy_evaluation" && event.attributes?.payload && typeof event.attributes.payload === "string",
|
|
@@ -30255,7 +30280,7 @@ var QueryStatus = {
|
|
|
30255
30280
|
|
|
30256
30281
|
// src/components/event-details/lambda-invoke-logs-section.tsx
|
|
30257
30282
|
import { Box as Box13, CircularProgress as CircularProgress3, Stack, Typography as Typography8 } from "@mui/material";
|
|
30258
|
-
import { useEffect as useEffect19, useMemo as useMemo11, useRef as
|
|
30283
|
+
import { useEffect as useEffect19, useMemo as useMemo11, useRef as useRef16, useState as useState14 } from "react";
|
|
30259
30284
|
import { jsx as jsx138, jsxs as jsxs128 } from "react/jsx-runtime";
|
|
30260
30285
|
var POLL_INTERVAL_MS = 1e3;
|
|
30261
30286
|
async function pollQueryResults(client, queryId) {
|
|
@@ -30287,7 +30312,7 @@ function useLambdaInvokeLogs(functionName2, requestId, region, startTimeNano, en
|
|
|
30287
30312
|
const [loading, setLoading] = useState14(true);
|
|
30288
30313
|
const [logs, setLogs] = useState14([]);
|
|
30289
30314
|
const [error, setError] = useState14();
|
|
30290
|
-
const pollTimerRef =
|
|
30315
|
+
const pollTimerRef = useRef16(null);
|
|
30291
30316
|
const cloudWatchLogs = useCloudWatchLogsClient(region);
|
|
30292
30317
|
useEffect19(() => {
|
|
30293
30318
|
let cancelled = false;
|
|
@@ -31175,7 +31200,7 @@ var TraceGraphPage = ({ onClose, order: order2 = "oldest_first", spanId, traceId
|
|
|
31175
31200
|
const [spans, setSpans] = useState17();
|
|
31176
31201
|
const [loading, setLoading] = useState17(false);
|
|
31177
31202
|
const [fetchError, setFetchError] = useState17();
|
|
31178
|
-
const fetchSpans =
|
|
31203
|
+
const fetchSpans = useCallback10(async () => {
|
|
31179
31204
|
setLoading(true);
|
|
31180
31205
|
try {
|
|
31181
31206
|
const spans2 = await fetchConnectedTraces(api, [traceId]);
|
|
@@ -31193,7 +31218,7 @@ var TraceGraphPage = ({ onClose, order: order2 = "oldest_first", spanId, traceId
|
|
|
31193
31218
|
}, [fetchSpans]);
|
|
31194
31219
|
const [open, setOpen] = useState17(true);
|
|
31195
31220
|
const [selectedEvent, setSelectedEvent] = useState17(() => spans?.find((span) => span.span_id === spanId));
|
|
31196
|
-
const spansReference =
|
|
31221
|
+
const spansReference = useRef17();
|
|
31197
31222
|
useEffect21(() => {
|
|
31198
31223
|
if (!spansReference.current && spans) {
|
|
31199
31224
|
setSelectedEvent(spans.find((span) => span.span_id === spanId));
|
|
@@ -31201,19 +31226,19 @@ var TraceGraphPage = ({ onClose, order: order2 = "oldest_first", spanId, traceId
|
|
|
31201
31226
|
}
|
|
31202
31227
|
}, [spans, setSelectedEvent, spanId]);
|
|
31203
31228
|
const { checkStatus, status, statusError } = useAppInspectorStatus();
|
|
31204
|
-
const handleEnable =
|
|
31229
|
+
const handleEnable = useCallback10(async () => {
|
|
31205
31230
|
await api.setStatus({ status: "ENABLED" });
|
|
31206
31231
|
void checkStatus();
|
|
31207
31232
|
}, [api, checkStatus]);
|
|
31208
|
-
const handleEventSelect =
|
|
31233
|
+
const handleEventSelect = useCallback10((spanId2) => {
|
|
31209
31234
|
const span = spans?.find((s2) => s2.span_id === spanId2);
|
|
31210
31235
|
setSelectedEvent(span);
|
|
31211
31236
|
setOpen(true);
|
|
31212
31237
|
}, [spans]);
|
|
31213
|
-
const handleRetry =
|
|
31238
|
+
const handleRetry = useCallback10(() => {
|
|
31214
31239
|
void checkStatus();
|
|
31215
31240
|
}, [checkStatus]);
|
|
31216
|
-
const navigateToSpansList =
|
|
31241
|
+
const navigateToSpansList = useCallback10(() => {
|
|
31217
31242
|
onClose?.();
|
|
31218
31243
|
}, [onClose]);
|
|
31219
31244
|
return /* @__PURE__ */ jsx145(
|
|
@@ -31264,7 +31289,7 @@ var SpansListPage = () => {
|
|
|
31264
31289
|
totalCount
|
|
31265
31290
|
} = useSpans();
|
|
31266
31291
|
const { checking, checkStatus, status, statusError } = useAppInspectorStatus();
|
|
31267
|
-
const clearSpansSync =
|
|
31292
|
+
const clearSpansSync = useCallback11(() => {
|
|
31268
31293
|
void clearSpans();
|
|
31269
31294
|
}, [clearSpans]);
|
|
31270
31295
|
const localstackVersion = status?.localstackVersion ?? (statusError instanceof AppInspectorNotFoundError ? statusError.localstackVersion : void 0);
|
|
@@ -31273,15 +31298,15 @@ var SpansListPage = () => {
|
|
|
31273
31298
|
const [order2, setOrder] = useLocalStorage("spans-order", "oldest_first");
|
|
31274
31299
|
const [selectedTraceId, setSelectedTraceId] = useState18();
|
|
31275
31300
|
const [selectedSpanId, setSelectedSpanId] = useState18();
|
|
31276
|
-
const navigateToSpan =
|
|
31301
|
+
const navigateToSpan = useCallback11((span) => {
|
|
31277
31302
|
setSelectedTraceId(span.trace_id);
|
|
31278
31303
|
setSelectedSpanId(span.span_id);
|
|
31279
31304
|
}, []);
|
|
31280
|
-
const handleRetry =
|
|
31305
|
+
const handleRetry = useCallback11(() => {
|
|
31281
31306
|
void checkStatus();
|
|
31282
31307
|
fetchForward();
|
|
31283
31308
|
}, [checkStatus, fetchForward]);
|
|
31284
|
-
const handleEnable =
|
|
31309
|
+
const handleEnable = useCallback11(async () => {
|
|
31285
31310
|
await api.setStatus({ status: "ENABLED" });
|
|
31286
31311
|
void checkStatus();
|
|
31287
31312
|
}, [api, checkStatus]);
|