@localstack/appinspector-ui 1.0.35 → 1.0.36

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 CHANGED
@@ -2795,10 +2795,10 @@ var columns = [
2795
2795
  ];
2796
2796
  var defaultSortingOption = { field: "start_time_unix_nano", sort: "asc" };
2797
2797
  var SpansDataGrid = ({
2798
- filterWriteOperations = true,
2798
+ includeReadOperations = false,
2799
2799
  loading,
2800
2800
  onClearSpans,
2801
- onFilterWriteOperationsChange,
2801
+ onIncludeReadOperationsChange,
2802
2802
  onPageChange,
2803
2803
  onPageSizeChange,
2804
2804
  onRefresh,
@@ -2868,20 +2868,20 @@ var SpansDataGrid = ({
2868
2868
  }
2869
2869
  ),
2870
2870
  /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Box, { sx: { flexGrow: 1 } }),
2871
- onFilterWriteOperationsChange && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
2871
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
2872
2872
  import_material5.FormControlLabel,
2873
2873
  {
2874
2874
  control: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
2875
2875
  import_material5.Switch,
2876
2876
  {
2877
- checked: filterWriteOperations,
2877
+ checked: includeReadOperations,
2878
2878
  onChange: (event) => {
2879
- onFilterWriteOperationsChange(event.target.checked);
2879
+ onIncludeReadOperationsChange?.(event.target.checked);
2880
2880
  },
2881
2881
  size: "small"
2882
2882
  }
2883
2883
  ),
2884
- label: "Only Write Operations"
2884
+ label: "Include Read Operations"
2885
2885
  }
2886
2886
  ),
2887
2887
  /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Button, { onClick: onClearSpans, startIcon: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_icons_material.DeleteForeverOutlined, {}), children: "Clear Spans" }),
@@ -2954,10 +2954,10 @@ var SpansList = (props) => {
2954
2954
  (props.spans.data !== void 0 || props.spans.loading) && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
2955
2955
  SpansDataGrid,
2956
2956
  {
2957
- filterWriteOperations: props.filterWriteOperations,
2957
+ includeReadOperations: props.includeReadOperations,
2958
2958
  loading: props.spans.loading,
2959
2959
  onClearSpans: props.onClearSpans,
2960
- onFilterWriteOperationsChange: props.onFilterWriteOperationsChange,
2960
+ onIncludeReadOperationsChange: props.onIncludeReadOperationsChange,
2961
2961
  onPageChange: props.onPageChange,
2962
2962
  onPageSizeChange: props.onPageSizeChange,
2963
2963
  onRefresh: props.onRefresh,
@@ -4770,11 +4770,13 @@ var TraceGraphPage = ({ onClose, spanId, traceId }) => {
4770
4770
  const api = useAppInspectorApi();
4771
4771
  const [spans, setSpans] = (0, import_react20.useState)();
4772
4772
  const [loading, setLoading] = (0, import_react20.useState)(false);
4773
+ const [includeReadOperations] = useLocalStorage("includeReadOperations", false);
4773
4774
  const [fetchError, setFetchError] = (0, import_react20.useState)();
4774
4775
  const fetchSpans = (0, import_react20.useCallback)(async () => {
4775
4776
  setLoading(true);
4776
4777
  try {
4777
4778
  const response = await api.getSpans({
4779
+ is_write_operation: includeReadOperations ? void 0 : true,
4778
4780
  trace_id: traceId
4779
4781
  });
4780
4782
  setSpans(response.spans);
@@ -4785,7 +4787,7 @@ var TraceGraphPage = ({ onClose, spanId, traceId }) => {
4785
4787
  } finally {
4786
4788
  setLoading(false);
4787
4789
  }
4788
- }, [api, traceId]);
4790
+ }, [api, includeReadOperations, traceId]);
4789
4791
  (0, import_react20.useEffect)(() => {
4790
4792
  void fetchSpans();
4791
4793
  }, [fetchSpans]);
@@ -4857,18 +4859,18 @@ var SpansListPage = () => {
4857
4859
  const [spans, setSpans] = (0, import_react21.useState)();
4858
4860
  const [loading, setLoading] = (0, import_react21.useState)(false);
4859
4861
  const hasFetched = (0, import_react21.useRef)(false);
4860
- const [filterWriteOperations, setFilterWriteOperations] = useLocalStorage("filterWriteOperations", true);
4862
+ const [includeReadOperations, setIncludeReadOperations] = useLocalStorage("includeReadOperations", false);
4861
4863
  const mapPageToNextCursor = (0, import_react21.useRef)({});
4862
4864
  const [page, setPage] = (0, import_react21.useState)(0);
4863
4865
  const [pageSize, setPageSize] = (0, import_react21.useState)(100);
4864
4866
  const [spanCount, setSpanCount] = (0, import_react21.useState)(0);
4865
4867
  const queryOptions = (0, import_react21.useMemo)(() => {
4866
4868
  return {
4867
- is_write_operation: filterWriteOperations ? true : void 0,
4869
+ is_write_operation: includeReadOperations ? void 0 : true,
4868
4870
  limit: pageSize,
4869
4871
  pagination_token: mapPageToNextCursor.current[page - 1]
4870
4872
  };
4871
- }, [filterWriteOperations, pageSize, page]);
4873
+ }, [includeReadOperations, pageSize, page]);
4872
4874
  const [fetchError, setFetchError] = (0, import_react21.useState)();
4873
4875
  const { checkStatus, error: statusError, status } = useStatus();
4874
4876
  const fetchSpans = (0, import_react21.useCallback)(async () => {
@@ -4951,12 +4953,12 @@ var SpansListPage = () => {
4951
4953
  ) : /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
4952
4954
  SpansList,
4953
4955
  {
4954
- filterWriteOperations,
4956
+ includeReadOperations,
4955
4957
  onClearSpans: () => {
4956
4958
  void clearSpans();
4957
4959
  },
4958
- onFilterWriteOperationsChange: (value) => {
4959
- setFilterWriteOperations(value);
4960
+ onIncludeReadOperationsChange: (value) => {
4961
+ setIncludeReadOperations(value);
4960
4962
  },
4961
4963
  onPageChange: setPage,
4962
4964
  onPageSizeChange: setPageSize,