diff --git a/main.py b/main.py index e6c3f29..ed44691 100755 --- a/main.py +++ b/main.py @@ -162,9 +162,9 @@ def list_users(): lines = render_users_tree(tree) return render_template("users.html", users=lines) -@app.route("/dhcp") -def dhcp(): - return render_template("dhcp.html") +@app.route("/ips") +def ips(): + return render_template("ips.html") @app.route("/logout") def logout(): diff --git a/static/css/dpto2.css b/static/css/dpto2.css index 12cb83c..892b2e6 100644 --- a/static/css/dpto2.css +++ b/static/css/dpto2.css @@ -1,23 +1,3 @@ -.container { - width: 960px; -} - -.tests-table-header { - border-top: 0px; -} - -.cpi-average { - text-align: right; -} - -#tests-table { - margin-top: 60px; -} - -#selected-tests span { - margin-left: 0.5em; -} - div.users-tree { line-height: initial; } @@ -26,3 +6,59 @@ div.users-tree { font-family: monospace; line-height: initial; } + +div.main-container { + width: 600px; +} + +div.ips-row { + margin-bottom: 0px; + display: flex; + flex-direction: row; + justify-content: center; + /*line-height: 0;*/ +} +div.ips-cell { + display: inline-flex; + flex-direction: column; + justify-content: center; + background-color: #faf4fa; + width: 60px; + height: 60px; + margin: 0px; + border-bottom: 1px solid lightgray; + border-right: 1px solid lightgray; + text-align: center; + position: relative; + overflow: hidden; +} + +div.ips-cell.ips-top { + border-top: 1px solid #aaa; +} +div.ips-cell.ips-left { + border-left: 1px solid #aaa; +} +div.ips-cell.ips-right,div.ips-ver-half { + border-right: 1px solid #aaa; +} +div.ips-cell.ips-bottom,div.ips-hor-half { + border-bottom: 1px solid #aaa; +} + +div.name { + max-height: 70px; +} + +span.ip { + position: absolute; + bottom: 2px; + right: 0.5em; + color: #aaa; + font-weight: bold; + font-size: x-small; +} + +div.ips-cell.dhcp-pool { + background-color: #bed; +} diff --git a/templates/admin.html b/templates/admin.html index d681792..4c52423 100644 --- a/templates/admin.html +++ b/templates/admin.html @@ -77,7 +77,7 @@
Lista de usuarios
+
AsignaciĆ³n de IPs
Cerrar sesiĆ³n
-
Reservas de DHCP
{% endblock %} diff --git a/templates/ips.html b/templates/ips.html new file mode 100644 index 0000000..7390151 --- /dev/null +++ b/templates/ips.html @@ -0,0 +1,40 @@ +{% extends "base.html" %} +{% block title %}Subir Circuito{% endblock %} + +{% block head %} + {{ super() }} +{% endblock %} + +{% block content %} + +
+ {% for row in range(16) %} +
+ {% for col in range(16) -%} + {% set ip = row*16 + col %} + +
+
+ {% if 99 <= ip <= 103 or ip == 96%} + Andy + {% elif 216 <= ip <= 239 %} + DHCP + {% endif %} +
+ .{{ row*16 + col }} +
+
+ {%- endfor %} +
+ {% endfor %} +
+ +{% endblock %}