@localstack/appinspector-ui 1.0.1 → 1.0.2

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
@@ -3497,6 +3497,7 @@ var SpansListPage = () => {
3497
3497
  };
3498
3498
 
3499
3499
  // src/pages/trace-graph-page.tsx
3500
+ var import_icons_material5 = require("@mui/icons-material");
3500
3501
  var import_material14 = require("@mui/material");
3501
3502
  var import_styles = require("@mui/material/styles");
3502
3503
  var import_react16 = require("@xyflow/react");
@@ -4128,7 +4129,13 @@ var TraceGraphPage = () => {
4128
4129
  void checkStatus();
4129
4130
  }, [checkStatus]);
4130
4131
  const shouldShowStatusMessage = Boolean(statusError) || status?.status === "DISABLED";
4131
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
4132
+ const navigate = (0, import_react_router_dom2.useNavigate)();
4133
+ const { resolveLink } = useAppInspector();
4134
+ const navigateToSpansList = (0, import_react17.useCallback)(() => {
4135
+ const url = resolveLink({ to: "spans-list" });
4136
+ navigate(url);
4137
+ }, [navigate, resolveLink]);
4138
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
4132
4139
  import_material14.Box,
4133
4140
  {
4134
4141
  "data-testid": "trace-graph-page",
@@ -4136,56 +4143,65 @@ var TraceGraphPage = () => {
4136
4143
  alignItems: "center",
4137
4144
  display: "flex",
4138
4145
  flexDirection: "column",
4146
+ gap: 2,
4139
4147
  height: "100vh",
4140
4148
  overflow: "hidden"
4141
4149
  },
4142
- children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
4143
- import_material14.Paper,
4144
- {
4145
- sx: {
4146
- display: "flex",
4147
- flexGrow: 1,
4148
- overflow: "hidden",
4149
- position: "relative",
4150
- width: "100%"
4151
- },
4152
- children: shouldShowStatusMessage ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
4153
- StatusMessage,
4154
- {
4155
- error: statusError,
4156
- onRetry: handleRetry,
4157
- status
4158
- }
4159
- ) : /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_jsx_runtime135.Fragment, { children: [
4160
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Main, { open, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
4161
- import_material14.Box,
4150
+ children: [
4151
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material14.Box, { sx: { display: "flex", width: "100%" }, children: [
4152
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material14.Button, { onClick: () => {
4153
+ navigateToSpansList();
4154
+ }, startIcon: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_icons_material5.ArrowBack, {}), children: "Go back" }),
4155
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material14.Box, { sx: { flexGrow: 1 } })
4156
+ ] }),
4157
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
4158
+ import_material14.Paper,
4159
+ {
4160
+ sx: {
4161
+ display: "flex",
4162
+ flexGrow: 1,
4163
+ overflow: "hidden",
4164
+ position: "relative",
4165
+ width: "100%"
4166
+ },
4167
+ children: shouldShowStatusMessage ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
4168
+ StatusMessage,
4162
4169
  {
4163
- sx: {
4164
- height: "100%",
4165
- overflow: "auto"
4166
- },
4167
- children: traceId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_react16.ReactFlowProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
4168
- TraceGraph,
4169
- {
4170
- initialFocusEventId: spanId,
4171
- onEventSelect: handleEventSelect,
4172
- onRefresh: () => {
4173
- void fetchSpans();
4174
- },
4175
- spans: {
4176
- data: spans,
4177
- error: fetchError,
4178
- loading
4179
- },
4180
- viewPortPixelWidth
4181
- }
4182
- ) })
4170
+ error: statusError,
4171
+ onRetry: handleRetry,
4172
+ status
4183
4173
  }
4184
- ) }),
4185
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(StyledDrawer, { anchor: "right", open, variant: "persistent", children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(EventDetails, { selectedEvent }) })
4186
- ] })
4187
- }
4188
- )
4174
+ ) : /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_jsx_runtime135.Fragment, { children: [
4175
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Main, { open, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
4176
+ import_material14.Box,
4177
+ {
4178
+ sx: {
4179
+ height: "100%",
4180
+ overflow: "auto"
4181
+ },
4182
+ children: traceId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_react16.ReactFlowProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
4183
+ TraceGraph,
4184
+ {
4185
+ initialFocusEventId: spanId,
4186
+ onEventSelect: handleEventSelect,
4187
+ onRefresh: () => {
4188
+ void fetchSpans();
4189
+ },
4190
+ spans: {
4191
+ data: spans,
4192
+ error: fetchError,
4193
+ loading
4194
+ },
4195
+ viewPortPixelWidth
4196
+ }
4197
+ ) })
4198
+ }
4199
+ ) }),
4200
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(StyledDrawer, { anchor: "right", open, variant: "persistent", children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(EventDetails, { selectedEvent }) })
4201
+ ] })
4202
+ }
4203
+ )
4204
+ ]
4189
4205
  }
4190
4206
  );
4191
4207
  };