- Timestamp:
- 10/08/08 10:58:00 (3 months ago)
- Location:
- trunk
- Files:
-
- 3 removed
- 58 modified
- 69 copied
-
client/ebox (modified) (1 prop)
-
client/ebox/configure.ac (modified) (1 diff)
-
client/ebox/debian/ebox.postinst (modified) (2 diffs)
-
client/ebox/debian/po/templates.pot (modified) (2 diffs)
-
client/ebox/migration/logs/0002_remove_old_cron.pl (copied) (copied from branches/mailflogs/ebox/migration/logs/0002_remove_old_cron.pl)
-
client/ebox/migration/logs/Makefile.am (modified) (1 diff)
-
client/ebox/src/EBox/CGI/Logs/Index.pm (modified) (12 diffs)
-
client/ebox/src/EBox/LogObserver.pm (modified) (5 diffs)
-
client/ebox/src/EBox/Logs.pm (modified) (20 diffs)
-
client/ebox/src/EBox/Logs/Consolidate (copied) (copied from branches/mailflogs/ebox/src/EBox/Logs/Consolidate)
-
client/ebox/src/EBox/Logs/Consolidate.pm (copied) (copied from branches/mailflogs/ebox/src/EBox/Logs/Consolidate.pm)
-
client/ebox/src/EBox/Logs/Consolidate/Makefile.am (copied) (copied from branches/mailflogs/ebox/src/EBox/Logs/Consolidate/Makefile.am)
-
client/ebox/src/EBox/Logs/Consolidate/Test.pm (copied) (copied from branches/mailflogs/ebox/src/EBox/Logs/Consolidate/Test.pm)
-
client/ebox/src/EBox/Logs/Makefile.am (modified) (1 diff)
-
client/ebox/src/EBox/Logs/Model/ForcePurge.pm (modified) (2 diffs)
-
client/ebox/src/EBox/Logs/Model/Makefile.am (modified) (1 diff)
-
client/ebox/src/EBox/Logs/Model/Report (copied) (copied from branches/mailflogs/ebox/src/EBox/Logs/Model/Report)
-
client/ebox/src/EBox/Logs/Model/Report/Base.pm (copied) (copied from branches/mailflogs/ebox/src/EBox/Logs/Model/Report/Base.pm)
-
client/ebox/src/EBox/Logs/Model/Report/Details.pm (copied) (copied from branches/mailflogs/ebox/src/EBox/Logs/Model/Report/Details.pm)
-
client/ebox/src/EBox/Logs/Model/Report/Graph.pm (copied) (copied from branches/mailflogs/ebox/src/EBox/Logs/Model/Report/Graph.pm)
-
client/ebox/src/EBox/Logs/Model/Report/Makefile.am (copied) (copied from branches/mailflogs/ebox/src/EBox/Logs/Model/Report/Makefile.am)
-
client/ebox/src/EBox/Logs/Model/Report/OptionsBase.pm (copied) (copied from branches/mailflogs/ebox/src/EBox/Logs/Model/Report/OptionsBase.pm)
-
client/ebox/src/EBox/Logs/Model/SelectLog.pm (copied) (copied from branches/mailflogs/ebox/src/EBox/Logs/Model/SelectLog.pm)
-
client/ebox/src/EBox/Logs/Report.pm (copied) (copied from branches/mailflogs/ebox/src/EBox/Logs/Report.pm)
-
client/ebox/src/EBox/Logs/t (copied) (copied from branches/mailflogs/ebox/src/EBox/Logs/t)
-
client/ebox/src/EBox/Logs/t/Consolidate.t (copied) (copied from branches/mailflogs/ebox/src/EBox/Logs/t/Consolidate.t)
-
client/ebox/src/EBox/Model/Image.pm (modified) (1 diff)
-
client/ebox/src/EBox/Model/ImageControl.pm (modified) (8 diffs)
-
client/ebox/src/EBox/PgDBEngine.pm (modified) (4 diffs)
-
client/ebox/src/EBox/Types/File.pm (modified) (1 diff)
-
client/ebox/src/EBox/Types/Password.pm (modified) (1 diff)
-
client/ebox/src/templates/Makefile.am (modified) (1 diff)
-
client/ebox/src/templates/ajax/viewer/Makefile.am (modified) (1 diff)
-
client/ebox/src/templates/headerWithRefresh.mas (copied) (copied from branches/mailflogs/ebox/src/templates/headerWithRefresh.mas)
-
client/ebox/src/templates/logs/index.mas (modified) (9 diffs)
-
client/ebox/tools/Makefile.am (modified) (1 diff)
-
client/ebox/tools/cron/90manageEBoxLogs (copied) (copied from branches/mailflogs/ebox/tools/cron/90manageEBoxLogs)
-
client/ebox/tools/cron/99purgeEBoxLogs (deleted)
-
client/ebox/tools/cron/Makefile.am (modified) (1 diff)
-
client/ebox/tools/ebox-sql-table-with-time-period (copied) (copied from branches/mailflogs/ebox/tools/ebox-sql-table-with-time-period)
-
client/ebox/tools/sqllog/Makefile.am (modified) (1 diff)
-
client/firewall (modified) (1 prop)
-
client/firewall/configure.ac (modified) (1 diff)
-
client/firewall/debian/ebox-firewall.postinst (modified) (1 diff)
-
client/firewall/debian/ebox-firewall.postrm (modified) (1 diff)
-
client/firewall/src/EBox/Firewall.pm (modified) (37 diffs)
-
client/firewall/src/EBox/Firewall/Composite (copied) (copied from branches/mailflogs/firewall/src/EBox/Firewall/Composite)
-
client/firewall/src/EBox/Firewall/Composite/Report (copied) (copied from branches/mailflogs/firewall/src/EBox/Firewall/Composite/Report)
-
client/firewall/src/EBox/Firewall/Composite/Report/Makefile.am (copied) (copied from branches/mailflogs/firewall/src/EBox/Firewall/Composite/Report/Makefile.am)
-
client/firewall/src/EBox/Firewall/Composite/Report/PacketTrafficReport.pm (copied) (copied from branches/mailflogs/firewall/src/EBox/Firewall/Composite/Report/PacketTrafficReport.pm)
-
client/firewall/src/EBox/Firewall/Makefile.am (modified) (1 diff)
-
client/firewall/src/EBox/Firewall/Model (copied) (copied from branches/mailflogs/firewall/src/EBox/Firewall/Model)
-
client/firewall/src/EBox/Firewall/Model/BaseRuleTable.pm (copied) (copied from branches/mailflogs/firewall/src/EBox/Firewall/Model/BaseRuleTable.pm)
-
client/firewall/src/EBox/Firewall/Model/EBoxOutputRuleTable.pm (copied) (copied from branches/mailflogs/firewall/src/EBox/Firewall/Model/EBoxOutputRuleTable.pm)
-
client/firewall/src/EBox/Firewall/Model/ExternalToEBoxRuleTable.pm (copied) (copied from branches/mailflogs/firewall/src/EBox/Firewall/Model/ExternalToEBoxRuleTable.pm)
-
client/firewall/src/EBox/Firewall/Model/ExternalToInternalRuleTable.pm (copied) (copied from branches/mailflogs/firewall/src/EBox/Firewall/Model/ExternalToInternalRuleTable.pm)
-
client/firewall/src/EBox/Firewall/Model/InternalToEBoxRuleTable.pm (copied) (copied from branches/mailflogs/firewall/src/EBox/Firewall/Model/InternalToEBoxRuleTable.pm)
-
client/firewall/src/EBox/Firewall/Model/Makefile.am (copied) (copied from branches/mailflogs/firewall/src/EBox/Firewall/Model/Makefile.am)
-
client/firewall/src/EBox/Firewall/Model/Report (copied) (copied from branches/mailflogs/firewall/src/EBox/Firewall/Model/Report)
-
client/firewall/src/EBox/Firewall/Model/Report/Makefile.am (copied) (copied from branches/mailflogs/firewall/src/EBox/Firewall/Model/Report/Makefile.am)
-
client/firewall/src/EBox/Firewall/Model/Report/PacketTrafficDetails.pm (copied) (copied from branches/mailflogs/firewall/src/EBox/Firewall/Model/Report/PacketTrafficDetails.pm)
-
client/firewall/src/EBox/Firewall/Model/Report/PacketTrafficGraph.pm (copied) (copied from branches/mailflogs/firewall/src/EBox/Firewall/Model/Report/PacketTrafficGraph.pm)
-
client/firewall/src/EBox/Firewall/Model/Report/PacketTrafficReportOptions.pm (copied) (copied from branches/mailflogs/firewall/src/EBox/Firewall/Model/Report/PacketTrafficReportOptions.pm)
-
client/firewall/src/EBox/Firewall/Model/ToInternetRuleTable.pm (copied) (copied from branches/mailflogs/firewall/src/EBox/Firewall/Model/ToInternetRuleTable.pm)
-
client/firewall/src/EBox/Makefile.am (modified) (1 diff)
-
client/firewall/src/EBox/Model (deleted)
-
client/firewall/tools/sqllog/Makefile.am (modified) (1 diff)
-
client/mailfilter (modified) (1 prop)
-
client/mailfilter/configure.ac (modified) (2 diffs)
-
client/mailfilter/debian/ebox-mailfilter.postinst (modified) (2 diffs)
-
client/mailfilter/debian/ebox-mailfilter.postrm (modified) (2 diffs)
-
client/mailfilter/src/EBox/MailFilter.pm (modified) (7 diffs)
-
client/mailfilter/src/EBox/MailFilter/Composite/Makefile.am (modified) (1 diff)
-
client/mailfilter/src/EBox/MailFilter/Composite/Report (copied) (copied from branches/mailflogs/mailfilter/src/EBox/MailFilter/Composite/Report)
-
client/mailfilter/src/EBox/MailFilter/Composite/Report/FilterReport.pm (copied) (copied from branches/mailflogs/mailfilter/src/EBox/MailFilter/Composite/Report/FilterReport.pm)
-
client/mailfilter/src/EBox/MailFilter/Composite/Report/Makefile.am (copied) (copied from branches/mailflogs/mailfilter/src/EBox/MailFilter/Composite/Report/Makefile.am)
-
client/mailfilter/src/EBox/MailFilter/ConsolidationTest.pm (copied) (copied from branches/mailflogs/mailfilter/src/EBox/MailFilter/ConsolidationTest.pm)
-
client/mailfilter/src/EBox/MailFilter/LogHelper (copied) (copied from branches/mailflogs/mailfilter/src/EBox/MailFilter/LogHelper)
-
client/mailfilter/src/EBox/MailFilter/LogHelper.pm (copied) (copied from branches/mailflogs/mailfilter/src/EBox/MailFilter/LogHelper.pm)
-
client/mailfilter/src/EBox/MailFilter/LogHelper/Makefile.am (copied) (copied from branches/mailflogs/mailfilter/src/EBox/MailFilter/LogHelper/Makefile.am)
-
client/mailfilter/src/EBox/MailFilter/LogHelper/Test.pm (copied) (copied from branches/mailflogs/mailfilter/src/EBox/MailFilter/LogHelper/Test.pm)
-
client/mailfilter/src/EBox/MailFilter/Makefile.am (modified) (1 diff)
-
client/mailfilter/src/EBox/MailFilter/Model/Makefile.am (modified) (1 diff)
-
client/mailfilter/src/EBox/MailFilter/Model/Report (copied) (copied from branches/mailflogs/mailfilter/src/EBox/MailFilter/Model/Report)
-
client/mailfilter/src/EBox/MailFilter/Model/Report/FilterDetails.pm (copied) (copied from branches/mailflogs/mailfilter/src/EBox/MailFilter/Model/Report/FilterDetails.pm)
-
client/mailfilter/src/EBox/MailFilter/Model/Report/FilterGraph.pm (copied) (copied from branches/mailflogs/mailfilter/src/EBox/MailFilter/Model/Report/FilterGraph.pm)
-
client/mailfilter/src/EBox/MailFilter/Model/Report/FilterReportOptions.pm (copied) (copied from branches/mailflogs/mailfilter/src/EBox/MailFilter/Model/Report/FilterReportOptions.pm)
-
client/mailfilter/src/EBox/MailFilter/Model/Report/Makefile.am (copied) (copied from branches/mailflogs/mailfilter/src/EBox/MailFilter/Model/Report/Makefile.am)
-
client/mailfilter/src/EBox/MailFilter/t/LogHelper.t (copied) (copied from branches/mailflogs/mailfilter/src/EBox/MailFilter/t/LogHelper.t)
-
client/mailfilter/src/EBox/MailFilter/t/Makefile.am (modified) (1 diff)
-
client/mailfilter/src/EBox/t/MailFilterConsolidate.t (copied) (copied from branches/mailflogs/mailfilter/src/EBox/t/MailFilterConsolidate.t)
-
client/mailfilter/stubs/clamd.conf.mas (modified) (1 diff)
-
client/mailfilter/tools/Makefile.am (modified) (1 diff)
-
client/mailfilter/tools/sqllog (copied) (copied from branches/mailflogs/mailfilter/tools/sqllog)
-
client/mailfilter/tools/sqllog/Makefile.am (copied) (copied from branches/mailflogs/mailfilter/tools/sqllog/Makefile.am)
-
client/mailfilter/tools/sqllog/mailfilter.sql (copied) (copied from branches/mailflogs/mailfilter/tools/sqllog/mailfilter.sql)
-
client/mailfilter/tools/sqllog/mailfilter_traffic.sql (copied) (copied from branches/mailflogs/mailfilter/tools/sqllog/mailfilter_traffic.sql)
-
client/squid (modified) (1 prop)
-
client/squid/configure.ac (modified) (3 diffs)
-
client/squid/debian/ebox-squid.postinst (modified) (1 diff)
-
client/squid/debian/ebox-squid.postrm (modified) (1 diff)
-
client/squid/src/EBox/Makefile.am (modified) (1 diff)
-
client/squid/src/EBox/Squid.pm (copied) (copied from branches/mailflogs/squid/src/EBox/Squid.pm)
-
client/squid/src/EBox/Squid.pm.in (deleted)
-
client/squid/src/EBox/Squid/Composite/Makefile.am (modified) (1 diff)
-
client/squid/src/EBox/Squid/Composite/Report (copied) (copied from branches/mailflogs/squid/src/EBox/Squid/Composite/Report)
-
client/squid/src/EBox/Squid/Composite/Report/Makefile.am (copied) (copied from branches/mailflogs/squid/src/EBox/Squid/Composite/Report/Makefile.am)
-
client/squid/src/EBox/Squid/Composite/Report/TrafficReport.pm (copied) (copied from branches/mailflogs/squid/src/EBox/Squid/Composite/Report/TrafficReport.pm)
-
client/squid/src/EBox/Squid/Model/Makefile.am (modified) (1 diff)
-
client/squid/src/EBox/Squid/Model/Report (copied) (copied from branches/mailflogs/squid/src/EBox/Squid/Model/Report)
-
client/squid/src/EBox/Squid/Model/Report/Makefile.am (copied) (copied from branches/mailflogs/squid/src/EBox/Squid/Model/Report/Makefile.am)
-
client/squid/src/EBox/Squid/Model/Report/RequestsGraph.pm (copied) (copied from branches/mailflogs/squid/src/EBox/Squid/Model/Report/RequestsGraph.pm)
-
client/squid/src/EBox/Squid/Model/Report/TrafficDetails.pm (copied) (copied from branches/mailflogs/squid/src/EBox/Squid/Model/Report/TrafficDetails.pm)
-
client/squid/src/EBox/Squid/Model/Report/TrafficReportOptions.pm (copied) (copied from branches/mailflogs/squid/src/EBox/Squid/Model/Report/TrafficReportOptions.pm)
-
client/squid/src/EBox/Squid/Model/Report/TrafficSizeGraph.pm (copied) (copied from branches/mailflogs/squid/src/EBox/Squid/Model/Report/TrafficSizeGraph.pm)
-
client/squid/tools/sqllog/Makefile.am (modified) (1 diff)
-
client/squid/tools/sqllog/squid_traffic.sql (copied) (copied from branches/mailflogs/squid/tools/sqllog/squid_traffic.sql)
-
common/libebox (modified) (1 prop)
-
common/libebox/ChangeLog (modified) (1 diff)
-
common/libebox/src/EBox/Sudo.pm (modified) (2 diffs)
-
common/libebox/src/EBox/Validate.pm (modified) (1 diff)
-
common/libebox/src/EBox/t/Validate.t (modified) (1 diff)
-
common/libebox/src/templates/ajax/Makefile.am (modified) (1 diff)
-
common/libebox/src/templates/ajax/graph.mas (copied) (copied from branches/mailflogs/libebox/src/templates/ajax/graph.mas)
-
common/libebox/src/templates/ajax/tableBody.mas (modified) (4 diffs)
-
common/libebox/src/templates/ajax/tableBodyWithoutActions.mas (copied) (copied from branches/mailflogs/libebox/src/templates/ajax/tableBodyWithoutActions.mas)
-
common/libebox/src/templates/ajax/viewer/hasManyViewer.mas (modified) (1 diff)
-
common/libebox/www/Makefile.am (modified) (1 diff)
-
common/libebox/www/js/excanvas.js (copied) (copied from branches/mailflogs/libebox/www/js/excanvas.js)
-
common/libebox/www/js/flotr.js (copied) (copied from branches/mailflogs/libebox/www/js/flotr.js)
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/ebox
- Property svn:mergeinfo set to /branches/mailflogs/ebox:11259-11486
-
trunk/client/ebox/configure.ac
r11390 r11487 134 134 src/EBox/Logs/Makefile 135 135 src/EBox/Logs/Model/Makefile 136 src/EBox/Logs/Model/Report/Makefile 136 137 src/EBox/Logs/Composite/Makefile 138 src/EBox/Logs/Consolidate/Makefile 137 139 src/EBox/Model/Makefile 138 140 src/EBox/Model/Row/Makefile -
trunk/client/ebox/debian/ebox.postinst
r11283 r11487 70 70 chown ebox:ebox ${STDERR_FILE} 71 71 72 73 # add the stderr file needed by sudo74 STDERR_FILE=`perl -MEBox::Config -e'print EBox::Config::tmp() . 'stderr'; 1'`;75 touch ${STDERR_FILE}76 chmod 0600 ${STDERR_FILE}77 chown ebox:ebox ${STDERR_FILE}78 79 72 # add the dynamic-www- and downloads directories 80 73 DYNAMIC_WWW_DIRS=$(perl -MEBox::Config -e'print EBox::Config::dynamicwww() ; print " " ; print join(" ", @{EBox::Config::dynamicwwwSubdirs()}); print " "; print EBox::Config::downloads; 1;'); … … 100 93 101 94 /usr/share/ebox/ebox-sql-table add admin /usr/share/ebox/sqllog/admin.sql 95 /usr/share/ebox/ebox-sql-table add consolidation /usr/share/ebox/sqllog/consolidation.sql 102 96 103 97 -
trunk/client/ebox/debian/po/templates.pot
r11000 r11487 8 8 msgstr "" 9 9 "Project-Id-Version: PACKAGE VERSION\n" 10 "Report-Msgid-Bugs-To: ebox@packages.debian.org\n"11 "POT-Creation-Date: 2008-07-2 7 23:46+0200\n"10 "Report-Msgid-Bugs-To: ubuntu-motu@lists.ubuntu.com\n" 11 "POT-Creation-Date: 2008-07-28 10:41+0200\n" 12 12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 75 75 #: ../ebox.templates:5001 76 76 msgid "" 77 "It seems that the port you have selected is already being used. Press yes"78 " to proceed anyway, or no toenter a new port."77 "It seems that the port you have selected is already being used. You can " 78 "continue anyway or enter a new port." 79 79 msgstr "" -
trunk/client/ebox/migration/logs/Makefile.am
r10308 r11487 4 4 5 5 6 nobase_Migrations_SCRIPTS = 0001_update_configurelogtable.pl 6 nobase_Migrations_SCRIPTS = 0001_update_configurelogtable.pl 0002_remove_old_cron.pl 7 7 8 8 -
trunk/client/ebox/src/EBox/CGI/Logs/Index.pm
r8913 r11487 25 25 use EBox::Global; 26 26 use EBox::Model::ModelManager; 27 use EBox::Html; 27 28 use POSIX qw(ceil); 28 29 … … 31 32 sub new # (error=?, msg=?, cgi=?) 32 33 { 33 my $class = shift; 34 my $self = $class->SUPER::new('title' => __('Logs'), 35 'template' => '/logs/index.mas', 36 @_); 37 $self->{domain} = 'ebox'; 38 bless($self, $class); 39 return $self; 40 } 41 42 sub _getTime { 43 my ($self, $module, $tmpl) = @_; 44 45 foreach my $mod (@{$tmpl}) { 46 if ($mod->{'name'} eq $module) { 47 return $mod->{'timecol'}; 48 } 49 } 50 51 return undef; 34 my $class = shift; 35 my $self = $class->SUPER::new('title' => __('Logs'), 36 'template' => '/logs/index.mas', 37 @_); 38 $self->{domain} = 'ebox'; 39 bless($self, $class); 40 return $self; 41 } 42 43 sub _getTime 44 { 45 my ($self, $module, $tmpl) = @_; 46 47 foreach my $mod (@{$tmpl}) { 48 if ($mod->{'name'} eq $module) { 49 return $mod->{'timecol'}; 50 } 51 } 52 53 return undef; 52 54 } 53 55 … … 60 62 61 63 unless (defined($self->param('page'))) { 62 $page = 0;63 } 64 65 if (defined($self->param('tofirst'))) {66 $page = 0;67 } 68 if (defined($self->param('toprev'))) {69 if ($page > 0) {70 $page = $page -1;71 }72 } 73 if (defined($self->param('tonext'))) {74 if ($page < $tpages) {75 $page = $page + 1;76 }77 } 78 if (defined($self->param('tolast'))) {79 $page = $tpages;64 $page = 0; 65 } 66 67 if (defined($self->param('tofirst'))) { 68 $page = 0; 69 } 70 if (defined($self->param('toprev'))) { 71 if ($page > 0) { 72 $page = $page -1; 73 } 74 } 75 if (defined($self->param('tonext'))) { 76 if ($page < $tpages) { 77 $page = $page + 1; 78 } 79 } 80 if (defined($self->param('tolast'))) { 81 $page = $tpages; 80 82 } 81 83 … … 87 89 { 88 90 my ($self, @masonParams) = @_; 89 91 90 92 91 93 defined $self->{params} or $self->{params} = []; 92 94 my $oldParams_r= $self->{params}; 93 95 if (defined $oldParams_r) { 94 push @masonParams, @{ $oldParams_r };96 push @masonParams, @{ $oldParams_r }; 95 97 } 96 98 … … 114 116 { 115 117 my ($self) = @_; 116 my $toDate = $self->_getDateArray('to'); 118 119 my $toDate; 120 my $refresh = $self->refresh(); 121 122 if ($refresh) { 123 # 86400 second -> one day 124 $toDate = $self->_getDateArray('to', 86400, 0); 125 } 126 else { 127 $toDate = $self->_getDateArray('to'); 128 } 129 117 130 118 131 return $toDate; … … 122 135 sub _getDateArray 123 136 { 124 my ($self, $prefix, $defaultTimeAdjust ) = @_;137 my ($self, $prefix, $defaultTimeAdjust, $useParamsValue) = @_; 125 138 defined $defaultTimeAdjust or $defaultTimeAdjust = 0; 139 defined $useParamsValue or $useParamsValue = 1; 126 140 127 141 my %time; … … 135 149 $time{$prefix . 'year'} = $localtime[5] + 1900; 136 150 137 foreach my $key (keys %time) { 138 my $paramValue = $self->param($key); 139 if (defined $paramValue) { 140 $time{$key} = $paramValue; 141 } 151 152 if ($useParamsValue) { 153 foreach my $key (keys %time) { 154 my $paramValue = $self->param($key); 155 if (defined $paramValue) { 156 $time{$key} = $paramValue; 157 } 158 } 159 142 160 } 143 161 … … 167 185 $hfilters = $self->_paramFilters(); 168 186 %hret = %{$logs->search($fromdate[2].'-'.$fromdate[1].'-'.$fromdate[0].' '.$fromdate[3].':'.$fromdate[4].':0', 169 $todate[2].'-'.$todate[1].'-'.$todate[0].' '.$todate[3].':'.$todate[4].':0',170 $selected,171 PAGESIZE,172 $page,173 $timecol,174 $hfilters)};187 $todate[2].'-'.$todate[1].'-'.$todate[0].' '.$todate[3].':'.$todate[4].':0', 188 $selected, 189 PAGESIZE, 190 $page, 191 $timecol, 192 $hfilters)}; 175 193 176 194 $tpages = ceil ($hret{'totalret'} / PAGESIZE) -1; … … 186 204 push(@masonParameters, 'fromdate' => \@fromdate); 187 205 push(@masonParameters, 'todate' => \@todate); 188 206 189 207 $self->addToMasonParameters(@masonParameters); 190 208 … … 192 210 193 211 sub _encode_filters { 194 my ($par) = @_;195 196 my %encoded = map { $par->{$_} =~ s/'/'/g; $_ => $par->{$_} }197 keys %{$par};198 199 return \%encoded;212 my ($par) = @_; 213 214 my %encoded = map { $par->{$_} =~ s/'/'/g; $_ => $par->{$_} } 215 keys %{$par}; 216 217 return \%encoded; 200 218 } 201 219 … … 240 258 my $hfilters = {}; 241 259 foreach my $filter (grep(s/^filter-//, @{$self->params()})) { 242 $hfilters->{$filter} =260 $hfilters->{$filter} = 243 261 $self->unsafeParam("filter-$filter"); 244 262 } … … 247 265 } 248 266 267 268 sub _header 269 { 270 my ($self) = @_; 271 272 if (not $self->refresh()) { 273 $self->SUPER::_header(); 274 return; 275 } 276 277 278 my $destination = "/ebox/Logs/Index?"; 279 280 my %params = %{ $self->paramsAsHash() }; 281 $params{refresh} = 1; # to assure the refresh parameter is active 282 283 while (my ($param, $value) = each %params) { 284 if ($param eq 'View') { 285 # View we want to only use it the first time to set default refresh 286 # as 1 287 next; 288 } 289 290 $destination .= "$param=$value&"; 291 } 292 $destination =~ s/&$//; 293 294 295 print($self->cgi()->header(-charset=>'utf-8')); 296 my $html = EBox::Html::_makeHtml( 297 'headerWithRefresh.mas', 298 title => $self->{title}, 299 destination => $destination 300 ); 301 print $html; 302 } 303 304 305 306 sub refresh 307 { 308 my ($self) = @_; 309 310 return 1 if $self->param('refresh'); 311 return 1 if $self->param('View'); 312 313 314 return 0; 315 } 316 317 2
