refactor web interface
This commit is contained in:
@ -1,39 +1,54 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Lista Regex Hosts - /etc/hosts Manager{% endblock %}
|
||||
{% block content %}
|
||||
<h2>Lista Regex Hosts</h2>
|
||||
<a href="{{ url_for('new_regex_host') }}" class="btn btn-primary mb-3">Dodaj nowy Regex Host</a>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>CIDR</th>
|
||||
<th>Gateway IP</th>
|
||||
<th>Gateway Hostname</th>
|
||||
<th>Domain Suffix</th>
|
||||
<th>Host Prefix</th>
|
||||
<th>Użyj Gateway IP</th>
|
||||
<th>Komentarz</th>
|
||||
<th>Akcje</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for entry in entries %}
|
||||
<tr>
|
||||
<td>{{ entry.cidr_range }}</td>
|
||||
<td>{{ entry.gateway_ip }}</td>
|
||||
<td>{{ entry.gateway_hostname }}</td>
|
||||
<td>{{ entry.domain_suffix }}</td>
|
||||
<td>{{ entry.host_prefix }}</td>
|
||||
<td>{{ entry.use_gateway_ip }}</td>
|
||||
<td>{{ entry.comment }}</td>
|
||||
<td>
|
||||
<a href="{{ url_for('edit_regex_host', entry_id=entry.id) }}" class="btn btn-sm btn-warning">Edytuj</a>
|
||||
<form action="{{ url_for('delete_regex_host', entry_id=entry.id) }}" method="post" style="display:inline;">
|
||||
<button type="submit" class="btn btn-sm btn-danger" onclick="return confirm('Czy na pewno usunąć wpis?');">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>Lista Regex Hosts</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<a href="{{ url_for('new_regex_host') }}" class="btn btn-primary mb-3">Dodaj nowy Regex Host</a>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>CIDR</th>
|
||||
<th>Gateway IP</th>
|
||||
<th>Gateway Hostname</th>
|
||||
<th>Domain Suffix</th>
|
||||
<th>Host Prefix</th>
|
||||
<th>Użyj Gateway IP</th>
|
||||
<th>Komentarz</th>
|
||||
<th>Akcje</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for entry in entries %}
|
||||
<tr>
|
||||
<td>{{ entry.cidr_range }}</td>
|
||||
<td>{{ entry.gateway_ip }}</td>
|
||||
<td>{{ entry.gateway_hostname }}</td>
|
||||
<td>{{ entry.domain_suffix }}</td>
|
||||
<td>{{ entry.host_prefix }}</td>
|
||||
<td>{{ entry.use_gateway_ip }}</td>
|
||||
<td>{{ entry.comment }}</td>
|
||||
<td>
|
||||
<a href="{{ url_for('edit_regex_host', entry_id=entry.id) }}" class="btn btn-sm btn-warning">Edytuj</a>
|
||||
<form action="{{ url_for('delete_regex_host', entry_id=entry.id) }}" method="post" style="display:inline;">
|
||||
<button type="submit" class="btn btn-sm btn-danger" onclick="return confirm('Czy na pewno usunąć wpis?');">Usuń</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user