Webinterface
This commit is contained in:
@@ -2,18 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Device Dashboard</title>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css">
|
||||
<style>
|
||||
.device-card {
|
||||
width: 150px;
|
||||
margin: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
.status-badge {
|
||||
font-size: 0.9rem;
|
||||
margin-top: 5px;
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
||||
</head>
|
||||
<body class="p-3">
|
||||
|
||||
@@ -28,20 +17,28 @@
|
||||
|
||||
<p>Prüfintervall: <strong>{{ interval }} Minuten</strong></p>
|
||||
|
||||
<div class="d-flex flex-wrap">
|
||||
{% for d in devices %}
|
||||
<div class="card device-card">
|
||||
<div class="card-body">
|
||||
<h6 class="card-title">{{ d['name'] }}</h6>
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead class="table-dark">
|
||||
<tr>
|
||||
<th>Device-Name</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for d in devices %}
|
||||
<tr>
|
||||
<td>{{ d['name'] }}</td>
|
||||
<td>
|
||||
{% if status[d['name']] == 'online' %}
|
||||
<span class="badge bg-success status-badge">Online</span>
|
||||
<span class="badge bg-success">Online</span>
|
||||
{% else %}
|
||||
<span class="badge bg-danger status-badge">Offline</span>
|
||||
<span class="badge bg-danger">Offline</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user