52 lines
2.3 KiB
HTML
52 lines
2.3 KiB
HTML
{% extends "base.html" %}
|
|
{% set active_page = "" %}
|
|
{% block title %}HAProxy • Edit{% endblock %}
|
|
{% block head %}
|
|
{% endblock %}
|
|
{% block breadcrumb %}<nav aria-label="breadcrumb" class="mb-3"><ol class="breadcrumb mb-0"><li class="breadcrumb-item"><a href="{{ url_for('main.index') }}"><i class="bi bi-house"></i></a></li><li class="breadcrumb-item active" aria-current="page">Edytor</li></ol></nav>{% endblock %}
|
|
{% block content %}
|
|
|
|
</header>
|
|
<div style=" border-radius: 5px;" id="editor_container" class="container mt-5">
|
|
<h3 style="color: grey; padding: 15px;" id="edit_conf" class="edit_conf">Edit HAProxy Config</h3>
|
|
<form method="POST">
|
|
<div class="form-group">
|
|
<label for="haproxy_config">Configuration:</label>
|
|
<textarea style="padding: 15px;" class="form-control" name="haproxy_config" rows="25" cols="120">{{ config_content }}</textarea>
|
|
</div>
|
|
<div style="padding-bottom: 20px;" class="form-group">
|
|
<input type="submit" class="btn btn-warning" id="save_check" name="save_check" value="Save & Check">
|
|
<input type="submit" class="btn btn-primary" name="save_reload" value="Save & Restart">
|
|
</div>
|
|
</form>
|
|
{% if check_output %}
|
|
<div style="padding-bottom: 15px;">
|
|
{% if 'Fatal errors' in check_output %}
|
|
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
|
<pre class="mt-3">{{ check_output }}</pre>
|
|
</div>
|
|
{% elif 'Warnings' in check_output %}
|
|
<div class="alert alert-warning alert-dismissible fade show" role="alert">
|
|
<pre class="mt-3">{{ check_output }}</pre>
|
|
</div>
|
|
{% elif 'error detected while parsing an' in check_output %}
|
|
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
|
<pre class="mt-3">{{ check_output }}</pre>
|
|
</div>
|
|
{% else %}
|
|
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
|
<pre class="mt-3">{{ check_output }}</pre>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
|
|
|
|
<!-- Footer -->
|
|
<footer>
|
|
<p>© 2025 HAProxy Configurator. All rights reserved.</p>
|
|
</footer>
|
|
{% endblock %}
|
|
{% block scripts %}
|
|
{% endblock %} |