goaccess icon indicating copy to clipboard operation
goaccess copied to clipboard

Unique AppPrefs for different html files

Open tyctor opened this issue 1 year ago • 4 comments

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.

tyctor avatar Apr 23 '24 09:04 tyctor

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.

0bi-w6n-K3nobi avatar Sep 23 '24 12:09 0bi-w6n-K3nobi

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

tyctor avatar Sep 23 '24 13:09 tyctor

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.

0bi-w6n-K3nobi avatar Sep 23 '24 13:09 0bi-w6n-K3nobi

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

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

tyctor avatar Oct 23 '24 12:10 tyctor