mirror of https://github.com/Aidaho12/haproxy-wi
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
2.2 KiB
66 lines
2.2 KiB
{% extends "base.html" %}
|
|
{% block content %}
|
|
<center>
|
|
<h3>Choose server</h3>
|
|
<p>
|
|
<form action="{{ action }}" method="get">
|
|
<a class="ui-button ui-widget ui-corner-all" title="Return back" onclick="history.back()">Back</a>
|
|
<select autofocus required name="serv" id="{{ select_id }}">
|
|
<option disabled>Choose server</option>
|
|
{% for select in selects %}
|
|
{% if select.2 == serv %}
|
|
<option value="{{ select.2 }}" selected>{{ select.1 }}</option>
|
|
{% else %}
|
|
<option value="{{ select.2 }}">{{ select.1 }}</option>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</select>
|
|
<button type="submit" value="open" name="open" class="btn btn-default">Open</button>
|
|
</form>
|
|
{% if not aftersave and not open %}
|
|
<div class="add-note addName alert-info" style="width: inherit; margin-right: 15px;">
|
|
Here you can work with previous versions of HAProxy configs. Roll back to them, view or delete
|
|
</div>
|
|
{% endif %}
|
|
</p>
|
|
{% if open %}
|
|
<center>
|
|
<h4>Choose old version</h4>
|
|
<form action="versions.py#conf" method="get">
|
|
<label for="select_all" id="label_select_all"><b>Select all</b></label>
|
|
<input type="checkbox" id="select_all"><br />
|
|
{% for file in return_files %}
|
|
<label for="{{file}}"> {{file.split('-', maxsplit=1)[1]}} </label><input type="checkbox" value="{{file}}" name="{{file}}" id="{{file}}">
|
|
<a href="/app/versions.py?serv={{serv}}&open=open&configver={{file}}" class="ui-button ui-widget ui-corner-all" title="View and upload this version of the config" style="margin-top: -6px;">
|
|
Upload
|
|
</a><br />
|
|
{% endfor %}
|
|
<input type="hidden" value="{{serv}}" name="serv">
|
|
<input type="hidden" value="open" name="open">
|
|
<input type="hidden" value="del" name="del">
|
|
<p>
|
|
<button type="submit" value="" name="" class="btn btn-default">Delete</button>
|
|
</p>
|
|
</form>
|
|
</center>
|
|
|
|
{% endif %}
|
|
{% if aftersave %}
|
|
<div class="alert alert-info"><b>The following files were deleted:</b><br /> </div>
|
|
{% if stderr %}
|
|
<div class="alert alert-danger">
|
|
Some errors:
|
|
<br>
|
|
<br>
|
|
{{stderr}}
|
|
</div>
|
|
{% else %}
|
|
<div class="alert alert-success">
|
|
{% for f in file %}
|
|
{{f}}
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
</center>
|
|
{% endblock %} |