mirror of https://github.com/Aidaho12/haproxy-wi
106 lines
3.8 KiB
HTML
106 lines
3.8 KiB
HTML
<td class="padding10 first-collumn" style="width: 150px;">
|
|
{% set id = 'smon-name-' + s.id|string() %}
|
|
{{ input(id, value=s.name.strip("'"), size='20') }}
|
|
</td>
|
|
<td style="width: 150px;">
|
|
{% set id = 'smon-ip-' + s.id|string() %}
|
|
{{ input(id, value=s_service.ip, size='20') }}
|
|
</td>
|
|
<td>
|
|
{% set id = 'smon-resolver-' + s.id|string() %}
|
|
{{ input(id, value=s_service.resolver, size='20') }}
|
|
</td>
|
|
<td>
|
|
{% set id = 'smon-port-' + s.id|string() %}
|
|
{{ input(id, value=s_service.port, size='5') }}
|
|
</td>
|
|
<td>
|
|
{% set id = 'smon-record_type-' + s.id|string() %}
|
|
{% set check_types = {'a': 'A', 'aaa': 'AAA', 'caa': 'CAA', 'cname': 'CNAME', 'mx': 'MX', 'ns': 'NS',
|
|
'ptr': 'PTR', 'sao': 'SAO', 'srv': 'SRV', 'txt': 'TXT'} %}
|
|
{{ select(id, values=check_types, selected=s_service.record_type) }}
|
|
</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.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}}, 'dns')" id="clone-{{s.id}}" title="{{lang.words.clone|title()}} {{s.ip}}" style="cursor: pointer; color: #000;"></a>
|
|
</td>
|
|
<td>
|
|
<a class="delete" onclick="confirmDeleteSmon({{s.id}}, 'dns')" title="{{lang.words.delete|title()}} {{s.ip}}" 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
|
|
});
|
|
$("#smon-record_type-{{s.id}}" ).selectmenu({
|
|
width: 78
|
|
});
|
|
});
|
|
</script>
|