allinurl / goaccess

GoAccess is a real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems or through your browser.
https://goaccess.io
MIT License
18.6k stars 1.11k forks source link

Unique AppPrefs for different html files #2672

Open tyctor opened 7 months ago

tyctor commented 7 months ago

Hi

I have two html reports, one with all history stats.html and one for today today-stats.html (generated with --keep-last=1) I want to have different panels displayed on each report byt default, but settings in localStorage use same key name AppPrefs, so i t is common for both reports Should be possible to add some prefix for localStorage to have AppPrefs separate for each report? but probable there is some more behind, and only separated AppPrefs wont be enough.

0bi-w6n-K3nobi commented 2 months ago

Hi @tyctor

What you means with term AppPrefs ? Is it Preferences from GOAccess run? Or GOAccess for Panels and layout preferences?

Whatever, you can do this from specify different a goaccess.conf for each case. I.E... you can have two CONFs, one for stat.html and other for today-stats.html. For more detail you can read about this in manual page here at File Options section, specifically at --config-file= option.

So, I hope be clean. Feel free for more asks.

tyctor commented 2 months ago

Hi @0bi-w6n-K3nobi I mean localStorage in browser use same key AppPrefs, so if I change settings on stats.html it also change settings on today-stats.html

thanks for reply

0bi-w6n-K3nobi commented 2 months ago

Hi @tyctor

Yeah... I understood now. I seems that. Well, maybe @allinurl can add option for different contexts. I.E. create the possibility add on suffix, prefix or name for that. ... For now, on workaround you maybe create different profiles at you browser, one for each.

tyctor commented 1 month ago

it seems that as workaround is enough to replace key in created html:

 sed -i s/'AppPrefs'/'AppPrefsToday'/g daily-report.html