You've already forked caddy-opnsense-blocker
Add dashboard activity leaderboards
This commit is contained in:
@@ -178,6 +178,29 @@ type RecentIPRow struct {
|
||||
Actions ActionAvailability `json:"actions"`
|
||||
}
|
||||
|
||||
type TopIPRow struct {
|
||||
IP string `json:"ip"`
|
||||
Events int64 `json:"events"`
|
||||
TrafficBytes int64 `json:"traffic_bytes"`
|
||||
LastSeenAt time.Time `json:"last_seen_at"`
|
||||
Bot *BotMatch `json:"bot,omitempty"`
|
||||
}
|
||||
|
||||
type TopSourceRow struct {
|
||||
SourceName string `json:"source_name"`
|
||||
Events int64 `json:"events"`
|
||||
TrafficBytes int64 `json:"traffic_bytes"`
|
||||
LastSeenAt time.Time `json:"last_seen_at"`
|
||||
}
|
||||
|
||||
type TopURLRow struct {
|
||||
Host string `json:"host"`
|
||||
URI string `json:"uri"`
|
||||
Events int64 `json:"events"`
|
||||
TrafficBytes int64 `json:"traffic_bytes"`
|
||||
LastSeenAt time.Time `json:"last_seen_at"`
|
||||
}
|
||||
|
||||
type SourceOffset struct {
|
||||
SourceName string
|
||||
Path string
|
||||
@@ -197,12 +220,17 @@ 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"`
|
||||
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"`
|
||||
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"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user