From 7c81f640ebf43f0c91ebd7a987d3d7f8352bed1c Mon Sep 17 00:00:00 2001 From: Darold Gilles Date: Mon, 25 Nov 2013 21:57:11 +0100 Subject: [PATCH] Fix some HTML tag issues and table ordering on Top domain hits and Top url hits. Thanks to Jeetendra Poojari for the report. --- SquidAnalyzer.pm | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/SquidAnalyzer.pm b/SquidAnalyzer.pm index 65f0ae7..5e597eb 100644 --- a/SquidAnalyzer.pm +++ b/SquidAnalyzer.pm @@ -1174,12 +1174,10 @@ sub _print_header my $now = $self->{start_date} || strftime("%a %b %e %H:%M:%S %Y", localtime); $sortpos ||= 2; - + my $sorttable = ''; + $sorttable = "var myTH = document.getElementById('contenu').getElementsByTagName('th')[$sortpos]; sorttable.innerSortFunction.apply(myTH, []);" if ($sortpos != 100); print $$fileout qq{ - - + @@ -1196,7 +1194,7 @@ sub _print_header - +
+ $url_stat{$u}{hits} ($h_percent) $comma_bytes ($b_percent) $duration ($d_percent) @@ -2724,7 +2724,7 @@ sub _print_top_domain_stat # Print the HTML header my $cal = $self->_get_calendar($stat_date, $type, $outdir); - $self->_print_header(\$out, $self->{menu}, $cal, $sortpos); + $self->_print_header(\$out, $self->{menu}, $cal, 100); print $out "

$Translate{'Domain_number'}: $nurl

\n"; $total_hits ||= 1; @@ -2836,6 +2836,7 @@ sub _print_top_domain_stat print $out "*.$u\n"; } print $out qq{ + $domain_stat{$u}{hits} ($h_percent) $comma_bytes ($b_percent)