jonbirge / logpager

Visual web interface for linux security log analysis, forensics and threat blacklisting
https://nyc.birgefuller.com/logpager/
MIT License
2 stars 0 forks source link

Sort table in place #264

Open jonbirge opened 1 month ago

jonbirge commented 1 month ago

Right now the table is augmented with geolocation and blacklist data dynamically in HTML, which makes it hard to sort it without redoing the entire process. The current approach is done to get the user data ASAP, and then geolocation lookups are done asynchronously at the client.

The right way to do this is to assign an ID to each table row in the DOM and do the sort as follows:

This approach will allow the table to be updated without having to create a persistent JS data structure to represent the table redundant with the DOM, yet allow the update to happen atomically to avoid display issues or thrashing the DOM.