mirror of https://github.com/Aidaho12/haproxy-wi
parent
b4f1e342e6
commit
2f988384e4
|
@ -1315,6 +1315,8 @@ if serv is not None and act == "configShow":
|
|||
print('<div class="alert alert-danger">Can\'t read config file</div>')
|
||||
|
||||
is_serv_protected = sql.is_serv_protected(serv)
|
||||
server_id = sql.select_server_id_by_ip(serv)
|
||||
is_restart = sql.select_service_setting(server_id, service, 'restart')
|
||||
|
||||
from jinja2 import Environment, FileSystemLoader
|
||||
|
||||
|
@ -1328,7 +1330,8 @@ if serv is not None and act == "configShow":
|
|||
role=role_id,
|
||||
service=service,
|
||||
config_file_name=config_file_name,
|
||||
is_serv_protected=is_serv_protected)
|
||||
is_serv_protected=is_serv_protected,
|
||||
is_restart=is_restart)
|
||||
print(template)
|
||||
|
||||
if form.getvalue('configver') is None:
|
||||
|
|
|
@ -371,7 +371,9 @@
|
|||
<input type="hidden" value="{{configver}}" name="configver">
|
||||
<input type="hidden" value="1" name="config">
|
||||
<button type='submit' value='save' name='save' class='btn btn-default' title="Save config without reloading the service">Save</button>
|
||||
{% if is_restart|int == 0 %}
|
||||
<button type='submit' value='' name='' class='btn btn-default'>Upload and restart</button>
|
||||
{% endif %}
|
||||
{% if service != 'keepalived' %}
|
||||
<button type='submit' value='reload' name='save' class='btn btn-default'>Upload and reload</button>
|
||||
{% endif %}
|
||||
|
|
|
@ -27,4 +27,4 @@
|
|||
{% endif %}
|
||||
{% endif %}
|
||||
</center>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in New Issue