From 4efa4c4b714f117cb561201f7f6c122cb7da624a Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 21 Sep 2024 12:37:09 +0200 Subject: [PATCH] ids.cgi: Don't show the graph if there is no RRD data Signed-off-by: Michael Tremer --- html/cgi-bin/ids.cgi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/html/cgi-bin/ids.cgi b/html/cgi-bin/ids.cgi index a264457f70..34ac83f52f 100644 --- a/html/cgi-bin/ids.cgi +++ b/html/cgi-bin/ids.cgi @@ -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. -- 2.39.5