remove the headers if there is nothing to display below them

This commit is contained in:
Mickael Marchand
2015-05-10 18:44:49 +02:00
parent cdd073a197
commit 55ee833e57
@@ -13,14 +13,15 @@ if($width > "500")
$unit_text = "Bits/sec";
if($width > "500")
{
$rrd_options .= " COMMENT:'".substr(str_pad($unit_text, $descr_len+5),0,$descr_len+5)." Current Average Maximum '";
if (!$nototal) { $rrd_options .= " COMMENT:'Total '"; }
$rrd_options .= " COMMENT:'\l'";
} else {
$nototal=TRUE;
$rrd_options .= " COMMENT:'".substr(str_pad($unit_text, $descr_len+5),0,$descr_len+5)." Now Ave Max\l'";
if (!$noagg || !$nodetails) {
if($width > "500") {
$rrd_options .= " COMMENT:'".substr(str_pad($unit_text, $descr_len+5),0,$descr_len+5)." Current Average Maximum '";
if (!$nototal) { $rrd_options .= " COMMENT:'Total '"; }
$rrd_options .= " COMMENT:'\l'";
} else {
$nototal=TRUE;
$rrd_options .= " COMMENT:'".substr(str_pad($unit_text, $descr_len+5),0,$descr_len+5)." Now Ave Max\l'";
}
}
if(!isset($multiplier)) { $multiplier = "8"; }