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",
|
"SELECT * FROM user_credential WHERE user_id = $1",
|
||||||
request['session']['id'])
|
request['session']['id'])
|
||||||
active_sessions = await conn.fetch(
|
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",
|
"WHERE user_id = $1",
|
||||||
request['session']['id'])
|
request['session']['id'])
|
||||||
|
|
||||||
|
|
|
@ -41,15 +41,16 @@ h2 {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#users {
|
table {
|
||||||
border: 1px solid lightgray;
|
border: 1px solid lightgray;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#users tr {
|
tr {
|
||||||
border: 1px solid lightgray;
|
border: 1px solid lightgray;
|
||||||
}
|
}
|
||||||
|
|
||||||
#users td {
|
td {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,6 +113,8 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th>Session ID</th>
|
<th>Session ID</th>
|
||||||
<th>IP Address</th>
|
<th>IP Address</th>
|
||||||
|
<th>Created</th>
|
||||||
|
<th>Last Used</th>
|
||||||
<th>Delete</th>
|
<th>Delete</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
@ -121,6 +123,8 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>{{ session['id'][:5] }}...{{ session['id'][-5:] }}</code></td>
|
<td><code>{{ session['id'][:5] }}...{{ session['id'][-5:] }}</code></td>
|
||||||
<td>{{ session['ip_address'] }}</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>
|
<td><input aria-label="Delete {{ session['id'][:5] }}...{{ session['id'][-5:] }}" id="session-{{ session['id'] }}" name="session-{{ session['id'] }}" type="checkbox"></td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user