style and added table columns
This commit is contained in:
parent
b174c1d2e8
commit
448b5048d8
|
@ -44,7 +44,7 @@ async def index(request):
|
|||
"SELECT * FROM user_credential WHERE user_id = $1",
|
||||
request['session']['id'])
|
||||
active_sessions = await conn.fetch(
|
||||
"SELECT id, ip_address FROM user_session "
|
||||
"SELECT id, ip_address, date_created, last_used FROM user_session "
|
||||
"WHERE user_id = $1",
|
||||
request['session']['id'])
|
||||
|
||||
|
|
|
@ -41,15 +41,16 @@ h2 {
|
|||
list-style-type: none;
|
||||
}
|
||||
|
||||
#users {
|
||||
table {
|
||||
border: 1px solid lightgray;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#users tr {
|
||||
tr {
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
|
||||
#users td {
|
||||
td {
|
||||
text-align: center;
|
||||
}
|
||||
|
|
|
@ -113,6 +113,8 @@
|
|||
<tr>
|
||||
<th>Session ID</th>
|
||||
<th>IP Address</th>
|
||||
<th>Created</th>
|
||||
<th>Last Used</th>
|
||||
<th>Delete</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -121,6 +123,8 @@
|
|||
<tr>
|
||||
<td><code>{{ session['id'][:5] }}...{{ session['id'][-5:] }}</code></td>
|
||||
<td>{{ session['ip_address'] }}</td>
|
||||
<td>{{ session['date_created'].strftime('%Y-%m-%d %H:%M') }}</td>
|
||||
<td>{{ session['last_used'].strftime('%Y-%m-%d %H:%M') }}</td>
|
||||
<td><input aria-label="Delete {{ session['id'][:5] }}...{{ session['id'][-5:] }}" id="session-{{ session['id'] }}" name="session-{{ session['id'] }}" type="checkbox"></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in New Issue
Block a user