mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
fix stats (i think)
This commit is contained in:
parent
4da6fe9da4
commit
963bb29d9d
2 changed files with 1 additions and 18 deletions
|
@ -23,7 +23,7 @@ get '/stats/?' do
|
||||||
|
|
||||||
now = Date.today
|
now = Date.today
|
||||||
|
|
||||||
while runner.to_time < now.to_time
|
while Date.new(runner.year, runner.month, 1) <= Date.new(now.year, now.month, 1)
|
||||||
monthly_stats.push(
|
monthly_stats.push(
|
||||||
date: runner,
|
date: runner,
|
||||||
sites_created: Site.where(created_at: runner..runner.next_month).count,
|
sites_created: Site.where(created_at: runner..runner.next_month).count,
|
||||||
|
|
|
@ -75,23 +75,6 @@
|
||||||
Cancelled: <strong><%= @stats[:cancelled_subscriptions] %></strong>
|
Cancelled: <strong><%= @stats[:cancelled_subscriptions] %></strong>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<!--
|
|
||||||
<table class="table">
|
|
||||||
<tr>
|
|
||||||
<th>Status</th>
|
|
||||||
<th>Amount</th>
|
|
||||||
<th>Date Subscribed</th>
|
|
||||||
</tr>
|
|
||||||
<% @stats[:subscriptions].each do |sub| %>
|
|
||||||
<tr>
|
|
||||||
<td><%= sub[:status] %></td>
|
|
||||||
<td><%= sub[:amount].nil? ? '$0.00' : format("$%.2f", sub[:amount]) %></td>
|
|
||||||
<td><%= sub[:created_at].strftime('%Y %B') %></td>
|
|
||||||
</tr>
|
|
||||||
<% end %>
|
|
||||||
</table>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<h2>Burn Rate</h2>
|
<h2>Burn Rate</h2>
|
||||||
<p>
|
<p>
|
||||||
Approximate server expenses (burn rate): <strong><%= format("$%.2f", @stats[:expenses]) %>/mo</strong>
|
Approximate server expenses (burn rate): <strong><%= format("$%.2f", @stats[:expenses]) %>/mo</strong>
|
||||||
|
|
Loading…
Add table
Reference in a new issue