1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/monitorix_ynh.git synced 2024-09-03 19:46:06 +02:00

Simplify code

This commit is contained in:
Josué Tille 2024-04-04 12:12:18 +02:00
parent 92d8ebddd9
commit 69493cbd25
No known key found for this signature in database
GPG key ID: 5F259226AD51F2F5

View file

@ -567,7 +567,9 @@ secure_log_date_format = %b %e
list = {% for interface in net_interface_list.splitlines() %}{% if loop.index > 1 %}, {% endif %}{{ interface.split(',')[0] }}{% endfor %} list = {% for interface in net_interface_list.splitlines() %}{% if loop.index > 1 %}, {% endif %}{{ interface.split(',')[0] }}{% endfor %}
<desc> <desc>
{%- for interface in net_interface_list.splitlines() %} {%- for interface in net_interface_list.splitlines() %}
{{ interface.split(',')[0] }} = Interface {{ interface.split(',')[0] }}, 0, {{ interface.split(',')[1] }} {%- set interface_name = interface.split(',')[0] %}
{%- set interface_speed = interface.split(',')[1] %}
{{ interface_name }} = Interface {{ interface_name }}, 0, {{ interface_speed }}
{%- endfor %} {%- endfor %}
</desc> </desc>
gateway = {{ net_gateway }} gateway = {{ net_gateway }}