style and added table columns

This commit is contained in:
iou1name 2019-09-26 19:15:46 -04:00
parent b174c1d2e8
commit 448b5048d8
3 changed files with 9 additions and 4 deletions

View File

@ -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'])

View File

@ -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;
}

View File

@ -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 %}