Merge branch 'ent-6542-agents-alerts-view-fallos-visuales' into 'develop'
Fix See merge request artica/pandorafms!3652
This commit is contained in:
commit
8471f170fb
|
@ -54,16 +54,12 @@ if ($sec2 === 'extensions/agents_alerts') {
|
||||||
*/
|
*/
|
||||||
function mainAgentsAlerts()
|
function mainAgentsAlerts()
|
||||||
{
|
{
|
||||||
global $ajaxPage;
|
|
||||||
// This page.
|
|
||||||
$thisOwnPage = 'index.php?sec=view&sec2=extensions/agents_alerts';
|
|
||||||
// Ajax variables.
|
// Ajax variables.
|
||||||
$ajaxPage = 'extensions/agents_alerts';
|
|
||||||
$pageName = '[AgentsAlerts]';
|
$pageName = '[AgentsAlerts]';
|
||||||
// Control call flow.
|
// Control call flow.
|
||||||
try {
|
try {
|
||||||
// User access and validation is being processed on class constructor.
|
// User access and validation is being processed on class constructor.
|
||||||
$obj = new AgentsAlerts($ajaxPage);
|
$obj = new AgentsAlerts();
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
if (is_ajax() === true) {
|
if (is_ajax() === true) {
|
||||||
echo json_encode(['error' => $pageName.$e->getMessage() ]);
|
echo json_encode(['error' => $pageName.$e->getMessage() ]);
|
||||||
|
|
|
@ -35,10 +35,7 @@ require_once $config['homedir'].'/include/class/HTML.class.php';
|
||||||
require_once $config['homedir'].'/include/functions_agents.php';
|
require_once $config['homedir'].'/include/functions_agents.php';
|
||||||
require_once $config['homedir'].'/include/functions_modules.php';
|
require_once $config['homedir'].'/include/functions_modules.php';
|
||||||
require_once $config['homedir'].'/include/functions_users.php';
|
require_once $config['homedir'].'/include/functions_users.php';
|
||||||
require_once 'include/functions_reporting.php';
|
require_once $config['homedir'].'/include/functions_reporting.php';
|
||||||
require_once 'include/config.php';
|
|
||||||
|
|
||||||
use PandoraFMS\Module;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AgentWizard class
|
* AgentWizard class
|
||||||
|
@ -46,13 +43,6 @@ use PandoraFMS\Module;
|
||||||
class AgentsAlerts extends HTML
|
class AgentsAlerts extends HTML
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
|
||||||
* Var that contain very cool stuff
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
private $ajaxController;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Selected refresh rate
|
* Selected refresh rate
|
||||||
*
|
*
|
||||||
|
@ -113,11 +103,9 @@ class AgentsAlerts extends HTML
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param string $ajaxController Path.
|
|
||||||
*
|
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function __construct(string $ajaxController)
|
public function __construct()
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
|
@ -138,8 +126,6 @@ class AgentsAlerts extends HTML
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Capture all parameters before start.
|
|
||||||
$this->ajaxController = $ajaxController;
|
|
||||||
// Pure variable for full screen selection.
|
// Pure variable for full screen selection.
|
||||||
$this->pure = $config['pure'];
|
$this->pure = $config['pure'];
|
||||||
// Id user.
|
// Id user.
|
||||||
|
|
Loading…
Reference in New Issue