refactor web interface
This commit is contained in:
@ -1,29 +1,44 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Backups - /etc/hosts Manager{% endblock %}
|
||||
{% block content %}
|
||||
<h2>Backups</h2>
|
||||
<a href="{{ url_for('backup_all') }}" class="btn btn-primary mb-3">Backup All</a>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Data utworzenia</th>
|
||||
<th>Opis</th>
|
||||
<th>Akcje</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for backup in backups %}
|
||||
<tr>
|
||||
<td>{{ backup.created_at.strftime("%Y-%m-%d %H:%M:%S") }}</td>
|
||||
<td>{{ backup.description }}</td>
|
||||
<td>
|
||||
<a href="{{ url_for('view_backup', backup_id=backup.id) }}" class="btn btn-sm btn-info">Podgląd</a>
|
||||
<form action="{{ url_for('delete_backup', backup_id=backup.id) }}" method="post" style="display:inline;">
|
||||
<button type="submit" class="btn btn-sm btn-danger" onclick="return confirm('Czy na pewno usunąć backup?');">Usuń</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% block extra_css %}
|
||||
{{ super() }}
|
||||
<style>
|
||||
.tooltip-inner {
|
||||
max-width: 300px;
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<h2>Backups</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<a href="{{ url_for('backup_all') }}" class="btn btn-primary mb-3">Wykonaj kopie wszystkich serwerów</a>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Data utworzenia</th>
|
||||
<th>Opis</th>
|
||||
<th>Akcje</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for backup in backups %}
|
||||
<tr>
|
||||
<td>{{ backup.created_at.strftime("%Y-%m-%d %H:%M:%S") }}</td>
|
||||
<td>{{ backup.description }}</td>
|
||||
<td>
|
||||
<a href="{{ url_for('view_backup', backup_id=backup.id) }}" class="btn btn-sm btn-info">Podgląd</a>
|
||||
<form action="{{ url_for('delete_backup', backup_id=backup.id) }}" method="post" style="display:inline;">
|
||||
<button type="submit" class="btn btn-sm btn-danger" onclick="return confirm('Czy na pewno usunąć backup?');">Usuń</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user