Repository navigation
Conversation
The open log, the log list and the per-app access log dialog refresh in the background with a pause toggle. Polling waits for the previous request and pauses while the tab is hidden; the log list markup is shared between the page and the refresh call.
|
I am not opposed to this at all but i would want to make it more generic. Similar to SSE logic in dockwatch that keeps the containers page updating, i would want to just create a generic SSE workflow. This allows basically anything to be fed back so there can be a logging object that passes back things and if someone has other ideas (keeping the dashboard counters updated, etc) then more objects could be passed back with the generic version. That make sense? Edit: Feel free to join the discord server, there is a #starrproxy channel there and we can discuss things a little faster as well. Just ping me if you do. |
Makes sense, a generic SSE stream is the cleaner long-term approach. Happy to rework this into that: one SSE endpoint the pages subscribe to, with named event types (logs first, dashboard counters etc. later). One thing to keep in mind: each open SSE connection holds a PHP-FPM worker for as long as it is open, and the default |
|
I don't think it'll be too big of an issue with people opening that many tabs, I would bump it from 5 (I think is the default) to like 10 and just wait for it to be a problem someone reports. |
Problem
The log page and the per-app access log dialog are static. Watching what a 3rd party app does (which endpoints it hits, what gets blocked) means clicking the log again and again.
Change
getLog()takes the active tab as a parameter.renderLogList(), shared bypages/logs.phpand the newrefreshLogListajax call, so there is one copy of it.4 files:
js/logs.js,functions/logger.php,pages/logs.php,ajax/logs.php. eslint clean.Testing
Built from this branch, Firefox.