-
Numberplates
-
-
-
-
- | ID |
- Numberplate |
-
-
-
- {% for plate in plates %}
-
- | {{ plate.id }} |
- {{ plate.plate }} |
-
- {% endfor %}
-
-
+
+
+
+
Numberplates
+
+
+
+
+ | ID |
+ Numberplate |
+
+
+
+ {% for plate in plates %}
+
+ | {{ plate.id }} |
+ {{ plate.plate }} |
+
+ {% endfor %}
+
+
+
-
-
-{% endblock %}
\ No newline at end of file
+
+ {% endblock %}
\ No newline at end of file
diff --git a/application/dashboard/templates/dashboard.html b/application/dashboard/templates/dashboard.html
index e613bde..bba7209 100644
--- a/application/dashboard/templates/dashboard.html
+++ b/application/dashboard/templates/dashboard.html
@@ -1,72 +1,74 @@
{%extends 'base.html' %}
{% block content %}
-
-
Dashboard
-
-
-
-
-
-
Logs
-
-
-
-
- | Time |
- Numberplate |
- Gate Status |
-
-
-
- {% for log in logs %}
-
- | {{ log.dateLogged.strftime('%H:%M:%S') }} |
- {{ log.plate }} |
-
-
- {{ log.allowed }}
-
- |
-
- {% endfor %}
-
-
+
+
+
+
Logs
+
+
+
+
+ | Time |
+ Numberplate |
+ Gate Status |
+
+
+
+ {% for log in logs %}
+
+ | {{ log.dateLogged.strftime('%H:%M:%S') }} |
+ {{ log.plate }} |
+
+
+ {{ log.allowed }}
+
+ |
+
+ {% endfor %}
+
+
+
-
-
-
-
-
Numberplates
-
-
-
-
- | ID |
- Numberplate |
-
-
-
- {% for plate in plates %}
-
- | {{ plate.id }} |
- {{ plate.plate }} |
-
- {% endfor %}
-
-
+
+
+
+
Numberplates
+
+
+
+
+ | ID |
+ Numberplate |
+
+
+
+ {% for plate in plates %}
+
+ | {{ plate.id }} |
+ {{ plate.plate }} |
+
+ {% endfor %}
+
+
+
-
-{% endblock %}
+ {% endblock %}
\ No newline at end of file
diff --git a/application/dashboard/templates/logs.html b/application/dashboard/templates/logs.html
index 4677a43..3f5811c 100644
--- a/application/dashboard/templates/logs.html
+++ b/application/dashboard/templates/logs.html
@@ -9,7 +9,7 @@
- | Time |
+ Time |
Numberplate |
Gate Status |
@@ -17,10 +17,11 @@
{% for form in recent_logs %}
- | {{ form.timestamp.strftime('%H:%M:%S') }} |
+ {{ form.timestamp.strftime('%H:%M:%S') }} |
{{ form.plate }} |
-
+
{{ form.allowed }}
|
diff --git a/application/dashboard/views.py b/application/dashboard/views.py
index 4e37936..ee4c48c 100644
--- a/application/dashboard/views.py
+++ b/application/dashboard/views.py
@@ -29,6 +29,7 @@ def add():
db.session.add(ap)
db.session.commit()
+ # Update the list on the page with JavaScript
if request.headers.get("X-Requested-With") == "XMLHttpRequest":
plates = AllowedPlate.query.order_by(AllowedPlate.id).all()
return jsonify(