mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-26 03:09:21 +02:00
Added special handling for the date fields
This commit is contained in:
parent
24cd80089b
commit
efc27aed5f
@ -75,7 +75,7 @@ if ( isset($_GET['byfield']) )
|
||||
if ( isset($fields[ $_GET['byfield'] ]) )
|
||||
{
|
||||
$content['chart_field'] = $_GET['byfield'];
|
||||
$content['chart_fieldtype'] = $fields[SYSLOG_UID]['FieldType'];
|
||||
$content['chart_fieldtype'] = $fields[ $content['chart_field'] ]['FieldType'];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -598,13 +598,22 @@ class LogStreamDisk extends LogStream {
|
||||
{
|
||||
if ( isset($logArray[$szFieldId]) )
|
||||
{
|
||||
if ( isset($aResult[ $logArray[$szFieldId] ]) )
|
||||
$aResult[ $logArray[$szFieldId] ]++;
|
||||
if ( $nFieldType == FILTER_TYPE_DATE )
|
||||
{
|
||||
// Convert to FULL Day Date for now!
|
||||
$myFieldData = date( "Y-m-d", $logArray[$szFieldId][EVTIME_TIMESTAMP] );
|
||||
}
|
||||
else // Just copy the value!
|
||||
$myFieldData = $logArray[$szFieldId];
|
||||
|
||||
|
||||
if ( isset($aResult[ $myFieldData ]) )
|
||||
$aResult[ $myFieldData ]++;
|
||||
else
|
||||
{
|
||||
// Initialize entry if we haven't exceeded the RecordLImit yet!
|
||||
if ( count($aResult) < ($nRecordLimit-1) ) // -1 because the last entry will become all others
|
||||
$aResult[ $logArray[$szFieldId] ] = 1;
|
||||
$aResult[ $myFieldData ] = 1;
|
||||
else
|
||||
{
|
||||
// Count record to others
|
||||
|
@ -289,5 +289,14 @@ $content['LN_DETAIL_BACKTOLIST'] = "Back to Listview";
|
||||
$content['LN_GEN_ERROR_MISSINGCHARTFIELD'] = "Missing fieldname";
|
||||
$content['LN_GEN_ERROR_INVALIDTYPE'] = "Invalid or unknown chart type";
|
||||
$content['LN_ERROR_CHARTS_NOTCONFIGURED'] = "There are no charts configured at all.";
|
||||
$content['LN_CHART_TYPE'] = "Chart type";
|
||||
$content['LN_CHART_WIDTH'] = "Chart width";
|
||||
$content['LN_CHART_FIELD'] = "Chart field";
|
||||
$content['LN_CHART_MAXRECORDS'] = "Top records count";
|
||||
$content['LN_CHART_SHOWPERCENT'] = "Show percentage data";
|
||||
$content['LN_CHART_TYPE_CAKE'] = "Cake (Pie)";
|
||||
$content['LN_CHART_TYPE_BARS_VERTICAL'] = "Bars vertical";
|
||||
$content['LN_CHART_TYPE_BARS_HORIZONTAL'] = "Bars horizontal";
|
||||
$content['LN_STATS_WARNINGDISPLAY'] = "Generating graphics on large data sources currently is very time consuming. This will be addressed in later versions. If processing takes too long, please simply cancel the request.";
|
||||
|
||||
?>
|
@ -294,5 +294,14 @@ $content['LN_DETAIL_BACKTOLIST'] = "Voltar para a lista";
|
||||
$content['LN_GEN_ERROR_MISSINGCHARTFIELD'] = "Missing fieldname";
|
||||
$content['LN_GEN_ERROR_INVALIDTYPE'] = "Invalid or unknown chart type";
|
||||
$content['LN_ERROR_CHARTS_NOTCONFIGURED'] = "There are no charts configured at all.";
|
||||
$content['LN_CHART_TYPE'] = "Chart type";
|
||||
$content['LN_CHART_WIDTH'] = "Chart width";
|
||||
$content['LN_CHART_FIELD'] = "Chart field";
|
||||
$content['LN_CHART_MAXRECORDS'] = "Top records count";
|
||||
$content['LN_CHART_SHOWPERCENT'] = "Show percentage data";
|
||||
$content['LN_CHART_TYPE_CAKE'] = "Cake (Pie)";
|
||||
$content['LN_CHART_TYPE_BARS_VERTICAL'] = "Bars vertical";
|
||||
$content['LN_CHART_TYPE_BARS_HORIZONTAL'] = "Bars horizontal";
|
||||
$content['LN_STATS_WARNINGDISPLAY'] = "Generating graphics on large data sources currently is very time consuming. This will be addressed in later versions. If processing takes too long, please simply cancel the request.";
|
||||
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user