mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-26 03:09:21 +02:00
Added new feature to suppress display of multiple messages
This commit is contained in:
parent
354c174118
commit
4aefc080cf
@ -93,6 +93,7 @@ if ( isset($_POST['op']) && $content['EditAllowed'] )
|
||||
if ( isset ($_POST['MiscShowPageRenderStats']) ) { $content['MiscShowPageRenderStats'] = 1; } else { $content['MiscShowPageRenderStats'] = 0; }
|
||||
if ( isset ($_POST['MiscEnableGzipCompression']) ) { $content['MiscEnableGzipCompression'] = 1; } else { $content['MiscEnableGzipCompression'] = 0; }
|
||||
if ( isset ($_POST['DebugUserLogin']) ) { $content['DebugUserLogin'] = 1; } else { $content['DebugUserLogin'] = 0; }
|
||||
if ( isset ($_POST['SuppressDuplicatedMessages']) ) { $content['SuppressDuplicatedMessages'] = 1; } else { $content['SuppressDuplicatedMessages'] = 0; }
|
||||
|
||||
// Read Text number fields
|
||||
if ( isset ($_POST['ViewMessageCharacterLimit']) && is_numeric($_POST['ViewMessageCharacterLimit']) ) { $content['ViewMessageCharacterLimit'] = $_POST['ViewMessageCharacterLimit']; }
|
||||
@ -123,6 +124,7 @@ if ($content['MiscShowDebugGridCounter'] == 1) { $content['MiscShowDebugGridCoun
|
||||
if ($content['MiscShowPageRenderStats'] == 1) { $content['MiscShowPageRenderStats_checked'] = "checked"; } else { $content['MiscShowPageRenderStats_checked'] = ""; }
|
||||
if ($content['MiscEnableGzipCompression'] == 1) { $content['MiscEnableGzipCompression_checked'] = "checked"; } else { $content['MiscEnableGzipCompression_checked'] = ""; }
|
||||
if ($content['DebugUserLogin'] == 1) { $content['DebugUserLogin_checked'] = "checked"; } else { $content['DebugUserLogin_checked'] = ""; }
|
||||
if ($content['SuppressDuplicatedMessages'] == 1) { $content['SuppressDuplicatedMessages_checked'] = "checked"; } else { $content['SuppressDuplicatedMessages_checked'] = ""; }
|
||||
// ---
|
||||
|
||||
// --- Init for DefaultView field!
|
||||
|
@ -76,6 +76,7 @@ $CFG['SearchCustomButtonCaption'] = "I'd like to feel sad"; // Default caption f
|
||||
$CFG['SearchCustomButtonSearch'] = "error"; // Default search string for the custom search button
|
||||
|
||||
$CFG['EnableIPAddressResolve'] = 1; // If enabled, IP Addresses inline messages are automatically resolved and the result is added in brackets {} behind the IP Address
|
||||
$CFG['SuppressDuplicatedMessages'] = 0; // If enabled, duplicated messages will be suppressed in the main display.
|
||||
// ---
|
||||
|
||||
// --- Define which fields you want to see
|
||||
|
@ -1061,6 +1061,7 @@ function SaveGeneralSettingsIntoDB()
|
||||
WriteConfigValue( "MiscShowPageRenderStats", true );
|
||||
WriteConfigValue( "MiscEnableGzipCompression", true );
|
||||
WriteConfigValue( "DebugUserLogin", true );
|
||||
WriteConfigValue( "SuppressDuplicatedMessages", true );
|
||||
|
||||
WriteConfigValue( "ViewMessageCharacterLimit", true );
|
||||
WriteConfigValue( "ViewEntriesPerPage", true );
|
||||
|
@ -298,6 +298,31 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['Sources'][$c
|
||||
//Loop through the messages!
|
||||
do
|
||||
{
|
||||
// --- Extra stuff for suppressing messages
|
||||
if (
|
||||
isset($CFG['SuppressDuplicatedMessages']) && $CFG['SuppressDuplicatedMessages'] == 1
|
||||
&&
|
||||
isset($logArray[SYSLOG_MESSAGE])
|
||||
)
|
||||
{
|
||||
|
||||
if ( !isset($szLastMessage) ) // Only set lastmgr
|
||||
$szLastMessage = $logArray[SYSLOG_MESSAGE];
|
||||
else
|
||||
{
|
||||
// Skip if same msg
|
||||
if ( $szLastMessage == $logArray[SYSLOG_MESSAGE] )
|
||||
{
|
||||
// Set last mgr
|
||||
$szLastMessage = $logArray[SYSLOG_MESSAGE];
|
||||
|
||||
// Skip entry
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
// ---
|
||||
|
||||
// --- Set CSS Class
|
||||
if ( $counter % 2 == 0 )
|
||||
$content['syslogmessages'][$counter]['cssclass'] = "line1";
|
||||
|
@ -77,6 +77,7 @@ $content['LN_GEN_CONFIGFILE'] = "Configuration File";
|
||||
$content['LN_GEN_ACCESSDENIED'] = "Access denied to this function";
|
||||
$content['LN_GEN_DEFVIEWS'] = "Default selected view";
|
||||
$content['LN_GEN_DEFSOURCE'] = "Default selected source";
|
||||
$content['LN_GEN_SUPPRESSDUPMSG'] = "Suppress duplicated messages";
|
||||
|
||||
// User Center
|
||||
$content['LN_USER_CENTER'] = "User Options";
|
||||
|
@ -77,7 +77,7 @@ $content['LN_GEN_CONFIGFILE'] = "Configuration File";
|
||||
$content['LN_GEN_ACCESSDENIED'] = "Access denied to this function";
|
||||
$content['LN_GEN_DEFVIEWS'] = "Default selected view";
|
||||
$content['LN_GEN_DEFSOURCE'] = "Default selected source";
|
||||
|
||||
$content['LN_GEN_SUPPRESSDUPMSG'] = "Suppress duplicated messages";
|
||||
|
||||
// User Center
|
||||
$content['LN_USER_CENTER'] = "User Options";
|
||||
|
@ -77,6 +77,7 @@ $content['LN_GEN_CONFIGFILE'] = "Configuration File";
|
||||
$content['LN_GEN_ACCESSDENIED'] = "Access denied to this function";
|
||||
$content['LN_GEN_DEFVIEWS'] = "Default selected view";
|
||||
$content['LN_GEN_DEFSOURCE'] = "Default selected source";
|
||||
$content['LN_GEN_SUPPRESSDUPMSG'] = "Suppress duplicated messages";
|
||||
|
||||
// User Center
|
||||
$content['LN_USER_CENTER'] = "User Options";
|
||||
|
@ -93,7 +93,10 @@
|
||||
<td align="left" class="cellmenu1" nowrap><b>{LN_GEN_IPADRRESOLVE}</b></td>
|
||||
<td align="right" class="line1" ><input type="checkbox" name="EnableIPAddressResolve" value="yes" {EnableIPAddressResolve_checked}></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="left" class="cellmenu1" nowrap><b>{LN_GEN_SUPPRESSDUPMSG}</b></td>
|
||||
<td align="right" class="line1" ><input type="checkbox" name="SuppressDuplicatedMessages" value="yes" {SuppressDuplicatedMessages_checked}></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center" valign="top" class="title">
|
||||
<strong>{LN_ADMIN_MISC}</strong></td>
|
||||
|
Loading…
x
Reference in New Issue
Block a user