Minor enhancments to the chart generation

This commit is contained in:
unknown 2008-09-15 16:31:39 +02:00
parent aa636e59ed
commit 9603249f46
5 changed files with 25 additions and 11 deletions

View File

@ -32,16 +32,17 @@
*/
// *** Default includes and procedures *** //
if ( !defined('IN_PHPLOGCON') )
define('IN_PHPLOGCON', true);
$gl_root_path = './';
// Now include necessary include files!
include($gl_root_path . 'include/functions_common.php');
include($gl_root_path . 'include/functions_frontendhelpers.php');
include($gl_root_path . 'include/functions_filters.php');
include_once($gl_root_path . 'include/functions_common.php');
include_once($gl_root_path . 'include/functions_frontendhelpers.php');
include_once($gl_root_path . 'include/functions_filters.php');
// Include LogStream facility
include($gl_root_path . 'classes/logstream.class.php');
include_once($gl_root_path . 'classes/logstream.class.php');
InitPhpLogCon();
InitSourceConfigs();
@ -466,7 +467,7 @@ if ( $content['error_occured'] )
// --- Output the image
//$graph->Stroke();
$graph->StrokeCSIM();
$graph->StrokeCSIM( basename(__FILE__), '', 0);
// ---
?>

View File

@ -108,7 +108,7 @@ function InitUserSystemPhpLogCon()
if ( GetConfigSetting("UserDBEnabled", false) )
{
// Include User Functions
include($gl_root_path . 'include/functions_users.php');
include_once($gl_root_path . 'include/functions_users.php');
}
}
@ -141,6 +141,10 @@ function InitPhpLogCon()
// Needed to make global
global $gl_root_path, $content;
// Abort if already defined
if ( defined('PHPLOGCON_INITIALIZED') )
return;
// Init Basics which do not need a database
InitBasicPhpLogCon();
@ -181,6 +185,9 @@ function InitPhpLogCon()
// --- Enable PHP Debug Mode
InitPhpDebugMode();
// ---
// Finally defined PHPLOGCON_INITIALIZED!
define( 'PHPLOGCON_INITIALIZED', TRUE );
}
function CreateLogLineTypesList( $selectedType )

View File

@ -534,7 +534,7 @@ if ( isset($content['Sources'][$currentSourceID]) )
if ( strlen($content['searchstr']) > 0 )
{
$content['syslogmessages'][$counter]['values'][$mycolkey]['buttons'][] = array(
'ButtonUrl' => '?filter=' . urlencode($content['searchstr']) . '+eventid%3A' . $logArray[$mycolkey] . '&search=Search' . $content['additional_url_sourceonly'],
'ButtonUrl' => '?filter=' . urlencode($content['searchstr']) . '+eventcategory%3A' . $logArray[$mycolkey] . '&search=Search' . $content['additional_url_sourceonly'],
'DisplayName' => GetAndReplaceLangStr($content['LN_VIEW_ADDTOFILTER'], $logArray[$mycolkey]),
'IconSource' => $content['MENU_BULLET_GREEN']
);

View File

@ -61,11 +61,14 @@ if ( isset($content['Charts']) )
// PreProcess Charts Array for display!
$i = 0; // Help counter!
foreach ($content['Charts'] as &$myChart )
foreach ($content['Charts'] as $myChartID => &$myChart )
{
// Only process if chart is enabled
if ( isset($myChart['chart_enabled']) && $myChart['chart_enabled'] == 1 )
{
// Set Chart ID
$myChart['CHART_ID'] = $myChartID;
// --- Set display name for chart type
switch($myChart['chart_type'])
{

View File

@ -50,7 +50,10 @@
<td class="line1">&nbsp;{showpercent_display}</td>
</tr>
<tr><td class="{cssclass}" colspan="2">
<iframe scrolling="no" frameborder="0" marginwidth="0" marginheight="0" src="{BASEPATH}chartgenerator.php?type={chart_type}&byfield={chart_field}&width={chart_width}&maxrecords={maxrecords}&showpercent={showpercent}" width="{chart_width}" height="{chart_width}"></iframe>
<iframe name="Chart{CHART_ID}" scrolling="no" frameborder="0" marginwidth="0" marginheight="0" src="{BASEPATH}chartgenerator.php?type={chart_type}&byfield={chart_field}&width={chart_width}&maxrecords={maxrecords}&showpercent={showpercent}" width="{chart_width}" height="{chart_width}"></iframe>
<script>
Chart{CHART_ID}.document.body.innerHTML = "bla";
</script>
</td></tr>
</table>
<br><br>