diff --git a/src/chartgenerator.php b/src/chartgenerator.php index 37863ef..772fd9b 100644 --- a/src/chartgenerator.php +++ b/src/chartgenerator.php @@ -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 { diff --git a/src/classes/logstreamdisk.class.php b/src/classes/logstreamdisk.class.php index 2c6c8ce..409fd4f 100644 --- a/src/classes/logstreamdisk.class.php +++ b/src/classes/logstreamdisk.class.php @@ -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 diff --git a/src/lang/de/main.php b/src/lang/de/main.php index 26498aa..a0a9b52 100644 --- a/src/lang/de/main.php +++ b/src/lang/de/main.php @@ -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."; ?> \ No newline at end of file diff --git a/src/lang/pt_BR/main.php b/src/lang/pt_BR/main.php index c36f9cb..360fe2c 100644 --- a/src/lang/pt_BR/main.php +++ b/src/lang/pt_BR/main.php @@ -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."; ?> \ No newline at end of file