Merge branch 'develop' into ent-13100-desplegable-de-iconos-en-wizard-de-visual-consoles-tiene-demasiado-espacio

This commit is contained in:
Pablo Aragon 2024-04-02 10:18:52 +02:00
commit a9f161e2c2
134 changed files with 4453 additions and 1371 deletions

View File

@ -304,7 +304,6 @@ server_dependencies=" \
perl(Sys::Syslog) \
perl(DBI) \
perl(XML::Simple) \
perl(Geo::IP) \
perl(IO::Socket::INET6) \
perl(XML::Twig) \
expect \
@ -344,7 +343,6 @@ ipam_dependencies=" \
perl(Sys::Syslog) \
perl(DBI) \
perl(XML::Simple) \
perl(Geo::IP) \
perl(IO::Socket::INET6) \
perl(XML::Twig)"
execute_cmd "yum install -y $ipam_dependencies" "Installing IPAM Instant client"
@ -521,8 +519,9 @@ include (\$ownDir . "config_process.php");
EO_CONFIG_F
cat > /etc/httpd/conf.d/pandora.conf << EO_CONFIG_F
ServerTokens Prod
<Directory "/var/www/html">
Options Indexes FollowSymLinks
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>

View File

@ -417,7 +417,6 @@ server_dependencies=" \
perl(Sys::Syslog) \
perl(DBI) \
perl(XML::Simple) \
perl(Geo::IP) \
perl(IO::Socket::INET6) \
perl(XML::Twig) \
expect \
@ -457,7 +456,6 @@ ipam_dependencies=" \
perl(Sys::Syslog) \
perl(DBI) \
perl(XML::Simple) \
perl(Geo::IP) \
perl(IO::Socket::INET6) \
perl(XML::Twig)"
execute_cmd "dnf install -y $ipam_dependencies" "Installing IPAM Instant client"
@ -632,8 +630,9 @@ include (\$ownDir . "config_process.php");
EO_CONFIG_F
cat > /etc/httpd/conf.d/pandora.conf << EO_CONFIG_F
ServerTokens Prod
<Directory "/var/www/html">
Options Indexes FollowSymLinks
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>

View File

@ -578,8 +578,9 @@ include (\$ownDir . "config_process.php");
EO_CONFIG_F
cat > /etc/httpd/conf.d/pandora.conf << EO_CONFIG_F
ServerTokens Prod
<Directory "/var/www/html">
Options Indexes FollowSymLinks
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>

View File

@ -640,8 +640,9 @@ EO_CONFIG_F
#Enable allow Override
cat > /etc/apache2/conf-enabled/pandora_security.conf << EO_CONFIG_F
ServerTokens Prod
<Directory "/var/www/html">
Options Indexes FollowSymLinks
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>

View File

@ -116,7 +116,6 @@ RUN dnf install -y --setopt=tsflags=nodocs \
"perl(Sys::Syslog)" \
"perl(DBI)" \
"perl(XML::Simple)" \
"perl(Geo::IP)" \
"perl(IO::Socket::INET6)" \
"perl(XML::Twig)" \
expect \
@ -135,7 +134,7 @@ RUN dnf install -y http://firefly.artica.es/centos8/perl-Crypt-OpenSSL-AES-0.02-
# Instant client Oracle
RUN dnf install -y https://download.oracle.com/otn_software/linux/instantclient/19800/oracle-instantclient19.8-basic-19.8.0.0.0-1.x86_64.rpm https://download.oracle.com/otn_software/linux/instantclient/19800/oracle-instantclient19.8-sqlplus-19.8.0.0.0-1.x86_64.rpm
# Install IPAM dependencies
RUN dnf install -y "perl(NetAddr::IP)" "perl(Sys::Syslog)" "perl(DBI)" "perl(XML::Simple)" "perl(Geo::IP)" "perl(IO::Socket::INET6)" "perl(XML::Twig)" "perl(DBD::mysql)" --setopt=tsflags=nodocs
RUN dnf install -y "perl(NetAddr::IP)" "perl(Sys::Syslog)" "perl(DBI)" "perl(XML::Simple)" "perl(IO::Socket::INET6)" "perl(XML::Twig)" "perl(DBD::mysql)" --setopt=tsflags=nodocs
EXPOSE 80 443 41121 162/udp

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.776-240326
Version: 7.0NG.776-240402
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.776-240326"
pandora_version="7.0NG.776-240402"
echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null

View File

@ -1039,7 +1039,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.776';
use constant AGENT_BUILD => '240326';
use constant AGENT_BUILD => '240402';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.776
%define release 240326
%define release 240402
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -5,7 +5,7 @@
%define name pandorafms_agent_linux_bin
%define source_name pandorafms_agent_linux
%define version 7.0NG.776
%define release 240326
%define release 240402
%define debug_package %{nil}
Summary: Pandora FMS Linux agent, binary version

View File

@ -5,7 +5,7 @@
%define name pandorafms_agent_linux_bin
%define source_name pandorafms_agent_linux
%define version 7.0NG.776
%define release 240326
%define release 240402
%define debug_package %{nil}
Summary: Pandora FMS Linux agent, binary version

View File

@ -5,7 +5,7 @@
%define name pandorafms_agent_linux_bin
%define source_name pandorafms_agent_linux
%define version 7.0NG.776
%define release 240326
%define release 240402
Summary: Pandora FMS Linux agent, binary version
Name: %{name}

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.776
%define release 240326
%define release 240402
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.776"
PI_BUILD="240326"
PI_BUILD="240402"
OS_NAME=`uname -s`
FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{240326}
{240402}
ViewReadme
{Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.776 Build 240326")
#define PANDORA_VERSION ("7.0NG.776 Build 240402")
string pandora_path;
string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Pandora FMS"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.776(Build 240326))"
VALUE "ProductVersion", "(7.0NG.776(Build 240402))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 7.0NG.776-240326
Version: 7.0NG.776-240402
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.776-240326"
pandora_version="7.0NG.776-240402"
package_pear=0
package_pandora=1

View File

@ -6,6 +6,8 @@ use PandoraFMS\Modules\Events\Repositories\EventRepository;
use PandoraFMS\Modules\Events\Repositories\EventRepositoryMySQL;
use PandoraFMS\Modules\Groups\Repositories\GroupRepository;
use PandoraFMS\Modules\Groups\Repositories\GroupRepositoryMySQL;
use PandoraFMS\Modules\PandoraITSM\Inventories\Repositories\PandoraITSMInventoryRepository;
use PandoraFMS\Modules\PandoraITSM\Inventories\Repositories\PandoraITSMInventoryRepositoryMySQL;
use PandoraFMS\Modules\Shared\Repositories\Repository;
use PandoraFMS\Modules\Shared\Repositories\RepositoryMySQL;
use PandoraFMS\Modules\Users\Repositories\UserRepository;
@ -15,10 +17,10 @@ use Slim\App;
use Slim\Factory\AppFactory;
return [
'settings' => function () {
'settings' => function () {
return include __DIR__.'/settings.php';
},
App::class => function (ContainerInterface $container) {
App::class => function (ContainerInterface $container) {
AppFactory::setContainer($container);
$app = AppFactory::create();
@ -39,19 +41,22 @@ return [
return $app;
},
Repository::class => function (ContainerInterface $container) {
Repository::class => function (ContainerInterface $container) {
return $container->get(RepositoryMySQL::class);
},
TokenRepository::class => function (ContainerInterface $container) {
TokenRepository::class => function (ContainerInterface $container) {
return $container->get(TokenRepositoryMySQL::class);
},
UserRepository::class => function (ContainerInterface $container) {
UserRepository::class => function (ContainerInterface $container) {
return $container->get(UserRepositoryMySQL::class);
},
GroupRepository::class => function (ContainerInterface $container) {
GroupRepository::class => function (ContainerInterface $container) {
return $container->get(GroupRepositoryMySQL::class);
},
EventRepository::class => function (ContainerInterface $container) {
EventRepository::class => function (ContainerInterface $container) {
return $container->get(EventRepositoryMySQL::class);
},
PandoraITSMInventoryRepository::class => function (ContainerInterface $container) {
return $container->get(PandoraITSMInventoryRepositoryMySQL::class);
},
];

View File

@ -9,4 +9,5 @@ return function (App $app) {
(include __DIR__.'/../../../include/lib/Modules/Profiles/routes.php')($app);
(include __DIR__.'/../../../include/lib/Modules/Tags/routes.php')($app);
(include __DIR__.'/../../../include/lib/Modules/Users/routes.php')($app);
(include __DIR__.'/../../../include/lib/Modules/PandoraITSM/routes.php')($app);
};

View File

@ -1118,6 +1118,110 @@
]
}
},
"/pandoraITSM/inventory/{idPandoraITSMInventory}": {
"get": {
"tags": ["PandoraITSM"],
"summary": "Show pandoraITSMInventory",
"operationId": "09b6d1f91536441fc65dc66142a6f9cb",
"parameters": [
{
"$ref": "#/components/parameters/parameterIdPandoraITSMInventory"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/ResponsePandoraITSMInventory"
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
},
"security": [
{
"bearerAuth": []
}
]
}
},
"/pandoraITSM/inventory/list": {
"post": {
"tags": ["PandoraITSM"],
"summary": "List pandoraITSMInventories",
"operationId": "149f20397779ed681c1f7680c1214974",
"parameters": [
{
"$ref": "#/components/parameters/parameterPage"
},
{
"$ref": "#/components/parameters/parameterSizePage"
},
{
"$ref": "#/components/parameters/parameterSortField"
},
{
"$ref": "#/components/parameters/parameterSortDirection"
}
],
"requestBody": {
"$ref": "#/components/requestBodies/requestBodyPandoraITSMInventoryFilter"
},
"responses": {
"200": {
"description": "List PandoraITSM Inventories Object",
"content": {
"application/json": {
"schema": {
"properties": {
"paginationData": {
"$ref": "#/components/schemas/paginationData"
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PandoraITSMInventory"
}
}
},
"type": "object"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
},
"security": [
{
"bearerAuth": []
}
]
}
},
"/profile": {
"post": {
"tags": ["Profiles"],
@ -2081,6 +2185,192 @@
}
]
},
"Event": {
"properties": {
"idEvent": {
"description": "Id event",
"type": "integer",
"readOnly": true,
"nullable": false
},
"idAgent": {
"description": "Id agent",
"type": "integer",
"default": null,
"nullable": true
},
"idUser": {
"description": "Id user",
"type": "string",
"default": null,
"nullable": true
},
"idGroup": {
"description": "Id group",
"type": "integer",
"default": null,
"nullable": true
},
"status": {
"description": "Event status, the available status are: new, validated, inprocess",
"type": "integer",
"default": "new",
"enum": ["new", "validated", "inprocess"],
"nullable": false
},
"timestamp": {
"description": "Event registration date",
"type": "string",
"default": null,
"readOnly": true,
"example": "2023-02-21 08:34:16",
"nullable": true
},
"event": {
"description": "Description event",
"type": "string",
"default": "Event created for api",
"nullable": false
},
"utimestamp": {
"description": "Event registration date",
"type": "integer",
"default": null,
"readOnly": true,
"example": "1704898868",
"nullable": true
},
"eventType": {
"description": "Event status, the available status are: going_unknown, unknown, alert_fired, alert_recovered, alert_ceased, alert_manual_validation, recon_host_detected, system, error, new_agent, going_up_critical, going_down_critical, going_up_warning, going_down_warning, going_up_normal, going_down_normal, configuration_change, ncm",
"type": "string",
"default": "unknown",
"enum": [
"going_unknown",
"unknown",
"alert_fired",
"alert_recovered",
"alert_ceased",
"alert_manual_validation",
"recon_host_detected",
"system",
"error",
"new_agent",
"going_up_critical",
"going_down_critical",
"going_up_warning",
"going_down_warning",
"going_up_normal",
"going_down_normal",
"configuration_change",
"ncm"
],
"nullable": false
},
"idAgentModule": {
"description": "Id agent module",
"type": "integer",
"default": null,
"nullable": true
},
"idAlertAm": {
"description": "Id alert action",
"type": "integer",
"default": null,
"nullable": true
},
"severity": {
"description": "Event severity, the available severity are: maintenance, informational, normal, warning, critical, minor, major",
"type": "integer",
"default": "maintenance",
"enum": [
"maintenance",
"informational",
"normal",
"warning",
"critical",
"minor",
"major"
],
"nullable": false
},
"tags": {
"description": "Tags",
"type": "string",
"default": null,
"nullable": true
},
"source": {
"description": "Source",
"type": "string",
"default": null,
"nullable": true
},
"idExtra": {
"description": "Extra id",
"type": "string",
"default": null,
"nullable": true
},
"criticalInstructions": {
"description": "Critical instructions",
"type": "string",
"default": null,
"nullable": true
},
"warningInstructions": {
"description": "Warning instructions",
"type": "string",
"default": null,
"nullable": true
},
"unknownInstructions": {
"description": "Unknows instructions",
"type": "string",
"default": null,
"nullable": true
},
"ownerUser": {
"description": "Id user",
"type": "string",
"default": null,
"nullable": true
},
"ackUtimestamp": {
"description": "Event ack utimestamp",
"type": "integer",
"default": null,
"readOnly": true,
"example": "1704898868",
"nullable": true
},
"customData": {
"description": "Custom data",
"type": "string",
"default": null,
"nullable": true
},
"data": {
"description": "Data",
"type": "string",
"default": null,
"nullable": true
},
"moduleStatus": {
"description": "Module status",
"type": "integer",
"default": null,
"readOnly": true,
"nullable": true
},
"eventCustomId": {
"description": "Events Custom Id",
"type": "string",
"default": null,
"nullable": true
}
},
"type": "object"
},
"EventFilter": {
"properties": {
"idEventFilter": {
@ -2529,6 +2819,96 @@
}
]
},
"PandoraITSMInventory": {
"properties": {
"idPandoraITSMInventory": {
"description": "Id Agent pandoraITSMInventory",
"type": "integer",
"readOnly": true,
"nullable": false
},
"agentAlias": {
"description": "Agent Name pandoraITSMInventory",
"type": "string",
"default": null,
"nullable": true
},
"osVersion": {
"description": "Agent os version pandoraITSMInventory",
"type": "string",
"default": null,
"nullable": true
},
"agentAddress": {
"description": "Agent address pandoraITSMInventory",
"type": "string",
"default": null,
"nullable": true
},
"agentUrlAddress": {
"description": "Agent url address pandoraITSMInventory",
"type": "string",
"default": null,
"nullable": true
},
"agentDisabled": {
"description": "Agent disable pandoraITSMInventory",
"type": "boolean",
"default": null,
"nullable": true
},
"groupName": {
"description": "Agent group name pandoraITSMInventory",
"type": "string",
"default": null,
"nullable": true
},
"groupId": {
"description": "Agent group id pandoraITSMInventory",
"type": "integer",
"default": null,
"nullable": true
},
"osName": {
"description": "Agent OS name pandoraITSMInventory",
"type": "string",
"default": null,
"nullable": true
}
},
"type": "object"
},
"PandoraITSMInventoryFilter": {
"type": "object",
"allOf": [
{
"$ref": "#/components/schemas/PandoraITSMInventory"
},
{
"properties": {
"idPandoraITSMInventory": {
"default": null,
"readOnly": false
},
"freeSearch": {
"description": "Find word in name field.",
"type": "string",
"default": null,
"nullable": true
}
},
"type": "object"
},
{
"properties": {
"multipleSearch": {
"$ref": "#/components/schemas/multipleSearch"
}
},
"type": "object"
}
]
},
"Profile": {
"properties": {
"idProfile": {
@ -2707,6 +3087,42 @@
}
]
},
"multipleSearch": {
"properties": {
"field": {
"description": "Field to search of query",
"type": "string",
"nullable": true
},
"data": {
"description": "Values to search of query IN()",
"type": "array",
"items": {
"type": "integer"
},
"nullable": true
}
},
"type": "object"
},
"multipleSearchString": {
"properties": {
"field": {
"description": "Field to search of query",
"type": "string",
"nullable": true
},
"data": {
"description": "Values to search of query IN()",
"type": "array",
"items": {
"type": "string"
},
"nullable": true
}
},
"type": "object"
},
"paginationData": {
"description": "Info pagination data",
"properties": {
@ -3196,12 +3612,14 @@
"type": "string",
"default": null,
"nullable": true
},
}
},
"type": "object"
},
{
"properties": {
"multipleSearchString": {
"description": "search string in field.",
"type": "string",
"default": null,
"nullable": true
"$ref": "#/components/schemas/multipleSearch"
}
},
"type": "object"
@ -3316,6 +3734,16 @@
}
}
},
"ResponseEvent": {
"description": "Event object",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Event"
}
}
}
},
"ResponseEventFilter": {
"description": "EventFilter object",
"content": {
@ -3336,6 +3764,16 @@
}
}
},
"ResponsePandoraITSMInventory": {
"description": "PandoraITSMInventory object",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PandoraITSMInventory"
}
}
}
},
"ResponseProfile": {
"description": "Profile object",
"content": {
@ -3499,6 +3937,16 @@
"default": 1
}
},
"parameterIdEvent": {
"name": "idEvent",
"in": "path",
"description": "Event id",
"required": true,
"schema": {
"type": "integer",
"default": 1
}
},
"parameterIdEventFilter": {
"name": "idEventFilter",
"in": "path",
@ -3519,6 +3967,16 @@
"default": 1
}
},
"parameterIdPandoraITSMInventory": {
"name": "idPandoraITSMInventory",
"in": "path",
"description": "PandoraITSMInventory id",
"required": true,
"schema": {
"type": "integer",
"default": 1
}
},
"parameterIdProfile": {
"name": "idProfile",
"in": "path",
@ -3642,6 +4100,16 @@
}
}
},
"requestBodyEvent": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Event"
}
}
}
},
"requestBodyEventFilter": {
"required": true,
"content": {
@ -3682,6 +4150,26 @@
}
}
},
"requestBodyPandoraITSMInventory": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PandoraITSMInventory"
}
}
}
},
"requestBodyPandoraITSMInventoryFilter": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PandoraITSMInventoryFilter"
}
}
}
},
"requestBodyProfile": {
"required": true,
"content": {
@ -3797,6 +4285,10 @@
{
"name": "Users",
"description": "API Endpoints of users"
},
{
"name": "PandoraITSM",
"description": "API Endpoints of integration pandoraITSM"
}
]
}

View File

@ -1747,3 +1747,5 @@ enterprise/include/class/MySQL.app.php
enterprise/include/class/Oracle.app.php
enterprise/include/class/SAP.app.php
enterprise/include/class/VMware.app.php
enterprise/include/class/DatabaseHA.class.php
enterprise/godmode/servers/HA_cluster.php

View File

@ -53,7 +53,7 @@ refresh[2]="0"
source[2]="0"
source_data[2]="{\"tagente\":{\"nombre\":\"freebsd-1\"}}"
options[2]=""
style[2]="{\"shape\":\"circle\",\"image\":\"images/networkmap/freebsd@os.svg\",\"width\":null,\"height\":null,\"label\":\"freebsd-1\"}"
style[2]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/freebsd@os.svg\",\"width\":null,\"height\":null,\"label\":\"freebsd-1\"}"
id[3]="3"
id_map[3]="2"
@ -66,7 +66,7 @@ refresh[3]="0"
source[3]="0"
source_data[3]="{\"tagente\":{\"nombre\":\"macos-1\"}}"
options[3]=""
style[3]="{\"shape\":\"circle\",\"image\":\"images/networkmap/apple@os.svg\",\"width\":null,\"height\":null,\"label\":\"macos-1\"}"
style[3]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/apple@os.svg\",\"width\":null,\"height\":null,\"label\":\"macos-1\"}"
id[4]="4"
id_map[4]="2"
@ -79,7 +79,7 @@ refresh[4]="0"
source[4]="0"
source_data[4]="{\"tagente\":{\"nombre\":\"windows-1\"}}"
options[4]=""
style[4]="{\"shape\":\"circle\",\"image\":\"images/networkmap/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-1\"}"
style[4]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-1\"}"
id[5]="5"
id_map[5]="2"
@ -92,7 +92,7 @@ refresh[5]="0"
source[5]="0"
source_data[5]="{\"tagente\":{\"nombre\":\"windows-2\"}}"
options[5]=""
style[5]="{\"shape\":\"circle\",\"image\":\"images/networkmap/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-2\"}"
style[5]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-2\"}"
id[6]="6"
id_map[6]="2"
@ -105,7 +105,7 @@ refresh[6]="0"
source[6]="0"
source_data[6]="{\"tagente\":{\"nombre\":\"linux-1\"}}"
options[6]=""
style[6]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-1\"}"
style[6]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-1\"}"
id[7]="7"
id_map[7]="2"
@ -118,7 +118,7 @@ refresh[7]="0"
source[7]="0"
source_data[7]="{\"tagente\":{\"nombre\":\"linux-2\"}}"
options[7]=""
style[7]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-2\"}"
style[7]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-2\"}"
id[8]="8"
id_map[8]="2"
@ -131,7 +131,7 @@ refresh[8]="0"
source[8]="0"
source_data[8]="{\"tagente\":{\"nombre\":\"linux-3\"}}"
options[8]=""
style[8]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-3\"}"
style[8]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-3\"}"
id[9]="9"
id_map[9]="2"
@ -144,7 +144,7 @@ refresh[9]="0"
source[9]="0"
source_data[9]="{\"tagente\":{\"nombre\":\"linux-4\"}}"
options[9]=""
style[9]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-4\"}"
style[9]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-4\"}"
id[10]="10"
id_map[10]="2"
@ -157,7 +157,7 @@ refresh[10]="0"
source[10]="0"
source_data[10]="{\"tagente\":{\"nombre\":\"cisco-2\"}}"
options[10]=""
style[10]="{\"shape\":\"circle\",\"image\":\"images/networkmap/cisco@os.svg\",\"width\":null,\"height\":null,\"label\":\"cisco-2\"}"
style[10]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/cisco@os.svg\",\"width\":null,\"height\":null,\"label\":\"cisco-2\"}"
id[11]="11"
id_map[11]="2"
@ -170,7 +170,7 @@ refresh[11]="0"
source[11]="0"
source_data[11]="{\"tagente\":{\"nombre\":\"freebsd-2\"}}"
options[11]=""
style[11]="{\"shape\":\"circle\",\"image\":\"images/networkmap/freebsd@os.svg\",\"width\":null,\"height\":null,\"label\":\"freebsd-2\"}"
style[11]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/freebsd@os.svg\",\"width\":null,\"height\":null,\"label\":\"freebsd-2\"}"
id[12]="12"
id_map[12]="2"
@ -183,7 +183,7 @@ refresh[12]="0"
source[12]="0"
source_data[12]="{\"tagente\":{\"nombre\":\"macos-2\"}}"
options[12]=""
style[12]="{\"shape\":\"circle\",\"image\":\"images/networkmap/apple@os.svg\",\"width\":null,\"height\":null,\"label\":\"macos-2\"}"
style[12]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/apple@os.svg\",\"width\":null,\"height\":null,\"label\":\"macos-2\"}"
id[13]="13"
id_map[13]="2"
@ -196,7 +196,7 @@ refresh[13]="0"
source[13]="0"
source_data[13]="{\"tagente\":{\"nombre\":\"windows-3\"}}"
options[13]=""
style[13]="{\"shape\":\"circle\",\"image\":\"images/networkmap/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-3\"}"
style[13]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-3\"}"
id[14]="14"
id_map[14]="2"
@ -209,7 +209,7 @@ refresh[14]="0"
source[14]="0"
source_data[14]="{\"tagente\":{\"nombre\":\"windows-4\"}}"
options[14]=""
style[14]="{\"shape\":\"circle\",\"image\":\"images/networkmap/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-4\"}"
style[14]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-4\"}"
id[15]="15"
id_map[15]="2"
@ -222,7 +222,7 @@ refresh[15]="0"
source[15]="0"
source_data[15]="{\"tagente\":{\"nombre\":\"linux-5\"}}"
options[15]=""
style[15]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-5\"}"
style[15]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-5\"}"
id[16]="16"
id_map[16]="2"
@ -235,7 +235,7 @@ refresh[16]="0"
source[16]="0"
source_data[16]="{\"tagente\":{\"nombre\":\"linux-6\"}}"
options[16]=""
style[16]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-6\"}"
style[16]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-6\"}"
id[17]="17"
id_map[17]="2"
@ -248,7 +248,7 @@ refresh[17]="0"
source[17]="0"
source_data[17]="{\"tagente\":{\"nombre\":\"linux-7\"}}"
options[17]=""
style[17]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-7\"}"
style[17]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-7\"}"
id[18]="18"
id_map[18]="2"
@ -261,7 +261,7 @@ refresh[18]="0"
source[18]="0"
source_data[18]="{\"tagente\":{\"nombre\":\"linux-8\"}}"
options[18]=""
style[18]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-8\"}"
style[18]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-8\"}"
id[19]="19"
id_map[19]="2"
@ -274,7 +274,7 @@ refresh[19]="0"
source[19]="0"
source_data[19]="{\"tagente\":{\"nombre\":\"cisco-3\"}}"
options[19]=""
style[19]="{\"shape\":\"circle\",\"image\":\"images/networkmap/cisco@os.svg\",\"width\":null,\"height\":null,\"label\":\"cisco-3\"}"
style[19]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/cisco@os.svg\",\"width\":null,\"height\":null,\"label\":\"cisco-3\"}"
id[20]="20"
id_map[20]="2"
@ -287,7 +287,7 @@ refresh[20]="0"
source[20]="0"
source_data[20]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}"
options[20]=""
style[20]="{\"shape\":\"circle\",\"image\":\"images/networkmap/freebsd@os.svg\",\"width\":null,\"height\":null,\"label\":\"freebsd-3\"}"
style[20]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/freebsd@os.svg\",\"width\":null,\"height\":null,\"label\":\"freebsd-3\"}"
id[21]="21"
id_map[21]="2"
@ -300,7 +300,7 @@ refresh[21]="0"
source[21]="0"
source_data[21]="{\"tagente\":{\"nombre\":\"macos-3\"}}"
options[21]=""
style[21]="{\"shape\":\"circle\",\"image\":\"images/networkmap/apple@os.svg\",\"width\":null,\"height\":null,\"label\":\"macos-3\"}"
style[21]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/apple@os.svg\",\"width\":null,\"height\":null,\"label\":\"macos-3\"}"
id[22]="22"
id_map[22]="2"
@ -313,7 +313,7 @@ refresh[22]="0"
source[22]="0"
source_data[22]="{\"tagente\":{\"nombre\":\"windows-5\"}}"
options[22]=""
style[22]="{\"shape\":\"circle\",\"image\":\"images/networkmap/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-5\"}"
style[22]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-5\"}"
id[23]="23"
id_map[23]="2"
@ -326,7 +326,7 @@ refresh[23]="0"
source[23]="0"
source_data[23]="{\"tagente\":{\"nombre\":\"windows-6\"}}"
options[23]=""
style[23]="{\"shape\":\"circle\",\"image\":\"images/networkmap/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-6\"}"
style[23]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-6\"}"
id[24]="24"
id_map[24]="2"
@ -339,7 +339,7 @@ refresh[24]="0"
source[24]="0"
source_data[24]="{\"tagente\":{\"nombre\":\"linux-9\"}}"
options[24]=""
style[24]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-9\"}"
style[24]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-9\"}"
id[25]="25"
id_map[25]="2"
@ -352,7 +352,7 @@ refresh[25]="0"
source[25]="0"
source_data[25]="{\"tagente\":{\"nombre\":\"linux-10\"}}"
options[25]=""
style[25]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-10\"}"
style[25]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-10\"}"
id[26]="26"
id_map[26]="2"
@ -365,7 +365,7 @@ refresh[26]="0"
source[26]="0"
source_data[26]="{\"tagente\":{\"nombre\":\"linux-11\"}}"
options[26]=""
style[26]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-11\"}"
style[26]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-11\"}"
id[27]="27"
id_map[27]="2"
@ -378,13 +378,13 @@ refresh[27]="0"
source[27]="0"
source_data[27]="{\"tagente\":{\"nombre\":\"linux-12\"}}"
options[27]=""
style[27]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-12\"}"
style[27]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-12\"}"
[trel_item]
id[1]="1"
id_parent[1]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[1]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"11\",\"x\":\"1184\",\"y\":\"-25\",\"z\":\"0\"}}"
id_parent[1]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[1]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-1\"}},\"x\":\"1184\",\"y\":\"-25\",\"z\":\"0\"}}"
id_map[1]="2"
id_parent_source_data[1]="{\"tagente\":{\"nombre\":\"cisco-1\"}}"
id_child_source_data[1]="{\"tagente\":{\"nombre\":\"freebsd-1\"}}"
@ -394,8 +394,8 @@ id_item[1]="0"
deleted[1]="0"
id[2]="2"
id_parent[2]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[2]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"10\",\"x\":\"1268\",\"y\":\"235\",\"z\":\"0\"}}"
id_parent[2]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[2]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"macos-1\"}},\"x\":\"1268\",\"y\":\"235\",\"z\":\"0\"}}"
id_map[2]="2"
id_parent_source_data[2]="{\"tagente\":{\"nombre\":\"cisco-1\"}}"
id_child_source_data[2]="{\"tagente\":{\"nombre\":\"macos-1\"}}"
@ -405,8 +405,8 @@ id_item[2]="0"
deleted[2]="0"
id[3]="3"
id_parent[3]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[3]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"8\",\"x\":\"528\",\"y\":\"-37\",\"z\":\"0\"}}"
id_parent[3]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[3]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-1\"}},\"x\":\"528\",\"y\":\"-37\",\"z\":\"0\"}}"
id_map[3]="2"
id_parent_source_data[3]="{\"tagente\":{\"nombre\":\"cisco-1\"}}"
id_child_source_data[3]="{\"tagente\":{\"nombre\":\"windows-1\"}}"
@ -416,8 +416,8 @@ id_item[3]="0"
deleted[3]="0"
id[4]="4"
id_parent[4]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[4]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"9\",\"x\":\"514\",\"y\":\"389\",\"z\":\"0\"}}"
id_parent[4]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[4]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-2\"}},\"x\":\"514\",\"y\":\"389\",\"z\":\"0\"}}"
id_map[4]="2"
id_parent_source_data[4]="{\"tagente\":{\"nombre\":\"cisco-1\"}}"
id_child_source_data[4]="{\"tagente\":{\"nombre\":\"windows-2\"}}"
@ -427,8 +427,8 @@ id_item[4]="0"
deleted[4]="0"
id[5]="5"
id_parent[5]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"8\",\"x\":\"528\",\"y\":\"-37\",\"z\":\"0\"}}"
id_child[5]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"4\",\"x\":\"342\",\"y\":\"-273\",\"z\":\"0\"}}"
id_parent[5]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-1\"}},\"x\":\"528\",\"y\":\"-37\",\"z\":\"0\"}}"
id_child[5]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-1\"}},\"x\":\"342\",\"y\":\"-273\",\"z\":\"0\"}}"
id_map[5]="2"
id_parent_source_data[5]="{\"tagente\":{\"nombre\":\"windows-1\"}}"
id_child_source_data[5]="{\"tagente\":{\"nombre\":\"linux-1\"}}"
@ -438,8 +438,8 @@ id_item[5]="0"
deleted[5]="0"
id[6]="6"
id_parent[6]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"8\",\"x\":\"528\",\"y\":\"-37\",\"z\":\"0\"}}"
id_child[6]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"5\",\"x\":\"240\",\"y\":\"-7\",\"z\":\"0\"}}"
id_parent[6]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-1\"}},\"x\":\"528\",\"y\":\"-37\",\"z\":\"0\"}}"
id_child[6]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-2\"}},\"x\":\"240\",\"y\":\"-7\",\"z\":\"0\"}}"
id_map[6]="2"
id_parent_source_data[6]="{\"tagente\":{\"nombre\":\"windows-1\"}}"
id_child_source_data[6]="{\"tagente\":{\"nombre\":\"linux-2\"}}"
@ -449,8 +449,8 @@ id_item[6]="0"
deleted[6]="0"
id[7]="7"
id_parent[7]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"9\",\"x\":\"514\",\"y\":\"389\",\"z\":\"0\"}}"
id_child[7]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"6\",\"x\":\"214\",\"y\":\"275\",\"z\":\"0\"}}"
id_parent[7]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-2\"}},\"x\":\"514\",\"y\":\"389\",\"z\":\"0\"}}"
id_child[7]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-3\"}},\"x\":\"214\",\"y\":\"275\",\"z\":\"0\"}}"
id_map[7]="2"
id_parent_source_data[7]="{\"tagente\":{\"nombre\":\"windows-2\"}}"
id_child_source_data[7]="{\"tagente\":{\"nombre\":\"linux-3\"}}"
@ -460,8 +460,8 @@ id_item[7]="0"
deleted[7]="0"
id[8]="8"
id_parent[8]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"9\",\"x\":\"514\",\"y\":\"389\",\"z\":\"0\"}}"
id_child[8]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"7\",\"x\":\"226\",\"y\":\"595\",\"z\":\"0\"}}"
id_parent[8]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-2\"}},\"x\":\"514\",\"y\":\"389\",\"z\":\"0\"}}"
id_child[8]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-4\"}},\"x\":\"226\",\"y\":\"595\",\"z\":\"0\"}}"
id_map[8]="2"
id_parent_source_data[8]="{\"tagente\":{\"nombre\":\"windows-2\"}}"
id_child_source_data[8]="{\"tagente\":{\"nombre\":\"linux-4\"}}"
@ -471,8 +471,8 @@ id_item[8]="0"
deleted[8]="0"
id[9]="9"
id_parent[9]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[9]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"22\",\"x\":\"1036\",\"y\":\"711\",\"z\":\"0\"}}"
id_parent[9]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[9]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-2\"}},\"x\":\"1036\",\"y\":\"711\",\"z\":\"0\"}}"
id_map[9]="2"
id_parent_source_data[9]="{\"tagente\":{\"nombre\":\"cisco-1\"}}"
id_child_source_data[9]="{\"tagente\":{\"nombre\":\"cisco-2\"}}"
@ -482,8 +482,8 @@ id_item[9]="0"
deleted[9]="0"
id[10]="10"
id_parent[10]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[10]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"21\",\"x\":\"892\",\"y\":\"-47\",\"z\":\"0\"}}"
id_parent[10]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[10]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-2\"}},\"x\":\"892\",\"y\":\"-47\",\"z\":\"0\"}}"
id_map[10]="2"
id_parent_source_data[10]="{\"tagente\":{\"nombre\":\"cisco-1\"}}"
id_child_source_data[10]="{\"tagente\":{\"nombre\":\"freebsd-2\"}}"
@ -493,8 +493,8 @@ id_item[10]="0"
deleted[10]="0"
id[11]="11"
id_parent[11]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[11]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"20\",\"x\":\"1150\",\"y\":\"409\",\"z\":\"0\"}}"
id_parent[11]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[11]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"macos-2\"}},\"x\":\"1150\",\"y\":\"409\",\"z\":\"0\"}}"
id_map[11]="2"
id_parent_source_data[11]="{\"tagente\":{\"nombre\":\"cisco-1\"}}"
id_child_source_data[11]="{\"tagente\":{\"nombre\":\"macos-2\"}}"
@ -504,8 +504,8 @@ id_item[11]="0"
deleted[11]="0"
id[12]="12"
id_parent[12]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"22\",\"x\":\"1036\",\"y\":\"711\",\"z\":\"0\"}}"
id_child[12]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"18\",\"x\":\"686\",\"y\":\"875\",\"z\":\"0\"}}"
id_parent[12]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-2\"}},\"x\":\"1036\",\"y\":\"711\",\"z\":\"0\"}}"
id_child[12]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-3\"}},\"x\":\"686\",\"y\":\"875\",\"z\":\"0\"}}"
id_map[12]="2"
id_parent_source_data[12]="{\"tagente\":{\"nombre\":\"cisco-2\"}}"
id_child_source_data[12]="{\"tagente\":{\"nombre\":\"windows-3\"}}"
@ -515,8 +515,8 @@ id_item[12]="0"
deleted[12]="0"
id[13]="13"
id_parent[13]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"22\",\"x\":\"1036\",\"y\":\"711\",\"z\":\"0\"}}"
id_child[13]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"19\",\"x\":\"1452\",\"y\":\"847\",\"z\":\"0\"}}"
id_parent[13]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-2\"}},\"x\":\"1036\",\"y\":\"711\",\"z\":\"0\"}}"
id_child[13]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-4\"}},\"x\":\"1452\",\"y\":\"847\",\"z\":\"0\"}}"
id_map[13]="2"
id_parent_source_data[13]="{\"tagente\":{\"nombre\":\"cisco-2\"}}"
id_child_source_data[13]="{\"tagente\":{\"nombre\":\"windows-4\"}}"
@ -526,8 +526,8 @@ id_item[13]="0"
deleted[13]="0"
id[14]="14"
id_parent[14]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"18\",\"x\":\"686\",\"y\":\"875\",\"z\":\"0\"}}"
id_child[14]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"14\",\"x\":\"314\",\"y\":\"845\",\"z\":\"0\"}}"
id_parent[14]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-3\"}},\"x\":\"686\",\"y\":\"875\",\"z\":\"0\"}}"
id_child[14]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-5\"}},\"x\":\"314\",\"y\":\"845\",\"z\":\"0\"}}"
id_map[14]="2"
id_parent_source_data[14]="{\"tagente\":{\"nombre\":\"windows-3\"}}"
id_child_source_data[14]="{\"tagente\":{\"nombre\":\"linux-5\"}}"
@ -537,8 +537,8 @@ id_item[14]="0"
deleted[14]="0"
id[15]="15"
id_parent[15]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"18\",\"x\":\"686\",\"y\":\"875\",\"z\":\"0\"}}"
id_child[15]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"15\",\"x\":\"474\",\"y\":\"1043\",\"z\":\"0\"}}"
id_parent[15]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-3\"}},\"x\":\"686\",\"y\":\"875\",\"z\":\"0\"}}"
id_child[15]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-6\"}},\"x\":\"474\",\"y\":\"1043\",\"z\":\"0\"}}"
id_map[15]="2"
id_parent_source_data[15]="{\"tagente\":{\"nombre\":\"windows-3\"}}"
id_child_source_data[15]="{\"tagente\":{\"nombre\":\"linux-6\"}}"
@ -548,8 +548,8 @@ id_item[15]="0"
deleted[15]="0"
id[16]="16"
id_parent[16]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"19\",\"x\":\"1452\",\"y\":\"847\",\"z\":\"0\"}}"
id_child[16]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"16\",\"x\":\"1812\",\"y\":\"1011\",\"z\":\"0\"}}"
id_parent[16]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-4\"}},\"x\":\"1452\",\"y\":\"847\",\"z\":\"0\"}}"
id_child[16]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-7\"}},\"x\":\"1812\",\"y\":\"1011\",\"z\":\"0\"}}"
id_map[16]="2"
id_parent_source_data[16]="{\"tagente\":{\"nombre\":\"windows-4\"}}"
id_child_source_data[16]="{\"tagente\":{\"nombre\":\"linux-7\"}}"
@ -559,8 +559,8 @@ id_item[16]="0"
deleted[16]="0"
id[17]="17"
id_parent[17]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"19\",\"x\":\"1452\",\"y\":\"847\",\"z\":\"0\"}}"
id_child[17]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"17\",\"x\":\"1828\",\"y\":\"723\",\"z\":\"0\"}}"
id_parent[17]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-4\"}},\"x\":\"1452\",\"y\":\"847\",\"z\":\"0\"}}"
id_child[17]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-8\"}},\"x\":\"1828\",\"y\":\"723\",\"z\":\"0\"}}"
id_map[17]="2"
id_parent_source_data[17]="{\"tagente\":{\"nombre\":\"windows-4\"}}"
id_child_source_data[17]="{\"tagente\":{\"nombre\":\"linux-8\"}}"
@ -570,8 +570,8 @@ id_item[17]="0"
deleted[17]="0"
id[18]="18"
id_parent[18]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"10\",\"x\":\"1268\",\"y\":\"235\",\"z\":\"0\"}}"
id_child[18]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"32\",\"x\":\"1824\",\"y\":\"285\",\"z\":\"0\"}}"
id_parent[18]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"macos-1\"}},\"x\":\"1268\",\"y\":\"235\",\"z\":\"0\"}}"
id_child[18]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-3\"}},\"x\":\"1824\",\"y\":\"285\",\"z\":\"0\"}}"
id_map[18]="2"
id_parent_source_data[18]="{\"tagente\":{\"nombre\":\"macos-1\"}}"
id_child_source_data[18]="{\"tagente\":{\"nombre\":\"cisco-3\"}}"
@ -581,8 +581,8 @@ id_item[18]="0"
deleted[18]="0"
id[19]="19"
id_parent[19]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"7\",\"x\":\"226\",\"y\":\"595\",\"z\":\"0\"}}"
id_child[19]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"31\",\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_parent[19]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-4\"}},\"x\":\"226\",\"y\":\"595\",\"z\":\"0\"}}"
id_child[19]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-3\"}},\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_map[19]="2"
id_parent_source_data[19]="{\"tagente\":{\"nombre\":\"linux-4\"}}"
id_child_source_data[19]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}"
@ -592,8 +592,8 @@ id_item[19]="0"
deleted[19]="0"
id[20]="20"
id_parent[20]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"31\",\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_child[20]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"30\",\"x\":\"-140\",\"y\":\"299\",\"z\":\"0\"}}"
id_parent[20]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-3\"}},\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_child[20]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"macos-3\"}},\"x\":\"-140\",\"y\":\"299\",\"z\":\"0\"}}"
id_map[20]="2"
id_parent_source_data[20]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}"
id_child_source_data[20]="{\"tagente\":{\"nombre\":\"macos-3\"}}"
@ -603,8 +603,8 @@ id_item[20]="0"
deleted[20]="0"
id[21]="21"
id_parent[21]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"31\",\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_child[21]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"28\",\"x\":\"-390\",\"y\":\"385\",\"z\":\"0\"}}"
id_parent[21]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-3\"}},\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_child[21]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-5\"}},\"x\":\"-390\",\"y\":\"385\",\"z\":\"0\"}}"
id_map[21]="2"
id_parent_source_data[21]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}"
id_child_source_data[21]="{\"tagente\":{\"nombre\":\"windows-5\"}}"
@ -614,8 +614,8 @@ id_item[21]="0"
deleted[21]="0"
id[22]="22"
id_parent[22]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"31\",\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_child[22]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"29\",\"x\":\"-470\",\"y\":\"671\",\"z\":\"0\"}}"
id_parent[22]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-3\"}},\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_child[22]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-6\"}},\"x\":\"-470\",\"y\":\"671\",\"z\":\"0\"}}"
id_map[22]="2"
id_parent_source_data[22]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}"
id_child_source_data[22]="{\"tagente\":{\"nombre\":\"windows-6\"}}"
@ -625,8 +625,8 @@ id_item[22]="0"
deleted[22]="0"
id[23]="23"
id_parent[23]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"31\",\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_child[23]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"24\",\"x\":\"-296\",\"y\":\"899\",\"z\":\"0\"}}"
id_parent[23]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-3\"}},\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_child[23]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-9\"}},\"x\":\"-296\",\"y\":\"899\",\"z\":\"0\"}}"
id_map[23]="2"
id_parent_source_data[23]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}"
id_child_source_data[23]="{\"tagente\":{\"nombre\":\"linux-9\"}}"
@ -636,8 +636,8 @@ id_item[23]="0"
deleted[23]="0"
id[24]="24"
id_parent[24]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"31\",\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_child[24]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"25\",\"x\":\"-25\",\"y\":\"961\",\"z\":\"0\"}}"
id_parent[24]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-3\"}},\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_child[24]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-10\"}},\"x\":\"-25\",\"y\":\"961\",\"z\":\"0\"}}"
id_map[24]="2"
id_parent_source_data[24]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}"
id_child_source_data[24]="{\"tagente\":{\"nombre\":\"linux-10\"}}"
@ -647,8 +647,8 @@ id_item[24]="0"
deleted[24]="0"
id[25]="25"
id_parent[25]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"32\",\"x\":\"1824\",\"y\":\"285\",\"z\":\"0\"}}"
id_child[25]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"26\",\"x\":\"1683\",\"y\":\"13\",\"z\":\"0\"}}"
id_parent[25]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-3\"}},\"x\":\"1824\",\"y\":\"285\",\"z\":\"0\"}}"
id_child[25]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-11\"}},\"x\":\"1683\",\"y\":\"13\",\"z\":\"0\"}}"
id_map[25]="2"
id_parent_source_data[25]="{\"tagente\":{\"nombre\":\"cisco-3\"}}"
id_child_source_data[25]="{\"tagente\":{\"nombre\":\"linux-11\"}}"
@ -658,8 +658,8 @@ id_item[25]="0"
deleted[25]="0"
id[26]="26"
id_parent[26]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"32\",\"x\":\"1824\",\"y\":\"285\",\"z\":\"0\"}}"
id_child[26]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"27\",\"x\":\"2135\",\"y\":\"51\",\"z\":\"0\"}}"
id_parent[26]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-3\"}},\"x\":\"1824\",\"y\":\"285\",\"z\":\"0\"}}"
id_child[26]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-12\"}},\"x\":\"2135\",\"y\":\"51\",\"z\":\"0\"}}"
id_map[26]="2"
id_parent_source_data[26]="{\"tagente\":{\"nombre\":\"cisco-3\"}}"
id_child_source_data[26]="{\"tagente\":{\"nombre\":\"linux-12\"}}"

View File

@ -2,6 +2,9 @@ START TRANSACTION;
DROP TABLE tskin;
ALTER TABLE `tusuario`
ADD COLUMN `stop_lts_modal` TINYINT NOT NULL DEFAULT 0 AFTER `session_max_time_expire`;
-- START MIGRATION MSSQL --
SET @current_app_type = 12;
SET @short_name = 'pandorafms.mssql';
@ -7673,4 +7676,36 @@ UPDATE `trecon_task`
-- END MIGRATION SAP DESET --
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/es/documentation/03_monitoring/06_web_monitoring' WHERE title = '¿Sab&iacute;as&#x20;que&#x20;puedes&#x20;monitorizar&#x20;webs?';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/es/documentation/03_monitoring/03_remote_monitoring#monitorizacion_snmp' WHERE title = 'Monitorizaci&oacute;n&#x20;remota&#x20;de&#x20;dispositivos&#x20;SNMP';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/es/documentation/03_monitoring/03_remote_monitoring#monitorizacion_de_rutas' WHERE title = 'Monitorizar&#x20;rutas&#x20;desde&#x20;una&#x20;IP&#x20;a&#x20;otra';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/es/documentation/04_using/11_managing_and_administration#paradas_de_servicio_planificadas' WHERE title = 'Paradas&#x20;planificadas';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/es/documentation/pandorafms/management_and_operation/01_alerts#configuracion_de_correos_para_alertas_en_pandora_fms' WHERE title = 'Personalizar&#x20;los&#x20;emails&#x20;de&#x20;alerta&#x20;';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/start?id=es/documentation/04_using/05_data_presentation_visual_maps' WHERE title = 'Usando&#x20;iconos&#x20;personalizados&#x20;en&#x20;consolas&#x20;visuales&#x20;';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/es/documentation/04_using/05_data_presentation_visual_maps#mapa_de_calor_o_nube_de_color' WHERE title = 'Consolas&#x20;visuales:&#x20;mapas&#x20;de&#x20;calor&#x20;';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/es/documentation/04_using/11_managing_and_administration#log_de_auditoria' WHERE title = 'Auditor&iacute;a&#x20;interna&#x20;de&#x20;la&#x20;consola&#x20;';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/start?id=es/documentation/02_installation/05_configuration_agents#configuracion_automatica_de_agentes' WHERE title = 'Sistema&#x20;de&#x20;provisi&oacute;n&#x20;autom&aacute;tica&#x20;de&#x20;agentes&#x20;';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/es/documentation/04_using/05_data_presentation_visual_maps#enlace_de_red' WHERE title = 'Enlaces&#x20;de&#x20;red&#x20;en&#x20;la&#x20;consola&#x20;visual&#x20;';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/es/documentation/04_using/08_data_presentation_reports#grafico_de_disponibilidad' WHERE title = 'Gr&aacute;ficas&#x20;de&#x20;disponibilidad&#x20;';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/es/documentation/04_using/12_console_setup?s%5B%5D%3Dcontrase%25C3%25B1as#password_policy' WHERE title = 'Pol&iacute;tica&#x20;de&#x20;contrase&ntilde;as';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/04_using/12_console_setup?s%5B%5D%3Dgoogle%26s%5B%5D%3Dauth#authentication' WHERE title = 'Autenticaci&oacute;n&#x20;de&#x20;doble&#x20;factor&#x20;';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/03_monitoring/06_web_monitoring' WHERE title = 'Did&#x20;you&#x20;know&#x20;that&#x20;you&#x20;can&#x20;monitor&#x20;websites?';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/04_using/11_managing_and_administration#log_de_auditoria' WHERE title = 'Console&#x20;Internal&#x20;Audit';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/04_using/12_console_setup?s%5B%5D%3Dgoogle%26s%5B%5D%' WHERE title = 'Two-factor&#x20;authentication';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/04_using/05_data_presentation_visual_maps#mapa_de_cal' WHERE title = 'Visual&#x20;consoles:&#x20;heat&#x20;maps';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/04_using/05_data_presentation_visual_maps#enlace_de_red' WHERE title = 'Network&#x20;links&#x20;in&#x20;the&#x20;visual&#x20;console';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/04_using/08_data_presentation_reports#grafico_de_disp' WHERE title = 'Availability&#x20;graphs';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/03_monitoring/03_remote_monitoring#monitorizacion_snmp' WHERE title = 'Remote&#x20;monitoring&#x20;of&#x20;SNMP&#x20;devices';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/03_monitoring/03_remote_monitoring#monitorizacion_de_rutas' WHERE title = 'Monitor&#x20;routes&#x20;from&#x20;one&#x20;IP&#x20;to&#x20;another';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/04_using/11_managing_and_administration#scheduled_downtimes' WHERE title = 'Scheduled&#x20;downtimes';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/04_using/01_alerts#editing_an_action' WHERE title = 'Customize&#x20;alert&#x20;emails';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/04_using/12_console_setup?s%5B%5D%3Dcontrase%25C3%25B' WHERE title = 'password&#x20;policy';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/start?id=en/documentation/02_installation/05_configuration_agents#conf' WHERE title = 'Automatic&#x20;agent&#x20;provision&#x20;system';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/start?id=en/documentation/02_installation/05_configuration_agents#conf' WHERE title = 'Automatic&#x20;agent&#x20;provision&#x20;system';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/start?id=en/documentation/02_installation/05_configuration_agents#conf' WHERE title = 'Automatic&#x20;agent&#x20;provision&#x20;system';
UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/start?id=en/documentation/04_using/05_data_presentation_visual_maps' WHERE title = 'Using&#x20;custom&#x20;icons&#x20;in&#x20;visual&#x20;consoles';
DELETE FROM tconfig WHERE `token` = 'legacy_database_ha';
COMMIT;

View File

@ -599,21 +599,12 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
function filter_notification() {
let notification_type = '';
$('.notification-item').hide();
$(".checkbox_filter_notifications:checkbox:checked").each(function() {
notification_type = $(this).val();
console.log(notification_type);
$('.notification-item[value='+notification_type+']').show();
if (notification_type == 'All'){
$('.notification-item').show();
}
});
notification_type = $("#notifications_filter_options").val()
if (notification_type == 'All'){
if (notification_type === 'All') {
$('.notification-item').show();
}
if (notification_type == ''){
$('.notification-item').hide();
} else {
$('.notification-item[value='+notification_type+']').show();
}
}
@ -1058,8 +1049,10 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
})
}
},
closeOnEscape: true,
onload: () => {
$(document).ready(function () {
$(".ui-dialog-titlebar-close").hide();
var buttonpane = $("div[aria-describedby='welcome_modal_window'] .ui-dialog-buttonpane.ui-widget-content.ui-helper-clearfix");
$(buttonpane).append(`
<div class="welcome-wizard-buttons">

View File

@ -662,13 +662,16 @@ if ($modules !== false) {
$table->width = '100%';
$table->class = 'tactical_table info_table';
$table->head = [];
$table->head['checkbox'] = html_print_checkbox(
'all_delete',
0,
false,
true,
false
);
if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW') === true) {
$table->head['checkbox'] = html_print_checkbox(
'all_delete',
0,
false,
true,
false
);
}
$table->head[0] = '<span>'.__('Name').'</span>'.ui_get_sorting_arrows(
$url_name.'up',
$url_name.'down',
@ -1262,23 +1265,11 @@ html_print_div(
$('#modal').dialog("close");
});
$('[id^=checkbox-id_delete]').change(function(){
if($(this).parent().parent().hasClass('checkselected')){
$(this).parent().parent().removeClass('checkselected');
}
else{
$(this).parent().parent().addClass('checkselected');
}
});
$('[id^=checkbox-all_delete]').change(function(){
if ($("#checkbox-all_delete").prop("checked")) {
$('[id^=checkbox-id_delete]').parent().parent().addClass('checkselected');
$("[name^=id_delete").prop("checked", true);
}
else{
$('[id^=checkbox-id_delete]').parent().parent().removeClass('checkselected');
$("[name^=id_delete").prop("checked", false);
}
});

View File

@ -259,12 +259,12 @@ $table->data[3][1] = html_print_label_input_block(
$table->data[4][0] = html_print_label_input_block(
__('Contact').ui_print_help_tip(__('Contact information accessible through the _groupcontact_ macro'), true),
html_print_textarea('contact', 4, 40, $contact, "class='min-height-0px'", true)
html_print_input_text('contact', $contact, '', false, '', true)
);
$table->data[4][1] = html_print_label_input_block(
__('Other').ui_print_help_tip(__('Information accessible through the _group_other_ macro'), true),
html_print_textarea('other', 4, 40, $other, "class='min-height-0px'", true)
html_print_input_text('other', $other, '', false, '', true)
);
$table->data[5][0] = html_print_label_input_block(

View File

@ -628,7 +628,7 @@ if (is_metaconsole() === true) {
$url = 'index.php?sec=advanced&sec2=advanced/massive_operations&tab=massive_agents&pure=0&option=edit_agents';
}
echo '<form method="post" autocomplete="off" id="form_agent" action="'.$url.'">';
echo '<form method="post" autocomplete="off" id="form_agent" class="form-agent-bulk-operation" action="'.$url.'">';
echo html_print_avoid_autocomplete();
$params = [
'id_group' => ($id_group ?? ''),
@ -651,14 +651,11 @@ echo '<div id="form_agents" style="display:none">';
$table = new StdClass();
$table->width = '100%';
$table->class = 'databox filters';
$table->class = 'databox filters filter-table-adv';
$table->head = [];
$table->style = [];
$table->style[0] = 'font-weight: bold; width: 150px;';
$table->size[0] = '15%';
$table->size[1] = '35%';
$table->size[2] = '15%';
$table->size[3] = '35%';
$table->size[0] = '50%';
$table->size[1] = '50%';
$table->data = [];
@ -683,7 +680,6 @@ if (is_metaconsole() === false) {
$modules_values[$m['id_module']] = $m['name'];
}
$table->data[0][0] = __('Parent');
$params = [];
$params['return'] = true;
$params['show_helptip'] = true;
@ -694,90 +690,107 @@ if (is_metaconsole() === false) {
$params['value'] = db_get_value('alias', 'tagente', 'id_agente', $id_parent);
$params['selectbox_id'] = 'cascade_protection_module';
$params['javascript_is_function_select'] = true;
$table->data[0][1] = ui_print_agent_autocomplete_input($params);
$table->data[0][1] .= '<b>'.__('Cascade protection').'</b>';
$table->data[0][1] .= html_print_select(
[
1 => __('Yes'),
0 => __('No'),
],
'cascade_protection',
-1,
'',
__('No change'),
-1,
true
$table->data[0][0] = html_print_label_input_block(
__('Parent'),
ui_print_agent_autocomplete_input($params)
);
$table->data[0][1] .= '&nbsp;&nbsp;'.__('Module').'&nbsp;';
$table->data[0][1] .= html_print_select(
($modules ?? ''),
'cascade_protection_module',
($cascade_protection_module ?? ''),
'',
'',
0,
true
$table->data[0][1] = html_print_label_input_block(
__('Cascade protection'),
'<div class="flex-row-center">'.html_print_select(
[
1 => __('Yes'),
0 => __('No'),
],
'cascade_protection',
-1,
'',
__('No change'),
-1,
true,
false,
true,
'w50p',
false,
'width: 48%;'
).'<div class="flex-row-center mrgn_lft_20px">'.__('Module').'&nbsp;&nbsp;&nbsp;'.html_print_select(
($modules ?? ''),
'cascade_protection_module',
($cascade_protection_module ?? ''),
'',
'',
0,
true,
false,
true,
'',
false,
'width: 100%;'
).'</div></div>'
);
}
$table->data[1][0] = __('Group');
$table->data[1][1] = '<div class="w290px inline">';
$table->data[1][1] .= html_print_select_groups(
false,
'AR',
false,
'group',
$group,
'',
__('No change'),
-1,
true,
false,
true,
'',
false,
'width: 150px;'
);
$table->data[1][1] .= '</div>';
$table->data[2][0] = __('Interval');
$table->data[2][1] = html_print_extended_select_for_time(
'interval',
-2,
'',
'',
'0',
10,
true,
'width: 150px',
false,
'',
false,
false,
'',
true
$table->data[1][0] = html_print_label_input_block(
__('Group'),
html_print_select_groups(
false,
'AR',
false,
'group',
$group,
'',
__('No change'),
-1,
true,
false,
true,
'',
false
)
);
$table->data[3][0] = __('OS');
$table->data[3][1] = html_print_select_from_sql(
'SELECT id_os, name FROM tconfig_os',
'id_os',
$id_os,
'',
__('No change'),
-1,
true,
false,
true,
false,
'width: 105px;'
$table->data[1][1] = html_print_label_input_block(
__('Interval'),
html_print_extended_select_for_time(
'interval',
-2,
'',
'',
'0',
10,
true,
false,
false,
'',
false,
false,
'',
true
)
);
$os_preview = ' <span id="os_preview" class="mrgn_lft_10px">';
$os_preview .= ui_print_os_icon($id_os, false, true);
$os_preview .= '</span>';
$table->data[2][0] = html_print_label_input_block(
__('OS'),
'<div class="flex-row-center">'.html_print_select_from_sql(
'SELECT id_os, name FROM tconfig_os',
'id_os',
$id_os,
'',
__('No change'),
-1,
true,
false,
true,
false,
'width: 100%;'
).$os_preview.'</div>'
);
$table->data[3][1] .= ' <span id="os_preview">';
$table->data[3][1] .= ui_print_os_icon($id_os, false, true);
$table->data[3][1] .= '</span>';
// Network server.
$none = '';
@ -785,31 +798,34 @@ if ($server_name == '' && $id_agente) {
$none = __('None');
}
$table->data[4][0] = __('Server');
$table->data[4][1] = html_print_select(
servers_get_names(),
'server_name',
$server_name,
'',
__('No change'),
-1,
true,
false,
true,
'',
false,
'width: 150px;'
$table->data[2][1] = html_print_label_input_block(
__('Server'),
html_print_select(
servers_get_names(),
'server_name',
$server_name,
'',
__('No change'),
-1,
true,
false,
true,
'',
false
)
);
// Description.
$table->data[5][0] = __('Description');
$table->data[5][1] = html_print_input_text(
'description',
$description,
'',
45,
255,
true
$table->data[3][0] = html_print_label_input_block(
__('Description'),
html_print_input_text(
'description',
$description,
'',
45,
255,
true
)
);
html_print_table($table);
@ -827,12 +843,10 @@ $quiet_select = -1;
$table = new StdClass();
$table->width = '100%';
$table->class = 'databox filters';
$table->class = 'databox filters filter-table-adv';
$table->size[0] = '15%';
$table->size[1] = '35%';
$table->size[2] = '15%';
$table->size[3] = '35%';
$table->size[0] = '50%';
$table->size[1] = '50%';
$table->head = [];
$table->style = [];
@ -840,76 +854,81 @@ $table->style[0] = 'font-weight: bold; width: 150px;';
$table->data = [];
// Custom ID.
$table->data[0][0] = __('Custom ID');
$table->data[0][1] = html_print_input_text(
'custom_id',
$custom_id,
'',
16,
255,
true
$table->data[0][0] = html_print_label_input_block(
__('Custom ID'),
html_print_input_text(
'custom_id',
$custom_id,
'',
16,
255,
true
)
);
// Secondary Groups.
if (enterprise_installed() === true) {
$groups = users_get_groups($config['id_user'], 'AW', false);
$table->data['secondary_groups_added'][0] = __('Add secondary groups');
$table->data['secondary_groups_added'][1] = html_print_select(
$groups,
'secondary_groups_added[]',
0,
false,
'',
'',
true,
true,
true,
'',
false,
'min-width: 500px; max-width: 500px; max-height: 100px',
false,
false,
false,
'',
false,
false,
false,
false,
true,
true
$table->data[1][0] = html_print_label_input_block(
__('Add secondary groups'),
html_print_select(
$groups,
'secondary_groups_added[]',
0,
false,
'',
'',
true,
true,
true,
'',
false,
'min-width: 500px; max-width: 500px; max-height: 100px',
false,
false,
false,
'',
false,
false,
false,
false,
true,
true
)
);
$table->data['secondary_groups_removed'][0] = __('Remove secondary groups');
$table->data['secondary_groups_removed'][1] = html_print_select(
$groups,
'secondary_groups_removed[]',
0,
false,
'',
'',
true,
true,
true,
'',
false,
'min-width: 500px; max-width: 500px; max-height: 100px',
false,
false,
false,
'',
false,
false,
false,
false,
true,
true
$table->data[1][1] = html_print_label_input_block(
__('Remove secondary groups'),
html_print_select(
$groups,
'secondary_groups_removed[]',
0,
false,
'',
'',
true,
true,
true,
'',
false,
'min-width: 500px; max-width: 500px; max-height: 100px',
false,
false,
false,
'',
false,
false,
false,
false,
true,
true
)
);
}
// Learn mode / Normal mode.
$table->data[1][0] = __('Module definition');
$table->data[1][1] = __('No change').' ';
$table->data[1][1] .= html_print_radio_button_extended(
$module_definition = __('No change').' ';
$module_definition .= html_print_radio_button_extended(
'mode',
-1,
'',
@ -919,8 +938,8 @@ $table->data[1][1] .= html_print_radio_button_extended(
'class="mrgn_right_40px"',
true
);
$table->data[1][1] .= __('Learning mode').' ';
$table->data[1][1] .= html_print_radio_button_extended(
$module_definition .= __('Learning mode').' ';
$module_definition .= html_print_radio_button_extended(
'mode',
1,
'',
@ -930,8 +949,8 @@ $table->data[1][1] .= html_print_radio_button_extended(
'class="mrgn_right_40px"',
true
);
$table->data[1][1] .= __('Normal mode').' ';
$table->data[1][1] .= html_print_radio_button_extended(
$module_definition .= __('Normal mode').' ';
$module_definition .= html_print_radio_button_extended(
'mode',
0,
'',
@ -941,8 +960,8 @@ $table->data[1][1] .= html_print_radio_button_extended(
'class="mrgn_right_40px"',
true
);
$table->data[1][1] .= __('Autodisable mode').' ';
$table->data[1][1] .= html_print_radio_button_extended(
$module_definition .= __('Autodisable mode').' ';
$module_definition .= html_print_radio_button_extended(
'mode',
2,
'',
@ -953,10 +972,14 @@ $table->data[1][1] .= html_print_radio_button_extended(
true
);
$table->data[2][0] = html_print_label_input_block(
__('Module definition'),
'<div class="flex-row-center">'.$module_definition.'</div>'
);
// Status (Disabled / Enabled).
$table->data[2][0] = __('Status');
$table->data[2][1] = __('No change').' ';
$table->data[2][1] .= html_print_radio_button_extended(
$status_item = __('No change').' ';
$status_item .= html_print_radio_button_extended(
'disabled',
-1,
'',
@ -966,12 +989,12 @@ $table->data[2][1] .= html_print_radio_button_extended(
'class="mrgn_right_40px"',
true
);
$table->data[2][1] .= __('Disabled').' ';
$table->data[2][1] .= ui_print_help_tip(
$status_item .= __('Disabled').' ';
$status_item .= ui_print_help_tip(
__('If the remote configuration is enabled, it will also go into standby mode when disabling it.'),
true
).' ';
$table->data[2][1] .= html_print_radio_button_extended(
$status_item .= html_print_radio_button_extended(
'disabled',
1,
'',
@ -981,8 +1004,8 @@ $table->data[2][1] .= html_print_radio_button_extended(
'class="mrgn_right_40px"',
true
);
$table->data[2][1] .= __('Active').' ';
$table->data[2][1] .= html_print_radio_button_extended(
$status_item .= __('Active').' ';
$status_item .= html_print_radio_button_extended(
'disabled',
0,
'',
@ -993,15 +1016,19 @@ $table->data[2][1] .= html_print_radio_button_extended(
true
);
$table->data[2][1] = html_print_label_input_block(
__('Status'),
'<div class="flex-row-center">'.$status_item.'</div>'
);
// Remote configuration.
$table->data[3][0] = __('Remote configuration');
// Delete remote configuration.
$table->data[3][1] = '<div id="delete_configurations" class="invisible">';
$table->data[3][1] .= __('Delete available remote configurations');
$table->data[3][1] .= ' (';
$table->data[3][1] .= '<span id="n_configurations"></span>';
$table->data[3][1] .= ') ';
$table->data[3][1] .= html_print_checkbox_extended(
$remote_config = '<div id="delete_configurations" class="invisible">';
$remote_config .= __('Delete available remote configurations');
$remote_config .= ' (';
$remote_config .= '<span id="n_configurations"></span>';
$remote_config .= ') ';
$remote_config .= html_print_checkbox_extended(
'delete_conf',
1,
0,
@ -1010,11 +1037,16 @@ $table->data[3][1] .= html_print_checkbox_extended(
'class="mrgn_right_40px"',
true
);
$table->data[3][1] .= '</div>';
$remote_config .= '</div>';
$table->data[3][1] .= '<div id="not_available_configurations" class="invisible"><em>';
$table->data[3][1] .= __('Not available');
$table->data[3][1] .= '</em></div>';
$remote_config .= '<div id="not_available_configurations" class="invisible"><em>';
$remote_config .= __('Not available');
$remote_config .= '</em></div>';
$table->data[3][0] = html_print_label_input_block(
__('Remote configuration'),
'<div class="flex-row-center">'.$remote_config.'</div>'
);
$listIcons = gis_get_array_list_icons();
@ -1042,8 +1074,7 @@ if ($icon_path == '') {
$path_warning = $path.$icon_path.'.warning.png';
}
$table->data[4][0] = __('Agent icon');
$table->data[4][1] = html_print_select(
$agent_icon = html_print_select(
$arraySelectIcon,
'icon_path',
$icon_path,
@ -1052,9 +1083,9 @@ $table->data[4][1] = html_print_select(
'',
true
);
$table->data[4][1] .= '&nbsp;';
$table->data[4][1] .= __('Without status').': ';
$table->data[4][1] .= html_print_image(
$agent_icon .= '&nbsp;';
$agent_icon .= __('Without status').': ';
$agent_icon .= html_print_image(
$path_without,
true,
[
@ -1062,8 +1093,8 @@ $table->data[4][1] .= html_print_image(
'style' => 'display:'.$display_icons.';',
]
);
$table->data[4][1] .= '&nbsp;'.__('Default').': ';
$table->data[4][1] .= html_print_image(
$agent_icon .= '&nbsp;'.__('Default').': ';
$agent_icon .= html_print_image(
$path_default,
true,
[
@ -1071,8 +1102,8 @@ $table->data[4][1] .= html_print_image(
'style' => 'display:'.$display_icons.';',
]
);
$table->data[4][1] .= '&nbsp;'.__('Ok').': ';
$table->data[4][1] .= html_print_image(
$agent_icon .= '&nbsp;'.__('Ok').': ';
$agent_icon .= html_print_image(
$path_ok,
true,
[
@ -1080,8 +1111,8 @@ $table->data[4][1] .= html_print_image(
'style' => 'display:'.$display_icons.';',
]
);
$table->data[4][1] .= '&nbsp;'.__('Bad').': ';
$table->data[4][1] .= html_print_image(
$agent_icon .= '&nbsp;'.__('Bad').': ';
$agent_icon .= html_print_image(
$path_bad,
true,
[
@ -1089,8 +1120,8 @@ $table->data[4][1] .= html_print_image(
'style' => 'display:'.$display_icons.';',
]
);
$table->data[4][1] .= '&nbsp;'.__('Warning').': ';
$table->data[4][1] .= html_print_image(
$agent_icon .= '&nbsp;'.__('Warning').': ';
$agent_icon .= html_print_image(
$path_warning,
true,
[
@ -1099,10 +1130,14 @@ $table->data[4][1] .= html_print_image(
]
);
$table->data[3][1] = html_print_label_input_block(
__('Agent icon'),
'<div class="flex-row-center">'.$agent_icon.'</div>'
);
if ($config['activate_gis']) {
$table->data[5][0] = __('Ignore new GIS data:');
$table->data[5][1] = __('No change').' ';
$table->data[5][1] .= html_print_radio_button_extended(
$ignore_gis = __('No change').' ';
$ignore_gis .= html_print_radio_button_extended(
'update_gis_data',
-1,
'',
@ -1112,8 +1147,8 @@ if ($config['activate_gis']) {
'class="mrgn_right_40px"',
true
);
$table->data[5][1] .= __('Yes').' ';
$table->data[5][1] .= html_print_radio_button_extended(
$ignore_gis .= __('Yes').' ';
$ignore_gis .= html_print_radio_button_extended(
'update_gis_data',
0,
'',
@ -1123,8 +1158,8 @@ if ($config['activate_gis']) {
'class="mrgn_right_40px"',
true
);
$table->data[5][1] .= __('No').' ';
$table->data[5][1] .= html_print_radio_button_extended(
$ignore_gis .= __('No').' ';
$ignore_gis .= html_print_radio_button_extended(
'update_gis_data',
1,
'',
@ -1134,74 +1169,82 @@ if ($config['activate_gis']) {
'class="mrgn_right_40px"',
true
);
$table->data[4][0] = html_print_label_input_block(
__('Ignore new GIS data:'),
'<div class="flex-row-center">'.$ignore_gis.'</div>'
);
}
$table->data[6][0] = __('Quiet');
$table->data[6][0] .= ui_print_help_tip(
__('The agent still runs but the alerts and events will be stop'),
true
);
$table->data[6][1] = html_print_select(
[
-1 => __('No change'),
1 => __('Yes'),
0 => __('No'),
],
'quiet_select',
$quiet_select,
'',
'',
0,
true
);
$table->data[7][0] = __('Safe operation mode').': '.ui_print_help_tip(
__(
'This mode allow %s to disable all modules of this agent while the selected module is on CRITICAL status',
get_product_name()
$table->data[5][0] = html_print_label_input_block(
__('Quiet:').ui_print_help_tip(
__('The agent still runs but the alerts and events will be stop'),
true
),
true
);
$table->data[7][1] = html_print_select(
[
1 => __('Enabled'),
0 => __('Disabled'),
],
'safe_mode_change',
-1,
'',
__('No change'),
-1,
true
).'&nbsp;';
$table->data[7][1] .= __('Module').'&nbsp;';
$table->data[7][1] .= html_print_select(
'',
'safe_mode_module',
'',
'',
__('Any'),
-1,
true
html_print_select(
[
-1 => __('No change'),
1 => __('Yes'),
0 => __('No'),
],
'quiet_select',
$quiet_select,
'',
'',
0,
true
)
);
$table->data[8][0] = __('Ignore unknown').ui_print_help_tip(_('This disables the calculation of the unknown state in the agent and any of its modules, so it will never transition to unknown. The state it reflects is the last known status.'), true);
$table->data[8][1] = html_print_select(
[
'' => __('No change'),
'1' => __('Yes'),
'0' => __('No'),
],
'ignore_unknown',
'',
'',
'',
'',
true,
false,
false,
'w100p'
$table->data[5][1] = html_print_label_input_block(
__('Safe operation mode').': '.ui_print_help_tip(
__(
'This mode allow %s to disable all modules of this agent while the selected module is on CRITICAL status',
get_product_name()
),
true
),
'<div class="flex-row-center">'.html_print_select(
[
1 => __('Enabled'),
0 => __('Disabled'),
],
'safe_mode_change',
-1,
'',
__('No change'),
-1,
true
).'<div class="flex-row-center mrgn_lft_20px">'.__('Module').'&nbsp;&nbsp;&nbsp;'.html_print_select(
'',
'safe_mode_module',
'',
'',
__('Any'),
-1,
true
).'</div></div>'
);
$table->data[6][0] = html_print_label_input_block(
__('Ignore unknown').ui_print_help_tip(_('This disables the calculation of the unknown state in the agent and any of its modules, so it will never transition to unknown. The state it reflects is the last known status.'), true),
html_print_select(
[
'' => __('No change'),
'1' => __('Yes'),
'0' => __('No'),
],
'ignore_unknown',
'',
'',
'',
'',
true,
false,
false,
'w100p'
)
);
ui_toggle(html_print_table($table, true), __('Advanced options'));
@ -1209,16 +1252,13 @@ unset($table);
$table = new StdClass();
$table->width = '100%';
$table->class = 'databox filters';
$table->class = 'databox filters filter-table-adv';
$table->head = [];
$table->style = [];
$table->style[0] = 'font-weight: bold; width: 150px;';
$table->data = [];
$table->size[0] = '15%';
$table->size[1] = '35%';
$table->size[2] = '15%';
$table->size[3] = '35%';
$table->size[0] = '50%';
$table->size[1] = '50%';
$fields = db_get_all_fields_in_table('tagent_custom_fields');
@ -1226,6 +1266,8 @@ if ($fields === false) {
$fields = [];
}
$row = 0;
$col = 0;
foreach ($fields as $field) {
$data[0] = '<b>'.$field['name'].'</b>';
$combo = [];
@ -1270,7 +1312,7 @@ foreach ($fields as $field) {
2,
65,
$custom_value,
'class="mrgn_right_30px"',
'class=""',
true
);
}
@ -1290,7 +1332,20 @@ foreach ($fields as $field) {
);
};
array_push($table->data, $data);
$output = html_print_label_input_block(
$data[0],
$data[1]
);
// array_push($table->data, $output);
$table->data[$row][$col] = $output;
if ($col === 1) {
$col = 0;
$row++;
} else {
$col++;
}
}
if (empty($fields) === false) {

View File

@ -536,7 +536,7 @@ if ((bool) check_acl($config['id_user'], 0, 'PM') === true || (bool) check_acl($
$sub['godmode/setup/links']['id'] = 'links';
$sub['tools/diagnostics']['text'] = __('Diagnostic info');
$sub['tools/diagnostics']['id'] = 'diagnostic_info';
enterprise_hook('omnishell');
// enterprise_hook('omnishell');
$sub['godmode/setup/news']['text'] = __('Site news');
$sub['godmode/setup/news']['id'] = 'site_news';
}
@ -804,8 +804,10 @@ $("#conf_wizard").click(function() {
})
}
},
closeOnEscape: true,
onload: () => {
$(document).ready(function () {
$(".ui-dialog-titlebar-close").hide();
var buttonpane = $("div[aria-describedby='welcome_modal_window'] .ui-dialog-buttonpane.ui-widget-content.ui-helper-clearfix");
$(buttonpane).append(`
<div class="welcome-wizard-buttons">

View File

@ -319,7 +319,7 @@ $ActionButtons[] = html_print_button(
__('Go back'),
'back',
false,
"window.location.href = 'index.php?sec=reporting&sec2=godmode/reporting/graphs'",
'history.go(-1)',
[
'class' => 'sub ok submitButton',
'icon' => 'back',

View File

@ -553,6 +553,10 @@ if (!$maps && is_metaconsole() === false) {
['class' => 'main_menu_icon invert_filter']
).'</a>';
} else {
$table->cellclass[] = [
3 => 'table_action_buttons',
4 => 'table_action_buttons',
];
$data[3] = '<a class="copy_visualmap" href="index.php?sec=screen&sec2=screens/screens&action=visualmap&pure='.$pure.'&id_layout='.$map['id'].'&amp;copy_layout=1">'.html_print_image(
'images/copy.svg',
true,

View File

@ -2860,20 +2860,32 @@ if (is_metaconsole() === true) {
if (!empty($style_button_create_custom_graph)) {
$style_create = [
'mode' => 'link',
'mode' => 'mini',
'icon' => 'next',
'class' => 'mrgn_lft_10px',
'style' => 'display:none',
];
} else {
$style_create = [ 'mode' => 'link' ];
$style_create = [
'mode' => 'mini',
'icon' => 'next',
'class' => 'mrgn_lft_10px',
];
}
if (!empty($style_button_edit_custom_graph)) {
$style_edit = [
'mode' => 'link',
'mode' => 'mini',
'icon' => 'update',
'class' => 'mrgn_lft_10px',
'style' => 'display:none',
];
} else {
$style_edit = [ 'mode' => 'link' ];
$style_edit = [
'mode' => 'mini',
'icon' => 'update',
'class' => 'mrgn_lft_10px',
];
}
html_print_button(

View File

@ -157,7 +157,7 @@ if ((bool) users_is_admin() === false) {
$where = sprintf(' AND id_usuario = "%s"', $config['id_user']);
}
$sql = 'SELECT * FROM tuser_task_scheduled WHERE id_user_task IN (1,2,3,4) '.$where;
$sql = 'SELECT * FROM tuser_task_scheduled WHERE id_user_task IN (1,2,3) '.$where;
$reports = db_get_all_rows_sql($sql);
if ($reports !== false) {
$table = new stdClass();

View File

@ -145,6 +145,11 @@ $table->data['all_0'][0] = html_print_label_input_block(
$table->rowstyle['staticgraph'] = 'display: none;';
$table->colspan['staticgraph'][0] = 2;
$src = $config['homeurl'].'/images/console/icons/appliance_ok.png';
if (is_metaconsole() === true) {
$src = $config['homeurl'].'../../images/console/icons/appliance_ok.png';
}
$table->data['staticgraph'][0] = html_print_label_input_block(
__('Image'),
'<div class="flex">'.html_print_select(
@ -160,7 +165,7 @@ $table->data['staticgraph'][0] = html_print_label_input_block(
'',
false,
'width: 49%'
).'<span id="image_prev" class="mrgn_lft_10px mrgn_top-10px"><img src="'.$config['homeurl'].'/images/console/icons/appliance_ok.png"></span></div>'
).'<span id="image_prev" class="mrgn_lft_10px mrgn_top-10px"><img src="'.$src.'"></span></div>'
);
$table->rowstyle['all_1'] = 'display: none;';
@ -904,10 +909,15 @@ function findInSelect(selectid, find){
})
}
$('#image').on('change', function(){
$('#image').on('change', function() {
var img = $(this).val();
$('#image_prev').html('<img src="<?php echo $config['homeurl']; ?>/images/console/icons/'+img+'.png">');
})
var src = "<?php echo $config['homeurl']; ?>"+`/images/console/icons/${img}.png`;
if (metaconsole_enabled) {
src = "<?php echo $config['homeurl']; ?>"+`../../images/console/icons/${img}.png`;
}
$('#image_prev').html(`<img src="${src}">`);
});
$('#wizard_table span#image_prev').click(function (e) {
e.preventDefault();

View File

@ -133,14 +133,12 @@ foreach ($servers as $server) {
__('Server has crashed.'),
true
);
} else if ((int) ($server['disabled'] == 1)){
} else if ((int) ($server['disabled'] == 1)) {
$data[1] = ui_print_status_image(
STATUS_SERVER_STANDBY,
__('Server was manually disabled.'),
true
);
} else if ((int) ($server['status'] === 0)
|| (($date - $server_keepalive) > ($server['server_keepalive']) * 2)
) {

View File

@ -56,11 +56,18 @@ try {
$status_values = $ITSM->getStatus();
$object_types_values = $ITSM->getObjectypes();
if ((bool) get_parameter('update_config', 0) === true) {
$ITSM_groups_agents_sync_base = null;
if (empty($config['ITSM_groups_agents_sync']) === false) {
$ITSM_groups_agents_sync_base = base64_encode($config['ITSM_groups_agents_sync']);
}
$set_config_inventories = $ITSM->createNode(
[
'serverAuth' => $config['server_unique_identifier'],
'apiPass' => $config['api_password'],
'serverAuth' => md5($config['server_unique_identifier']),
'apiPass' => md5($config['api_password']),
'agentsForExecution' => $config['ITSM_agents_sync'],
'groups' => $ITSM_groups_agents_sync_base,
'mode' => $config['ITSM_mode_agents_sync'],
'path' => $config['ITSM_public_url'],
'label' => array_keys(servers_get_names())[0],
'nodeId' => $config['metaconsole_node_id'],
@ -69,7 +76,7 @@ try {
}
try {
$node = $ITSM->getNode($config['server_unique_identifier']);
$node = $ITSM->getNode(md5($config['server_unique_identifier']));
} catch (\Throwable $th) {
$node = [];
}
@ -123,7 +130,7 @@ $table_remote->data['ITSM_user_level_conf'] = $row;
$row = [];
$row['hostname'] = html_print_label_input_block(
__('URL to Pandora ITSM setup').ui_print_help_tip(
__('Full URL to your Pandora ITSM setup (e.g., http://192.168.1.20/integria/api/v2).'),
__('Full URL (e.g., http://192.168.1.20/XXX/api/v2).'),
true
),
html_print_input_text(
@ -180,7 +187,7 @@ $button_test .= html_print_image(
'images/status_sets/default/severity_normal.png',
true
);
$button_test .= '&nbsp;'.__('Connection its OK').'</span>';
$button_test .= '&nbsp;'.__('Connection is OK').'</span>';
$button_test .= '<span id="ITSM-failure" class="invisible">&nbsp;';
$button_test .= html_print_image(
'images/status_sets/default/severity_critical.png',
@ -190,7 +197,7 @@ $button_test .= '&nbsp;'.__('Connection failed').'</span>';
$button_test .= '&nbsp;<span id="ITSM-message" class="invisible"></span>';
$row['control'] = html_print_label_input_block(
__('Test connection pandora to ITSM'),
__('Test connection PFMS to Pandora ITSM'),
$button_test,
['div_class' => 'ITSM-remote-setup-ITSM_token']
);
@ -206,8 +213,8 @@ if (empty($itsm_public_url) === true) {
}
$row['publicUrl'] = html_print_label_input_block(
__('URL conect to API %s', get_product_name()).ui_print_help_tip(
__('Full URL to your Pandora (e.g., http://192.168.1.20).'),
__('URL connect to API %s', get_product_name()).ui_print_help_tip(
__('Full URL (e.g., http://192.168.1.20/XXX/api/v2).'),
true
),
html_print_input_text(
@ -221,7 +228,7 @@ $row['publicUrl'] = html_print_label_input_block(
);
$row['agentsSync'] = html_print_label_input_block(
__('Number Agents to synchronize').ui_print_help_tip(
__('Number of Agents to synchronize').ui_print_help_tip(
__('Number of agents that will synchronize at the same time, minimum 10 max 1000'),
true
),
@ -237,6 +244,55 @@ $row['agentsSync'] = html_print_label_input_block(
$table_remote->data['ITSM_sync_inventory'] = $row;
$row = [];
$itsm_groups_agents_sync = [];
if (empty($config['ITSM_groups_agents_sync']) === false) {
$itsm_groups_agents_sync = json_decode(
io_safe_output($config['ITSM_groups_agents_sync']),
true
);
}
$mode_values = [
1 => __('Enable'),
2 => __('Disable'),
];
$row['modeAgentsSync'] = html_print_label_input_block(
__('Synchronize agents mode'),
html_print_select(
$mode_values,
'ITSM_mode_agents_sync',
$config['ITSM_mode_agents_sync'],
'',
__('All'),
0,
true,
false,
true,
'',
false
)
);
$row['groupsAgentsSync'] = html_print_label_input_block(
__('Agent groups to synchronize'),
html_print_select_groups(
false,
'AW',
false,
'ITSM_groups_agents_sync[]',
$itsm_groups_agents_sync,
'',
'',
'',
true,
true
)
);
$table_remote->data['ITSM_sync_inventory_filters'] = $row;
// Test.
$row = [];
$button_test_pandora = html_print_button(
@ -261,7 +317,7 @@ $button_test_pandora .= html_print_image(
'images/status_sets/default/severity_normal.png',
true
);
$button_test_pandora .= '&nbsp;'.__('Connection its OK').'</span>';
$button_test_pandora .= '&nbsp;'.__('Connection is OK').'</span>';
$button_test_pandora .= '<span id="ITSM-failure-pandora" class="invisible">&nbsp;';
$button_test_pandora .= html_print_image(
'images/status_sets/default/severity_critical.png',
@ -300,7 +356,7 @@ if (empty($node) === false) {
// $progressbar .= (empty($node['dateStart']) === false) ? human_time_comparation($node['dateStart']) : __('Never');
$row['control-test-pandora'] = html_print_label_input_block(
__('Progress agents to synch'),
__('Progress on agents to be synchronized'),
$progressbar
);
}

View File

@ -569,7 +569,7 @@ $table->data[$i][] = html_print_label_input_block(
)
);
$table->data[$i++][] = html_print_label_input_block(
__('Referer security').ui_print_help_tip(__('When it is active, the source of the requests is checked. If the user comes from a URL external to Pandora FMS, the source of the activity will be considered suspicious.'), true),
__('Referrer security').ui_print_help_tip(__('When it is active, the source of the requests is checked. If the user comes from a URL external to Pandora FMS, the source of the activity will be considered suspicious.'), true),
html_print_checkbox_switch(
'referer_security',
1,

View File

@ -42,7 +42,7 @@ $table->border = 0;
$table->data = [];
$table->data[0][] = html_print_label_input_block(
__('Data storage path'),
__('Data storage path').ui_print_help_tip(__('The Netflow data will be saved in the directory specified here, which will be located in the path defined by the "General Network path" parameter (this parameter is found in the General Settings).'), true),
html_print_input_text('netflow_name_dir', $config['netflow_name_dir'], false, 50, 200, true)
);

View File

@ -40,6 +40,19 @@ if (! check_acl($config['id_user'], 0, 'PM') && ! is_user_admin($config['id_user
return;
}
if (is_ajax()) {
$stopShowingModal = get_parameter('stopShowingModal', 0);
if ($stopShowingModal === '1') {
db_process_sql_update(
'tusuario',
['stop_lts_modal' => '1'],
['id_user' => $config['id_user']],
);
}
return;
}
require_once $config['homedir'].'/vendor/autoload.php';
$php_version = phpversion();
@ -83,7 +96,10 @@ if ($php_version_array[0] < 7) {
</div>
</div>
</div>
<?php
$stop_lts_modal = db_get_value('stop_lts_modal', 'tusuario', 'id_user', $config['id_user']);
if ($stop_lts_modal === '0') {
?>
<script type="text/javascript">
$(document).ready(function() {
// Lts Updates.
@ -100,12 +116,36 @@ if ($php_version_array[0] < 7) {
buttons: [{
text: "OK",
click: function() {
var no_show_more = $('#checkbox-no_show_more').is(':checked');
if (no_show_more === true){
$.ajax({
url: 'ajax.php',
data: {
page: 'godmode/update_manager/modal_lts_update',
stopShowingModal: 1,
},
type: 'POST',
async: false,
dataType: 'json'
});
}
$(this).dialog("close");
}
}],
open: function(event, ui) {
$(".ui-dialog-titlebar-close").hide();
$("div.ui-dialog-buttonset").addClass('flex-rr-sb-important');
$("div.ui-dialog-buttonset").append(`
<div class="welcome-wizard-buttons">
<label class="flex-row-center">
<input type="checkbox" id="checkbox-no_show_more" class="welcome-wizard-do-not-show"/>
<?php echo __('Do not show anymore'); ?>
</label>
</div>
`);
}
});
});
</script>
</script>
<?php
}

View File

@ -242,6 +242,14 @@ if (!$action_update_url_update_manager) {
$result = config_update_value('identification_reminder', $identification_reminder);
}
if ($result && $lts_updates === 1) {
db_process_sql_update(
'tusuario',
['stop_lts_modal' => '0'],
['id_user' => $config['id_user']],
);
}
ui_print_result_message(
$result,
__('Succesful Update the url config vars.'),

View File

@ -789,7 +789,6 @@ if ($action === 'create_demo_data') {
}
// Get last trap in database.
/*
$id_trap_begin = db_get_value(
'MAX(id_trap)',
@ -1068,37 +1067,37 @@ if ($action === 'cleanup_demo_data') {
$demo_items = db_get_all_rows_in_table('tdemo_data');
$module_items = array_filter(
$demo_items,
$module_items = array_map(
function ($item) {
return ($item['table_name'] === 'tagente_modulo');
}
$json_data = json_decode($item['item_id'], true);
return $json_data['id_agente_modulo'];
},
array_filter(
$demo_items,
function ($item) {
return ($item['table_name'] === 'tagente_modulo');
}
)
);
$inventory_module_items = array_filter(
$demo_items,
$inventory_module_items = array_map(
function ($item) {
return ($item['table_name'] === 'tagent_module_inventory');
}
$json_data = json_decode($item['item_id'], true);
return $json_data['id_agent_module_inventory'];
},
array_filter(
$demo_items,
function ($item) {
return ($item['table_name'] === 'tagent_module_inventory');
}
)
);
$items_delete_id_bfr = [];
foreach ($inventory_module_items as $item) {
$items_delete_id_bfr[] = $item['item_id'];
}
$in_clause = implode(',', $items_delete_id_bfr);
$in_clause = implode(',', $inventory_module_items);
// Delete data from tagente_datos_inventory given inventory module id.
db_process_sql('DELETE FROM tagente_datos_inventory where id_agent_module_inventory IN ('.$in_clause.')');
$items_delete_id_bfr = [];
foreach ($module_items as $item) {
$items_delete_id_bfr[] = $item['item_id'];
}
$in_clause = implode(',', $items_delete_id_bfr);
$in_clause = implode(',', $module_items);
// Delete data from tagente_datos give agent module id.
db_process_sql('DELETE FROM tagente_datos where id_agente_modulo IN ('.$in_clause.')');

View File

@ -1196,7 +1196,7 @@ if (check_login()) {
$data[2] .= ui_print_truncate_text($module['nombre'], 'module_medium', false, true, true, '&hellip;', 'font-size: 9pt;');
$data[2] .= '</a>';
if (empty($module['extended_info']) === false) {
$data[2] .= ui_print_help_tip($module['extended_info'], true, '/images/default_list.png');
$data[2] .= ui_print_help_tip(io_safe_output($module['extended_info']), true, '/images/default_list.png');
}
// Adds tag context information.

View File

@ -48,16 +48,17 @@ if ($check_web) {
if ($status_webserver === '1') {
$name = array_keys(servers_get_names())[0];
$id_group = get_parameter('id_group', 4);
$agent_name = get_parameter('module_name', 'Web monitoring');
$array_other['data'] = [
'Web monitoring',
$agent_name,
'',
2,
$id_group,
0,
30,
30,
9,
11,
$name,
0,
0,

View File

@ -1358,9 +1358,12 @@ class AgentWizard extends HTML
$table->rowstyle[$i] = 'color:#ccc;';
$data[0] .= ' ';
$data[0] .= html_print_image(
'images/alert-warning@svg.svg',
'images/info-warning.svg',
true,
['title' => $msgError]
[
'title' => $msgError,
'class' => 'main_menu_icon',
]
);
}

View File

@ -262,20 +262,24 @@ class AgentsAlerts extends HTML
$data[0] = io_safe_output($agent_module['alias']);
$data[1] = io_safe_output($agent_module['nombre']);
$uniqid = $agent_module['id_agente_modulo'];
$data[2] = html_print_anchor(
[
'href' => sprintf(
'javascript:show_add_alerts(\'%s\')',
$uniqid
),
'content' => html_print_image(
'images/add_mc.png',
true,
['class' => 'main_menu_icon invert_filter']
),
],
true
);
if (check_acl($this->idUser, 0, 'LM')) {
$data[2] = html_print_anchor(
[
'href' => sprintf(
'javascript:show_add_alerts(\'%s\')',
$uniqid
),
'content' => html_print_image(
'images/add_mc.png',
true,
['class' => 'main_menu_icon invert_filter']
),
],
true
);
} else {
$data[2] = '';
}
array_push($table->data, $data);

View File

@ -3015,7 +3015,7 @@ class ConsoleSupervisor
public function checkHaStatus()
{
global $config;
enterprise_include_once('include/class/DatabaseHA.class.php');
enterprise_include_once('include/class/NewDatabaseHA.class.php');
$cluster = new DatabaseHA();
$nodes = $cluster->getNodes();
@ -3038,7 +3038,7 @@ class ConsoleSupervisor
'type' => 'NOTIF.HAMASTER.MESSAGE',
'title' => __('Desynchronized operation on the node '.$node['host']),
'message' => __($message),
'url' => '__url__/index.php?sec=gservers&sec2=enterprise/godmode/servers/HA_cluster',
'url' => '__url__/index.php?sec=gservers&sec2=enterprise/godmode/servers/new_HA_cluster',
'icon_notification' => self::ICON_ERROR,
]
);

View File

@ -280,6 +280,13 @@ class Prd
*/
private $itemsReferences;
/**
* Current prdData.
*
* @var array
*/
private $currentPrdData;
/**
* Constructor.
@ -2282,12 +2289,37 @@ class Prd
$value = implode($csv_separator, $ref_arr);
} else {
$columns_ref = $this->getOneColumnRefs($ref['table']);
$value = $this->searchValue(
$ref['columns'],
$ref['table'],
$ref['id'],
$value
);
// Get reference in value
if ($columns_ref !== false) {
foreach ($columns_ref as $col => $col_ref) {
if (array_key_exists($col, $value[$ref['table']])) {
$sql = sprintf(
'SELECT * FROM %s WHERE %s = "%s"',
$ref['table'],
$col,
$value[$ref['table']][$col],
);
$row = db_get_row_sql($sql);
$this->getReferenceFromValue(
$ref['table'],
$col,
$col_ref,
$row,
$value[$ref['table']][$col]
);
}
}
}
}
}
@ -2413,12 +2445,37 @@ class Prd
$value = implode($csv_separator, $ref_arr);
} else {
$columns_ref = $this->getOneColumnRefs($ref['table']);
$value = $this->searchValue(
$ref['columns'],
$ref['table'],
$ref['id'],
$value
);
// Get reference in value
if ($columns_ref !== false) {
foreach ($columns_ref as $col => $col_ref) {
if (array_key_exists($col, $value[$ref['table']])) {
$sql = sprintf(
'SELECT * FROM %s WHERE %s = "%s"',
$ref['table'],
$col,
$value[$ref['table']][$col],
);
$row = db_get_row_sql($sql);
$this->getReferenceFromValue(
$ref['table'],
$col,
$col_ref,
$row,
$value[$ref['table']][$col]
);
}
}
}
}
}
}
@ -2435,7 +2492,7 @@ class Prd
*
* @return boolean
*/
private function getValueFromReference($table, $column, $reference, &$value)
private function getValueFromReference($table, $column, $reference, $item, &$value)
{
if (isset($reference['conditional_refs']) === true) {
// Conditional refs.
@ -2445,8 +2502,8 @@ class Prd
if (isset($condition['when']) === true
&& isset($condition['ref']) === true
) {
if (isset($this->currentItem['parsed'][array_key_first($condition['when'])]) === true) {
$compare_value = $this->currentItem['parsed'][array_key_first($condition['when'])];
if (isset($item[array_key_first($condition['when'])]) === true) {
$compare_value = $item[array_key_first($condition['when'])];
if ($this->evalConditionalRef($compare_value, $condition['when']) === true
&& empty($value) === false
@ -2656,6 +2713,7 @@ class Prd
$result = '';
$prd_data = $this->getOnePrdData($type);
$this->currentPrdData = $prd_data;
if (empty($prd_data) === false) {
$result .= '[prd_data]'.LINE_BREAK.LINE_BREAK;
$result .= 'type="'.$type.'"'.LINE_BREAK;
@ -2903,6 +2961,7 @@ class Prd
unset($data_file['prd_data']);
$prd_data = $this->getOnePrdData($type);
$this->currentPrdData = $prd_data;
if ($prd_data !== false) {
// Begin transaction.
$db = $config['dbconnection'];
@ -2941,6 +3000,7 @@ class Prd
$table,
$column,
$column_refs[$column],
$this->currentItem['parsed'],
$value
);
@ -2968,6 +3028,7 @@ class Prd
$table,
$column,
$json_refs[$column][$json_key],
$this->currentItem['parsed'],
$json_value
) === true
) {
@ -3064,8 +3125,42 @@ class Prd
&& empty($array_value[$ref['table']]) === false
) {
$where = '';
$columns_ref = $this->getOneColumnRefs($ref['table']);
foreach ($ref['columns'] as $column_name) {
if (isset($array_value[$ref['table']][$column_name])) {
// Get value from crossed reference in current value
if (isset($this->crossed_refs[$ref['table']]) === true
&& empty($this->crossed_refs[$ref['table']]['ref']) === false
&& in_array($column_name, $this->crossed_refs[$ref['table']]['ref'])
) {
$parent_table = $this->crossed_refs[$ref['table']]['parent_table'];
foreach ($this->crossed_refs[$ref['table']]['ref'] as $k => $f) {
$itemReference = $this->getItemReference(
$parent_table,
$this->crossed_refs[$parent_table]['value'][$k],
$array_value[$ref['table']][$f]
);
if ($itemReference !== false) {
$array_value[$ref['table']][$column_name] = $itemReference;
}
}
}
if ($columns_ref !== false) {
if (array_key_exists($column_name, $columns_ref)) {
$temp_value = $array_value[$ref['table']][$column_name];
$temp_value = (is_array($temp_value) ? json_encode($temp_value) : $temp_value);
// Get value from reference in current value
$ref_value = $this->getValueFromReference($ref['table'], $column_name, $columns_ref[$column_name], $array_value[$ref['table']], $temp_value);
if ($ref_value === true) {
$array_value[$ref['table']][$column_name] = $temp_value;
}
}
}
$where .= sprintf(
"%s = '%s' AND ",
$column_name,

View File

@ -134,7 +134,7 @@ class WebServerModuleDebug extends Wizard
public function showWebServerDebug()
{
// Show QueryResult editor.
ui_query_result_editor('webserverdebug');
ui_query_result_editor('webserverdebug', false);
// Spinner for wait loads.
html_print_div(
[

View File

@ -182,8 +182,10 @@ class WelcomeWindow extends Wizard
})
}
},
closeOnEscape: true,
onload: () => {
$(document).ready(function () {
$(".ui-dialog-titlebar-close").hide();
var buttonpane = $("div[aria-describedby='welcome_modal_window'] .ui-dialog-buttonpane.ui-widget-content.ui-helper-clearfix");
$(buttonpane).append(`
<div class="welcome-wizard-buttons">
@ -470,7 +472,7 @@ class WelcomeWindow extends Wizard
],
[
'arguments' => [
'label' => __('Cancel'),
'label' => __('Change'),
'type' => 'button',
'attributes' => [
'class' => (empty($btn_update_manager_class) === false) ? $btn_update_manager_class : 'invisible_important',
@ -498,7 +500,7 @@ class WelcomeWindow extends Wizard
],
[
'arguments' => [
'label' => __('Cancel'),
'label' => __('Change'),
'type' => 'button',
'attributes' => [
'class' => (empty($btn_configure_mail_class) === false) ? $btn_configure_mail_class : 'invisible_important',
@ -526,7 +528,7 @@ class WelcomeWindow extends Wizard
],
[
'arguments' => [
'label' => __('Cancel'),
'label' => __('Change'),
'type' => 'button',
'attributes' => [
'class' => (empty($btn_servers_up_class) === false) ? $btn_servers_up_class : 'invisible_important',
@ -554,7 +556,7 @@ class WelcomeWindow extends Wizard
],
[
'arguments' => [
'label' => __('Cancel'),
'label' => __('Change'),
'type' => 'button',
'attributes' => [
'class' => (empty($btn_license_valid_class) === false) ? $btn_license_valid_class : 'invisible_important',

View File

@ -22,7 +22,7 @@ use DI\ContainerBuilder;
/*
* Pandora build version and version
*/
$build_version = 'PC240326';
$build_version = 'PC240402';
$pandora_version = 'v7.0NG.776';
// Do not overwrite default timezone set if defined.

View File

@ -1006,13 +1006,14 @@ function get_parameter($name, $default='')
function get_parameter_date($name, $default='', $date_format='Y/m/d')
{
// TODO: Configure default value.
$date_end = get_parameter('date_end', 0);
$time_end = get_parameter('time_end');
$datetime_end = strtotime($date_end.' '.$time_end);
$custom_date = get_parameter('custom_date', 0);
$range = get_parameter('range', SECONDS_1DAY);
$date_text = get_parameter('range_text', SECONDS_1DAY);
$range = get_parameter($name, SECONDS_1DAY);
$date_text = get_parameter($name.'_text', SECONDS_1DAY);
$date_init_less = (strtotime(date('Y/m/d')) - SECONDS_1DAY);
$date_init = get_parameter('date_init', date(DATE_FORMAT, $date_init_less));
$time_init = get_parameter('time_init', date(TIME_FORMAT, $date_init_less));
@ -1026,7 +1027,7 @@ function get_parameter_date($name, $default='', $date_format='Y/m/d')
$date_end = date('Y/m/d H:i:s', $datetime_end);
$period = ($datetime_end - $datetime_init);
} else if ($custom_date === '2') {
$date_units = get_parameter('range_units');
$date_units = get_parameter($name.'_units');
$date_end = date('Y/m/d H:i:s');
$date_init = date('Y/m/d H:i:s', (strtotime($date_end) - ((int) $date_text * (int) $date_units)));
$period = (strtotime($date_end) - strtotime($date_init));
@ -2427,11 +2428,6 @@ function check_login($output=true)
return false;
}
db_pandora_audit(
AUDIT_LOG_HACK_ATTEMPT,
'Trying to access without a valid session',
'N/A'
);
include $config['homedir'].'/general/noaccess.php';
exit;
}

View File

@ -2311,27 +2311,36 @@ function agents_get_agent_with_ip($ip_address)
/**
* Get all IP addresses of an agent
*
* @param int Agent id
* @param int Agent id
* @param bool Order by id
*
* @return array Array with the IP address of the given agent or an empty array.
*/
function agents_get_addresses($id_agent)
{
function agents_get_addresses(
$id_agent,
$order_by_id=false
) {
$order_clause = ($order_by_id === true) ? 'ORDER BY taddress.id_a DESC' : '';
if (is_array($id_agent)) {
$sql = sprintf(
'SELECT ip
FROM taddress_agent, taddress
WHERE taddress_agent.id_a = taddress.id_a
AND id_agent IN (%s)',
implode(',', $id_agent)
AND id_agent IN (%s)
%s',
implode(',', $id_agent),
$order_clause
);
} else {
$sql = sprintf(
'SELECT ip
FROM taddress_agent, taddress
WHERE taddress_agent.id_a = taddress.id_a
AND id_agent = %d',
$id_agent
AND id_agent = %d
%s',
$id_agent,
$order_clause
);
}

View File

@ -505,10 +505,6 @@ function config_update_config()
$error_update[] = __('Enable Update Manager');
}
if (config_update_value('legacy_database_ha', get_parameter('legacy_database_ha'), true) === false) {
$error_update[] = __('Legacy database HA');
}
if (config_update_value('agent_vulnerabilities', get_parameter('agent_vulnerabilities'), true) === false) {
$error_update[] = __('agent_vulnerabilities');
}
@ -1976,6 +1972,27 @@ function config_update_config()
$error_update[] = __('Pandora ITSM API agents sync');
}
$ITSM_mode_agents_sync = (int) get_parameter(
'ITSM_mode_agents_sync',
$config['ITSM_mode_agents_sync']
);
if (config_update_value('ITSM_mode_agents_sync', $ITSM_mode_agents_sync, true) === false) {
$error_update[] = __('Pandora ITSM mode agents to synch');
}
$ITSM_groups_agents_sync = get_parameter(
'ITSM_groups_agents_sync',
null
);
if (empty($ITSM_groups_agents_sync) === false) {
$ITSM_groups_agents_sync = json_encode($ITSM_groups_agents_sync);
}
if (config_update_value('ITSM_groups_agents_sync', $ITSM_groups_agents_sync, true) === false) {
$error_update[] = __('Pandora ITSM groups agents to synch');
}
$incident_default_group = (int) get_parameter('default_group', $config['default_group']);
if (empty($incident_default_group) === true) {
try {
@ -2430,10 +2447,6 @@ function config_process_config()
config_update_value('enable_update_manager', 1);
}
if (!isset($config['legacy_database_ha'])) {
config_update_value('legacy_database_ha', 0);
}
if (!isset($config['disabled_newsletter'])) {
config_update_value('disabled_newsletter', 0);
}
@ -3927,6 +3940,14 @@ function config_process_config()
config_update_value('ITSM_agents_sync', 20);
}
if (!isset($config['ITSM_mode_agents_sync'])) {
config_update_value('ITSM_mode_agents_sync', 0);
}
if (!isset($config['ITSM_groups_agents_sync'])) {
config_update_value('ITSM_groups_agents_sync', null);
}
// Module Library.
if (!isset($config['module_library_user'])) {
config_update_value('module_library_user', '');

View File

@ -1946,9 +1946,9 @@ function events_get_all(
case 'utimestamp':
case 'criticity':
case 'estado':
if ($a[$sort_field] === $b[$sort_field]) {
if ((isset($a[$sort_field]) === true && isset($b[$sort_field]) === true) && $a[$sort_field] === $b[$sort_field]) {
$res = 0;
} else if ($a[$sort_field] > $b[$sort_field]) {
} else if ((isset($a[$sort_field]) === true && isset($b[$sort_field]) === true) && $a[$sort_field] > $b[$sort_field]) {
$res = ($order === 'asc') ? 1 : (-1);
} else {
$res = ($order === 'asc') ? (-1) : 1;
@ -6539,3 +6539,165 @@ function event_print_graph(
return $graph;
}
/**
* Get comments of array events.
*
* @param array $events Array of events.
* @param array $filter Filter of view events.
*
* @return array
*/
function reduce_events_comments($events, $filter=null)
{
$group_by_server = [];
foreach ($events as $key => $event) {
if (isset($group_by_server[$event['server_id']]) === false) {
$group_by_server[$event['server_id']] = [];
}
$group_by_server[$event['server_id']][] = $event;
}
$comments = [];
foreach ($group_by_server as $server_id => $events) {
$events_comments = event_get_comments_with_all_events($events, $filter, $server_id);
foreach ($events_comments as $key => $comment) {
$comments[$server_id.'_'.$comment['id_event']] = $comment;
}
}
return $comments;
}
/**
* Ge all coments of events grouped by server.
*
* @param array $events Array of events.
* @param array $filter Filter of view events.
* @param integer $server_id Id of server.
*
* @return array
*/
function event_get_comments_with_all_events($events, $filter=null, $server_id=0)
{
$whereGrouped = [];
if (empty($filter) === false) {
if (isset($filter['event_view_hr_cs']) === true && ($filter['event_view_hr_cs'] > 0)) {
$whereGrouped[] = sprintf(
' AND tevent_comment.utimestamp > UNIX_TIMESTAMP(now() - INTERVAL %d SECOND) ',
$filter['event_view_hr_cs']
);
} else if (isset($filter['event_view_hr']) === true && ($filter['event_view_hr'] > 0)) {
$whereGrouped[] = sprintf(
' AND tevent_comment.utimestamp > UNIX_TIMESTAMP(now() - INTERVAL %d SECOND) ',
((int) $filter['event_view_hr'] * 3600)
);
}
}
$mode = (int) ($filter['group_rep'] ?? 0);
$eventsGrouped = [];
$idEvents = [];
$idExtras = [];
$idAgentsModules = [];
$idAgentes = [];
$eventos = [];
foreach ($events as $key => $event) {
// Consider if the event is grouped.
if ($mode === EVENT_GROUP_REP_EVENTS) {
// Default grouped message filtering (evento and estado).
$eventos[] = io_safe_input(io_safe_output($event['evento']));
// If id_agente is reported, filter the messages by them as well.
if ((int) $event['id_agente'] > 0) {
$idAgentes[] = (int) $event['id_agente'];
}
if ((int) $event['id_agentmodule'] > 0) {
$idAgentsModules[] = (int) $event['id_agentmodule'];
}
} else if ($mode === EVENT_GROUP_REP_EXTRAIDS) {
$idExtras[] = io_safe_input(io_safe_output($event['id_extra']));
} else {
$idEvents[] = $event['id_evento'];
}
}
if ($mode === EVENT_GROUP_REP_EVENTS) {
// Default grouped message filtering (evento and estado).
$whereGrouped[] = sprintf(
'AND `tevento`.`evento` IN ("%s")',
implode('","', $eventos)
);
// If id_agente is reported, filter the messages by them as well.
if ((int) $event['id_agente'] > 0) {
$whereGrouped[] = sprintf(
' AND `tevento`.`id_agente` IN (%s)',
implode(',', $idAgentes)
);
}
if ((int) $event['id_agentmodule'] > 0) {
$whereGrouped[] = sprintf(
' AND `tevento`.`id_agentmodule` IN (%s)',
implode(',', $idAgentsModules)
);
}
} else if ($mode === EVENT_GROUP_REP_EXTRAIDS) {
$whereGrouped[] = sprintf(
'AND `tevento`.`id_extra` IN ("%s")',
implode('","', $idExtras),
);
} else {
$whereGrouped[] = sprintf('AND `tevento`.`id_evento` IN (%s)', implode(',', $idEvents));
}
try {
if (is_metaconsole() === true
&& $server_id > 0
) {
$node = new Node($server_id);
$node->connect();
}
$sql = sprintf(
'SELECT tevent_comment.*
FROM tevento
INNER JOIN tevent_comment
ON tevento.id_evento = tevent_comment.id_event
JOIN(
SELECT id_event, max(utimestamp) as utimestamp
FROM tevent_comment a
GROUP BY a.id_event
) max_ut ON max_ut.id_event = tevent_comment.id_event AND max_ut.utimestamp = tevent_comment.utimestamp
WHERE 1=1 %s
ORDER BY tevent_comment.utimestamp DESC',
implode(' ', $whereGrouped)
);
// Get grouped comments.
$eventsGrouped = db_get_all_rows_sql($sql);
} catch (\Exception $e) {
// Unexistent agent.
if (is_metaconsole() === true
&& $server_id > 0
) {
$node->disconnect();
}
$eventsGrouped = [];
} finally {
if (is_metaconsole() === true
&& $server_id > 0
) {
$node->disconnect();
}
}
return $eventsGrouped;
}

View File

@ -805,7 +805,7 @@ function filemanager_file_explorer(
// Actions buttons
// Delete button.
$data[4] = '<div class="table_action_buttons flex">';
$data[4] = '<div class="table_action_buttons flex flex-end">';
$typefile = array_pop(explode('.', $fileinfo['name']));
if (is_writable($fileinfo['realpath']) === true
&& (is_dir($fileinfo['realpath']) === false || count(scandir($fileinfo['realpath'])) < 3)
@ -1069,7 +1069,7 @@ function filemanager_file_explorer(
);
// Show Modal Real Path
$modal_real_path = "<div><b>Real path to plugin execution is:</b></div>
$modal_real_path = "<div><b>Real path is:</b></div>
<div id='real_path'></div>";
if (isset($_SERVER['HTTPS']) === true) {

View File

@ -3398,8 +3398,10 @@ function graph_custom_sql_graph(
if ($count <= $max_num_elements) {
$label = __('Data');
$full_label = __('Data');
if (empty($data_item['label']) === false) {
$label = io_safe_output($data_item['label']);
$full_label = io_safe_output($data_item['label']);
if (strlen($label) > $SQL_GRAPH_MAX_LABEL_SIZE) {
$first_label = $label;
$label = substr(
@ -3413,13 +3415,15 @@ function graph_custom_sql_graph(
$labels_bar[] = $label;
if ($type === 'sql_graph_hbar') {
$data_bar[] = [
'y' => $label,
'x' => $value,
'full_title' => $full_label,
'y' => $label,
'x' => $value,
];
} else {
$data_bar[] = [
'x' => $label,
'y' => $value,
'full_title' => $full_label,
'x' => $label,
'y' => $value,
];
}
@ -3493,6 +3497,9 @@ function graph_custom_sql_graph(
'grid' => ['display' => false],
],
],
'tooltip' => [
'title' => ['fullTitle' => true],
],
'labels' => $labels_bar,
];

View File

@ -1010,6 +1010,10 @@ function html_print_select(
ui_require_javascript_file('select2.min');
}
if ($placeholder === '' && $select2_multiple_enable === true) {
$placeholder = __('Select one or more elements');
}
$output .= '<script type="text/javascript">';
$output .= '$("#'.$id.'").select2({
closeOnSelect: '.(($select2_multiple_enable === true) ? 'false' : 'true').',

View File

@ -108,38 +108,46 @@ function get_table_inputs_masive_agents($params)
$table = new stdClass;
$table->id = 'delete_table';
$table->class = 'databox filters';
$table->class = 'databox filters filter-table-adv';
$table->width = '100%';
$table->data = [];
$table->style = [];
$table->style[0] = 'font-weight: bold;';
$table->style[2] = 'font-weight: bold';
$table->size = [];
$table->size[0] = '15%';
$table->size[1] = '35%';
$table->size[2] = '15%';
$table->size[3] = '35%';
$table->size[0] = '50%';
$table->size[1] = '50%';
$table->data = [];
$table->data[0][0] = __('Group');
$table->data[0][1] = html_print_select_groups(
false,
'AW',
true,
'id_group',
$params['id_group'],
false,
'',
'',
true
$table->data[0][0] = html_print_label_input_block(
__('Group'),
html_print_select_groups(
false,
'AW',
true,
'id_group',
$params['id_group'],
false,
'',
'',
true,
false,
false,
'',
false,
'width:100%; max-width: 420px;'
)
);
$table->data[0][2] = __('Group recursion');
$table->data[0][3] = html_print_checkbox(
'recursion',
1,
$params['recursion'],
true,
false
$table->data[0][1] = html_print_label_input_block(
__('Group recursion'),
html_print_checkbox(
'recursion',
1,
$params['recursion'],
true,
false
)
);
$status_list = [];
@ -149,34 +157,43 @@ function get_table_inputs_masive_agents($params)
$status_list[AGENT_STATUS_UNKNOWN] = __('Unknown');
$status_list[AGENT_STATUS_NOT_NORMAL] = __('Not normal');
$status_list[AGENT_STATUS_NOT_INIT] = __('Not init');
$table->data[1][0] = __('Status');
$table->data[1][1] = html_print_select(
$status_list,
'status_agents',
'selected',
'',
__('All'),
AGENT_STATUS_ALL,
true
$table->data[1][0] = html_print_label_input_block(
__('Status'),
html_print_select(
$status_list,
'status_agents',
'selected',
'',
__('All'),
AGENT_STATUS_ALL,
true,
false,
true,
'',
false,
'width:100%; max-width: 420px;'
)
);
$table->data[1][2] = __('Show agents');
$table->data[1][3] = html_print_select(
[
0 => 'Only enabled',
1 => 'Only disabled',
],
'disabled',
2,
'',
__('All'),
2,
true,
false,
true,
'',
false,
'width:30%;'
$table->data[1][1] = html_print_label_input_block(
__('Show agents'),
html_print_select(
[
0 => 'Only enabled',
1 => 'Only disabled',
],
'disabled',
2,
'',
__('All'),
2,
true,
false,
true,
'',
false,
'width:100%; max-width: 420px;'
)
);
if (is_metaconsole() === true) {
@ -186,10 +203,91 @@ function get_table_inputs_masive_agents($params)
$server_fields[$key] = $server['server_name'];
}
$table->data[2][2] = __('Node');
$table->data[2][3] = html_print_select(
$server_fields,
'nodes[]',
$table->data[2][0] = html_print_label_input_block(
__('Node'),
html_print_select(
$server_fields,
'nodes[]',
0,
false,
'',
'',
true,
true,
true,
'',
false,
'width:100%; max-width: 420px; max-height: 100px',
false,
false,
false,
'',
false,
false,
false,
false,
true,
true,
true
)
);
}
$os_list = os_get_os(true);
$table->data[3][0] = html_print_label_input_block(
__('OS'),
html_print_select(
$os_list,
'os_agent',
'selected',
'',
__('All'),
'',
true,
false,
true,
'',
false,
'width:100%; max-width: 420px;'
)
);
$table->data[3][1] = html_print_label_input_block(
__('OS Version'),
html_print_input_text(
'os_agent_version',
'',
__('Select OS version'),
35,
255,
true,
false,
false,
'',
'w100p'
)
);
$label_agents = __('Agents');
$label_agents .= '<span id="agent_loading" class="invisible">';
$label_agents .= html_print_image('images/spinner.png', true);
$label_agents .= '</span>';
$agents = [];
if (is_metaconsole() === false) {
$agents = agents_get_group_agents(
array_keys(users_get_groups($config['id_user'], 'AW', false)),
['disabled' => 2],
'none'
);
}
$table->data[4][0] = html_print_label_input_block(
$label_agents,
html_print_select(
$agents,
'id_agents[]',
0,
false,
'',
@ -199,7 +297,7 @@ function get_table_inputs_masive_agents($params)
true,
'',
false,
'min-width: 500px; max-width: 500px; max-height: 100px',
'width: 100%; max-height: 100px',
false,
false,
false,
@ -211,70 +309,7 @@ function get_table_inputs_masive_agents($params)
true,
true,
true
);
}
$os_list = os_get_os(true);
$table->data[3][0] = __('OS');
$table->data[3][1] = html_print_select(
$os_list,
'os_agent',
'selected',
'',
__('All'),
'',
true
);
$table->data[3][2] = __('OS Version');
$table->data[3][3] = html_print_input_text(
'os_agent_version',
'',
__('Select OS version'),
35,
255,
true
);
$table->data[4][0] = __('Agents');
$table->data[4][0] .= '<span id="agent_loading" class="invisible">';
$table->data[4][0] .= html_print_image('images/spinner.png', true);
$table->data[4][0] .= '</span>';
$agents = [];
if (is_metaconsole() === false) {
$agents = agents_get_group_agents(
array_keys(users_get_groups($config['id_user'], 'AW', false)),
['disabled' => 2],
'none'
);
}
$table->data[4][1] = html_print_select(
$agents,
'id_agents[]',
0,
false,
'',
'',
true,
true,
true,
'',
false,
'min-width: 500px; max-width: 500px; max-height: 100px',
false,
false,
false,
'',
false,
false,
false,
false,
true,
true,
true
)
);
$output = html_print_table($table, true);

View File

@ -484,10 +484,13 @@ function modules_delete_agent_module($id_agent_module)
db_process_sql_delete('tgraph_source', $where);
db_process_sql_delete('treport_content', $where);
db_process_sql_delete(
// Disabled delete events when module is deleted.
/*
db_process_sql_delete(
'tevento',
['id_agentmodule' => $id_agent_module]
);
);
*/
$where = ['id_agente_modulo' => $id_agent_module];
db_process_sql_delete('tlayout_data', $where);
db_process_sql_delete('tagente_estado', $where);

View File

@ -1066,39 +1066,39 @@ function notification_filter()
}
$types_list = array_unique($types_list);
$notification_filter = "<ul id='menu-filter_notification'>";
$notification_filter = '';
$filter_options = [];
$notification_filter .= "<li>
<input type='checkbox' name='filter_menu' id='filter_menu'>
<label for='filter_menu' id='filter_menu_label'>".__('Filter').'</label>';
$notification_filter .= "<ul class='sublevel-filter_notification'>";
foreach ($types_list as $type) {
if ($type === 'All') {
$checked = 'checked';
$checked = 'All';
} else {
$checked = '';
}
switch ($type) {
case 'All':
$type_name = __('Show all');
break;
case 'HISTORYDB':
$type_name = 'HISTORY DB';
$type_name = __('History DB');
break;
case 'PANDORADB':
$type_name = 'PANDORA DB';
$type_name = __('Pandora DB');
break;
case 'UPDATEMANAGER':
$type_name = 'WARP UPDATE';
$type_name = __('Warp update');
break;
case 'ALLOWOVERRIDE':
$type_name = 'ALLOW OVERRIDE';
$type_name = __('Allow override');
break;
case 'DISCOVERYTASK':
$type_name = 'DISCOVERY TASK';
$type_name = __('Discovery task');
break;
default:
@ -1106,29 +1106,31 @@ function notification_filter()
break;
}
$notification_filter .= "<li><div class='item-filter'>
<input type='checkbox'
class='checkbox_filter_notifications'
value=".$type."
name='filter_".$type."'
".$checked."
id='filter_".$type."'>
<label for='filter_".$type."'>".$type_name.'</label>
</div>
</li>';
$filter_options[$type] = $type_name;
}
$notification_filter .= "<li><div class='item-filter'>";
$filter_select = html_print_select(
$filter_options,
'notifications_filter_options',
$checked,
'',
'',
0,
true,
false,
false,
'w150px'
);
$notification_filter .= html_print_div(
[
'class' => 'action-buttons w100p',
'content' => html_print_submit_button(
__('Filter'),
'content' => $filter_select.html_print_submit_button(
__('Apply filter'),
'btn_submit',
false,
[
'class' => 'mini sub filter',
'icon' => 'search mini',
'class' => 'link font_14px link-bold text-nowrap',
'onClick' => 'filter_notification()',
],
true
@ -1137,14 +1139,6 @@ function notification_filter()
true
);
$notification_filter .= '</div>
</li>';
$notification_filter .= '</ul>';
$notification_filter .= '</li>';
$notification_filter .= '</ul>';
return $notification_filter;
}
@ -1161,19 +1155,23 @@ function notifications_print_dropdown()
$mess = [];
}
$redirection_notifications = html_print_menu_button(
$redirection_notifications = html_print_button(
__('See all notifications'),
'see_all_notifications',
false,
'window.location="'.ui_get_full_url('index.php?sec=message_list&sec2=operation/messages/message_list').'"',
[
'href' => 'javascript:',
'class' => 'notification_menu_actions',
'text' => __('View all messages'),
'onClick' => "window.location='".ui_get_full_url('index.php?sec=message_list&sec2=operation/messages/message_list')."'",
'mode' => 'secondary',
'class' => 'bolder',
'icon' => 'unset',
],
true
);
$notification_menu = html_print_menu_button(
[
'href' => 'javascript:',
'class' => 'notification_menu_actions',
'class' => 'notification_menu_actions link-bold font_14px',
'text' => __('Mark all as read'),
'onClick' => 'mark_all_notification_as_read()',
],
@ -1187,9 +1185,13 @@ function notifications_print_dropdown()
<div class='notificaion_menu_container'>
<div class='menu_tab filter_notification'>%s</div>
<div class='menu_tab notification_menu'>%s</div>
<div class='menu_tab notification_menu'>%s</div>
</div>
%s
<div class='notifications-div'>
%s
</div>
<center>
<div class='mrgn_top_10px mrgn_btn_10px'>%s</div>
</center>
</div>
</div>
<div
@ -1200,14 +1202,14 @@ function notifications_print_dropdown()
",
$notification_filter,
$notification_menu,
$redirection_notifications,
array_reduce(
$mess,
function ($carry, $message) {
return $carry.notifications_print_dropdown_element($message);
},
''
)
),
$redirection_notifications
);
}

View File

@ -2946,7 +2946,7 @@ function ui_print_help_tip(
$id = random_int(1, 99999);
$output = '<div id="div_tip_'.$id.'" class="tip" style="'.$style.'" >';
$output .= '<div id="tip_dialog_'.$id.'" class="invisible margin-15" data-title="'.__('Help').'"><span class="font_13px">'.$text.'</span></div>';
$output .= '<div id="tip_dialog_'.$id.'" class="invisible margin-15" data-title="'.__('Help').'"><span class="font_13px">'.io_safe_output($text).'</span></div>';
$output .= html_print_image(
$img,
true,
@ -5407,7 +5407,7 @@ function ui_print_page_header(
if (is_metaconsole() === true) {
if ($help != '') {
$buffer .= "<div class='head_help'>".ui_print_help_icon($help, true, '', 'images/help_30.png').'</div>';
$buffer .= "<div class='head_help rounded-icon-header'>".ui_print_help_icon($help, true, '', 'images/help@header.svg').'</div>';
}
}
@ -7330,7 +7330,7 @@ function ui_print_message_dialog($title, $text, $id='', $img='', $text_button=''
*
* @return null
*/
function ui_query_result_editor($name='default')
function ui_query_result_editor($name='default', $button_in_action_buttons=true)
{
$editorSubContainer = html_print_div(
[
@ -7406,9 +7406,22 @@ function ui_query_result_editor($name='default')
]
);
$execute_button = html_print_submit_button(__('Execute query'), 'execute_query', false, ['icon' => 'update'], true);
html_print_action_buttons($execute_button);
$execute_button = html_print_submit_button(
__('Execute query'),
'execute_query',
false,
[
'icon' => 'update',
'class' => 'float-right',
],
true
);
if ($button_in_action_buttons === true) {
html_print_action_buttons($execute_button);
} else {
echo $execute_button;
}
}

View File

@ -1272,6 +1272,28 @@ function get_build_setup_charts($type, $options, $data)
$chart->labels()->exchangeArray($options['labels']);
}
// Edit tooltip.
if (isset($options['tooltip']) === true && empty($options['tooltip']) === false) {
$tooltip_callback_value = 'item.formattedValue';
if (isset($options['tooltip']['value']) === true && empty($options['tooltip']['value']) === false) {
$tooltip_callback_value = ''.$options['tooltip']['value'].'';
}
$tooltip_callback_unit = '';
if (isset($options['tooltip']['unit']) === true && empty($options['tooltip']['unit']) === false) {
$tooltip_callback_unit = '"'.$options['tooltip']['unit'].'"';
}
$tooltip_callback = '(item) => " " + '.$tooltip_callback_value.' + "'.$tooltip_callback_unit.'"';
$chart->options()->getPlugins()->getTooltip()->callbacks()->setLabel($tooltip_callback);
if (isset($options['tooltip']['title']) === true && empty($options['tooltip']['title']) === false) {
if (isset($options['tooltip']['title']['fullTitle']) === true && $options['tooltip']['title']['fullTitle'] === true) {
$chart->options()->getPlugins()->getTooltip()->callbacks()->setTitle('(item) => item[0].dataset.data[item[0].dataIndex].full_title');
}
}
}
// Add Datasets.
$setData = $chart->createDataSet();
switch ($type) {

View File

@ -179,6 +179,7 @@ function testConectionApiItsmToPandora(path) {
} else {
showFailureImage();
showMessage();
$("span#ITSM-message-pandora").html(data);
}
})
.fail(function() {

View File

@ -932,7 +932,7 @@ function add_macro_field(macro, row_model_id, type_copy, k) {
.html();
field_desc = field_desc.replace("macro_desc", macro_desc);
field_desc = field_desc.replace("macro_help", macro_help);
field_desc = field_desc.replaceAll("macro_help", macro_help);
$("#" + row_id)
.children()
@ -1553,9 +1553,11 @@ function changePlugin() {
var moduleProtocol = $("#module_protocol").val();
var executionType = $("#execution_type").val();
var pluginSelected = $("#server_plugin_" + moduleProtocol).val();
var pluginAllData = JSON.parse(
$("#hidden-server_plugin_data_" + pluginSelected).val()
);
var pluginAllDataSafe = $("#hidden-server_plugin_data_" + pluginSelected)
.val()
.replace(/(?:\r\n|\r|\n)/g, "<br>");
var pluginAllData = JSON.parse(pluginAllDataSafe);
var pluginDescription = pluginAllData.description;
var pluginMacros = pluginAllData.macros;
@ -1586,10 +1588,14 @@ function changePlugin() {
let macro = this.macro;
let value = this.value;
if (pluginMacrosElement["server_plugin"] == pluginSelected) {
if (pluginMacrosElement[macro + "_" + moduleProtocol + "_field"]) {
value = pluginMacrosElement[macro + "_" + moduleProtocol + "_field"];
if (pluginMacrosElement !== null) {
if (pluginMacrosElement["server_plugin"] == pluginSelected) {
if (pluginMacrosElement[macro + "_" + moduleProtocol + "_field"]) {
value = pluginMacrosElement[macro + "_" + moduleProtocol + "_field"];
}
}
} else {
value = "";
}
if (

View File

@ -449,6 +449,10 @@ function load_modal(settings) {
}
};
if (settings.closeOnEscape == undefined) {
settings.closeOnEscape = true;
}
required_buttons.push({
class:
"ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next",
@ -518,7 +522,7 @@ function load_modal(settings) {
collision: "fit"
},
buttons: required_buttons,
closeOnEscape: true,
closeOnEscape: settings.closeOnEscape,
open: function() {
//$(".ui-dialog-titlebar-close").hide();
},

View File

@ -594,7 +594,7 @@ class ITSM
*
* @return boolean
*/
public function pingItsmtoPandora(string $path): bool
public function pingItsmtoPandora(string $path): array
{
global $config;
@ -603,12 +603,12 @@ class ITSM
[],
[
'path' => $path,
'apiPass' => $config['api_password'],
'serverAuth' => $config['server_unique_identifier'],
'apiPass' => md5($config['api_password']),
'serverAuth' => md5($config['server_unique_identifier']),
]
);
return (bool) $result['valid'];
return $result;
}

View File

@ -1500,12 +1500,10 @@ class Manager
$ITSM = new ITSM();
$result = $ITSM->pingItsmtoPandora($path);
} catch (Throwable $e) {
echo $e->getMessage();
$result = false;
exit;
$result = $e->getMessage();
}
echo json_encode(['valid' => ($result !== false) ? 1 : 0]);
echo json_encode($result);
exit;
}

View File

@ -15,12 +15,15 @@ use PandoraFMS\Modules\Shared\Services\Config;
final class TokenRepositoryMySQL extends RepositoryMySQL implements TokenRepository
{
public function __construct(
private TokenDataMapper $tokenDataMapper,
private Config $config
) {
}
/**
* @return Token[],
*/
@ -49,6 +52,7 @@ final class TokenRepositoryMySQL extends RepositoryMySQL implements TokenReposit
return $result;
}
public function count(TokenFilter $tokenFilter): int
{
$sql = $this->getAuthenticationQuery($tokenFilter, $this->tokenDataMapper, true);
@ -65,6 +69,7 @@ final class TokenRepositoryMySQL extends RepositoryMySQL implements TokenReposit
return (int) $count;
}
public function getOne(TokenFilter $tokenFilter): Token
{
try {
@ -85,6 +90,7 @@ final class TokenRepositoryMySQL extends RepositoryMySQL implements TokenReposit
return $this->tokenDataMapper->fromDatabase($result);
}
public function getExistToken(string $label): Token
{
try {
@ -105,12 +111,14 @@ final class TokenRepositoryMySQL extends RepositoryMySQL implements TokenReposit
return $this->tokenDataMapper->fromDatabase($result);
}
public function create(Token $token): Token
{
$idToken = $this->__create($token, $this->tokenDataMapper);
return $token->setIdToken($idToken);
}
public function update(Token $token): Token
{
return $this->__update(
@ -120,15 +128,17 @@ final class TokenRepositoryMySQL extends RepositoryMySQL implements TokenReposit
);
}
public function delete(int $id): void
{
$this->__delete($id, $this->tokenDataMapper);
}
private function getAuthenticationQuery(
FilterAbstract $filter,
DataMapperAbstract $mapper,
bool $count = false
bool $count=false
): string {
$pagination = '';
$orderBy = '';
@ -136,7 +146,7 @@ final class TokenRepositoryMySQL extends RepositoryMySQL implements TokenReposit
$filters = $this->buildQueryFilters($filter, $mapper);
// Check ACL for user list.
if (\users_is_admin() === false) {
if (empty($this->config->get('id_user')) === false && \users_is_admin() === false) {
// No admin.
$filters .= sprintf(
' AND ttoken.id_user = "%s"',
@ -179,4 +189,6 @@ final class TokenRepositoryMySQL extends RepositoryMySQL implements TokenReposit
return $sql;
}
}

View File

@ -16,7 +16,7 @@ use PandoraFMS\Modules\Shared\Entities\Entity;
* property="idEvent",
* type="integer",
* nullable=false,
* description="Id event"
* description="Id event",
* readOnly=true
* ),
* @OA\Property(
@ -212,7 +212,7 @@ use PandoraFMS\Modules\Shared\Entities\Entity;
* nullable=true,
* default=null,
* description="Module status",
* readonly=true
* readOnly=true
* ),
* @OA\Property(
* property="eventCustomId",
@ -261,35 +261,61 @@ use PandoraFMS\Modules\Shared\Entities\Entity;
*/
final class Event extends Entity
{
private ?int $idEvent = null;
private ?int $idAgent = null;
private ?string $idUser = null;
private ?int $idGroup = null;
private ?EventStatusEnum $status = null;
private ?string $timestamp = null;
private ?string $event = null;
private ?int $utimestamp = null;
private ?EventTypeEnum $eventType = null;
private ?int $idAgentModule = null;
private ?int $idAlertAm = null;
private ?EventSeverityEnum $severity = null;
private ?string $tags = null;
private ?string $source = null;
private ?string $idExtra = null;
private ?string $criticalInstructions = null;
private ?string $warningInstructions = null;
private ?string $unknownInstructions = null;
private ?string $ownerUser = null;
private ?int $ackUtimestamp = null;
private ?string $customData = null;
private ?string $data = null;
private ?int $moduleStatus = null;
private ?string $eventCustomId = null;
public function __construct()
{
}
public function fieldsReadOnly(): array
{
return [
@ -301,6 +327,7 @@ final class Event extends Entity
];
}
public function jsonSerialize(): mixed
{
return [
@ -331,35 +358,36 @@ final class Event extends Entity
];
}
public function getValidations(): array
{
return [
'idEvent' => [
'idEvent' => [
EventValidator::INTEGER,
EventValidator::GREATERTHAN,
],
'idAgent' => [
'idAgent' => [
EventValidator::INTEGER,
EventValidator::GREATEREQUALTHAN,
],
'idUser' => EventValidator::STRING,
'idGroup' => [
'idUser' => EventValidator::STRING,
'idGroup' => [
EventValidator::INTEGER,
EventValidator::GREATEREQUALTHAN,
],
'status' => EventValidator::VALIDSTATUS,
'timestamp' => EventValidator::DATETIME,
'event' => EventValidator::STRING,
'utimestamp' => [
'status' => EventValidator::VALIDSTATUS,
'timestamp' => EventValidator::DATETIME,
'event' => EventValidator::STRING,
'utimestamp' => [
EventValidator::INTEGER,
EventValidator::GREATEREQUALTHAN,
],
'eventType' => EventValidator::VALIDTYPE,
'idAgentModule' => [
'eventType' => EventValidator::VALIDTYPE,
'idAgentModule' => [
EventValidator::INTEGER,
EventValidator::GREATEREQUALTHAN,
],
'idAlertAm' => [
'idAlertAm' => [
EventValidator::INTEGER,
EventValidator::GREATEREQUALTHAN,
],
@ -375,62 +403,78 @@ final class Event extends Entity
EventValidator::INTEGER,
EventValidator::GREATEREQUALTHAN,
],
'customData' => EventValidator::STRING,
'data' => EventValidator::STRING,
'moduleStatus' => EventValidator::INTEGER,
'eventCustomId' => EventValidator::STRING,
'customData' => EventValidator::STRING,
'data' => EventValidator::STRING,
'moduleStatus' => EventValidator::INTEGER,
'eventCustomId' => EventValidator::STRING,
];
}
public function validateFields(array $filters): array
{
return (new EventValidator())->validate($filters);
}
public function getIdEvent(): ?int
{
return $this->idEvent;
}
public function setIdEvent(?int $idEvent): self
{
$this->idEvent = $idEvent;
return $this;
}
public function getIdAgent(): ?int
{
return $this->idAgent;
}
public function setIdAgent(?int $idAgent): self
{
$this->idAgent = $idAgent;
return $this;
}
public function getIdUser(): ?string
{
return $this->idUser;
}
public function setIdUser(?string $idUser): self
{
$this->idUser = $idUser;
return $this;
}
public function getIdGroup(): ?int
{
return $this->idGroup;
}
public function setIdGroup(?int $idGroup): self
{
$this->idGroup = $idGroup;
return $this;
}
public function getStatus(): ?EventStatusEnum
{
return $this->status;
}
public function setStatus(null|string|EventStatusEnum $status): self
{
if (is_string($status) === true) {
@ -442,40 +486,52 @@ final class Event extends Entity
return $this;
}
public function getTimestamp(): ?string
{
return $this->timestamp;
}
public function setTimestamp(?string $timestamp): self
{
$this->timestamp = $timestamp;
return $this;
}
public function getEvent(): ?string
{
return $this->event;
}
public function setEvent(?string $event): self
{
$this->event = $event;
return $this;
}
public function getUtimestamp(): ?int
{
return $this->utimestamp;
}
public function setUtimestamp(?int $utimestamp): self
{
$this->utimestamp = $utimestamp;
return $this;
}
public function getEventType(): ?EventTypeEnum
{
return $this->eventType;
}
public function setEventType(null|string|EventTypeEnum $eventType): self
{
if (is_string($eventType) === true) {
@ -487,30 +543,39 @@ final class Event extends Entity
return $this;
}
public function getIdAgentModule(): ?int
{
return $this->idAgentModule;
}
public function setIdAgentModule(?int $idAgentModule): self
{
$this->idAgentModule = $idAgentModule;
return $this;
}
public function getIdAlertAm(): ?int
{
return $this->idAlertAm;
}
public function setIdAlertAm(?int $idAlertAm): self
{
$this->idAlertAm = $idAlertAm;
return $this;
}
public function getSeverity(): ?EventSeverityEnum
{
return $this->severity;
}
public function setSeverity(null|string|EventSeverityEnum $severity): self
{
if (is_string($severity) === true) {
@ -522,123 +587,161 @@ final class Event extends Entity
return $this;
}
public function getTags(): ?string
{
return $this->tags;
}
public function setTags(?string $tags): self
{
$this->tags = $tags;
return $this;
}
public function getSource(): ?string
{
return $this->source;
}
public function setSource(?string $source): self
{
$this->source = $source;
return $this;
}
public function getIdExtra(): ?string
{
return $this->idExtra;
}
public function setIdExtra(?string $idExtra): self
{
$this->idExtra = $idExtra;
return $this;
}
public function getCriticalInstructions(): ?string
{
return $this->criticalInstructions;
}
public function setCriticalInstructions(?string $criticalInstructions): self
{
$this->criticalInstructions = $criticalInstructions;
return $this;
}
public function getWarningInstructions(): ?string
{
return $this->warningInstructions;
}
public function setWarningInstructions(?string $warningInstructions): self
{
$this->warningInstructions = $warningInstructions;
return $this;
}
public function getUnknownInstructions(): ?string
{
return $this->unknownInstructions;
}
public function setUnknownInstructions(?string $unknownInstructions): self
{
$this->unknownInstructions = $unknownInstructions;
return $this;
}
public function getOwnerUser(): ?string
{
return $this->ownerUser;
}
public function setOwnerUser(?string $ownerUser): self
{
$this->ownerUser = $ownerUser;
return $this;
}
public function getAckUtimestamp(): ?int
{
return $this->ackUtimestamp;
}
public function setAckUtimestamp(?int $ackUtimestamp): self
{
$this->ackUtimestamp = $ackUtimestamp;
return $this;
}
public function getCustomData(): ?string
{
return $this->customData;
}
public function setCustomData(?string $customData): self
{
$this->customData = $customData;
return $this;
}
public function getData(): ?string
{
return $this->data;
}
public function setData(?string $data): self
{
$this->data = $data;
return $this;
}
public function getModuleStatus(): ?int
{
return $this->moduleStatus;
}
public function setModuleStatus(?int $moduleStatus): self
{
$this->moduleStatus = $moduleStatus;
return $this;
}
public function getEventCustomId(): ?string
{
return $this->eventCustomId;
}
public function setEventCustomId(?string $eventCustomId): self
{
$this->eventCustomId = $eventCustomId;
return $this;
}
}

View File

@ -0,0 +1,24 @@
<?php
namespace PandoraFMS\Modules\PandoraITSM\Inventories\Actions;
use PandoraFMS\Modules\PandoraITSM\Inventories\Entities\PandoraITSMInventory;
use PandoraFMS\Modules\PandoraITSM\Inventories\Services\GetPandoraITSMInventoryService;
final class GetPandoraITSMInventoryAction
{
public function __construct(
private GetPandoraITSMInventoryService $getPandoraITSMInventoryService
) {
}
public function __invoke(int $idPandoraITSMInventory): array
{
return $this->getPandoraITSMInventoryService->__invoke($idPandoraITSMInventory);
}
}

View File

@ -0,0 +1,33 @@
<?php
namespace PandoraFMS\Modules\PandoraITSM\Inventories\Actions;
use PandoraFMS\Modules\PandoraITSM\Inventories\Entities\PandoraITSMInventoryFilter;
use PandoraFMS\Modules\PandoraITSM\Inventories\Services\CountPandoraITSMInventoryService;
use PandoraFMS\Modules\PandoraITSM\Inventories\Services\ListPandoraITSMInventoryService;
use PandoraFMS\Modules\Shared\Entities\PaginationData;
final class ListPandoraITSMInventoryAction
{
public function __construct(
private ListPandoraITSMInventoryService $listPandoraITSMInventoryService,
private CountPandoraITSMInventoryService $countPandoraITSMInventoryService
) {
}
public function __invoke(PandoraITSMInventoryFilter $pandoraITSMInventoryFilter): array
{
return (new PaginationData(
$pandoraITSMInventoryFilter->getPage(),
$pandoraITSMInventoryFilter->getSizePage(),
$this->countPandoraITSMInventoryService->__invoke($pandoraITSMInventoryFilter),
$this->listPandoraITSMInventoryService->__invoke($pandoraITSMInventoryFilter)
))->toArray();
}
}

View File

@ -0,0 +1,49 @@
<?php
namespace PandoraFMS\Modules\PandoraITSM\Inventories\Controllers;
use PandoraFMS\Modules\PandoraITSM\Inventories\Actions\GetPandoraITSMInventoryAction;
use PandoraFMS\Modules\Shared\Controllers\Controller;
use PandoraFMS\Modules\Shared\Services\ValidateAclSystem;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
final class GetPandoraITSMInventoryController extends Controller
{
public function __construct(
private GetPandoraITSMInventoryAction $getPandoraITSMInventoryAction,
private ValidateAclSystem $acl
) {
}
/**
* @OA\Get(
* security={{ "bearerAuth": {}}},
* path="/pandoraITSM/inventory/{idPandoraITSMInventory}",
* tags={"PandoraITSM"},
* summary="Show pandoraITSMInventory",
* @OA\Parameter(ref="#/components/parameters/parameterIdPandoraITSMInventory"),
* @OA\Response(response=200, ref="#/components/responses/ResponsePandoraITSMInventory"),
* @OA\Response(response=400, ref="#/components/responses/BadRequest"),
* @OA\Response(response=401, ref="#/components/responses/Unauthorized"),
* @OA\Response(response=403, ref="#/components/responses/Forbidden"),
* @OA\Response(response=404, ref="#/components/responses/NotFound"),
* @OA\Response(response=500, ref="#/components/responses/InternalServerError")
* )
*/
public function __invoke(Request $request, Response $response): Response
{
$idPandoraITSMInventory = $this->getParam($request, 'idPandoraITSMInventory');
$this->acl->validate(0, 'AR', ' tried to read agents for pandoraITSMInventories');
$result = $this->getPandoraITSMInventoryAction->__invoke($idPandoraITSMInventory);
return $this->getResponse($response, $result);
}
}

View File

@ -0,0 +1,79 @@
<?php
namespace PandoraFMS\Modules\PandoraITSM\Inventories\Controllers;
use PandoraFMS\Modules\PandoraITSM\Inventories\Actions\ListPandoraITSMInventoryAction;
use PandoraFMS\Modules\PandoraITSM\Inventories\Entities\PandoraITSMInventoryFilter;
use PandoraFMS\Modules\Shared\Controllers\Controller;
use PandoraFMS\Modules\Shared\Services\ValidateAclSystem;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
final class ListPandoraITSMInventoryController extends Controller
{
public function __construct(
private ListPandoraITSMInventoryAction $listPandoraITSMInventoryAction,
private ValidateAclSystem $acl,
) {
}
/**
* @OA\Post(
* security={{ "bearerAuth": {}}},
* tags={"PandoraITSM"},
* path="/pandoraITSM/inventory/list",
* summary="List pandoraITSMInventories",
* @OA\Parameter(ref="#/components/parameters/parameterPage"),
* @OA\Parameter(ref="#/components/parameters/parameterSizePage"),
* @OA\Parameter(ref="#/components/parameters/parameterSortField"),
* @OA\Parameter(ref="#/components/parameters/parameterSortDirection"),
* @OA\RequestBody(ref="#/components/requestBodies/requestBodyPandoraITSMInventoryFilter"),
* @OA\Response(
* response="200",
* description="List PandoraITSM Inventories Object",
* content={
* @OA\MediaType(
* mediaType="application/json",
* @OA\Schema(
* @OA\Property(
* property="paginationData",
* type="object",
* ref="#/components/schemas/paginationData",
* description="Page object",
* ),
* @OA\Property(
* property="data",
* type="array",
* @OA\Items(
* ref="#/components/schemas/PandoraITSMInventory",
* description="Array of pandoraITSMInventory objects"
* )
* ),
* ),
* )
* }
* ),
* @OA\Response(response=400, ref="#/components/responses/BadRequest"),
* @OA\Response(response=401, ref="#/components/responses/Unauthorized"),
* @OA\Response(response=403, ref="#/components/responses/Forbidden"),
* @OA\Response(response=404, ref="#/components/responses/NotFound"),
* @OA\Response(response=500, ref="#/components/responses/InternalServerError")
* )
*/
public function __invoke(Request $request, Response $response): Response
{
// @var PandoraITSMInventoryFilter $pandoraITSMInventoryFilter.
$pandoraITSMInventoryFilter = $this->fromRequest($request, PandoraITSMInventoryFilter::class);
$this->acl->validate(0, 'AR', ' tried to read agents for pandoraITSMInventories');
$result = $this->listPandoraITSMInventoryAction->__invoke($pandoraITSMInventoryFilter);
return $this->getResponse($response, $result);
}
}

View File

@ -0,0 +1,307 @@
<?php
namespace PandoraFMS\Modules\PandoraITSM\Inventories\Entities;
use PandoraFMS\Modules\Shared\Entities\Entity;
use PandoraFMS\Modules\Shared\Validators\Validator;
/**
* @OA\Schema(
* schema="PandoraITSMInventory",
* type="object",
* @OA\Property(
* property="idPandoraITSMInventory",
* type="integer",
* nullable=false,
* description="Id Agent pandoraITSMInventory",
* readOnly=true
* ),
* @OA\Property(
* property="agentAlias",
* type="string",
* nullable=true,
* default=null,
* description="Agent Name pandoraITSMInventory"
* ),
* @OA\Property(
* property="osVersion",
* type="string",
* nullable=true,
* default=null,
* description="Agent os version pandoraITSMInventory"
* ),
* @OA\Property(
* property="agentAddress",
* type="string",
* nullable=true,
* default=null,
* description="Agent address pandoraITSMInventory"
* ),
* @OA\Property(
* property="agentUrlAddress",
* type="string",
* nullable=true,
* default=null,
* description="Agent url address pandoraITSMInventory"
* ),
* @OA\Property(
* property="agentDisabled",
* type="boolean",
* nullable=true,
* default=null,
* description="Agent disable pandoraITSMInventory"
* ),
* @OA\Property(
* property="groupName",
* type="string",
* nullable=true,
* default=null,
* description="Agent group name pandoraITSMInventory"
* ),
* @OA\Property(
* property="groupId",
* type="integer",
* nullable=true,
* default=null,
* description="Agent group id pandoraITSMInventory"
* ),
* @OA\Property(
* property="osName",
* type="string",
* nullable=true,
* default=null,
* description="Agent OS name pandoraITSMInventory"
* )
* )
*
* @OA\Response(
* response="ResponsePandoraITSMInventory",
* description="PandoraITSMInventory object",
* content={
* @OA\MediaType(
* mediaType="application/json",
* @OA\Schema(
* type="object",
* ref="#/components/schemas/PandoraITSMInventory",
* description="PandoraITSMInventory object"
* ),
* )
* }
* )
*
* @OA\Parameter(
* parameter="parameterIdPandoraITSMInventory",
* name="idPandoraITSMInventory",
* in="path",
* description="PandoraITSMInventory id",
* required=true,
* @OA\Schema(
* type="integer",
* default=1
* )
* )
*
* @OA\RequestBody(
* request="requestBodyPandoraITSMInventory",
* required=true,
* @OA\MediaType(
* mediaType="application/json",
* @OA\Schema(ref="#/components/schemas/PandoraITSMInventory")
* )
* )
*/
final class PandoraITSMInventory extends Entity
{
private ?int $idPandoraITSMInventory = null;
private ?string $agentAlias = null;
private ?string $osVersion = null;
private ?string $agentAddress = null;
private ?string $agentUrlAddress = null;
private ?bool $agentDisabled = null;
private ?string $groupName = null;
private ?int $groupId = null;
private ?string $osName = null;
public function __construct()
{
}
public function fieldsReadOnly(): array
{
return [];
}
public function jsonSerialize(): mixed
{
return [
'idPandoraITSMInventory' => $this->getIdPandoraITSMInventory(),
'agentAlias' => $this->getAgentAlias(),
'osVersion' => $this->getOsVersion(),
'agentAddress' => $this->getAgentAddress(),
'agentUrlAddress' => $this->getAgentUrlAddress(),
'agentDisabled' => $this->getAgentDisabled(),
'groupName' => $this->getGroupName(),
'groupId' => $this->getGroupId(),
'osName' => $this->getOsName(),
];
}
public function getValidations(): array
{
return [
'idPandoraITSMInventory' => [
Validator::INTEGER,
Validator::GREATERTHAN,
],
'agentAlias' => Validator::STRING,
'osVersion' => Validator::STRING,
'agentAddress' => Validator::STRING,
'agentUrlAddress' => Validator::STRING,
'agentDisabled' => Validator::BOOLEAN,
'groupName' => Validator::STRING,
'groupId' => [
Validator::INTEGER,
Validator::GREATERTHAN,
],
'osName' => Validator::STRING,
];
}
public function validateFields(array $filters): array
{
return (new Validator())->validate($filters);
}
public function getIdPandoraITSMInventory(): ?int
{
return $this->idPandoraITSMInventory;
}
public function setIdPandoraITSMInventory(?int $idPandoraITSMInventory): self
{
$this->idPandoraITSMInventory = $idPandoraITSMInventory;
return $this;
}
public function getAgentAlias(): ?string
{
return $this->agentAlias;
}
public function setAgentAlias(?string $agentAlias): self
{
$this->agentAlias = $agentAlias;
return $this;
}
public function getOsVersion(): ?string
{
return $this->osVersion;
}
public function setOsVersion(?string $osVersion): self
{
$this->osVersion = $osVersion;
return $this;
}
public function getAgentAddress(): ?string
{
return $this->agentAddress;
}
public function setAgentAddress(?string $agentAddress): self
{
$this->agentAddress = $agentAddress;
return $this;
}
public function getAgentUrlAddress(): ?string
{
return $this->agentUrlAddress;
}
public function setAgentUrlAddress(?string $agentUrlAddress): self
{
$this->agentUrlAddress = $agentUrlAddress;
return $this;
}
public function getGroupName(): ?string
{
return $this->groupName;
}
public function setGroupName(?string $groupName): self
{
$this->groupName = $groupName;
return $this;
}
public function getOsName(): ?string
{
return $this->osName;
}
public function setOsName(?string $osName): self
{
$this->osName = $osName;
return $this;
}
public function getGroupId(): ?int
{
return $this->groupId;
}
public function setGroupId(?int $groupId): self
{
$this->groupId = $groupId;
return $this;
}
public function getAgentDisabled(): ?bool
{
return $this->agentDisabled;
}
public function setAgentDisabled(?bool $agentDisabled): self
{
$this->agentDisabled = $agentDisabled;
return $this;
}
}

View File

@ -0,0 +1,174 @@
<?php
namespace PandoraFMS\Modules\PandoraITSM\Inventories\Entities;
use PandoraFMS\Modules\Shared\Core\FilterAbstract;
use PandoraFMS\Modules\Shared\Validators\Validator;
/**
* @OA\Schema(
* schema="PandoraITSMInventoryFilter",
* type="object",
* allOf={
* @OA\Schema(ref="#/components/schemas/PandoraITSMInventory"),
* @OA\Schema(
* @OA\Property(
* property="idPandoraITSMInventory",
* default=null,
* readOnly=false
* ),
* @OA\Property(
* property="freeSearch",
* type="string",
* nullable=true,
* default=null,
* description="Find word in name field."
* )
* ),
* @OA\Schema(
* @OA\Property(
* property="multipleSearch",
* type="object",
* ref="#/components/schemas/multipleSearch",
* description="Multiple search object",
* )
* )
* }
* )
*
* @OA\RequestBody(
* request="requestBodyPandoraITSMInventoryFilter",
* required=true,
* @OA\MediaType(
* mediaType="application/json",
* @OA\Schema(ref="#/components/schemas/PandoraITSMInventoryFilter")
* ),
* )
*/
final class PandoraITSMInventoryFilter extends FilterAbstract
{
private ?string $freeSearch = null;
private ?array $multipleSearch = null;
public function __construct()
{
$this->setDefaultFieldOrder('tagente.id_agente');
$this->setDefaultDirectionOrder($this::ASC);
$this->setEntityFilter(new PandoraITSMInventory());
}
public function fieldsTranslate(): array
{
return [
'idPandoraITSMInventory' => 'tagente.id_agente',
'agentAlias' => 'tagente.alias',
'osVersion' => 'tagente.os_version',
'agentAddress' => 'tagente.direccion',
'agentUrlAddress' => 'tagente.url_address',
'agentDisabled' => 'tagente.disabled',
'groupId' => 'tgrupo.id_grupo',
'groupName' => 'tgrupo.nombre',
'osName' => 'tconfig_os.name',
];
}
public function fieldsReadOnly(): array
{
return [];
}
public function jsonSerialize(): mixed
{
return [
'freeSearch' => $this->getFreeSearch(),
'multipleSearch' => $this->getMultipleSearch(),
];
}
public function getValidations(): array
{
$validations = [];
if ($this->getEntityFilter() !== null) {
$validations = $this->getEntityFilter()->getValidations();
}
$validations['freeSearch'] = Validator::STRING;
$validations['multipleSearch'] = Validator::ARRAY;
return $validations;
}
public function validateFields(array $filters): array
{
return (new Validator())->validate($filters);
}
/**
* Get the value of freeSearch.
*
* @return ?string
*/
public function getFreeSearch(): ?string
{
return $this->freeSearch;
}
/**
* Set the value of freeSearch.
*
* @param string $freeSearch
*/
public function setFreeSearch(?string $freeSearch): self
{
$this->freeSearch = $freeSearch;
return $this;
}
/**
* Get the value of fieldsFreeSearch.
*
* @return ?array
*/
public function getFieldsFreeSearch(): ?array
{
return [
'tagente.alias',
'tagente.id_agente',
];
}
/**
* Get the value of multipleSearchString.
*
* @return ?array
*/
public function getMultipleSearch(): ?array
{
return $this->multipleSearch;
}
/**
* Set the value of multipleSearchString.
*
* @param array $multipleSearch
*/
public function setMultipleSearch(?array $multipleSearch): self
{
$this->multipleSearch = $multipleSearch;
return $this;
}
}

View File

@ -0,0 +1,33 @@
<?php
namespace PandoraFMS\Modules\PandoraITSM\Inventories\Repositories;
use PandoraFMS\Modules\PandoraITSM\Inventories\Entities\PandoraITSMInventory;
use PandoraFMS\Modules\PandoraITSM\Inventories\Entities\PandoraITSMInventoryFilter;
interface PandoraITSMInventoryRepository
{
/**
* @return PandoraITSMInventory[],
*/
public function list(PandoraITSMInventoryFilter $pandoraITSMInventoryFilter): array;
public function count(PandoraITSMInventoryFilter $pandoraITSMInventoryFilter): int;
public function getOne(PandoraITSMInventoryFilter $pandoraITSMInventoryFilter): array;
public function create(PandoraITSMInventory $pandoraITSMInventory): PandoraITSMInventory;
public function update(PandoraITSMInventory $pandoraITSMInventory): PandoraITSMInventory;
public function delete(int $id): void;
}

View File

@ -0,0 +1,214 @@
<?php
namespace PandoraFMS\Modules\PandoraITSM\Inventories\Repositories;
use InvalidArgumentException;
use PandoraFMS\Modules\PandoraITSM\Inventories\Entities\PandoraITSMInventory;
use PandoraFMS\Modules\PandoraITSM\Inventories\Entities\PandoraITSMInventoryFilter;
use PandoraFMS\Modules\Shared\Core\FilterAbstract;
use PandoraFMS\Modules\Shared\Enums\HttpCodesEnum;
use PandoraFMS\Modules\Shared\Exceptions\NotFoundException;
use PandoraFMS\Modules\Shared\Repositories\RepositoryMySQL;
use PandoraFMS\Modules\Shared\Services\Config;
class PandoraITSMInventoryRepositoryMySQL extends RepositoryMySQL implements PandoraITSMInventoryRepository
{
public function __construct(
private Config $config
) {
}
/**
* @return PandoraITSMInventory[],
*/
public function list(PandoraITSMInventoryFilter $pandoraITSMInventoryFilter): array
{
try {
$result = $this->getPandoraITSMInventoriesQuery($pandoraITSMInventoryFilter);
} catch (\Throwable $th) {
// Capture errors mysql.
throw new InvalidArgumentException(
strip_tags($th->getMessage()),
HttpCodesEnum::INTERNAL_SERVER_ERROR
);
}
if (is_array($result) === false) {
throw new NotFoundException(__('Pandora itsm inventory not found'));
}
return $result;
}
public function count(PandoraITSMInventoryFilter $pandoraITSMInventoryFilter): int
{
$result = $this->getPandoraITSMInventoriesQuery($pandoraITSMInventoryFilter, true);
try {
$count = 0;
if (empty($result) === false && isset($result[0]) === true) {
$count = $result[0]['count'];
}
} catch (\Throwable $th) {
// Capture errors mysql.
throw new InvalidArgumentException(
strip_tags($th->getMessage()),
HttpCodesEnum::INTERNAL_SERVER_ERROR
);
}
return (int) $count;
}
public function getOne(PandoraITSMInventoryFilter $pandoraITSMInventoryFilter): array
{
try {
$result_array = $this->getPandoraITSMInventoriesQuery($pandoraITSMInventoryFilter);
$result = [];
if (empty($result_array) === false) {
$result = array_shift($result_array);
}
} catch (\Throwable $th) {
// Capture errors mysql.
throw new InvalidArgumentException(
strip_tags($th->getMessage()),
HttpCodesEnum::INTERNAL_SERVER_ERROR
);
}
if (empty($result) === true) {
throw new NotFoundException(__('Pandora itsm inventory not found'));
}
return $result;
}
public function create(PandoraITSMInventory $pandoraITSMInventory): PandoraITSMInventory
{
return $pandoraITSMInventory;
}
public function update(PandoraITSMInventory $pandoraITSMInventory): PandoraITSMInventory
{
return $pandoraITSMInventory;
}
public function delete(int $id): void
{
}
private function getPandoraITSMInventoriesQuery(
FilterAbstract $filter,
bool $count=false
): array {
$pagination = '';
$orderBy = '';
$fields = 'COUNT(DISTINCT tagente.id_agente) as count';
$filters = $this->buildQueryFilters($filter);
$groupBy = '';
if ($count === false) {
$pagination = $this->buildQueryPagination($filter);
$orderBy = $this->buildQueryOrderBy($filter);
$groupBy = 'GROUP BY tagente.id_agente';
$custom_fields = \db_get_all_fields_in_table('tagent_custom_fields');
if ($custom_fields === false) {
$custom_fields = [];
}
$count_custom_fields = count($custom_fields);
$custom_field_sql = '';
$index_name_custom_fields = [];
foreach ($custom_fields as $key => $field) {
$index_name_custom_fields[$field['name']] = $field;
if ($key !== $count_custom_fields) {
$custom_field_sql .= ', ';
}
$custom_field_sql .= sprintf(
'MAX(CASE WHEN tagent_custom_fields.name = "%s" THEN tagent_custom_data.description END) AS "%s"',
$field['name'],
$field['name']
);
}
$fields = sprintf(
'tagente.alias,
tagente.id_agente AS "ID Agent",
tagente.os_version AS "OS Version",
tagente.direccion AS "IP Address",
tagente.url_address AS "URL Address",
tgrupo.nombre AS "Group",
tconfig_os.name AS "OS"
%s',
$custom_field_sql
);
}
$sql = sprintf(
'SELECT %s
FROM tagente
LEFT JOIN tagent_custom_data
ON tagent_custom_data.id_agent = tagente.id_agente
LEFT JOIN tagent_custom_fields
ON tagent_custom_data.id_field = tagent_custom_fields.id_field
INNER JOIN tgrupo
ON tgrupo.id_grupo = tagente.id_grupo
INNER JOIN tconfig_os
ON tconfig_os.id_os = tagente.id_os
LEFT JOIN tagent_secondary_group
ON tagente.id_agente = tagent_secondary_group.id_agent
WHERE %s
%s
%s
%s',
$fields,
$filters,
$groupBy,
$orderBy,
$pagination
);
$data = $this->dbGetAllRowsSql($sql);
if ($data === false) {
$data = [];
}
$result = [];
if ($count === false) {
foreach ($data as $key => $agent_fields) {
foreach ($agent_fields as $name_field => $value_field) {
$type = 'text';
if (isset($index_name_custom_fields[$name_field]) === true) {
if ($index_name_custom_fields[$name_field]['is_password_type']) {
$type = 'password';
} else if ($index_name_custom_fields[$name_field]['is_link_enabled']) {
$type = 'link';
}
}
$result[$agent_fields['ID Agent']][$name_field] = [
'data' => $value_field,
'type' => $type,
];
}
}
} else {
$result = $data;
}
return $result;
}
}

View File

@ -0,0 +1,24 @@
<?php
namespace PandoraFMS\Modules\PandoraITSM\Inventories\Services;
use PandoraFMS\Modules\PandoraITSM\Inventories\Entities\PandoraITSMInventoryFilter;
use PandoraFMS\Modules\PandoraITSM\Inventories\Repositories\PandoraITSMInventoryRepository;
final class CountPandoraITSMInventoryService
{
public function __construct(
private PandoraITSMInventoryRepository $pandoraITSMInventoryRepository,
) {
}
public function __invoke(PandoraITSMInventoryFilter $pandoraITSMInventoryFilter): int
{
return $this->pandoraITSMInventoryRepository->count($pandoraITSMInventoryFilter);
}
}

View File

@ -0,0 +1,32 @@
<?php
namespace PandoraFMS\Modules\PandoraITSM\Inventories\Services;
use PandoraFMS\Modules\PandoraITSM\Inventories\Entities\PandoraITSMInventory;
use PandoraFMS\Modules\PandoraITSM\Inventories\Entities\PandoraITSMInventoryFilter;
use PandoraFMS\Modules\PandoraITSM\Inventories\Repositories\PandoraITSMInventoryRepository;
final class GetPandoraITSMInventoryService
{
public function __construct(
private PandoraITSMInventoryRepository $pandoraITSMInventoryRepository,
) {
}
public function __invoke(int $idPandoraITSMInventory): array
{
$pandoraITSMInventoryFilter = new PandoraITSMInventoryFilter();
/*
@var PandoraITSMInventory $entityFilter
*/
$entityFilter = $pandoraITSMInventoryFilter->getEntityFilter();
$entityFilter->setIdPandoraITSMInventory($idPandoraITSMInventory);
return $this->pandoraITSMInventoryRepository->getOne($pandoraITSMInventoryFilter);
}
}

View File

@ -0,0 +1,24 @@
<?php
namespace PandoraFMS\Modules\PandoraITSM\Inventories\Services;
use PandoraFMS\Modules\PandoraITSM\Inventories\Entities\PandoraITSMInventoryFilter;
use PandoraFMS\Modules\PandoraITSM\Inventories\Repositories\PandoraITSMInventoryRepository;
final class ListPandoraITSMInventoryService
{
public function __construct(
private PandoraITSMInventoryRepository $pandoraITSMInventoryRepository,
) {
}
public function __invoke(PandoraITSMInventoryFilter $pandoraITSMInventoryFilter): array
{
return $this->pandoraITSMInventoryRepository->list($pandoraITSMInventoryFilter);
}
}

View File

@ -0,0 +1,10 @@
<?php
use PandoraFMS\Modules\PandoraITSM\Inventories\Controllers\GetPandoraITSMInventoryController;
use PandoraFMS\Modules\PandoraITSM\Inventories\Controllers\ListPandoraITSMInventoryController;
use Slim\App;
return function (App $app) {
$app->map(['GET', 'POST'], '/pandoraITSM/inventory/list', ListPandoraITSMInventoryController::class);
$app->get('/pandoraITSM/inventory/{idPandoraITSMInventory}', GetPandoraITSMInventoryController::class);
};

View File

@ -13,11 +13,11 @@ use OpenApi\Annotations as OA;
More useful links:
* <a target='_blank' href='https://pandorafms.com/en/pandora-fms-license-2024_en/'>Pandora FMS Licence </a>
* <a target='_blank' href='https://support.pandorafms.com'> Pandora FMS Official Support </a>
* <a target='_blank' href='https://pandorafms.com/en/community/'> Pandora FMS Community </a>
* <a target='_blank' href='https://pandorafms.com/en/security/vulnerability-disclosure-policy/'> Vulnerability Disclosure Policy </a>
* <a target='_blank' href='https://pandorafms.com/en/faq/'> Pandora FMS FAQ </a>",
* <a target='_blank' href='https://pandorafms.com/en/pandora-fms-license-2024_en/'>Pandora FMS Licence </a>
* <a target='_blank' href='https://support.pandorafms.com'> Pandora FMS Official Support </a>
* <a target='_blank' href='https://pandorafms.com/en/community/'> Pandora FMS Community </a>
* <a target='_blank' href='https://pandorafms.com/en/security/vulnerability-disclosure-policy/'> Vulnerability Disclosure Policy </a>
* <a target='_blank' href='https://pandorafms.com/en/faq/'> Pandora FMS FAQ </a>",
* version="0.0.1"
* ),
* @OA\Schemes(
@ -60,13 +60,17 @@ More useful links:
* name="Users",
* description="API Endpoints of users"
* ),
* @OA\Tag(
* name="PandoraITSM",
* description="API Endpoints of integration pandoraITSM"
* ),
* @OA\Parameter(
* parameter="parameterPage",
* name="page",
* in="query",
* description="page",
* required=false,
* @OA\Schema(
* @OA\Schema(
* type="integer",
* default=0
* ),
@ -78,7 +82,7 @@ More useful links:
* in="query",
* description="Size page",
* required=false,
* @OA\Schema(
* @OA\Schema(
* type="integer",
* default=0
* ),
@ -90,7 +94,7 @@ More useful links:
* in="query",
* description="sort field",
* required=false,
* @OA\Schema(
* @OA\Schema(
* type="string",
* default=""
* ),
@ -102,7 +106,7 @@ More useful links:
* in="query",
* description="sort direction",
* required=false,
* @OA\Schema(
* @OA\Schema(
* type="string",
* enum={
* "ASC",
@ -116,12 +120,12 @@ More useful links:
* response="BadRequest",
* description="Bad request",
* content={
* @OA\MediaType(
* @OA\MediaType(
* mediaType="application/json",
* @OA\Schema(
* @OA\Schema(
* type="object",
* description="Error",
* @OA\Property(
* @OA\Property(
* property="error",
* type="string",
* default="Message error"
@ -135,12 +139,12 @@ More useful links:
* response="Unauthorized",
* description="Unauthorized",
* content={
* @OA\MediaType(
* @OA\MediaType(
* mediaType="application/json",
* @OA\Schema(
* @OA\Schema(
* type="object",
* description="Error",
* @OA\Property(
* @OA\Property(
* property="error",
* type="string",
* default="Message error"
@ -154,12 +158,12 @@ More useful links:
* response="Forbidden",
* description="Forbidden",
* content={
* @OA\MediaType(
* @OA\MediaType(
* mediaType="application/json",
* @OA\Schema(
* @OA\Schema(
* type="object",
* description="Error",
* @OA\Property(
* @OA\Property(
* property="error",
* type="string",
* default="Message error"
@ -173,12 +177,12 @@ More useful links:
* response="NotFound",
* description="Not found",
* content={
* @OA\MediaType(
* @OA\MediaType(
* mediaType="application/json",
* @OA\Schema(
* @OA\Schema(
* type="object",
* description="Error",
* @OA\Property(
* @OA\Property(
* property="error",
* type="string",
* default="Message error"
@ -192,12 +196,12 @@ More useful links:
* response="InternalServerError",
* description="Internal server error",
* content={
* @OA\MediaType(
* @OA\MediaType(
* mediaType="application/json",
* @OA\Schema(
* @OA\Schema(
* type="object",
* description="Error",
* @OA\Property(
* @OA\Property(
* property="error",
* type="string",
* default="Message error"
@ -211,10 +215,10 @@ More useful links:
* response="successfullyDeleted",
* description="Successfully deleted",
* content={
* @OA\MediaType(
* @OA\MediaType(
* mediaType="application/json",
* @OA\Schema(
* @OA\Property(
* @OA\Schema(
* @OA\Property(
* property="result",
* type="string",
* default="Successfully deleted"
@ -225,38 +229,74 @@ More useful links:
* )
*
* @OA\Schema(
* schema="multipleSearch",
* type="object",
* @OA\Property(
* property="field",
* type="string",
* nullable=true,
* description="Field to search of query"
* ),
* @OA\Property(
* property="data",
* type="array",
* nullable=true,
* @OA\Items(type="integer"),
* description="Values to search of query IN()"
* )
* )
*
* @OA\Schema(
* schema="multipleSearchString",
* type="object",
* @OA\Property(
* property="field",
* type="string",
* nullable=true,
* description="Field to search of query"
* ),
* @OA\Property(
* property="data",
* type="array",
* nullable=true,
* @OA\Items(type="string"),
* description="Values to search of query IN()"
* )
* )
*
* @OA\Schema(
* schema="paginationData",
* type="object",
* description="Info pagination data",
* @OA\Property(
* @OA\Property(
* property="totalPages",
* type="integer",
* nullable=true,
* description="Number of pages",
* readOnly=true
* ),
* @OA\Property(
* @OA\Property(
* property="sizePage",
* type="integer",
* nullable=true,
* description="Items per page",
* readOnly=true
* ),
* @OA\Property(
* @OA\Property(
* property="totalRegisters",
* type="integer",
* nullable=true,
* description="Number of items",
* readOnly=true
* ),
* @OA\Property(
* @OA\Property(
* property="totalRegistersPage",
* type="integer",
* nullable=true,
* description="Number of items this page",
* readOnly=true
* ),
* @OA\Property(
* @OA\Property(
* property="currentPage",
* type="integer",
* nullable=true,

View File

@ -13,6 +13,8 @@ use Psr\Http\Message\ServerRequestInterface as Request;
final class UserTokenMiddleware
{
public function __construct(
private readonly ValidateServerIdentifierTokenService $validateServerIdentifierTokenService,
private readonly ValidateUserTokenService $validateUserTokenService,
@ -23,29 +25,32 @@ final class UserTokenMiddleware
) {
}
public function check(Request $request): bool
{
$authorization = ($request->getHeader('Authorization')[0] ?? '');
$token = null;
try {
$authorization = str_replace('Bearer ', '', $authorization);
preg_match(
'/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/',
$authorization,
$matches
);
$uuid = ($matches[0] ?? '');
if (empty($uuid) === true) {
return false;
}
$strToken = str_replace($uuid.'-', '', $authorization);
$validTokenUiniqueServerIdentifier = $this->validateServerIdentifierTokenService->__invoke($strToken);
$validTokenUiniqueServerIdentifier = $this->validateServerIdentifierTokenService->__invoke($authorization);
if ($validTokenUiniqueServerIdentifier === false) {
preg_match(
'/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/',
$authorization,
$matches
);
$uuid = ($matches[0] ?? '');
if (empty($uuid) === true) {
return false;
}
$strToken = str_replace($uuid.'-', '', $authorization);
$validToken = $this->validateUserTokenService->__invoke($uuid, $strToken);
$token = $this->getUserTokenService->__invoke($uuid);
if ($token !== null && $validToken) {
$this->config->set('id_user', $token->getIdUser());
$oldToken = clone $token;
$token->setLastUsage($this->timestamp->getMysqlCurrentTimestamp(0));
$this->updateTokenService->__invoke($token, $oldToken);
@ -78,4 +83,6 @@ final class UserTokenMiddleware
return $token !== null && $validToken;
}
}

View File

@ -9,6 +9,8 @@ use PandoraFMS\Modules\Shared\Services\Config;
class RepositoryMySQL extends Repository
{
protected function dbGetRow(
string $field,
string $table,
@ -29,18 +31,20 @@ class RepositoryMySQL extends Repository
return $result;
}
protected function dbGetValue(
string $field,
string $table,
array $filters,
string $whereJoin = 'AND'
string $whereJoin='AND'
): mixed {
return \db_get_value_filter($field, $table, $filters, $whereJoin);
}
protected function dbGetValueSql(
string $sql,
?bool $cache = false
?bool $cache=false
): string {
ob_start();
$result = \db_get_value_sql($sql, $cache);
@ -57,6 +61,7 @@ class RepositoryMySQL extends Repository
return $result;
}
protected function dbGetRowSql(
string $sql
): array {
@ -75,9 +80,10 @@ class RepositoryMySQL extends Repository
return $result;
}
protected function dbGetAllRowsSql(
string $sql,
?bool $cache = false
?bool $cache=false
): array {
ob_start();
$result = \db_get_all_rows_sql($sql, $cache);
@ -94,6 +100,7 @@ class RepositoryMySQL extends Repository
return $result;
}
protected function dbInsert(string $table, array $values): mixed
{
ob_start();
@ -110,6 +117,7 @@ class RepositoryMySQL extends Repository
return $result;
}
protected function dbUpdate(string $table, array $values, array $condition): mixed
{
ob_start();
@ -130,6 +138,7 @@ class RepositoryMySQL extends Repository
return $result;
}
protected function dbDelete(string $table, array $where): mixed
{
ob_start();
@ -147,7 +156,8 @@ class RepositoryMySQL extends Repository
return $result;
}
protected function dbFormatWhereClauseSQL(array $values, $prefix = ''): string
protected function dbFormatWhereClauseSQL(array $values, $prefix=''): string
{
ob_start();
$values_prefix = [];
@ -165,16 +175,33 @@ class RepositoryMySQL extends Repository
return $result;
}
public function buildQueryFilters(FilterAbstract $filter, DataMapperAbstract $mapper): string
public function buildQueryFilters(FilterAbstract $filter, ?DataMapperAbstract $mapper=null): string
{
$where_clause = '1=1';
if ($filter->getEntityFilter() !== null) {
if ($mapper !== null && $filter->getEntityFilter() !== null) {
$searchEntity = $mapper->toDatabase($filter->getEntityFilter());
$searchEntity = array_filter($searchEntity, fn ($value) => !is_null($value) && $value !== '' && $value !== 'null');
if (empty($searchEntity) === false) {
$where_clause .= ' AND '.$this->dbFormatWhereClauseSQL($searchEntity, '`'.$mapper->getTableName().'`.');
}
} else {
$searchEntity = $filter->getEntityFilter()->toArray();
$translates = $filter->fieldsTranslate();
$searchEntity = array_filter($searchEntity, fn ($value) => !is_null($value) && $value !== '' && $value !== 'null');
if (empty($searchEntity) === false) {
$resultEntity = [];
foreach ($searchEntity as $key => $value) {
if (isset($translates[$key]) === true) {
$resultEntity[$translates[$key]] = $value;
}
}
if (empty($resultEntity) === false) {
$where_clause .= ' AND '.$this->dbFormatWhereClauseSQL($resultEntity);
}
}
}
if (empty($filter->getFieldsFreeSearch()) === false
@ -201,6 +228,7 @@ class RepositoryMySQL extends Repository
return $where_clause;
}
private function freeSearch(array $fields, string $value): string
{
$clause = ' AND (';
@ -218,28 +246,57 @@ class RepositoryMySQL extends Repository
return $clause;
}
private function multipleSearch(FilterAbstract $filter): string
{
$fields = $filter->fieldsTranslate();
$field = '';
if (empty($fields) === false) {
if (empty($fields) === false
&& isset($fields[($filter->getMultipleSearch()['field'])]) === true
) {
$field = ($fields[($filter->getMultipleSearch()['field'] ?? '')] ?? '');
} else {
throw new Exception(
__(
'Bad request, multiple field %s is not a valid field',
$filter->getMultipleSearch()['field']
)
);
}
if (empty($field) === true) {
return '';
}
$clause = ' AND '.$field.' IN ('.implode(',', $filter->getMultipleSearch()['data']).')';
$clause = ' AND ('.$field.' IN ('.implode(',', $filter->getMultipleSearch()['data']).')';
if (isset($filter->getMultipleSearch()['secondaryGroup']) === true
&& $filter->getMultipleSearch()['secondaryGroup'] === true
) {
$clause .= ' OR tagent_secondary_group.id_group IN ('.implode(',', $filter->getMultipleSearch()['data']).')';
}
$clause .= ')';
return $clause;
}
private function multipleSearchString(FilterAbstract $filter): string
{
$fields = $filter->fieldsTranslate();
$field = '';
if (empty($fields) === false) {
if (empty($fields) === false
&& isset($fields[($filter->getMultipleSearchString()['field'])]) === true
) {
$field = ($fields[($filter->getMultipleSearchString()['field'] ?? '')] ?? '');
} else {
throw new Exception(
__(
'Bad request, multiple field %s is not a valid field',
$filter->getMultipleSearchString()['field']
)
);
}
if (empty($field) === true) {
@ -250,6 +307,7 @@ class RepositoryMySQL extends Repository
return $clause;
}
public function buildQueryPagination(FilterAbstract $filter): string
{
$filter->setLimit($filter->getSizePage());
@ -267,6 +325,7 @@ class RepositoryMySQL extends Repository
return $sqlLimit;
}
public function buildQueryOrderBy(FilterAbstract $filter): string
{
$default = '';
@ -297,6 +356,7 @@ class RepositoryMySQL extends Repository
return $return;
}
public function buildQueryGroupBy(FilterAbstract $filter): string
{
$groupBy = '';
@ -319,6 +379,7 @@ class RepositoryMySQL extends Repository
return $groupBy;
}
private function checkDirectionOrderByMsql(?string $direction): string
{
$directionArray = [
@ -329,7 +390,8 @@ class RepositoryMySQL extends Repository
return (isset($directionArray[$direction]) === true) ? $directionArray[$direction] : 'ASC';
}
public function checkAclGroupMysql(string $field, ?string $mode = ''): string
public function checkAclGroupMysql(string $field, ?string $mode=''): string
{
$config = new Config();
$isAdmin = \users_is_admin($config->get('id_user'));
@ -377,10 +439,11 @@ class RepositoryMySQL extends Repository
return $filter;
}
public function buildQuery(
FilterAbstract $filter,
DataMapperAbstract $mapper,
bool $count = false
bool $count=false
): string {
$filters = $this->buildQueryFilters($filter, $mapper);
if (empty($mapper->getSearchFieldRelated()) === false) {
@ -448,18 +511,23 @@ class RepositoryMySQL extends Repository
return $sql;
}
public function maxFieldSql(string $field): string
{
return 'MAX('.$field.')';
}
public function safeInput(?string $value): ?string
{
return \io_safe_input($value);
}
public function safeOutput(?string $value): ?string
{
return \io_safe_output($value);
}
}

View File

@ -18,13 +18,14 @@ use PandoraFMS\Modules\Users\Validators\UserValidator;
* nullable=true,
* default=null,
* description="Find word in fullname and comments fields."
* ),
* )
* ),
* @OA\Schema(
* @OA\Property(
* property="multipleSearchString",
* type="string",
* nullable=true,
* default=null,
* description="search string in field."
* type="object",
* ref="#/components/schemas/multipleSearch",
* description="Multiple search object",
* )
* )
* }
@ -41,9 +42,12 @@ use PandoraFMS\Modules\Users\Validators\UserValidator;
*/
final class UserFilter extends FilterAbstract
{
private ?string $freeSearch = null;
private ?array $multipleSearchString = null;
public function __construct()
{
$this->setDefaultFieldOrder(UserDataMapper::ID_USER);
@ -51,6 +55,7 @@ final class UserFilter extends FilterAbstract
$this->setEntityFilter(new User());
}
public function fieldsTranslate(): array
{
return [
@ -59,11 +64,13 @@ final class UserFilter extends FilterAbstract
];
}
public function fieldsReadOnly(): array
{
return [];
}
public function jsonSerialize(): mixed
{
return [
@ -71,6 +78,7 @@ final class UserFilter extends FilterAbstract
];
}
public function getValidations(): array
{
$validations = [];
@ -82,11 +90,13 @@ final class UserFilter extends FilterAbstract
return $validations;
}
public function validateFields(array $filters): array
{
return (new UserValidator())->validate($filters);
}
/**
* Get the value of freeSearch.
*
@ -97,10 +107,11 @@ final class UserFilter extends FilterAbstract
return $this->freeSearch;
}
/**
* Set the value of freeSearch.
*
* @param ?string $freeSearch
* @param string $freeSearch
*/
public function setFreeSearch(?string $freeSearch): self
{
@ -108,6 +119,7 @@ final class UserFilter extends FilterAbstract
return $this;
}
/**
* Get the value of fieldsFreeSearch.
*
@ -121,6 +133,7 @@ final class UserFilter extends FilterAbstract
];
}
/**
* Get the value of multipleSearchString.
*
@ -131,14 +144,17 @@ final class UserFilter extends FilterAbstract
return $this->multipleSearchString;
}
/**
* Set the value of multipleSearchString.
*
* @param ?array $multipleSearchString
* @param array $multipleSearchString
*/
public function setMultipleSearchString(?array $multipleSearchString): self
{
$this->multipleSearchString = $multipleSearchString;
return $this;
}
}

View File

@ -172,18 +172,21 @@ class Overview extends Element
$used = 0;
}
$data = [
'agents_used' => [
if ($used > 0) {
$data['agents_used'] = [
'label' => __('% Agents used'),
'perc' => $used,
'color' => '#1C4E6B',
],
'free_agents' => [
];
}
if ($free > 0) {
$data['free_agents'] = [
'label' => __('% Free agents'),
'perc' => $free,
'color' => '#5C63A2',
],
];
];
}
} else {
$agents = agents_get_agents();
$enabled_agents = agents_get_agents(
@ -207,22 +210,25 @@ class Overview extends Element
$total_disabled_agents = round((($total - count($enabled_agents)) * 100) / $total);
$total_enabled_agents = round((count($enabled_agents) * 100) / $total);
} else {
$total_disabled_agents = 0;
$total_enabled_agents = 100;
$total_disabled_agents = 100;
$total_enabled_agents = 0;
}
$data = [
'agents_enabled' => [
if ($total_enabled_agents > 0) {
$data['agents_enabled'] = [
'label' => __('% Agents enabled'),
'perc' => $total_enabled_agents,
'color' => '#1C4E6B',
],
'agents_disabled' => [
];
}
if ($total_disabled_agents > 0) {
$data['agents_disabled'] = [
'label' => __('% Agents disabled'),
'perc' => $total_disabled_agents,
'color' => '#5C63A2',
],
];
];
}
}
$bar = $this->printHorizontalBar($data);

View File

@ -1859,6 +1859,30 @@ class Item extends CachedModel
$save = array_merge($dataModelEncode, $dataEncode);
if (!empty($save['label'])) {
// Multi-span problem with TinyMCE. Do not delete.
$dom = new \DOMDocument();
$dom->loadHTML(io_safe_output($save['label']));
// XPath object.
$xpath = new \DOMXPath($dom);
// Find all span tags with style attribute.
$span_nodes = $xpath->query('//span[@style]');
if ($span_nodes->length > 1) {
$style = '';
foreach ($span_nodes as $span) {
$style .= $span->getAttribute('style');
}
$last_span = $span_nodes[($span_nodes->length - 1)];
// Set style.
$last_span->setAttribute('style', $style);
$save['label'] = io_safe_input($dom->saveHTML());
}
$save['label'] = io_safe_output(io_safe_input(str_replace("'", "\'", $save['label'])));
}

View File

@ -180,11 +180,6 @@ form.flex-row div.filter_input.filter_input_switch .p-slider {
width: 30px;
}
form .filter_input_not_search .p-switch {
flex: 0 1 30px;
margin: 0;
}
fieldset {
margin: 0 auto;
}

View File

@ -225,6 +225,7 @@ div.graphs-div-main {
/* height: 20px; */
margin-bottom: 5px;
display: flex;
z-index: 0;
}
#droppable-graphs .droppable-zone {

View File

@ -265,7 +265,6 @@ div#welcome_modal_window .wizard #li-div_wizard_agent > div {
}
div#welcome_modal_window .wizard #li-div_wizard_agent .select2-selection {
background-color: #f6f7fb !important;
border: 1px solid #c0ccdc !important;
border-radius: 6px !important;
width: 290px;

View File

@ -676,6 +676,10 @@ select:-internal-list-box {
align-items: center;
}
.align-center-important {
align-items: center !important;
}
.relative {
position: relative;
}
@ -943,6 +947,18 @@ select:-internal-list-box {
align-items: center;
}
.flex-rr-sb {
display: flex;
flex-direction: row-reverse;
justify-content: space-between;
}
.flex-rr-sb-important {
display: flex !important;
flex-direction: row-reverse !important;
justify-content: space-between !important;
}
.flex-row-vcenter {
display: flex;
flex-direction: row;
@ -1956,7 +1972,7 @@ div.title_line {
#menu_tab_frame_view_bc {
position: sticky;
top: 61px;
z-index: 3;
z-index: 2;
display: flex;
align-items: flex-end;
justify-content: space-between;
@ -4976,14 +4992,14 @@ div#dialog_messages table th:last-child {
#notification-wrapper {
background: white;
border: #a5a5a5 solid 1px;
border: 1px solid #e5e9ed;
z-index: 900000;
position: absolute;
width: 550px;
margin-top: 55px;
border-radius: 5px;
max-height: 530px;
border-radius: 8px;
position: fixed;
box-shadow: 0 3px 6px 0 rgba(0, 0, 0, 0.13);
}
#notification-wrapper::before {
@ -4991,29 +5007,38 @@ div#dialog_messages table th:last-child {
display: block;
position: absolute;
width: 0px;
height: 0;
border-color: transparent;
border-width: 12px;
border-style: solid;
bottom: 100%;
height: 16px;
width: 16px;
bottom: calc(100% - 8px);
left: calc(58% - 7px);
margin-left: -12px;
border-bottom-color: white;
margin-left: -9px;
border-left: 1px solid #e5e9ed;
transform: rotate(45deg);
border-left: 1px solid #e5e9ed;
border-top: 1px solid #e5e9ed;
background-color: var(--secondary-color);
transform: rotate(45deg);
}
#notification-wrapper-inner {
max-height: 400px;
#notification-wrapper-inner center {
border-top: 1px solid #e5e9ed;
}
.notifications-div {
max-height: calc(100vh - 200px);
overflow: auto;
}
.notifications-div::-webkit-scrollbar {
display: none;
}
#notification-wrapper-shadow {
height: 100%;
width: 100%;
background: #111;
position: fixed;
z-index: 9009;
top: 0;
opacity: 0.3;
}
.notification-item {
@ -5026,6 +5051,10 @@ div#dialog_messages table th:last-child {
padding: 5px;
}
.notification-item:last-child {
border-bottom: 0;
}
.notification-item > * {
padding-left: 7px;
pointer-events: none;
@ -10571,7 +10600,7 @@ button.submitButton:active {
border: 2px solid #57ea82;
}
button.buttonButton > div,
button.buttonButton > div:not(.unset),
button.submitButton > div {
background-color: #fff;
width: 2rem;
@ -12660,11 +12689,12 @@ form.cfv_status_agent input:checked + label:before {
.notificaion_menu_container {
display: flex;
padding-top: 10px;
padding-left: 15px;
}
.notification_menu {
width: 100px;
padding: 10px 15px;
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #e5e9ed;
}
.filter_notification {
@ -13848,6 +13878,25 @@ button.disabled {
display: list-item;
}
.white_table_graph > div {
background-color: transparent;
}
.link-bold {
color: var(--primary-color);
text-decoration: none;
font-weight: bold;
}
.link-bold:hover {
opacity: 0.9;
color: var(--primary-color);
}
.text-nowrap {
text-wrap: nowrap;
}
#wizard_table span#image_prev img {
height: 48px;
cursor: pointer;

View File

@ -38,7 +38,8 @@ ul.subsubmenu li,
input.search_input,
.filters input,
input#text-id_parent.ac_input,
input:not(div.login_pass > input):not(div.login_nick > input),
input:not(div.login_pass > input):not(div.login_nick
> input):not([src$=".svg"]),
textarea,
select,
.edit_user_comments #textarea_comments,
@ -1885,3 +1886,9 @@ a.pandora_pagination,
#score-bar .labels-bar div {
color: white;
}
a.link-bold {
color: var(--primary-color) !important;
text-decoration: none;
font-weight: bold;
}

View File

@ -24,7 +24,7 @@
color: white !important;
text-align: left;
}
.select2-container--default>.selection>.select2-selection--single {
.select2-container--default > .selection > .select2-selection--single {
border-color: #707070 !important;
}
.select2-container .select2-selection--single .select2-selection__clear {
@ -76,7 +76,7 @@
position: absolute;
left: -100000px;
width: 100%;
z-index: 1051;
z-index: 1118;
}
.select2-results {
display: block;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -131,7 +131,7 @@
<div style='padding-bottom: 50px'>
<?php
$version = '7.0NG.776';
$build = '240326';
$build = '240402';
$banner = "v$version Build $build";
error_reporting(0);

View File

@ -493,6 +493,11 @@ if (is_metaconsole() === false) {
['type' => 'form_action']
);
}
} else {
html_print_action_buttons(
'',
['type' => 'form_action']
);
}
} else {
echo "<form method='post' action='index.php?sec=galertas&sec2=godmode/alerts/alert_list&tab=builder&pure=0'>";

View File

@ -430,23 +430,25 @@ if (function_exists('policies_get_policies') === true) {
}
}
$table->data[2][1] = html_print_label_input_block(
__('Policies'),
html_print_select(
$fields,
'policies',
$policies,
'',
__('All'),
0,
true,
false,
true,
'w100p',
false,
'width: 100%'
)
);
if (enterprise_installed() === true) {
$table->data[2][1] = html_print_label_input_block(
__('Policies'),
html_print_select(
$fields,
'policies',
$policies,
'',
__('All'),
0,
true,
false,
true,
'w100p',
false,
'width: 100%'
)
);
}
$custom_fields = db_get_all_fields_in_table('tagent_custom_fields');
if ($custom_fields === false) {

View File

@ -142,7 +142,7 @@ if (empty($agent['os_version']) !== true) {
$table_status->data['agent_os_version'][1] = $os_agent_text;
}
$addresses = agents_get_addresses($id_agente);
$addresses = agents_get_addresses($id_agente, true);
$address = agents_get_address($id_agente);
foreach ($addresses as $k => $add) {
@ -154,8 +154,30 @@ foreach ($addresses as $k => $add) {
if (empty($address) === false) {
$address_text = '<span class="bolder" >'.$address.'</span>';
if (!empty($addresses) === true) {
foreach ($addresses as $sec_address) {
$address_text .= '<br/><span class="italic">'.$sec_address.'</span>';
if (count($addresses) > 3) {
$address_text .= '&nbsp&nbsp<span id="deploy_sec_ips_down">'.html_print_image(
'images/sort_down_black.png',
true,
['alt' => 'down']
).'</span><span id="deploy_sec_ips_up" style="display: none;">'.html_print_image(
'images/sort_up_black.png',
true,
['alt' => 'up']
).'</span>';
$address_text .= '<div id="secondary_ips" class="invisible">';
}
$first_key = key($addresses);
foreach ($addresses as $key => $sec_address) {
if ($first_key !== $key || count($addresses) <= 3) {
$address_text .= '<br/>';
}
$address_text .= '<span class="italic">'.$sec_address.'</span>';
}
if (count($addresses) > 3) {
$address_text .= '</div>';
}
}
@ -638,3 +660,23 @@ if (isset($table_interface) === true) {
true
);
}
?>
<script type="text/javascript">
$(document).ready (function () {
$('#deploy_sec_ips_up').on('click', function() {
$('#secondary_ips').hide();
// Avoid setting display block property with show/hide methods.
$('#deploy_sec_ips_up').css('display', 'none');
$('#deploy_sec_ips_down').css('display', '');
});
$('#deploy_sec_ips_down').on('click', function() {
$('#secondary_ips').show();
// Avoid setting display block property with show/hide methods.
$('#deploy_sec_ips_down').css('display', 'none');
$('#deploy_sec_ips_up').css('display', '');
});
});
</script>

Some files were not shown because too many files have changed in this diff Show More