mirror of
https://github.com/StefBuwalda/ProjectIOT.git
synced 2025-10-30 11:19:57 +00:00
Automatic spacing by black formatter
This commit is contained in:
@@ -2,7 +2,8 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div class="col-md-9 ms-sm-auto col-lg-10 px-md-4">
|
<div class="col-md-9 ms-sm-auto col-lg-10 px-md-4">
|
||||||
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
|
<div
|
||||||
|
class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
|
||||||
<h1 class="display-4 fw-bold" style="color: #313A4D;">Numberplate</h1>
|
<h1 class="display-4 fw-bold" style="color: #313A4D;">Numberplate</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
{%extends 'base.html' %}
|
{%extends 'base.html' %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="col-md-9 ms-sm-auto col-lg-10 px-md-4">
|
<div class="col-md-9 ms-sm-auto col-lg-10 px-md-4">
|
||||||
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
|
<div
|
||||||
|
class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
|
||||||
<h1 class="display-4 fw-bold" style="color: #313A4D;">Dashboard</h1>
|
<h1 class="display-4 fw-bold" style="color: #313A4D;">Dashboard</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
@@ -28,7 +29,8 @@
|
|||||||
<td><small class="fs-6">{{ log.dateLogged.strftime('%H:%M:%S') }}</small></td>
|
<td><small class="fs-6">{{ log.dateLogged.strftime('%H:%M:%S') }}</small></td>
|
||||||
<td><small class="fs-6">{{ log.plate }}</small></td>
|
<td><small class="fs-6">{{ log.plate }}</small></td>
|
||||||
<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">
|
<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">
|
||||||
{{ log.allowed }}
|
{{ log.allowed }}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -20,7 +20,8 @@
|
|||||||
<td><small class="fs-6">{{ form.timestamp.strftime('%H:%M:%S') }}</small></td>
|
<td><small class="fs-6">{{ form.timestamp.strftime('%H:%M:%S') }}</small></td>
|
||||||
<td><small class="fs-6">{{ form.plate }}</small></td>
|
<td><small class="fs-6">{{ form.plate }}</small></td>
|
||||||
<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">
|
<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 }}
|
{{ form.allowed }}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ def add():
|
|||||||
db.session.add(ap)
|
db.session.add(ap)
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
||||||
|
# Update the list on the page with JavaScript
|
||||||
if request.headers.get("X-Requested-With") == "XMLHttpRequest":
|
if request.headers.get("X-Requested-With") == "XMLHttpRequest":
|
||||||
plates = AllowedPlate.query.order_by(AllowedPlate.id).all()
|
plates = AllowedPlate.query.order_by(AllowedPlate.id).all()
|
||||||
return jsonify(
|
return jsonify(
|
||||||
|
|||||||
Reference in New Issue
Block a user