diff --git a/pandora_console/include/lib/TacticalView/elements/Agents.php b/pandora_console/include/lib/TacticalView/elements/Agents.php index 99da58e652..97063ec300 100644 --- a/pandora_console/include/lib/TacticalView/elements/Agents.php +++ b/pandora_console/include/lib/TacticalView/elements/Agents.php @@ -35,6 +35,8 @@ class Agents extends Element public function __construct() { parent::__construct(); + include_once $config['homedir'].'/include/graphs/fgraph.php'; + include_once $config['homedir'].'/include/functions_graph.php'; $this->title = __('Agents'); $this->ajaxMethods = ['getGroups']; } diff --git a/pandora_console/include/lib/TacticalView/elements/Events.php b/pandora_console/include/lib/TacticalView/elements/Events.php index 7f68cce77b..a7f9970ee3 100644 --- a/pandora_console/include/lib/TacticalView/elements/Events.php +++ b/pandora_console/include/lib/TacticalView/elements/Events.php @@ -37,6 +37,7 @@ class Events extends Element global $config; parent::__construct(); include_once $config['homedir'].'/include/graphs/fgraph.php'; + include_once $config['homedir'].'/include/functions_graph.php'; $this->title = __('Events'); $this->ajaxMethods = [ 'getEventsGraph', @@ -75,7 +76,7 @@ class Events extends Element $sql = 'SELECT utimestamp from tevento WHERE utimestamp >= '.$intervalh.' ORDER BY utimestamp DESC;'; $rows = db_process_sql($sql); $cut_seconds = ($time_events / 24); - $now = time(); + $now = (time() - 300); $cuts_intervals = []; for ($i = 0; $i < 24; $i++) { $cuts_intervals[$now] = 0; diff --git a/pandora_console/include/lib/TacticalView/elements/MonitoringElements.php b/pandora_console/include/lib/TacticalView/elements/MonitoringElements.php index 71a57d3070..eece06f65f 100644 --- a/pandora_console/include/lib/TacticalView/elements/MonitoringElements.php +++ b/pandora_console/include/lib/TacticalView/elements/MonitoringElements.php @@ -35,6 +35,8 @@ class MonitoringElements extends Element public function __construct() { parent::__construct(); + include_once $config['homedir'].'/include/graphs/fgraph.php'; + include_once $config['homedir'].'/include/functions_graph.php'; $this->title = __('Monitoring elements'); }