fix(beszel): widget transparency, error handling, and cache invalidation (#5993)

This commit is contained in:
Thomas authored and GitHub committed 2026-06-20 12:21:26 +02:00
1 parent e29c79a902
commit 39e424563a
10 files changed
+89 -20

No files matched your search

@@ -66,7 +66,7 @@ export default function BeszelSystemTableWidget({
width,
}: WidgetComponentProps<"beszelSystemTable">) {
const t = useScopedI18n("widget.beszelSystemTable");
const { data: results = [] } = clientApi.widget.beszel.getSystems.useQuery(
const { data: results = [], error: systemsError } = clientApi.widget.beszel.getSystems.useQuery(
{ integrationIds },
{ staleTime: 5_000, refetchInterval: 5_000, retry: false },
);
@@ -255,6 +255,8 @@ export default function BeszelSystemTableWidget({
return cols.filter(Boolean) as DataTableColumn<SystemRowWithKey>[];
}, [options, t, size]);
if (systemsError) throw systemsError;
return (
<DataTable
style={{ pointerEvents: isEditMode ? "none" : undefined }}
@@ -1,3 +1,17 @@
/* Make the DataTable transparent so the board card's opacity-controlled
background shows through. The mantine-datatable defaults to
var(--mantine-color-body) which is opaque. */
.beszel-table,
.beszel-table .mantine-datatable-table,
.beszel-table .mantine-datatable-table thead,
.beszel-table .mantine-datatable-table tbody,
.beszel-table .mantine-datatable-table tfoot,
.beszel-table .mantine-datatable-table tr,
.beszel-table th,
.beszel-table td {
background-color: transparent !important;
}
.beszel-table th {
white-space: nowrap;
}