FEATURE: page view stats for mobile view

This commit is contained in:
Neil Lalonde
2015-07-03 17:02:57 -04:00
parent db75774440
commit 86cd1a19cc
5 changed files with 25 additions and 5 deletions

View File

@@ -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

View File

@@ -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])