Updated stats and privacy

This commit is contained in:
Will Bradley 2013-09-28 18:55:22 -07:00
parent 2c204a8f9d
commit 9e08a0d036
4 changed files with 48 additions and 41 deletions

View File

@ -30,52 +30,51 @@ GEM
multi_json (~> 1.0) multi_json (~> 1.0)
arel (3.0.2) arel (3.0.2)
bcrypt-ruby (3.0.1) bcrypt-ruby (3.0.1)
builder (3.0.0) builder (3.0.4)
cancan (1.6.8) cancan (1.6.10)
coffee-rails (3.2.2) coffee-rails (3.2.2)
coffee-script (>= 2.2.0) coffee-script (>= 2.2.0)
railties (~> 3.2.0) railties (~> 3.2.0)
coffee-script (2.2.0) coffee-script (2.2.0)
coffee-script-source coffee-script-source
execjs execjs
coffee-script-source (1.3.3) coffee-script-source (1.6.3)
daemon_controller (1.1.5) daemon_controller (1.1.5)
devise (2.1.1) devise (2.2.7)
bcrypt-ruby (~> 3.0) bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.1) orm_adapter (~> 0.1)
railties (~> 3.1) railties (~> 3.1)
warden (~> 1.2.1) warden (~> 1.2.1)
erubis (2.7.0) erubis (2.7.0)
execjs (1.4.0) execjs (2.0.2)
multi_json (~> 1.0)
gravtastic (3.2.6) gravtastic (3.2.6)
hike (1.2.1) hike (1.2.3)
i18n (0.6.0) i18n (0.6.5)
journey (1.0.4) journey (1.0.4)
jquery-rails (2.1.1) jquery-rails (3.0.4)
railties (>= 3.1.0, < 5.0) railties (>= 3.0, < 5.0)
thor (~> 0.14) thor (>= 0.14, < 2.0)
json (1.7.5) json (1.8.0)
libv8 (3.3.10.4) libv8 (3.16.14.3)
mail (2.4.4) mail (2.4.4)
i18n (>= 0.4.0) i18n (>= 0.4.0)
mime-types (~> 1.16) mime-types (~> 1.16)
treetop (~> 1.4.8) treetop (~> 1.4.8)
mime-types (1.19) mime-types (1.25)
multi_json (1.3.6) multi_json (1.8.0)
orm_adapter (0.1.0) orm_adapter (0.4.0)
passenger (4.0.14) passenger (4.0.19)
daemon_controller (>= 1.1.0) daemon_controller (>= 1.1.0)
rack rack
rake (>= 0.8.1) rake (>= 0.8.1)
pg (0.17.0) pg (0.17.0)
polyglot (0.3.3) polyglot (0.3.3)
rack (1.4.1) rack (1.4.5)
rack-cache (1.2) rack-cache (1.2)
rack (>= 0.4) rack (>= 0.4)
rack-ssl (1.3.2) rack-ssl (1.3.3)
rack rack
rack-test (0.6.1) rack-test (0.6.2)
rack (>= 1.0) rack (>= 1.0)
rails (3.2.3) rails (3.2.3)
actionmailer (= 3.2.3) actionmailer (= 3.2.3)
@ -94,13 +93,14 @@ GEM
rake (>= 0.8.7) rake (>= 0.8.7)
rdoc (~> 3.4) rdoc (~> 3.4)
thor (~> 0.14.6) thor (~> 0.14.6)
rake (0.9.2.2) rake (10.1.0)
rdoc (3.12) rdoc (3.12.2)
json (~> 1.4) json (~> 1.4)
ref (1.0.5)
rest-client (1.6.7) rest-client (1.6.7)
mime-types (>= 1.16) mime-types (>= 1.16)
sass (3.2.1) sass (3.2.11)
sass-rails (3.2.5) sass-rails (3.2.6)
railties (~> 3.2.0) railties (~> 3.2.0)
sass (>= 3.1.10) sass (>= 3.1.10)
tilt (~> 1.3) tilt (~> 1.3)
@ -111,24 +111,25 @@ GEM
hike (~> 1.2) hike (~> 1.2)
rack (~> 1.0) rack (~> 1.0)
tilt (~> 1.1, != 1.3.0) tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.6) sqlite3 (1.3.8)
taps (0.3.24) taps (0.3.24)
rack (>= 1.0.1) rack (>= 1.0.1)
rest-client (>= 1.4.0, < 1.7.0) rest-client (>= 1.4.0, < 1.7.0)
sequel (~> 3.20.0) sequel (~> 3.20.0)
sinatra (~> 1.0.0) sinatra (~> 1.0.0)
therubyracer (0.10.1) therubyracer (0.12.0)
libv8 (~> 3.3.10) libv8 (~> 3.16.14.0)
ref
thor (0.14.6) thor (0.14.6)
tilt (1.3.3) tilt (1.4.1)
treetop (1.4.10) treetop (1.4.15)
polyglot polyglot
polyglot (>= 0.3.1) polyglot (>= 0.3.1)
tzinfo (0.3.33) tzinfo (0.3.37)
uglifier (1.2.7) uglifier (2.2.1)
execjs (>= 0.3.0) execjs (>= 0.3.0)
multi_json (~> 1.3) multi_json (~> 1.0, >= 1.0.2)
warden (1.2.1) warden (1.2.3)
rack (>= 1.0) rack (>= 1.0)
PLATFORMS PLATFORMS

View File

@ -36,7 +36,7 @@
<dt># of Door Accesses Denied:</dt> <dt># of Door Accesses Denied:</dt>
<dd><%= @num_door_denieds %> (<%= @recent_door_denieds %> in the last 7 days)</dd> <dd><%= @num_door_denieds %> (<%= @recent_door_denieds %> in the last 7 days)</dd>
<dt># of Logins:</dt> <dt># of Logins:</dt>
<dd><%= @num_logins %> (<%= @recent_logins %> users today)</dd> <dd><%= @num_logins %> (<%= @recent_logins %> users last 7 days)</dd>
<dt># of Computers in this DB:</dt> <dt># of Computers in this DB:</dt>
<dd><%= @num_macs %> (<%= @recent_macs %> seen today)</dd> <dd><%= @num_macs %> (<%= @recent_macs %> seen today)</dd>
</dl> </dl>

View File

@ -1,3 +1,4 @@
<% if can? :read_details, Mac %>
<% if @mac_time_start_date.present? %> <% if @mac_time_start_date.present? %>
<b>Most Active Machine Last <%= distance_of_time_in_words DateTime.now, @mac_time_start_date %>:</b> <b>Most Active Machine Last <%= distance_of_time_in_words DateTime.now, @mac_time_start_date %>:</b>
<span title="<%= @most_active_mac.mac %><%= " - "+@most_active_mac.ip.to_s if can? :read_details, @most_active_mac %>"> <span title="<%= @most_active_mac.mac %><%= " - "+@most_active_mac.ip.to_s if can? :read_details, @most_active_mac %>">
@ -13,6 +14,7 @@
- <%= (@runner_up.last[:time] / 1.hour).round %> hrs - <%= (@runner_up.last[:time] / 1.hour).round %> hrs
</span> </span>
<% end %> <% end %>
<% end %>
<h2>What machines are on our network?</h2> <h2>What machines are on our network?</h2>
<%= link_to "New MAC registration", new_mac_path if can? :create, Mac %> <%= link_to "New MAC registration", new_mac_path if can? :create, Mac %>
@ -31,6 +33,10 @@ Rails.logger.info mac.inspect %>
<% end %> <% end %>
</ul> </ul>
<% unless can? :read_details, Mac %>
<p>To see more or register your own, login!</p>
<% end %>
<% if can? :read_details, Mac %> <% if can? :read_details, Mac %>
<ul class="mac_list hidden"> <ul class="mac_list hidden">
<% @hidden_macs.each do |mac| %> <% @hidden_macs.each do |mac| %>

View File

@ -138,26 +138,26 @@ ActiveRecord::Schema.define(:version => 20130928112252) do
create_table "users", :force => true do |t| create_table "users", :force => true do |t|
t.string "name" t.string "name"
t.datetime "created_at", :null => false t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false t.datetime "updated_at", :null => false
t.string "email", :default => "", :null => false t.string "email", :default => "", :null => false
t.string "encrypted_password", :default => "", :null => false t.string "encrypted_password", :default => "", :null => false
t.string "reset_password_token" t.string "reset_password_token"
t.datetime "reset_password_sent_at" t.datetime "reset_password_sent_at"
t.datetime "remember_created_at" t.datetime "remember_created_at"
t.integer "sign_in_count", :default => 0 t.integer "sign_in_count", :default => 0
t.datetime "current_sign_in_at" t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at" t.datetime "last_sign_in_at"
t.string "current_sign_in_ip" t.string "current_sign_in_ip"
t.string "last_sign_in_ip" t.string "last_sign_in_ip"
t.boolean "admin" t.boolean "admin"
t.integer "member", :limit => 255 t.integer "member"
t.datetime "waiver" t.datetime "waiver"
t.datetime "orientation" t.datetime "orientation"
t.string "emergency_name" t.string "emergency_name"
t.string "emergency_phone" t.string "emergency_phone"
t.string "emergency_email" t.string "emergency_email"
t.integer "member_level", :limit => 255 t.integer "member_level"
t.string "payment_method" t.string "payment_method"
t.string "phone" t.string "phone"
t.text "current_skills" t.text "current_skills"