From 3c7e2f7fa1242fd92c18cedf24218680f17a30de Mon Sep 17 00:00:00 2001 From: andersonid Date: Mon, 6 Oct 2025 15:24:00 -0300 Subject: [PATCH] fix: correct namespaces_in_overcommit calculation for string list --- app/api/routes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api/routes.py b/app/api/routes.py index 059d848..0e2acb9 100644 --- a/app/api/routes.py +++ b/app/api/routes.py @@ -150,8 +150,8 @@ async def get_cluster_status( logger.info(f"Overcommit Debug - CPU Capacity: {cpu_capacity}, CPU Requests: {cpu_requests}, CPU Overcommit: {cpu_overcommit_percent}%") logger.info(f"Overcommit Debug - Memory Capacity: {memory_capacity}, Memory Requests: {memory_requests}, Memory Overcommit: {memory_overcommit_percent}%") - # Count namespaces in overcommit (simplified - any namespace with requests > 0) - namespaces_in_overcommit = len([ns for ns in namespaces_list if ns['total_validations'] > 0]) + # Count namespaces in overcommit (simplified - count all namespaces) + namespaces_in_overcommit = len(namespaces_list) # Calculate resource utilization (usage vs requests) from Prometheus data resource_utilization = 0