X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Flog.html;h=9a61a71e1dcb97b84dda1e071524a26967ce34cf;hb=6d42808bbd3ac9c840c6259aef1dc79a0dc620ff;hp=d1bfb6cc9c118ea4ed133a15061fec2f1eed9597;hpb=06fb1346ff8076a84f743fa07de31852942e144f;p=freeside.git
diff --git a/httemplate/search/log.html b/httemplate/search/log.html
index d1bfb6cc9..9a61a71e1 100644
--- a/httemplate/search/log.html
+++ b/httemplate/search/log.html
@@ -1,6 +1,7 @@
<& elements/search.html,
'title' => 'System Log',
'name_singular' => 'event',
+ 'menubar' => \@menubar,
'html_init' => include('.head'),
'query' => $query,
'count_query' => $count_query,
@@ -64,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,
} &>
|
@@ -79,17 +80,17 @@ a:visited {text-decoration: none}
Level
<& /elements/select.html,
- field => 'min_level',
- options => [ 0..7 ],
- labels => { map {$_ => $FS::Log::LEVELS[$_]} 0..7 },
- curr_value => $cgi->param('min_level'),
+ field => 'min_level',
+ options => [ 0..7 ],
+ labels => { map {$_ => $FS::Log::LEVELS[$_]} 0..7 },
+ curr_value => scalar($cgi->param('min_level')),
&>
to
<& /elements/select.html,
- field => 'max_level',
- options => [ 0..7 ],
- labels => { map {$_ => $FS::Log::LEVELS[$_]} 0..7 },
- curr_value => $cgi->param('max_level'),
+ field => 'max_level',
+ options => [ 0..7 ],
+ labels => { map {$_ => $FS::Log::LEVELS[$_]} 0..7 },
+ curr_value => scalar($cgi->param('max_level')),
&>
|
@@ -100,6 +101,12 @@ a:visited {text-decoration: none}
labels => { map {$_, $_} @contexts },
curr_value => ($cgi->param('context') || ''),
&>
+ <& /elements/checkbox.html,
+ 'field' => 'context_height',
+ 'postfix' => 'Only match most specific context',
+ 'value' => 1,
+ 'curr_value' => scalar($cgi->param('context_height')),
+ &>
|
@@ -137,7 +144,7 @@ my $tt_sub = sub {
return '' if @context == 1 and length($log->message) <= 60;
my $html = ''.(shift @context).'
';
my $pre = '↳';
- foreach (@context, $log->message) {
+ foreach (map encode_entities($_), @context, $log->message) {
$html .= "$pre$_
";
$pre = ' '.$pre;
}
@@ -204,13 +211,16 @@ my $curuser = $FS::CurrentUser::CurrentUser;
die "access denied"
unless $curuser->access_right([ 'View system logs', 'Configuration' ]);
+my @menubar = ();
+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'));
my %search = ();
$search{'date'} = [ FS::UI::Web::parse_beginning_ending($cgi) ];
$search{'level'} = [ $cgi->param('min_level'), $cgi->param('max_level') ];
-foreach my $param (qw(agentnum context tablename tablenum custnum message)) {
+foreach my $param (qw(agentnum context context_height tablename tablenum custnum message)) {
if ( $cgi->param($param) ) {
$search{$param} = $cgi->param($param);
}