- {% if s.3 != '* is not installed' %}
- {% if is_need_update %}
- Update
- {% endif %}
- {% else %}
- {{service_name}} service is not installed
- Read about installation
- {% endif %}
-
You do not have installed OpenVPN client.
+ Read hear
+ how to install OpenVPN client
+
+{% endif %}
\ No newline at end of file
diff --git a/app/templates/ajax/load_services.html b/app/templates/ajax/load_services.html
new file mode 100644
index 00000000..29277748
--- /dev/null
+++ b/app/templates/ajax/load_services.html
@@ -0,0 +1,30 @@
+{% for s in services %}
+
+{% endfor %}
\ No newline at end of file
diff --git a/app/templates/ajax/load_telegram.html b/app/templates/ajax/load_telegram.html
new file mode 100644
index 00000000..fe187f07
--- /dev/null
+++ b/app/templates/ajax/load_telegram.html
@@ -0,0 +1,66 @@
+{% from 'include/input_macros.html' import input, select %}
+{% for s in services %}
+{% if s.0 == 'checker_haproxy' %}
+ {% if s.3 != '* is not installed' and s.3 != '' %}
+
+
+
+ Token
+
+
Channel name
+ {% if page != "servers.py" %}
+
Group
+ {% endif %}
+
+
+
+ {% for telegram in telegrams %}
+
+
+ {% set id = 'telegram-token-' + telegram.0|string() %}
+ {{ input(id, value=telegram.1, size='30') }}
+
+
+ {% set id = 'telegram-chanel-' + telegram.0|string() %}
+ {{ input(id, value=telegram.2) }}
+
+ {% if page != "servers.py" %}
+
+
+
+ {% endif %}
+
+
+
+
+
+
+
+ {% endfor %}
+
+ + Add
+
+
+
+ You can read the description of all parameters here
+ and How to create and use Telegram bot in this article
+
+ {% else %}
+
+
+
You do not have installed Backends checker
+ Read hear
+ how to install Checker service
+
+ {% endif %}
+{% endif %}
+{% endfor %}
diff --git a/app/templates/ajax/load_updatehapwi.html b/app/templates/ajax/load_updatehapwi.html
new file mode 100644
index 00000000..21ed7390
--- /dev/null
+++ b/app/templates/ajax/load_updatehapwi.html
@@ -0,0 +1,93 @@
+{% set current_ver = versions.0 %}
+{% set new_ver = versions.1 %}
+{% set current_ver_without_dots = versions.2 %}
+{% set new_ver_without_dots = versions.3 %}
+
+
+ HAProxy-WI
+
+
+ {{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 == 'smon' or s.0 == 'checker_haproxy' or s.0 == 'keep_alive' or s.0 == 'metrics_haproxy' %}
+
+ {% set is_need_update = 0 %}
+ {% if s.0 == 'smon' %}
+ {% set service_name = 'SMON' %}
+ {% set service_link = 'smon' %}
+ {% set desc_link = 'https://haproxy-wi.org/services.py?service=smon' %}
+ {% if s.3|float < smon_ver|float %}
+ {% set is_need_update = 1 %}
+ {% endif %}
+{% elif s.0 == 'checker_haproxy' %}
+ {% set service_name = 'Checker' %}
+ {% set service_link = 'checker' %}
+ {% set desc_link = 'https://haproxy-wi.org/services.py?service=checker' %}
+ {% if s.3|float < checker_ver|float %}
+ {% set is_need_update = 1 %}
+ {% endif %}
+{% elif s.0 == 'keep_alive' %}
+ {% set service_name = 'Auto start' %}
+ {% set service_link = 'auto_start' %}
+ {% set desc_link = 'https://haproxy-wi.org/services.py?service=auto_start' %}
+ {% if s.3|float < keep_ver|float %}
+ {% set is_need_update = 1 %}
+ {% endif %}
+{% elif s.0 == 'metrics_haproxy' %}
+ {% set service_name = 'Metrics' %}
+ {% set service_link = 'metrics' %}
+ {% set desc_link = 'https://haproxy-wi.org/services.py?service=metrics' %}
+ {% if s.3|float < metrics_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 %}
+
+{% endif %}
+{% endfor %}
\ No newline at end of file
diff --git a/app/templates/include/admin_telegram.html b/app/templates/include/admin_telegram.html
deleted file mode 100644
index d1893954..00000000
--- a/app/templates/include/admin_telegram.html
+++ /dev/null
@@ -1,65 +0,0 @@
-{% for s in services %}
-{% if s.0 == 'checker_haproxy' %}
-{% if s.3 != '* is not installed' %}
-
-
-
- Token
-
-
Channel name
- {% if page != "servers.py" %}
-
Group
- {% endif %}
-
-
-
- {% for telegram in telegrams %}
-
-
- {% set id = 'telegram-token-' + telegram.0|string() %}
- {{ input(id, value=telegram.1, size='30') }}
-
-
- {% set id = 'telegram-chanel-' + telegram.0|string() %}
- {{ input(id, value=telegram.2) }}
-
- {% if page != "servers.py" %}
-
-
-
- {% endif %}
-
-
-
-
-
-
-
- {% endfor %}
-
- + Add
-
-
-
- You can read the description of all parameters here
- and How to create and use Telegram bot in this article
-
-{% else %}
-
-
-
You do not have installed Backends checker
- Read hear
- how to install Checker service