mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 15:54:29 +02:00
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:
parent
724379ca32
commit
d05a350141
@ -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>
|
2010-04-26 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
* include/javascript/pandora.js: The id_group filter in
|
* include/javascript/pandora.js: The id_group filter in
|
||||||
|
@ -59,16 +59,16 @@ $block_size = (int) $config["block_size"];
|
|||||||
$columns = array ();
|
$columns = array ();
|
||||||
|
|
||||||
if ($moduletype_name == "log4x") {
|
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);
|
$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(
|
$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"),
|
"Sev" => array("severity", "format_data", "align" => "center", "width" => "70px"),
|
||||||
"Message" => array("message", "format_verbatim", "align" => "left", "width" => "400px"),
|
"Message" => array("message", "format_verbatim", "align" => "left", "width" => "45%"),
|
||||||
"ST" => array("stacktrace", "format_data", "align" => "left", "width" => "400px")
|
"StackTrace" => array("stacktrace", "format_verbatim", "align" => "left", "width" => "50%")
|
||||||
);
|
);
|
||||||
|
|
||||||
} else if (preg_match ("/string/", $moduletype_name)) {
|
} else if (preg_match ("/string/", $moduletype_name)) {
|
||||||
@ -101,9 +101,11 @@ if ($result === false) {
|
|||||||
$result = array ();
|
$result = array ();
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "<h2>".__('Received data from')." ".get_agentmodule_agent_name ($module_id)." / ".get_agentmodule_name ($module_id)." </h2>";
|
$header_title = __('Received data from')." ".get_agentmodule_agent_name ($module_id)." / ".get_agentmodule_name ($module_id). " - " . human_time_description ($period);
|
||||||
echo "<h3>".human_time_description ($period) ."</h3>";
|
|
||||||
|
|
||||||
|
echo "<h2>".$header_title. "</h2>";
|
||||||
|
|
||||||
|
//
|
||||||
$index = 0;
|
$index = 0;
|
||||||
foreach($columns as $col => $attr){
|
foreach($columns as $col => $attr){
|
||||||
$table->head[$index] = $col;
|
$table->head[$index] = $col;
|
||||||
@ -155,9 +157,11 @@ function format_data($data)
|
|||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
function format_verbatim($data)
|
function format_verbatim($data){
|
||||||
{
|
// We need to replace \n by <br> to create a "similar" output to
|
||||||
return "<pre style='font-size:8px;'>" . $data . "</pre>";
|
// information recolected in logs.
|
||||||
|
$data2 = preg_replace ("/\\n/", "<br>", $data);
|
||||||
|
return "<span style='font-size:10px;'>" . $data2 . "</span>";
|
||||||
}
|
}
|
||||||
|
|
||||||
function format_timestamp($ts)
|
function format_timestamp($ts)
|
||||||
|
@ -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."')";
|
$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] .= '<a href="javascript:'.$link.'"><img src="images/chart_curve.png" border=0></a>';
|
||||||
$data[6] .= " <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>";
|
$data[6] .= " <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>";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user