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: Fri, 09 Apr 2021 11:57:47 +0100 Message-ID: In-Reply-To: <37a96f5d-e388-5c7d-4b52-7757c37ec3bc@leo-andres.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7293831237294966739==" List-Id: --===============7293831237294966739== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello, That was it. For some reason my browser did not validate the CSS file and use= d 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 but= ton is selected. Maybe just underlining the word is enough? -Michael > 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/styl= e.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. >=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", \%sensorsetting= s); >>>=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 "= ".$Lang::tr{'month'}.""; >>> -print " - "; >>> -print ""= .$Lang::tr{'year'}.""; >>> -print "
"; >>> -print "