1 |
michel |
1.1 |
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 |
2 |
|
|
--- smeserver-awstats-1.4.old/root/usr/share/smanager/lib/SrvMngr/Controller/Awstats.pm 2023-03-23 21:07:16.000000000 +0400 |
3 |
|
|
+++ smeserver-awstats-1.4/root/usr/share/smanager/lib/SrvMngr/Controller/Awstats.pm 2023-04-19 17:16:46.072000000 +0400 |
4 |
|
|
@@ -29,10 +29,11 @@ |
5 |
|
|
use esmith::DomainsDB; |
6 |
|
|
use esmith::ConfigDB; |
7 |
|
|
|
8 |
|
|
+ |
9 |
|
|
our $ddb = esmith::DomainsDB->open || die "Couldn't open domains db"; |
10 |
|
|
our $cdb = esmith::ConfigDB->open || die "Couldn't open configuration db"; |
11 |
|
|
-our $awsdirdata="/home/e-smith/files/users/admin/home/awstats"; |
12 |
|
|
|
13 |
|
|
+our $awsdirdata="/home/e-smith/files/users/admin/home/awstats"; |
14 |
|
|
our $REGEXP_DOMAIN = qq([a-zA-Z0-9\-\.]+); |
15 |
|
|
|
16 |
|
|
sub main { |
17 |
|
|
@@ -260,6 +261,8 @@ |
18 |
|
|
$aws_datas{periodrep} = $c->param('databasebreak'); |
19 |
|
|
$aws_datas{monthrep} = $c->param('month'); |
20 |
|
|
$aws_datas{yearrep} = $c->param('year'); |
21 |
|
|
+ $aws_datas{dayrep} = $c->param('day') || ''; |
22 |
|
|
+ $aws_datas{hourrep} = $c->param('hour') || ''; # does not exist (bug in awstats 7.8-3) |
23 |
|
|
$aws_datas{domain} = $c->param('config') || 'None'; |
24 |
|
|
|
25 |
|
|
$result = _get_awst( $c, \%aws_datas ); |
26 |
|
|
@@ -292,6 +295,8 @@ |
27 |
|
|
my $periodrep = $aws_datas->{periodrep}; |
28 |
|
|
my $yearrep = $aws_datas->{yearrep}; |
29 |
|
|
my $monthrep = $aws_datas->{monthrep}; |
30 |
|
|
+ my $dayrep = $aws_datas->{dayrep}; |
31 |
|
|
+ my $hourrep = $aws_datas->{hourrep}; |
32 |
|
|
my $domain = $aws_datas->{domain}; |
33 |
|
|
|
34 |
|
|
my $res; |
35 |
|
|
@@ -300,9 +305,11 @@ |
36 |
|
|
$periodrep = $1 if ($periodrep =~ /^([A-Za-z]+)$/); |
37 |
|
|
$monthrep = $1 if ($monthrep =~ /^([A-Za-z\-]+)$/); |
38 |
|
|
$yearrep = $1 if ($yearrep =~ /^([0-9]+)$/); |
39 |
|
|
+ $dayrep = $1 if ($dayrep and $dayrep =~ /^([0-9]+)$/); |
40 |
|
|
+ $hourrep = $1 if ($hourrep and $hourrep =~ /^([0-9]+)$/); |
41 |
|
|
|
42 |
|
|
# cli awstats.pl call |
43 |
|
|
- $res = `/etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.pl -databasebreak=$periodrep -month=$monthrep -year=$yearrep -config="${domain}" -lang=auto -output`; |
44 |
|
|
+ $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`; |
45 |
|
|
|
46 |
|
|
# change awstats link for this controller |
47 |
|
|
$res =~ s|action="/cgi-bin/awstats.pl?|action="/smanager/awstats3?trt=SHWP&|; |
48 |
|
|
@@ -346,5 +353,3 @@ |
49 |
|
|
|
50 |
|
|
|
51 |
|
|
1 |
52 |
|
|
- |
53 |
|
|
-__END__ |
54 |
|
|
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 |
55 |
|
|
--- 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 |
56 |
|
|
+++ smeserver-awstats-1.4/root/usr/share/smanager/themes/default/templates/partials/1-awstats_en.lex 1970-01-01 04:00:00.000000000 +0400 |
57 |
|
|
@@ -1,37 +0,0 @@ |
58 |
|
|
-'aws_FORM_TITLE' => 'Show or Configure Awstats Statistics', |
59 |
|
|
-'aws_BUTTON_CONFIGURE' => 'Configure AWStats', |
60 |
|
|
-'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.', |
61 |
|
|
-'aws_DOMAINS_TITLE' => 'List of Domains viewable by admin', |
62 |
|
|
-'aws_DISABLED' => 'AWStats is disabled.', |
63 |
|
|
-'aws_UPDATED' => 'Updated on [_1] in [_2] secs. [_3] new logs processed.', |
64 |
|
|
-'aws_COPYRIGHT' => 'Copyright neddix.de, Stuttgart', |
65 |
|
|
-'aws_CONTENT' => 'Content', |
66 |
|
|
-'aws_CONFIG_TITLE' => 'Configure AWStats Sme version', |
67 |
|
|
-'aws_LABEL_STATUS' => 'State', |
68 |
|
|
-'aws_REPORTED' => 'Reported period', |
69 |
|
|
-'aws_STATUS' => 'status', |
70 |
|
|
-'aws_MAILSTATUS' => 'Awstats Mail status', |
71 |
|
|
-'aws_FTPSTATUS' => 'Awstats Ftp status', |
72 |
|
|
-'aws_FREQUENCY' => 'Launch frequency', |
73 |
|
|
-'aws_NO_LOCAL_IP' => 'Ignore hits from your local network', |
74 |
|
|
-'aws_NO_EXTERNAL_IP' => 'Ignore hits from your external IP or network', |
75 |
|
|
-'aws_YES_EXT_IP' => 'Yes, external IP', |
76 |
|
|
-'aws_YES_EXT_IP_MSK' => 'Yes, external IP/Netmask', |
77 |
|
|
-'aws_NO_LOCAL' => 'Ignore hits from local networks as defined in the \'Local networks\' panel', |
78 |
|
|
-'aws_FRAME' => 'Show report in HTML frames', |
79 |
|
|
-'aws_LANGUAGE' => 'Default language', |
80 |
|
|
-'aws_RAWLOG' => 'Enable plugin \'Rawlog\'', |
81 |
|
|
-'aws_MAX_DOMAINS' => 'Max. number of domains shown', |
82 |
|
|
-'aws_MAX_HOSTS' => 'Max. number of hosts shown', |
83 |
|
|
-'aws_MIN_HIT_HOSTS' => 'Only show hosts with at least these hits:', |
84 |
|
|
-'aws_MAX_PAGES' => 'Max. number of pages shown', |
85 |
|
|
-'aws_MIN_HIT_PAGES' => 'Only show pages with at least these hits:', |
86 |
|
|
-'aws_MAX_ROBOTS' => 'Max. number of robots shown', |
87 |
|
|
-'aws_MIN_HIT_ROBOT' => 'Only show robots with at least these hits:', |
88 |
|
|
-'aws_MAX_REFERER' => 'Max. number of referrers shown', |
89 |
|
|
-'aws_MIN_HIT_REFERER' => 'Only show referrers with at least these hits:', |
90 |
|
|
-'aws_MAX_KEYWORDS' => 'Max. number of keywords shown', |
91 |
|
|
-'aws_MIN_HIT_KEYWORDS' => 'Only show keywords with at least these hits:', |
92 |
|
|
-'aws_BAR_SIZE' => 'Graphics bar size', |
93 |
|
|
-'aws_CONFIG_SUCCESSFULLY_MODIFIED' => 'Configuration has been updated successfully.<br>Please note, that changed ignore-rules will only effect processing of future logs.', |
94 |
|
|
-'aws_ERROR_CONFIG_UPDATE' => 'Error: internal failure while updating awstats configuration.', |