Skip to content

feat(reports): modernize SOC reporting and enable guest access - #54

Merged
Mitsushima1 merged 5 commits into
mainfrom
feature/demo-report
Sep 23, 2026
Merged

Mitsushima1 merged 5 commits into
mainfrom
feature/demo-report

Conversation

@Mitsushima1

@Mitsushima1 Mitsushima1 commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This update modernizes the SOC report generation pipeline, fixes inconsistent time-based metrics, improves chart and PDF rendering, and enables report generation for guest users.

Key Changes

Backend

  • Added robust timestamp selection across timestamp, event_time, and created_at.
  • Anchored report windows to the latest available telemetry timestamp.
  • Guaranteed nested alert counts: 24h ≤ 7d ≤ 30d.
  • Added headless Matplotlib rendering with the Agg backend.
  • Replaced outdated donut charts with clean bar and line charts.
  • Added Category Breakdown, Severity Distribution, Alert Trend, and Score Trend charts.
  • Added Base64 PNG fallback graphics for empty datasets and rendering failures.
  • Added the Matplotlib production dependency.
  • Opened the report-generation endpoint to guests.
  • Disabled authentication processing for the public report endpoint so expired guest tokens cannot cause 401 responses.

Frontend

  • Added a dedicated public API client for report generation.
  • Implemented responsive light and dark report layouts.
  • Added the SecLink logo and Argus report branding.
  • Improved typography, spacing, tables, and chart sizing.
  • Added safe Base64 image rendering through React Markdown.
  • Added high-contrast white PDF export styling.
  • Added automatic report regeneration when the selected time range changes.
  • Improved request race handling and image readiness before PDF export.

@@ -1,12 +1,56 @@
import React from "react";
import { Button, Card, Input, Popconfirm, Select, Space, Table, Tag, Typography } from "antd";
import { Button, Card, Dropdown, Input, Popconfirm, Select, Space, Table, Tag, Typography } from "antd";
details={"service": extract_service_name(path), "path": path, "method": request.method, "status_code": getattr(response, "status_code", None), "params": summary},
request=request,
)
except Exception:

@alexchen16 alexchen16 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Mitsushima1
Mitsushima1 merged commit b3bdfa3 into main Sep 23, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants