diff --git a/src/resources/destinations.tsx b/src/resources/destinations.tsx
index 8790169..bf95ab6 100644
--- a/src/resources/destinations.tsx
+++ b/src/resources/destinations.tsx
@@ -4,6 +4,7 @@ import AutorenewIcon from "@mui/icons-material/Autorenew";
import DestinationsIcon from "@mui/icons-material/CloudQueue";
import FolderSharedIcon from "@mui/icons-material/FolderShared";
import ViewListIcon from "@mui/icons-material/ViewList";
+import ErrorIcon from '@mui/icons-material/Error';
import {
Button,
Datagrid,
@@ -21,6 +22,7 @@ import {
Tab,
TabbedShowLayout,
TextField,
+ FunctionField,
TopToolbar,
useRecordContext,
useDelete,
@@ -35,13 +37,6 @@ import { get } from "lodash";
const DestinationPagination = () => ;
-const destinationRowSx = (record: RaRecord) => ({
- backgroundColor: record.retry_last_ts > 0 ? "warning.light" : "primary.contrastText",
- "& .MuiButtonBase-root": {
- color: "primary.dark",
- },
-});
-
const destinationFilters = [];
export const DestinationReconnectButton = () => {
@@ -105,7 +100,22 @@ const RetryDateField = (props: DateFieldProps) => {
return ;
};
+
+const destinationFieldRender = (record: RaRecord) => {
+ if (record.retry_last_ts > 0) {
+ return (
+ <>
+
+
+ {record.destination}
+ >
+ );
+ }
+ return <> {record.destination} >;
+}
+
export const DestinationList = (props: ListProps) => {
+ const record = useRecordContext(props);
return (
{
pagination={}
sort={{ field: "destination", order: "ASC" }}
>
- `${id}/show/rooms`} bulkActionButtons={false}>
-
+ `${id}/show/rooms`} bulkActionButtons={false}>
+