refactor
This commit is contained in:
@ -1,48 +1,26 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>/etc/hosts Files Management</title>
|
||||
<style>
|
||||
body { font-family: Arial, sans-serif; background: #f1f1f1; padding: 20px; }
|
||||
.container { max-width: 800px; margin: 0 auto; background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 0 10px #ccc; }
|
||||
table { width: 100%; border-collapse: collapse; margin-bottom: 1em; }
|
||||
table th, table td { border: 1px solid #ccc; padding: 8px; text-align: left; }
|
||||
table th { background: #f7f7f7; }
|
||||
.links { text-align: center; margin-top: 10px; }
|
||||
.links a { color: #007bff; text-decoration: none; margin: 0 10px; }
|
||||
.links a:hover { text-decoration: underline; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>Your /etc/hosts Files</h1>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Title</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for file in files %}
|
||||
<tr>
|
||||
<td>{{ file.id }}</td>
|
||||
<td>{{ file.title }}</td>
|
||||
<td>
|
||||
<a href="{{ url_for('edit_hosts_file', file_id=file.id) }}">Edit</a> |
|
||||
<a href="{{ url_for('deploy_hosts_file', file_id=file.id) }}">Deploy</a> |
|
||||
<a href="{{ url_for('delete_hosts_file', file_id=file.id) }}">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="links">
|
||||
<a href="{{ url_for('new_hosts_file') }}">Create /etc/hosts File</a> |
|
||||
<a href="{{ url_for('dashboard') }}">Back to Dashboard</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Hosts Files - /etc/hosts Manager{% endblock %}
|
||||
{% block content %}
|
||||
<h2>Hosts Files</h2>
|
||||
<a href="{{ url_for('new_hosts_file') }}" class="btn btn-primary mb-3">Utwórz nowy Hosts File</a>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Tytuł</th>
|
||||
<th>Akcje</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for file in files %}
|
||||
<tr>
|
||||
<td>{{ file.title }}</td>
|
||||
<td>
|
||||
<a href="{{ url_for('edit_hosts_file', file_id=file.id) }}" class="btn btn-sm btn-warning">Edytuj</a>
|
||||
<a href="{{ url_for('delete_hosts_file', file_id=file.id) }}" class="btn btn-sm btn-danger" onclick="return confirm('Czy na pewno usunąć plik?');">Usuń</a>
|
||||
<a href="{{ url_for('deploy_hosts_file', file_id=file.id) }}" class="btn btn-sm btn-success">Deploy</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user