diff --git a/frontend/app/components/TeamsSettingsPage.jsx b/frontend/app/components/TeamsSettingsPage.jsx
index 747c1bd..d915089 100644
--- a/frontend/app/components/TeamsSettingsPage.jsx
+++ b/frontend/app/components/TeamsSettingsPage.jsx
@@ -28,12 +28,6 @@ function timeNumberToInput(value) {
return `${String(hours).padStart(2, '0')}:${String(minutes).padStart(2, '0')}`;
}
-function timeInputToInt(value) {
- const [hours, minutes] = value.split(':').map(Number);
-
- return hours + minutes / 60;
-}
-
export default function TeamSettingsPage() {
const searchParams = useSearchParams();
const teamId = searchParams.get('id');
@@ -117,7 +111,21 @@ export default function TeamSettingsPage() {
const getTeamPools = useCallback(async () => {
const res = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/pool/team/${teamId}`);
const data = await res.json();
- setTeamPools(data.body);
+ const pools = data.body ?? [];
+
+ const enrichedPools = await Promise.all(
+ pools.map(async (pool) => {
+ const clusterRes = await fetch(
+ `${process.env.NEXT_PUBLIC_API_URL}/hpc/pool/${pool.id}`
+ );
+ const clusterData = await clusterRes.json();
+ return {
+ ...pool,
+ clusters: clusterData.body ?? []
+ };
+ })
+ );
+ setTeamPools(enrichedPools);
}, [teamId]);
useEffect(() => {
@@ -500,7 +508,7 @@ export default function TeamSettingsPage() {
- {pool.name} -
- -{pool.id}
- -- View pool settings -
- ++ {pool.name} +
+ +{pool.id}
+ + {pool.clusters.length > 0 && ( ++ Clusters +
+ ++ View pool settings +
+