Add group page on the webgui
- Add the page groupsdb - Update menu on other pages - Add 2 function in webserver.py to display groups and delete them (not fully implemented for now)
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Access Logs</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<div class="navbar">
|
||||
<a href="/">Home</a>
|
||||
<a href="/UserDB">Users</a>
|
||||
<a href="/GroupsDB">Groups</a>
|
||||
<a href="/LogsDB">Logs</a>
|
||||
|
||||
</div>
|
||||
<div class="container"><h1>Doors and Groups Associations</h1>
|
||||
<h2>Doors</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Group CN</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for door in doors %}
|
||||
<tr>
|
||||
<td>{{ door[0] }}</td>
|
||||
<td>{{ door[1] }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<h2>Groups</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>CN</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for group in groups %}
|
||||
<tr>
|
||||
<td>{{group}}</td>
|
||||
<td>
|
||||
<form action="{{ url_for('delete_group', group_cn=group['cn']) }}" method="post">
|
||||
<button type="submit" class="delete-btn">Delete</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -10,7 +10,9 @@
|
||||
<div class="navbar">
|
||||
<a href="/">Home</a>
|
||||
<a href="/UserDB">Users</a>
|
||||
<a href="/GroupsDB">Groups</a>
|
||||
<a href="/LogsDB">Logs</a>
|
||||
|
||||
</div>
|
||||
<div class="container">
|
||||
<h1>Latest Access Logs</h1>
|
||||
|
||||
@@ -44,7 +44,9 @@
|
||||
<div class="navbar">
|
||||
<a href="/">Home</a>
|
||||
<a href="/UserDB">Users</a>
|
||||
<a href="/GroupsDB">Groups</a>
|
||||
<a href="/LogsDB">Logs</a>
|
||||
|
||||
</div>
|
||||
<div class="container">
|
||||
<h1>Access Logs</h1>
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
<div class="navbar">
|
||||
<a href="/">Home</a>
|
||||
<a href="/UserDB">Users</a>
|
||||
<a href="/GroupsDB">Groups</a>
|
||||
<a href="/LogsDB">Logs</a>
|
||||
|
||||
</div>
|
||||
<div class="container">
|
||||
<h1>Users Database</h1>
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Add Door</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Add Door</h1>
|
||||
<form action="/add_door" method="post">
|
||||
<label for="Door_id" name="Door_id">Door ID:</label>
|
||||
<input type="integer" id="Door_id" name="Door_id" required><br><br>
|
||||
<label for="group_cn">Group CN:</label>
|
||||
<select id="group_cn" name="group_cn" required>
|
||||
{% for group in existing_groups %}
|
||||
<option value="{{ group }}">{{ group }}</option>
|
||||
{% endfor %}
|
||||
</select><br><br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
<br>
|
||||
<h1>Force LDAP Synchronization</h1>
|
||||
<form action="/sync">
|
||||
<input type="submit" value="Sync LDAP">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user