2025-01-27 00:43:18 +08:00
|
|
|
ActiveAdmin.register Ahoy::Event do
|
2025-01-28 01:03:06 +08:00
|
|
|
menu label: "事件统计", parent: "数据统计"
|
2025-01-27 00:43:18 +08:00
|
|
|
# See permitted parameters documentation:
|
|
|
|
# https://github.com/activeadmin/activeadmin/blob/master/docs/2-resource-customization.md#setting-up-strong-parameters
|
|
|
|
#
|
|
|
|
# Uncomment all parameters which should be permitted for assignment
|
|
|
|
#
|
|
|
|
# permit_params :visit_id, :user_id, :name, :properties, :time
|
|
|
|
#
|
|
|
|
# or
|
|
|
|
#
|
|
|
|
# permit_params do
|
|
|
|
# permitted = [:visit_id, :user_id, :name, :properties, :time]
|
|
|
|
# permitted << :other if params[:action] == 'create' && current_user.admin?
|
|
|
|
# permitted
|
|
|
|
# end
|
2025-01-28 01:03:06 +08:00
|
|
|
# menu priority: 101, label: "事件统计"
|
2025-01-27 00:43:18 +08:00
|
|
|
|
|
|
|
actions :index
|
|
|
|
|
|
|
|
index do
|
|
|
|
column :id
|
|
|
|
column :name
|
|
|
|
column :time
|
|
|
|
column :properties
|
refactor: update admin columns for Ahoy models
- Removed user_id, city, country, and region columns
- Added visit_id, visit_token, referrer, landing_page,
browser, os, and device_type columns
This refactor improves the administrative interface for Ahoy
models by updating the displayed attributes to better suit
the current application requirements. It also aligns the
displayed data with the available attributes in the Ahoy
tracking system, making it easier for administrators to
review relevant information.
2025-02-05 16:57:37 +08:00
|
|
|
# column :user_id
|
|
|
|
column :visit_id
|
2025-01-27 00:43:18 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
filter :name
|
|
|
|
filter :time
|
|
|
|
filter :properties
|
|
|
|
end
|