66 lines
1.8 KiB
HTML
66 lines
1.8 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}Dashboard - /etc/hosts Manager{% endblock %}
|
|
{% block content %}
|
|
<h2>Dashboard</h2>
|
|
<div class="row">
|
|
<!-- Karty statystyk -->
|
|
<div class="col-md-3">
|
|
<div class="card text-white bg-primary mb-3">
|
|
<div class="card-body">
|
|
<h5 class="card-title">Liczba hostów</h5>
|
|
<p class="card-text fs-4">{{ stats.host_count }}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<div class="card text-white bg-success mb-3">
|
|
<div class="card-body">
|
|
<h5 class="card-title">Łącznie wdrożeń</h5>
|
|
<p class="card-text fs-4">{{ stats.total_deployments }}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<div class="card text-white bg-info mb-3">
|
|
<div class="card-body">
|
|
<h5 class="card-title">Udane wdrożenia</h5>
|
|
<p class="card-text fs-4">{{ stats.successful_deployments }}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<div class="card text-white bg-danger mb-3">
|
|
<div class="card-body">
|
|
<h5 class="card-title">Nieudane wdrożenia</h5>
|
|
<p class="card-text fs-4">{{ stats.failed_deployments }}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Tabela logów -->
|
|
<div class="row mt-4">
|
|
<div class="col">
|
|
<h4>Ostatnie logi</h4>
|
|
<div class="table-responsive">
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>Czas</th>
|
|
<th>Wiadomość</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for log in logs %}
|
|
<tr>
|
|
<td>{{ log.timestamp.strftime("%Y-%m-%d %H:%M:%S") }}</td>
|
|
<td>{{ log.details }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|