sufia-models/app/models/file_usage.rb in sufia-4.0.0.rc2 vs sufia-models/app/models/file_usage.rb in sufia-4.0.0
- old
+ new
@@ -26,15 +26,19 @@
]
end
private
+ # Sufia::Download is sent to Sufia::Analytics.profile as #sufia__download
+ # see Legato::ProfileMethods.method_name_from_klass
def download_statistics
- Sufia::Analytics.profile.download(sort: 'date').for_file(self.id)
+ Sufia::Analytics.profile.sufia__download(sort: 'date').for_file(self.id)
end
+ # Sufia::Pageview is sent to Sufia::Analytics.profile as #sufia__pageview
+ # see Legato::ProfileMethods.method_name_from_klass
def pageview_statistics
- Sufia::Analytics.profile.pageview(sort: 'date').for_path(self.path)
+ Sufia::Analytics.profile.sufia__pageview(sort: 'date').for_path(self.path)
end
def pageviews_to_flot values = Array.new
self.pageviews.map(&:marshal_dump).map do |result_hash|
values << [ (Date.parse(result_hash[:date]).to_time.to_i * 1000), result_hash[:pageviews].to_i ]