refactor web interface

This commit is contained in:
Mateusz Gruszczyński
2025-02-25 09:28:14 +01:00
parent 5c7a404c3b
commit cffc8b3124
22 changed files with 798 additions and 369 deletions

View File

@@ -0,0 +1,23 @@
{% extends "base.html" %}
{% block title %}Import hostów z CSV - /etc/hosts Manager{% endblock %}
{% block content %}
<div class="card">
<div class="card-header">
<h2>Import serwerów z CSV</h2>
</div>
<div class="card-body">
<form method="POST" action="{{ url_for('import_servers') }}" enctype="multipart/form-data">
<div class="mb-3">
<label for="file" class="form-label">Wybierz plik CSV</label>
<input type="file" name="file" id="file" class="form-control" accept=".csv" required>
</div>
<button type="submit" class="btn btn-primary">Importuj</button>
</form>
</div>
</div>
<div class="mt-3 text-center">
<a href="{{ url_for('add_server') }}" class="btn btn-secondary">Dodaj nowy serwer</a>
<a href="{{ url_for('server_list') }}" class="btn btn-secondary">Lista serwerów</a>
<a href="{{ url_for('export_servers_to_csv') }}" class="btn btn-secondary">Eksportuj serwery do CSV</a>
</div>
{% endblock %}