Skip to content

Fix/better dashboard panels#164

Merged
BlessedRebuS merged 4 commits intodevfrom
fix/better-dashboard-panels
Apr 2, 2026
Merged

Fix/better dashboard panels#164
BlessedRebuS merged 4 commits intodevfrom
fix/better-dashboard-panels

Conversation

@Lore09
Copy link
Copy Markdown
Collaborator

@Lore09 Lore09 commented Apr 2, 2026

This pull request introduces a more flexible and detailed time granularity for attack trends, improves the dashboard's usability with new time span controls, and optimizes the map's IP loading logic for performance and scalability. The most important changes are grouped below:

Attack Trends API and Data Granularity Improvements:

  • The get_attack_types_daily function in src/database.py now dynamically uses hourly granularity for periods of 7 days or less, and daily granularity for longer spans. This provides more detailed trend data for shorter timeframes, with backend logic to handle both SQLite and PostgreSQL date formatting. [1] [2]

Dashboard UI Enhancements:

  • The dashboard's attack trends section (index.html) now includes a time span selector (1D, 7D, 30D), allowing users to quickly switch between different periods for trend analysis.
  • The trends chart JavaScript (charts.js) is updated to support dynamic time spans and hourly/daily granularity, including improved label formatting for hourly data and a new setTrendsSpan function to handle user selection. [1] [2] [3]

Map Loading Performance:

  • The IP map loading logic (map.js) is refactored to always use paged, batched fetching, regardless of the limit, with a configurable page size and a hard cap based on the user's selection. This improves performance and scalability when displaying large numbers of IPs. [1] [2]

@Lore09 Lore09 requested a review from BlessedRebuS April 2, 2026 15:33
@Lore09 Lore09 self-assigned this Apr 2, 2026
@Lore09 Lore09 added the enhancement New feature or request label Apr 2, 2026
@BlessedRebuS BlessedRebuS merged commit c7bb51f into dev Apr 2, 2026
3 checks passed
@BlessedRebuS BlessedRebuS deleted the fix/better-dashboard-panels branch April 2, 2026 15:36
@Lore09 Lore09 restored the fix/better-dashboard-panels branch April 2, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants