]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
ids.cgi: Don't show the graph if there is no RRD data
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 21 Sep 2024 10:37:09 +0000 (12:37 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 24 Sep 2024 08:44:42 +0000 (08:44 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/ids.cgi

index a264457f70dfcd498743066afd911aad02f0cacd..34ac83f52f9ec6ad3a37dd909c9e1b73387b6cda 100644 (file)
@@ -1101,7 +1101,9 @@ END
        &Header::closesection();
 
        # Throughput Graph
-       &Header::graph("$Lang::tr{'ips throughput'}", "ids.cgi", "ips-throughput", "day");
+       if (-e "/var/log/rrd/collectd/localhost/iptables-mangle-IPS/ipt_bytes-BYPASSED.rrd") {
+               &Header::graph("$Lang::tr{'ips throughput'}", "ids.cgi", "ips-throughput", "day");
+       }
 
        #
        # Used Ruleset Providers section.