X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2Flog.html;h=f6ac9d9be9f46957f04ed61a340990975f75b148;hp=cefa399a283c6c82e829905c09ea21cfdccb5a7c;hb=b71b1576c68bc40ad26592b354feace37a029f0e;hpb=5f563d5ac7e6e1e93cca382baa42ee106f3db5a0
diff --git a/httemplate/search/log.html b/httemplate/search/log.html
index cefa399a2..f6ac9d9be 100644
--- a/httemplate/search/log.html
+++ b/httemplate/search/log.html
@@ -65,14 +65,14 @@ a:visited {text-decoration: none}
From
<& /elements/input-date-field.html, {
- name => 'beginning',
- value => $cgi->param('beginning'),
+ name => 'beginning',
+ value => scalar($cgi->param('beginning')),
} &>
|
To
<& /elements/input-date-field.html, {
- name => 'ending',
- value => $cgi->param('ending') || '',
+ name => 'ending',
+ value => scalar($cgi->param('ending')) || '',
noinit => 1,
} &>
|
@@ -80,17 +80,17 @@ a:visited {text-decoration: none}
Level
<& /elements/select.html,
- field => 'min_level',
- options => [ 0..4 ],
- labels => { map {$_ => $FS::Log::LEVELS[$_]} 0..4 },
- curr_value => $cgi->param('min_level'),
+ field => 'min_level',
+ options => [ &FS::Log::levelnums ],
+ labels => { &FS::Log::levelmap },
+ curr_value => scalar($cgi->param('min_level')),
&>
to
<& /elements/select.html,
- field => 'max_level',
- options => [ 0..4 ],
- labels => { map {$_ => $FS::Log::LEVELS[$_]} 0..4 },
- curr_value => $cgi->param('max_level'),
+ field => 'max_level',
+ options => [ &FS::Log::levelnums ],
+ labels => { &FS::Log::levelmap },
+ curr_value => scalar($cgi->param('max_level')),
&>
|
@@ -128,7 +128,7 @@ a:visited {text-decoration: none}
<%once>
my $date_sub = sub { time2str('%Y-%m-%d %T', $_[0]->_date) };
-my $level_sub = sub { $FS::Log::LEVELS[$_[0]->level] };
+my $level_sub = sub { $FS::Log::LEVELS{$_[0]->level} };
my $context_sub = sub {
my $log = shift;
@@ -191,15 +191,15 @@ my $object_link_sub = sub {
}
};
-my @colors = (
- '404040', #debug, gray
- '000000', #info, black
- '0000aa', #warning, blue
- 'aa0066', #error, purple
- 'ff0000', #critical, red
+my %colors = (
+ 0 => '404040', #debug, gray
+ 1 => '000000', #info, black
+ 3 => '0000aa', #warning, blue
+ 4 => 'aa0066', #error, purple
+ 5 => 'ff0000', #critical, red
);
-my $color_sub = sub { $colors[ $_[0]->level ]; };
+my $color_sub = sub { $colors{ $_[0]->level }; };
my @contexts = ('', sort FS::log_context->contexts);
%once>
@@ -209,10 +209,10 @@ die "access denied"
unless $curuser->access_right([ 'View system logs', 'Configuration' ]);
my @menubar = ();
-push @menubar, qq(Configure conditions for sending email when logging),
+push @menubar, qq(Configure conditions for sending email when logging);
$cgi->param('min_level', 0) unless defined($cgi->param('min_level'));
-$cgi->param('max_level', 7) unless defined($cgi->param('max_level'));
+$cgi->param('max_level', 5) unless defined($cgi->param('max_level'));
my %search = ();
$search{'date'} = [ FS::UI::Web::parse_beginning_ending($cgi) ];
|