Disconnect working

This commit is contained in:
Rich
2021-07-04 15:00:08 +01:00
parent 6ce91e5c84
commit 9310e15f64
3 changed files with 92 additions and 11 deletions

View File

@@ -1,4 +1,65 @@
<doctype html="">
<title>Networks</title>
{{ table }}
</doctype>
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<style type="text/css">
.tg {
border-collapse: collapse;
border-spacing: 0;
}
.tg td {
border-color: black;
border-style: solid;
border-width: 1px;
font-family: Arial, sans-serif;
font-size: 14px;
overflow: hidden;
padding: 10px 5px;
word-break: normal;
}
.tg th {
border-color: black;
border-style: solid;
border-width: 1px;
font-family: Arial, sans-serif;
font-size: 14px;
font-weight: normal;
overflow: hidden;
padding: 10px 5px;
word-break: normal;
}
.tg .tg-0lax {
text-align: left;
vertical-align: top
}
</style>
{% block content %}
<h1>Networks</h1>
<table class="tg">
<thead>
<tr>
<th class="tg-0lax">SSID</th>
<th class="tg-0lax">Signal Size</th>
<th class="tg-0lax">Connected</th>
<th class="tg-0lax">Security</th>
<th class="tg-0lax">Action</th>
</tr>
{%- for row in index_table %}
<tr>
<td>{{row[0]}}</td>
<td>{{row[1]}}</td>
<td>{{row[2]}}</td>
<td>{{row[3]}}</td>
{% if row[2] == "Yes" %}
{{ "User is logged in" if loggedin else "User is not logged in" }}
<td><a href={{"/disconnect/" + row[0] }}>Disconnect</a></td>
{% else %}
<td><a href={{"/connect/" + row[0] + "&" + row[3]}}>Connect</a></td>
{% endif %}
</tr>
{%- endfor %}
</thead>
</table>
{% endblock %}