2018-05-05 12:40:41 +00:00
{% extends "base.html" %}
{% block content %}
< center >
< h3 > Choose server< / h3 >
< p >
< form action = "{{ action }}" method = "get" >
2019-09-26 15:48:56 +00:00
< a class = "ui-button ui-widget ui-corner-all" title = "Return back" onclick = "history.back()" > Back< / a >
2018-05-05 12:40:41 +00:00
< 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 >
2019-09-22 15:46:26 +00:00
{% 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 %}
2018-05-05 12:40:41 +00:00
< / p >
{% if open %}
< center >
2019-09-20 06:42:19 +00:00
< h4 > Choose old version< / h4 >
2019-09-17 07:18:48 +00:00
< form action = "versions.py#conf" method = "get" >
2018-05-05 12:40:41 +00:00
< 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 %}
2018-09-26 15:10:35 +00:00
< label for = "{{file}}" > {{file.split('-', maxsplit=1)[1]}} < / label > < input type = "checkbox" value = "{{file}}" name = "{{file}}" id = "{{file}}" >
2019-09-26 15:48:56 +00:00
< 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;" >
2019-09-17 07:18:48 +00:00
Upload
< / a > < br / >
2018-05-05 12:40:41 +00:00
{% 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 >
2019-09-26 15:48:56 +00:00
2018-05-05 12:40:41 +00:00
{% 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 %}