diff --git a/admin-compliance/app/sdk/iace/[projectId]/hazards/_components/RiskAssessmentTable.tsx b/admin-compliance/app/sdk/iace/[projectId]/hazards/_components/RiskAssessmentTable.tsx
index ea8e4c6..66b6958 100644
--- a/admin-compliance/app/sdk/iace/[projectId]/hazards/_components/RiskAssessmentTable.tsx
+++ b/admin-compliance/app/sdk/iace/[projectId]/hazards/_components/RiskAssessmentTable.tsx
@@ -198,9 +198,9 @@ export function RiskAssessmentTable({ projectId, hazards, onReassess, decisions,
return (
{/* Hazard info */}
- |
- {h.name}
- {h.component_name && {h.component_name} }
+ |
+ {h.name}
+ {h.component_name && {h.component_name} }
|
diff --git a/admin-compliance/app/sdk/iace/[projectId]/page.tsx b/admin-compliance/app/sdk/iace/[projectId]/page.tsx
index d289147..b70aa6c 100644
--- a/admin-compliance/app/sdk/iace/[projectId]/page.tsx
+++ b/admin-compliance/app/sdk/iace/[projectId]/page.tsx
@@ -122,19 +122,19 @@ export default function ProjectOverviewPage() {
async function fetchProject() {
try {
- // Fetch project detail + live risk summary + mitigations count in parallel
- const [projRes, riskRes, mitRes, hazRes] = await Promise.all([
+ // Only fetch project detail + lightweight risk summary (NO heavy lists)
+ const [projRes, riskRes] = await Promise.all([
fetch(`/api/sdk/v1/iace/projects/${projectId}`),
fetch(`/api/sdk/v1/iace/projects/${projectId}/risk-summary`),
- fetch(`/api/sdk/v1/iace/projects/${projectId}/mitigations`),
- fetch(`/api/sdk/v1/iace/projects/${projectId}/hazards`),
])
if (!projRes.ok) return
const json = await projRes.json()
- // Live risk summary from dedicated endpoint
+ // Live risk summary from dedicated endpoint (lightweight — just counts)
let rs = json.risk_summary || {}
+ let hazCount = 0
+ let mitCount = 0
if (riskRes.ok) {
const riskJson = await riskRes.json()
const live = riskJson.risk_summary || riskJson || {}
@@ -146,18 +146,8 @@ export default function ProjectOverviewPage() {
negligible: live.negligible || 0,
total: live.total_hazards || live.total || 0,
}
- }
-
- // Live counts
- let mitCount = 0
- if (mitRes.ok) {
- const mitJson = await mitRes.json()
- mitCount = mitJson.total || (mitJson.mitigations || []).length || 0
- }
- let hazCount = 0
- if (hazRes.ok) {
- const hazJson = await hazRes.json()
- hazCount = hazJson.total || (hazJson.hazards || []).length || 0
+ hazCount = live.total_hazards || live.total || 0
+ mitCount = live.total_mitigations || 0
}
// Calculate dynamic completeness percentage
|