From b3ff727a55799e8ba665e607e4b9e27ae36b88cc Mon Sep 17 00:00:00 2001 From: Darold Gilles Date: Sat, 15 Mar 2014 18:22:37 +0100 Subject: [PATCH] Add CustomHeader to allow custom definition of the logo and title. See squidanalyzer.conf or documentation for more explanation and example. Thanks to Raktim Chatterjee. --- README | 14 ++++++++++++++ SquidAnalyzer.pm | 5 +++-- doc/SquidAnalyzer.pod | 15 +++++++++++++++ doc/squidanalyzer.3 | 20 +++++++++++++++++++- etc/squidanalyzer.conf | 7 +++++++ 5 files changed, 58 insertions(+), 3 deletions(-) diff --git a/README b/README index 09907e2..2e7b220 100644 --- a/README +++ b/README @@ -199,6 +199,20 @@ CONFIGURATION The URL of the SquidAnalyzer javascript, HTML and images files. Default: /squidreport + CustomHeader + This directive allow you to replace the SquidAnalyze logo by your + custom logo. The default value is defined as follow: + + + + SquidAnalyzer + + Feel free to define your own header but take care to not break + current design. For example: + + CustomHeader My ISP Company + 126,1 Bas + LogFile squid_access_log_file Set the path to the Squid log file. diff --git a/SquidAnalyzer.pm b/SquidAnalyzer.pm index 0509f91..e753b73 100644 --- a/SquidAnalyzer.pm +++ b/SquidAnalyzer.pm @@ -734,6 +734,8 @@ sub _init $self->{DNSLookupTimeout} = $options{DNSLookupTimeout} || 0.0001; $self->{DNSLookupTimeout} = int($self->{DNSLookupTimeout} * 1000000); $self->{pidfile} = $pidfile || '/tmp/squid-analyzer.pid'; + $self->{CustomHeader} = $options{CustomHeader} || qq{ SquidAnalyzer}; + if ($self->{Lang}) { open(IN, "$self->{Lang}") or die "ERROR: can't open translation file $self->{Lang}, $!\n"; @@ -1536,8 +1538,7 @@ sub _print_header