fix(dashboard): resolve CSV/XLSX download failure with filters (#9946)

Co-authored-by: Daniel Barranquero <danielbo2001@gmail.com>
This commit is contained in:
Pawan Gambhir
2026-02-03 23:17:42 +05:30
committed by GitHub
parent 547c53e07c
commit 9fe71d1046
2 changed files with 21 additions and 11 deletions

View File

@@ -1119,6 +1119,10 @@ def filter_data(
figure=fig,
config={"displayModeBar": False},
)
pie_3 = dcc.Graph(
figure=fig,
config={"displayModeBar": False},
)
table = dcc.Graph(figure=fig, config={"displayModeBar": False})
else:
@@ -1175,22 +1179,25 @@ def filter_data(
style={"height": "300px", "overflow-y": "auto"},
)
color_bars = [
color_mapping_severity[severity]
for severity in df1["SEVERITY"].value_counts().index
]
figure_bars = go.Figure(
data=[
# Prepare bar chart data only if df1 has FAIL findings
if len(df1) > 0:
color_bars = [
color_mapping_severity[severity]
for severity in df1["SEVERITY"].value_counts().index
]
bar_data = [
go.Bar(
x=df1["SEVERITY"]
.value_counts()
.index, # assign x as the dataframe column 'x'
x=df1["SEVERITY"].value_counts().index,
y=df1["SEVERITY"].value_counts().values,
marker=dict(color=color_bars),
textposition="auto",
)
],
]
else:
bar_data = []
figure_bars = go.Figure(
data=bar_data,
layout=go.Layout(
paper_bgcolor="#FFF",
font=dict(size=12, color="#292524"),
@@ -1560,6 +1567,8 @@ def filter_data(
severity_values,
severity_filter_options,
service_values,
provider_values,
provider_filter_options,
service_filter_options,
table_row_values,
table_row_options,

View File

@@ -36,6 +36,7 @@ All notable changes to the **Prowler SDK** are documented in this file.
- Duplicated findings in `entra_user_with_vm_access_has_mfa` check when user has multiple VM access roles [(#9914)](https://github.com/prowler-cloud/prowler/pull/9914)
- Jira integration failing with `INVALID_INPUT` error when sending findings with long resource UIDs exceeding 255-character summary limit [(#9926)](https://github.com/prowler-cloud/prowler/pull/9926)
- CSV/XLSX download failure in dashboard [(#9946)](https://github.com/prowler-cloud/prowler/pull/9946)
---