RT#38217: Send email when logging conditions are met
[freeside.git] / httemplate / search / log.html
index b607f50..cefa399 100644 (file)
@@ -81,15 +81,15 @@ a:visited {text-decoration: none}
   <TD>Level
     <& /elements/select.html,
       field => 'min_level',
-      options => [ 0..7 ],
-      labels => { map {$_ => $FS::Log::LEVELS[$_]} 0..7 },
+      options => [ 0..4 ],
+      labels => { map {$_ => $FS::Log::LEVELS[$_]} 0..4 },
       curr_value => $cgi->param('min_level'),
     &>
      to
     <& /elements/select.html,
       field => 'max_level',
-      options => [ 0..7 ],
-      labels => { map {$_ => $FS::Log::LEVELS[$_]} 0..7 },
+      options => [ 0..4 ],
+      labels => { map {$_ => $FS::Log::LEVELS[$_]} 0..4 },
       curr_value => $cgi->param('max_level'),
     &>
   </TD>
@@ -101,6 +101,12 @@ a:visited {text-decoration: none}
       labels => { map {$_, $_} @contexts },
       curr_value => ($cgi->param('context') || ''),
     &>
+    <BR><& /elements/checkbox.html,
+      'field' => 'context_height',
+      'postfix' => 'Only match most specific context',
+      'value' => 1,
+      'curr_value' => scalar($cgi->param('context_height')),
+    &>
   </TD>
 </TR>
 <TR>
@@ -186,14 +192,11 @@ my $object_link_sub = sub {
 };
 
 my @colors = (
-  '404040', #debug
-  '0000aa', #info
-  '00aa00', #notice
-  'aa0066', #warning
-  '000000', #error
-  'aa0000', #critical
-  'ff0000', #alert
-  'ff0000', #emergency
+  '404040', #debug, gray
+  '000000', #info, black
+  '0000aa', #warning, blue
+  'aa0066', #error, purple
+  'ff0000', #critical, red
 );
 
 my $color_sub = sub { $colors[ $_[0]->level ]; };
@@ -214,7 +217,7 @@ $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);
   }