diff -urN smeserver-awstats-1.4.old/root/usr/share/smanager/lib/SrvMngr/Controller/Awstats.pm smeserver-awstats-1.4/root/usr/share/smanager/lib/SrvMngr/Controller/Awstats.pm --- smeserver-awstats-1.4.old/root/usr/share/smanager/lib/SrvMngr/Controller/Awstats.pm 2023-03-23 21:07:16.000000000 +0400 +++ smeserver-awstats-1.4/root/usr/share/smanager/lib/SrvMngr/Controller/Awstats.pm 2023-04-19 17:16:46.072000000 +0400 @@ -29,10 +29,11 @@ use esmith::DomainsDB; use esmith::ConfigDB; + our $ddb = esmith::DomainsDB->open || die "Couldn't open domains db"; our $cdb = esmith::ConfigDB->open || die "Couldn't open configuration db"; -our $awsdirdata="/home/e-smith/files/users/admin/home/awstats"; +our $awsdirdata="/home/e-smith/files/users/admin/home/awstats"; our $REGEXP_DOMAIN = qq([a-zA-Z0-9\-\.]+); sub main { @@ -260,6 +261,8 @@ $aws_datas{periodrep} = $c->param('databasebreak'); $aws_datas{monthrep} = $c->param('month'); $aws_datas{yearrep} = $c->param('year'); + $aws_datas{dayrep} = $c->param('day') || ''; + $aws_datas{hourrep} = $c->param('hour') || ''; # does not exist (bug in awstats 7.8-3) $aws_datas{domain} = $c->param('config') || 'None'; $result = _get_awst( $c, \%aws_datas ); @@ -292,6 +295,8 @@ my $periodrep = $aws_datas->{periodrep}; my $yearrep = $aws_datas->{yearrep}; my $monthrep = $aws_datas->{monthrep}; + my $dayrep = $aws_datas->{dayrep}; + my $hourrep = $aws_datas->{hourrep}; my $domain = $aws_datas->{domain}; my $res; @@ -300,9 +305,11 @@ $periodrep = $1 if ($periodrep =~ /^([A-Za-z]+)$/); $monthrep = $1 if ($monthrep =~ /^([A-Za-z\-]+)$/); $yearrep = $1 if ($yearrep =~ /^([0-9]+)$/); + $dayrep = $1 if ($dayrep and $dayrep =~ /^([0-9]+)$/); + $hourrep = $1 if ($hourrep and $hourrep =~ /^([0-9]+)$/); # cli awstats.pl call - $res = `/etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.pl -databasebreak=$periodrep -month=$monthrep -year=$yearrep -config="${domain}" -lang=auto -output`; + $res = `/etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.pl -databasebreak=$periodrep -month=$monthrep -year=$yearrep -day=$dayrep -hour=$hourrep -config="${domain}" -lang=auto -output`; # change awstats link for this controller $res =~ s|action="/cgi-bin/awstats.pl?|action="/smanager/awstats3?trt=SHWP&|; @@ -346,5 +353,3 @@ 1 - -__END__ diff -urN smeserver-awstats-1.4.old/root/usr/share/smanager/themes/default/templates/partials/1-awstats_en.lex smeserver-awstats-1.4/root/usr/share/smanager/themes/default/templates/partials/1-awstats_en.lex --- smeserver-awstats-1.4.old/root/usr/share/smanager/themes/default/templates/partials/1-awstats_en.lex 2023-03-23 21:07:16.000000000 +0400 +++ smeserver-awstats-1.4/root/usr/share/smanager/themes/default/templates/partials/1-awstats_en.lex 1970-01-01 04:00:00.000000000 +0400 @@ -1,37 +0,0 @@ -'aws_FORM_TITLE' => 'Show or Configure Awstats Statistics', -'aws_BUTTON_CONFIGURE' => 'Configure AWStats', -'aws_STATS_NOTE' => 'Note: A Domain is not shown in the list below until after midnight on the day statistics are available. To force the display sooner, browse to the website to create some stats, then resave awstats settings.', -'aws_DOMAINS_TITLE' => 'List of Domains viewable by admin', -'aws_DISABLED' => 'AWStats is disabled.', -'aws_UPDATED' => 'Updated on [_1] in [_2] secs. [_3] new logs processed.', -'aws_COPYRIGHT' => 'Copyright neddix.de, Stuttgart', -'aws_CONTENT' => 'Content', -'aws_CONFIG_TITLE' => 'Configure AWStats Sme version', -'aws_LABEL_STATUS' => 'State', -'aws_REPORTED' => 'Reported period', -'aws_STATUS' => 'status', -'aws_MAILSTATUS' => 'Awstats Mail status', -'aws_FTPSTATUS' => 'Awstats Ftp status', -'aws_FREQUENCY' => 'Launch frequency', -'aws_NO_LOCAL_IP' => 'Ignore hits from your local network', -'aws_NO_EXTERNAL_IP' => 'Ignore hits from your external IP or network', -'aws_YES_EXT_IP' => 'Yes, external IP', -'aws_YES_EXT_IP_MSK' => 'Yes, external IP/Netmask', -'aws_NO_LOCAL' => 'Ignore hits from local networks as defined in the \'Local networks\' panel', -'aws_FRAME' => 'Show report in HTML frames', -'aws_LANGUAGE' => 'Default language', -'aws_RAWLOG' => 'Enable plugin \'Rawlog\'', -'aws_MAX_DOMAINS' => 'Max. number of domains shown', -'aws_MAX_HOSTS' => 'Max. number of hosts shown', -'aws_MIN_HIT_HOSTS' => 'Only show hosts with at least these hits:', -'aws_MAX_PAGES' => 'Max. number of pages shown', -'aws_MIN_HIT_PAGES' => 'Only show pages with at least these hits:', -'aws_MAX_ROBOTS' => 'Max. number of robots shown', -'aws_MIN_HIT_ROBOT' => 'Only show robots with at least these hits:', -'aws_MAX_REFERER' => 'Max. number of referrers shown', -'aws_MIN_HIT_REFERER' => 'Only show referrers with at least these hits:', -'aws_MAX_KEYWORDS' => 'Max. number of keywords shown', -'aws_MIN_HIT_KEYWORDS' => 'Only show keywords with at least these hits:', -'aws_BAR_SIZE' => 'Graphics bar size', -'aws_CONFIG_SUCCESSFULLY_MODIFIED' => 'Configuration has been updated successfully.
Please note, that changed ignore-rules will only effect processing of future logs.', -'aws_ERROR_CONFIG_UPDATE' => 'Error: internal failure while updating awstats configuration.',