mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
Now the boolean and module string graphs can search data into the history database
This commit is contained in:
parent
472a360dbe
commit
07eb065a99
@ -2805,6 +2805,7 @@ function grafico_modulo_boolean_data ($agent_module_id, $period, $show_events,
|
|||||||
// Set variables
|
// Set variables
|
||||||
if ($date == 0) $date = get_system_time();
|
if ($date == 0) $date = get_system_time();
|
||||||
$datelimit = $date - $period;
|
$datelimit = $date - $period;
|
||||||
|
$search_in_history_db = db_search_in_history_db($datelimit);
|
||||||
$resolution = $config['graph_res'] * 50; //Number of points of the graph
|
$resolution = $config['graph_res'] * 50; //Number of points of the graph
|
||||||
$interval = (int) ($period / $resolution);
|
$interval = (int) ($period / $resolution);
|
||||||
$agent_name = modules_get_agentmodule_agent_name ($agent_module_id);
|
$agent_name = modules_get_agentmodule_agent_name ($agent_module_id);
|
||||||
@ -2846,7 +2847,7 @@ function grafico_modulo_boolean_data ($agent_module_id, $period, $show_events,
|
|||||||
"utimestamp > $datelimit",
|
"utimestamp > $datelimit",
|
||||||
"utimestamp < $date",
|
"utimestamp < $date",
|
||||||
'order' => 'utimestamp ASC'),
|
'order' => 'utimestamp ASC'),
|
||||||
array ('datos', 'utimestamp'));
|
array ('datos', 'utimestamp'), 'AND', $search_in_history_db);
|
||||||
if ($data === false) {
|
if ($data === false) {
|
||||||
$data = array ();
|
$data = array ();
|
||||||
}
|
}
|
||||||
@ -3512,6 +3513,7 @@ function grafico_modulo_string ($agent_module_id, $period, $show_events,
|
|||||||
if ($date == 0)
|
if ($date == 0)
|
||||||
$date = get_system_time();
|
$date = get_system_time();
|
||||||
$datelimit = $date - $period;
|
$datelimit = $date - $period;
|
||||||
|
$search_in_history_db = db_search_in_history_db($datelimit);
|
||||||
$resolution = $config['graph_res'] * 50; //Number of points of the graph
|
$resolution = $config['graph_res'] * 50; //Number of points of the graph
|
||||||
$interval = (int) ($period / $resolution);
|
$interval = (int) ($period / $resolution);
|
||||||
$agent_name = modules_get_agentmodule_agent_name ($agent_module_id);
|
$agent_name = modules_get_agentmodule_agent_name ($agent_module_id);
|
||||||
@ -3543,7 +3545,7 @@ function grafico_modulo_string ($agent_module_id, $period, $show_events,
|
|||||||
"utimestamp > $datelimit",
|
"utimestamp > $datelimit",
|
||||||
"utimestamp < $date",
|
"utimestamp < $date",
|
||||||
'order' => 'utimestamp ASC'),
|
'order' => 'utimestamp ASC'),
|
||||||
array ('datos', 'utimestamp'));
|
array ('datos', 'utimestamp'), 'AND', $search_in_history_db);
|
||||||
if ($data === false) {
|
if ($data === false) {
|
||||||
$data = array ();
|
$data = array ();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user