diff --git a/central_frontend/src/routes/RelaysListRoute.tsx b/central_frontend/src/routes/RelaysListRoute.tsx index 0044181..ddbb14c 100644 --- a/central_frontend/src/routes/RelaysListRoute.tsx +++ b/central_frontend/src/routes/RelaysListRoute.tsx @@ -30,6 +30,8 @@ export function RelaysListRoute(): React.ReactElement { const load = async () => { setList(await RelayApi.GetList()); + + list?.sort((a, b) => b.priority - a.priority); }; const reload = () => { @@ -63,5 +65,33 @@ function RelaysList(p: { list: DeviceRelay[]; onReload: () => void; }): React.ReactElement { - return <>todo; + return ( + + + + + Name + Enabled + Priority + Consumption + Status + + + + {p.list.map((row) => ( + + {row.name} + {row.enabled ? "YES" : "NO"} + {row.priority} + {row.consumption} + TODO + + ))} + +
+
+ ); }