mirror of
				https://github.com/StefBuwalda/ProjectIOT.git
				synced 2025-10-30 19:29:57 +00:00 
			
		
		
		
	 2f7a499c91
			
		
	
	2f7a499c91
	
	
	
		
			
			Added logs.html for the logs page Changed dashboard.html so the numberplates show on the dashboard Moved models.py to to the dashboard folder
		
			
				
	
	
		
			36 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| {%extends 'base.html' %}
 | |
| {% block content %}
 | |
| 
 | |
| <div class="col-md-12">
 | |
|     <div class="card mb-4">
 | |
|         <div class="card-body">
 | |
|             <h5 class="card-title fs-4">Numberplate Logs</h5>
 | |
|             <div class="log-container" style="max-height: 250px; overflow-y: auto;">
 | |
|                 <table class="table table-sm table-hover">
 | |
|                     <thead>
 | |
|                         <tr>
 | |
|                             <th scope="col" class="fs-5">Time</th> 
 | |
|                             <th scope="col" class="fs-5">Numberplate</th>
 | |
|                             <th scope="col" class="fs-5">Gate Status</th>
 | |
|                         </tr>
 | |
|                     </thead>
 | |
|                     <tbody>
 | |
|                         {% for form in recent_logs %}
 | |
|                         <tr>
 | |
|                             <td><small class="fs-6">{{ form.timestamp.strftime('%H:%M:%S') }}</small></td> 
 | |
|                             <td><small class="fs-6">{{ form.plate }}</small></td>
 | |
|                             <td>
 | |
|                                 <span class="badge {% if log.status == 'success' %}bg-success{% elif log.status == 'warning' %}bg-warning{% elif log.status == 'error' %}bg-danger{% else %}bg-secondary{% endif %} fs-6">
 | |
|                                     {{ form.allowed }}
 | |
|                                 </span>
 | |
|                             </td>
 | |
|                         </tr>
 | |
|                         {% endfor %}
 | |
|                     </tbody>
 | |
|                 </table>
 | |
|             </div>
 | |
|         </div>
 | |
|     </div>
 | |
| </div>
 | |
| 
 | |
| {% endblock %} |