2

Refine the dashboard and requests log UX

This commit is contained in:
2026-03-12 17:40:13 +01:00
parent 0a14dd1df9
commit 0dfa30973e
8 changed files with 423 additions and 180 deletions

View File

@@ -234,6 +234,7 @@ type EventListOptions struct {
ShowKnownBots bool
ShowAllowed bool
ReviewOnly bool
Offset int
}
type SourceOffset struct {
@@ -255,20 +256,32 @@ type IPDetails struct {
}
type Overview struct {
TotalEvents int64 `json:"total_events"`
TotalIPs int64 `json:"total_ips"`
BlockedIPs int64 `json:"blocked_ips"`
ReviewIPs int64 `json:"review_ips"`
AllowedIPs int64 `json:"allowed_ips"`
ObservedIPs int64 `json:"observed_ips"`
ActivitySince time.Time `json:"activity_since,omitempty"`
ActivityBuckets []ActivityBucket `json:"activity_buckets"`
Methods []MethodBreakdownRow `json:"methods"`
Bots []BotBreakdownRow `json:"bots"`
TopIPsByEvents []TopIPRow `json:"top_ips_by_events"`
TopIPsByTraffic []TopIPRow `json:"top_ips_by_traffic"`
TopSources []TopSourceRow `json:"top_sources"`
TopURLs []TopURLRow `json:"top_urls"`
RecentIPs []IPState `json:"recent_ips"`
RecentEvents []Event `json:"recent_events"`
TotalEvents int64 `json:"total_events"`
TotalIPs int64 `json:"total_ips"`
BlockedIPs int64 `json:"blocked_ips"`
ReviewIPs int64 `json:"review_ips"`
AllowedIPs int64 `json:"allowed_ips"`
ObservedIPs int64 `json:"observed_ips"`
ActivitySince time.Time `json:"activity_since,omitempty"`
ActivityBuckets []ActivityBucket `json:"activity_buckets"`
Methods []MethodBreakdownRow `json:"methods"`
Bots []BotBreakdownRow `json:"bots"`
TopIPsByEvents []TopIPRow `json:"top_ips_by_events"`
TopBotIPsByEvents []TopIPRow `json:"top_bot_ips_by_events"`
TopNonBotIPsByEvents []TopIPRow `json:"top_non_bot_ips_by_events"`
TopIPsByTraffic []TopIPRow `json:"top_ips_by_traffic"`
TopBotIPsByTraffic []TopIPRow `json:"top_bot_ips_by_traffic"`
TopNonBotIPsByTraffic []TopIPRow `json:"top_non_bot_ips_by_traffic"`
TopSources []TopSourceRow `json:"top_sources"`
TopURLs []TopURLRow `json:"top_urls"`
RecentIPs []IPState `json:"recent_ips"`
RecentEvents []Event `json:"recent_events"`
}
type EventPage struct {
Items []Event `json:"items"`
Page int `json:"page"`
Limit int `json:"limit"`
HasPrev bool `json:"has_prev"`
HasNext bool `json:"has_next"`
}