diff --git a/application/dashboard/templates/add.html b/application/dashboard/templates/add.html index 3b77ba1..d58cd74 100644 --- a/application/dashboard/templates/add.html +++ b/application/dashboard/templates/add.html @@ -2,86 +2,87 @@ {% block content %}
-
-

Numberplate

-
-
+
+

Numberplate

+
+
+
-
-
-
-
-
Add numberplate
-
-
- {{ form.hidden_tag() }} -
- {{ form.numberplate(class="form-input",style="width: 200px; height: 40px;") }} -
-
- {{ form.submit(class="btn btn-sm btn-dark", style="width: 200px;") }} -
-
+
+
+
+
Add numberplate
+
+
+ {{ form.hidden_tag() }} +
+ {{ form.numberplate(class="form-input",style="width: 200px; height: 40px;") }} +
+
+ {{ form.submit(class="btn btn-sm btn-dark", style="width: 200px;") }} +
+
+
-
-
-
-
-
Numberplates
-
- - - - - - - - - {% for plate in plates %} - - - - - {% endfor %} - -
IDNumberplate
{{ plate.id }}{{ plate.plate }}
+
+
+
+
Numberplates
+
+ + + + + + + + + {% for plate in plates %} + + + + + {% endfor %} + +
IDNumberplate
{{ plate.id }}{{ plate.plate }}
+
-
- -{% 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

-
-
+
+

Dashboard

+
+
+
-
-
-
-
-
Logs
-
- - - - - - - - - - {% for log in logs %} - - - - - - {% endfor %} - -
TimeNumberplateGate Status
{{ log.dateLogged.strftime('%H:%M:%S') }}{{ log.plate }} - - {{ log.allowed }} - -
+
+
+
+
Logs
+
+ + + + + + + + + + {% for log in logs %} + + + + + + {% endfor %} + +
TimeNumberplateGate Status
{{ log.dateLogged.strftime('%H:%M:%S') }}{{ log.plate }} + + {{ log.allowed }} + +
+
-
-
-
-
-
Numberplates
-
- - - - - - - - - {% for plate in plates %} - - - - - {% endfor %} - -
IDNumberplate
{{ plate.id }}{{ plate.plate }}
+
+
+
+
Numberplates
+
+ + + + + + + + + {% for plate in plates %} + + + + + {% endfor %} + +
IDNumberplate
{{ plate.id }}{{ plate.plate }}
+
-
-{% 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 @@ - + @@ -17,10 +17,11 @@ {% for form in recent_logs %} - + 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(
TimeTime Numberplate Gate Status
{{ form.timestamp.strftime('%H:%M:%S') }}{{ form.timestamp.strftime('%H:%M:%S') }} {{ form.plate }} - + {{ form.allowed }}