@localstack/appinspector-ui 1.0.11 → 1.0.13

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
@@ -2552,7 +2552,7 @@ var AwsServiceIcon = ({ hideTooltip, service, size = "medium", title }) => {
2552
2552
  {
2553
2553
  wrap: !hideTooltip,
2554
2554
  wrapperFn: (child) => /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_material.Tooltip, { placement: "top", title: title ?? service, children: child }),
2555
- children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Icon, { height, style: { borderRadius: 6, display: "block" }, width })
2555
+ children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Icon, { height, style: { display: "block" }, width })
2556
2556
  }
2557
2557
  );
2558
2558
  };
@@ -2560,37 +2560,44 @@ var AwsServiceIcon = ({ hideTooltip, service, size = "medium", title }) => {
2560
2560
  // src/components/cells/pill-cell.tsx
2561
2561
  var import_material2 = require("@mui/material");
2562
2562
  var import_jsx_runtime122 = require("react/jsx-runtime");
2563
+ var defaultBackgroundColor = "background.paper";
2564
+ var defaultBorderColor = "text.secondary";
2563
2565
  var PillCell = ({
2564
- backgroundColor = "transparent",
2565
- borderColor = "lightgray",
2566
+ backgroundColor = defaultBackgroundColor,
2567
+ borderColor = defaultBorderColor,
2566
2568
  borderWidth = "1px",
2567
2569
  children,
2568
2570
  height = "24px",
2569
2571
  paddingBottom,
2570
2572
  paddingTop
2571
- }) => /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
2572
- import_material2.Box,
2573
- {
2574
- sx: {
2575
- alignItems: "center",
2576
- backgroundColor,
2577
- border: `${borderWidth} solid ${borderColor}`,
2578
- borderRadius: "16px",
2579
- display: "inline-flex",
2580
- height: paddingTop || paddingBottom ? "auto" : height,
2581
- maxWidth: "100%",
2582
- ...paddingTop && { paddingTop },
2583
- ...paddingBottom && { paddingBottom }
2584
- },
2585
- children
2586
- }
2587
- );
2573
+ }) => {
2574
+ return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
2575
+ import_material2.Box,
2576
+ {
2577
+ sx: {
2578
+ alignItems: "center",
2579
+ backgroundColor,
2580
+ borderColor,
2581
+ borderRadius: "16px",
2582
+ borderStyle: "solid",
2583
+ borderWidth,
2584
+ display: "inline-flex",
2585
+ height: paddingTop || paddingBottom ? "auto" : height,
2586
+ maxWidth: "100%",
2587
+ ...paddingTop && { paddingTop },
2588
+ ...paddingBottom && { paddingBottom },
2589
+ overflow: "hidden"
2590
+ },
2591
+ children
2592
+ }
2593
+ );
2594
+ };
2588
2595
 
2589
2596
  // src/components/cells/service-cell.tsx
2590
2597
  var import_jsx_runtime123 = require("react/jsx-runtime");
2591
2598
  var truncateName = (inputString, truncateLength = 15) => inputString.length > truncateLength ? `${inputString.slice(0, truncateLength - 3)}...` : inputString;
2592
2599
  var ServiceCell = ({
2593
- borderColor,
2600
+ borderColor = defaultBorderColor,
2594
2601
  borderWidth,
2595
2602
  height = "24px",
2596
2603
  resource,
@@ -2605,9 +2612,9 @@ var ServiceCell = ({
2605
2612
  {
2606
2613
  sx: {
2607
2614
  alignItems: "center",
2608
- borderBottomLeftRadius: "15px",
2609
- borderRight: "1px solid #e0e0e0",
2610
- borderTopLeftRadius: "15px",
2615
+ borderRightColor: borderColor,
2616
+ borderRightStyle: "solid",
2617
+ borderRightWidth: `1px`,
2611
2618
  display: "flex",
2612
2619
  height,
2613
2620
  justifyContent: "center",
@@ -2622,7 +2629,7 @@ var ServiceCell = ({
2622
2629
  import_material3.Typography,
2623
2630
  {
2624
2631
  sx: {
2625
- borderRight: resource ? "1px solid #e0e0e0" : "none",
2632
+ borderRight: resource ? `1px solid ${borderColor}` : "none",
2626
2633
  fontWeight: "bold",
2627
2634
  overflow: "hidden",
2628
2635
  padding: "1px 8px",
@@ -2641,7 +2648,7 @@ var ServiceCell = ({
2641
2648
  children: service
2642
2649
  }
2643
2650
  ),
2644
- resource && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
2651
+ resource !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
2645
2652
  import_material3.Typography,
2646
2653
  {
2647
2654
  sx: {
@@ -2853,7 +2860,7 @@ var SpansDataGrid = ({
2853
2860
  // src/components/spans-list/spans-list.tsx
2854
2861
  var import_jsx_runtime125 = require("react/jsx-runtime");
2855
2862
  var SpansList = (props) => {
2856
- return /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(import_material5.Box, { "data-testid": "spans-data-grid", sx: { display: "flex", flexDirection: "column", flexGrow: 1, gap: 2 }, children: [
2863
+ return /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(import_material5.Box, { "data-testid": "spans-data-grid", sx: { display: "flex", flexDirection: "column", flexGrow: 1, gap: 2, width: "100%" }, children: [
2857
2864
  props.spans.error && /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(
2858
2865
  import_material5.Alert,
2859
2866
  {
@@ -3391,7 +3398,6 @@ var useStatus = () => {
3391
3398
 
3392
3399
  // src/pages/spans-list-page.tsx
3393
3400
  var import_jsx_runtime128 = require("react/jsx-runtime");
3394
- var MAX_WIDTH = 1400;
3395
3401
  var SpansListPage = () => {
3396
3402
  const api = useAppInspectorApi();
3397
3403
  const [spans, setSpans] = (0, import_react8.useState)();
@@ -3464,46 +3470,34 @@ var SpansListPage = () => {
3464
3470
  flexGrow: 1,
3465
3471
  width: "100%"
3466
3472
  },
3467
- children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
3468
- import_material7.Box,
3473
+ children: shouldShowStatusMessage ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
3474
+ StatusMessage,
3475
+ {
3476
+ error: statusError,
3477
+ onRetry: handleRetry,
3478
+ status
3479
+ }
3480
+ ) : /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
3481
+ SpansList,
3469
3482
  {
3470
- sx: {
3471
- display: "flex",
3472
- flexDirection: "column",
3473
- flexGrow: 1,
3474
- maxWidth: MAX_WIDTH,
3475
- width: "100%"
3483
+ filterWriteOperations,
3484
+ onClearSpans: () => {
3485
+ void clearSpans();
3476
3486
  },
3477
- children: shouldShowStatusMessage ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
3478
- StatusMessage,
3479
- {
3480
- error: statusError,
3481
- onRetry: handleRetry,
3482
- status
3483
- }
3484
- ) : /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
3485
- SpansList,
3486
- {
3487
- filterWriteOperations,
3488
- onClearSpans: () => {
3489
- void clearSpans();
3490
- },
3491
- onFilterWriteOperationsChange: (value) => {
3492
- setFilterWriteOperations(value);
3493
- },
3494
- onRefresh: () => {
3495
- fetchSpansSync();
3496
- },
3497
- onSpanClick: (span) => {
3498
- navigateToSpan(span);
3499
- },
3500
- spans: {
3501
- data: spans,
3502
- error: fetchError,
3503
- loading
3504
- }
3505
- }
3506
- )
3487
+ onFilterWriteOperationsChange: (value) => {
3488
+ setFilterWriteOperations(value);
3489
+ },
3490
+ onRefresh: () => {
3491
+ fetchSpansSync();
3492
+ },
3493
+ onSpanClick: (span) => {
3494
+ navigateToSpan(span);
3495
+ },
3496
+ spans: {
3497
+ data: spans,
3498
+ error: fetchError,
3499
+ loading
3500
+ }
3507
3501
  }
3508
3502
  )
3509
3503
  }
@@ -3594,12 +3588,12 @@ var ToggleSection = ({ children, headline, initialOpen = true }) => {
3594
3588
 
3595
3589
  // src/components/event-details/event-details.tsx
3596
3590
  var import_jsx_runtime131 = require("react/jsx-runtime");
3597
- var EventDetails = ({ selectedEvent }) => {
3591
+ var EventDetails = ({ onClose, selectedEvent }) => {
3598
3592
  if (!selectedEvent) {
3599
3593
  return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_material10.Box, { sx: { p: 3, textAlign: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_material10.Typography, { color: "text.secondary", variant: "body2", children: "Select an event to view details" }) });
3600
3594
  }
3601
3595
  return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_material10.Box, { "data-testid": "event-details", sx: { display: "flex", flexDirection: "column", height: "100%" }, children: [
3602
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(EventDetailsHeader, { event: selectedEvent }),
3596
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(EventDetailsHeader, { event: selectedEvent, onClose }),
3603
3597
  /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_material10.Box, { sx: { flexGrow: 1, overflow: "auto", p: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_material10.Stack, { spacing: 2, children: [
3604
3598
  /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(ToggleSection, { headline: "Basic Information", children: /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_material10.Stack, { spacing: 1, children: [
3605
3599
  /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_material10.Box, { children: [
@@ -3777,7 +3771,7 @@ var ServiceNode = (0, import_react12.memo)(function ServiceNode2({ data, selecte
3777
3771
  /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
3778
3772
  ServiceCell,
3779
3773
  {
3780
- borderColor: selected ? "black" : "lightgray",
3774
+ borderColor: selected ? "text.primary" : "text.secondary",
3781
3775
  borderWidth: selected ? "1.5px" : "1px",
3782
3776
  height: "32px",
3783
3777
  resource: data.event.resource_name,
@@ -4330,7 +4324,9 @@ var TraceGraphPage = () => {
4330
4324
  ) })
4331
4325
  }
4332
4326
  ) }),
4333
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(StyledDrawer, { anchor: "right", open, variant: "persistent", children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(EventDetails, { selectedEvent }) })
4327
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(StyledDrawer, { anchor: "right", open, variant: "persistent", children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(EventDetails, { onClose: () => {
4328
+ setOpen(false);
4329
+ }, selectedEvent }) })
4334
4330
  ] })
4335
4331
  }
4336
4332
  )