Skip to content

Commit

Permalink
try less?
Browse files Browse the repository at this point in the history
  • Loading branch information
parterburn committed Sep 3, 2024
1 parent 36bf9c6 commit 00fac73
Showing 1 changed file with 68 additions and 68 deletions.
136 changes: 68 additions & 68 deletions app/views/admin/stats.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -68,85 +68,85 @@
.col-md-2
%strong #{format_number(User.paypal_only.size)}
.col-md-12
%hr
-# .col-md-12
-# %hr
.col-md-12
.row
.col-md-3
%strong Referrals
.col-md-2
%strong #{format_number(User.referrals.size)}
- User.referrals.pluck(:referrer).uniq.each do |ref|
.row
.col-md-3
= ref
.col-md-2
#{format_number(User.referrals.where(referrer: ref).size)}
-# .col-md-12
-# .row
-# .col-md-3
-# %strong Referrals
-# .col-md-2
-# %strong #{format_number(User.referrals.size)}
-# - User.referrals.pluck(:referrer).uniq.each do |ref|
-# .row
-# .col-md-3
-# = ref
-# .col-md-2
-# #{format_number(User.referrals.where(referrer: ref).size)}
.col-md-12
%hr
-# .col-md-12
-# %hr
.col-md-3
%strong Total Emails Sent
.col-md-3
- emails_sent_total = User.sum(:emails_sent)
%strong= format_number(emails_sent_total)
.clearfix
.col-md-3
%strong Total Emails Received
.col-md-2
- emails_received_total = User.sum(:emails_received)
%strong= format_number(emails_received_total)
%span{style: "margin-left: 10px;"} #{number_to_percentage(emails_received_total.to_f/emails_sent_total.to_f*100, precision: 0)}
-# .col-md-3
-# %strong Total Emails Sent
-# .col-md-3
-# - emails_sent_total = User.sum(:emails_sent)
-# %strong= format_number(emails_sent_total)
-# .clearfix
-# .col-md-3
-# %strong Total Emails Received
-# .col-md-2
-# - emails_received_total = User.sum(:emails_received)
-# %strong= format_number(emails_received_total)
-# %span{style: "margin-left: 10px;"} #{number_to_percentage(emails_received_total.to_f/emails_sent_total.to_f*100, precision: 0)}
.col-md-12
%hr
-# .col-md-12
-# %hr
.col-md-12
%h3 Sign ups over the last 90 days
= line_chart @dashboard.users_by_week_since(90.days.ago), discrete: true
%br
-# .col-md-12
-# %h3 Sign ups over the last 90 days
-# = line_chart @dashboard.users_by_week_since(90.days.ago), discrete: true
-# %br
.col-md-12
%h3 Pro Upgrades over the last 90 days
= line_chart @dashboard.pro_users_by_week_since(90.days.ago), discrete: true
%br
-# .col-md-12
-# %h3 Pro Upgrades over the last 90 days
-# = line_chart @dashboard.pro_users_by_week_since(90.days.ago), discrete: true
-# %br
.col-md-12
%h3 Entries over the last 90 days
= line_chart @dashboard.entries_by_week_since(90.days.ago), discrete: true
%br
-# .col-md-12
-# %h3 Entries over the last 90 days
-# = line_chart @dashboard.entries_by_week_since(90.days.ago), discrete: true
-# %br
.col-md-12
%h3 Emails over the last 90 days
= line_chart @dashboard.emails_sent_by_month_since(90.days.ago), discrete: true
%br
-# .col-md-12
-# %h3 Emails over the last 90 days
-# = line_chart @dashboard.emails_sent_by_month_since(90.days.ago), discrete: true
-# %br
.col-md-12
%h3 Payments by month over the last year
= column_chart @dashboard.payments_by_month(1.year.ago), discrete: true
%br
-# .col-md-12
-# %h3 Payments by month over the last year
-# = column_chart @dashboard.payments_by_month(1.year.ago), discrete: true
-# %br
.col-md-12
- upgrades = @dashboard.upgraded_users_since(90.days.ago)
%h3 #{pluralize(format_number(upgrades.size), "Upgrade")} from the last 90 days
%p
%table.table.table-striped.table-hover
%tr
%th Email
%th Upgraded
%th Paid
%th Entries
%th Per day
- upgrades.each do |user|
%tr{:class => @dashboard.paid_status_for(user)}
%td= user.email
%td= l(user.payments.first.date.to_date, format: :month_day)
%td= user.payments.sum(:amount)
%td= user.entries.size
%td= @dashboard.entries_per_day_for(user)
-# .col-md-12
-# - upgrades = @dashboard.upgraded_users_since(90.days.ago)
-# %h3 #{pluralize(format_number(upgrades.size), "Upgrade")} from the last 90 days
-# %p
-# %table.table.table-striped.table-hover
-# %tr
-# %th Email
-# %th Upgraded
-# %th Paid
-# %th Entries
-# %th Per day
-# - upgrades.each do |user|
-# %tr{:class => @dashboard.paid_status_for(user)}
-# %td= user.email
-# %td= l(user.payments.first.date.to_date, format: :month_day)
-# %td= user.payments.sum(:amount)
-# %td= user.entries.size
-# %td= @dashboard.entries_per_day_for(user)
-# .col-md-12
-# %hr
Expand Down

0 comments on commit 00fac73

Please sign in to comment.