You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
haproxy-wi/app/templates/include/admin_telegram.html

65 lines
2.7 KiB

{% for s in services %}
{% if s.0 == 'checker_haproxy' %}
{% if s.3 != '* is not installed' %}
<table id="checker_table" class="overview">
<tr class="overviewHead" style="width: 50%;">
<td class="padding10 first-collumn" style="width: 25%;">
<span title="Token that has given @father_bot">Token</span>
</td>
<td style="width: {% if page == "servers.py" %}100{% else %}20{% endif %}%;">Channel name</td>
{% if page != "servers.py" %}
<td style="width: 100%;">Group</td>
{% endif %}
<td></td>
<td></td>
</tr>
{% for telegram in telegrams %}
<tr id="telegram-table-{{telegram.0}}" class="{{ loop.cycle('odd', 'even') }}">
<td class="padding10 first-collumn">
{% set id = 'telegram-token-' + telegram.0|string() %}
{{ input(id, value=telegram.1, size='30') }}
</td>
<td>
{% set id = 'telegram-chanel-' + telegram.0|string() %}
{{ input(id, value=telegram.2) }}
</td>
{% if page != "servers.py" %}
<td>
<select id="telegramgroup-{{telegram.0}}" name="telegramgroup-{{telegram.0}}">
<option disabled selected>Choose group</option>
{% for group in groups %}
{% if telegram.3|string() == group.0|string() %}
<option value="{{ group.0 }}" selected>{{ group.1 }}</option>
{% else %}
<option value="{{ group.0 }}">{{ group.1 }}</option>
{% endif %}
{% endfor %}
</select>
</td>
{% endif %}
<td>
<a class="add" onclick="cloneTelegram({{telegram.0}})" id="clone-{{telegram.0}}" title="Clone {{telegram.2}}" style="cursor: pointer;"></a>
</td>
<td>
<a class="delete" onclick="confirmDeleteTelegram({{telegram.0}})" title="Delete channel {{telegram.2}}" style="cursor: pointer;"></a>
</td>
</tr>
{% endfor %}
</table>
<br /><span class="add-button" title="Add telegram channel" id="add-telegram-button">+ Add</span>
<br /><br />
<div id="ajax-telegram"></div>
<div class="add-note addName alert-info" style="width: inherit; margin-right: 15px;">
You can read the description of all parameters <a href="https://haproxy-wi.org/description.py?description=checker" title="Servers description" target="_blank">here</a>
</div>
{% else %}
<center>
<br />
<h3>You do not have installed Backends checker
Read <a href="https://haproxy-wi.org/services.py?service=checker#installation" title="Checker installation" style="color: #5d9ceb;" target="_blank">hear</a>
how to install Checker service</h3>
</center>
{% endif %}
{% endif %}
{% endfor %}