Skip to content

Connect dashboard visualizations to live API data - #48

Merged
egrexsec merged 2 commits into
mainfrom
feature/live-dashboard-data
May 29, 2026
Merged

egrexsec merged 2 commits into
mainfrom
feature/live-dashboard-data

Conversation

@egrexsec

Copy link
Copy Markdown
Owner

Summary

Replaces static dashboard analytics with live FastAPI-backed data.

Changes

  • Added /dashboard API endpoint
  • Connected frontend charts to live API data
  • Added live executive summary metrics
  • Added graceful API fallback behavior
  • Added live analytics visualization workflows

Example

docker compose up --build

@egrexsec
egrexsec merged commit 3cbbddd into main May 29, 2026
1 check failed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0b33ddf385

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread web/app/page.tsx
useEffect(() => {
async function fetchDashboard() {
try {
const response = await fetch('http://localhost:8000/dashboard')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Allow browser access to the API endpoint

When the documented dashboard is opened at http://localhost:3000, this request crosses origins to port 8000. I searched the API code for CORSMiddleware/CORS headers and found none, so browsers will block the /dashboard response and the catch path leaves all live cards/charts empty. This makes the new live dashboard fail in the local Docker/Next.js workflow unless the API enables CORS or the frontend proxies through the same origin.

Useful? React with 👍 / 👎.

Comment thread detlab/api.py
Comment on lines +61 to +63
"behavioral_sequences": len(
[d for d in detections if hasattr(d, "sequence")]
),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Count actual sequence data for behavioral detections

For detections loaded from YAML, load_detection_file() validates into Detection, but that model does not define a sequence field, so Pydantic drops the documented top-level sequence block and hasattr(d, "sequence") is false for every loaded detection. As a result the new behavioral_sequences metric will always report 0 even when the source files contain behavioral sequences; if the field later becomes optional, this check would also count None values unless it checks the actual value.

Useful? React with 👍 / 👎.

@egrexsec
egrexsec deleted the feature/live-dashboard-data branch June 16, 2026 12:35
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.

1 participant