Working on the DHCP table

master
Andy Teijelo Pérez 2015-11-04 15:31:57 -05:00
parent 2a1a8d9e94
commit 11311dfe8a
4 changed files with 10 additions and 31 deletions

View File

@ -19,6 +19,7 @@ app.secret_key = "6ab77f3c45447429c2ae163c260a626029519a66450e474c"
debug = True
users_file = "/etc/freeradius/users.dpto2"
dhcp_hosts_file = "/etc/dnsmasq.d/dpto2/dhcp_hosts"
def reload_freeradius():
call("./reload_freeradius")
@ -161,14 +162,18 @@ 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("/logout")
def logout():
session.pop("logged_in",None)
return redirect(url_for("index"))
if __name__ == '__main__':
if "debug" in sys.argv:
users_file = "users.dpto2"
dhcp_hosts_file = "dhcp_hosts.dpto2"
app.debug = True
app.run(host="0.0.0.0")

View File

@ -1,28 +0,0 @@
.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;
}
.edges {
font-family: monospace;
line-height: initial;
}

View File

@ -75,7 +75,9 @@
</div>
</form>
</div>
<div class="row"><a href="{{ url_for('list_users') }}">Lista de usuarios</a></div>
<div class="row"><a href="{{ url_for('logout') }}">Cerrar sesión</a></div>
<div class="row"><a href="{{ url_for('dhcp') }}">Reservas de DHCP</a></div>
{% endblock %}

View File

@ -9,7 +9,7 @@
<!-- Bootstrap -->
<link href="{{ static('css/bootstrap.min.css') }}" rel="stylesheet">
<link href="{{ static('css/font-awesome.min.css') }}" rel="stylesheet">
<link href="{{ static('css/isabel.css') }}" rel="stylesheet">
<link href="{{ static('css/dpto2.css') }}" rel="stylesheet">
<link href="{{ static('img/icon.png') }}" rel="icon"/>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
@ -28,7 +28,7 @@
</head>
<body>
<div class="container" style="width: 600px;">
<div class="container main-container">
{% block content %}
{% endblock %}
</div>