Merge branch 'v2-stable' into beta

Conflicts:

	src/lang/de/admin.php
This commit is contained in:
Andre Lorbach 2011-02-09 18:11:52 +01:00
commit fed24ca3e9
4 changed files with 33 additions and 5 deletions

View File

@ -139,9 +139,19 @@ if ( !$content['error_occured'] )
$stream = $stream_config->LogStreamFactory($stream_config); $stream = $stream_config->LogStreamFactory($stream_config);
$stream->SetFilter($content['chart_defaultfilter']); $stream->SetFilter($content['chart_defaultfilter']);
// Set Columns we want to open! // Set Columns we want to open!
$content['ChartColumns'][] = SYSLOG_UID; $content['ChartColumns'] = array();
$content['ChartColumns'][] = $content['chart_field']; // First add filter fields to array
$aFilterFields = $stream->ReturnFieldsByFilters();
if ( $aFilterFields != null )
$content['ChartColumns'] = $aFilterFields;
// append mandetory fields
if ( !in_array(SYSLOG_UID, $content['ChartColumns']) )
$content['ChartColumns'][] = SYSLOG_UID;
if ( !in_array($content['chart_field'], $content['ChartColumns']) )
$content['ChartColumns'][] = $content['chart_field'];
// Append fields from defaultfilter as well ! // Append fields from defaultfilter as well !
if ( strlen($content['chart_defaultfilter']) > 0 ) if ( strlen($content['chart_defaultfilter']) > 0 )

View File

@ -567,6 +567,24 @@ abstract class LogStream {
} }
/**
* Helper function to return all fields needed for filters
* Can be helpful for functions which need to add filtering fields
*/
public function ReturnFieldsByFilters()
{
global $fields;
if ( $this->_filters != null )
{
// Return array keys
$aResult = array_keys($this->_filters);
return $aResult;
}
else // No fields at all!
return null;
}
/* /*
* --- PIRVATE HELPERS! * --- PIRVATE HELPERS!
*/ */

View File

@ -1151,7 +1151,7 @@ class LogStreamDB extends LogStream {
} }
} }
//echo $this->_SQLwhereClause; // echo $this->_SQLwhereClause;
//$dbmapping[$szTableType][SYSLOG_UID] //$dbmapping[$szTableType][SYSLOG_UID]
} }
else // No filters means nothing to do! else // No filters means nothing to do!

View File

@ -205,7 +205,7 @@ $content['LN_VIEWS_ERROR_DELSEARCH'] = "Löschen der Ansicht mit der id '%1'
$content['LN_VIEWS_ERROR_HASBEENDEL'] = "Die Ansicht '%1' wurder erfolgreich gelöscht!"; $content['LN_VIEWS_ERROR_HASBEENDEL'] = "Die Ansicht '%1' wurder erfolgreich gelöscht!";
$content['LN_VIEWS_ADDEDIT'] = "Hinzufügen/Bearbeiten einer Ansicht"; $content['LN_VIEWS_ADDEDIT'] = "Hinzufügen/Bearbeiten einer Ansicht";
$content['LN_VIEWS_COLUMNLIST'] = "Konfigurierte Spalten"; $content['LN_VIEWS_COLUMNLIST'] = "Konfigurierte Spalten";
$content['LN_VIEWS_ADDCOLUMN'] = "Eine Spalte hinzufügen"; $content['LN_VIEWS_ADDCOLUMN'] = "Eine Spalte hinzufuegen";
$content['LN_VIEWS_ERROR_DISPLAYNAMEEMPTY'] = "Der Name der Ansicht kann nicht leer sein."; $content['LN_VIEWS_ERROR_DISPLAYNAMEEMPTY'] = "Der Name der Ansicht kann nicht leer sein.";
$content['LN_VIEWS_COLUMN'] = "Spalte"; $content['LN_VIEWS_COLUMN'] = "Spalte";
$content['LN_VIEWS_COLUMN_REMOVE'] = "Spalte löschen"; $content['LN_VIEWS_COLUMN_REMOVE'] = "Spalte löschen";
@ -304,7 +304,7 @@ $content['LN_DBUPGRADE_ULTRASTATSDBVERSION'] = "LogAnalyzer Datenbank Version";
$content['LN_CHARTS_CENTER'] = "Charts Optionen"; $content['LN_CHARTS_CENTER'] = "Charts Optionen";
$content['LN_CHARTS_EDIT'] = "Chart bearbeiten"; $content['LN_CHARTS_EDIT'] = "Chart bearbeiten";
$content['LN_CHARTS_DELETE'] = "Chart löschen"; $content['LN_CHARTS_DELETE'] = "Chart löschen";
$content['LN_CHARTS_ADD'] = "Neuen Chart hinzufügen"; $content['LN_CHARTS_ADD'] = "Neuen Chart hinzufuegen";
$content['LN_CHARTS_ADDEDIT'] = "Hinzufügen/Bearbeiten eines Charts"; $content['LN_CHARTS_ADDEDIT'] = "Hinzufügen/Bearbeiten eines Charts";
$content['LN_CHARTS_NAME'] = "Name des Charts"; $content['LN_CHARTS_NAME'] = "Name des Charts";
$content['LN_CHARTS_ENABLED'] = "Chart aktiviert"; $content['LN_CHARTS_ENABLED'] = "Chart aktiviert";