This commit is contained in:
Mateusz Gruszczyński
2025-02-24 23:08:03 +01:00
parent 1efc3341b4
commit d1d0ccc311
38 changed files with 2251 additions and 1428 deletions

View File

@ -1,41 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Deploy /etc/hosts File - {{ file.title }}</title>
<style>
body { font-family: Arial, sans-serif; background: #f1f1f1; padding: 20px; }
.container { max-width: 600px; margin: 0 auto; background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 0 10px #ccc; }
h1 { text-align: center; }
form { margin-top: 20px; }
.host-list { margin: 20px 0; }
.host-item { margin-bottom: 10px; }
button { padding: 10px 20px; background: #007bff; border: none; color: #fff; cursor: pointer; border-radius: 4px; display: block; margin: 0 auto; }
button:hover { background: #0056b3; }
.links { text-align: center; margin-top: 10px; }
.links a { color: #007bff; text-decoration: none; }
.links a:hover { text-decoration: underline; }
</style>
</head>
<body>
<div class="container">
<h1>Deploy "{{ file.title }}"</h1>
<p>Select the hosts to which you want to deploy this file:</p>
<form method="POST" action="">
<div class="host-list">
{% for host in hosts %}
<div class="host-item">
<label>
<input type="checkbox" name="hosts" value="{{ host.id }}"> {{ host.hostname }} ({{ host.type }})
</label>
</div>
{% endfor %}
</div>
<button type="submit">Deploy</button>
</form>
<div class="links">
<a href="{{ url_for('list_hosts_files') }}">Back to /etc/hosts Files</a>
{% extends "base.html" %}
{% block title %}Deploy Hosts File - /etc/hosts Manager{% endblock %}
{% block content %}
<h2>Deploy Hosts File: "{{ file.title }}"</h2>
<form method="post">
<div class="form-group">
<label>Wybierz hosty do deploy:</label>
{% for host in hosts %}
<div class="form-check">
<input class="form-check-input" type="checkbox" name="hosts" value="{{ host.id }}" id="host{{ host.id }}">
<label class="form-check-label" for="host{{ host.id }}">{{ host.hostname }} ({{ host.type }})</label>
</div>
</div>
</body>
</html>
{% endfor %}
</div>
<button type="submit" class="btn btn-success">Deploy Hosts File</button>
</form>
{% endblock %}