diff --git a/buckler.py b/buckler.py index 660bf57..0caf803 100644 --- a/buckler.py +++ b/buckler.py @@ -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']) diff --git a/static/buckler.css b/static/buckler.css index 86f8ab5..0321854 100644 --- a/static/buckler.css +++ b/static/buckler.css @@ -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; } diff --git a/templates/index.html b/templates/index.html index 264dbfe..5d7734f 100644 --- a/templates/index.html +++ b/templates/index.html @@ -113,6 +113,8 @@ Session ID IP Address + Created + Last Used Delete @@ -121,6 +123,8 @@ {{ session['id'][:5] }}...{{ session['id'][-5:] }} {{ session['ip_address'] }} + {{ session['date_created'].strftime('%Y-%m-%d %H:%M') }} + {{ session['last_used'].strftime('%Y-%m-%d %H:%M') }} {% endfor %}