@localstack/appinspector-ui 1.0.106 → 1.0.108

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.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 useCallback10, useState as useState18 } from "react";
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 {
@@ -2480,7 +2480,8 @@ var EVENT_DETAILS_REQUEST_PAYLOAD = "event-details-request-payload";
2480
2480
  var EVENT_DETAILS_RESPONSE_PAYLOAD_TEST_ID = "event-details-response-payload";
2481
2481
  var EVENT_DETAILS_EXCEPTION_PAYLOAD_TEST_ID = "event-details-exception-payload";
2482
2482
  var EVENT_DETAILS_IAM_ERRORS_SUPPRESSED_TEST_ID = "event-details-iam-errors-suppressed";
2483
- var IAM_ERROR_COUNT_TEST_ID = "iam-error-count";
2483
+ var ERROR_COUNT_TEST_ID = "error-count";
2484
+ var WARNING_COUNT_TEST_ID = "warning-count";
2484
2485
  var SERVICE_NODE_TEST_ID = "service-node";
2485
2486
  var SERVICE_NODE_SERVICE_NAME_TEST_ID = "service-node-service-name";
2486
2487
  var SERVICE_NODE_OPERATION_NAME_TEST_ID = "service-node-operation-name";
@@ -12251,7 +12252,7 @@ var AnimatePresence = function(_a2) {
12251
12252
  };
12252
12253
 
12253
12254
  // src/components/spans-list/spans-data-grid.tsx
12254
- import { memo as memo8, useMemo as useMemo5 } from "react";
12255
+ import { memo as memo8, useCallback as useCallback3, useLayoutEffect as useLayoutEffect2, useMemo as useMemo5, useRef as useRef8 } from "react";
12255
12256
 
12256
12257
  // src/components/cells/responsive-timestamp-cell.tsx
12257
12258
  import { memo as memo2 } from "react";
@@ -14884,6 +14885,7 @@ var LABEL_END_OF_STREAM = "This is the end of the stream";
14884
14885
  var LABEL_NO_SPANS = "There are no operations";
14885
14886
  var LABEL_LOAD_OLDER = "Load older operations";
14886
14887
  var LABEL_LOAD_NEWER = "Load newer operations";
14888
+ var STICK_TO_EDGE_THRESHOLD_PX = 4;
14887
14889
  var StreamBoundaryRow = ({ colSpan, label }) => /* @__PURE__ */ jsx127(TableRow, { children: /* @__PURE__ */ jsx127(TableCell, { colSpan, sx: { fontStyle: "italic", textAlign: "center" }, children: /* @__PURE__ */ jsx127("span", { children: label }) }) });
14888
14890
  var LoadSpansRow = ({ colSpan, fetching, label, onFetch }) => /* @__PURE__ */ jsx127(TableRow, { children: /* @__PURE__ */ jsxs121(TableCell, { colSpan, sx: { textAlign: "center" }, children: [
14889
14891
  !fetching && /* @__PURE__ */ jsx127(Button2, { onClick: onFetch, sx: { my: 1 }, children: label }),
@@ -14944,11 +14946,11 @@ var SpansDataGridRow = memo8(
14944
14946
  );
14945
14947
  var SpansDataGrid = ({
14946
14948
  clearingSpans,
14949
+ errorCount,
14947
14950
  fetchingBackward,
14948
14951
  fetchingForward,
14949
14952
  hasMoreBackward,
14950
14953
  hasMoreForward,
14951
- iamErrorCount,
14952
14954
  licenseLimit,
14953
14955
  onClearSpans,
14954
14956
  onFetchBackward,
@@ -14960,7 +14962,8 @@ var SpansDataGrid = ({
14960
14962
  spans,
14961
14963
  streamPaused,
14962
14964
  systemLimit,
14963
- totalCount
14965
+ totalCount,
14966
+ warningCount
14964
14967
  }) => {
14965
14968
  const columns = useMemo5(() => [
14966
14969
  columnHelper.accessor("startTime", {
@@ -15042,23 +15045,55 @@ var SpansDataGrid = ({
15042
15045
  const columnCount = table.getAllColumns().length;
15043
15046
  const rows = table.getRowModel().rows;
15044
15047
  const hasRows = rows.length > 0;
15048
+ const containerRef = useRef8(null);
15049
+ const isAtLiveEdgeRef = useRef8(true);
15050
+ const handleScroll = useCallback3(() => {
15051
+ const element = containerRef.current;
15052
+ if (!element) return;
15053
+ if (order2 === "oldest_first") {
15054
+ const distanceFromBottom = element.scrollHeight - element.scrollTop - element.clientHeight;
15055
+ isAtLiveEdgeRef.current = distanceFromBottom <= STICK_TO_EDGE_THRESHOLD_PX;
15056
+ return;
15057
+ }
15058
+ isAtLiveEdgeRef.current = element.scrollTop <= STICK_TO_EDGE_THRESHOLD_PX;
15059
+ }, [order2]);
15060
+ const lastSpanId = spans?.at(-1)?.span_id;
15061
+ useLayoutEffect2(() => {
15062
+ handleScroll();
15063
+ }, [handleScroll]);
15064
+ useLayoutEffect2(() => {
15065
+ if (order2 !== "oldest_first") return;
15066
+ const element = containerRef.current;
15067
+ if (!element || !isAtLiveEdgeRef.current) return;
15068
+ element.scrollTop = element.scrollHeight;
15069
+ }, [order2, spans?.length, lastSpanId]);
15045
15070
  return /* @__PURE__ */ jsxs121(Fragment5, { children: [
15046
15071
  /* @__PURE__ */ jsx127(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsxs121(Box4, { sx: { alignItems: "center", display: "flex", gap: "0.5rem" }, children: [
15047
15072
  /* @__PURE__ */ jsx127(SpanCountBadge, { licenseLimit, systemLimit, totalCount, visibleCount: spans?.length }),
15048
- iamErrorCount !== void 0 && iamErrorCount > 0 && /* @__PURE__ */ jsxs121(Fragment5, { children: [
15073
+ errorCount !== void 0 && errorCount > 0 && /* @__PURE__ */ jsxs121(Fragment5, { children: [
15049
15074
  /* @__PURE__ */ jsx127(Typography3, { color: "text.disabled", sx: { mr: 0.5 }, variant: "body2", children: "\u2014" }),
15050
- /* @__PURE__ */ jsx127(Tooltip3, { title: "Number of IAM permission errors detected across all operations", children: /* @__PURE__ */ jsxs121(
15075
+ /* @__PURE__ */ jsx127(Tooltip3, { title: "Number of errors detected across all operations", children: /* @__PURE__ */ jsxs121(
15051
15076
  Box4,
15052
15077
  {
15053
- "data-testid": IAM_ERROR_COUNT_TEST_ID,
15078
+ "data-testid": ERROR_COUNT_TEST_ID,
15054
15079
  sx: { alignItems: "center", borderBottom: "1px dotted", borderColor: "error.main", cursor: "default", display: "flex", gap: 0.5, mb: "-1px" },
15055
15080
  children: [
15056
- /* @__PURE__ */ jsx127(Typography3, { color: "error", variant: "body2", children: iamErrorCount.toLocaleString() }),
15057
- /* @__PURE__ */ jsxs121(Typography3, { color: "error", variant: "caption", children: [
15058
- "IAM",
15059
- " ",
15060
- iamErrorCount === 1 ? "error" : "errors"
15061
- ] })
15081
+ /* @__PURE__ */ jsx127(Typography3, { color: "error", variant: "body2", children: errorCount.toLocaleString() }),
15082
+ /* @__PURE__ */ jsx127(Typography3, { color: "error", variant: "caption", children: errorCount === 1 ? "error" : "errors" })
15083
+ ]
15084
+ }
15085
+ ) })
15086
+ ] }),
15087
+ warningCount !== void 0 && warningCount > 0 && /* @__PURE__ */ jsxs121(Fragment5, { children: [
15088
+ /* @__PURE__ */ jsx127(Typography3, { color: "text.disabled", sx: { mr: 0.5 }, variant: "body2", children: "\u2014" }),
15089
+ /* @__PURE__ */ jsx127(Tooltip3, { title: "Number of warnings detected across all operations", children: /* @__PURE__ */ jsxs121(
15090
+ Box4,
15091
+ {
15092
+ "data-testid": WARNING_COUNT_TEST_ID,
15093
+ sx: { alignItems: "center", borderBottom: "1px dotted", borderColor: "warning.main", cursor: "default", display: "flex", gap: 0.5, mb: "-1px" },
15094
+ children: [
15095
+ /* @__PURE__ */ jsx127(Typography3, { color: "warning.main", variant: "body2", children: warningCount.toLocaleString() }),
15096
+ /* @__PURE__ */ jsx127(Typography3, { color: "warning.main", variant: "caption", children: warningCount === 1 ? "warning" : "warnings" })
15062
15097
  ]
15063
15098
  }
15064
15099
  ) })
@@ -15099,6 +15134,8 @@ var SpansDataGrid = ({
15099
15134
  /* @__PURE__ */ jsx127(Paper, { sx: { flexGrow: 1, overflow: "hidden", position: "relative", width: "100%" }, children: /* @__PURE__ */ jsx127(
15100
15135
  TableContainer,
15101
15136
  {
15137
+ onScroll: handleScroll,
15138
+ ref: containerRef,
15102
15139
  sx: {
15103
15140
  bottom: 0,
15104
15141
  flexGrow: 1,
@@ -15190,11 +15227,11 @@ var SpansList = (props) => {
15190
15227
  SpansDataGrid,
15191
15228
  {
15192
15229
  clearingSpans: props.clearingSpans,
15230
+ errorCount: props.errorCount,
15193
15231
  fetchingBackward: props.fetchingBackward,
15194
15232
  fetchingForward: props.fetchingForward,
15195
15233
  hasMoreBackward: props.hasMoreBackward,
15196
15234
  hasMoreForward: props.hasMoreForward,
15197
- iamErrorCount: props.iamErrorCount,
15198
15235
  licenseLimit: props.licenseLimit,
15199
15236
  onClearSpans: props.onClearSpans,
15200
15237
  onFetchBackward: props.onFetchBackward,
@@ -15206,7 +15243,8 @@ var SpansList = (props) => {
15206
15243
  spans: props.spans,
15207
15244
  streamPaused: props.streamPaused,
15208
15245
  systemLimit: props.systemLimit,
15209
- totalCount: props.totalCount
15246
+ totalCount: props.totalCount,
15247
+ warningCount: props.warningCount
15210
15248
  }
15211
15249
  )
15212
15250
  ] });
@@ -15462,15 +15500,15 @@ var StatusMessage = ({
15462
15500
  import { createContext as createContext8, useContext as useContext15, useMemo as useMemo6 } from "react";
15463
15501
 
15464
15502
  // src/hooks/use-status.tsx
15465
- import { useCallback as useCallback3, useEffect as useEffect11, useRef as useRef8, useState as useState6 } from "react";
15503
+ import { useCallback as useCallback4, useEffect as useEffect11, useRef as useRef9, useState as useState6 } from "react";
15466
15504
  var useStatus = () => {
15467
15505
  const api = useAppInspectorApi();
15468
15506
  const [checking, setChecking] = useState6(true);
15469
15507
  const [status, setStatus] = useState6();
15470
15508
  const [error, setError] = useState6();
15471
- const hasFetchedReference = useRef8(false);
15472
- const abortControllerReference = useRef8(null);
15473
- const checkStatus = useCallback3(async () => {
15509
+ const hasFetchedReference = useRef9(false);
15510
+ const abortControllerReference = useRef9(null);
15511
+ const checkStatus = useCallback4(async () => {
15474
15512
  if (abortControllerReference.current !== null) {
15475
15513
  abortControllerReference.current.abort();
15476
15514
  }
@@ -15523,7 +15561,7 @@ var useAppInspectorStatus = () => {
15523
15561
  };
15524
15562
 
15525
15563
  // src/hooks/use-local-storage.tsx
15526
- import { useCallback as useCallback4, useEffect as useEffect12, useState as useState7 } from "react";
15564
+ import { useCallback as useCallback5, useEffect as useEffect12, useState as useState7 } from "react";
15527
15565
  function useLocalStorage(key, initialValue) {
15528
15566
  const [storedValue, setStoredValue] = useState7(() => {
15529
15567
  try {
@@ -15534,7 +15572,7 @@ function useLocalStorage(key, initialValue) {
15534
15572
  return initialValue;
15535
15573
  }
15536
15574
  });
15537
- const setValue = useCallback4((value) => {
15575
+ const setValue = useCallback5((value) => {
15538
15576
  try {
15539
15577
  setStoredValue((previousState) => {
15540
15578
  const next = typeof value === "function" ? value(previousState) : value;
@@ -15568,7 +15606,7 @@ function useLocalStorage(key, initialValue) {
15568
15606
  }
15569
15607
 
15570
15608
  // src/hooks/use-spans.ts
15571
- import { useCallback as useCallback7, useEffect as useEffect16, useRef as useRef12, useState as useState10 } from "react";
15609
+ import { useCallback as useCallback8, useEffect as useEffect16, useRef as useRef13, useState as useState10 } from "react";
15572
15610
 
15573
15611
  // src/utils/pagination-buffer.ts
15574
15612
  var insertSorted = (array, item, compareFunction, hint = "back") => {
@@ -15749,7 +15787,7 @@ var createPaginationBuffer = (options) => {
15749
15787
  };
15750
15788
 
15751
15789
  // src/hooks/use-spans-ws.tsx
15752
- import { useCallback as useCallback6, useEffect as useEffect14, useRef as useRef10, useState as useState8 } from "react";
15790
+ import { useCallback as useCallback7, useEffect as useEffect14, useRef as useRef11, useState as useState8 } from "react";
15753
15791
 
15754
15792
  // src/config.ts
15755
15793
  var APPINSPECTOR_API_PREFIX = "/_localstack/appinspector";
@@ -15779,7 +15817,7 @@ var LOCALSTACK_INFO_PATH = "/_localstack/info";
15779
15817
 
15780
15818
  // src/context.tsx
15781
15819
  import { createContext as createContext9, useContext as useContext16 } from "react";
15782
- import { useCallback as useCallback5, useMemo as useMemo7 } from "react";
15820
+ import { useCallback as useCallback6, useMemo as useMemo7 } from "react";
15783
15821
 
15784
15822
  // src/api/client.ts
15785
15823
  var import_semver2 = __toESM(require_semver2(), 1);
@@ -16026,7 +16064,7 @@ var createApiClient = ({ localstackEndpoint }) => {
16026
16064
  };
16027
16065
 
16028
16066
  // src/hooks/use-appinspector-open-analytics.ts
16029
- import { useEffect as useEffect13, useRef as useRef9 } from "react";
16067
+ import { useEffect as useEffect13, useRef as useRef10 } from "react";
16030
16068
 
16031
16069
  // node_modules/ua-parser-js/src/main/ua-parser.mjs
16032
16070
  var LIBVERSION = "2.0.9";
@@ -17908,7 +17946,7 @@ var useAppInspectorOpenAnalytics = () => {
17908
17946
  const api = useAppInspectorApi();
17909
17947
  const { deploymentContainer } = useAppInspector();
17910
17948
  const { status, statusError } = useAppInspectorStatus();
17911
- const firedRef = useRef9(false);
17949
+ const firedRef = useRef10(false);
17912
17950
  useEffect13(() => {
17913
17951
  if (firedRef.current) {
17914
17952
  return;
@@ -17947,7 +17985,7 @@ var AppInspectorContextProvider = (props) => {
17947
17985
  () => createApiClient({ localstackEndpoint: props.localstackEndpoint }),
17948
17986
  [props.localstackEndpoint]
17949
17987
  );
17950
- const resolveLink = useCallback5(
17988
+ const resolveLink = useCallback6(
17951
17989
  (options) => {
17952
17990
  if (options.to === "settings") {
17953
17991
  return `${props.routePrefix}/settings`;
@@ -17978,15 +18016,15 @@ var AppInspectorContextProvider = (props) => {
17978
18016
  // src/hooks/use-spans-ws.tsx
17979
18017
  function useSpansWebSocket(options) {
17980
18018
  const { onMessage } = options;
17981
- const onMessageRef = useRef10(onMessage);
18019
+ const onMessageRef = useRef11(onMessage);
17982
18020
  useEffect14(() => {
17983
18021
  onMessageRef.current = onMessage;
17984
18022
  }, [onMessage]);
17985
18023
  const [connected, setConnected] = useState8(false);
17986
- const wsRef = useRef10(void 0);
17987
- const reconnectRef = useRef10(void 0);
18024
+ const wsRef = useRef11(void 0);
18025
+ const reconnectRef = useRef11(void 0);
17988
18026
  const { localstackEndpoint } = useAppInspector();
17989
- const connect = useCallback6(() => {
18027
+ const connect = useCallback7(() => {
17990
18028
  if (wsRef.current !== void 0) return;
17991
18029
  const url = new URL(getAppInspectorApiUrl(localstackEndpoint, API_ENDPOINTS.WEBSOCKET_SPANS));
17992
18030
  url.protocol = globalThis.location.protocol === "https:" ? "wss" : "ws";
@@ -18029,16 +18067,16 @@ function useSpansWebSocket(options) {
18029
18067
  }
18030
18068
 
18031
18069
  // src/hooks/use-throttled-items.ts
18032
- import { useEffect as useEffect15, useRef as useRef11, useState as useState9 } from "react";
18070
+ import { useEffect as useEffect15, useRef as useRef12, useState as useState9 } from "react";
18033
18071
  function useThrottledItems(items, getId, catchUpIncrement = 10) {
18034
18072
  const [displayedItems, setDisplayedItems] = useState9([]);
18035
18073
  const [isCatchingUpForward, setIsCatchingUpForward] = useState9(false);
18036
18074
  const [isCatchingUpBackward, setIsCatchingUpBackward] = useState9(false);
18037
- const targetRef = useRef11([]);
18038
- const rafRef = useRef11(void 0);
18039
- const leftHiddenRef = useRef11(0);
18040
- const rightHiddenRef = useRef11(0);
18041
- const shrinkRafPendingRef = useRef11(false);
18075
+ const targetRef = useRef12([]);
18076
+ const rafRef = useRef12(void 0);
18077
+ const leftHiddenRef = useRef12(0);
18078
+ const rightHiddenRef = useRef12(0);
18079
+ const shrinkRafPendingRef = useRef12(false);
18042
18080
  useEffect15(() => {
18043
18081
  const previousTarget = targetRef.current;
18044
18082
  const target = items ?? [];
@@ -18130,7 +18168,7 @@ var useSpans = () => {
18130
18168
  const [fetchError, setFetchError] = useState10();
18131
18169
  const [fetchingForward, setFetchingForward] = useState10(false);
18132
18170
  const [fetchingBackward, setFetchingBackward] = useState10(false);
18133
- const paginationBufferRef = useRef12(createPaginationBuffer({
18171
+ const paginationBufferRef = useRef13(createPaginationBuffer({
18134
18172
  async fetchPage(token) {
18135
18173
  const response = await api.getSpans({
18136
18174
  limit: PAGE_SIZE,
@@ -18139,7 +18177,8 @@ var useSpans = () => {
18139
18177
  setTotalCount(response.pagination.total_count);
18140
18178
  setLicenseLimit(response.limits.span_count_limit_license);
18141
18179
  setSystemLimit(response.limits.span_count_limit_system);
18142
- setIamErrorCount(response.iam_error_count);
18180
+ setErrorCount(response.error_count);
18181
+ setWarningCount(response.warning_count);
18143
18182
  return {
18144
18183
  hasMoreBackward: response.pagination.has_prev,
18145
18184
  hasMoreForward: response.pagination.has_next,
@@ -18171,20 +18210,21 @@ var useSpans = () => {
18171
18210
  const [totalCount, setTotalCount] = useState10();
18172
18211
  const [licenseLimit, setLicenseLimit] = useState10();
18173
18212
  const [systemLimit, setSystemLimit] = useState10();
18174
- const [iamErrorCount, setIamErrorCount] = useState10();
18213
+ const [errorCount, setErrorCount] = useState10();
18214
+ const [warningCount, setWarningCount] = useState10();
18175
18215
  const [hasMoreBackward, setHasMoreBackward] = useState10();
18176
18216
  const [hasMoreForward, setHasMoreForward] = useState10();
18177
- const fetchForward = useCallback7(() => {
18217
+ const fetchForward = useCallback8(() => {
18178
18218
  void paginationBufferRef.current.fetchForward();
18179
18219
  }, []);
18180
- const fetchBackward = useCallback7(() => {
18220
+ const fetchBackward = useCallback8(() => {
18181
18221
  void paginationBufferRef.current.fetchBackward();
18182
18222
  }, []);
18183
18223
  useEffect16(() => {
18184
18224
  fetchForward();
18185
18225
  }, [fetchForward]);
18186
18226
  const [clearingSpans, setClearingSpans] = useState10(false);
18187
- const clearSpans = useCallback7(async () => {
18227
+ const clearSpans = useCallback8(async () => {
18188
18228
  if (clearingSpans) {
18189
18229
  return;
18190
18230
  }
@@ -18202,7 +18242,7 @@ var useSpans = () => {
18202
18242
  }
18203
18243
  }, [clearingSpans, api]);
18204
18244
  const [streamPaused, setStreamPaused] = useState10(false);
18205
- const toggleStream = useCallback7(() => {
18245
+ const toggleStream = useCallback8(() => {
18206
18246
  setStreamPaused((previous) => !previous);
18207
18247
  }, []);
18208
18248
  useEffect16(() => {
@@ -18227,6 +18267,7 @@ var useSpans = () => {
18227
18267
  return {
18228
18268
  clearingSpans,
18229
18269
  clearSpans,
18270
+ errorCount,
18230
18271
  fetchBackward,
18231
18272
  fetchError,
18232
18273
  fetchForward,
@@ -18234,13 +18275,13 @@ var useSpans = () => {
18234
18275
  fetchingForward,
18235
18276
  hasMoreBackward,
18236
18277
  hasMoreForward,
18237
- iamErrorCount,
18238
18278
  licenseLimit,
18239
18279
  spans: throttledSpans.items,
18240
18280
  streamPaused,
18241
18281
  systemLimit,
18242
18282
  toggleStream,
18243
- totalCount
18283
+ totalCount,
18284
+ warningCount
18244
18285
  };
18245
18286
  };
18246
18287
 
@@ -18249,7 +18290,7 @@ import { ArrowBack } from "@mui/icons-material";
18249
18290
  import { Box as Box19, Button as Button6, Drawer, Paper as Paper3 } from "@mui/material";
18250
18291
  import { styled } from "@mui/material/styles";
18251
18292
  import { ReactFlowProvider } from "@xyflow/react";
18252
- import { useCallback as useCallback9, useEffect as useEffect21, useRef as useRef16, useState as useState17 } from "react";
18293
+ import { useCallback as useCallback10, useEffect as useEffect21, useRef as useRef17, useState as useState17 } from "react";
18253
18294
 
18254
18295
  // src/components/event-details/event-details.tsx
18255
18296
  import { Close as Close2 } from "@mui/icons-material";
@@ -18453,7 +18494,7 @@ var getEventGroupsByType = (events) => {
18453
18494
  // src/components/event-details/event-detail.tsx
18454
18495
  import { KeyboardArrowDown as KeyboardArrowDown2, KeyboardArrowRight as KeyboardArrowRight2 } from "@mui/icons-material";
18455
18496
  import { Box as Box12, IconButton as IconButton3, Typography as Typography7 } from "@mui/material";
18456
- import { useEffect as useEffect18, useMemo as useMemo10, useRef as useRef14, useState as useState13 } from "react";
18497
+ import { useEffect as useEffect18, useMemo as useMemo10, useRef as useRef15, useState as useState13 } from "react";
18457
18498
 
18458
18499
  // src/components/status-icon.tsx
18459
18500
  import { Cancel, CheckCircle, Error as Error2, Info, RemoveCircle } from "@mui/icons-material";
@@ -18620,7 +18661,7 @@ import { Box as Box11, useTheme as useTheme3 } from "@mui/material";
18620
18661
  var import_copy_to_clipboard = __toESM(require_copy_to_clipboard(), 1);
18621
18662
  import { jsx as jsx135, jsxs as jsxs126, Fragment as Fragment8 } from "react/jsx-runtime";
18622
18663
  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 useRef13, useCallback as useCallback8, useMemo as useMemo9, useEffect as useEffect17, memo as memo9 } from "react";
18664
+ 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
18665
  import { create, useStore, createStore } from "zustand";
18625
18666
  function r(e2) {
18626
18667
  var t2, f2, n2 = "";
@@ -18865,8 +18906,8 @@ async function copyString(value) {
18865
18906
  function useClipboard() {
18866
18907
  let { timeout = 2e3 } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
18867
18908
  const [copied, setCopied] = useState12(false);
18868
- const copyTimeout = useRef13(null);
18869
- const handleCopyResult = useCallback8((value) => {
18909
+ const copyTimeout = useRef14(null);
18910
+ const handleCopyResult = useCallback9((value) => {
18870
18911
  const current = copyTimeout.current;
18871
18912
  if (current) {
18872
18913
  window.clearTimeout(current);
@@ -18877,7 +18918,7 @@ function useClipboard() {
18877
18918
  timeout
18878
18919
  ]);
18879
18920
  const onCopy = useJsonViewerStore((store) => store.onCopy);
18880
- const copy = useCallback8(async (path, value) => {
18921
+ const copy = useCallback9(async (path, value) => {
18881
18922
  if (typeof onCopy === "function") {
18882
18923
  try {
18883
18924
  await onCopy(path, value, copyString);
@@ -18898,7 +18939,7 @@ function useClipboard() {
18898
18939
  handleCopyResult,
18899
18940
  onCopy
18900
18941
  ]);
18901
- const reset = useCallback8(() => {
18942
+ const reset = useCallback9(() => {
18902
18943
  setCopied(false);
18903
18944
  if (copyTimeout.current) {
18904
18945
  clearTimeout(copyTimeout.current);
@@ -18957,7 +18998,7 @@ function useInspect(path, value, nestedIndex) {
18957
18998
  }
18958
18999
  return isTrap ? false : typeof defaultInspectControl === "function" ? defaultInspectControl(path, value) : depth < defaultInspectDepth;
18959
19000
  });
18960
- const setInspect = useCallback8((apply) => {
19001
+ const setInspect = useCallback9((apply) => {
18961
19002
  set((oldState) => {
18962
19003
  const newState = typeof apply === "boolean" ? apply : apply(oldState);
18963
19004
  setInspectCache(path, newState, nestedIndex);
@@ -19034,7 +19075,7 @@ function defineEasyType(param) {
19034
19075
  const EasyTypeEditor = (param2) => {
19035
19076
  let { value, setValue, abortEditing, commitEditing } = param2;
19036
19077
  const color2 = useJsonViewerStore((store) => store.colorspace[colorKey]);
19037
- const handleKeyDown = useCallback8((event) => {
19078
+ const handleKeyDown = useCallback9((event) => {
19038
19079
  if (event.key === "Enter") {
19039
19080
  event.preventDefault();
19040
19081
  commitEditing(value);
@@ -19048,7 +19089,7 @@ function defineEasyType(param) {
19048
19089
  commitEditing,
19049
19090
  value
19050
19091
  ]);
19051
- const handleChange = useCallback8((event) => {
19092
+ const handleChange = useCallback9((event) => {
19052
19093
  setValue(event.target.value);
19053
19094
  }, [
19054
19095
  setValue
@@ -19940,7 +19981,7 @@ var DataKeyPair = (props) => {
19940
19981
  prevValue,
19941
19982
  value
19942
19983
  ]);
19943
- const highlightContainer = useRef13();
19984
+ const highlightContainer = useRef14();
19944
19985
  useEffect17(() => {
19945
19986
  if (highlightContainer.current && isHighlight && "animate" in highlightContainer.current) {
19946
19987
  highlightContainer.current.animate([
@@ -19961,7 +20002,7 @@ var DataKeyPair = (props) => {
19961
20002
  prevValue,
19962
20003
  value
19963
20004
  ]);
19964
- const startEditing = useCallback8((event) => {
20005
+ const startEditing = useCallback9((event) => {
19965
20006
  event.preventDefault();
19966
20007
  if (serialize) setTempValue(serialize(value));
19967
20008
  setEditing(true);
@@ -19969,14 +20010,14 @@ var DataKeyPair = (props) => {
19969
20010
  serialize,
19970
20011
  value
19971
20012
  ]);
19972
- const abortEditing = useCallback8(() => {
20013
+ const abortEditing = useCallback9(() => {
19973
20014
  setEditing(false);
19974
20015
  setTempValue("");
19975
20016
  }, [
19976
20017
  setEditing,
19977
20018
  setTempValue
19978
20019
  ]);
19979
- const commitEditing = useCallback8((newValue) => {
20020
+ const commitEditing = useCallback9((newValue) => {
19980
20021
  setEditing(false);
19981
20022
  if (!deserialize) return;
19982
20023
  try {
@@ -20112,7 +20153,7 @@ var DataKeyPair = (props) => {
20112
20153
  sx: {
20113
20154
  userSelect: "text"
20114
20155
  },
20115
- onMouseEnter: useCallback8(() => setHover(path, nestedIndex), [
20156
+ onMouseEnter: useCallback9(() => setHover(path, nestedIndex), [
20116
20157
  setHover,
20117
20158
  path,
20118
20159
  nestedIndex
@@ -20127,7 +20168,7 @@ var DataKeyPair = (props) => {
20127
20168
  letterSpacing: 0.5,
20128
20169
  opacity: 0.8
20129
20170
  },
20130
- onClick: useCallback8((event) => {
20171
+ onClick: useCallback9((event) => {
20131
20172
  if (event.isDefaultPrevented()) {
20132
20173
  return;
20133
20174
  }
@@ -20315,7 +20356,7 @@ var JsonViewerInner = (props) => {
20315
20356
  }, [
20316
20357
  props.theme
20317
20358
  ]);
20318
- const onceRef = useRef13(true);
20359
+ const onceRef = useRef14(true);
20319
20360
  const registerTypes = useTypeRegistryStore((store) => store.registerTypes);
20320
20361
  if (onceRef.current) {
20321
20362
  const allTypes = props.valueTypes ? [
@@ -20343,7 +20384,7 @@ var JsonViewerInner = (props) => {
20343
20384
  const prevValue = useJsonViewerStore((store) => store.prevValue);
20344
20385
  const emptyPath = useMemo9(() => [], []);
20345
20386
  const setHover = useJsonViewerStore((store) => store.setHover);
20346
- const onMouseLeave = useCallback8(() => setHover(null), [
20387
+ const onMouseLeave = useCallback9(() => setHover(null), [
20347
20388
  setHover
20348
20389
  ]);
20349
20390
  return /* @__PURE__ */ jsx135(Paper2, {
@@ -20460,7 +20501,7 @@ var DetailRow2 = ({ content, label }) => /* @__PURE__ */ jsxs127(Box12, { sx: {
20460
20501
  var EventMessage = ({ event }) => {
20461
20502
  const [isOpen, setIsOpen] = useState13(false);
20462
20503
  const [isOverflowing, setIsOverflowing] = useState13(false);
20463
- const textReference = useRef14(null);
20504
+ const textReference = useRef15(null);
20464
20505
  const parsedMessage = useMemo10(() => parseEventMessage(event), [event]);
20465
20506
  const isIAMPolicyEvent = useMemo10(
20466
20507
  () => event.event_type === "iam.policy_evaluation" && event.attributes?.payload && typeof event.attributes.payload === "string",
@@ -30255,7 +30296,7 @@ var QueryStatus = {
30255
30296
 
30256
30297
  // src/components/event-details/lambda-invoke-logs-section.tsx
30257
30298
  import { Box as Box13, CircularProgress as CircularProgress3, Stack, Typography as Typography8 } from "@mui/material";
30258
- import { useEffect as useEffect19, useMemo as useMemo11, useRef as useRef15, useState as useState14 } from "react";
30299
+ import { useEffect as useEffect19, useMemo as useMemo11, useRef as useRef16, useState as useState14 } from "react";
30259
30300
  import { jsx as jsx138, jsxs as jsxs128 } from "react/jsx-runtime";
30260
30301
  var POLL_INTERVAL_MS = 1e3;
30261
30302
  async function pollQueryResults(client, queryId) {
@@ -30287,7 +30328,7 @@ function useLambdaInvokeLogs(functionName2, requestId, region, startTimeNano, en
30287
30328
  const [loading, setLoading] = useState14(true);
30288
30329
  const [logs, setLogs] = useState14([]);
30289
30330
  const [error, setError] = useState14();
30290
- const pollTimerRef = useRef15(null);
30331
+ const pollTimerRef = useRef16(null);
30291
30332
  const cloudWatchLogs = useCloudWatchLogsClient(region);
30292
30333
  useEffect19(() => {
30293
30334
  let cancelled = false;
@@ -31175,7 +31216,7 @@ var TraceGraphPage = ({ onClose, order: order2 = "oldest_first", spanId, traceId
31175
31216
  const [spans, setSpans] = useState17();
31176
31217
  const [loading, setLoading] = useState17(false);
31177
31218
  const [fetchError, setFetchError] = useState17();
31178
- const fetchSpans = useCallback9(async () => {
31219
+ const fetchSpans = useCallback10(async () => {
31179
31220
  setLoading(true);
31180
31221
  try {
31181
31222
  const spans2 = await fetchConnectedTraces(api, [traceId]);
@@ -31193,7 +31234,7 @@ var TraceGraphPage = ({ onClose, order: order2 = "oldest_first", spanId, traceId
31193
31234
  }, [fetchSpans]);
31194
31235
  const [open, setOpen] = useState17(true);
31195
31236
  const [selectedEvent, setSelectedEvent] = useState17(() => spans?.find((span) => span.span_id === spanId));
31196
- const spansReference = useRef16();
31237
+ const spansReference = useRef17();
31197
31238
  useEffect21(() => {
31198
31239
  if (!spansReference.current && spans) {
31199
31240
  setSelectedEvent(spans.find((span) => span.span_id === spanId));
@@ -31201,19 +31242,19 @@ var TraceGraphPage = ({ onClose, order: order2 = "oldest_first", spanId, traceId
31201
31242
  }
31202
31243
  }, [spans, setSelectedEvent, spanId]);
31203
31244
  const { checkStatus, status, statusError } = useAppInspectorStatus();
31204
- const handleEnable = useCallback9(async () => {
31245
+ const handleEnable = useCallback10(async () => {
31205
31246
  await api.setStatus({ status: "ENABLED" });
31206
31247
  void checkStatus();
31207
31248
  }, [api, checkStatus]);
31208
- const handleEventSelect = useCallback9((spanId2) => {
31249
+ const handleEventSelect = useCallback10((spanId2) => {
31209
31250
  const span = spans?.find((s2) => s2.span_id === spanId2);
31210
31251
  setSelectedEvent(span);
31211
31252
  setOpen(true);
31212
31253
  }, [spans]);
31213
- const handleRetry = useCallback9(() => {
31254
+ const handleRetry = useCallback10(() => {
31214
31255
  void checkStatus();
31215
31256
  }, [checkStatus]);
31216
- const navigateToSpansList = useCallback9(() => {
31257
+ const navigateToSpansList = useCallback10(() => {
31217
31258
  onClose?.();
31218
31259
  }, [onClose]);
31219
31260
  return /* @__PURE__ */ jsx145(
@@ -31248,6 +31289,7 @@ var SpansListPage = () => {
31248
31289
  const {
31249
31290
  clearingSpans,
31250
31291
  clearSpans,
31292
+ errorCount,
31251
31293
  fetchBackward,
31252
31294
  fetchError,
31253
31295
  fetchForward,
@@ -31255,16 +31297,16 @@ var SpansListPage = () => {
31255
31297
  fetchingForward,
31256
31298
  hasMoreBackward,
31257
31299
  hasMoreForward,
31258
- iamErrorCount,
31259
31300
  licenseLimit,
31260
31301
  spans,
31261
31302
  streamPaused,
31262
31303
  systemLimit,
31263
31304
  toggleStream,
31264
- totalCount
31305
+ totalCount,
31306
+ warningCount
31265
31307
  } = useSpans();
31266
31308
  const { checking, checkStatus, status, statusError } = useAppInspectorStatus();
31267
- const clearSpansSync = useCallback10(() => {
31309
+ const clearSpansSync = useCallback11(() => {
31268
31310
  void clearSpans();
31269
31311
  }, [clearSpans]);
31270
31312
  const localstackVersion = status?.localstackVersion ?? (statusError instanceof AppInspectorNotFoundError ? statusError.localstackVersion : void 0);
@@ -31273,15 +31315,15 @@ var SpansListPage = () => {
31273
31315
  const [order2, setOrder] = useLocalStorage("spans-order", "oldest_first");
31274
31316
  const [selectedTraceId, setSelectedTraceId] = useState18();
31275
31317
  const [selectedSpanId, setSelectedSpanId] = useState18();
31276
- const navigateToSpan = useCallback10((span) => {
31318
+ const navigateToSpan = useCallback11((span) => {
31277
31319
  setSelectedTraceId(span.trace_id);
31278
31320
  setSelectedSpanId(span.span_id);
31279
31321
  }, []);
31280
- const handleRetry = useCallback10(() => {
31322
+ const handleRetry = useCallback11(() => {
31281
31323
  void checkStatus();
31282
31324
  fetchForward();
31283
31325
  }, [checkStatus, fetchForward]);
31284
- const handleEnable = useCallback10(async () => {
31326
+ const handleEnable = useCallback11(async () => {
31285
31327
  await api.setStatus({ status: "ENABLED" });
31286
31328
  void checkStatus();
31287
31329
  }, [api, checkStatus]);
@@ -31326,12 +31368,12 @@ var SpansListPage = () => {
31326
31368
  SpansList,
31327
31369
  {
31328
31370
  clearingSpans,
31371
+ errorCount,
31329
31372
  fetchError,
31330
31373
  fetchingBackward,
31331
31374
  fetchingForward,
31332
31375
  hasMoreBackward,
31333
31376
  hasMoreForward,
31334
- iamErrorCount,
31335
31377
  licenseLimit,
31336
31378
  onClearSpans: clearSpansSync,
31337
31379
  onFetchBackward: fetchBackward,
@@ -31343,7 +31385,8 @@ var SpansListPage = () => {
31343
31385
  spans,
31344
31386
  streamPaused,
31345
31387
  systemLimit,
31346
- totalCount
31388
+ totalCount,
31389
+ warningCount
31347
31390
  }
31348
31391
  )
31349
31392
  ]