WIP DBMainainer, fixed Websockets library placement
This commit is contained in:
parent
6063c4f50b
commit
d9428ce215
|
@ -68,4 +68,7 @@ enterprise/extensions/ipam/include/javascript/ipam.js
|
|||
enterprise/extensions/ipam/include/javascript/IpamMapController.js
|
||||
enterprise/extensions/ipam/ipam_action.php
|
||||
enterprise/extensions/ipam.php
|
||||
enterprise/extensions/ipam
|
||||
enterprise/extensions/ipam
|
||||
include/lib/WSManager.php
|
||||
include/lib/WebSocketServer.php
|
||||
include/lib/WebSocketUser.php
|
|
@ -0,0 +1,79 @@
|
|||
<?php
|
||||
/**
|
||||
* Config class.
|
||||
*
|
||||
* @category Class
|
||||
* @package Pandora FMS
|
||||
* @subpackage OpenSource
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Begin.
|
||||
namespace PandoraFMS\Core;
|
||||
|
||||
require_once __DIR__.'/../../include/config.php';
|
||||
require_once __DIR__.'/../../include/functions_config.php';
|
||||
|
||||
/**
|
||||
* Config class to operate console configuration.
|
||||
*/
|
||||
final class Config
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* Retrieve configuration token.
|
||||
*
|
||||
* @param string $token Token to retrieve.
|
||||
* @param mixed $default Default value if not found.
|
||||
*
|
||||
* @return mixed Configuration token.
|
||||
*/
|
||||
public static function get(string $token, $default=null)
|
||||
{
|
||||
global $config;
|
||||
|
||||
if (isset($config[$token]) === true) {
|
||||
return $config[$token];
|
||||
}
|
||||
|
||||
return $default;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set configuration token.
|
||||
*
|
||||
* @param string $token Token to set.
|
||||
* @param mixed $value Value to be.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function set(string $token, $value)
|
||||
{
|
||||
if (self::get($token) === null) {
|
||||
config_update_value($token, $value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,250 @@
|
|||
<?php
|
||||
/**
|
||||
* Database mantainer class.
|
||||
*
|
||||
* @category Class
|
||||
* @package Pandora FMS
|
||||
* @subpackage OpenSource
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Begin.
|
||||
namespace PandoraFMS\Core;
|
||||
|
||||
/**
|
||||
* Class to handle database mantainer (not queries).
|
||||
*/
|
||||
final class DBMantainer
|
||||
{
|
||||
|
||||
/**
|
||||
* Database user.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $user;
|
||||
|
||||
/**
|
||||
* Database pass.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $pass;
|
||||
|
||||
/**
|
||||
* Database port.
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
private $port;
|
||||
|
||||
/**
|
||||
* Database name.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* Database host.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $host;
|
||||
|
||||
/**
|
||||
* Charset forced.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $charset;
|
||||
|
||||
/**
|
||||
* Verifies if PandoraFMS DB schema is installed.
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
private $installed;
|
||||
|
||||
/**
|
||||
* Verifies if endpoint is connected.
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
private $connected;
|
||||
|
||||
/**
|
||||
* Connection link.
|
||||
*
|
||||
* @var mixed|null
|
||||
*/
|
||||
private $dbh;
|
||||
|
||||
/**
|
||||
* Last error registered.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $lastError;
|
||||
|
||||
|
||||
/**
|
||||
* Initialize DBMaintainer object.
|
||||
*
|
||||
* @param array $params Database connection definition, including:
|
||||
* - user
|
||||
* - pass
|
||||
* - database name
|
||||
* - host (default 127.0.0.1)
|
||||
* - port (default 3306)
|
||||
* If not defined some fields will use default values.
|
||||
*/
|
||||
public function __construct(array $params)
|
||||
{
|
||||
$this->user = $params['user'];
|
||||
$this->pass = $params['pass'];
|
||||
$this->host = $params['host'];
|
||||
$this->port = $params['port'];
|
||||
$this->name = $params['name'];
|
||||
$this->charset = $params['charset'];
|
||||
|
||||
// Try to connect.
|
||||
$this->connect();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Connects (if not connected) to current definition.
|
||||
*
|
||||
* @return boolean True if successfully connected, false if not.
|
||||
*/
|
||||
private function connect()
|
||||
{
|
||||
if ($this->connected === true) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$dbc = new \mysqli(
|
||||
$this->host,
|
||||
$this->user,
|
||||
$this->pass,
|
||||
$this->name,
|
||||
$this->port
|
||||
);
|
||||
|
||||
if ($dbc->connect_error === false) {
|
||||
$this->dbh = null;
|
||||
$this->connected = false;
|
||||
$this->lastError = $dbc->connect_errno.': '.$dbc->connect_error;
|
||||
} else {
|
||||
$this->dbh = $dbc;
|
||||
if (empty($this->charset) === false) {
|
||||
$dbc->set_charset($this->charset);
|
||||
}
|
||||
|
||||
$this->connected = true;
|
||||
$this->lastError = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieve last error.
|
||||
*
|
||||
* @return string Error message.
|
||||
*/
|
||||
public function getLastError()
|
||||
{
|
||||
if ($this->lastError !== null) {
|
||||
return $this->lastError;
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Install PandoraFMS database schema in current target.
|
||||
*
|
||||
* @return boolean Installation is success or not.
|
||||
*/
|
||||
public function install()
|
||||
{
|
||||
if ($this->connect() !== true) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->installed === true) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$this->lastError = 'Pending installation';
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Updates PandoraFMS database schema in current target.
|
||||
*
|
||||
* @return boolean Current installation is up to date.
|
||||
*/
|
||||
public function update()
|
||||
{
|
||||
if ($this->connect() !== true) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->install() !== true) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->lastError = 'Pending update';
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Verifies current target database is connected, installed and updated.
|
||||
*
|
||||
* @return boolean Status of the installation.
|
||||
*/
|
||||
public function check()
|
||||
{
|
||||
if ($this->connect() !== true) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->install() !== true) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->update() !== true) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -40,14 +40,12 @@
|
|||
*/
|
||||
|
||||
// Begin.
|
||||
namespace PandoraFMS\WebSockets;
|
||||
namespace PandoraFMS\Websockets;
|
||||
|
||||
use \PandoraFMS\Websockets\WebSocketServer;
|
||||
use \PandoraFMS\Websockets\WebSocketUser;
|
||||
use \PandoraFMS\User;
|
||||
|
||||
|
||||
require_once __DIR__.'/../functions.php';
|
||||
require_once __DIR__.'/../../functions.php';
|
||||
|
||||
/**
|
||||
* Redirects ws communication between two endpoints.
|
||||
|
@ -212,7 +210,7 @@ class WSManager extends WebSocketServer
|
|||
*/
|
||||
public function readSocket($user)
|
||||
{
|
||||
$buffer;
|
||||
$buffer = '';
|
||||
|
||||
$numBytes = socket_recv(
|
||||
$user->socket,
|
||||
|
@ -271,7 +269,7 @@ class WSManager extends WebSocketServer
|
|||
{
|
||||
global $config;
|
||||
|
||||
$match;
|
||||
$match = [];
|
||||
$php_session_id = '';
|
||||
\preg_match(
|
||||
'/PHPSESSID=(.*)/',
|
|
@ -37,8 +37,8 @@ namespace Composer\Autoload;
|
|||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Jordi Boggiano <j.boggiano@seld.be>
|
||||
* @see http://www.php-fig.org/psr/psr-0/
|
||||
* @see http://www.php-fig.org/psr/psr-4/
|
||||
* @see https://www.php-fig.org/psr/psr-0/
|
||||
* @see https://www.php-fig.org/psr/psr-4/
|
||||
*/
|
||||
class ClassLoader
|
||||
{
|
||||
|
@ -60,7 +60,7 @@ class ClassLoader
|
|||
public function getPrefixes()
|
||||
{
|
||||
if (!empty($this->prefixesPsr0)) {
|
||||
return call_user_func_array('array_merge', $this->prefixesPsr0);
|
||||
return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
|
||||
}
|
||||
|
||||
return array();
|
||||
|
|
|
@ -6,6 +6,7 @@ $vendorDir = dirname(dirname(__FILE__));
|
|||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
|
||||
'DeepCopy\\DeepCopy' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/DeepCopy.php',
|
||||
'DeepCopy\\Exception\\CloneException' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php',
|
||||
'DeepCopy\\Exception\\PropertyException' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Exception/PropertyException.php',
|
||||
|
@ -44,7 +45,6 @@ return array(
|
|||
'Egulias\\EmailValidator\\Exception\\DomainHyphened' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/DomainHyphened.php',
|
||||
'Egulias\\EmailValidator\\Exception\\DotAtEnd' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/DotAtEnd.php',
|
||||
'Egulias\\EmailValidator\\Exception\\DotAtStart' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/DotAtStart.php',
|
||||
'Egulias\\EmailValidator\\Exception\\ExpectedQPair' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/ExpectingQPair.php',
|
||||
'Egulias\\EmailValidator\\Exception\\ExpectingAT' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/ExpectingAT.php',
|
||||
'Egulias\\EmailValidator\\Exception\\ExpectingATEXT' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/ExpectingATEXT.php',
|
||||
'Egulias\\EmailValidator\\Exception\\ExpectingCTEXT' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/ExpectingCTEXT.php',
|
||||
|
@ -309,49 +309,20 @@ return array(
|
|||
'Mpdf\\Utils\\PdfDate' => $vendorDir . '/mpdf/mpdf/src/Utils/PdfDate.php',
|
||||
'Mpdf\\Utils\\UtfString' => $vendorDir . '/mpdf/mpdf/src/Utils/UtfString.php',
|
||||
'PandoraFMS\\Agent' => $baseDir . '/include/lib/Agent.php',
|
||||
'PandoraFMS\\Dashboard\\AgentModuleWidget' => $baseDir . '/include/lib/Dashboard/Widgets/agent_module.php',
|
||||
'PandoraFMS\\Dashboard\\AlertsFiredWidget' => $baseDir . '/include/lib/Dashboard/Widgets/alerts_fired.php',
|
||||
'PandoraFMS\\Dashboard\\Cell' => $baseDir . '/include/lib/Dashboard/Cell.php',
|
||||
'PandoraFMS\\Dashboard\\ClockWidget' => $baseDir . '/include/lib/Dashboard/Widgets/clock.php',
|
||||
'PandoraFMS\\Dashboard\\CustomGraphWidget' => $baseDir . '/include/lib/Dashboard/Widgets/custom_graph.php',
|
||||
'PandoraFMS\\Dashboard\\EventsListWidget' => $baseDir . '/include/lib/Dashboard/Widgets/events_list.php',
|
||||
'PandoraFMS\\Dashboard\\GraphModuleHistogramWidget' => $baseDir . '/include/lib/Dashboard/Widgets/graph_module_histogram.php',
|
||||
'PandoraFMS\\Dashboard\\GroupsStatusWidget' => $baseDir . '/include/lib/Dashboard/Widgets/groups_status.php',
|
||||
'PandoraFMS\\Dashboard\\Manager' => $baseDir . '/include/lib/Dashboard/Manager.php',
|
||||
'PandoraFMS\\Dashboard\\MapsMadeByUser' => $baseDir . '/include/lib/Dashboard/Widgets/maps_made_by_user.php',
|
||||
'PandoraFMS\\Dashboard\\MapsStatusWidget' => $baseDir . '/include/lib/Dashboard/Widgets/maps_status.php',
|
||||
'PandoraFMS\\Dashboard\\ModuleIconWidget' => $baseDir . '/include/lib/Dashboard/Widgets/module_icon.php',
|
||||
'PandoraFMS\\Dashboard\\ModuleStatusWidget' => $baseDir . '/include/lib/Dashboard/Widgets/module_status.php',
|
||||
'PandoraFMS\\Dashboard\\ModuleTableValueWidget' => $baseDir . '/include/lib/Dashboard/Widgets/module_table_value.php',
|
||||
'PandoraFMS\\Dashboard\\ModuleValueWidget' => $baseDir . '/include/lib/Dashboard/Widgets/module_value.php',
|
||||
'PandoraFMS\\Dashboard\\MonitorHealthWidget' => $baseDir . '/include/lib/Dashboard/Widgets/monitor_health.php',
|
||||
'PandoraFMS\\Dashboard\\NetworkMapWidget' => $baseDir . '/include/lib/Dashboard/Widgets/network_map.php',
|
||||
'PandoraFMS\\Dashboard\\PostWidget' => $baseDir . '/include/lib/Dashboard/Widgets/post.php',
|
||||
'PandoraFMS\\Dashboard\\ReportsWidget' => $baseDir . '/include/lib/Dashboard/Widgets/reports.php',
|
||||
'PandoraFMS\\Dashboard\\SLAPercentWidget' => $baseDir . '/include/lib/Dashboard/Widgets/sla_percent.php',
|
||||
'PandoraFMS\\Dashboard\\ServiceMapWidget' => $baseDir . '/include/lib/Dashboard/Widgets/service_map.php',
|
||||
'PandoraFMS\\Dashboard\\SingleGraphWidget' => $baseDir . '/include/lib/Dashboard/Widgets/single_graph.php',
|
||||
'PandoraFMS\\Dashboard\\SystemGroupStatusWidget' => $baseDir . '/include/lib/Dashboard/Widgets/system_group_status.php',
|
||||
'PandoraFMS\\Dashboard\\TacticalWidget' => $baseDir . '/include/lib/Dashboard/Widgets/tactical.php',
|
||||
'PandoraFMS\\Dashboard\\TopNEventByGroupWidget' => $baseDir . '/include/lib/Dashboard/Widgets/top_n_events_by_group.php',
|
||||
'PandoraFMS\\Dashboard\\TopNEventByModuleWidget' => $baseDir . '/include/lib/Dashboard/Widgets/top_n_events_by_module.php',
|
||||
'PandoraFMS\\Dashboard\\TopNWidget' => $baseDir . '/include/lib/Dashboard/Widgets/top_n.php',
|
||||
'PandoraFMS\\Dashboard\\TreeViewWidget' => $baseDir . '/include/lib/Dashboard/Widgets/tree_view.php',
|
||||
'PandoraFMS\\Dashboard\\UrlWidget' => $baseDir . '/include/lib/Dashboard/Widgets/url.php',
|
||||
'PandoraFMS\\Dashboard\\WelcomeWidget' => $baseDir . '/include/lib/Dashboard/Widgets/example.php',
|
||||
'PandoraFMS\\Dashboard\\Widget' => $baseDir . '/include/lib/Dashboard/Widget.php',
|
||||
'PandoraFMS\\Dashboard\\WuxStatsWidget' => $baseDir . '/include/lib/Dashboard/Widgets/wux_transaction_stats.php',
|
||||
'PandoraFMS\\Dashboard\\WuxWidget' => $baseDir . '/include/lib/Dashboard/Widgets/wux_transaction.php',
|
||||
'PandoraFMS\\Entity' => $baseDir . '/include/lib/Entity.php',
|
||||
'PandoraFMS\\Event' => $baseDir . '/include/lib/Event.php',
|
||||
'PandoraFMS\\Group' => $baseDir . '/include/lib/Group.php',
|
||||
'PandoraFMS\\Module' => $baseDir . '/include/lib/Module.php',
|
||||
'PandoraFMS\\ModuleStatus' => $baseDir . '/include/lib/ModuleStatus.php',
|
||||
'PandoraFMS\\ModuleType' => $baseDir . '/include/lib/ModuleType.php',
|
||||
'PandoraFMS\\User' => $baseDir . '/include/lib/User.php',
|
||||
'PandoraFMS\\View' => $baseDir . '/include/lib/View.php',
|
||||
'PandoraFMS\\WebSockets\\WSManager' => $baseDir . '/include/lib/WSManager.php',
|
||||
'PandoraFMS\\Websockets\\WebSocketServer' => $baseDir . '/include/lib/WebSocketServer.php',
|
||||
'PandoraFMS\\Websockets\\WebSocketUser' => $baseDir . '/include/lib/WebSocketUser.php',
|
||||
'PandoraFMS\\Websockets\\WSManager' => $baseDir . '/include/lib/Websockets/WSManager.php',
|
||||
'PandoraFMS\\Websockets\\WebSocketServer' => $baseDir . '/include/lib/Websockets/WebSocketServer.php',
|
||||
'PandoraFMS\\Websockets\\WebSocketUser' => $baseDir . '/include/lib/Websockets/WebSocketUser.php',
|
||||
'Psr\\Log\\AbstractLogger' => $vendorDir . '/psr/log/Psr/Log/AbstractLogger.php',
|
||||
'Psr\\Log\\InvalidArgumentException' => $vendorDir . '/psr/log/Psr/Log/InvalidArgumentException.php',
|
||||
'Psr\\Log\\LogLevel' => $vendorDir . '/psr/log/Psr/Log/LogLevel.php',
|
||||
|
@ -360,7 +331,6 @@ return array(
|
|||
'Psr\\Log\\LoggerInterface' => $vendorDir . '/psr/log/Psr/Log/LoggerInterface.php',
|
||||
'Psr\\Log\\LoggerTrait' => $vendorDir . '/psr/log/Psr/Log/LoggerTrait.php',
|
||||
'Psr\\Log\\NullLogger' => $vendorDir . '/psr/log/Psr/Log/NullLogger.php',
|
||||
'Psr\\Log\\Test\\DummyTest' => $vendorDir . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
|
||||
'Psr\\Log\\Test\\LoggerInterfaceTest' => $vendorDir . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
|
||||
'fpdi_pdf_parser' => $vendorDir . '/setasign/fpdi/fpdi_pdf_parser.php',
|
||||
'pdf_context' => $vendorDir . '/setasign/fpdi/pdf_context.php',
|
||||
|
|
|
@ -22,13 +22,15 @@ class ComposerAutoloaderInitfdecadadce22e6dde51e9535fe4ad7aa
|
|||
return self::$loader;
|
||||
}
|
||||
|
||||
require __DIR__ . '/platform_check.php';
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInitfdecadadce22e6dde51e9535fe4ad7aa', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitfdecadadce22e6dde51e9535fe4ad7aa', 'loadClassLoader'));
|
||||
|
||||
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
||||
if ($useStaticLoader) {
|
||||
require_once __DIR__ . '/autoload_static.php';
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitfdecadadce22e6dde51e9535fe4ad7aa::getInitializer($loader));
|
||||
} else {
|
||||
|
|
|
@ -88,6 +88,7 @@ class ComposerStaticInitfdecadadce22e6dde51e9535fe4ad7aa
|
|||
);
|
||||
|
||||
public static $classMap = array (
|
||||
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
|
||||
'DeepCopy\\DeepCopy' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/DeepCopy.php',
|
||||
'DeepCopy\\Exception\\CloneException' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php',
|
||||
'DeepCopy\\Exception\\PropertyException' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Exception/PropertyException.php',
|
||||
|
@ -126,7 +127,6 @@ class ComposerStaticInitfdecadadce22e6dde51e9535fe4ad7aa
|
|||
'Egulias\\EmailValidator\\Exception\\DomainHyphened' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/DomainHyphened.php',
|
||||
'Egulias\\EmailValidator\\Exception\\DotAtEnd' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/DotAtEnd.php',
|
||||
'Egulias\\EmailValidator\\Exception\\DotAtStart' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/DotAtStart.php',
|
||||
'Egulias\\EmailValidator\\Exception\\ExpectedQPair' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/ExpectingQPair.php',
|
||||
'Egulias\\EmailValidator\\Exception\\ExpectingAT' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/ExpectingAT.php',
|
||||
'Egulias\\EmailValidator\\Exception\\ExpectingATEXT' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/ExpectingATEXT.php',
|
||||
'Egulias\\EmailValidator\\Exception\\ExpectingCTEXT' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/ExpectingCTEXT.php',
|
||||
|
@ -391,49 +391,20 @@ class ComposerStaticInitfdecadadce22e6dde51e9535fe4ad7aa
|
|||
'Mpdf\\Utils\\PdfDate' => __DIR__ . '/..' . '/mpdf/mpdf/src/Utils/PdfDate.php',
|
||||
'Mpdf\\Utils\\UtfString' => __DIR__ . '/..' . '/mpdf/mpdf/src/Utils/UtfString.php',
|
||||
'PandoraFMS\\Agent' => __DIR__ . '/../..' . '/include/lib/Agent.php',
|
||||
'PandoraFMS\\Dashboard\\AgentModuleWidget' => __DIR__ . '/../..' . '/include/lib/Dashboard/Widgets/agent_module.php',
|
||||
'PandoraFMS\\Dashboard\\AlertsFiredWidget' => __DIR__ . '/../..' . '/include/lib/Dashboard/Widgets/alerts_fired.php',
|
||||
'PandoraFMS\\Dashboard\\Cell' => __DIR__ . '/../..' . '/include/lib/Dashboard/Cell.php',
|
||||
'PandoraFMS\\Dashboard\\ClockWidget' => __DIR__ . '/../..' . '/include/lib/Dashboard/Widgets/clock.php',
|
||||
'PandoraFMS\\Dashboard\\CustomGraphWidget' => __DIR__ . '/../..' . '/include/lib/Dashboard/Widgets/custom_graph.php',
|
||||
'PandoraFMS\\Dashboard\\EventsListWidget' => __DIR__ . '/../..' . '/include/lib/Dashboard/Widgets/events_list.php',
|
||||
'PandoraFMS\\Dashboard\\GraphModuleHistogramWidget' => __DIR__ . '/../..' . '/include/lib/Dashboard/Widgets/graph_module_histogram.php',
|
||||
'PandoraFMS\\Dashboard\\GroupsStatusWidget' => __DIR__ . '/../..' . '/include/lib/Dashboard/Widgets/groups_status.php',
|
||||
'PandoraFMS\\Dashboard\\Manager' => __DIR__ . '/../..' . '/include/lib/Dashboard/Manager.php',
|
||||
'PandoraFMS\\Dashboard\\MapsMadeByUser' => __DIR__ . '/../..' . '/include/lib/Dashboard/Widgets/maps_made_by_user.php',
|
||||
'PandoraFMS\\Dashboard\\MapsStatusWidget' => __DIR__ . '/../..' . '/include/lib/Dashboard/Widgets/maps_status.php',
|
||||
'PandoraFMS\\Dashboard\\ModuleIconWidget' => __DIR__ . '/../..' . '/include/lib/Dashboard/Widgets/module_icon.php',
|
||||
'PandoraFMS\\Dashboard\\ModuleStatusWidget' => __DIR__ . '/../..' . '/include/lib/Dashboard/Widgets/module_status.php',
|
||||
'PandoraFMS\\Dashboard\\ModuleTableValueWidget' => __DIR__ . '/../..' . '/include/lib/Dashboard/Widgets/module_table_value.php',
|
||||
'PandoraFMS\\Dashboard\\ModuleValueWidget' => __DIR__ . '/../..' . '/include/lib/Dashboard/Widgets/module_value.php',
|
||||
'PandoraFMS\\Dashboard\\MonitorHealthWidget' => __DIR__ . '/../..' . '/include/lib/Dashboard/Widgets/monitor_health.php',
|
||||
'PandoraFMS\\Dashboard\\NetworkMapWidget' => __DIR__ . '/../..' . '/include/lib/Dashboard/Widgets/network_map.php',
|
||||
'PandoraFMS\\Dashboard\\PostWidget' => __DIR__ . '/../..' . '/include/lib/Dashboard/Widgets/post.php',
|
||||
'PandoraFMS\\Dashboard\\ReportsWidget' => __DIR__ . '/../..' . '/include/lib/Dashboard/Widgets/reports.php',
|
||||
'PandoraFMS\\Dashboard\\SLAPercentWidget' => __DIR__ . '/../..' . '/include/lib/Dashboard/Widgets/sla_percent.php',
|
||||
'PandoraFMS\\Dashboard\\ServiceMapWidget' => __DIR__ . '/../..' . '/include/lib/Dashboard/Widgets/service_map.php',
|
||||
'PandoraFMS\\Dashboard\\SingleGraphWidget' => __DIR__ . '/../..' . '/include/lib/Dashboard/Widgets/single_graph.php',
|
||||
'PandoraFMS\\Dashboard\\SystemGroupStatusWidget' => __DIR__ . '/../..' . '/include/lib/Dashboard/Widgets/system_group_status.php',
|
||||
'PandoraFMS\\Dashboard\\TacticalWidget' => __DIR__ . '/../..' . '/include/lib/Dashboard/Widgets/tactical.php',
|
||||
'PandoraFMS\\Dashboard\\TopNEventByGroupWidget' => __DIR__ . '/../..' . '/include/lib/Dashboard/Widgets/top_n_events_by_group.php',
|
||||
'PandoraFMS\\Dashboard\\TopNEventByModuleWidget' => __DIR__ . '/../..' . '/include/lib/Dashboard/Widgets/top_n_events_by_module.php',
|
||||
'PandoraFMS\\Dashboard\\TopNWidget' => __DIR__ . '/../..' . '/include/lib/Dashboard/Widgets/top_n.php',
|
||||
'PandoraFMS\\Dashboard\\TreeViewWidget' => __DIR__ . '/../..' . '/include/lib/Dashboard/Widgets/tree_view.php',
|
||||
'PandoraFMS\\Dashboard\\UrlWidget' => __DIR__ . '/../..' . '/include/lib/Dashboard/Widgets/url.php',
|
||||
'PandoraFMS\\Dashboard\\WelcomeWidget' => __DIR__ . '/../..' . '/include/lib/Dashboard/Widgets/example.php',
|
||||
'PandoraFMS\\Dashboard\\Widget' => __DIR__ . '/../..' . '/include/lib/Dashboard/Widget.php',
|
||||
'PandoraFMS\\Dashboard\\WuxStatsWidget' => __DIR__ . '/../..' . '/include/lib/Dashboard/Widgets/wux_transaction_stats.php',
|
||||
'PandoraFMS\\Dashboard\\WuxWidget' => __DIR__ . '/../..' . '/include/lib/Dashboard/Widgets/wux_transaction.php',
|
||||
'PandoraFMS\\Entity' => __DIR__ . '/../..' . '/include/lib/Entity.php',
|
||||
'PandoraFMS\\Event' => __DIR__ . '/../..' . '/include/lib/Event.php',
|
||||
'PandoraFMS\\Group' => __DIR__ . '/../..' . '/include/lib/Group.php',
|
||||
'PandoraFMS\\Module' => __DIR__ . '/../..' . '/include/lib/Module.php',
|
||||
'PandoraFMS\\ModuleStatus' => __DIR__ . '/../..' . '/include/lib/ModuleStatus.php',
|
||||
'PandoraFMS\\ModuleType' => __DIR__ . '/../..' . '/include/lib/ModuleType.php',
|
||||
'PandoraFMS\\User' => __DIR__ . '/../..' . '/include/lib/User.php',
|
||||
'PandoraFMS\\View' => __DIR__ . '/../..' . '/include/lib/View.php',
|
||||
'PandoraFMS\\WebSockets\\WSManager' => __DIR__ . '/../..' . '/include/lib/WSManager.php',
|
||||
'PandoraFMS\\Websockets\\WebSocketServer' => __DIR__ . '/../..' . '/include/lib/WebSocketServer.php',
|
||||
'PandoraFMS\\Websockets\\WebSocketUser' => __DIR__ . '/../..' . '/include/lib/WebSocketUser.php',
|
||||
'PandoraFMS\\Websockets\\WSManager' => __DIR__ . '/../..' . '/include/lib/Websockets/WSManager.php',
|
||||
'PandoraFMS\\Websockets\\WebSocketServer' => __DIR__ . '/../..' . '/include/lib/Websockets/WebSocketServer.php',
|
||||
'PandoraFMS\\Websockets\\WebSocketUser' => __DIR__ . '/../..' . '/include/lib/Websockets/WebSocketUser.php',
|
||||
'Psr\\Log\\AbstractLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/AbstractLogger.php',
|
||||
'Psr\\Log\\InvalidArgumentException' => __DIR__ . '/..' . '/psr/log/Psr/Log/InvalidArgumentException.php',
|
||||
'Psr\\Log\\LogLevel' => __DIR__ . '/..' . '/psr/log/Psr/Log/LogLevel.php',
|
||||
|
@ -442,7 +413,6 @@ class ComposerStaticInitfdecadadce22e6dde51e9535fe4ad7aa
|
|||
'Psr\\Log\\LoggerInterface' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerInterface.php',
|
||||
'Psr\\Log\\LoggerTrait' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerTrait.php',
|
||||
'Psr\\Log\\NullLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/NullLogger.php',
|
||||
'Psr\\Log\\Test\\DummyTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
|
||||
'Psr\\Log\\Test\\LoggerInterfaceTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
|
||||
'fpdi_pdf_parser' => __DIR__ . '/..' . '/setasign/fpdi/fpdi_pdf_parser.php',
|
||||
'pdf_context' => __DIR__ . '/..' . '/setasign/fpdi/pdf_context.php',
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
// platform_check.php @generated by Composer
|
||||
|
||||
$issues = array();
|
||||
|
||||
if (!(PHP_VERSION_ID >= 70000)) {
|
||||
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.0.0". You are running ' . PHP_VERSION . '.';
|
||||
}
|
||||
|
||||
if ($issues) {
|
||||
if (!headers_sent()) {
|
||||
header('HTTP/1.1 500 Internal Server Error');
|
||||
}
|
||||
if (!ini_get('display_errors')) {
|
||||
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
|
||||
fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
|
||||
} elseif (!headers_sent()) {
|
||||
echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
|
||||
}
|
||||
}
|
||||
trigger_error(
|
||||
'Composer detected issues in your platform: ' . implode(' ', $issues),
|
||||
E_USER_ERROR
|
||||
);
|
||||
}
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
// Begin.
|
||||
require_once __DIR__.'/vendor/autoload.php';
|
||||
use \PandoraFMS\WebSockets\WSManager;
|
||||
use \PandoraFMS\Websockets\WSManager;
|
||||
|
||||
// Set to true to get full output.
|
||||
$debug = false;
|
||||
|
|
Loading…
Reference in New Issue