From 4eb9b30e367782bae7714dae42da1a880a4e10af Mon Sep 17 00:00:00 2001 From: andersonid Date: Thu, 2 Oct 2025 08:23:33 -0300 Subject: [PATCH] Fix summary data structure for smart recommendations --- app/static/index.html | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/app/static/index.html b/app/static/index.html index 239a0ce..5177080 100644 --- a/app/static/index.html +++ b/app/static/index.html @@ -1478,7 +1478,21 @@ } const recommendations = data.recommendations; - const summary = data.summary; + const summary = { + total_recommendations: data.total || recommendations.length, + by_priority: { + critical: recommendations.filter(r => r.priority === 'critical').length, + high: recommendations.filter(r => r.priority === 'high').length, + medium: recommendations.filter(r => r.priority === 'medium').length, + low: recommendations.filter(r => r.priority === 'low').length + }, + by_type: { + resource_config: recommendations.filter(r => r.recommendation_type === 'resource_config').length, + vpa_activation: recommendations.filter(r => r.recommendation_type === 'vpa_activation').length, + ratio_adjustment: recommendations.filter(r => r.recommendation_type === 'ratio_adjustment').length + }, + namespaces_affected: new Set(recommendations.map(r => r.namespace)).size + }; let html = `