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.
157 lines
6.5 KiB
157 lines
6.5 KiB
{% extends request.is_ajax|yesno:'nullcont.htm,devapp/ext.htm' %}
|
|
{% load i18n %}
|
|
{% block content %}
|
|
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<div class="panel-title">{{ dev.get_devtype_display|default:_('Title of the type of switch') }}.
|
|
{% trans 'Uptime' %} {{ uptime }}</div>
|
|
</div>
|
|
<div class="panel-body">
|
|
|
|
{% for port in ports %}
|
|
{% if port.st %}
|
|
{% if port.sp == 10 %}
|
|
<div class="port kilo">
|
|
{% elif port.sp == 100 %}
|
|
<div class="port mega">
|
|
{% elif port.sp == 1000 %}
|
|
<div class="port giga">
|
|
{% else %}
|
|
<div class="port">
|
|
{% endif %}
|
|
{% else %}
|
|
<div class="port dis">
|
|
{% endif %}
|
|
|
|
<a href="#" class="port-img" title="{{ port.nm }}">
|
|
<b>{{ port.num }}</b>
|
|
</a>
|
|
<div class="btn-group btn-group-xs btn-group-justified">
|
|
<a href="{% url 'devapp:port_toggle' dev.user_group.pk|default:0 dev.id port.num 1 %}" class="btn btn-success">
|
|
<span class="glyphicon glyphicon-ok"></span>
|
|
</a>
|
|
<a href="{% url 'devapp:port_toggle' dev.user_group.pk|default:0 dev.id port.num 0 %}" class="btn btn-danger">
|
|
<span class="glyphicon glyphicon-off"></span>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
{% empty %}
|
|
<h3>{% trans 'We have not received info, please check options :(' %}</h3>
|
|
{% endfor %}
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-sm-6">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<h3 class="panel-title">{% trans 'Device log' %}</h3>
|
|
</div>
|
|
<div class="panel-body">
|
|
<table class="table table-responsive">
|
|
<thead>
|
|
<tr>
|
|
<td>ID</td>
|
|
<td>{% trans 'Level' %}</td>
|
|
<td>{% trans 'Description' %}</td>
|
|
<td>{% trans 'Date' %}</td>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>1</td>
|
|
<td>Err:Disable</td>
|
|
<td>port Eth1 state Down</td>
|
|
<td>21 Dec 12:14:55</td>
|
|
</tr>
|
|
<tr>
|
|
<td>2</td>
|
|
<td>Err:bug</td>
|
|
<td>port Eth1 state Up</td>
|
|
<td>21 Dec 12:15:23</td>
|
|
</tr>
|
|
<tr>
|
|
<td>3</td>
|
|
<td>Err:Other</td>
|
|
<td>port Eth1 state Up</td>
|
|
<td>21 Dec 12:15:45</td>
|
|
</tr>
|
|
<tr>
|
|
<td>1</td>
|
|
<td>Err:Disable</td>
|
|
<td>port Eth1 state Down</td>
|
|
<td>21 Dec 12:14:55</td>
|
|
</tr>
|
|
<tr>
|
|
<td>1</td>
|
|
<td>Err:Disable</td>
|
|
<td>port Eth1 state Down</td>
|
|
<td>21 Dec 12:14:55</td>
|
|
</tr>
|
|
<tr>
|
|
<td>1</td>
|
|
<td>Err:Disable</td>
|
|
<td>port Eth1 state Down</td>
|
|
<td>21 Dec 12:14:55</td>
|
|
</tr>
|
|
<tr>
|
|
<td>1</td>
|
|
<td>Err:Disable</td>
|
|
<td>port Eth1 state Down</td>
|
|
<td>21 Dec 12:14:55</td>
|
|
</tr>
|
|
<tr>
|
|
<td>1</td>
|
|
<td>Err:Disable</td>
|
|
<td>port Eth1 state Down</td>
|
|
<td>21 Dec 12:14:55</td>
|
|
</tr>
|
|
<tr>
|
|
<td>1</td>
|
|
<td>Err:Disable</td>
|
|
<td>port Eth1 state Down</td>
|
|
<td>21 Dec 12:14:55</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<h3 class="panel-title">{% trans 'Ports comment' %}</h3>
|
|
</div>
|
|
<div class="panel-body">
|
|
<table class="table table-responsive">
|
|
<thead>
|
|
<tr>
|
|
<th width="50">{% trans 'Port' %}</th>
|
|
<th>{% trans 'Title' %}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for port in ports %}
|
|
<tr>
|
|
<td>{{ port.num }}</td>
|
|
<td>{{ port.nm|default:_('Not assigned') }}</td>
|
|
</tr>
|
|
{% empty %}
|
|
<tr>
|
|
<td colspan="2">{% trans 'We have not received info for ports' %}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock %}
|