phpservermon/src/templates/default/module/server/server/list.tpl.html

101 lines
4.1 KiB
HTML

{% import 'main/macros.tpl.html' as macro %}
{{ macro.table_search(label_search) }}
<div class="table-responsive">
<table class="table table-striped table-hover table-bordered">
<thead>
<tr>
<!--class="d-none d-lg-table-cell"-->
<th scope="col">{{ label_label }}</th>
<th scope="col">{{ label_domain }}</th>
<th scope="col" style="width: 5%;">{{ label_port }}</th>
<th scope="col" style="width: 8%;">{{ label_type }}</th>
<th scope="col" style="width: 8%;">{{ label_rtime }}</th>
<th scope="col" style="width: 10%;">{{ label_last_online }}</th>
<th scope="col" style="width: 10%;">{{ label_last_offline }}</th>
<th scope="col" style="width: 10%;">{{ label_monitoring }}</th>
{% if user_level == 10 %}
<th scope="col" style="width: 5%;">&#32</th>
{% endif %}
</tr>
<tr class="warning no-result">
<td colspan="9"><i class="fas fa-exclamation-triangle"></i> No result</td>
</tr>
</thead>
<tbody>
{% for server in servers %}
<tr>
<th scope="row">
<div class="content">
{% if server.status|lower == 'on' %}
<i class="fas fa-check-circle" title="{{ server.status }}"></i>&nbsp;
{% elseif server.status|lower == 'warning' %}
<i class="fas fa-exclamation-triangle" title="{{ server.status }}"></i>&nbsp;
{% elseif server.status|lower == 'off' %}
<i class="fas fa-times-circle" title="{{ server.status }}"></i>&nbsp;
{% endif %}
<a href="{{ server.url_view|raw }}" title="{{ label_view }}">
{{ server.label }}
</a>
</div>
</th>
<td><div class="content">{{ server.ip|raw }}</div></td>
<td>{{ server.port }}</td>
<td>{{ server.type }}</td>
<td>{{ server.rtime }}</td>
<td><div class="content">{{ server.last_online }}</div></td>
<td><div class="content">{{ server.last_offline }}</div></td>
<td>
{% if server.active|lower == 'yes'%}
<i class="fas fa-eye" title="{{ server.active_title }}"></i>
{% else %}
<i class="fas fa-eye-slash" title="{{ server.active_title }}"></i>
{% endif %}
{% if server.email|lower == 'yes' and config.email|lower%}
<i class="fas fa-envelope" title="{{ label_email }}"></i>
{% endif %}
{% if server.sms|lower == 'yes' and config.sms|lower%}
<i class="fas fa-sms" title="{{ label_sms }}"></i>
{% endif %}
{% if server.pushover|lower == 'yes'and config.pushover|lower %}
<span class="fa-layers">
<i class="fas fa-circle" title="{{ label_pushover }}"></i>
<span class="fa-layers-text fa-inverse" style="font-weight:400; font-size:75%">P</span>
</span>
{% endif %}
{% if server.telegram|lower == 'yes' and config.telegram|lower%}
<span class="fa-layers">
<i class="fas fa-circle" title="{{ label_telegram }}"></i>
<span class="fa-layers-text fa-inverse" style="font-weight:400; font-size:75%">T</span>
</span>
{% endif %}
{% if server.jabber|lower == 'yes'%}
<span class="fa-layers">
<i class="fas fa-circle" title="{{ label_jabber }}"></i>
<span class="fa-layers-text fa-inverse" style="font-weight:400; font-size:75%">J</span>
</span>
{% endif %}
</td>
{% if user_level == 10 %}
<td>
<div class="item-action dropdown">
<a data-toggle="dropdown" class="icon"><i class="fas fa-ellipsis-v"></i></a>
<div class="dropdown-menu">
<a class="dropdown-item" href="{{ server.url_view|raw }}" title="{{ label_view }}">
<i class="fas fa-eye"></i> {{ label_view }}
</a>
<a class="dropdown-item" href="{{ server.url_edit|raw }}" title="{{ label_edit }}">
<i class="fas fa-edit"></i> {{ label_edit }}
</a>
<a class="dropdown-item show-modal" href="{{ server.url_delete|raw }}" title="{{ label_delete }}" data-modal-id="delete"
data-modal-param="{{ server.label }}">
<i class="fas fa-trash"></i> {{ label_delete }}
</a>
</div>
</div>
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>