{% set current_ver = versions.0 %}
{% set new_ver = versions.1 %}
{% set current_ver_without_dots = versions.2 %}
{% set new_ver_without_dots = versions.3 %}
Roxy-WI
current_ver_without_dots and new_ver != "Sorry cannot get current version" %}
title="There is a newer version Roxy-WI"
style="color: var(--red-color)"
{% else %}
title="There is not a newer version Roxy-WI"
style="color: var(--green-color)"
{% endif %}
>
{{current_ver}}
{{new_ver}}
{% if new_ver_without_dots > current_ver_without_dots and new_ver != "Sorry cannot get current version" %}
Update
{% endif %}
The main application
{% for s in services %}
{% if s.0 == 'roxy-wi-smon' or s.0 == 'roxy-wi-checker' or s.0 == 'roxy-wi-keep_alive' or s.0 == 'roxy-wi-metrics' or s.0 == 'roxy-wi-portscanner' %}
{% set is_need_update = 0 %}
{% if s.0 == 'roxy-wi-smon' %}
{% set service_name = 'SMON' %}
{% set service_link = 'smon' %}
{% set desc_link = 'https://roxy-wi.org/services.py?service=smon' %}
{% if s.3|float < smon_ver|float %}
{% set is_need_update = 1 %}
{% endif %}
{% elif s.0 == 'roxy-wi-checker' %}
{% set service_name = 'Checker' %}
{% set service_link = 'checker' %}
{% set desc_link = 'https://roxy-wi.org/services.py?service=checker' %}
{% if s.3|float < checker_ver|float %}
{% set is_need_update = 1 %}
{% endif %}
{% elif s.0 == 'roxy-wi-keep_alive' %}
{% set service_name = 'Auto start' %}
{% set service_link = 'auto_start' %}
{% set desc_link = 'https://roxy-wi.org/services.py?service=auto_start' %}
{% if s.3|float < keep_ver|float %}
{% set is_need_update = 1 %}
{% endif %}
{% elif s.0 == 'roxy-wi-metrics' %}
{% set service_name = 'Metrics' %}
{% set service_link = 'metrics' %}
{% set desc_link = 'https://roxy-wi.org/services.py?service=metrics' %}
{% if s.3|float < metrics_ver|float %}
{% set is_need_update = 1 %}
{% endif %}
{% elif s.0 == 'roxy-wi-portscanner' %}
{% set service_name = 'Port scanner' %}
{% set service_link = 'portscanner' %}
{% set desc_link = 'https://roxy-wi.org/services.py?service={{service_link}}' %}
{% if s.3|float < portscanner_ver|float %}
{% set is_need_update = 1 %}
{% endif %}
{% endif %}
{{service_name}}
{% if s.3 != '* is not installed' %}
{{s.3}}
{% endif %}
{% if s.3 != '* is not installed' %}
{% if is_need_update %}
Update
{% endif %}
{% else %}
{{service_name}} service is not installed
Read about installation
{% endif %}