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.
 
 
 
 
 

118 lines
5.0 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">
{% with uptime=dev_manager.uptime %}
<div class="panel-heading">
<div class="panel-title">{{ dev.get_devtype_display|default:_('Title of the type of switch') }}.
{% if uptime %}
{% trans 'Uptime' %} {{ uptime }}
{% endif %}
</div>
</div>
{% endwith %}
<div class="panel-body">
{% for port in ports %}
{% if port.st %}
{% if port.sp == 10 %}
<div class="port kilo text-center">
<b>10 mbps</b>
{% elif port.sp == 100 %}
<div class="port mega text-center">
<b>100 mbps</b>
{% elif port.sp == 1000 %}
<div class="port giga text-center">
<b>1 gbps</b>
{% elif port.sp == 10000 %}
<div class="port ten text-center">
<b>10 gbps</b>
{% else %}
<div class="port text-center">
{% endif %}
{% else %}
<div class="port dis text-center">
{% endif %}
<a href="javascript:void(0);" class="port-img" title="{{ port.nm }}">
<b>{{ port.num }}</b>
</a>
{% if port.st %}
<a href="{% url 'devapp:port_toggle' dev.group.pk|default:0 dev.id port.num 0 %}" class="btn btn-xs btn-danger" title="{% trans 'Disable port' %}">
<span class="glyphicon glyphicon-off"></span>
</a>
{% else %}
<a href="{% url 'devapp:port_toggle' dev.group.pk|default:0 dev.id port.num 1 %}" class="btn btn-xs btn-success" title="{% trans 'Enable port' %}">
<span class="glyphicon glyphicon-ok"></span>
</a>
{% endif %}
</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 colspan="4">Coming soon..</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 %}