updates to stats

This commit is contained in:
Kyle Drake 2015-06-06 07:13:04 -07:00
parent 453e762f8c
commit 6452442f42
2 changed files with 9 additions and 10 deletions

View file

@ -47,6 +47,8 @@ get '/site/:username/stats' do
@site = Site[username: params[:username]]
not_found if @site.nil?
@title = "Site stats for #{@site.host}"
@stats = {}
%i{referrers locations paths}.each do |stat|

View file

@ -1,7 +1,9 @@
<div class="header-Outro with-columns">
<div class="row content">
<div class="col col-66">
<h3>Your Stats</h3>
<div class="col col-100">
<h3>Site Statistics</h3>
<div class="feed-filter">
<% if !@events.empty? && (site.followings_dataset.count > 0) %>
<a href="/" <% if params[:activity].nil? %>class="selected"<% end %>>All</a>
@ -9,10 +11,6 @@
<% end %>
</div>
</div>
<div class="col col-32">
<h3>Your Site</h3>
<a href="/dashboard" class="btn-Action edit"><i class="fa fa-edit" title="Edit"></i>Edit Site</a>
</div>
</div>
</div>
@ -23,7 +21,6 @@
<div class="row">
<div class="col col-100 globe">
<h2>Most popular locations (this week)</h2>
<div id="earth_div"></div>
</div>
<!--
@ -136,7 +133,7 @@
-->
</div>
<h2>Total Visitors (last 7 days)</h2>
<h2>Total Visitors <small>last 7 days</small></h2>
<% if current_site && current_site.id == @site.id %>
@ -156,7 +153,7 @@
<div class="row">
<div class="col col-50">
<h2>Top Paths</h2>
<h2>Top Paths <small>last 7 days</small></h2>
<table class="table table-striped">
<thead>
<tr>
@ -175,7 +172,7 @@
</table>
</div>
<div class="col col-50">
<h2>Top Locations</h2>
<h2>Top Locations <small>last 7 days</small></h2>
<table class="table table-striped">
<thead>
<tr>