2023-02-13 14:45:45 +00:00
{% import 'languages/'+lang|default('en')+'.html' as lang %}
2022-06-15 07:34:20 +00:00
{% from 'include/input_macros.html' import input, select, checkbox %}
2022-05-02 19:00:25 +00:00
{% if user_status == 0 %}
2022-04-29 10:28:48 +00:00
{% include 'include/no_sub.html' %}
{% else %}
2022-06-15 07:34:20 +00:00
< script >
$( "#checker_tabs" ).tabs();
< / script >
< style >
.checker_settings_table {
margin-bottom: 15px;
}
< / style >
2021-02-20 07:47:33 +00:00
{% for s in services %}
2022-06-15 07:34:20 +00:00
{% if s.0 == 'roxy-wi-checker' %}
{% if s.3 == '* is not installed' and s.3 == '' %}
< div style = "text-align: center;" >
< br / >
2023-02-13 14:45:45 +00:00
< h3 > {{lang.phrases.checker_not_installed}}
2023-10-06 19:42:35 +00:00
{{lang.words.read|title()}} < a href = "https://roxy-wi.org/tools/checker#installation" title = "Checker {{lang.words.installation}}" style = "color: #5d9ceb;" target = "_blank" > {{lang.words.here}}< / a >
2023-02-13 14:45:45 +00:00
{{lang.phrases.how_to_install_checker}}< / h3 >
2022-06-15 07:34:20 +00:00
< / div >
{% else %}
< div id = "checker_tabs" >
2022-11-28 07:47:18 +00:00
< ul id = "checker-tabs-head" >
2023-02-13 14:45:45 +00:00
< li > < a href = "#channels" title = "Checker {{lang.words.channels}} - Roxy-WI" > {{lang.words.channels|title()}}< / a > < / li >
< li > < a href = "#checker_settings" title = "Checker {{lang.words.settings}} - Roxy-WI" > {{lang.words.settings|title()}}< / a > < / li >
2022-06-15 07:34:20 +00:00
< / ul >
< div id = "channels" >
2023-04-15 21:26:54 +00:00
< table id = "checker_telegram_table" class = "overview-overflow" >
2023-03-19 15:51:58 +00:00
< caption > < i class = "fab fa-telegram caption-icon" > < / i > < h3 > Telegram {{lang.words.channels}}< / h3 > < / caption >
2022-06-15 07:34:20 +00:00
< tr class = "overviewHead" style = "width: 50%;" >
< td class = "padding10 first-collumn" style = "width: 25%;" >
2023-04-15 21:26:54 +00:00
{{lang.words.token|title()}}
2022-06-15 07:34:20 +00:00
< / td >
2023-02-13 14:45:45 +00:00
< td style = "width: 20%;" > {{lang.words.channel|title()}}< / td >
2023-09-17 09:42:39 +00:00
{% if role|int() == 1 %}
2023-02-13 14:45:45 +00:00
< td style = "width: 25%;" > {{lang.words.group|title()}}< / td >
2022-06-15 07:34:20 +00:00
{% endif %}
< td style = "width: 100%;" > < / td >
< td > < / td >
2023-02-13 14:45:45 +00:00
< td > < span onclick = "loadchecker()" class = "refresh" title = "{{lang.words.refresh2|title()}} Telegram {{lang.words.channels}}" > < / span > < / td >
2022-06-15 07:34:20 +00:00
< / tr >
{% for telegram in telegrams %}
< tr id = "telegram-table-{{telegram.id}}" class = "{{ loop.cycle('odd', 'even') }}" >
< td class = "padding10 first-collumn" >
{% set id = 'telegram-token-' + telegram.id|string() %}
{{ input(id, value=telegram.token, size='30') }}
< / td >
< td >
{% set id = 'telegram-chanel-' + telegram.id|string() %}
{{ input(id, value=telegram.chanel_name, size='30') }}
< / td >
2023-09-17 09:42:39 +00:00
{% if role|int() == 1 %}
2022-06-15 07:34:20 +00:00
< td >
< select id = "telegramgroup-{{telegram.id}}" name = "telegramgroup-{{telegram.id}}" >
2023-02-13 14:45:45 +00:00
< option disabled selected > ------< / option >
2022-06-15 07:34:20 +00:00
{% for group in groups %}
{% if telegram.groups|string() == group.group_id|string() %}
< option value = "{{ group.group_id }}" selected > {{ group.name }}< / option >
{% else %}
< option value = "{{ group.group_id }}" > {{ group.name }}< / option >
{% endif %}
{% endfor %}
< / select >
< / td >
{% endif %}
< td >
2023-04-15 21:26:54 +00:00
< button title = "{{lang.phrases.send_test_mes}}" onclick = "checkReceiver({{telegram.id}}, 'telegram')" > {{lang.words.test|title()}}< / button >
2022-06-15 07:34:20 +00:00
< / td >
< td >
2023-04-15 21:26:54 +00:00
< a class = "add" onclick = "cloneReceiver({{telegram.id}}, 'telegram')" id = "clone-{{telegram.id}}" title = "{{lang.words.w_copy|title()}} {{lang.words.the}} {{lang.words.settings}} {{telegram.chanel_name}}" style = "cursor: pointer;" > < / a >
2022-06-15 07:34:20 +00:00
< / td >
< td >
2023-04-15 21:26:54 +00:00
< a class = "delete" onclick = "confirmDeleteReceiver({{telegram.id}}, 'telegram')" title = "{{lang.words.delete|title()}} {{lang.words.channel}} {{telegram.chanel_name}}" style = "cursor: pointer;" > < / a >
2022-06-15 07:34:20 +00:00
< / td >
< / tr >
{% endfor %}
< / table >
2023-02-13 14:45:45 +00:00
< br / > < span class = "add-button" title = "{{lang.words.add|title()}} Telegram {{lang.words.channel}}" id = "add-telegram-button" > + {{lang.words.add|title()}}< / span >
2022-06-15 07:34:20 +00:00
< br / > < br / >
2023-04-15 21:26:54 +00:00
< table id = "checker_slack_table" class = "overview-overflow" >
2023-03-19 15:51:58 +00:00
< caption > < i class = "fab fa-slack caption-icon" > < / i > < h3 > Slack {{lang.words.channels|title()}}< / h3 > < / caption >
2022-06-15 07:34:20 +00:00
< tr class = "overviewHead" style = "width: 50%;" >
< td class = "padding10 first-collumn" style = "width: 25%;" >
2023-02-13 14:45:45 +00:00
< span title = "Token that has given with APP registration" > {{lang.words.token|title()}}< / span >
2022-06-15 07:34:20 +00:00
< / td >
2023-02-13 14:45:45 +00:00
< td style = "width: 20%;" > {{lang.words.channel|title()}}< / td >
2023-09-17 09:42:39 +00:00
{% if role|int() == 1 %}
2023-02-13 14:45:45 +00:00
< td style = "width: 25%;" > {{lang.words.group|title()}}< / td >
2022-06-15 07:34:20 +00:00
{% endif %}
< td style = "width: 100%;" > < / td >
< td > < / td >
2023-02-13 14:45:45 +00:00
< td > < span onclick = "loadchecker()" class = "refresh" title = "{{lang.words.refresh2|title()}} Slack {{lang.words.channels}}" > < / span > < / td >
2022-06-15 07:34:20 +00:00
< / tr >
{% for slack in slacks %}
< tr id = "slack-table-{{slack.id}}" class = "{{ loop.cycle('odd', 'even') }}" >
< td class = "padding10 first-collumn" >
{% set id = 'slack-token-' + slack.id|string() %}
{{ input(id, value=slack.token, size='30') }}
< / td >
< td >
{% set id = 'slack-chanel-' + slack.id|string() %}
{{ input(id, value=slack.chanel_name, size='30') }}
< / td >
2023-09-17 09:42:39 +00:00
{% if role|int() == 1 %}
2022-06-15 07:34:20 +00:00
< td >
< select id = "slackgroup-{{slack.id}}" name = "slackgroup-{{slack.id}}" >
2023-02-13 14:45:45 +00:00
< option disabled selected > ------< / option >
2022-06-15 07:34:20 +00:00
{% for group in groups %}
{% if slack.groups|string() == group.group_id|string() %}
< option value = "{{ group.group_id }}" selected > {{ group.name }}< / option >
{% else %}
< option value = "{{ group.group_id }}" > {{ group.name }}< / option >
{% endif %}
{% endfor %}
< / select >
< / td >
{% endif %}
< td >
2023-04-15 21:26:54 +00:00
< button title = "{{lang.phrases.send_test_mes}}" onclick = "checkReceiver({{slack.id}}, 'slack')" > {{lang.words.test|title()}}< / button >
2022-06-15 07:34:20 +00:00
< / td >
< td >
2023-04-15 21:26:54 +00:00
< a class = "add" onclick = "cloneReceiver({{slack.id}}, 'slack')" id = "clone-{{slack.id}}" title = "{{lang.words.w_copy|title()}} {{lang.words.the}} {{lang.words.settings}} {{slack.chanel_name}}" style = "cursor: pointer;" > < / a >
2022-06-15 07:34:20 +00:00
< / td >
< td >
2023-04-15 21:26:54 +00:00
< a class = "delete" onclick = "confirmDeleteReceiver({{slack.id}}, 'slack')" title = "{{lang.words.delete|title()}} {{lang.words.channel}} {{slack.chanel_name}}" style = "cursor: pointer;" > < / a >
2022-06-15 07:34:20 +00:00
< / td >
< / tr >
{% endfor %}
< / table >
2023-02-13 14:45:45 +00:00
< br / > < span class = "add-button" title = "{{lang.words.add|title()}} Slack {{lang.words.channel|title()}}" id = "add-slack-button" > + {{lang.words.add|title()}}< / span >
2022-06-15 07:34:20 +00:00
< br / > < br / >
2023-04-15 21:26:54 +00:00
< table id = "checker_pd_table" class = "overview-overflow" >
< caption > < i class = "fas fa-pager caption-icon" > < / i > < h3 > PagerDuty {{lang.words.channels|title()}}< / h3 > < / caption >
< tr class = "overviewHead" style = "width: 50%;" >
< td class = "padding10 first-collumn" style = "width: 25%;" >
{{lang.words.key|title()}}
< / td >
< td style = "width: 20%;" > {{lang.words.name|title()}}< / td >
2023-09-17 09:42:39 +00:00
{% if role|int() == 1 %}
2023-04-15 21:26:54 +00:00
< td style = "width: 25%;" > {{lang.words.group|title()}}< / td >
{% endif %}
< td style = "width: 100%;" > < / td >
< td > < / td >
< td > < span onclick = "loadchecker()" class = "refresh" title = "{{lang.words.refresh2|title()}} Slack {{lang.words.channels}}" > < / span > < / td >
< / tr >
{% for pd in pds %}
< tr id = "pd-table-{{pd.id}}" class = "{{ loop.cycle('odd', 'even') }}" >
< td class = "padding10 first-collumn" >
{% set id = 'pd-token-' + pd.id|string() %}
{{ input(id, value=pd.token, size='30') }}
< / td >
< td >
{% set id = 'pd-chanel-' + pd.id|string() %}
{{ input(id, value=pd.chanel_name, size='30') }}
< / td >
2023-09-17 09:42:39 +00:00
{% if role|int() == 1 %}
2023-04-15 21:26:54 +00:00
< td >
< select id = "pdgroup-{{pd.id}}" name = "pdgroup-{{pd.id}}" >
< option disabled selected > ------< / option >
{% for group in groups %}
{% if pd.groups|string() == group.group_id|string() %}
< option value = "{{ group.group_id }}" selected > {{ group.name }}< / option >
{% else %}
< option value = "{{ group.group_id }}" > {{ group.name }}< / option >
{% endif %}
{% endfor %}
< / select >
< / td >
{% endif %}
< td >
< button title = "{{lang.phrases.send_test_mes}}" onclick = "checkReceiver({{pd.id}}, 'pd')" > {{lang.words.test|title()}}< / button >
< / td >
< td >
< a class = "add" onclick = "cloneReceiver({{pd.id}}, 'pd')" id = "clone-{{pd.id}}" title = "{{lang.words.w_copy|title()}} {{lang.words.the}} {{lang.words.settings}} {{pd.chanel_name}}" style = "cursor: pointer;" > < / a >
< / td >
< td >
< a class = "delete" onclick = "confirmDeleteReceiver({{pd.id}}, 'pd')" title = "{{lang.words.delete|title()}} {{lang.words.channel}} {{pd.chanel_name}}" style = "cursor: pointer;" > < / a >
< / td >
< / tr >
{% endfor %}
< / table >
< br / > < span class = "add-button" title = "{{lang.words.add|title()}} PagerDuty {{lang.words.channel|title()}}" id = "add-pd-button" > + {{lang.words.add|title()}}< / span >
< br / > < br / >
< table class = "overflow" >
2023-03-19 15:51:58 +00:00
< caption > < i class = "fas fa-envelope-open-text caption-icon" > < / i > < h3 > {{lang.words.test2|title()}} {{lang.words.message}}< / h3 > < / caption >
2022-06-15 07:34:20 +00:00
< tr class = "overviewHead" >
2023-02-13 14:45:45 +00:00
< td class = "padding10 first-collumn" style = "width: 45%" > {{lang.words.email|title()}}< / td >
< td style = "width: 100%" > {{lang.words.web_panel|title()}}< / td >
2022-06-15 07:34:20 +00:00
< / tr >
< tr >
< td class = "padding10 first-collumn" >
2023-02-13 14:45:45 +00:00
< button title = "{{lang.phrases.send_test_mes}} {{lang.words.via}} {{lang.words.email}}" onclick = "checkEmail()" > {{lang.words.test|title()}}< / button >
2022-06-15 07:34:20 +00:00
< / td >
< td >
2023-02-13 14:45:45 +00:00
< button title = "{{lang.phrases.send_test_mes}} {{lang.words.via}} {{lang.words.web_panel}}" onclick = "checkWebPanel()" > {{lang.words.test|title()}}< / button >
2022-06-15 07:34:20 +00:00
< / td >
< / tr >
< / table >
< br / > < br / >
< div id = "ajax-telegram" > < / div >
< div class = "add-note alert addName alert-info" style = "width: inherit; margin-right: 15px;" >
2023-02-13 14:45:45 +00:00
{{lang.phrases.read_about_parameters}} < a href = "https://roxy-wi.org/description/checker" title = "Servers description" target = "_blank" > {{lang.words.here}}< / a > ,
2023-04-15 21:26:54 +00:00
< a href = "https://roxy-wi.org/howto/create-telegram-bot" title = "How to create Telegram bot and use it with Roxy-WI" target = "_blank" > {{lang.phrases.howto_user}} Telegram bot< / a > ,
< a href = "https://roxy-wi.org/howto/create-slack-app" title = "How to create Slack APP and use it with Roxy-WI" target = "_blank" > {{lang.phrases.howto_user}} Slack APP< / a > ,
< a href = "https://roxy-wi.org/howto/create-pd-integration" title = "How to create PagerDuty integration and use it with Roxy-WI" target = "_blank" > {{lang.phrases.howto_user}} PagerDuty< / a > .
2022-06-15 07:34:20 +00:00
< / div >
< / div >
< div id = "checker_settings" >
2023-04-15 21:26:54 +00:00
< table class = "overview-overflow checker_settings_table" id = "checker_haproxy_table" >
2023-03-19 15:51:58 +00:00
< caption > < i class = "fas fa-network-wired caption-icon" > < / i > < h3 > HAProxy {{lang.words.servers}}< / h3 > < / caption >
2022-06-15 07:34:20 +00:00
< tr class = "overviewHead" >
2023-02-13 14:45:45 +00:00
< td class = "padding10 first-collumn" > {{lang.words.server|title()}}< / td >
2023-09-17 09:42:39 +00:00
< td class = "first-collumn" title = "{{lang.words.alert|title()}} {{lang.words.via}} Telegram" style = "width: 15%;" > Telegram< / td >
< td class = "first-collumn" title = "{{lang.words.alert|title()}} {{lang.words.via}} Slack" style = "width: 15%;" > Slack< / td >
< td class = "first-collumn" title = "{{lang.words.alert|title()}} {{lang.words.via}} PagerDuty" style = "width: 15%;" > PagerDuty< / td >
2023-02-13 14:45:45 +00:00
< td class = "checkbox-head" style = "width: 10%;" title = "{{lang.words.alert|title()}} {{lang.words.via}} {{lang.words.email}}" > {{lang.words.email|title()}}< / td >
< td class = "checkbox-head" style = "width: 10%;" title = "{{lang.phrases.alert_service_change_status}}" > {{lang.words.service|title()}}< / td >
< td class = "checkbox-head" style = "width: 10%;" title = "{{lang.phrases.alert_backend_change_status}}" > {{lang.words.backend|title()}}< / td >
< td class = "checkbox-head" style = "width: 100%;" title = "{{lang.phrases.alert_number_conn}}" > Maxconn< / td >
< td > < span onclick = "loadchecker(1)" class = "refresh" title = "{{lang.words.refresh2|title()}}" > < / span > < / td >
2022-06-15 07:34:20 +00:00
< / tr >
{% for s in haproxy_servers %}
{% for h in haproxy_settings %}
{% if h.server_id|string() == s.0|string() and h.service_id == 1 %}
< tr id = "haproxy_server_tr_id-{{h.id}}" >
< td class = "padding10 first-collumn" id = "haproxy_server_name-{{h.id}}" > {{s.1}}< / td >
2023-02-13 14:45:45 +00:00
< td id = "haproxy_server_telegram-{{h.id}}" title = "{{lang.words.alert|title()}} {{lang.words.via}} {{lang.words.this3}} {{lang.words.channel}}" >
2022-06-15 07:34:20 +00:00
< select id = "haproxy_server_telegram_channel-{{h.id}}" >
2023-02-13 14:45:45 +00:00
< option value = "0" > {{lang.words.disabled|title()}}< / option >
2022-06-15 07:34:20 +00:00
{% for t in telegrams %}
{% if h.telegram_id|int() == t.id|int() %}
< option value = "{{t.id}}" selected > {{t.chanel_name}}< / option >
{% else %}
< option value = "{{t.id}}" > {{t.chanel_name}}< / option >
{% endif %}
{% endfor %}
< / select >
< / td >
2023-02-13 14:45:45 +00:00
< td id = "haproxy_server_slack-{{s.0}}" title = "{{lang.words.alert|title()}} {{lang.words.via}} {{lang.words.this3}} {{lang.words.channel}}" >
2022-06-15 07:34:20 +00:00
< select id = "haproxy_server_slack_channel-{{h.id}}" >
2023-02-13 14:45:45 +00:00
< option value = "0" > {{lang.words.disabled|title()}}< / option >
2022-06-15 07:34:20 +00:00
{% for t in slacks %}
{% if h.slack_id|int() == t.id|int() %}
< option value = "{{t.id}}" selected > {{t.chanel_name}}< / option >
{% else %}
< option value = "{{t.id}}" > {{t.chanel_name}}< / option >
{% endif %}
{% endfor %}
< / select >
< / td >
2023-04-15 21:26:54 +00:00
< td id = "haproxy_server_pd-{{s.0}}" title = "{{lang.words.alert|title()}} {{lang.words.via}} {{lang.words.this3}} {{lang.words.channel}}" >
< select id = "haproxy_server_pd_channel-{{h.id}}" >
< option value = "0" > {{lang.words.disabled|title()}}< / option >
{% for t in pds %}
{% if h.pd_id|int() == t.id|int() %}
< option value = "{{t.id}}" selected > {{t.chanel_name}}< / option >
{% else %}
< option value = "{{t.id}}" > {{t.chanel_name}}< / option >
{% endif %}
{% endfor %}
< / select >
< / td >
2023-02-13 14:45:45 +00:00
< td class = "checkbox" title = "{{lang.words.alert|title()}} {{lang.words.via}} {{lang.words.email}}" >
2022-06-15 07:34:20 +00:00
{% set id = 'haproxy_server_email-' + h.id|string() %}
{% if h.email == 1 %}
{{ checkbox(id, checked='checked') }}
2021-02-20 07:47:33 +00:00
{% else %}
2022-06-15 07:34:20 +00:00
{{ checkbox(id) }}
2021-02-20 07:47:33 +00:00
{% endif %}
2022-06-15 07:34:20 +00:00
< / td >
< td class = "checkbox" >
{% set id = 'haproxy_server_status-' + h.id|string() %}
{% if h.service_alert == 1 %}
2023-02-13 14:45:45 +00:00
{{ checkbox(id, checked='checked', title=lang.phrases.alert_service_change_status) }}
2022-06-15 07:34:20 +00:00
{% else %}
2023-02-13 14:45:45 +00:00
{{ checkbox(id, title=lang.phrases.alert_service_change_status) }}
2022-06-15 07:34:20 +00:00
{% endif %}
< / td >
< td class = "checkbox" >
{% set id = 'haproxy_server_backend-' + h.id|string() %}
{% if h.backend_alert == 1 %}
2023-02-13 14:45:45 +00:00
{{ checkbox(id, checked='checked', title=lang.phrases.alert_backend_change_status) }}
2022-06-15 07:34:20 +00:00
{% else %}
2023-02-13 14:45:45 +00:00
{{ checkbox(id, title=lang.phrases.alert_backend_change_status) }}
2022-06-15 07:34:20 +00:00
{% endif %}
< / td >
< td class = "checkbox" >
{% set id = 'haproxy_server_maxconn-' + h.id|string() %}
{% if h.maxconn_alert == 1 %}
2023-02-13 14:45:45 +00:00
{{ checkbox(id, checked='checked', title=lang.phrases.alert_number_conn) }}
2022-06-15 07:34:20 +00:00
{% else %}
2023-02-13 14:45:45 +00:00
{{ checkbox(id, title=lang.phrases.alert_number_conn) }}
2022-06-15 07:34:20 +00:00
{% endif %}
< / td >
< td > < / td >
< / tr >
2021-02-20 07:47:33 +00:00
{% endif %}
2022-06-15 07:34:20 +00:00
{% endfor %}
{% endfor %}
< / table >
2023-04-15 21:26:54 +00:00
< table class = "overview-overflow checker_settings_table" id = "checker_nginx_table" >
2023-03-19 15:51:58 +00:00
< caption > < i class = "fas fa-sitemap caption-icon" > < / i > < h3 > NGINX {{lang.words.servers}}< / h3 > < / caption >
2022-06-15 07:34:20 +00:00
< tr class = "overviewHead" >
2023-02-13 14:45:45 +00:00
< td class = "padding10 first-collumn" > {{lang.words.server|title()}}< / td >
2023-09-17 09:42:39 +00:00
< td class = "first-collumn" title = "{{lang.words.alert|title()}} {{lang.words.via}} Telegram" style = "width: 15%;" > Telegram< / td >
< td class = "first-collumn" title = "{{lang.words.alert|title()}} {{lang.words.via}} Slack" style = "width: 15%;" > Slack< / td >
< td class = "first-collumn" title = "{{lang.words.alert|title()}} {{lang.words.via}} PagerDuty" style = "width: 15%;" > PagerDuty< / td >
2023-02-13 14:45:45 +00:00
< td class = "checkbox-head" style = "width: 10%;" title = "{{lang.words.alert|title()}} {{lang.words.via}} {{lang.words.email}}" > {{lang.words.email|title()}}< / td >
< td class = "checkbox-head" style = "width: 100%;" title = {{lang.phrases.alert_service_change_status}} > {{lang.words.service|title()}}< / td >
< td > < span onclick = "loadchecker(1)" class = "refresh" title = "{{lang.words.refresh2|title()}}" > < / span > < / td >
2022-06-15 07:34:20 +00:00
< / tr >
{% for s in nginx_servers %}
{% for h in nginx_settings %}
{% if h.server_id|string() == s.0|string() and h.service_id == 2 %}
< tr id = "nginx_server_tr_id-{{h.id}}" >
< td class = "padding10 first-collumn" id = "nginx_server_name-{{h.id}}" > {{s.1}}< / td >
2023-02-13 14:45:45 +00:00
< td id = "nginx_server_telegram-{{h.id}}" title = "{{lang.words.alert|title()}} {{lang.words.via}} {{lang.words.this3}} {{lang.words.channel}}" >
2022-06-15 07:34:20 +00:00
< select id = "nginx_server_telegram_channel-{{h.id}}" >
< option value = "0" > Disabled< / option >
{% for t in telegrams %}
{% if h.telegram_id|int() == t.id|int() %}
< option value = "{{t.id}}" selected > {{t.chanel_name}}< / option >
{% else %}
< option value = "{{t.id}}" > {{t.chanel_name}}< / option >
{% endif %}
{% endfor %}
< / select >
< / td >
2023-02-13 14:45:45 +00:00
< td id = "nginx_server_slack-{{h.id}}" title = "{{lang.words.alert|title()}} {{lang.words.via}} {{lang.words.this3}} {{lang.words.channel}}" >
2022-06-15 07:34:20 +00:00
< select id = "nginx_server_slack_channel-{{h.id}}" >
2023-02-13 14:45:45 +00:00
< option value = "0" > {{lang.words.disabled|title()}}< / option >
2022-06-15 07:34:20 +00:00
{% for t in slacks %}
{% if h.slack_id|int() == t.id|int() %}
< option value = "{{t.id}}" selected > {{t.chanel_name}}< / option >
{% else %}
< option value = "{{t.id}}" > {{t.chanel_name}}< / option >
{% endif %}
{% endfor %}
< / select >
< / td >
2023-04-15 21:26:54 +00:00
< td id = "nginx_server_pd-{{h.id}}" title = "{{lang.words.alert|title()}} {{lang.words.via}} {{lang.words.this3}} {{lang.words.channel}}" >
< select id = "nginx_server_pd_channel-{{h.id}}" >
< option value = "0" > {{lang.words.disabled|title()}}< / option >
{% for t in pds %}
{% if h.pd_id|int() == t.id|int() %}
< option value = "{{t.id}}" selected > {{t.chanel_name}}< / option >
{% else %}
< option value = "{{t.id}}" > {{t.chanel_name}}< / option >
{% endif %}
{% endfor %}
< / select >
< / td >
2022-06-15 07:34:20 +00:00
< td class = "checkbox" >
{% set id = 'nginx_server_email-' + h.id|string() %}
{% if h.email == 1 %}
2023-02-13 14:45:45 +00:00
{{ checkbox(id, checked='checked', title=lang.words.alert|title()+' '+lang.words.via + ' '+lang.words.email) }}
2022-06-15 07:34:20 +00:00
{% else %}
2023-02-13 14:45:45 +00:00
{{ checkbox(id, title=lang.words.alert|title()+' '+lang.words.via + ' '+lang.words.email) }}
2022-06-15 07:34:20 +00:00
{% endif %}
< / td >
< td class = "checkbox" >
{% set id = 'nginx_server_status-' + h.id|string() %}
{% if h.service_alert == 1 %}
2023-02-13 14:45:45 +00:00
{{ checkbox(id, checked='checked', title=lang.phrases.alert_service_change_status) }}
2022-06-15 07:34:20 +00:00
{% else %}
2023-02-13 14:45:45 +00:00
{{ checkbox(id, title=lang.phrases.alert_service_change_status) }}
2022-06-15 07:34:20 +00:00
{% endif %}
< / td >
< td > < / td >
< / tr >
2021-04-17 17:38:08 +00:00
{% endif %}
2022-06-15 07:34:20 +00:00
{% endfor %}
{% endfor %}
< / table >
2023-04-15 21:26:54 +00:00
< table class = "overview-overflow checker_settings_table" id = "checker_apache_table" >
2023-03-19 15:51:58 +00:00
< caption > < i class = "fas fa-feather-alt caption-icon" > < / i > < h3 > Apache {{lang.words.servers}}< / h3 > < / caption >
2022-06-15 07:34:20 +00:00
< tr class = "overviewHead" >
2023-02-13 14:45:45 +00:00
< td class = "padding10 first-collumn" > {{lang.words.server|title()}}< / td >
2023-09-17 09:42:39 +00:00
< td class = "first-collumn" title = "{{lang.words.alert|title()}} {{lang.words.via}} Telegram" style = "width: 15%;" > Telegram< / td >
< td class = "first-collumn" title = "{{lang.words.alert|title()}} {{lang.words.via}} Slack" style = "width: 15%;" > Slack< / td >
< td class = "first-collumn" title = "{{lang.words.alert|title()}} {{lang.words.via}} PagerDuty" style = "width: 15%;" > PagerDuty< / td >
2023-02-13 14:45:45 +00:00
< td class = "checkbox-head" style = "width: 10%;" > {{lang.words.email|title()}}< / td >
< td class = "checkbox-head" style = "width: 100%;" title = "{{lang.phrases.alert_service_change_status}}" > {{lang.words.service|title()}}< / td >
< td > < span onclick = "loadchecker(1)" class = "refresh" title = "{{lang.words.refresh2|title()}}" > < / span > < / td >
2022-06-15 07:34:20 +00:00
< / tr >
{% for s in apache_servers %}
{% for h in apache_settings %}
{% if h.server_id|string() == s.0|string() and h.service_id == 4 %}
< tr id = "apache_server_tr_id-{{h.id}}" >
< td class = "padding10 first-collumn" id = "apache_server_name-{{h.id}}" > {{s.1}}< / td >
2023-02-13 14:45:45 +00:00
< td id = "apache_server_telegram-{{h.id}}" title = "{{lang.words.alert|title()}} {{lang.words.via}} {{lang.words.this3}} {{lang.words.channel}}" >
2022-06-15 07:34:20 +00:00
< select id = "apache_server_telegram_channel-{{h.id}}" >
2023-02-13 14:45:45 +00:00
< option value = "0" > {{lang.words.disabled|title()}}< / option >
2022-06-15 07:34:20 +00:00
{% for t in telegrams %}
{% if h.telegram_id|int() == t.id|int() %}
< option value = "{{t.id}}" selected > {{t.chanel_name}}< / option >
{% else %}
< option value = "{{t.id}}" > {{t.chanel_name}}< / option >
{% endif %}
{% endfor %}
< / select >
< / td >
2023-02-13 14:45:45 +00:00
< td id = "apache_server_slack-{{h.id}}" title = "{{lang.words.alert|title()}} {{lang.words.via}} {{lang.words.this3}} {{lang.words.channel}}" >
2022-06-15 07:34:20 +00:00
< select id = "apache_server_slack_channel-{{h.id}}" >
2023-02-13 14:45:45 +00:00
< option value = "0" > {{lang.words.disabled|title()}}< / option >
2022-06-15 07:34:20 +00:00
{% for t in slacks %}
{% if h.slack_id|int() == t.id|int() %}
< option value = "{{t.id}}" selected > {{t.chanel_name}}< / option >
{% else %}
< option value = "{{t.id}}" > {{t.chanel_name}}< / option >
{% endif %}
{% endfor %}
< / select >
< / td >
2023-04-15 21:26:54 +00:00
< td id = "apache_server_pd-{{h.id}}" title = "{{lang.words.alert|title()}} {{lang.words.via}} {{lang.words.this3}} {{lang.words.channel}}" >
< select id = "apache_server_pd_channel-{{h.id}}" >
< option value = "0" > {{lang.words.disabled|title()}}< / option >
{% for t in pds %}
{% if h.pd_id|int() == t.id|int() %}
< option value = "{{t.id}}" selected > {{t.chanel_name}}< / option >
{% else %}
< option value = "{{t.id}}" > {{t.chanel_name}}< / option >
{% endif %}
{% endfor %}
< / select >
< / td >
2022-06-15 07:34:20 +00:00
< td class = "checkbox" >
{% set id = 'apache_server_email-' + h.id|string() %}
{% if h.email == 1 %}
2023-02-13 14:45:45 +00:00
{{ checkbox(id, checked='checked', title=lang.words.alert|title()+' '+lang.words.via + ' '+lang.words.email) }}
2022-06-15 07:34:20 +00:00
{% else %}
2023-02-13 14:45:45 +00:00
{{ checkbox(id, title=lang.words.alert|title()+' '+lang.words.via + ' '+lang.words.email) }}
2022-06-15 07:34:20 +00:00
{% endif %}
< / td >
< td class = "checkbox" >
{% set id = 'apache_server_status-' + h.id|string() %}
{% if h.service_alert == 1 %}
2023-02-13 14:45:45 +00:00
{{ checkbox(id, checked='checked', title=lang.phrases.alert_service_change_status) }}
2021-04-17 17:38:08 +00:00
{% else %}
2023-02-13 14:45:45 +00:00
{{ checkbox(id, title=lang.phrases.alert_service_change_status) }}
2021-04-17 17:38:08 +00:00
{% endif %}
2022-06-15 07:34:20 +00:00
< / td >
< td > < / td >
< / tr >
{% endif %}
{% endfor %}
{% endfor %}
< / table >
2023-04-15 21:26:54 +00:00
< table class = "overview-overflow checker_settings_table" id = "checker_keepalived_table" >
2023-03-19 15:51:58 +00:00
< caption > < i class = "fas fa-cloud caption-icon" > < / i > < h3 > Keepalived {{lang.words.servers}}< / h3 > < / caption >
2022-06-15 07:34:20 +00:00
< tr class = "overviewHead" >
2023-02-13 14:45:45 +00:00
< td class = "padding10 first-collumn" > {{lang.words.server|title()}}< / td >
2023-09-17 09:42:39 +00:00
< td class = "first-collumn" title = "{{lang.words.alert|title()}} {{lang.words.via}} Telegram" style = "width: 15%;" > Telegram< / td >
< td class = "first-collumn" title = "{{lang.words.alert|title()}} {{lang.words.via}} Slack" style = "width: 15%;" > Slack< / td >
< td class = "first-collumn" title = "{{lang.words.alert|title()}} {{lang.words.via}} PagerDuty" style = "width: 15%;" > PagerDuty< / td >
2023-02-13 14:45:45 +00:00
< td class = "checkbox-head" style = "width: 10%;" > {{lang.words.email|title()}}< / td >
< td class = "checkbox-head" style = "width: 10%;" title = "{{lang.phrases.alert_service_change_status}}" > {{lang.words.service|title()}}< / td >
< td class = "checkbox-head" style = "width: 100%;" title = "{{lang.phrases.alert_master_backup}}" > {{lang.words.status|title()}}< / td >
< td > < span onclick = "loadchecker(1)" class = "refresh" title = "{{lang.words.refresh2|title()}}" > < / span > < / td >
2022-06-15 07:34:20 +00:00
< / tr >
{% for s in keepalived_servers %}
{% for h in keepalived_settings %}
{% if h.server_id|string() == s.0|string() and h.service_id == 3 %}
< tr id = "keepalived_server_tr_id-{{h.id}}" >
< td class = "padding10 first-collumn" id = "keepalived_server_name-{{h.id}}" > {{s.1}}< / td >
2023-02-13 14:45:45 +00:00
< td id = "keepalived_server_telegram-{{h.id}}" title = "{{lang.words.alert|title()}} {{lang.words.via}} {{lang.words.this3}} {{lang.words.channel}}" >
2022-06-15 07:34:20 +00:00
< select id = "keepalived_server_telegram_channel-{{h.id}}" >
2023-02-13 14:45:45 +00:00
< option value = "0" > {{lang.words.disabled|title()}}< / option >
2022-06-15 07:34:20 +00:00
{% for t in telegrams %}
{% if h.telegram_id|int() == t.id|int() %}
< option value = "{{t.id}}" selected > {{t.chanel_name}}< / option >
{% else %}
< option value = "{{t.id}}" > {{t.chanel_name}}< / option >
{% endif %}
2021-04-17 17:38:08 +00:00
{% endfor %}
2022-06-15 07:34:20 +00:00
< / select >
< / td >
2023-02-13 14:45:45 +00:00
< td id = "keepalived_server_slack-{{h.id}}" title = "{{lang.words.alert|title()}} {{lang.words.via}} {{lang.words.this3}} {{lang.words.channel}}" >
2022-06-15 07:34:20 +00:00
< select id = "keepalived_server_slack_channel-{{h.id}}" >
2023-02-13 14:45:45 +00:00
< option value = "0" > {{lang.words.disabled|title()}}< / option >
2022-06-15 07:34:20 +00:00
{% for t in slacks %}
{% if h.slack_id|int() == t.id|int() %}
< option value = "{{t.id}}" selected > {{t.chanel_name}}< / option >
{% else %}
< option value = "{{t.id}}" > {{t.chanel_name}}< / option >
{% endif %}
{% endfor %}
< / select >
< / td >
2023-04-15 21:26:54 +00:00
< td id = "keepalived_server_pd-{{h.id}}" title = "{{lang.words.alert|title()}} {{lang.words.via}} {{lang.words.this3}} {{lang.words.channel}}" >
< select id = "keepalived_server_pd_channel-{{h.id}}" >
< option value = "0" > {{lang.words.disabled|title()}}< / option >
{% for t in pds %}
{% if h.pd_id|int() == t.id|int() %}
< option value = "{{t.id}}" selected > {{t.chanel_name}}< / option >
{% else %}
< option value = "{{t.id}}" > {{t.chanel_name}}< / option >
{% endif %}
{% endfor %}
< / select >
< / td >
2022-06-15 07:34:20 +00:00
< td class = "checkbox" >
{% set id = 'keepalived_server_email-' + h.id|string() %}
{% if h.email == 1 %}
2023-02-13 14:45:45 +00:00
{{ checkbox(id, checked='checked', title=lang.words.alert|title()+' '+lang.words.via + ' '+lang.words.email) }}
2022-06-15 07:34:20 +00:00
{% else %}
2023-02-13 14:45:45 +00:00
{{ checkbox(id, title=lang.words.alert|title()+' '+lang.words.via + ' '+lang.words.email) }}
2022-06-15 07:34:20 +00:00
{% endif %}
< / td >
< td class = "checkbox" >
{% set id = 'keepalived_server_status-' + h.id|string() %}
{% if h.service_alert == 1 %}
2023-02-13 14:45:45 +00:00
{{ checkbox(id, checked='checked', title=lang.phrases.alert_service_change_status) }}
2022-06-15 07:34:20 +00:00
{% else %}
2023-02-13 14:45:45 +00:00
{{ checkbox(id, title=lang.phrases.alert_service_change_status) }}
2022-06-15 07:34:20 +00:00
{% endif %}
< / td >
< td class = "checkbox" >
{% set id = 'keepalived_server_backend-' + h.id|string() %}
{% if h.backend_alert == 1 %}
2023-02-13 14:45:45 +00:00
{{ checkbox(id, checked='checked', title=lang.phrases.alert_master_backup) }}
2022-06-15 07:34:20 +00:00
{% else %}
2023-02-13 14:45:45 +00:00
{{ checkbox(id, title=lang.phrases.alert_master_backup) }}
2022-06-15 07:34:20 +00:00
{% endif %}
< / td >
< td > < / td >
< / tr >
2021-04-17 17:38:08 +00:00
{% endif %}
2022-06-15 07:34:20 +00:00
{% endfor %}
{% endfor %}
< / table >
2021-02-20 07:47:33 +00:00
< / div >
2022-06-15 07:34:20 +00:00
< / div >
{% endif %}
2021-02-20 07:47:33 +00:00
{% endif %}
{% endfor %}
2022-06-15 07:34:20 +00:00
{% endif %}
2023-09-17 09:42:39 +00:00
{% include 'include/admins_dialogs.html' %}