Nginx Plugin :: Log Viewer

Started by ccesario, December 14, 2018, 11:34:46 AM

Previous topic - Next topic


I looked into it - the API provides the data just fine, backbone + browser native functions take over the big JSON file without issues (only takes long - 3 seconds on my machine). So what is needed is a paging for not rendering 200k log lines at once into the browser window. What do you think is a reasonable default? 200 Lines?

Hi @fabian,

Nice to know that API it os ok.
Well, I could suggest 100 lines by default with a dropdown to choose more or less linesand maybe a checkbox to disable or enable auto refresh. (It is only a suggestion)

Regards
Carlos

This commit will give you a new frontend (https://github.com/opnsense/plugins/pull/1080/commits):

opnsense-patch -c plugins b8d15a8b50b2b723830eb2d2c0117668f67f3420
tested it with your file and it works on my machine.

Hi @Fabian,
Patch applyed, but the browser still crashed, but after some tries, the file is loaded, but no refresh/update data and when I try navigate  using pagination the browser crashe.

Regards
Carlos

then you probably do not have enough memory. I have tested it on a Linux machine with 8GB RAM on Firefox.

No Fabian, I have tested with several machines.... And one of then hás 32gb mem.
Regards
Carlos

This one is your file on my machine (2nd page if I counted it correctly)
Browser: Mozilla/5.0 (X11; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0

Hi Fabian, I understand you.
I have tested it with "static" log file (the same that I sent you) . And its ok.
But the problem is when using the current file (in production) with many updates in the current log.

There are something that is broken it.
I do not know how is the implementation, but why not usage the same method that firewall/rules log viewer?

Regards
Carlos