Change log: https://roxy-wi.org/changelog.py#6_1_4
pull/334/head
Pavel Loginov 2022-08-17 20:23:25 +03:00
parent b4f1e342e6
commit 2f988384e4
3 changed files with 7 additions and 2 deletions

View File

@ -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:

View File

@ -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 %}

View File

@ -27,4 +27,4 @@
{% endif %}
{% endif %}
</center>
{% endblock %}
{% endblock %}