From: Darold Gilles Date: Thu, 11 Oct 2012 20:25:56 +0000 (+0200) Subject: Fix display of empty hourly graph when no data were found. X-Git-Tag: v3.2~126 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=16ae0cd37d215a670a765df5a89796b39237dace;p=pgbadger Fix display of empty hourly graph when no data were found. --- diff --git a/pgbadger b/pgbadger index 97ab8e4..3ef020f 100755 --- a/pgbadger +++ b/pgbadger @@ -1119,7 +1119,7 @@ Average duration of sessions: $avg_session_duration if (!$disable_connection && $connection_info{count}) { print $fh "Total number of connections: $connection_info{count}\n"; } - if (!$disable_hourly) { + if (!$disable_hourly && $overall_stat{'queries_number'}) { print $fh qq{ - Hourly statistics ---------------------------------------------------- @@ -1653,7 +1653,7 @@ EOF Overall statistics | }; if (!$error_only) { - if (!$disable_hourly) { + if (!$disable_hourly && $overall_stat{'queries_number'}) { print $fh qq{Hourly statistics | }; } if (!$disable_type && !$log_duration) { @@ -1719,7 +1719,7 @@ sub html_footer
  • ^ Back to top
  • Overall statistics
  • }; if (!$error_only) { - if (!$disable_hourly) { + if (!$disable_hourly && $overall_stat{'queries_number'}) { print $fh qq{
  • Hourly statistics
  • }; } if (!$disable_type && !$log_duration) { @@ -1863,7 +1863,7 @@ sub dump_as_html }; - if (!$disable_hourly) { + if (!$disable_hourly && $overall_stat{'queries_number'}) { print $fh qq{

    Hourly statistics ^