redactor
This commit is contained in:
@@ -1,52 +1,39 @@
|
||||
{% 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>
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-body">
|
||||
<h4 class="mb-3 text-muted">Edytuj konfigurację HAProxy</h4>
|
||||
<form method="POST" novalidate>
|
||||
<div class="mb-3">
|
||||
<label for="haproxy_config" class="form-label">Konfiguracja</label>
|
||||
<textarea class="form-control" name="haproxy_config" id="haproxy_config" rows="20">{{ config_content }}</textarea>
|
||||
</div>
|
||||
<div class="d-flex gap-2">
|
||||
<button type="submit" class="btn btn-warning" id="save_check" name="save_check">
|
||||
<i class="bi bi-search me-1"></i> Zapisz & Sprawdź
|
||||
</button>
|
||||
<button type="submit" class="btn btn-primary" name="save_reload">
|
||||
<i class="bi bi-arrow-repeat me-1"></i> Zapisz & Restart
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
{% if check_output %}
|
||||
<div class="mt-3">
|
||||
{% if 'Fatal errors' in check_output or 'error detected while parsing an' in check_output %}
|
||||
<div class="alert alert-danger" role="alert"><pre class="mb-0">{{ check_output }}</pre></div>
|
||||
{% elif 'Warnings' in check_output %}
|
||||
<div class="alert alert-warning" role="alert"><pre class="mb-0">{{ check_output }}</pre></div>
|
||||
{% else %}
|
||||
<div class="alert alert-success" role="alert"><pre class="mb-0">{{ check_output }}</pre></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
<!-- Footer -->
|
||||
<footer>
|
||||
<p>© 2025 HAProxy Configurator. All rights reserved.</p>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block page_js %}
|
||||
<script src="{{ url_for('static', filename='js/edit.js') }}"></script>
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user