diff --git a/remote_frontend/src/widgets/GroupsWidget.tsx b/remote_frontend/src/widgets/GroupsWidget.tsx index 4f553e7..053d894 100644 --- a/remote_frontend/src/widgets/GroupsWidget.tsx +++ b/remote_frontend/src/widgets/GroupsWidget.tsx @@ -1,5 +1,65 @@ -import { Rights } from "../api/ServerApi"; +import { + Card, + Table, + TableBody, + TableCell, + TableCellLayout, + TableHeader, + TableHeaderCell, + TableRow, + Title3, +} from "@fluentui/react-components"; +import { Desktop24Regular } from "@fluentui/react-icons"; +import { filesize } from "filesize"; +import { Rights, VMGroup } from "../api/ServerApi"; export function GroupsWidget(p: { rights: Rights }): React.ReactElement { - return

TODO

; + return ( + <> + {p.rights.groups.map((g) => ( + + ))} + + ); +} + +function GroupInfo(p: { group: VMGroup }): React.ReactElement { + return ( + + {p.group.id} + + + + Name + Description + Resources + Actions + + + + {p.group.vms.map((item) => ( + + + }> + {item.name} + + + {item.description} + + {item.architecture} • RAM :{" "} + {filesize(item.memory * 1000 * 1000)} • {item.number_vcpu}{" "} + vCPU + + + ))} + +
+
+ ); }