You've already forked caddy-opnsense-blocker
Add dashboard activity leaderboards
This commit is contained in:
@@ -97,10 +97,10 @@ sources:
|
||||
appendLine(t, giteaLogPath, caddyJSONLine("203.0.113.11", "198.51.100.11", "git.example.test", "POST", "/user/login", 401, "curl/8.0", time.Now().UTC()))
|
||||
appendLine(t, giteaLogPath, caddyJSONLine("203.0.113.12", "198.51.100.12", "git.example.test", "GET", "/install.php", 404, "curl/8.0", time.Now().UTC()))
|
||||
|
||||
waitFor(t, 3*time.Second, func() bool {
|
||||
overview, err := database.GetOverview(context.Background(), 10)
|
||||
return err == nil && overview.TotalEvents == 3
|
||||
})
|
||||
waitFor(t, 3*time.Second, func() bool {
|
||||
overview, err := database.GetOverview(context.Background(), time.Now().UTC().Add(-time.Hour), 10)
|
||||
return err == nil && overview.TotalEvents == 3
|
||||
})
|
||||
|
||||
blockedState, found, err := database.GetIPState(context.Background(), "203.0.113.10")
|
||||
if err != nil || !found {
|
||||
|
||||
Reference in New Issue
Block a user