Adjusting wording and stat counts
This commit is contained in:
@@ -90,6 +90,7 @@ end
|
||||
# GET /macs/1.json
|
||||
def show
|
||||
@mac = Mac.find(params[:id])
|
||||
@mac_logs = MacLog.where(:mac => @mac.mac)
|
||||
|
||||
respond_to do |format|
|
||||
format.html # show.html.erb
|
||||
|
||||
@@ -17,7 +17,7 @@ class StatisticsController < ApplicationController
|
||||
}
|
||||
|
||||
@door_log_graph = []
|
||||
@door_logs.group_by{|l| l.created_at.beginning_of_day}.each{|l| @door_log_graph << [l.first.to_time.to_i*1000,l.last.size]}
|
||||
@door_logs.where("key = 'G'").group_by{|l| l.created_at.beginning_of_day}.each{|l| @door_log_graph << [l.first.to_time.to_i*1000,l.last.size]}
|
||||
|
||||
respond_to do |format|
|
||||
format.html
|
||||
|
||||
Reference in New Issue
Block a user