Add 'tags' to event model. Add a dataimport system - currently for MaxMind zip files
This commit is contained in:
@@ -9,7 +9,8 @@ class EventsController < ApplicationController
|
||||
# Apply filters
|
||||
@events = @events.by_ip(params[:ip]) if params[:ip].present?
|
||||
@events = @events.by_waf_action(params[:waf_action]) if params[:waf_action].present?
|
||||
@events = @events.where(country_code: params[:country]) if params[:country].present?
|
||||
@events = @events.joins("JOIN network_ranges ON events.ip_address <<= network_ranges.network")
|
||||
.where("network_ranges.country = ?", params[:country]) if params[:country].present?
|
||||
|
||||
# Network-based filters
|
||||
@events = @events.by_company(params[:company]) if params[:company].present?
|
||||
|
||||
Reference in New Issue
Block a user