Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ros2_medkit_web_ui",
"private": true,
"version": "0.5.0",
"version": "0.6.0",
"type": "module",
"description": "Simple web UI for browsing SOVD entity trees via discovery endpoints",
"repository": {
Expand Down Expand Up @@ -37,7 +37,7 @@
"@radix-ui/react-slot": "^1.2.3",
"@radix-ui/react-switch": "^1.2.6",
"@radix-ui/react-tooltip": "^1.2.8",
"@selfpatch/ros2-medkit-client-ts": "^0.5.0",
"@selfpatch/ros2-medkit-client-ts": "^0.6.0",
"@tailwindcss/vite": "^4.1.14",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
Expand Down
9 changes: 0 additions & 9 deletions src/lib/api-dispatch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -549,33 +549,24 @@ export function getEntityLogs(
if (params.severity) query.severity = params.severity;
if (params.context) query.context = params.context;

// The 0.5.0 spec omits the /logs `severity`/`context` query params even though
// the gateway reads them at runtime; see selfpatch/ros2_medkit#416. Each call below
// passes the query with a suppressed type error until the client is regenerated from
// the fixed spec; the suppression is self-removing, as it errors once the params are
// typed.
switch (entityType) {
case 'apps':
return client.GET('/apps/{app_id}/logs', {
// @ts-expect-error query params missing from the 0.5.0 spec (#416)
params: { path: { app_id: entityId }, query },
signal,
});
case 'components':
return client.GET('/components/{component_id}/logs', {
// @ts-expect-error query params missing from the 0.5.0 spec (#416)
params: { path: { component_id: entityId }, query },
signal,
});
case 'areas':
return client.GET('/areas/{area_id}/logs', {
// @ts-expect-error query params missing from the 0.5.0 spec (#416)
params: { path: { area_id: entityId }, query },
signal,
});
case 'functions':
return client.GET('/functions/{function_id}/logs', {
// @ts-expect-error query params missing from the 0.5.0 spec (#416)
params: { path: { function_id: entityId }, query },
signal,
});
Expand Down
8 changes: 2 additions & 6 deletions src/lib/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1894,12 +1894,8 @@ export const useAppStore = create<AppState>()(
try {
const { data: faultsData, error: faultsError } = await client.GET('/faults', {
params: {
// The 0.5.0 spec omits the /faults `status` query param even though
// the gateway reads it; see selfpatch/ros2_medkit#416. `status=all`
// is required to include cleared/healed faults (no param returns only
// active). Remove this cast once the client is regenerated from the
// fixed spec.
// @ts-expect-error query param missing from the 0.5.0 spec
// `status=all` is required to include cleared/healed faults
// (no param returns only active).
query: { status: 'all' },
},
});
Expand Down
Loading