-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show last active it on admin users page #1245
Conversation
I don't think it's necessary to add a new SELECT d.updated_at
FROM devices d INNER JOIN users u ON d.user_uuid = u.uuid
WHERE u.email = '[email protected]'
ORDER BY d.updated_at DESC LIMIT 1 |
I was thinking about this my self a few weeks back. And i think there is an other way without modifyy the database. I think you can use the (Missed the comment from @jjlin) |
Thanks for the review @jjlin, @BlackDex! If I understand the API correctly, what you're proposing is not functionally equivalent to this implementation. I'm fine with either implementation, we just need to agree on the term "Last login". |
As an admin, I think I would want to know when a user was "last active" or "last online". The IMO at least, last login (the current implementation) is not very useful since users can log in once via the browser extension or mobile app and then stay logged in indefinitely. So you could have a very active user whose "last login" is months or even years ago. |
I my self was thinking about a more detailed overview when for example clicking on a user, and show all active devices. Also with the ability to deauthorize per device. But for the main user overview i agree with @jjlin . |
5904a77
to
14bb093
Compare
Looking at it visually it's take up a lot of space. Also very much on a mobile (small screen) device. |
I have something like this as the first row of the user: <tr>
<td colspan="5">
<span>Created at: {{created_at}}</span> | <span>Last active: {{last_active}}</span>
</td>
</tr> With the following at every class="border-top-0" I'm also not quite sure about this approach. |
It might be useful to sort on these values sometimes, so maybe they could each go under a separate column, formatted like
I can't imagine how mobile devices would ever display this much data nicely, so that may be a lost cause anyway. |
@jjlin The table is responsive, so it kinda looks ok, you have to scroll left/right to see all. Maybe we need to create some kind of overlay when there are more then x orgs a user is a member of. |
What about using popover for the orgs when there are more then x? |
or, maybe just a collapse. That would be better for the searchbox i think. |
I think that Datatables can sort dates by default especially when using the ISO Format. |
This example i found looks ok for the orgs: https://jsfiddle.net/g4q5vp2f/1/ |
@BlackDex What is your opinion on merging this and working on the UI changes in a separate issue? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that is a good idea.
I'm also comfortable to merge this, since it's not something which could break other items.
I have only one remark left see my suggestion.
Also, would be nice if you can merge these commit's all into one :). |
3ca8222
to
1eb5495
Compare
@BlackDex Done! 👍 |
Nice, thanks! |
Many thanks for this new very useful feature ! A way to sort the date by "last active" would also be great, and/or a way to export all data as CSV (then we can sort over the terminal or in a spreadsheet program). |
I'm planning to do a bit of a restyle of that specific interface, that should make sorting by date possible. |
Great, thanks for the update @BlackDex! |
Show last active it on admin users page
Feature request from #246.
This change implements saving last login date and time for users to the database and adds this information to the admin panel's user list. I also added the user creation date to the admin page.