Merged
Conversation
BlessedRebuS
approved these changes
Apr 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
get_attack_types_dailyfunction insrc/database.pynow 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:
index.html) now includes a time span selector (1D, 7D, 30D), allowing users to quickly switch between different periods for trend analysis.charts.js) is updated to support dynamic time spans and hourly/daily granularity, including improved label formatting for hourly data and a newsetTrendsSpanfunction to handle user selection. [1] [2] [3]Map Loading Performance:
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]