From 1286eff99693ed4ce22c366d826266d6c756a259 Mon Sep 17 00:00:00 2001 From: songtianlun Date: Fri, 7 Feb 2025 17:42:17 +0800 Subject: [PATCH] fix: update view count display in Ahoy Dashboard MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Change column header from '访问(日/周/年)' to '访问(DWMY)' to reflect updated metrics. - Adjust metrics to include monthly view count alongside daily, weekly, and yearly counts. This modification improves clarity by explicitly indicating the metrics being displayed in the dashboard, thereby aiding users in understanding the data better. --- app/admin/ahoy_dashboard.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/admin/ahoy_dashboard.rb b/app/admin/ahoy_dashboard.rb index f843088..25beffb 100644 --- a/app/admin/ahoy_dashboard.rb +++ b/app/admin/ahoy_dashboard.rb @@ -44,7 +44,7 @@ ActiveAdmin.register_page "Ahoy Dashboard" do table_for City.least_popular_active do column("ID") { |city| city.id } column("城市") { |city| link_to(city.name, admin_city_path(city)) } - column("访问(日/周/年)") { |city| "#{city.view_count(:day)}/#{city.view_count(:week)}/#{city.view_count(:year)}" } + column("访问(DWMY)") { |city| "#{city.view_count(:day)}/#{city.view_count(:week)}/#{city.view_count(:month)}/#{city.view_count(:year)}" } column("状态") { |city| status_tag(city.active? ? "活跃" : "停用") } column("所属区域") { |city| city.country.name+"/"+city.country.region.name } column("图像个数") { |city| city.weather_arts.count } @@ -66,7 +66,7 @@ ActiveAdmin.register_page "Ahoy Dashboard" do table_for City.most_popular_inactive do column("ID") { |city| city.id } column("城市") { |city| link_to(city.name, admin_city_path(city)) } - column("访问(日/周/年)") { |city| "#{city.view_count(:day)}/#{city.view_count(:week)}/#{city.view_count(:year)}" } + column("访问(DWMY)") { |city| "#{city.view_count(:day)}/#{city.view_count(:week)}/#{city.view_count(:month)}/#{city.view_count(:year)}" } column("状态") { |city| status_tag(city.active? ? "活跃" : "停用") } column("所属区域") { |city| city.country.name+"/"+city.country.region.name } column("图像个数") { |city| city.weather_arts.count }