Changelog: https://roxy-wi.org/changelog#6_3_2
pull/355/head
Pavel Loginov 2 years ago
parent 116897d824
commit ef1eb88342

@ -26,7 +26,7 @@ def get_setting(param, **kwargs):
except Exception: except Exception:
pass pass
if user_group == '' or param == 'lists_path' or param == 'ssl_local_path': if user_group == '' or param in ('lists_path', 'ssl_local_path', 'proxy'):
user_group = 1 user_group = 1
if kwargs.get('all'): if kwargs.get('all'):

@ -187,9 +187,8 @@ def action_service(action: str, service: str) -> None:
return return
is_in_docker = is_docker() is_in_docker = is_docker()
if action == 'stop': cmd = f"sudo systemctl disable {service} --now"
cmd = f"sudo systemctl disable {service} --now" if action in ("start", "restart"):
elif action in ("start", "restart"):
cmd = f"sudo systemctl {action} {service} --now" cmd = f"sudo systemctl {action} {service} --now"
if not sql.select_user_status(): if not sql.select_user_status():
print( print(

@ -1125,7 +1125,7 @@ if form.getvalue('updategroup') is not None:
else: else:
try: try:
sql.update_group(name, descript, group_id) sql.update_group(name, descript, group_id)
roxywi_common.logging(f'Roxy-WI server', f'The {name} has been updated', roxywi=1, login=1) roxywi_common.logging('Roxy-WI server', f'The {name} has been updated', roxywi=1, login=1)
except Exception as e: except Exception as e:
print('error: ' + str(e)) print('error: ' + str(e))
@ -2501,7 +2501,7 @@ if form.getvalue('load_update_hapwi'):
import modules.roxywi.roxy as roxy import modules.roxywi.roxy as roxy
env = Environment(loader=FileSystemLoader('templates')) env = Environment(loader=FileSystemLoader('templates'))
template = env.get_template('ajax/load_updatehapwi.html') template = env.get_template('ajax/load_updateroxywi.html')
versions = roxy.versions() versions = roxy.versions()
checker_ver = roxy.check_new_version('checker') checker_ver = roxy.check_new_version('checker')

@ -13,8 +13,14 @@
{{s.0[0]|upper}}{{s.0[1:]}} {{s.0[0]|upper}}{{s.0[1:]}}
</td> </td>
<td class="padding10 first-collumn"> <td class="padding10 first-collumn">
{% if 'is not installed' in s.3 %} {% if 'is not installed' in s.3 or not s.3 %}
<a class="ui-button ui-widget ui-corner-all" onclick="updateService('{{s.0}}', 'install')" title="Install {{service_name}}">Install</a> {% if s.0 in ('prometheus', 'grafana-server') %}
<a class="ui-button ui-widget ui-corner-all" onclick="openTab(10)" title="Install {{service_name}}">Install</a>
{% elif s.0 in ('rabbitmq-server', 'fail2ban') %}
<a class="ui-button ui-widget ui-corner-all" href="https://roxy-wi/services/{{s.0.split('-')[0]}}" title="Install {{s.0|title()}}" target="_blank">Install</a>
{% else %}
<a class="ui-button ui-widget ui-corner-all" onclick="updateService('{{s.0}}', 'install')" title="Install {{service_name}}">Install</a>
{% endif %}
{% else %} {% else %}
<a id="start-{{ s.0 }}" class="start" title="Start and enable {{s.0}} service"> <a id="start-{{ s.0 }}" class="start" title="Start and enable {{s.0}} service">
<span class="service-start" onclick="confirmAjaxServiceAction('start', '{{s.0}}')"></span> <span class="service-start" onclick="confirmAjaxServiceAction('start', '{{s.0}}')"></span>

@ -136,7 +136,13 @@
<a class="ui-button ui-widget ui-corner-all" onclick="updateService('{{s.0}}')" title="Update {{service_name}}">Update</a> <a class="ui-button ui-widget ui-corner-all" onclick="updateService('{{s.0}}')" title="Update {{service_name}}">Update</a>
{% endif %} {% endif %}
{% else %} {% else %}
<a class="ui-button ui-widget ui-corner-all" onclick="updateService('{{s.0}}', 'install')" title="Install {{service_name}}">Install</a> {% if s.0 in ('prometheus', 'grafana-server') %}
<a class="ui-button ui-widget ui-corner-all" onclick="openTab(10)" title="Install {{service_name}}">Install</a>
{% elif s.0 in ('rabbitmq-server', 'fail2ban') %}
<a class="ui-button ui-widget ui-corner-all" href="https://roxy-wi/services/{{s.0.split('-')[0]}}" title="Install {{s.0|title()}}" target="_blank">Install</a>
{% else %}
<a class="ui-button ui-widget ui-corner-all" onclick="updateService('{{s.0}}', 'install')" title="Install {{service_name}}">Install</a>
{% endif %}
{% endif %} {% endif %}
</td> </td>
<td colspan="2"> <td colspan="2">

@ -22,6 +22,9 @@
</tr> </tr>
{% endif %} {% endif %}
{% set section.section = set.section %} {% set section.section = set.section %}
{% if page == "servers.py" and (set.param == 'proxy') %}
<!-- continue -->
{% else %}
<tr class="{{ loop.cycle('odd', 'even') }} {{set.section}}-section" style="display: none"> <tr class="{{ loop.cycle('odd', 'even') }} {{set.section}}-section" style="display: none">
<td class="addName"> <td class="addName">
{{set.param}} {{set.param}}
@ -67,6 +70,7 @@
</td> </td>
</tr> </tr>
{% endif %} {% endif %}
{% endif %}
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>

@ -1667,3 +1667,6 @@ function show_pretty_ansible_error(data) {
return data; return data;
} }
} }
function openTab(tabId) {
$( "#tabs" ).tabs( "option", "active", tabId );
}

Loading…
Cancel
Save