projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
no need for fix for #74270 in 5.x, FK enforcement was strict in 4.x
[freeside.git]
/
httemplate
/
search
/
log.html
diff --git
a/httemplate/search/log.html
b/httemplate/search/log.html
index
111200f
..
f6ac9d9
100644
(file)
--- a/
httemplate/search/log.html
+++ b/
httemplate/search/log.html
@@
-65,14
+65,14
@@
a:visited {text-decoration: none}
<TR>
<TD>From
<& /elements/input-date-field.html, {
<TR>
<TD>From
<& /elements/input-date-field.html, {
- name => 'beginning',
- value
=> $cgi->param('beginning'
),
+ name
=> 'beginning',
+ value
=> scalar($cgi->param('beginning')
),
} &>
</TD>
<TD>To
<& /elements/input-date-field.html, {
} &>
</TD>
<TD>To
<& /elements/input-date-field.html, {
- name => 'ending',
- value
=> $cgi->param('ending'
) || '',
+ name
=> 'ending',
+ value
=> scalar($cgi->param('ending')
) || '',
noinit => 1,
} &>
</TD>
noinit => 1,
} &>
</TD>
@@
-80,17
+80,17
@@
a:visited {text-decoration: none}
<TR>
<TD>Level
<& /elements/select.html,
<TR>
<TD>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
=> [ &FS::Log::levelnums
],
+ labels
=> { &FS::Log::levelmap
},
+ curr_value =>
scalar($cgi->param('min_level')
),
&>
to
<& /elements/select.html,
&>
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
=> [ &FS::Log::levelnums
],
+ labels
=> { &FS::Log::levelmap
},
+ curr_value =>
scalar($cgi->param('max_level')
),
&>
</TD>
<TD>
&>
</TD>
<TD>
@@
-128,7
+128,7
@@
a:visited {text-decoration: none}
<%once>
my $date_sub = sub { time2str('%Y-%m-%d %T', $_[0]->_date) };
<%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;
my $context_sub = sub {
my $log = shift;
@@
-191,18
+191,15
@@
my $object_link_sub = sub {
}
};
}
};
-my @colors = (
- '404040', #debug
- '0000aa', #info
- '00aa00', #notice
- 'aa0066', #warning
- '000000', #error
- 'aa0000', #critical
- 'ff0000', #alert
- 'ff0000', #emergency
+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>
my @contexts = ('', sort FS::log_context->contexts);
</%once>
@@
-212,10
+209,10
@@
die "access denied"
unless $curuser->access_right([ 'View system logs', 'Configuration' ]);
my @menubar = ();
unless $curuser->access_right([ 'View system logs', 'Configuration' ]);
my @menubar = ();
-push @menubar, qq(<A HREF="${fsurl}browse/log_email.html" STYLE="text-decoration: underline;">Configure conditions for sending email when logging</A>)
,
+push @menubar, qq(<A HREF="${fsurl}browse/log_email.html" STYLE="text-decoration: underline;">Configure conditions for sending email when logging</A>)
;
$cgi->param('min_level', 0) unless defined($cgi->param('min_level'));
$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) ];
my %search = ();
$search{'date'} = [ FS::UI::Web::parse_beginning_ending($cgi) ];