67 lines
2.6 KiB
HTML
67 lines
2.6 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}Dodaj serwer - /etc/hosts Manager{% endblock %}
|
|
{% 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>Dodaj nowy serwer</h2>
|
|
</div>
|
|
<div class="card-body">
|
|
<form method="POST" action="{{ url_for('add_server') }}">
|
|
<div class="mb-3">
|
|
<label for="hostname" class="form-label">Nazwa hosta (IP lub domena)</label>
|
|
<input type="text" name="hostname" id="hostname" class="form-control" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="username" class="form-label">Użytkownik SSH</label>
|
|
<input type="text" name="username" id="username" class="form-control" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="password" class="form-label">Hasło SSH</label>
|
|
<input type="password" name="password" id="password" class="form-control">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="port" class="form-label">Port SSH</label>
|
|
<input type="text" name="port" id="port" class="form-control" value="22">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="host_type" class="form-label">Typ</label>
|
|
<select name="host_type" id="host_type" class="form-select" required>
|
|
<option value="linux">Linux</option>
|
|
<option value="mikrotik">Mikrotik</option>
|
|
</select>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="auth_method" class="form-label">Metoda uwierzytelniania</label>
|
|
<select name="auth_method" id="auth_method" class="form-select">
|
|
<option value="password">Hasło</option>
|
|
<option value="ssh_key">Klucz SSH</option>
|
|
</select>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="private_key" class="form-label">Klucz prywatny (jeśli używasz klucza SSH)</label>
|
|
<textarea name="private_key" id="private_key" rows="4" class="form-control"></textarea>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="key_passphrase" class="form-label">Hasło do klucza (jeśli klucz jest zaszyfrowany)</label>
|
|
<input type="password" name="key_passphrase" id="key_passphrase" class="form-control">
|
|
</div>
|
|
<button type="submit" class="btn btn-primary">Dodaj serwer</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-3 text-center">
|
|
<a href="{{ url_for('server_list') }}" class="btn btn-secondary">Lista serwerów</a>
|
|
<a href="{{ url_for('import_servers') }}" class="btn btn-secondary">Importuj serwery z CSV</a>
|
|
</div>
|
|
{% endblock %}
|