mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-26 03:09:21 +02:00
Added filtering support for the new Eventlog fields
This commit is contained in:
parent
6b3dccaf18
commit
3c2e2ee27e
@ -340,6 +340,35 @@ abstract class LogStream {
|
||||
}
|
||||
// ---
|
||||
break;
|
||||
/* BEGIN Eventlog based fields */
|
||||
case "eventid":
|
||||
$tmpKeyName = SYSLOG_EVENT_ID;
|
||||
$tmpFilterType = FILTER_TYPE_NUMBER;
|
||||
// --- Extra numeric Check
|
||||
if ( isset($tmpValues) )
|
||||
{
|
||||
foreach( $tmpValues as $mykey => $szValue )
|
||||
{
|
||||
if ( is_numeric($szValue) )
|
||||
$tmpValues[$mykey] = $szValue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( !is_numeric($tmpArray[FILTER_TMP_VALUE]) )
|
||||
$tmpArray[FILTER_TMP_VALUE] = "";
|
||||
}
|
||||
// ---
|
||||
break;
|
||||
case "eventlogtype":
|
||||
$tmpKeyName = SYSLOG_EVENT_LOGTYPE;
|
||||
$tmpFilterType = FILTER_TYPE_STRING;
|
||||
break;
|
||||
case "eventlogsource":
|
||||
$tmpKeyName = SYSLOG_EVENT_SOURCE;
|
||||
$tmpFilterType = FILTER_TYPE_STRING;
|
||||
break;
|
||||
/* END Eventlog based fields */
|
||||
case "syslogtag":
|
||||
$tmpKeyName = SYSLOG_SYSLOGTAG;
|
||||
$tmpFilterType = FILTER_TYPE_STRING;
|
||||
|
@ -386,8 +386,19 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['Sources'][$c
|
||||
'DisplayName' => $content['LN_VIEW_FILTERFOR'] . "'" . GetMessageTypeDisplayName( $logArray[$mycolkey] ). "'",
|
||||
'IconSource' => $content['MENU_BULLET_BLUE']
|
||||
);
|
||||
|
||||
}
|
||||
/* Eventlog based fields */
|
||||
else if ( $mycolkey == SYSLOG_EVENT_ID )
|
||||
{
|
||||
// Set OnClick Menu for SYSLOG_EVENT_ID
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['hasbuttons'] = true;
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['buttons'][] = array(
|
||||
'ButtonUrl' => '?filter=eventid%3A' . $logArray[$mycolkey] . '&search=Search',
|
||||
'DisplayName' => $content['LN_VIEW_FILTERFOR'] . "'" . $logArray[$mycolkey] . "'",
|
||||
'IconSource' => $content['MENU_BULLET_BLUE']
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
else if ( $content['fields'][$mycolkey]['FieldType'] == FILTER_TYPE_STRING )
|
||||
{
|
||||
@ -483,7 +494,27 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['Sources'][$c
|
||||
'IconSource' => $content['MENU_BULLET_BLUE']
|
||||
);
|
||||
}
|
||||
|
||||
/* Eventlog based fields */
|
||||
else if ( $mycolkey == SYSLOG_EVENT_LOGTYPE )
|
||||
{
|
||||
// Set OnClick Menu for SYSLOG_EVENT_LOGTYPE
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['hasbuttons'] = true;
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['buttons'][] = array(
|
||||
'ButtonUrl' => '?filter=eventlogtype%3A' . $logArray[$mycolkey] . '&search=Search',
|
||||
'DisplayName' => $content['LN_VIEW_FILTERFOR'] . "'" . $logArray[$mycolkey] . "'",
|
||||
'IconSource' => $content['MENU_BULLET_BLUE']
|
||||
);
|
||||
}
|
||||
else if ( $mycolkey == SYSLOG_EVENT_SOURCE )
|
||||
{
|
||||
// Set OnClick Menu for SYSLOG_EVENT_SOURCE
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['hasbuttons'] = true;
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['buttons'][] = array(
|
||||
'ButtonUrl' => '?filter=eventlogsource%3A' . $logArray[$mycolkey] . '&search=Search',
|
||||
'DisplayName' => $content['LN_VIEW_FILTERFOR'] . "'" . $logArray[$mycolkey] . "'",
|
||||
'IconSource' => $content['MENU_BULLET_BLUE']
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user