2009-10-05 Sancho Lerena <slerena@artica.es>

* include/fgraph.php: Solved ticks in X label for boolean graphs.

        * operation/agentes/datos_agente.php: Show absolute timestamp and
        data with format_numeric() filter.

        * operation/agentes/estado_monitores.php: Solved typo.





git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1999 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
slerena 2009-10-05 13:14:37 +00:00
parent 26bfe1adfe
commit 0b9f395ec3
4 changed files with 23 additions and 11 deletions

View File

@ -1,3 +1,13 @@
2009-10-05 Sancho Lerena <slerena@artica.es>
* include/fgraph.php: Solved ticks in X label for boolean graphs.
* operation/agentes/datos_agente.php: Show absolute timestamp and
data with format_numeric() filter.
* operation/agentes/estado_monitores.php: Solved typo.
2009-10-01 Miguel de Dios <miguel.dedios@artica.es>
* pandora_console/godmode/reporting/reporting_builder.php: change the

View File

@ -1399,12 +1399,8 @@ function grafico_modulo_boolean ($id_agente_modulo, $period, $show_event,
$engine->fontpath = $config['fontpath'];
$engine->alert_top = $show_alert ? $alert_high : false;
$engine->alert_bottom = $show_alert ? $alert_low : false;;
if ($period < 10000)
$engine->xaxis_interval = 20;
else
$engine->xaxis_interval = $resolution * 4;
$engine->yaxis_interval = 1;
$engine->xaxis_interval = $resolution/10; // Fixed to 10 ticks
$engine->xaxis_format = 'date';
$engine->single_graph ();
@ -1577,10 +1573,11 @@ if ($graphic_type) {
switch ($graphic_type) {
case 'sparse':
grafico_modulo_sparse ($id, $period, $draw_events, $width, $height,
$label, $unit_name, $draw_alerts, $avg_only, $pure, $date);
$label, $unit_name, $draw_alerts, $avg_only, $pure, $date);
break;
case "boolean":
grafico_modulo_boolean ($id, $period, $draw_events, $width, $height , $label, $unit_name, $draw_alerts, 1, $pure, $date);
grafico_modulo_boolean ($id, $period, $draw_events, $width, $height ,
$label, $unit_name, $draw_alerts, 1, $pure, $date);
break;
case "estado_incidente":

View File

@ -85,9 +85,14 @@ foreach ($result as $row) {
} else {
$data[0] = '';
}
$data[1] = print_timestamp ($row["utimestamp"], true);
// This returns data with absolute user-defined timestamp format
// and numeric by data managed with 2 decimals, and not using Graph format
// (replacing 1000 by K and 1000000 by G, like version 2.x
$data[1] = date ($config["date_format"], $row["utimestamp"]);
if (is_numeric ($row["datos"])) {
$data[2] = $row["datos"];
$data[2] = format_numeric($row["datos"],2);
} else {
$data[2] = safe_input ($row["datos"]);
}

View File

@ -126,7 +126,7 @@ foreach ($modules as $module) {
$salida = "<span title='".$module['datos']."' style='white-space: nowrap;'>".substr(salida_limpia($module["datos"]),0,12)."</span>";
}
$data[5] .= $salida;
$data[5] = $salida;
$graph_type = return_graphtype ($module["id_tipo_modulo"]);
if ($module['history_data'] == 1){
$nombre_tipo_modulo = get_moduletype_name ($module["id_tipo_modulo"]);