|
|
@ -2,130 +2,155 @@ |
|
|
{% block content %} |
|
|
{% block content %} |
|
|
|
|
|
|
|
|
<div class="row"> |
|
|
<div class="row"> |
|
|
<div class="col-sm-6"> |
|
|
|
|
|
<div class="panel panel-default"> |
|
|
|
|
|
<div class="panel-heading"> |
|
|
|
|
|
<h3 class="panel-title">Лог устройства</h3> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="panel-body"> |
|
|
|
|
|
<table class="table table-responsive"> |
|
|
|
|
|
<thead> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td>ID</td> |
|
|
|
|
|
<td>уровень</td> |
|
|
|
|
|
<td>описание</td> |
|
|
|
|
|
<td>дата</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">Что-то ещё</h3> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="panel-body"> |
|
|
|
|
|
<h2>тут содержимое чего-то ещё</h2> |
|
|
|
|
|
|
|
|
<div class="col-sm-12"> |
|
|
|
|
|
<div class="panel panel-default"> |
|
|
|
|
|
<div class="panel-heading"> |
|
|
|
|
|
<div class="panel-title">{{ dev.get_devtype_display|default:'Название типа свича' }}, без |
|
|
|
|
|
перезагрузки {{ 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.id port.num 1 %}" class="btn btn-success"> |
|
|
|
|
|
<span class="glyphicon glyphicon-ok"></span> |
|
|
|
|
|
</a> |
|
|
|
|
|
<a href="{% url 'devapp:port_toggle' dev.id port.num 0 %}" class="btn btn-danger"> |
|
|
|
|
|
<span class="glyphicon glyphicon-off"></span> |
|
|
|
|
|
</a> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
{% empty %} |
|
|
|
|
|
<h3>Инфа не получена, проверьте настройки :(</h3> |
|
|
|
|
|
{% endfor %} |
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="row"> |
|
|
<div class="row"> |
|
|
<div class="col-sm-12"> |
|
|
|
|
|
<div class="switch_ports"> |
|
|
|
|
|
<h4>{{ dev.get_devtype_display|default:'Название типа свича' }}, без перезагрузки {{ uptime }}</h4> |
|
|
|
|
|
|
|
|
|
|
|
{% 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.id port.num 1 %}" class="btn btn-success"> |
|
|
|
|
|
<span class="glyphicon glyphicon-ok"></span> |
|
|
|
|
|
</a> |
|
|
|
|
|
<a href="{% url 'devapp:port_toggle' dev.id port.num 0 %}" class="btn btn-danger"> |
|
|
|
|
|
<span class="glyphicon glyphicon-off"></span> |
|
|
|
|
|
</a> |
|
|
|
|
|
|
|
|
<div class="col-sm-6"> |
|
|
|
|
|
<div class="panel panel-default"> |
|
|
|
|
|
<div class="panel-heading"> |
|
|
|
|
|
<h3 class="panel-title">Лог устройства</h3> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="panel-body"> |
|
|
|
|
|
<table class="table table-responsive"> |
|
|
|
|
|
<thead> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td>ID</td> |
|
|
|
|
|
<td>уровень</td> |
|
|
|
|
|
<td>описание</td> |
|
|
|
|
|
<td>дата</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> |
|
|
{% empty %} |
|
|
|
|
|
<h3>Инфа не получена, проверьте настройки :(</h3> |
|
|
|
|
|
{% endfor %} |
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="col-sm-6"> |
|
|
|
|
|
<div class="panel panel-default"> |
|
|
|
|
|
<div class="panel-heading"> |
|
|
|
|
|
<h3 class="panel-title">Комментарии портов</h3> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="panel-body"> |
|
|
|
|
|
<table class="table table-responsive"> |
|
|
|
|
|
<thead> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<th width="50">Порт</th> |
|
|
|
|
|
<th>Название</th> |
|
|
|
|
|
</tr> |
|
|
|
|
|
</thead> |
|
|
|
|
|
<tbody> |
|
|
|
|
|
{% for port in ports %} |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td>{{ port.num }}</td> |
|
|
|
|
|
<td>{{ port.nm|default:"<не назначен>" }}</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
{% empty %} |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td colspan="2">инфа о портах не получена</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
{% endfor %} |
|
|
|
|
|
</tbody> |
|
|
|
|
|
</table> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
{% endblock %} |
|
|
{% endblock %} |