From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: [PATCH 3/3] rrdimage: Switch graphs.pl to the new graph scripts Date: Mon, 12 Apr 2021 10:52:09 +0100 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1330550574377337593==" List-Id: --===============1330550574377337593== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello, Sorry for my late response. This is probably a little bit more urgent=E2=80=A6 Our Apache configuration is here: https://git.ipfire.org/?p=3Dipfire-2.x.git;a=3Dtree;f=3Dconfig/httpd;hb=3DH= EAD And it does not have any aggressive caching enabled. The ETag header is precisely there for validating content without transferrin= g it again. We probably should overhaul the entire apache configuration and c= ome up with something that guarantees that we are using modern features of th= e browser and Apache. Currently the configuration is full of directives for M= S Internet Explorer and Java-based browsers. We wouldn=E2=80=99t support any = of them - not even sure if they exist any more. @Peter: Would you be up for rewriting the apache configuration? Best, -Michael > On 9 Apr 2021, at 18:45, Leo Hofmann wrote: >=20 > Hi, >=20 > I found that disabling the HTTP ETag header solved the problem for me. Are = there any Cache-Control headers configured for these static files? >=20 > I'll change the CSS and submit a patch soon! >=20 > Leo >=20 > Am 09.04.2021 um 12:57 schrieb Michael Tremer: >> Hello, >>=20 >> That was it. For some reason my browser did not validate the CSS file and = used a cached version. This is probably something we should look into. >>=20 >> Apart from that it works. >>=20 >> Can we maybe change the background colour to something less yellow when a = button is selected. Maybe just underlining the word is enough? >>=20 >> -Michael >>=20 >>> On 7 Apr 2021, at 23:18, Leo Hofmann wrote: >>>=20 >>> Hello Michael, >>>=20 >>> No, of course not, that looks terrible! >>> Could you please check/CTRL+F5 the CSS file /themes/ipfire/include/css/st= yle.css? Patch 2 of this series should have added ~30 lines at the end. >>> Please have a look at the attached screenshot, there you can see how it i= s supposed to be. I have tested this with Firefox and Chrome. >>>=20 >>> Best regards, >>> Leo >>>=20 >>> Am 07.04.2021 um 23:31 schrieb Michael Tremer: >>>> Hello, >>>>=20 >>>> Is this meant to look like this? >>>>=20 >>>>=20 >>>>=20 >>>>> On 1 Apr 2021, at 14:35, Leo-Andres Hofmann > wrote: >>>>>=20 >>>>> "makegraphbox" is modified to remove the old iframe method and output >>>>> a modern div container instead. >>>>> Graph errors are now returned, to be displayed by getrrdimage.cgi. >>>>>=20 >>>>> entropy.cgi and netovpnsrv.cgi are modified to ensure compatibility. >>>>>=20 >>>>> Add cache control HTTP header to image output. >>>>>=20 >>>>> Signed-off-by: Leo-Andres Hofmann > >>>>> --- >>>>> config/cfgroot/graphs.pl | 86 +++++++++++++++++++++---------------- >>>>> html/cgi-bin/entropy.cgi | 2 +- >>>>> html/cgi-bin/netovpnsrv.cgi | 2 +- >>>>> 3 files changed, 50 insertions(+), 40 deletions(-) >>>>>=20 >>>>> diff --git a/config/cfgroot/graphs.pl b/config/cfgroot/graphs.pl >>>>> index beddff032..cf4a30de3 100644 >>>>> --- a/config/cfgroot/graphs.pl >>>>> +++ b/config/cfgroot/graphs.pl >>>>> @@ -24,6 +24,7 @@ package Graphs; >>>>>=20 >>>>> use strict; >>>>> use RRDs; >>>>> +use experimental 'smartmatch'; >>>>>=20 >>>>> require '/var/ipfire/general-functions.pl'; >>>>> require "${General::swroot}/lang.pl"; >>>>> @@ -99,26 +100,35 @@ foreach (@sensorsdir){ >>>>> &General::readhash("${General::swroot}/sensors/settings", \%sensorsetti= ngs); >>>>>=20 >>>>> # Generate a nice box for selection of time range in graphs >>>>> -# this will generate a nice iframe for the cgi every klick for >>>>> -# the graph will be handled inside the iframe >>>>> +# this will generate a nice div box for the cgi every klick for >>>>> +# the graph will be handled by javascript >>>>> # 0 is the cgi refering to >>>>> # 1 is the graph name >>>>> -# 2 is the time range for the graph >>>>> -# 3 if given is the height of the iframe default if nothing is given >>>>> +# 2 is the time range for the graph (optional) >>>>>=20 >>>>> sub makegraphbox { >>>>> -print "
"; >>>>> -print "".$Lang::tr{'hour'}.""; >>>>> -print " - "; >>>>> -print "= ".$Lang::tr{'day'}.""; >>>>> -print " - "; >>>>> -print "".$Lang::tr{'week'}.""; >>>>> -print " - "; >>>>> -print "<= b>".$Lang::tr{'month'}.""; >>>>> -print " - "; >>>>> -print "".$Lang::tr{'year'}.""; >>>>> -print "
"; >>>>> -print "