{% extends "base.html" %}
{% block content %}
{% from 'include/input_macros.html' import input, checkbox, select %}
{% if serv %}
{% endif %}
{% if serv %}
{% else %}
{% endif %}
{% if servers|length == 0 %}
{% include 'include/getstarted.html' %}
{% endif %}
{% for s in servers %}
{% if serv %}
{% endif %}
{% if service == 'nginx' %}
{% set checker_desc = 'Checker monitors Nginx services. If Nginx service is down, Checker will alert via Telegram' %}
{% set is_checker_enabled = s.8.0.17 %}
{% if s.5.0.3 == 'active' %}
{% set additional_status_class = 'div-server-head-up' %}
{% else %}
{% set additional_status_class = 'div-server-head-down' %}
{% endif %}
{% else %}
{% set checker_desc = 'Checker monitors HAProxy services and its backends. If some backend or HAProxy service is down, Checker will alert via Telegram' %}
{% set is_checker_enabled = s.8.0.12 %}
{% if s.5 != False %}
{% set additional_status_class = 'div-server-head-up' %}
{% else %}
{% set additional_status_class = 'div-server-head-down' %}
{% endif %}
{% endif %}
{% if service == 'nginx' %}
{% if s.5.0.3 == 'active' %}
{% else %}
{% endif %}
{% else %}
{% if s.5 != False %}
{% else %}
{% endif %}
{% endif %}
{% if not serv %}
{{s.1}}
{% else %}
{{s.1}}
{% endif %}
{% if s.6|int() >= 1 %}
= 1 %}
src="/inc/images/shield.png" title="Auto start enabled"
{% else %}
src="/inc/images/shield-red.png" title="Auto start enabled, but keep alive service does not work"
{% endif %}
width=18 style="margin-bottom: -3px;" />
{% endif %}
{% if role <= 2 %}
{% if service == 'nginx' %}
{% set action_service = 'nginx' %}
{% else %}
{% set action_service = 'hap' %}
{% endif %}
{% endif %}
{{s.3}}
{% if service == 'nginx' %}
Version: {{s.5.0.2}} Process_num: {{s.5.0.5}} {% if s.5.0.3 == 'active' %}
Uptime: {% else %} Downtime: {% endif %} {{s.5.0.4}}
{% else %}
{% if s.5.0 is defined %}
{{s.5.0.0}} {{s.5.0.1}}
{{s.5.0.2}}
{% else %}
Cannot get information about HAProxy
{% endif %}
{% endif %}
Last edit:
IP: {{s.2}}
{% if s.7.0.0 != None %}
Master for: {{ s.7.0.1 }}
{% endif %}
{% if role <= 2 %}
{% if service == 'haproxy' %}
{% set id = 'alert-' + s.8.0.0|string() %}
{% if s.8.0.8 == 1 %}
{{ checkbox(id, title=checker_desc, value='1', desc='Checker', checked='checked') }}
{% else %}
{{ checkbox(id, title=checker_desc, value='1', desc='Checker') }}
{% endif %}
{% set id = 'metrics-' + s.8.0.0|string() %}
{% if s.8.0.9 == 1 %}
{{ checkbox(id, title='Collecting metrics is enabled', value='1', desc='Metrics', checked='checked') }}
{% else %}
{{ checkbox(id, title='Enable collecting metrics', value='1', desc='Metrics') }}
{% endif %}
{% endif %}
{% set id = 'active-' + s.8.0.0|string() %}
{% if is_checker_enabled == 1 %}
{{ checkbox(id, title='Auto Start is enabled', value='1', desc='Auto Start', checked='checked') }}
{% else %}
{{ checkbox(id, title='Enable Auto Start', value='1', desc='Auto Start') }}
{% endif %}