Adjusting wording and stat counts
This commit is contained in:
		
							parent
							
								
									370c82e075
								
							
						
					
					
						commit
						0eeaddabd7
					
				@ -90,6 +90,7 @@ end
 | 
				
			|||||||
  # GET /macs/1.json
 | 
					  # GET /macs/1.json
 | 
				
			||||||
  def show
 | 
					  def show
 | 
				
			||||||
    @mac = Mac.find(params[:id])
 | 
					    @mac = Mac.find(params[:id])
 | 
				
			||||||
 | 
					    @mac_logs = MacLog.where(:mac => @mac.mac)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    respond_to do |format|
 | 
					    respond_to do |format|
 | 
				
			||||||
      format.html # show.html.erb
 | 
					      format.html # show.html.erb
 | 
				
			||||||
 | 
				
			|||||||
@ -17,7 +17,7 @@ class StatisticsController < ApplicationController
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @door_log_graph = []
 | 
					    @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|
 | 
					    respond_to do |format|
 | 
				
			||||||
      format.html 
 | 
					      format.html 
 | 
				
			||||||
 | 
				
			|||||||
@ -23,5 +23,16 @@
 | 
				
			|||||||
  <%= @mac.ip %>
 | 
					  <%= @mac.ip %>
 | 
				
			||||||
</p>
 | 
					</p>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<% if can? :read, MacLog %>
 | 
				
			||||||
 | 
					<p>
 | 
				
			||||||
 | 
					  <b>Recent Log Entries:</b>
 | 
				
			||||||
 | 
					<ul>
 | 
				
			||||||
 | 
					<% @mac_logs.each do |log| %>
 | 
				
			||||||
 | 
					  <li><%= log.created_at %></li>
 | 
				
			||||||
 | 
					<% end %>
 | 
				
			||||||
 | 
					</ul>
 | 
				
			||||||
 | 
					</p>
 | 
				
			||||||
 | 
					<% end %>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<%= link_to 'Edit', edit_mac_path(@mac) %> |
 | 
					<%= link_to 'Edit', edit_mac_path(@mac) %> |
 | 
				
			||||||
<%= link_to 'Back', macs_path %>
 | 
					<%= link_to 'Back', macs_path %>
 | 
				
			||||||
 | 
				
			|||||||
@ -19,7 +19,7 @@ $(function() {
 | 
				
			|||||||
      },
 | 
					      },
 | 
				
			||||||
      yAxis : { 
 | 
					      yAxis : { 
 | 
				
			||||||
        title : {
 | 
					        title : {
 | 
				
			||||||
          text : "Hours"
 | 
					          text : "Accesses"
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      series: [{
 | 
					      series: [{
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user