mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-26 11:19:26 +02:00
Enhanced statistics page and done some more tweaks to the charts
This commit is contained in:
parent
3a7826b6f8
commit
1a32c0f3eb
@ -288,5 +288,6 @@ $content['LN_DETAIL_BACKTOLIST'] = "Back to Listview";
|
|||||||
$content['LN_GEN_ERROR_INVALIDFIELD'] = "Invalid fieldname";
|
$content['LN_GEN_ERROR_INVALIDFIELD'] = "Invalid fieldname";
|
||||||
$content['LN_GEN_ERROR_MISSINGCHARTFIELD'] = "Missing fieldname";
|
$content['LN_GEN_ERROR_MISSINGCHARTFIELD'] = "Missing fieldname";
|
||||||
$content['LN_GEN_ERROR_INVALIDTYPE'] = "Invalid or unknown chart type";
|
$content['LN_GEN_ERROR_INVALIDTYPE'] = "Invalid or unknown chart type";
|
||||||
|
$content['LN_ERROR_CHARTS_NOTCONFIGURED'] = "There are no charts configured at all.";
|
||||||
|
|
||||||
?>
|
?>
|
@ -289,9 +289,15 @@ $content['LN_CONVERT_ERROR_SOURCEIMPORT'] = "Critical Error while importing the
|
|||||||
$content['LN_STATS_GRAPH'] = "Graph";
|
$content['LN_STATS_GRAPH'] = "Graph";
|
||||||
$content['LN_GEN_ERROR_INVALIDFIELD'] = "Invalid fieldname";
|
$content['LN_GEN_ERROR_INVALIDFIELD'] = "Invalid fieldname";
|
||||||
$content['LN_GEN_ERROR_MISSINGCHARTFIELD'] = "Missing fieldname";
|
$content['LN_GEN_ERROR_MISSINGCHARTFIELD'] = "Missing fieldname";
|
||||||
$content['LN_GEN_ERROR_INVALIDTYPE'] = "Invalid or unknown chart type";
|
$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";
|
||||||
|
|
||||||
?>
|
?>
|
@ -293,5 +293,6 @@ $content['LN_DETAIL_BACKTOLIST'] = "Voltar para a lista";
|
|||||||
$content['LN_GEN_ERROR_INVALIDFIELD'] = "Invalid fieldname";
|
$content['LN_GEN_ERROR_INVALIDFIELD'] = "Invalid fieldname";
|
||||||
$content['LN_GEN_ERROR_MISSINGCHARTFIELD'] = "Missing fieldname";
|
$content['LN_GEN_ERROR_MISSINGCHARTFIELD'] = "Missing fieldname";
|
||||||
$content['LN_GEN_ERROR_INVALIDTYPE'] = "Invalid or unknown chart type";
|
$content['LN_GEN_ERROR_INVALIDTYPE'] = "Invalid or unknown chart type";
|
||||||
|
$content['LN_ERROR_CHARTS_NOTCONFIGURED'] = "There are no charts configured at all.";
|
||||||
|
|
||||||
?>
|
?>
|
@ -63,6 +63,37 @@ if ( isset($content['Charts']) )
|
|||||||
$i = 0; // Help counter!
|
$i = 0; // Help counter!
|
||||||
foreach ($content['Charts'] as &$myChart )
|
foreach ($content['Charts'] as &$myChart )
|
||||||
{
|
{
|
||||||
|
// --- Set display name for chart type
|
||||||
|
switch($myChart['chart_type'])
|
||||||
|
{
|
||||||
|
case CHART_CAKE:
|
||||||
|
$myChart['CHART_TYPE_DISPLAYNAME'] = $content['LN_CHART_TYPE_CAKE'];
|
||||||
|
break;
|
||||||
|
case CHART_BARS_VERTICAL:
|
||||||
|
$myChart['CHART_TYPE_DISPLAYNAME'] = $content['LN_CHART_TYPE_BARS_VERTICAL'];
|
||||||
|
break;
|
||||||
|
case CHART_BARS_HORIZONTAL:
|
||||||
|
$myChart['CHART_TYPE_DISPLAYNAME'] = $content['LN_CHART_TYPE_BARS_HORIZONTAL'];
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$myChart['CHART_TYPE_DISPLAYNAME'] = $content['LN_GEN_ERROR_INVALIDTYPE'];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// ---
|
||||||
|
|
||||||
|
// --- Set display name for chart field
|
||||||
|
if ( isset($myChart['chart_field']) && isset($content[ $fields[$myChart['chart_field']]['FieldCaptionID'] ]) )
|
||||||
|
$myChart['CHART_FIELD_DISPLAYNAME'] = $content[ $fields[$myChart['chart_field']]['FieldCaptionID'] ];
|
||||||
|
else
|
||||||
|
$myChart['CHART_FIELD_DISPLAYNAME'] = $myChart['chart_field'];
|
||||||
|
// ---
|
||||||
|
|
||||||
|
// --- Set showpercent display
|
||||||
|
if ( $myChart['showpercent'] == 1 )
|
||||||
|
$myChart['showpercent_display'] = "Yes";
|
||||||
|
else
|
||||||
|
$myChart['showpercent_display'] = "No";
|
||||||
|
// ---
|
||||||
|
|
||||||
// --- Set CSS Class
|
// --- Set CSS Class
|
||||||
if ( $i % 2 == 0 )
|
if ( $i % 2 == 0 )
|
||||||
|
@ -21,9 +21,29 @@
|
|||||||
<!-- BEGIN Charts -->
|
<!-- BEGIN Charts -->
|
||||||
{rowbegin}
|
{rowbegin}
|
||||||
<br><br>
|
<br><br>
|
||||||
<table cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
|
<table cellpadding="0" cellspacing="0" border="0" align="center" valign="top" width="{chart_width}" class="table_with_border_light">
|
||||||
<tr><td class="cellmenu1" align="center"><B>{DisplayName}</B></td></tr>
|
<tr><td class="cellmenu1" align="center" colspan="2"><B>{DisplayName}</B></td></tr>
|
||||||
<tr><td class="{cssclass}">
|
<tr>
|
||||||
|
<td class="cellmenu2" width="150" nowrap><B>{LN_CHART_TYPE}</B></td>
|
||||||
|
<td class="line1" width="100%"> {CHART_TYPE_DISPLAYNAME}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="cellmenu2" nowrap><B>{LN_CHART_FIELD}</B></td>
|
||||||
|
<td class="line2"> {CHART_FIELD_DISPLAYNAME}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="cellmenu2" nowrap><B>{LN_CHART_WIDTH}</B></td>
|
||||||
|
<td class="line1"> {chart_width}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="cellmenu2" nowrap><B>{LN_CHART_MAXRECORDS}</B></td>
|
||||||
|
<td class="line2"> {maxrecords}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="cellmenu2" nowrap><B>{LN_CHART_SHOWPERCENT}</B></td>
|
||||||
|
<td class="line1"> {showpercent_display}</td>
|
||||||
|
</tr>
|
||||||
|
<tr><td class="{cssclass}" colspan="2">
|
||||||
<img src="{BASEPATH}chartgenerator.php?type={chart_type}&byfield={chart_field}&width={chart_width}&maxrecords={maxrecords}" width="{chart_width}" height="{chart_width}">
|
<img src="{BASEPATH}chartgenerator.php?type={chart_type}&byfield={chart_field}&width={chart_width}&maxrecords={maxrecords}" width="{chart_width}" height="{chart_width}">
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -103,6 +103,12 @@ font
|
|||||||
border-color: #050A0F #050A0F #050A0F #050A0F;
|
border-color: #050A0F #050A0F #050A0F #050A0F;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.table_with_border_light
|
||||||
|
{
|
||||||
|
background-color:#1C2021;
|
||||||
|
border:1px #050A0F solid;
|
||||||
|
}
|
||||||
|
|
||||||
.with_border
|
.with_border
|
||||||
{
|
{
|
||||||
text-indent:3px;
|
text-indent:3px;
|
||||||
|
@ -104,6 +104,12 @@ font
|
|||||||
border-color: #CCCCCC #000000 #000000 #CCCCCC;
|
border-color: #CCCCCC #000000 #000000 #CCCCCC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.table_with_border_light
|
||||||
|
{
|
||||||
|
background-color:#CCCCCC;
|
||||||
|
border:1px #AAAAAA solid;
|
||||||
|
}
|
||||||
|
|
||||||
.with_border
|
.with_border
|
||||||
{
|
{
|
||||||
text-indent:3px;
|
text-indent:3px;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user