diff --git a/frontend/app/components/ClusterSettings.jsx b/frontend/app/components/ClusterSettings.jsx index 87e0d43..589578e 100644 --- a/frontend/app/components/ClusterSettings.jsx +++ b/frontend/app/components/ClusterSettings.jsx @@ -19,8 +19,23 @@ export default function ClusterSettingsPage() { try { const res = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/hpc`); const data = await res.json(); + const clusterResponse = data.body ?? []; + const enrichedClusters = await Promise.all( + clusterResponse.map(async (cluster) => { + const poolRes = await fetch( + `${process.env.NEXT_PUBLIC_API_URL}/pool/id/${cluster.poolId}` + ); + const poolData = await poolRes.json(); + return { + ...cluster, + pool: poolData.body ?? [] + }; + }) + ); + + console.log(enrichedClusters); - setClusters(data.body ?? []); + setClusters(enrichedClusters); } catch (err) { console.error('Failed to fetch clusters:', err); setClusters([]); @@ -356,19 +371,15 @@ export default function ClusterSettingsPage() {

Cluster settings and overview

-
+
{!hasChecks ? ( - <> +
No checks have been performed for this cluster - - - id: {clusterId} - - +
) : ( - <> +
{status ? ( Status: Healthy @@ -384,12 +395,18 @@ export default function ClusterSettingsPage() { Last Checked: {recentCheckDate} )} - - - id: {clusterId} - - +
)} + +
+ + id: {clusterId} + + + + pool: {cluster.pool.name} + +