mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: page view stats for mobile view
This commit is contained in:
@@ -7,7 +7,9 @@ class ApplicationRequest < ActiveRecord::Base
|
||||
http_5xx
|
||||
page_view_crawler
|
||||
page_view_logged_in
|
||||
page_view_anon)
|
||||
page_view_anon
|
||||
page_view_logged_in_mobile
|
||||
page_view_anon_mobile)
|
||||
|
||||
cattr_accessor :autoflush, :autoflush_seconds, :last_flush
|
||||
# auto flush if backlog is larger than this
|
||||
|
||||
@@ -57,7 +57,7 @@ class Report
|
||||
data =
|
||||
if filter == :page_view_total
|
||||
ApplicationRequest.where(req_type: [
|
||||
ApplicationRequest.req_types.map{|k,v| v if k =~ /page_view/}.compact
|
||||
ApplicationRequest.req_types.reject{|k,v| k =~ /mobile/}.map{|k,v| v if k =~ /page_view/}.compact
|
||||
])
|
||||
else
|
||||
ApplicationRequest.where(req_type: ApplicationRequest.req_types[filter])
|
||||
|
||||
Reference in New Issue
Block a user