smallnet/templates/ips.html

81 lines
2.5 KiB
HTML
Raw Permalink Normal View History

2015-11-05 09:14:38 -05:00
{% extends "base.html" %}
{% block title %}Subir Circuito{% endblock %}
{% block head %}
{{ super() }}
{% endblock %}
{% block content %}
2015-11-06 15:34:58 -05:00
<div class="row">
<h3>Asignaciones de IPs</h3>
</div>
<div class="row" style="padding-bottom: 1em;">
<b>Red:</b> <span>10.6.122.0/24</span>
<b>Gateway:</b> <span>10.6.122.1</span>
<b>DNS:</b> <span>10.6.100.66, 10.6.100.67</span>
</div>
2015-11-05 09:14:38 -05:00
<div class="row">
{% for row in range(16) %}
<div class="ips-row">
{% for col in range(16) -%}
{% set ip = row*16 + col %}
2015-11-05 10:12:58 -05:00
{% set unusable = ip == 0 or ip == 255 %}
{% set usable = not unusable %}
<a {% if usable %}href="ip/{{ ip }}"{% endif %}>
2015-11-05 09:14:38 -05:00
<div class="ips-cell
2015-11-05 10:12:58 -05:00
{%- if row == 0 %} ips-top{% endif %}
{%- if col == 0 %} ips-left{% endif %}
{%- if row == 15 %} ips-bottom{% endif %}
{%- if col == 15 %} ips-right{% endif %}
{%- if col == 7 %} ips-ver-half{% endif %}
{%- if row == 7 %} ips-hor-half{% endif %}
{% if unusable %} unusable{% endif %}
{%- if ipmap[ip].dhcp_pool %} dhcp-pool{% endif -%}
2015-11-05 10:12:58 -05:00
">
2015-11-06 11:58:05 -05:00
<div style="display: inline-block; max-height: 52px;">
2015-11-07 23:19:29 -05:00
<div class="name
{%- if ipmap[ip].color %} c-{{ ipmap[ip].color }}
{%- else %} c-black
{%- endif %}">
{% if ipmap[ip].dhcp_pool %}
2015-11-06 11:58:05 -05:00
DHCP
{% else %}
{{ ipmap[ip].reserved_by }}
{% endif %}
</div>
<div style="height: 10px;"></div>
2015-11-05 09:14:38 -05:00
</div>
2015-11-05 10:12:58 -05:00
{% if usable %}
2015-11-05 12:15:35 -05:00
{% if ipmap[ip].locked %}
2015-11-05 10:12:58 -05:00
<span class="lock"><i class="fa fa-lock"></i></span>
{% endif %}
2016-07-05 13:02:34 -04:00
{% if not ipmap[ip].locked and ip in leases %}
<span class="leased"><i class="fa fa-circle"></i></span>
{% endif %}
2015-11-05 09:14:38 -05:00
<span class="ip">.{{ row*16 + col }}</span>
2015-11-05 10:12:58 -05:00
{% endif %}
2015-11-05 09:14:38 -05:00
</div>
</a>
{%- endfor %}
</div>
{% endfor %}
</div>
2015-11-06 15:34:58 -05:00
<div class="row" style="padding-bottom: 3em; padding-top: 1em;"><a href="{{ url_for('admin') }}">Regresar</a></div>
2015-11-05 10:12:58 -05:00
<script>
$(function() {
$(".ips-cell:not(.unusable)").hover(
function() {
$(this).addClass("hover");
},
function() {
$(this).removeClass("hover");
}
);
})
</script>
2015-11-05 09:14:38 -05:00
{% endblock %}