2010-04-26 Sancho Lerena <slerena@ærtica.es>

* operation/agentes/datos_agente.php: Fixed the data table
        render for log4x data.

        * operation/agentes/estado_monitores.php: Graph icon should be
        shown when using  Log4x data, it has graphics (need to implement in
        Flash in the future).




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2611 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
slerena 2010-04-26 17:31:58 +00:00
parent 973ddbe204
commit 22916f22fe
3 changed files with 24 additions and 12 deletions

View File

@ -1,3 +1,12 @@
2010-04-26 Sancho Lerena <slerena@ærtica.es>
* operation/agentes/datos_agente.php: Fixed the data table render
for log4x data.
* operation/agentes/estado_monitores.php: Graph icon should be shown
when using Log4x data, it has graphics (need to implement in Flash in
the future).
2010-04-26 Ramon Novoa <rnovoa@artica.es>
* include/javascript/pandora.js: The id_group filter in

View File

@ -59,16 +59,16 @@ $block_size = (int) $config["block_size"];
$columns = array ();
if ($moduletype_name == "log4x") {
$table->width = 1100;
$table->width = "100%";
$sql_body = sprintf ("FROM tagente_datos_log4x WHERE id_agente_modulo = %d AND utimestamp > %d ORDER BY utimestamp DESC", $module_id, get_system_time () - $period);
$columns = array(
"Delete" => array("id_tagente_datos_log4x", "format_delete_log4x", "align" => "center", "width" => "10px"),
"Timestamp" => array("utimestamp", "format_timestamp", "align" => "center", "width" => "200px"),
"Timestamp" => array("utimestamp", "format_timestamp", "align" => "center" ),
"Sev" => array("severity", "format_data", "align" => "center", "width" => "70px"),
"Message" => array("message", "format_verbatim", "align" => "left", "width" => "400px"),
"ST" => array("stacktrace", "format_data", "align" => "left", "width" => "400px")
"Message" => array("message", "format_verbatim", "align" => "left", "width" => "45%"),
"StackTrace" => array("stacktrace", "format_verbatim", "align" => "left", "width" => "50%")
);
} else if (preg_match ("/string/", $moduletype_name)) {
@ -101,9 +101,11 @@ if ($result === false) {
$result = array ();
}
echo "<h2>".__('Received data from')." ".get_agentmodule_agent_name ($module_id)." / ".get_agentmodule_name ($module_id)." </h2>";
echo "<h3>".human_time_description ($period) ."</h3>";
$header_title = __('Received data from')." ".get_agentmodule_agent_name ($module_id)." / ".get_agentmodule_name ($module_id). " - " . human_time_description ($period);
echo "<h2>".$header_title. "</h2>";
//
$index = 0;
foreach($columns as $col => $attr){
$table->head[$index] = $col;
@ -155,9 +157,11 @@ function format_data($data)
return $data;
}
function format_verbatim($data)
{
return "<pre style='font-size:8px;'>" . $data . "</pre>";
function format_verbatim($data){
// We need to replace \n by <br> to create a "similar" output to
// information recolected in logs.
$data2 = preg_replace ("/\\n/", "<br>", $data);
return "<span style='font-size:10px;'>" . $data2 . "</span>";
}
function format_timestamp($ts)

View File

@ -149,8 +149,7 @@ foreach ($modules as $module) {
$link ="winopeng('operation/agentes/stat_win.php?type=$graph_type&period=86400&id=".$module["id_agente_modulo"]."&label=".$module["nombre"]."&refresh=600','day_".$win_handle."')";
$data[6] = "";
if ($nombre_tipo_modulo != "log4x")
// if ($nombre_tipo_modulo != "log4x")
$data[6] .= '<a href="javascript:'.$link.'"><img src="images/chart_curve.png" border=0></a>';
$data[6] .= "&nbsp;<a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=$id_agente&tab=data_view&period=86400&id=".$module["id_agente_modulo"]."'><img border=0 src='images/binary.png'></a>";
}