dig deeper in the json tree. Fixes #360

This commit is contained in:
Cooper Quintin
2025-06-04 09:59:27 -07:00
committed by Cooper Quintin
parent d7fb8b9c85
commit 4df317b028
2 changed files with 4 additions and 4 deletions

View File

@@ -72,7 +72,7 @@ export function parse_finished_report(report_json: NewlineDeliminatedJson): Anal
const events: Event[] = analysis_json.events.map((event_json: any): Event | null => {
if (event_json === null) {
return null;
} else if (event_json.event_type === "Informational") {
} else if (event_json.event_type.type === "Informational") {
num_informational_logs += 1;
return {
type: EventType.Informational,
@@ -82,8 +82,8 @@ export function parse_finished_report(report_json: NewlineDeliminatedJson): Anal
num_warnings += 1;
return {
type: EventType.Warning,
severity: event_json.severity === "High" ? Severity.High :
event_json.severity === "Medium" ? Severity.Medium : Severity.Low,
severity: event_json.event_type.severity === "High" ? Severity.High :
event_json.event_type.severity === "Medium" ? Severity.Medium : Severity.Low,
message: event_json.message,
};
}

View File

@@ -22,7 +22,7 @@
Storage
</th>
<td class={table_cell_classes}>
{stats.disk_stats.used_percent} used ({stats.disk_stats.used_size} / {stats.disk_stats.available_size})
{stats.disk_stats.used_percent} used ({stats.disk_stats.used_size} used / {stats.disk_stats.available_size} available)
</td>
</tr>
<tr class="border-b">