mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
2013-01-17 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php include/functions_reporting.php: Merged fixes for string graphs. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7503 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
074f5cf271
commit
157c526c29
@ -1,3 +1,8 @@
|
|||||||
|
2013-01-17 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||||
|
|
||||||
|
* include/functions_graph.php
|
||||||
|
include/functions_reporting.php: Merged fixes for string graphs.
|
||||||
|
|
||||||
2013-01-17 Ramon Novoa <rnovoa@artica.es>
|
2013-01-17 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
* operation/netflow/nf_live_view.php: Style fix.
|
* operation/netflow/nf_live_view.php: Style fix.
|
||||||
|
@ -2915,9 +2915,10 @@ function graph_netflow_aggregate_pie ($data, $aggregate, $ttl = 1, $only_image =
|
|||||||
*/
|
*/
|
||||||
function grafico_modulo_string ($agent_module_id, $period, $show_events,
|
function grafico_modulo_string ($agent_module_id, $period, $show_events,
|
||||||
$width, $height , $title, $unit_name, $show_alerts, $avg_only = 0, $pure=0,
|
$width, $height , $title, $unit_name, $show_alerts, $avg_only = 0, $pure=0,
|
||||||
$date = 0, $only_image = false, $homeurl = '', $adapt_key) {
|
$date = 0, $only_image = false, $homeurl = '', $adapt_key, $ttl = 1) {
|
||||||
global $config;
|
global $config;
|
||||||
global $graphic_type;
|
global $graphic_type;
|
||||||
|
global $max_value;
|
||||||
|
|
||||||
// Set variables
|
// Set variables
|
||||||
if ($date == 0)
|
if ($date == 0)
|
||||||
@ -3020,7 +3021,7 @@ function grafico_modulo_string ($agent_module_id, $period, $show_events,
|
|||||||
$count = 0;
|
$count = 0;
|
||||||
$total = 0;
|
$total = 0;
|
||||||
// Read data that falls in the current interval
|
// Read data that falls in the current interval
|
||||||
while (isset ($data[$j]) !== null && $data[$j]['utimestamp'] >= $timestamp && $data[$j]['utimestamp'] <= ($timestamp + $interval)) {
|
while (isset($data[$j]) && isset ($data[$j]) !== null && $data[$j]['utimestamp'] >= $timestamp && $data[$j]['utimestamp'] <= ($timestamp + $interval)) {
|
||||||
$count++;
|
$count++;
|
||||||
$j++;
|
$j++;
|
||||||
}
|
}
|
||||||
|
@ -2507,9 +2507,23 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||||||
|
|
||||||
$data = array ();
|
$data = array ();
|
||||||
|
|
||||||
|
$moduletype_name = modules_get_moduletype_name (modules_get_agentmodule_type ($content['id_agent_module']));
|
||||||
|
|
||||||
|
if (preg_match ("/string/", $moduletype_name)) {
|
||||||
|
|
||||||
|
$urlImage = ui_get_full_url(false, false, false, false);
|
||||||
|
|
||||||
|
$data[0] = grafico_modulo_string ($content['id_agent_module'], $content['period'],
|
||||||
|
false, $sizgraph_w, $sizgraph_h, '', '', false, 1, false,
|
||||||
|
$report["datetime"], true, $urlImage);
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
$data[0] = grafico_modulo_sparse($content['id_agent_module'], $content['period'],
|
$data[0] = grafico_modulo_sparse($content['id_agent_module'], $content['period'],
|
||||||
false, $sizgraph_w, $sizgraph_h, '', '', false, true, true,
|
false, $sizgraph_w, $sizgraph_h, '', '', false, true, true,
|
||||||
$report["datetime"], '', 0, 0, true, true, ui_get_full_url(false) . '/');
|
$report["datetime"], '', 0, 0, true, true, ui_get_full_url(false) . '/');
|
||||||
|
}
|
||||||
|
|
||||||
array_push ($table->data, $data);
|
array_push ($table->data, $data);
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user