diff --git a/static/css/dpto2.css b/static/css/dpto2.css index 892b2e6..b218329 100644 --- a/static/css/dpto2.css +++ b/static/css/dpto2.css @@ -49,7 +49,6 @@ div.ips-cell.ips-bottom,div.ips-hor-half { div.name { max-height: 70px; } - span.ip { position: absolute; bottom: 2px; @@ -58,7 +57,23 @@ span.ip { font-weight: bold; font-size: x-small; } +span.lock { + position: absolute; + bottom: 2px; + left: 0.7em; + color: #aaa; + font-size: small; +} div.ips-cell.dhcp-pool { background-color: #bed; } +div.ips-cell.dhcp-pool.hover { + background-color: #acdccc; +} +div.ips-cell.hover { + background-color: #eae4ea; +} +div.ips-cell.unusable { + background-image: url(../img/unusable.png) +} diff --git a/static/img/unusable.png b/static/img/unusable.png new file mode 100644 index 0000000..9149747 Binary files /dev/null and b/static/img/unusable.png differ diff --git a/templates/ips.html b/templates/ips.html index 7390151..61a73df 100644 --- a/templates/ips.html +++ b/templates/ips.html @@ -12,16 +12,19 @@
{% for col in range(16) -%} {% set ip = row*16 + col %} - + {% set unusable = ip == 0 or ip == 255 %} + {% set usable = not unusable %} +
+ {%- 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 216 <= ip <= 239 %} dhcp-pool{% endif -%} + ">
{% if 99 <= ip <= 103 or ip == 96%} Andy @@ -29,7 +32,12 @@ DHCP {% endif %}
+ {% if usable %} + {% if ip == 14 or ip == 99 %} + + {% endif %} .{{ row*16 + col }} + {% endif %}
{%- endfor %} @@ -37,4 +45,16 @@ {% endfor %}
+ {% endblock %}