@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.js CHANGED
@@ -2515,7 +2515,7 @@ var AwsServiceIcon = ({ hideTooltip, service, size = "medium", title }) => {
2515
2515
  {
2516
2516
  wrap: !hideTooltip,
2517
2517
  wrapperFn: (child) => /* @__PURE__ */ jsx121(Tooltip, { placement: "top", title: title ?? service, children: child }),
2518
- children: /* @__PURE__ */ jsx121(Icon, { height, style: { borderRadius: 6, display: "block" }, width })
2518
+ children: /* @__PURE__ */ jsx121(Icon, { height, style: { display: "block" }, width })
2519
2519
  }
2520
2520
  );
2521
2521
  };
@@ -2523,37 +2523,44 @@ var AwsServiceIcon = ({ hideTooltip, service, size = "medium", title }) => {
2523
2523
  // src/components/cells/pill-cell.tsx
2524
2524
  import { Box } from "@mui/material";
2525
2525
  import { jsx as jsx122 } from "react/jsx-runtime";
2526
+ var defaultBackgroundColor = "background.paper";
2527
+ var defaultBorderColor = "text.secondary";
2526
2528
  var PillCell = ({
2527
- backgroundColor = "transparent",
2528
- borderColor = "lightgray",
2529
+ backgroundColor = defaultBackgroundColor,
2530
+ borderColor = defaultBorderColor,
2529
2531
  borderWidth = "1px",
2530
2532
  children,
2531
2533
  height = "24px",
2532
2534
  paddingBottom,
2533
2535
  paddingTop
2534
- }) => /* @__PURE__ */ jsx122(
2535
- Box,
2536
- {
2537
- sx: {
2538
- alignItems: "center",
2539
- backgroundColor,
2540
- border: `${borderWidth} solid ${borderColor}`,
2541
- borderRadius: "16px",
2542
- display: "inline-flex",
2543
- height: paddingTop || paddingBottom ? "auto" : height,
2544
- maxWidth: "100%",
2545
- ...paddingTop && { paddingTop },
2546
- ...paddingBottom && { paddingBottom }
2547
- },
2548
- children
2549
- }
2550
- );
2536
+ }) => {
2537
+ return /* @__PURE__ */ jsx122(
2538
+ Box,
2539
+ {
2540
+ sx: {
2541
+ alignItems: "center",
2542
+ backgroundColor,
2543
+ borderColor,
2544
+ borderRadius: "16px",
2545
+ borderStyle: "solid",
2546
+ borderWidth,
2547
+ display: "inline-flex",
2548
+ height: paddingTop || paddingBottom ? "auto" : height,
2549
+ maxWidth: "100%",
2550
+ ...paddingTop && { paddingTop },
2551
+ ...paddingBottom && { paddingBottom },
2552
+ overflow: "hidden"
2553
+ },
2554
+ children
2555
+ }
2556
+ );
2557
+ };
2551
2558
 
2552
2559
  // src/components/cells/service-cell.tsx
2553
2560
  import { jsx as jsx123, jsxs as jsxs119 } from "react/jsx-runtime";
2554
2561
  var truncateName = (inputString, truncateLength = 15) => inputString.length > truncateLength ? `${inputString.slice(0, truncateLength - 3)}...` : inputString;
2555
2562
  var ServiceCell = ({
2556
- borderColor,
2563
+ borderColor = defaultBorderColor,
2557
2564
  borderWidth,
2558
2565
  height = "24px",
2559
2566
  resource,
@@ -2568,9 +2575,9 @@ var ServiceCell = ({
2568
2575
  {
2569
2576
  sx: {
2570
2577
  alignItems: "center",
2571
- borderBottomLeftRadius: "15px",
2572
- borderRight: "1px solid #e0e0e0",
2573
- borderTopLeftRadius: "15px",
2578
+ borderRightColor: borderColor,
2579
+ borderRightStyle: "solid",
2580
+ borderRightWidth: `1px`,
2574
2581
  display: "flex",
2575
2582
  height,
2576
2583
  justifyContent: "center",
@@ -2585,7 +2592,7 @@ var ServiceCell = ({
2585
2592
  Typography,
2586
2593
  {
2587
2594
  sx: {
2588
- borderRight: resource ? "1px solid #e0e0e0" : "none",
2595
+ borderRight: resource ? `1px solid ${borderColor}` : "none",
2589
2596
  fontWeight: "bold",
2590
2597
  overflow: "hidden",
2591
2598
  padding: "1px 8px",
@@ -2604,7 +2611,7 @@ var ServiceCell = ({
2604
2611
  children: service
2605
2612
  }
2606
2613
  ),
2607
- resource && /* @__PURE__ */ jsx123(
2614
+ resource !== void 0 && /* @__PURE__ */ jsx123(
2608
2615
  Typography,
2609
2616
  {
2610
2617
  sx: {
@@ -2816,7 +2823,7 @@ var SpansDataGrid = ({
2816
2823
  // src/components/spans-list/spans-list.tsx
2817
2824
  import { jsx as jsx125, jsxs as jsxs121 } from "react/jsx-runtime";
2818
2825
  var SpansList = (props) => {
2819
- return /* @__PURE__ */ jsxs121(Box4, { "data-testid": "spans-data-grid", sx: { display: "flex", flexDirection: "column", flexGrow: 1, gap: 2 }, children: [
2826
+ return /* @__PURE__ */ jsxs121(Box4, { "data-testid": "spans-data-grid", sx: { display: "flex", flexDirection: "column", flexGrow: 1, gap: 2, width: "100%" }, children: [
2820
2827
  props.spans.error && /* @__PURE__ */ jsxs121(
2821
2828
  Alert,
2822
2829
  {
@@ -3354,7 +3361,6 @@ var useStatus = () => {
3354
3361
 
3355
3362
  // src/pages/spans-list-page.tsx
3356
3363
  import { jsx as jsx128 } from "react/jsx-runtime";
3357
- var MAX_WIDTH = 1400;
3358
3364
  var SpansListPage = () => {
3359
3365
  const api = useAppInspectorApi();
3360
3366
  const [spans, setSpans] = useState5();
@@ -3427,46 +3433,34 @@ var SpansListPage = () => {
3427
3433
  flexGrow: 1,
3428
3434
  width: "100%"
3429
3435
  },
3430
- children: /* @__PURE__ */ jsx128(
3431
- Box6,
3436
+ children: shouldShowStatusMessage ? /* @__PURE__ */ jsx128(
3437
+ StatusMessage,
3438
+ {
3439
+ error: statusError,
3440
+ onRetry: handleRetry,
3441
+ status
3442
+ }
3443
+ ) : /* @__PURE__ */ jsx128(
3444
+ SpansList,
3432
3445
  {
3433
- sx: {
3434
- display: "flex",
3435
- flexDirection: "column",
3436
- flexGrow: 1,
3437
- maxWidth: MAX_WIDTH,
3438
- width: "100%"
3446
+ filterWriteOperations,
3447
+ onClearSpans: () => {
3448
+ void clearSpans();
3439
3449
  },
3440
- children: shouldShowStatusMessage ? /* @__PURE__ */ jsx128(
3441
- StatusMessage,
3442
- {
3443
- error: statusError,
3444
- onRetry: handleRetry,
3445
- status
3446
- }
3447
- ) : /* @__PURE__ */ jsx128(
3448
- SpansList,
3449
- {
3450
- filterWriteOperations,
3451
- onClearSpans: () => {
3452
- void clearSpans();
3453
- },
3454
- onFilterWriteOperationsChange: (value) => {
3455
- setFilterWriteOperations(value);
3456
- },
3457
- onRefresh: () => {
3458
- fetchSpansSync();
3459
- },
3460
- onSpanClick: (span) => {
3461
- navigateToSpan(span);
3462
- },
3463
- spans: {
3464
- data: spans,
3465
- error: fetchError,
3466
- loading
3467
- }
3468
- }
3469
- )
3450
+ onFilterWriteOperationsChange: (value) => {
3451
+ setFilterWriteOperations(value);
3452
+ },
3453
+ onRefresh: () => {
3454
+ fetchSpansSync();
3455
+ },
3456
+ onSpanClick: (span) => {
3457
+ navigateToSpan(span);
3458
+ },
3459
+ spans: {
3460
+ data: spans,
3461
+ error: fetchError,
3462
+ loading
3463
+ }
3470
3464
  }
3471
3465
  )
3472
3466
  }
@@ -3557,12 +3551,12 @@ var ToggleSection = ({ children, headline, initialOpen = true }) => {
3557
3551
 
3558
3552
  // src/components/event-details/event-details.tsx
3559
3553
  import { Fragment as Fragment3, jsx as jsx131, jsxs as jsxs125 } from "react/jsx-runtime";
3560
- var EventDetails = ({ selectedEvent }) => {
3554
+ var EventDetails = ({ onClose, selectedEvent }) => {
3561
3555
  if (!selectedEvent) {
3562
3556
  return /* @__PURE__ */ jsx131(Box9, { sx: { p: 3, textAlign: "center" }, children: /* @__PURE__ */ jsx131(Typography6, { color: "text.secondary", variant: "body2", children: "Select an event to view details" }) });
3563
3557
  }
3564
3558
  return /* @__PURE__ */ jsxs125(Box9, { "data-testid": "event-details", sx: { display: "flex", flexDirection: "column", height: "100%" }, children: [
3565
- /* @__PURE__ */ jsx131(EventDetailsHeader, { event: selectedEvent }),
3559
+ /* @__PURE__ */ jsx131(EventDetailsHeader, { event: selectedEvent, onClose }),
3566
3560
  /* @__PURE__ */ jsx131(Box9, { sx: { flexGrow: 1, overflow: "auto", p: 2 }, children: /* @__PURE__ */ jsxs125(Stack, { spacing: 2, children: [
3567
3561
  /* @__PURE__ */ jsx131(ToggleSection, { headline: "Basic Information", children: /* @__PURE__ */ jsxs125(Stack, { spacing: 1, children: [
3568
3562
  /* @__PURE__ */ jsxs125(Box9, { children: [
@@ -3740,7 +3734,7 @@ var ServiceNode = memo(function ServiceNode2({ data, selected }) {
3740
3734
  /* @__PURE__ */ jsx133(
3741
3735
  ServiceCell,
3742
3736
  {
3743
- borderColor: selected ? "black" : "lightgray",
3737
+ borderColor: selected ? "text.primary" : "text.secondary",
3744
3738
  borderWidth: selected ? "1.5px" : "1px",
3745
3739
  height: "32px",
3746
3740
  resource: data.event.resource_name,
@@ -4293,7 +4287,9 @@ var TraceGraphPage = () => {
4293
4287
  ) })
4294
4288
  }
4295
4289
  ) }),
4296
- /* @__PURE__ */ jsx136(StyledDrawer, { anchor: "right", open, variant: "persistent", children: /* @__PURE__ */ jsx136(EventDetails, { selectedEvent }) })
4290
+ /* @__PURE__ */ jsx136(StyledDrawer, { anchor: "right", open, variant: "persistent", children: /* @__PURE__ */ jsx136(EventDetails, { onClose: () => {
4291
+ setOpen(false);
4292
+ }, selectedEvent }) })
4297
4293
  ] })
4298
4294
  }
4299
4295
  )