#10194 added include files graphs for security

This commit is contained in:
Daniel Cebrian 2023-10-17 12:20:32 +02:00
parent af0d311e1c
commit 953df647a2
3 changed files with 6 additions and 1 deletions

View File

@ -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'];
}

View File

@ -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;

View File

@ -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');
}