haproxy-wi/app/templates/include/smon/smon_ping_server.html

93 lines
3.3 KiB
HTML

<td class="padding10 first-collumn" style="width: 200px;">
{% set id = 'smon-name-' + s.id|string() %}
{{ input(id, value=s.name, size='20') }}
</td>
<td>
{% set id = 'smon-ip-' + s.id|string() %}
{{ input(id, value=s_service.ip, size='20') }}
</td>
<td>
{% set id = 'smon-packet_size-' + s.id|string() %}
{{ input(id, value=s_service.packet_size, style='width: 40px;', type='number') }}
</td>
<td class="checkbox">
{% set id = 'smon-enable-' + s.id|string() %}
{% if s.en == 1 %}
{{ checkbox(id, checked='checked') }}
{% else %}
{{ checkbox(id) }}
{% endif %}
</td>
<td>
<select id="smon-telegram-{{s.id}}">
<option value="0">{{lang.words.disabled|title()}}</option>
{% for t in telegrams %}
{% if s.telegram_channel_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>
<td>
<select id="smon-slack-{{s.id}}">
<option value="0">{{lang.words.disabled|title()}}</option>
{% for t in slacks %}
{% if s.slack_channel_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>
<td>
<select id="smon-pd-{{s.id}}">
<option value="0">{{lang.words.disabled|title()}}</option>
{% for t in pds %}
{% if s.pd_channel_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>
<td>
{% set id = 'smon-group-' + s.id|string() %}
{% if s.group is not none %}
{{ input(id, value=s_service.group, size='15') }}
{% else %}
{{ input(id, size='15') }}
{% endif %}
</td>
<td>
{% set id = 'smon-desc-' + s.id|string() %}
{% if s.desc is not none %}
{{ input(id, value=s.desc.strip("'"), size='20') }}
{% else %}
{{ input(id, size='20') }}
{% endif %}
</td>
<td>
<a class="add" onclick="cloneSmom({{s.id}}, 'ping')" id="clone-{{s.id}}" title="{{lang.words.clone|title()}} {{s_service.1}}" style="cursor: pointer; color: #000;"></a>
</td>
<td>
<a class="delete" onclick="confirmDeleteSmon({{s.id}}, 'ping')" title="{{lang.words.delete|title()}} {{s_service.1}}" style="cursor: pointer; color: #000;"></a>
</td>
</tr>
<script>
$( function() {
$("#smon-telegram-{{s.id}}" ).selectmenu({
width: 160
});
$("#smon-slack-{{s.id}}" ).selectmenu({
width: 160
});
$("#smon-pd-{{s.id}}" ).selectmenu({
width: 160
});
});
</script>