Skip to content

Commit

Permalink
Add a sample report
Browse files Browse the repository at this point in the history
  • Loading branch information
ShimShtein committed Sep 2, 2024
1 parent 11066e5 commit a13f9a1
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions app/views/unattended/report_templates/usage_report.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<%#
name: Usage report
snippet: false
model: ReportTemplate
-%>
<%- report_row(item: 'SmartProxy', data: load_smart_proxies(batch: nil).size) -%>
<%- report_row(item: 'SmartProxy_creation', data: load_smart_proxies(batch: nil).map{|p| p.created_at} ) -%>
<%- report_row(item: 'SmartProxy_feature_details', data: load_smart_proxies(batch: nil).map{|p| p.feature_details } ) -%>
<%- report_row(item: 'Experimental', data: global_setting(:lab_features) ) -%>
<%- report_row(item: 'Users', data: load_users(batch: nil).size) -%>
<%- report_row(item: 'Users', data: load_users(batch: nil, search: 'admin = false').size) -%>
<%- report_row(item: 'AnyResource', data: load_any_resource(resource: 'User', permission: 'view_users', batch: nil, search: 'admin = false').size) -%>
<%= report_render -%>

0 comments on commit a13f9a1

Please sign in to comment.