From 1345e840f5e95ef5d45517ca192b3a0062baa2de Mon Sep 17 00:00:00 2001 From: oleg_wyndrick Date: Thu, 7 Nov 2024 13:31:01 +0200 Subject: [PATCH] - small fix for vulns count view Signed-off-by: oleg_wyndrick --- report_shots/shots.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/report_shots/shots.js b/report_shots/shots.js index c99ba77111..b9e0a7dd70 100644 --- a/report_shots/shots.js +++ b/report_shots/shots.js @@ -532,7 +532,7 @@ async function generateContextualSeverityChart(vulnsOriginalSummary) { * @param {number} total - Total value for filling the chart to 100%. */ function drawVulnsChart(draw, groupId, maxWidth, vulnsCount, total) { - const severities = ['critical', 'high', 'medium', 'low', 'unknown']; + const severities = ['critical', 'high', 'medium', 'low', 'unknown'].filter(l => vulnsCount[l] > 0); const minWidth = 5; const spacing = 2;