48 lines
1.4 KiB
HTML
48 lines
1.4 KiB
HTML
<!DOCTYPE html>
|
|
<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>
|
|
</head>
|
|
<body class="p-3">
|
|
|
|
<h2>Device Dashboard</h2>
|
|
|
|
<div class="mb-3">
|
|
<a href="{{ url_for('logs') }}" class="btn btn-primary">Live Log</a>
|
|
<a href="{{ url_for('devices') }}" class="btn btn-secondary">Devices verwalten</a>
|
|
<a href="{{ url_for('switches') }}" class="btn btn-secondary">Switches verwalten</a>
|
|
<a href="{{ url_for('settings') }}" class="btn btn-warning">Einstellungen</a>
|
|
</div>
|
|
|
|
<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>
|
|
{% if status[d['name']] == 'online' %}
|
|
<span class="badge bg-success status-badge">Online</span>
|
|
{% else %}
|
|
<span class="badge bg-danger status-badge">Offline</span>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|