From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Hofmann To: development@lists.ipfire.org Subject: Re: [PATCH 3/3] rrdimage: Switch graphs.pl to the new graph scripts Date: Fri, 09 Apr 2021 19:45:24 +0200 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6787432528986885818==" List-Id: --===============6787432528986885818== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi, I found that disabling the HTTP ETag header solved the problem for me. Are th= ere any Cache-Control headers configured for these static files? I'll change the CSS and submit a patch soon! Leo Am 09.04.2021 um 12:57 schrieb Michael Tremer: > Hello, > > That was it. For some reason my browser did not validate the CSS file and u= sed a cached version. This is probably something we should look into. > > Apart from that it works. > > Can we maybe change the background colour to something less yellow when a b= utton is selected. Maybe just underlining the word is enough? > > -Michael > >> On 7 Apr 2021, at 23:18, Leo Hofmann wrote: >> >> Hello Michael, >> >> No, of course not, that looks terrible! >> Could you please check/CTRL+F5 the CSS file /themes/ipfire/include/css/sty= le.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 is= supposed to be. I have tested this with Firefox and Chrome. >> >> Best regards, >> Leo >> >> Am 07.04.2021 um 23:31 schrieb Michael Tremer: >>> Hello, >>> >>> Is this meant to look like this? >>> >>> >>> >>>> On 1 Apr 2021, at 14:35, Leo-Andres Hofmann > wrote: >>>> >>>> "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. >>>> >>>> entropy.cgi and netovpnsrv.cgi are modified to ensure compatibility. >>>> >>>> Add cache control HTTP header to image output. >>>> >>>> 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(-) >>>> >>>> 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; >>>> >>>> use strict; >>>> use RRDs; >>>> +use experimental 'smartmatch'; >>>> >>>> require '/var/ipfire/general-functions.pl'; >>>> require "${General::swroot}/lang.pl"; >>>> @@ -99,26 +100,35 @@ foreach (@sensorsdir){ >>>> &General::readhash("${General::swroot}/sensors/settings", \%sensorsettin= gs); >>>> >>>> # 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) >>>> >>>> sub makegraphbox { >>>> -print "
"; >>>> -print "= ".$Lang::tr{'hour'}.""; >>>> -print " - "; >>>> -print ""= .$Lang::tr{'day'}.""; >>>> -print " - "; >>>> -print "= ".$Lang::tr{'week'}.""; >>>> -print " - "; >>>> -print "".$Lang::tr{'month'}.""; >>>> -print " - "; >>>> -print "= ".$Lang::tr{'year'}.""; >>>> -print "
"; >>>> -print "