Merge remote-tracking branch 'origin/develop' into ent-8827-cambios-visuales-en-widget-agents-modules
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.762, AIX version
|
||||
# Version 7.0NG.763, AIX version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.762, FreeBSD Version
|
||||
# Version 7.0NG.763, FreeBSD Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.762, HP-UX Version
|
||||
# Version 7.0NG.763, HP-UX Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.762, GNU/Linux
|
||||
# Version 7.0NG.763, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.762, GNU/Linux
|
||||
# Version 7.0NG.763, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.762, Solaris Version
|
||||
# Version 7.0NG.763, Solaris Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Base config file for Pandora FMS Windows Agent
|
||||
# (c) 2006-2021 Artica Soluciones Tecnologicas
|
||||
# Version 7.0NG.762
|
||||
# Version 7.0NG.763
|
||||
# This program is Free Software, you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public Licence as published by the Free Software
|
||||
# Foundation; either version 2 of the Licence or any later version
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.762, AIX version
|
||||
# Version 7.0NG.763, AIX version
|
||||
|
||||
# General Parameters
|
||||
# ==================
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.762
|
||||
# Version 7.0NG.763
|
||||
# FreeBSD/IPSO version
|
||||
# Licenced under GPL licence, 2003-2007 Sancho Lerena
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.762, HPUX Version
|
||||
# Version 7.0NG.763, HPUX Version
|
||||
|
||||
# General Parameters
|
||||
# ==================
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.762
|
||||
# Version 7.0NG.763
|
||||
# Licensed under GPL license v2,
|
||||
# (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# please visit http://pandora.sourceforge.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.762
|
||||
# Version 7.0NG.763
|
||||
# Licensed under GPL license v2,
|
||||
# (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# please visit http://pandora.sourceforge.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.762
|
||||
# Version 7.0NG.763
|
||||
# Licensed under GPL license v2,
|
||||
# please visit http://pandora.sourceforge.net
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.762, Solaris version
|
||||
# Version 7.0NG.763, Solaris version
|
||||
|
||||
# General Parameters
|
||||
# ==================
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.762, AIX version
|
||||
# Version 7.0NG.763, AIX version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.762-220621
|
||||
Version: 7.0NG.763-220627
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.762-220621"
|
||||
pandora_version="7.0NG.763-220627"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
|
|
@ -31,7 +31,7 @@ fi
|
|||
if [ "$#" -ge 2 ]; then
|
||||
VERSION="$2"
|
||||
else
|
||||
VERSION="7.0NG.762"
|
||||
VERSION="7.0NG.763"
|
||||
fi
|
||||
|
||||
# Path for the generated DMG file
|
||||
|
|
|
@ -19,11 +19,11 @@
|
|||
<choice id="com.pandorafms.pandorafms_src" visible="false">
|
||||
<pkg-ref id="com.pandorafms.pandorafms_src"/>
|
||||
</choice>
|
||||
<pkg-ref id="com.pandorafms.pandorafms_src" version="7.0NG.762" onConclusion="none">pandorafms_src.pdk</pkg-ref>
|
||||
<pkg-ref id="com.pandorafms.pandorafms_src" version="7.0NG.763" onConclusion="none">pandorafms_src.pdk</pkg-ref>
|
||||
<choice id="com.pandorafms.pandorafms_uninstall" visible="true" customLocation="/Applications">
|
||||
<pkg-ref id="com.pandorafms.pandorafms_uninstall"/>
|
||||
</choice>
|
||||
<pkg-ref id="com.pandorafms.pandorafms_uninstall" version="7.0NG.762" onConclusion="none">pandorafms_uninstall.pdk</pkg-ref>
|
||||
<pkg-ref id="com.pandorafms.pandorafms_uninstall" version="7.0NG.763" onConclusion="none">pandorafms_uninstall.pdk</pkg-ref>
|
||||
<!-- <installation-check script="check()" />
|
||||
<script>
|
||||
<![CDATA[
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
<key>CFBundleIconFile</key> <string>pandorafms.icns</string>
|
||||
<key>CFBundleIdentifier</key> <string>com.pandorafms.pandorafms_uninstall</string>
|
||||
|
||||
<key>CFBundleVersion</key> <string>7.0NG.762</string>
|
||||
<key>CFBundleGetInfoString</key> <string>7.0NG.762 Pandora FMS Agent uninstaller for MacOS by Artica ST on Aug 2020</string>
|
||||
<key>CFBundleShortVersionString</key> <string>7.0NG.762</string>
|
||||
<key>CFBundleVersion</key> <string>7.0NG.763</string>
|
||||
<key>CFBundleGetInfoString</key> <string>7.0NG.763 Pandora FMS Agent uninstaller for MacOS by Artica ST on Aug 2020</string>
|
||||
<key>CFBundleShortVersionString</key> <string>7.0NG.763</string>
|
||||
|
||||
<key>NSPrincipalClass</key><string>NSApplication</string>
|
||||
<key>NSMainNibFile</key><string>MainMenu</string>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.762, GNU/Linux
|
||||
# Version 7.0NG.763, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.762, FreeBSD Version
|
||||
# Version 7.0NG.763, FreeBSD Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.762, HP-UX Version
|
||||
# Version 7.0NG.763, HP-UX Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.762, GNU/Linux
|
||||
# Version 7.0NG.763, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.762, GNU/Linux
|
||||
# Version 7.0NG.763, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.762, NetBSD Version
|
||||
# Version 7.0NG.763, NetBSD Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.762, Solaris Version
|
||||
# Version 7.0NG.763, Solaris Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1014,8 +1014,8 @@ my $Sem = undef;
|
|||
# Semaphore used to control the number of threads
|
||||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '7.0NG.762';
|
||||
use constant AGENT_BUILD => '220621';
|
||||
use constant AGENT_VERSION => '7.0NG.763';
|
||||
use constant AGENT_BUILD => '220627';
|
||||
|
||||
# Agent log default file size maximum and instances
|
||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
#Pandora FMS Linux Agent
|
||||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.762
|
||||
%define release 220621
|
||||
%define version 7.0NG.763
|
||||
%define release 220627
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
#Pandora FMS Linux Agent
|
||||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.762
|
||||
%define release 220621
|
||||
%define version 7.0NG.763
|
||||
%define release 220627
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
# Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license.
|
||||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.762"
|
||||
PI_BUILD="220621"
|
||||
PI_VERSION="7.0NG.763"
|
||||
PI_BUILD="220627"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Base config file for Pandora FMS Windows Agent
|
||||
# (c) 2006-2021 Artica Soluciones Tecnologicas
|
||||
# Version 7.0NG.762
|
||||
# Version 7.0NG.763
|
||||
# This program is Free Software, you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public Licence as published by the Free Software
|
||||
# Foundation; either version 2 of the Licence or any later version
|
||||
|
|
|
@ -3,7 +3,7 @@ AllowLanguageSelection
|
|||
{Yes}
|
||||
|
||||
AppName
|
||||
{Pandora FMS Windows Agent v7.0NG.762}
|
||||
{Pandora FMS Windows Agent v7.0NG.763}
|
||||
|
||||
ApplicationID
|
||||
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
|
||||
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{220621}
|
||||
{220627}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("7.0NG.762 Build 220621")
|
||||
#define PANDORA_VERSION ("7.0NG.763 Build 220627")
|
||||
|
||||
string pandora_path;
|
||||
string pandora_dir;
|
||||
|
|
|
@ -11,7 +11,7 @@ BEGIN
|
|||
VALUE "LegalCopyright", "Artica ST"
|
||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||
VALUE "ProductVersion", "(7.0NG.762(Build 220621))"
|
||||
VALUE "ProductVersion", "(7.0NG.763(Build 220627))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 7.0NG.762-220621
|
||||
Version: 7.0NG.763-220627
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.762-220621"
|
||||
pandora_version="7.0NG.763-220627"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
},
|
||||
"require": {
|
||||
"mpdf/mpdf": "^8.0.15",
|
||||
"swiftmailer/swiftmailer": "^6.0"
|
||||
"swiftmailer/swiftmailer": "^6.0",
|
||||
"amphp/parallel-functions": "^1.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
@ -23,7 +24,10 @@
|
|||
"PandoraFMS\\": "include/lib",
|
||||
"PandoraFMS\\Enterprise\\": "enterprise/include/lib",
|
||||
"UpdateManager\\": "update_manager_client/lib/UpdateManager"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"include/global_config.php"
|
||||
]
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
|
|
|
@ -4,8 +4,551 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "1ca1e8936d9ffb13f23a5b5cefbf02ad",
|
||||
"content-hash": "643ac0dc8a8e1f129104399054f8dd0c",
|
||||
"packages": [
|
||||
{
|
||||
"name": "amphp/amp",
|
||||
"version": "v2.6.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/amphp/amp.git",
|
||||
"reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/amphp/amp/zipball/9d5100cebffa729aaffecd3ad25dc5aeea4f13bb",
|
||||
"reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"amphp/php-cs-fixer-config": "dev-master",
|
||||
"amphp/phpunit-util": "^1",
|
||||
"ext-json": "*",
|
||||
"jetbrains/phpstorm-stubs": "^2019.3",
|
||||
"phpunit/phpunit": "^7 | ^8 | ^9",
|
||||
"psalm/phar": "^3.11@dev",
|
||||
"react/promise": "^2"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"lib/functions.php",
|
||||
"lib/Internal/functions.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Amp\\": "lib"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Daniel Lowrey",
|
||||
"email": "rdlowrey@php.net"
|
||||
},
|
||||
{
|
||||
"name": "Aaron Piotrowski",
|
||||
"email": "aaron@trowski.com"
|
||||
},
|
||||
{
|
||||
"name": "Bob Weinand",
|
||||
"email": "bobwei9@hotmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Niklas Keller",
|
||||
"email": "me@kelunik.com"
|
||||
}
|
||||
],
|
||||
"description": "A non-blocking concurrency framework for PHP applications.",
|
||||
"homepage": "https://amphp.org/amp",
|
||||
"keywords": [
|
||||
"async",
|
||||
"asynchronous",
|
||||
"awaitable",
|
||||
"concurrency",
|
||||
"event",
|
||||
"event-loop",
|
||||
"future",
|
||||
"non-blocking",
|
||||
"promise"
|
||||
],
|
||||
"support": {
|
||||
"irc": "irc://irc.freenode.org/amphp",
|
||||
"issues": "https://github.com/amphp/amp/issues",
|
||||
"source": "https://github.com/amphp/amp/tree/v2.6.2"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/amphp",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2022-02-20T17:52:18+00:00"
|
||||
},
|
||||
{
|
||||
"name": "amphp/byte-stream",
|
||||
"version": "v1.8.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/amphp/byte-stream.git",
|
||||
"reference": "acbd8002b3536485c997c4e019206b3f10ca15bd"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/amphp/byte-stream/zipball/acbd8002b3536485c997c4e019206b3f10ca15bd",
|
||||
"reference": "acbd8002b3536485c997c4e019206b3f10ca15bd",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"amphp/amp": "^2",
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"amphp/php-cs-fixer-config": "dev-master",
|
||||
"amphp/phpunit-util": "^1.4",
|
||||
"friendsofphp/php-cs-fixer": "^2.3",
|
||||
"jetbrains/phpstorm-stubs": "^2019.3",
|
||||
"phpunit/phpunit": "^6 || ^7 || ^8",
|
||||
"psalm/phar": "^3.11.4"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"lib/functions.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Amp\\ByteStream\\": "lib"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Aaron Piotrowski",
|
||||
"email": "aaron@trowski.com"
|
||||
},
|
||||
{
|
||||
"name": "Niklas Keller",
|
||||
"email": "me@kelunik.com"
|
||||
}
|
||||
],
|
||||
"description": "A stream abstraction to make working with non-blocking I/O simple.",
|
||||
"homepage": "http://amphp.org/byte-stream",
|
||||
"keywords": [
|
||||
"amp",
|
||||
"amphp",
|
||||
"async",
|
||||
"io",
|
||||
"non-blocking",
|
||||
"stream"
|
||||
],
|
||||
"support": {
|
||||
"irc": "irc://irc.freenode.org/amphp",
|
||||
"issues": "https://github.com/amphp/byte-stream/issues",
|
||||
"source": "https://github.com/amphp/byte-stream/tree/v1.8.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/amphp",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-03-30T17:13:30+00:00"
|
||||
},
|
||||
{
|
||||
"name": "amphp/parallel",
|
||||
"version": "v1.4.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/amphp/parallel.git",
|
||||
"reference": "fbc128383c1ffb3823866f71b88d8c4722a25ce9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/amphp/parallel/zipball/fbc128383c1ffb3823866f71b88d8c4722a25ce9",
|
||||
"reference": "fbc128383c1ffb3823866f71b88d8c4722a25ce9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"amphp/amp": "^2",
|
||||
"amphp/byte-stream": "^1.6.1",
|
||||
"amphp/parser": "^1",
|
||||
"amphp/process": "^1",
|
||||
"amphp/serialization": "^1",
|
||||
"amphp/sync": "^1.0.1",
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"amphp/php-cs-fixer-config": "dev-master",
|
||||
"amphp/phpunit-util": "^1.1",
|
||||
"phpunit/phpunit": "^8 || ^7"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"lib/Context/functions.php",
|
||||
"lib/Sync/functions.php",
|
||||
"lib/Worker/functions.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Amp\\Parallel\\": "lib"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Aaron Piotrowski",
|
||||
"email": "aaron@trowski.com"
|
||||
},
|
||||
{
|
||||
"name": "Stephen Coakley",
|
||||
"email": "me@stephencoakley.com"
|
||||
}
|
||||
],
|
||||
"description": "Parallel processing component for Amp.",
|
||||
"homepage": "https://github.com/amphp/parallel",
|
||||
"keywords": [
|
||||
"async",
|
||||
"asynchronous",
|
||||
"concurrent",
|
||||
"multi-processing",
|
||||
"multi-threading"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/amphp/parallel/issues",
|
||||
"source": "https://github.com/amphp/parallel/tree/v1.4.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/amphp",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-10-25T19:16:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "amphp/parallel-functions",
|
||||
"version": "v1.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/amphp/parallel-functions.git",
|
||||
"reference": "af9795d51abfafc3676cbe7e17965479491abaad"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/amphp/parallel-functions/zipball/af9795d51abfafc3676cbe7e17965479491abaad",
|
||||
"reference": "af9795d51abfafc3676cbe7e17965479491abaad",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"amphp/amp": "^2.0.3",
|
||||
"amphp/parallel": "^1.1",
|
||||
"opis/closure": "^3.0.7",
|
||||
"php": ">=7"
|
||||
},
|
||||
"require-dev": {
|
||||
"amphp/phpunit-util": "^1.0",
|
||||
"friendsofphp/php-cs-fixer": "^2.9",
|
||||
"phpunit/phpunit": "^6.5"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"src/functions.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Amp\\ParallelFunctions\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Niklas Keller",
|
||||
"email": "me@kelunik.com"
|
||||
}
|
||||
],
|
||||
"description": "Parallel processing made simple.",
|
||||
"support": {
|
||||
"issues": "https://github.com/amphp/parallel-functions/issues",
|
||||
"source": "https://github.com/amphp/parallel-functions/tree/master"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/amphp",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2020-07-10T17:05:35+00:00"
|
||||
},
|
||||
{
|
||||
"name": "amphp/parser",
|
||||
"version": "v1.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/amphp/parser.git",
|
||||
"reference": "f83e68f03d5b8e8e0365b8792985a7f341c57ae1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/amphp/parser/zipball/f83e68f03d5b8e8e0365b8792985a7f341c57ae1",
|
||||
"reference": "f83e68f03d5b8e8e0365b8792985a7f341c57ae1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "^2.3",
|
||||
"phpunit/phpunit": "^6"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Amp\\Parser\\": "lib"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Niklas Keller",
|
||||
"email": "me@kelunik.com"
|
||||
},
|
||||
{
|
||||
"name": "Aaron Piotrowski",
|
||||
"email": "aaron@trowski.com"
|
||||
}
|
||||
],
|
||||
"description": "A generator parser to make streaming parsers simple.",
|
||||
"homepage": "https://github.com/amphp/parser",
|
||||
"keywords": [
|
||||
"async",
|
||||
"non-blocking",
|
||||
"parser",
|
||||
"stream"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/amphp/parser/issues",
|
||||
"source": "https://github.com/amphp/parser/tree/is-valid"
|
||||
},
|
||||
"time": "2017-06-06T05:29:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "amphp/process",
|
||||
"version": "v1.1.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/amphp/process.git",
|
||||
"reference": "f09e3ed3b0a953ccbfff1140f12be4a884f0aa83"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/amphp/process/zipball/f09e3ed3b0a953ccbfff1140f12be4a884f0aa83",
|
||||
"reference": "f09e3ed3b0a953ccbfff1140f12be4a884f0aa83",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"amphp/amp": "^2",
|
||||
"amphp/byte-stream": "^1.4",
|
||||
"php": ">=7"
|
||||
},
|
||||
"require-dev": {
|
||||
"amphp/php-cs-fixer-config": "dev-master",
|
||||
"amphp/phpunit-util": "^1",
|
||||
"phpunit/phpunit": "^6"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"lib/functions.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Amp\\Process\\": "lib"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Bob Weinand",
|
||||
"email": "bobwei9@hotmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Aaron Piotrowski",
|
||||
"email": "aaron@trowski.com"
|
||||
},
|
||||
{
|
||||
"name": "Niklas Keller",
|
||||
"email": "me@kelunik.com"
|
||||
}
|
||||
],
|
||||
"description": "Asynchronous process manager.",
|
||||
"homepage": "https://github.com/amphp/process",
|
||||
"support": {
|
||||
"issues": "https://github.com/amphp/process/issues",
|
||||
"source": "https://github.com/amphp/process/tree/v1.1.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/amphp",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-12-17T19:09:33+00:00"
|
||||
},
|
||||
{
|
||||
"name": "amphp/serialization",
|
||||
"version": "v1.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/amphp/serialization.git",
|
||||
"reference": "693e77b2fb0b266c3c7d622317f881de44ae94a1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/amphp/serialization/zipball/693e77b2fb0b266c3c7d622317f881de44ae94a1",
|
||||
"reference": "693e77b2fb0b266c3c7d622317f881de44ae94a1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"amphp/php-cs-fixer-config": "dev-master",
|
||||
"phpunit/phpunit": "^9 || ^8 || ^7"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"src/functions.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Amp\\Serialization\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Aaron Piotrowski",
|
||||
"email": "aaron@trowski.com"
|
||||
},
|
||||
{
|
||||
"name": "Niklas Keller",
|
||||
"email": "me@kelunik.com"
|
||||
}
|
||||
],
|
||||
"description": "Serialization tools for IPC and data storage in PHP.",
|
||||
"homepage": "https://github.com/amphp/serialization",
|
||||
"keywords": [
|
||||
"async",
|
||||
"asynchronous",
|
||||
"serialization",
|
||||
"serialize"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/amphp/serialization/issues",
|
||||
"source": "https://github.com/amphp/serialization/tree/master"
|
||||
},
|
||||
"time": "2020-03-25T21:39:07+00:00"
|
||||
},
|
||||
{
|
||||
"name": "amphp/sync",
|
||||
"version": "v1.4.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/amphp/sync.git",
|
||||
"reference": "85ab06764f4f36d63b1356b466df6111cf4b89cf"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/amphp/sync/zipball/85ab06764f4f36d63b1356b466df6111cf4b89cf",
|
||||
"reference": "85ab06764f4f36d63b1356b466df6111cf4b89cf",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"amphp/amp": "^2.2",
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"amphp/php-cs-fixer-config": "dev-master",
|
||||
"amphp/phpunit-util": "^1.1",
|
||||
"phpunit/phpunit": "^9 || ^8 || ^7"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"src/functions.php",
|
||||
"src/ConcurrentIterator/functions.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Amp\\Sync\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Aaron Piotrowski",
|
||||
"email": "aaron@trowski.com"
|
||||
},
|
||||
{
|
||||
"name": "Stephen Coakley",
|
||||
"email": "me@stephencoakley.com"
|
||||
}
|
||||
],
|
||||
"description": "Mutex, Semaphore, and other synchronization tools for Amp.",
|
||||
"homepage": "https://github.com/amphp/sync",
|
||||
"keywords": [
|
||||
"async",
|
||||
"asynchronous",
|
||||
"mutex",
|
||||
"semaphore",
|
||||
"synchronization"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/amphp/sync/issues",
|
||||
"source": "https://github.com/amphp/sync/tree/v1.4.2"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/amphp",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-10-25T18:29:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/lexer",
|
||||
"version": "1.2.2",
|
||||
|
@ -280,6 +823,71 @@
|
|||
],
|
||||
"time": "2020-11-13T09:40:50+00:00"
|
||||
},
|
||||
{
|
||||
"name": "opis/closure",
|
||||
"version": "3.6.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/opis/closure.git",
|
||||
"reference": "3d81e4309d2a927abbe66df935f4bb60082805ad"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/opis/closure/zipball/3d81e4309d2a927abbe66df935f4bb60082805ad",
|
||||
"reference": "3d81e4309d2a927abbe66df935f4bb60082805ad",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.4 || ^7.0 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"jeremeamia/superclosure": "^2.0",
|
||||
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.6.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"functions.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Opis\\Closure\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Marius Sarca",
|
||||
"email": "marius.sarca@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Sorin Sarca",
|
||||
"email": "sarca_sorin@hotmail.com"
|
||||
}
|
||||
],
|
||||
"description": "A library that can be used to serialize closures (anonymous functions) and arbitrary objects.",
|
||||
"homepage": "https://opis.io/closure",
|
||||
"keywords": [
|
||||
"anonymous functions",
|
||||
"closure",
|
||||
"function",
|
||||
"serializable",
|
||||
"serialization",
|
||||
"serialize"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/opis/closure/issues",
|
||||
"source": "https://github.com/opis/closure/tree/3.6.3"
|
||||
},
|
||||
"time": "2022-01-27T09:35:39+00:00"
|
||||
},
|
||||
{
|
||||
"name": "paragonie/random_compat",
|
||||
"version": "v9.99.100",
|
||||
|
|
|
@ -1665,4 +1665,4 @@ godmode/um_client/vendor/sebastian/object-enumerator/tests
|
|||
godmode/um_client/vendor/sebastian/object-enumerator
|
||||
godmode/um_client/vendor/sebastian
|
||||
godmode/um_client/vendor
|
||||
/update_manager_client/resources/styles/pandora.css
|
||||
update_manager_client/resources/styles/pandora.css
|
||||
|
|
|
@ -35,11 +35,33 @@ ALTER TABLE `treset_pass` MODIFY COLUMN `id_user` VARCHAR(255) NOT NULL DEFAULT
|
|||
ALTER TABLE `tuser_task_scheduled` MODIFY COLUMN `id_usuario` VARCHAR(255) NOT NULL DEFAULT '0';
|
||||
ALTER TABLE `tbackup` MODIFY COLUMN `id_user` VARCHAR(255) DEFAULT '';
|
||||
|
||||
ALTER TABLE `tservice` ADD COLUMN `enable_sunburst` tinyint(1) NOT NULL default 0;
|
||||
ALTER TABLE `tservice` ADD COLUMN `enable_sunburst` TINYINT NOT NULL DEFAULT 0;
|
||||
ALTER TABLE `tservice` ADD COLUMN `asynchronous` TINYINT NOT NULL DEFAULT 0;
|
||||
ALTER TABLE `tservice` ADD COLUMN `rca` TEXT;
|
||||
|
||||
ALTER TABLE `tdashboard` MODIFY `name` TEXT NOT NULL DEFAULT '';
|
||||
|
||||
ALTER TABLE `tevent_alert` ADD COLUMN `field1_recovery` TEXT AFTER `recovery_notify`;
|
||||
ALTER TABLE `tevent_alert` ADD COLUMN `field4_recovery` TEXT AFTER `field3_recovery`;
|
||||
ALTER TABLE `tevent_alert` ADD COLUMN `field5_recovery` TEXT AFTER `field4_recovery`;
|
||||
ALTER TABLE `tevent_alert` ADD COLUMN `field6_recovery` TEXT AFTER `field5_recovery`;
|
||||
ALTER TABLE `tevent_alert` ADD COLUMN `field7_recovery` TEXT AFTER `field6_recovery`;
|
||||
ALTER TABLE `tevent_alert` ADD COLUMN `field8_recovery` TEXT AFTER `field7_recovery`;
|
||||
ALTER TABLE `tevent_alert` ADD COLUMN `field9_recovery` TEXT AFTER `field8_recovery`;
|
||||
ALTER TABLE `tevent_alert` ADD COLUMN `field10_recovery` TEXT AFTER `field9_recovery`;
|
||||
|
||||
ALTER TABLE `tagente` ADD COLUMN `satellite_server` INT NOT NULL default 0;
|
||||
ALTER TABLE `tmetaconsole_agent` ADD COLUMN `satellite_server` INT NOT NULL default 0;
|
||||
|
||||
ALTER TABLE `tmetaconsole_setup` DROP COLUMN `last_event_replication`;
|
||||
DELETE FROM `tconfig` WHERE `token` LIKE 'event_replication';
|
||||
DELETE FROM `tconfig` WHERE `token` LIKE 'replication_interval';
|
||||
DELETE FROM `tconfig` WHERE `token` LIKE 'replication_limit';
|
||||
DELETE FROM `tconfig` WHERE `token` LIKE 'replication_mode';
|
||||
DELETE FROM `tconfig` WHERE `token` LIKE 'show_events_in_local';
|
||||
|
||||
UPDATE tconfig SET value='' WHERE token='lts_name';
|
||||
|
||||
SET @st_oum763 = (SELECT IF(
|
||||
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'tautoconfig' AND table_schema = DATABASE() AND column_name = 'disabled') > 0,
|
||||
"SELECT 1",
|
||||
|
|
|
@ -412,8 +412,7 @@ CREATE TABLE IF NOT EXISTS `tmetaconsole_setup` (
|
|||
`auth_token` text default '',
|
||||
`id_group` int(10) unsigned NOT NULL default 0,
|
||||
`api_password` text NOT NULL,
|
||||
`disabled` tinyint(1) unsigned NOT NULL default '0',
|
||||
`last_event_replication` bigint(20) default '0'
|
||||
`disabled` tinyint(1) unsigned NOT NULL default '0'
|
||||
) ENGINE=InnoDB
|
||||
COMMENT = 'Table to store metaconsole sources'
|
||||
DEFAULT CHARSET=utf8;
|
||||
|
|
|
@ -288,7 +288,7 @@ foreach ($sessions as $session) {
|
|||
array_push($table->data, $data);
|
||||
}
|
||||
|
||||
$activity .= html_print_table($table, true);
|
||||
$activity = html_print_table($table, true);
|
||||
unset($table);
|
||||
|
||||
ui_toggle(
|
||||
|
|
|
@ -337,7 +337,7 @@ if (($create != '') || ($view != '')) {
|
|||
|
||||
$data = [];
|
||||
$data[0] = __('Name');
|
||||
$data[1] = '<input type="text" name="form_name" size=100 value="'.$form_name.'">';
|
||||
$data[1] = '<input type="text" class="text_input" name="form_name" size=100 value="'.$form_name.'">';
|
||||
$table->colspan['plugin_name'][1] = 3;
|
||||
$table->data['plugin_name'] = $data;
|
||||
|
||||
|
@ -399,7 +399,7 @@ if (($create != '') || ($view != '')) {
|
|||
|
||||
$data = [];
|
||||
$data[0] = __('Plugin command').ui_print_help_tip(__('Specify interpreter and plugin path. The server needs permissions to run it.'), true);
|
||||
$data[1] = '<input type="text" name="form_execute" id="form_execute" class="command_component command_advanced_conf" size=100 value="'.$form_execute.'" '.$disabled.'>';
|
||||
$data[1] = '<input type="text" name="form_execute" id="form_execute" class="command_component command_advanced_conf text_input" size=100 value="'.$form_execute.'" '.$disabled.'>';
|
||||
if ($locked) {
|
||||
$data[1] .= html_print_image('images/lock_mc.png', true, ['class' => 'command_advanced_conf lock', 'class' => 'invert_filter']);
|
||||
}
|
||||
|
@ -411,7 +411,7 @@ if (($create != '') || ($view != '')) {
|
|||
|
||||
$data = [];
|
||||
$data[0] = __('Plug-in parameters');
|
||||
$data[1] = '<input type="text" name="form_parameters" id="form_parameters" class="command_component command_advanced_conf" size=100 value="'.$parameters.'" '.$disabled.'>';
|
||||
$data[1] = '<input type="text" name="form_parameters" id="form_parameters" class="command_component command_advanced_conf text_input" size=100 value="'.$parameters.'" '.$disabled.'>';
|
||||
if ($locked) {
|
||||
$data[1] .= html_print_image('images/lock_mc.png', true, ['class' => 'command_advanced_conf lock', 'class' => 'invert_filter']);
|
||||
}
|
||||
|
@ -484,13 +484,13 @@ if (($create != '') || ($view != '')) {
|
|||
$datam = [];
|
||||
$datam[0] = __('Description')."<span class='normal_weight'> ($macro_name)</span>";
|
||||
$datam[0] .= html_print_input_hidden($macro_name_name, $macro_name, true);
|
||||
$datam[1] = html_print_input_text_extended($macro_desc_name, $macro_desc_value, 'text-'.$macro_desc_name, '', 30, 255, $locked, '', "class='command_macro'", true);
|
||||
$datam[1] = html_print_input_text_extended($macro_desc_name, $macro_desc_value, 'text-'.$macro_desc_name, '', 30, 255, $locked, '', "class='command_macro text_input'", true);
|
||||
if ($locked) {
|
||||
$datam[1] .= html_print_image('images/lock_mc.png', true, ['class' => 'command_macro lock', 'class' => 'invert_filter']);
|
||||
}
|
||||
|
||||
$datam[2] = __('Default value')."<span class='normal_weight'> ($macro_name)</span>";
|
||||
$datam[3] = html_print_input_text_extended($macro_value_name, $macro_value_value, 'text-'.$macro_value_name, '', 30, 255, $locked, '', "class='command_component command_macro'", true);
|
||||
$datam[3] = html_print_input_text_extended($macro_value_name, $macro_value_value, 'text-'.$macro_value_name, '', 30, 255, $locked, '', "class='command_component command_macro text_input'", true);
|
||||
if ($locked) {
|
||||
$datam[3] .= html_print_image('images/lock_mc.png', true, ['class' => 'command_macro lock', 'class' => 'invert_filter']);
|
||||
}
|
||||
|
|
|
@ -114,11 +114,11 @@ if ((isset($_GET['form_add'])) or (isset($_GET['form_edit']))) {
|
|||
echo "'>";
|
||||
echo '<tr>
|
||||
<td class="datos">'.__('Link name').'</td>
|
||||
<td class="datos"><input type="text" name="name" size="35" value="'.$nombre.'"></td>';
|
||||
<td class="datos"><input type="text" class="text_input" name="name" size="50" value="'.$nombre.'"></td>';
|
||||
echo '</tr><tr>
|
||||
<td class="datos2">'.__('Link').'</td>
|
||||
<td class="datos2">
|
||||
<input type="text" name="link" size="50" value="'.$link.'"></td>';
|
||||
<input type="text" class="text_input" name="link" size="50" value="'.$link.'"></td>';
|
||||
echo '</tr>';
|
||||
echo '</table>';
|
||||
echo "<table width='100%'>";
|
||||
|
|
|
@ -181,7 +181,7 @@ if ((isset($_GET['form_add'])) || (isset($_GET['form_edit']))) {
|
|||
|
||||
$data = [];
|
||||
$data[0] = __('Subject').'<br>';
|
||||
$data[0] .= '<input type="text" name="subject" size="35" value="'.$subject.'" >';
|
||||
$data[0] .= '<input type="text" class="text_input" name="subject" size="35" value="'.$subject.'" >';
|
||||
|
||||
$data[1] = __('Group').'<br>';
|
||||
$data[1] .= '<div class="w250px">';
|
||||
|
|
|
@ -663,6 +663,16 @@ $tip = ui_print_help_tip(
|
|||
true
|
||||
);
|
||||
|
||||
$table_other->data[$i][0] = __('WMI binary');
|
||||
$table_other->data[$i++][1] = html_print_input_text(
|
||||
'wmiBinary',
|
||||
$config['wmiBinary'],
|
||||
'',
|
||||
50,
|
||||
50,
|
||||
true
|
||||
);
|
||||
|
||||
if (enterprise_installed() === true) {
|
||||
$table_other->data[$i][0] = __('PhantomJS cache cleanup ').$tip;
|
||||
$table_other->data[$i++][1] = html_print_input(
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
// Load global vars
|
||||
// Load global vars.
|
||||
global $config;
|
||||
|
||||
check_login();
|
||||
|
@ -181,7 +181,8 @@ $backgrounds_list = array_merge($backgrounds_list_jpg, $backgrounds_list_png);
|
|||
$backgrounds_list = array_merge($backgrounds_list, $backgrounds_list_gif);
|
||||
asort($backgrounds_list);
|
||||
|
||||
if (!enterprise_installed()) {
|
||||
$open = false;
|
||||
if (enterprise_installed() === false) {
|
||||
$open = true;
|
||||
}
|
||||
|
||||
|
@ -953,7 +954,7 @@ $options_full_escale[2] = __('On Boolean graphs');
|
|||
$table_chars->data[$row][1] = html_print_select(
|
||||
$options_full_escale,
|
||||
'full_scale_option',
|
||||
$config['full_scale_option'],
|
||||
(isset($config['full_scale_option']) === true) ? $config['full_scale_option'] : 0,
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
|
@ -973,7 +974,7 @@ $options_soft_graphs[1] = __('Show MAX/AVG/MIN by default');
|
|||
$table_chars->data[$row][1] = html_print_select(
|
||||
$options_soft_graphs,
|
||||
'type_mode_graph',
|
||||
$config['type_mode_graph'],
|
||||
(isset($config['type_mode_graph']) === true) ? $config['type_mode_graph'] : 0,
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
|
@ -1053,13 +1054,31 @@ $table_vc->data[$row][1] = html_print_extended_select_for_time(
|
|||
$row++;
|
||||
|
||||
$table_vc->data[$row][0] = __('Default interval for refresh on Visual Console');
|
||||
$table_vc->data[$row][1] = html_print_select($values, 'vc_refr', (int) $config['vc_refr'], '', 'N/A', 0, true, false, false);
|
||||
$table_vc->data[$row][1] = html_print_select(
|
||||
$values,
|
||||
'vc_refr',
|
||||
(int) $config['vc_refr'],
|
||||
'',
|
||||
'N/A',
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
false
|
||||
);
|
||||
$row++;
|
||||
|
||||
$vc_favourite_view_array[0] = __('Classic view');
|
||||
$vc_favourite_view_array[1] = __('View of favorites');
|
||||
$table_vc->data[$row][0] = __('Type of view of visual consoles');
|
||||
$table_vc->data[$row][1] = html_print_select($vc_favourite_view_array, 'vc_favourite_view', $config['vc_favourite_view'], '', '', 0, true);
|
||||
$table_vc->data[$row][1] = html_print_select(
|
||||
$vc_favourite_view_array,
|
||||
'vc_favourite_view',
|
||||
$config['vc_favourite_view'],
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true
|
||||
);
|
||||
$row++;
|
||||
|
||||
$table_vc->data[$row][0] = __('Number of favorite visual consoles to show in the menu');
|
||||
|
@ -1067,7 +1086,23 @@ $table_vc->data[$row][1] = "<input type ='number' value=".$config['vc_menu_items
|
|||
$row++;
|
||||
|
||||
$table_vc->data[$row][0] = __('Default line thickness for the Visual Console');
|
||||
$table_vc->data[$row][1] = html_print_input_text('vc_line_thickness', (int) $config['vc_line_thickness'], '', 5, 5, true);
|
||||
$table_vc->data[$row][1] = html_print_input_text(
|
||||
'vc_line_thickness',
|
||||
(int) $config['vc_line_thickness'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table_vc->data[$row][0] = __('Mobile view not allow visual console orientation');
|
||||
$table_vc->data[$row][1] = html_print_checkbox_switch(
|
||||
'mobile_view_orientation_vc',
|
||||
1,
|
||||
(bool) $config['mobile_view_orientation_vc'],
|
||||
true
|
||||
);
|
||||
$row++;
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
@ -1133,7 +1168,17 @@ $interval_description = [
|
|||
'tiny' => 'Short',
|
||||
];
|
||||
$table_report->data[$row][0] = __('Interval description');
|
||||
$table_report->data[$row][1] = html_print_select($interval_description, 'interval_description', $config['interval_description'], '', '', '', true, false, false);
|
||||
$table_report->data[$row][1] = html_print_select(
|
||||
$interval_description,
|
||||
'interval_description',
|
||||
(isset($config['interval_description']) === true) ? $config['interval_description'] : 'large',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
false,
|
||||
false
|
||||
);
|
||||
|
||||
$row++;
|
||||
|
||||
|
|
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 109 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 16 KiB |
|
@ -278,6 +278,13 @@ class AgentWizard extends HTML
|
|||
*/
|
||||
private $extraArguments = '';
|
||||
|
||||
/**
|
||||
* Binary of wmic.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $wmiBinary = '';
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
@ -291,7 +298,7 @@ class AgentWizard extends HTML
|
|||
// Check access.
|
||||
check_login();
|
||||
|
||||
if (!check_acl($config['id_user'], 0, 'AR')) {
|
||||
if ((bool) check_acl($config['id_user'], 0, 'AR') === false) {
|
||||
db_pandora_audit(
|
||||
AUDIT_LOG_ACL_VIOLATION,
|
||||
'Trying to access event viewer'
|
||||
|
@ -311,6 +318,7 @@ class AgentWizard extends HTML
|
|||
$this->idAgent = get_parameter('id_agente', '');
|
||||
$this->idPolicy = get_parameter('id', '');
|
||||
$this->targetIp = get_parameter('targetIp', '');
|
||||
$this->wmiBinary = $config['wmiBinary'];
|
||||
|
||||
if (empty($this->idAgent) === false) {
|
||||
$array_aux = db_get_all_rows_sql(
|
||||
|
@ -1044,7 +1052,7 @@ class AgentWizard extends HTML
|
|||
$oidExplore = '.1.3.6.1.2.1.1.2.0';
|
||||
}
|
||||
|
||||
// Explore general or interfaces
|
||||
// Explore general or interfaces.
|
||||
$receivedOid = $this->snmpWalkValues(
|
||||
$oidExplore,
|
||||
false,
|
||||
|
@ -1080,7 +1088,7 @@ class AgentWizard extends HTML
|
|||
// Capture the parameters.
|
||||
// Call WMI Explorer function.
|
||||
$this->wmiCommand = wmi_compose_query(
|
||||
'wmic',
|
||||
$this->wmiBinary,
|
||||
$this->usernameWMI,
|
||||
$this->passwordWMI,
|
||||
$this->targetIp,
|
||||
|
@ -1090,12 +1098,15 @@ class AgentWizard extends HTML
|
|||
// the host is Windows (and allow WMI).
|
||||
$commandQuery = $this->wmiCommand;
|
||||
$commandQuery .= ' "SELECT Caption FROM Win32_ComputerSystem"';
|
||||
// Execute the wmic command.
|
||||
// Declare the vars.
|
||||
$result = [];
|
||||
exec($commandQuery, $result);
|
||||
$execCorrect = true;
|
||||
$returnVar = 0;
|
||||
$tmpError = '';
|
||||
|
||||
$execCorrect = true;
|
||||
// Execute the command.
|
||||
exec($commandQuery, $result, $returnVar);
|
||||
// Only is valid if return code is 0.
|
||||
if ($returnVar === 0) {
|
||||
// Look for the response if we have ERROR messages.
|
||||
foreach ($result as $info) {
|
||||
if (preg_match('/ERROR:/', $info) !== 0) {
|
||||
|
@ -1104,6 +1115,10 @@ class AgentWizard extends HTML
|
|||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$tmpError = sprintf('Return Code %s', $returnVar);
|
||||
$execCorrect = false;
|
||||
}
|
||||
|
||||
// FOUND ERRORS: TIMEOUT.
|
||||
// [0] => [librpc/rpc/dcerpc_connect.c:790:dcerpc_pipe_connect_b_recv()]
|
||||
|
@ -2806,7 +2821,7 @@ class AgentWizard extends HTML
|
|||
// Unpack the query filters.
|
||||
$queryFilters = json_decode($module['query_filters'], true);
|
||||
// Name of query filter field.
|
||||
$fieldValueName = $fieldSet[$queryFilters['field']];
|
||||
$fieldValueName = (empty($fieldSet[$queryFilters['field']]) === false) ? $fieldSet[$queryFilters['field']] : '1';
|
||||
|
||||
// Evaluate type of scan and execution.
|
||||
if ($module['scan_type'] == SCAN_TYPE_FIXED) {
|
||||
|
@ -2841,13 +2856,13 @@ class AgentWizard extends HTML
|
|||
|
||||
// If name of the module have a macro.
|
||||
$moduleBlocks[$k]['name'] = $this->macroFilter(
|
||||
$module['name'],
|
||||
io_safe_output($module['name']),
|
||||
$columnsList,
|
||||
$rowList
|
||||
);
|
||||
// Description can have macros too.
|
||||
$moduleBlocks[$k]['description'] = $this->macroFilter(
|
||||
$module['description'],
|
||||
io_safe_output($module['description']),
|
||||
$columnsList,
|
||||
$rowList
|
||||
);
|
||||
|
@ -2859,7 +2874,7 @@ class AgentWizard extends HTML
|
|||
);
|
||||
|
||||
foreach ($columnsList as $columnKey => $columnValue) {
|
||||
$macros['macros']['_'.$columnValue.'_'] = $rowList[$columnKey];
|
||||
$macros['macros']['_'.trim($columnValue).'_'] = $rowList[trim($columnKey)];
|
||||
}
|
||||
|
||||
$moduleBlocks[$k]['macros'] = json_encode($macros);
|
||||
|
@ -2892,6 +2907,7 @@ class AgentWizard extends HTML
|
|||
$dataCombined = array_combine($columnsList, $rowList);
|
||||
// Change the macros for values.
|
||||
foreach ($dataCombined as $macroKey => $macroValue) {
|
||||
$macroKey = trim($macroKey);
|
||||
if (preg_match('/_'.$macroKey.'_/', $valueOperation) !== 0) {
|
||||
$valueOperation = preg_replace(
|
||||
'/_'.$macroKey.'_/',
|
||||
|
@ -2937,19 +2953,19 @@ class AgentWizard extends HTML
|
|||
$rowList = explode('|', $rowContent);
|
||||
// If name of the module have a macro.
|
||||
$newModule['name'] = $this->macroFilter(
|
||||
$module['name'],
|
||||
io_safe_output($module['name']),
|
||||
$columnsList,
|
||||
$rowList
|
||||
);
|
||||
// Description can have macros too.
|
||||
$newModule['description'] = $this->macroFilter(
|
||||
$module['description'],
|
||||
io_safe_output($module['description']),
|
||||
$columnsList,
|
||||
$rowList
|
||||
);
|
||||
|
||||
$newModule['query_filters'] = $this->macroFilter(
|
||||
$module['query_filters'],
|
||||
io_safe_output($module['query_filters']),
|
||||
$columnsList,
|
||||
$rowList
|
||||
);
|
||||
|
@ -2995,6 +3011,7 @@ class AgentWizard extends HTML
|
|||
);
|
||||
// Change the macros for values.
|
||||
foreach ($dataCombined as $macroKey => $macroValue) {
|
||||
$macroKey = trim($macroKey);
|
||||
if (preg_match('/_'.$macroKey.'_/', $valueOperation) !== 0) {
|
||||
$valueOperation = preg_replace(
|
||||
'/_'.$macroKey.'_/',
|
||||
|
@ -3022,6 +3039,14 @@ class AgentWizard extends HTML
|
|||
}
|
||||
}
|
||||
|
||||
// If we not retrieve information (P.E. connection refused).
|
||||
if (empty($moduleBlocks) === true) {
|
||||
$this->message['type'][] = 'warning';
|
||||
$this->message['message'][] = __(
|
||||
'No information could be retrieved.'
|
||||
);
|
||||
$this->showMessage();
|
||||
} else {
|
||||
// Create the final table with all of data received.
|
||||
foreach ($moduleBlocks as $module) {
|
||||
// Prepare the blocks. If its new, create a new index.
|
||||
|
@ -3056,6 +3081,7 @@ class AgentWizard extends HTML
|
|||
// Add Create Modules form.
|
||||
$this->createModulesForm();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
@ -5542,13 +5568,13 @@ class AgentWizard extends HTML
|
|||
string $unit='',
|
||||
?int $type=0
|
||||
) {
|
||||
$output = '';
|
||||
try {
|
||||
// Avoid non-numeric or arithmetic chars for security reasons.
|
||||
if (preg_match('/(([^0-9\s\+\-\*\/\(\).,])+)/', $operation) === 1) {
|
||||
throw new Exception(sprintf(__("The operation '%s' is not permitted. Review for remote components."), $operation));
|
||||
} else {
|
||||
// Get the result of the operation and set it.
|
||||
$output = '';
|
||||
eval('$output = '.$operation.';');
|
||||
// If this module has unit, attach to current value.
|
||||
$output = $this->replacementUnit(
|
||||
|
|
|
@ -2743,7 +2743,7 @@ class ConsoleSupervisor
|
|||
$this->cleanNotifications('NOTIF.SYNCQUEUE.LENGTH.%');
|
||||
}
|
||||
|
||||
$items_min = $config['sync_queue_items_max'];
|
||||
$items_min = (isset($config['sync_queue_items_max']) === true) ? $config['sync_queue_items_max'] : 0;
|
||||
if (is_numeric($items_min) !== true && $items_min <= 0) {
|
||||
$items_min = self::MIN_SYNC_QUEUE_LENGTH;
|
||||
}
|
||||
|
|
|
@ -851,6 +851,8 @@ class HTML
|
|||
|
||||
foreach ($inputs as $input) {
|
||||
if (is_array(($input['arguments'] ?? null)) === true
|
||||
&& isset($input['arguments']) === true
|
||||
&& isset($input['arguments']['type']) === true
|
||||
&& $input['arguments']['type'] === 'submit'
|
||||
) {
|
||||
$output_submit .= self::printBlock($input, true);
|
||||
|
|
|
@ -309,7 +309,7 @@ class WelcomeWindow extends Wizard
|
|||
{
|
||||
global $config;
|
||||
|
||||
return $config['welcome_id_agent'];
|
||||
return (isset($config['welcome_id_agent']) === true) ? $config['welcome_id_agent'] : '';
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC220621';
|
||||
$pandora_version = 'v7.0NG.762';
|
||||
$build_version = 'PC220627';
|
||||
$pandora_version = 'v7.0NG.763';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
$script_tz = @date_default_timezone_get();
|
||||
|
|
|
@ -4261,7 +4261,9 @@ function get_product_name()
|
|||
|
||||
$stored_name = enterprise_hook('enterprise_get_product_name');
|
||||
if (empty($stored_name) || $stored_name == ENTERPRISE_NOT_HOOK) {
|
||||
if ($config['rb_product_name_alt']) {
|
||||
if (isset($config['rb_product_name_alt']) === true
|
||||
&& empty($config['rb_product_name_alt']) === false
|
||||
) {
|
||||
return $config['rb_product_name_alt'];
|
||||
}
|
||||
|
||||
|
|
|
@ -2598,10 +2598,9 @@ function agents_delete_agent($id_agents, $disableACL=false)
|
|||
'tagente_modulo',
|
||||
$filter
|
||||
);
|
||||
|
||||
if (is_array($rows) === true) {
|
||||
foreach ($rows as $row) {
|
||||
$modules[] = PandoraFMS\Module::build($row);
|
||||
$modules[] = PandoraFMS\Module::build($row, '\PandoraFMS\Module', true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2876,9 +2876,6 @@ function alerts_get_alert_fired($filters=[], $groupsBy=[])
|
|||
global $config;
|
||||
|
||||
$table = 'tevento';
|
||||
if (is_metaconsole() === true) {
|
||||
$table = 'tmetaconsole_event';
|
||||
}
|
||||
|
||||
$filter_date = '';
|
||||
if (isset($filters['period']) === true
|
||||
|
|
|
@ -388,23 +388,6 @@ function api_get_test_agent_cache()
|
|||
}
|
||||
|
||||
|
||||
// Returs the string OK if a connection to the event replication DB can be established.
|
||||
function api_get_test_event_replication_db()
|
||||
{
|
||||
if (defined('METACONSOLE')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$status = enterprise_hook('events_test_replication_db', []);
|
||||
if ($status === ENTERPRISE_NOT_HOOK) {
|
||||
echo 'ERR';
|
||||
return;
|
||||
}
|
||||
|
||||
echo $status;
|
||||
}
|
||||
|
||||
|
||||
// -------------------------DEFINED OPERATIONS FUNCTIONS-----------------
|
||||
|
||||
|
||||
|
@ -10892,11 +10875,6 @@ function api_set_event_validate_filter_pro($trash1, $trash2, $other, $trash3)
|
|||
return;
|
||||
}
|
||||
|
||||
$table_events = 'tevento';
|
||||
if (is_metaconsole()) {
|
||||
$table_events = 'tmetaconsole_event';
|
||||
}
|
||||
|
||||
if ($other['type'] == 'string') {
|
||||
if ($other['data'] != '') {
|
||||
returnError('Parameter error.');
|
||||
|
@ -10962,7 +10940,7 @@ function api_set_event_validate_filter_pro($trash1, $trash2, $other, $trash3)
|
|||
}
|
||||
|
||||
$count = db_process_sql_update(
|
||||
$table_events,
|
||||
'tevento',
|
||||
['estado' => 1],
|
||||
$filterString
|
||||
);
|
||||
|
@ -10988,12 +10966,6 @@ function api_set_event_validate_filter($trash1, $trash2, $other, $trash3)
|
|||
}
|
||||
|
||||
$simulate = false;
|
||||
|
||||
$table_events = 'tevento';
|
||||
if (is_metaconsole()) {
|
||||
$table_events = 'tmetaconsole_event';
|
||||
}
|
||||
|
||||
if ($other['type'] == 'string') {
|
||||
if ($other['data'] != '') {
|
||||
returnError('Parameter error.');
|
||||
|
@ -11028,14 +11000,14 @@ function api_set_event_validate_filter($trash1, $trash2, $other, $trash3)
|
|||
}
|
||||
|
||||
if ($simulate) {
|
||||
$rows = db_get_all_rows_filter($table_events, $filterString);
|
||||
$rows = db_get_all_rows_filter('tevento', $filterString);
|
||||
if ($rows !== false) {
|
||||
returnData('string', count($rows));
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
$count = db_process_sql_update(
|
||||
$table_events,
|
||||
'tevento',
|
||||
['estado' => 1],
|
||||
$filterString
|
||||
);
|
||||
|
@ -11305,9 +11277,6 @@ function get_events_with_user($trash1, $trash2, $other, $returnType, $user_in_db
|
|||
global $config;
|
||||
|
||||
$table_events = 'tevento';
|
||||
if (is_metaconsole() === true) {
|
||||
$table_events = 'tmetaconsole_event';
|
||||
}
|
||||
|
||||
// By default.
|
||||
$status = 3;
|
||||
|
@ -11525,8 +11494,6 @@ function get_events_with_user($trash1, $trash2, $other, $returnType, $user_in_db
|
|||
}
|
||||
|
||||
if ($group_rep == 0) {
|
||||
switch ($config['dbtype']) {
|
||||
case 'mysql':
|
||||
if ($filter['total']) {
|
||||
$sql = 'SELECT COUNT(*)
|
||||
FROM '.$table_events.'
|
||||
|
@ -11571,107 +11538,17 @@ function get_events_with_user($trash1, $trash2, $other, $returnType, $user_in_db
|
|||
ORDER BY utimestamp DESC';
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'postgresql':
|
||||
// TODO TOTAL
|
||||
$sql = 'SELECT *,
|
||||
(SELECT t1.alias
|
||||
FROM tagente t1
|
||||
WHERE t1.id_agente = tevento.id_agente) AS agent_name,
|
||||
(SELECT t2.nombre
|
||||
FROM tgrupo t2
|
||||
WHERE t2.id_grupo = tevento.id_grupo) AS group_name,
|
||||
(SELECT t2.icon
|
||||
FROM tgrupo t2
|
||||
WHERE t2.id_grupo = tevento.id_grupo) AS group_icon,
|
||||
(SELECT tmodule.name
|
||||
FROM tmodule
|
||||
WHERE id_module IN (
|
||||
SELECT tagente_modulo.id_modulo
|
||||
FROM tagente_modulo
|
||||
WHERE tagente_modulo.id_agente_modulo=tevento.id_agentmodule)) AS module_name
|
||||
FROM tevento
|
||||
WHERE 1=1 '.$sql_post.'
|
||||
ORDER BY utimestamp DESC';
|
||||
break;
|
||||
|
||||
case 'oracle':
|
||||
// TODO TOTAL
|
||||
$set = [];
|
||||
|
||||
$sql = 'SELECT *,
|
||||
(SELECT t1.alias
|
||||
FROM tagente t1
|
||||
WHERE t1.id_agente = tevento.id_agente) AS alias,
|
||||
(SELECT t1.nombre
|
||||
FROM tagente t1
|
||||
WHERE t1.id_agente = tevento.id_agente) AS agent_name,
|
||||
(SELECT t2.nombre
|
||||
FROM tgrupo t2
|
||||
WHERE t2.id_grupo = tevento.id_grupo) AS group_name,
|
||||
(SELECT t2.icon
|
||||
FROM tgrupo t2
|
||||
WHERE t2.id_grupo = tevento.id_grupo) AS group_icon,
|
||||
(SELECT tmodule.name
|
||||
FROM tmodule
|
||||
WHERE id_module IN (
|
||||
SELECT tagente_modulo.id_modulo
|
||||
FROM tagente_modulo
|
||||
WHERE tagente_modulo.id_agente_modulo=tevento.id_agentmodule)) AS module_name
|
||||
FROM tevento
|
||||
WHERE 1=1 '.$sql_post.' ORDER BY utimestamp DESC';
|
||||
$sql = oracle_recode_query($sql, $set);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch ($config['dbtype']) {
|
||||
case 'mysql':
|
||||
db_process_sql('SET group_concat_max_len = 9999999');
|
||||
|
||||
$sql = "SELECT *, MAX(id_evento) AS id_evento,
|
||||
GROUP_CONCAT(DISTINCT user_comment SEPARATOR '') AS user_comment,
|
||||
MIN(estado) AS min_estado, MAX(estado) AS max_estado,
|
||||
COUNT(*) AS event_rep, MAX(utimestamp) AS timestamp_rep
|
||||
COUNT(*) AS event_rep, MAX(utimestamp) AS timestamp_last
|
||||
FROM ".$table_events.'
|
||||
WHERE 1=1 '.$sql_post.'
|
||||
GROUP BY evento, id_agentmodule
|
||||
ORDER BY timestamp_rep DESC';
|
||||
break;
|
||||
|
||||
case 'postgresql':
|
||||
$sql = "SELECT *, MAX(id_evento) AS id_evento,
|
||||
array_to_string(array_agg(DISTINCT user_comment), '') AS user_comment,
|
||||
MIN(estado) AS min_estado, MAX(estado) AS max_estado,
|
||||
COUNT(*) AS event_rep, MAX(utimestamp) AS timestamp_rep
|
||||
FROM ".$table_events.'
|
||||
WHERE 1=1 '.$sql_post.'
|
||||
GROUP BY evento, id_agentmodule
|
||||
ORDER BY timestamp_rep DESC';
|
||||
break;
|
||||
|
||||
case 'oracle':
|
||||
$set = [];
|
||||
// TODO: Remove duplicate user comments
|
||||
$sql = 'SELECT a.*, b.event_rep, b.timestamp_rep
|
||||
FROM (SELECT *
|
||||
FROM tevento
|
||||
WHERE 1=1 '.$sql_post.") a,
|
||||
(SELECT MAX (id_evento) AS id_evento,
|
||||
to_char(evento) AS evento, id_agentmodule,
|
||||
COUNT(*) AS event_rep, MIN(estado) AS min_estado,
|
||||
MAX(estado) AS max_estado,
|
||||
LISTAGG(user_comment, '') AS user_comment,
|
||||
MAX(utimestamp) AS timestamp_rep
|
||||
FROM ".$table_events.'
|
||||
WHERE 1=1 '.$sql_post.'
|
||||
GROUP BY to_char(evento), id_agentmodule) b
|
||||
WHERE a.id_evento=b.id_evento AND
|
||||
to_char(a.evento)=to_char(b.evento) AND
|
||||
a.id_agentmodule=b.id_agentmodule';
|
||||
$sql = oracle_recode_query($sql, $set);
|
||||
break;
|
||||
}
|
||||
ORDER BY timestamp_last DESC';
|
||||
}
|
||||
|
||||
if ($other['type'] == 'string') {
|
||||
|
@ -11802,17 +11679,9 @@ function api_set_event($id_event, $unused1, $params, $unused2, $unused3)
|
|||
}
|
||||
}
|
||||
|
||||
// In meta or node.
|
||||
if (is_metaconsole() === true) {
|
||||
$table = 'tmetaconsole_event';
|
||||
} else {
|
||||
$table = 'tevento';
|
||||
}
|
||||
|
||||
// TODO. Stablish security for prevent sql injection?
|
||||
// Update the row
|
||||
$result = db_process_sql_update(
|
||||
$table,
|
||||
'tevento',
|
||||
$paramsSerialize,
|
||||
[ 'id_evento' => $id_event ]
|
||||
);
|
||||
|
@ -11883,15 +11752,7 @@ function api_get_events($node_id, $trash2, $other, $returnType, $user_in_db=null
|
|||
$filterString = otherParameter2Filter($other, false, $use_agent_name);
|
||||
}
|
||||
|
||||
if (is_metaconsole()) {
|
||||
if ((int) $node_id !== 0) {
|
||||
$filterString .= ' AND server_id = '.$node_id;
|
||||
}
|
||||
|
||||
$dataRows = db_get_all_rows_filter('tmetaconsole_event', $filterString);
|
||||
} else {
|
||||
$dataRows = db_get_all_rows_filter('tevento', $filterString);
|
||||
}
|
||||
|
||||
$last_error = error_get_last();
|
||||
if (empty($dataRows)) {
|
||||
|
@ -13108,18 +12969,20 @@ function api_get_event_info($id_event, $trash1, $trash, $returnType)
|
|||
{
|
||||
global $config;
|
||||
|
||||
$table_events = 'tevento';
|
||||
if (defined('METACONSOLE')) {
|
||||
$table_events = 'tmetaconsole_event';
|
||||
}
|
||||
$sql = sprintf(
|
||||
'SELECT *
|
||||
FROM tevento
|
||||
WHERE id_evento= %d',
|
||||
$id_event
|
||||
);
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM '.$table_events."
|
||||
WHERE id_evento=$id_event";
|
||||
$event_data = db_get_row_sql($sql);
|
||||
|
||||
// Check the access to group
|
||||
if (!empty($event_data['id_grupo']) && $event_data['id_grupo'] > 0 && !$event_data['id_agente']) {
|
||||
if (!empty($event_data['id_grupo'])
|
||||
&& $event_data['id_grupo'] > 0
|
||||
&& !$event_data['id_agente']
|
||||
) {
|
||||
if (!check_acl($config['id_user'], $event_data['id_grupo'], 'ER')) {
|
||||
returnError('forbidden', $returnType);
|
||||
return;
|
||||
|
@ -13127,8 +12990,14 @@ function api_get_event_info($id_event, $trash1, $trash, $returnType)
|
|||
}
|
||||
|
||||
// Check the access to agent
|
||||
if (!empty($event_data['id_agente']) && $event_data['id_agente'] > 0) {
|
||||
if (!util_api_check_agent_and_print_error($event_data['id_agente'], $returnType)) {
|
||||
if (!empty($event_data['id_agente'])
|
||||
&& $event_data['id_agente'] > 0
|
||||
) {
|
||||
if (!util_api_check_agent_and_print_error(
|
||||
$event_data['id_agente'],
|
||||
$returnType
|
||||
)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -13416,13 +13285,7 @@ function api_set_create_event($id, $trash1, $other, $returnType)
|
|||
|
||||
if ($other['data'][18] != '') {
|
||||
$values['id_extra'] = $other['data'][18];
|
||||
if (is_metaconsole()) {
|
||||
$table_event = 'tmetaconsole_event';
|
||||
} else {
|
||||
$table_event = 'tevento';
|
||||
}
|
||||
|
||||
$sql_validation = 'SELECT id_evento FROM '.$table_event.' where estado IN (0,2) and id_extra ="'.$other['data'][18].'";';
|
||||
$sql_validation = 'SELECT id_evento FROM tevento where estado IN (0,2) and id_extra ="'.$other['data'][18].'";';
|
||||
$validation = db_get_all_rows_sql($sql_validation);
|
||||
if ($validation) {
|
||||
foreach ($validation as $val) {
|
||||
|
@ -13464,9 +13327,7 @@ function api_set_create_event($id, $trash1, $other, $returnType)
|
|||
$res = events_comment(
|
||||
$return,
|
||||
$user_comment,
|
||||
'Added comment',
|
||||
is_metaconsole(),
|
||||
$config['history_db_enabled']
|
||||
'Added comment'
|
||||
);
|
||||
if ($other['data'][13] != '') {
|
||||
// owner user
|
||||
|
@ -13476,9 +13337,7 @@ function api_set_create_event($id, $trash1, $other, $returnType)
|
|||
events_change_owner(
|
||||
$return,
|
||||
$owner_user,
|
||||
true,
|
||||
is_metaconsole(),
|
||||
$config['history_db_enabled']
|
||||
true
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -13534,9 +13393,7 @@ function api_set_add_event_comment($id, $thrash2, $other, $thrash3)
|
|||
$status = events_comment(
|
||||
$id,
|
||||
$comment,
|
||||
'Added comment',
|
||||
$meta,
|
||||
$history
|
||||
'Added comment'
|
||||
);
|
||||
if (is_error($status)) {
|
||||
returnError(
|
||||
|
@ -13699,17 +13556,12 @@ function api_set_validate_event_by_id($id, $trash1=null, $trash2=null, $returnTy
|
|||
return;
|
||||
}
|
||||
|
||||
$table_events = 'tevento';
|
||||
if (is_metaconsole()) {
|
||||
$table_events = 'tmetaconsole_event';
|
||||
}
|
||||
|
||||
$data['type'] = 'string';
|
||||
$check_id = db_get_value('id_evento', $table_events, 'id_evento', $id);
|
||||
$check_id = db_get_value('id_evento', 'tevento', 'id_evento', $id);
|
||||
|
||||
if ($check_id) {
|
||||
// event exists
|
||||
$status = db_get_value('estado', $table_events, 'id_evento', $id);
|
||||
$status = db_get_value('estado', 'tevento', 'id_evento', $id);
|
||||
if ($status == 1) {
|
||||
// event already validated
|
||||
$data['data'] = 'Event already validated.';
|
||||
|
@ -13723,7 +13575,7 @@ function api_set_validate_event_by_id($id, $trash1=null, $trash2=null, $returnTy
|
|||
'estado' => 1,
|
||||
];
|
||||
|
||||
$result = db_process_sql_update($table_events, $values, ['id_evento' => $id]);
|
||||
$result = db_process_sql_update('tevento', $values, ['id_evento' => $id]);
|
||||
|
||||
if ($result === false) {
|
||||
$data['data'] = 'The event could not be validated.';
|
||||
|
@ -17490,7 +17342,7 @@ function util_api_check_agent_and_print_error($id_agent, $returnType, $access='A
|
|||
* Function for get event id and node id, then we get in return the Metaconsole event ID.
|
||||
*
|
||||
* @param [string] $server_id id server (Node)
|
||||
* @param [string] $console_event_id console Id node event in tmetaconsole_event
|
||||
* @param [string] $console_event_id console Id node event in tevent
|
||||
* @param [string] $trash2 don't use
|
||||
* @param [string] $returnType
|
||||
*
|
||||
|
@ -17501,19 +17353,54 @@ function util_api_check_agent_and_print_error($id_agent, $returnType, $access='A
|
|||
*/
|
||||
function api_get_event_mcid($server_id, $console_event_id, $trash2, $returnType)
|
||||
{
|
||||
global $config;
|
||||
try {
|
||||
if (is_metaconsole() === true
|
||||
&& $server_id > 0
|
||||
) {
|
||||
$node = new Node($server_id);
|
||||
$node->connect();
|
||||
}
|
||||
|
||||
// Get grouped comments.
|
||||
$mc_event_id = db_get_all_rows_sql(
|
||||
sprintf(
|
||||
'SELECT id_evento
|
||||
FROM tevento
|
||||
WHERE id_evento = %d
|
||||
',
|
||||
$console_event_id
|
||||
)
|
||||
);
|
||||
|
||||
if (is_metaconsole()) {
|
||||
$mc_event_id = db_get_all_rows_sql("SELECT id_evento FROM tmetaconsole_event WHERE id_source_event = $console_event_id AND server_id = $server_id ");
|
||||
if ($mc_event_id !== false) {
|
||||
returnData($returnType, ['type' => 'string', 'data' => $mc_event_id]);
|
||||
returnData(
|
||||
$returnType,
|
||||
[
|
||||
'type' => 'string',
|
||||
'data' => $mc_event_id,
|
||||
]
|
||||
);
|
||||
} else {
|
||||
returnError('id_not_found', 'string');
|
||||
}
|
||||
} else {
|
||||
returnError('forbidden', 'string');
|
||||
return;
|
||||
} catch (\Exception $e) {
|
||||
// Unexistent agent.
|
||||
if (is_metaconsole() === true
|
||||
&& $server_id > 0
|
||||
) {
|
||||
$node->disconnect();
|
||||
}
|
||||
|
||||
returnError('forbidden', 'string');
|
||||
} finally {
|
||||
if (is_metaconsole() === true
|
||||
&& $server_id > 0
|
||||
) {
|
||||
$node->disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
@ -17561,14 +17448,8 @@ function api_get_is_centralized($server_id, $thrash1, $thrash2, $returnType)
|
|||
function api_set_event_in_progress($event_id, $trash2, $returnType)
|
||||
{
|
||||
global $config;
|
||||
if (is_metaconsole()) {
|
||||
$table = 'tmetaconsole_event';
|
||||
} else {
|
||||
$table = 'tevento';
|
||||
}
|
||||
|
||||
$event = db_process_sql_update(
|
||||
$table,
|
||||
'tevento',
|
||||
['estado' => 2],
|
||||
['id_evento' => $event_id]
|
||||
);
|
||||
|
|
|
@ -409,32 +409,6 @@ function config_update_config()
|
|||
$error_update[] = __('Size of collection');
|
||||
}
|
||||
|
||||
if (config_update_value('event_replication', (int) get_parameter('event_replication'), true) === false) {
|
||||
$error_update[] = __('Events replication');
|
||||
}
|
||||
|
||||
if ((int) get_parameter('event_replication') === 1) {
|
||||
if (config_update_value('replication_interval', (int) get_parameter('replication_interval'), true) === false) {
|
||||
$error_update[] = __('Replication interval');
|
||||
}
|
||||
|
||||
if (config_update_value('replication_limit', (int) get_parameter('replication_limit'), true) === false) {
|
||||
$error_update[] = __('Replication limit');
|
||||
}
|
||||
|
||||
if (config_update_value('replication_mode', (string) get_parameter('replication_mode'), true) === false) {
|
||||
$error_update[] = __('Replication mode');
|
||||
}
|
||||
|
||||
if (config_update_value('show_events_in_local', (string) get_parameter('show_events_in_local'), true) === false) {
|
||||
$error_update[] = __('Show events list in local console (read only)');
|
||||
}
|
||||
}
|
||||
|
||||
if (config_update_value('replication_dbengine', (string) get_parameter('replication_dbengine'), true) === false) {
|
||||
$error_update[] = __('Replication DB engine');
|
||||
}
|
||||
|
||||
if (config_update_value('replication_dbhost', (string) get_parameter('replication_dbhost'), true) === false) {
|
||||
$error_update[] = __('Replication DB host');
|
||||
}
|
||||
|
@ -928,6 +902,10 @@ function config_update_config()
|
|||
$error_update[] = __('SNMP walk binary path (fallback for v1)');
|
||||
}
|
||||
|
||||
if (config_update_value('wmiBinary', get_parameter('wmiBinary'), true) === false) {
|
||||
$error_update[] = __('Default WMI Binary');
|
||||
}
|
||||
|
||||
$pjs = get_parameter('phantomjs_cache_interval');
|
||||
switch ($pjs) {
|
||||
case $config['phantomjs_cache_interval']:
|
||||
|
@ -1183,6 +1161,10 @@ function config_update_config()
|
|||
$error_update[] = __('Default line thickness for the Visual Console');
|
||||
}
|
||||
|
||||
if (config_update_value('mobile_view_orientation_vc', (int) get_parameter('mobile_view_orientation_vc'), true) === false) {
|
||||
$error_update[] = __('Mobile view not allow visual console orientation');
|
||||
}
|
||||
|
||||
if (config_update_value('ser_menu_items', (int) get_parameter('ser_menu_items', 10), true) === false) {
|
||||
$error_update[] = __('Default line menu items for the Services');
|
||||
}
|
||||
|
@ -2053,6 +2035,10 @@ function config_process_config()
|
|||
config_update_value('max_execution_event_response', 10);
|
||||
}
|
||||
|
||||
if (!isset($config['max_number_of_events_per_node'])) {
|
||||
config_update_value('max_number_of_events_per_node', 100000);
|
||||
}
|
||||
|
||||
if (!isset($config['max_macro_fields'])) {
|
||||
config_update_value('max_macro_fields', 10);
|
||||
}
|
||||
|
@ -2087,6 +2073,10 @@ function config_process_config()
|
|||
config_update_value('snmpwalk_fallback', 'snmpwalk');
|
||||
}
|
||||
|
||||
if (isset($config['wmiBinary']) === false) {
|
||||
config_update_value('wmiBinary', 'pandorawmic');
|
||||
}
|
||||
|
||||
if (!isset($config['event_purge'])) {
|
||||
config_update_value('event_purge', 15);
|
||||
}
|
||||
|
@ -2131,22 +2121,6 @@ function config_process_config()
|
|||
config_update_value('policy_add_max_agents', 200);
|
||||
}
|
||||
|
||||
if (!isset($config['event_replication'])) {
|
||||
config_update_value('event_replication', 0);
|
||||
}
|
||||
|
||||
if (!isset($config['replication_interval'])) {
|
||||
config_update_value('replication_interval', 10);
|
||||
}
|
||||
|
||||
if (!isset($config['replication_limit'])) {
|
||||
config_update_value('replication_limit', 50);
|
||||
}
|
||||
|
||||
if (!isset($config['replication_dbengine'])) {
|
||||
config_update_value('replication_dbengine', 'mysql');
|
||||
}
|
||||
|
||||
if (!isset($config['replication_dbhost'])) {
|
||||
config_update_value('replication_dbhost', '');
|
||||
}
|
||||
|
@ -2167,18 +2141,10 @@ function config_process_config()
|
|||
config_update_value('replication_dbport', '');
|
||||
}
|
||||
|
||||
if (!isset($config['replication_mode'])) {
|
||||
config_update_value('replication_mode', 'only_validated');
|
||||
}
|
||||
|
||||
if (!isset($config['metaconsole_agent_cache'])) {
|
||||
config_update_value('metaconsole_agent_cache', 0);
|
||||
}
|
||||
|
||||
if (!isset($config['show_events_in_local'])) {
|
||||
config_update_value('show_events_in_local', 0);
|
||||
}
|
||||
|
||||
if (!isset($config['log_collector'])) {
|
||||
config_update_value('log_collector', 0);
|
||||
}
|
||||
|
@ -3065,6 +3031,10 @@ function config_process_config()
|
|||
config_update_value('vc_line_thickness', 2);
|
||||
}
|
||||
|
||||
if (isset($config['mobile_view_orientation_vc']) === false) {
|
||||
config_update_value('mobile_view_orientation_vc', 0);
|
||||
}
|
||||
|
||||
if (!isset($config['agent_size_text_small'])) {
|
||||
config_update_value('agent_size_text_small', 18);
|
||||
}
|
||||
|
|
|
@ -235,7 +235,7 @@ function db_pandora_audit($accion, $descripcion, $user_id=false, $ip=true, $info
|
|||
if (isset($config['remote_addr']) === true) {
|
||||
$ip = $config['remote_addr'];
|
||||
} else {
|
||||
if ($_SERVER['REMOTE_ADDR']) {
|
||||
if (isset($_SERVER['REMOTE_ADDR']) === true) {
|
||||
$ip = $_SERVER['REMOTE_ADDR'];
|
||||
} else {
|
||||
$ip = __('N/A');
|
||||
|
|
|
@ -3286,73 +3286,6 @@ function series_suffix_leyend($series_name, $series_suffix, $id_agent, $data_mod
|
|||
}
|
||||
|
||||
|
||||
function graph_events_validated($width=300, $height=200, $extra_filters=[], $meta=false, $history=false)
|
||||
{
|
||||
global $config;
|
||||
global $graphic_type;
|
||||
|
||||
$event_type = false;
|
||||
if (array_key_exists('event_type', $extra_filters)) {
|
||||
$event_type = $extra_filters['event_type'];
|
||||
}
|
||||
|
||||
$event_severity = false;
|
||||
if (array_key_exists('event_severity', $extra_filters)) {
|
||||
$event_severity = $extra_filters['event_severity'];
|
||||
}
|
||||
|
||||
$event_status = false;
|
||||
if (array_key_exists('event_status', $extra_filters)) {
|
||||
$event_status = $extra_filters['event_status'];
|
||||
}
|
||||
|
||||
$event_filter_search = false;
|
||||
if (array_key_exists('event_filter_search', $extra_filters)) {
|
||||
$event_filter_search = $extra_filters['event_filter_search'];
|
||||
}
|
||||
|
||||
$data_graph = events_get_count_events_validated(
|
||||
['id_group' => array_keys(users_get_groups())],
|
||||
null,
|
||||
null,
|
||||
$event_severity,
|
||||
$event_type,
|
||||
$event_status,
|
||||
$event_filter_search
|
||||
);
|
||||
|
||||
$colors = [];
|
||||
foreach ($data_graph as $k => $v) {
|
||||
if ($k == __('Validated')) {
|
||||
$colors[$k] = COL_NORMAL;
|
||||
} else {
|
||||
$colors[$k] = COL_CRITICAL;
|
||||
}
|
||||
}
|
||||
|
||||
if ($config['fixed_graph'] == false) {
|
||||
$water_mark = [
|
||||
'file' => $config['homedir'].'/images/logo_vertical_water.png',
|
||||
'url' => ui_get_full_url('images/logo_vertical_water.png', false, false, false),
|
||||
];
|
||||
}
|
||||
|
||||
echo pie_graph(
|
||||
$data_graph,
|
||||
$width,
|
||||
$height,
|
||||
__('other'),
|
||||
'',
|
||||
$water_mark,
|
||||
$config['fontpath'],
|
||||
$config['font_size'],
|
||||
1,
|
||||
'bottom',
|
||||
$colors
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Print a pie graph with events data of group
|
||||
*
|
||||
|
@ -3365,13 +3298,13 @@ function grafico_eventos_grupo($width=300, $height=200, $url='', $noWaterMark=tr
|
|||
global $config;
|
||||
global $graphic_type;
|
||||
|
||||
// It was urlencoded, so we urldecode it
|
||||
// It was urlencoded, so we urldecode it.
|
||||
$url = html_entity_decode(rawurldecode($url), ENT_QUOTES);
|
||||
$data = [];
|
||||
$loop = 0;
|
||||
define('NUM_PIECES_PIE', 6);
|
||||
|
||||
// Hotfix for the id_agente_modulo
|
||||
// Hotfix for the id_agente_modulo.
|
||||
$url = str_replace(
|
||||
'SELECT id_agente_modulo',
|
||||
'SELECT_id_agente_modulo',
|
||||
|
@ -3386,22 +3319,24 @@ function grafico_eventos_grupo($width=300, $height=200, $url='', $noWaterMark=tr
|
|||
'INSERT ',
|
||||
'EXEC',
|
||||
];
|
||||
// remove bad strings from the query so queries like ; DELETE FROM don't pass
|
||||
// remove bad strings from the query so queries like ; DELETE FROM don't pass.
|
||||
$url = str_ireplace($badstrings, '', $url);
|
||||
|
||||
// Hotfix for the id_agente_modulo
|
||||
// Hotfix for the id_agente_modulo.
|
||||
$url = str_replace(
|
||||
'SELECT_id_agente_modulo',
|
||||
'SELECT id_agente_modulo',
|
||||
$url
|
||||
);
|
||||
|
||||
$event_table = 'tevento';
|
||||
$field_extra = '';
|
||||
$groupby_extra = '';
|
||||
|
||||
// Add tags condition to filter
|
||||
$tags_condition = tags_get_acl_tags($config['id_user'], 0, 'ER', 'event_condition', 'AND');
|
||||
// Add tags condition to filter.
|
||||
$tags_condition = tags_get_acl_tags(
|
||||
$config['id_user'],
|
||||
0,
|
||||
'ER',
|
||||
'event_condition',
|
||||
'AND'
|
||||
);
|
||||
|
||||
if ($time_limit && $config['event_view_hr']) {
|
||||
$tags_condition .= ' AND utimestamp > (UNIX_TIMESTAMP(NOW()) - '.($config['event_view_hr'] * SECONDS_1HOUR).')';
|
||||
|
@ -3409,14 +3344,14 @@ function grafico_eventos_grupo($width=300, $height=200, $url='', $noWaterMark=tr
|
|||
|
||||
// This will give the distinct id_agente, give the id_grupo that goes
|
||||
// with it and then the number of times it occured. GROUP BY statement
|
||||
// is required if both DISTINCT() and COUNT() are in the statement
|
||||
// is required if both DISTINCT() and COUNT() are in the statement.
|
||||
$sql = sprintf(
|
||||
'SELECT DISTINCT(id_agente) AS id_agente,
|
||||
COUNT(id_agente) AS count'.$field_extra.'
|
||||
FROM '.$event_table.' te LEFT JOIN tagent_secondary_group tasg
|
||||
COUNT(id_agente) AS count
|
||||
FROM tevento te LEFT JOIN tagent_secondary_group tasg
|
||||
ON te.id_grupo = tasg.id_group
|
||||
WHERE 1=1 %s %s
|
||||
GROUP BY id_agente'.$groupby_extra.'
|
||||
GROUP BY id_agente
|
||||
ORDER BY count DESC LIMIT 8',
|
||||
$url,
|
||||
$tags_condition
|
||||
|
@ -3456,7 +3391,7 @@ function grafico_eventos_grupo($width=300, $height=200, $url='', $noWaterMark=tr
|
|||
$data[$name] = $system_events;
|
||||
}
|
||||
|
||||
// Sort the data
|
||||
// Sort the data.
|
||||
arsort($data);
|
||||
if ($noWaterMark) {
|
||||
$water_mark = [
|
||||
|
|
|
@ -2692,7 +2692,9 @@ function html_print_input_password(
|
|||
}
|
||||
|
||||
if ($class) {
|
||||
$attr['class'] = $class;
|
||||
$attr['class'] = $class.' '.'password_input';
|
||||
} else {
|
||||
$attr['class'] = 'password_input';
|
||||
}
|
||||
|
||||
if ($disabled === false) {
|
||||
|
@ -2763,7 +2765,9 @@ function html_print_input_text(
|
|||
}
|
||||
|
||||
if ($class != '') {
|
||||
$attr['class'] = $class;
|
||||
$attr['class'] = $class.' '.'text_input';
|
||||
} else {
|
||||
$attr['class'] = 'text_input';
|
||||
}
|
||||
|
||||
if ($onChange != '') {
|
||||
|
@ -4556,7 +4560,7 @@ function html_print_autocomplete_modules(
|
|||
100,
|
||||
false,
|
||||
'',
|
||||
['style' => 'background: url('.$module_icon.') no-repeat right; '.$text_color.'']
|
||||
['style' => 'border: none; padding: 2px 5px; margin-bottom: 4px; border-bottom: 1px solid #ccc; border-radius: 0; background: url('.$module_icon.') no-repeat right; '.$text_color.'']
|
||||
);
|
||||
html_print_input_hidden($name.'_hidden', $id_agent_module);
|
||||
|
||||
|
@ -4922,7 +4926,7 @@ function html_print_input($data, $wrapper='div', $input_only=false)
|
|||
|
||||
case 'image':
|
||||
$output .= html_print_input_image(
|
||||
$data['name'],
|
||||
((isset($data['name']) === true) ? $data['name'] : ''),
|
||||
$data['src'],
|
||||
$data['value'],
|
||||
((isset($data['style']) === true) ? $data['style'] : ''),
|
||||
|
|
|
@ -67,6 +67,7 @@ define('REPORT_STATUS_DOWNTIME', 4);
|
|||
define('REPORT_STATUS_IGNORED', 5);
|
||||
|
||||
// Clases.
|
||||
use PandoraFMS\Event;
|
||||
use PandoraFMS\Module;
|
||||
|
||||
|
||||
|
@ -1959,7 +1960,10 @@ function reporting_event_report_group(
|
|||
$event_graph_by_criticity = $event_filter['event_graph_by_criticity'];
|
||||
$event_graph_validated_vs_unvalidated = $event_filter['event_graph_validated_vs_unvalidated'];
|
||||
|
||||
if (isset($content['recursion']) && $content['recursion'] == 1 && $content['id_group'] != 0) {
|
||||
if (isset($content['recursion'])
|
||||
&& $content['recursion'] == 1
|
||||
&& $content['id_group'] != 0
|
||||
) {
|
||||
$propagate = db_get_value(
|
||||
'propagate',
|
||||
'tgrupo',
|
||||
|
@ -1980,6 +1984,10 @@ function reporting_event_report_group(
|
|||
}
|
||||
}
|
||||
|
||||
if (is_metaconsole() === true) {
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
$data = events_get_agent(
|
||||
false,
|
||||
$content['period'],
|
||||
|
@ -2025,27 +2033,26 @@ function reporting_event_report_group(
|
|||
$return['chart']['by_user_validator'] = null;
|
||||
$return['chart']['by_criticity'] = null;
|
||||
$return['chart']['validated_vs_unvalidated'] = null;
|
||||
$server_name = $content['server_name'];
|
||||
$metaconsole_dbtable = false;
|
||||
if (is_metaconsole() === true && empty($server_name) === true) {
|
||||
$metaconsole_dbtable = true;
|
||||
}
|
||||
|
||||
if ($event_graph_by_agent) {
|
||||
$data_graph = events_get_count_events_by_agent(
|
||||
$content['id_group'],
|
||||
$content['period'],
|
||||
$report['datetime'],
|
||||
$filter_event_severity,
|
||||
$filter_event_type,
|
||||
$filter_event_status,
|
||||
$filter_event_filter_search,
|
||||
$metaconsole_dbtable,
|
||||
$filter_event_filter_exclude
|
||||
);
|
||||
$data_graph_by_agent = [];
|
||||
if (empty($data) === false) {
|
||||
foreach ($data as $value) {
|
||||
$k = $value['alias'];
|
||||
if (is_metaconsole() === true) {
|
||||
$k = '('.$value['server_name'].') '.$value['alias'];
|
||||
}
|
||||
|
||||
if (isset($data_graph_by_agent[$k]) === true) {
|
||||
$data_graph_by_agent[$k]++;
|
||||
} else {
|
||||
$data_graph_by_agent[$k] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$return['chart']['by_agent'] = pie_graph(
|
||||
$data_graph,
|
||||
$data_graph_by_agent,
|
||||
500,
|
||||
150,
|
||||
__('other'),
|
||||
|
@ -2058,20 +2065,9 @@ function reporting_event_report_group(
|
|||
}
|
||||
|
||||
if ($event_graph_by_user_validator) {
|
||||
$data_graph = events_get_count_events_validated_by_user(
|
||||
['id_group' => $content['id_group']],
|
||||
$content['period'],
|
||||
$report['datetime'],
|
||||
$filter_event_severity,
|
||||
$filter_event_type,
|
||||
$filter_event_status,
|
||||
$filter_event_filter_search,
|
||||
$metaconsole_dbtable,
|
||||
$filter_event_filter_exclude
|
||||
);
|
||||
|
||||
$data_graph_by_user = events_get_count_events_validated_by_user($data);
|
||||
$return['chart']['by_user_validator'] = pie_graph(
|
||||
$data_graph,
|
||||
$data_graph_by_user,
|
||||
500,
|
||||
150,
|
||||
__('other'),
|
||||
|
@ -2084,21 +2080,22 @@ function reporting_event_report_group(
|
|||
}
|
||||
|
||||
if ($event_graph_by_criticity) {
|
||||
$data_graph = events_get_count_events_by_criticity(
|
||||
['id_group' => $content['id_group']],
|
||||
$content['period'],
|
||||
$report['datetime'],
|
||||
$filter_event_severity,
|
||||
$filter_event_type,
|
||||
$filter_event_status,
|
||||
$filter_event_filter_search,
|
||||
$metaconsole_dbtable
|
||||
);
|
||||
$data_graph_by_criticity = [];
|
||||
if (empty($data) === false) {
|
||||
foreach ($data as $value) {
|
||||
$k = get_priority_name($value['criticity']);
|
||||
if (isset($data_graph_by_criticity[$k]) === true) {
|
||||
$data_graph_by_criticity[$k]++;
|
||||
} else {
|
||||
$data_graph_by_criticity[$k] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$colors = get_criticity_pie_colors($data_graph);
|
||||
$colors = get_criticity_pie_colors($data_graph_by_criticity);
|
||||
|
||||
$return['chart']['by_criticity'] = pie_graph(
|
||||
$data_graph,
|
||||
$data_graph_by_criticity,
|
||||
500,
|
||||
150,
|
||||
__('other'),
|
||||
|
@ -2113,20 +2110,24 @@ function reporting_event_report_group(
|
|||
}
|
||||
|
||||
if ($event_graph_validated_vs_unvalidated) {
|
||||
$data_graph = events_get_count_events_validated(
|
||||
['id_group' => $content['id_group']],
|
||||
$content['period'],
|
||||
$report['datetime'],
|
||||
$filter_event_severity,
|
||||
$filter_event_type,
|
||||
$filter_event_status,
|
||||
$filter_event_filter_search,
|
||||
$metaconsole_dbtable,
|
||||
$filter_event_filter_exclude
|
||||
);
|
||||
$data_graph_by_status = [];
|
||||
if (empty($data) === false) {
|
||||
$status = [
|
||||
1 => __('Validated'),
|
||||
0 => __('Not validated'),
|
||||
];
|
||||
foreach ($data as $value) {
|
||||
$k = $status[$value['estado']];
|
||||
if (isset($data_graph_by_status[$k]) === true) {
|
||||
$data_graph_by_status[$k]++;
|
||||
} else {
|
||||
$data_graph_by_status[$k] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$return['chart']['validated_vs_unvalidated'] = pie_graph(
|
||||
$data_graph,
|
||||
$data_graph_by_status,
|
||||
500,
|
||||
150,
|
||||
__('other'),
|
||||
|
@ -2138,10 +2139,6 @@ function reporting_event_report_group(
|
|||
);
|
||||
}
|
||||
|
||||
if (is_metaconsole() === true) {
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
// Total events.
|
||||
if ($return['data'] != '') {
|
||||
$return['total_events'] = count($return['data']);
|
||||
|
@ -3666,15 +3663,29 @@ function reporting_groups_nodes($content)
|
|||
if (empty($id_group)) {
|
||||
$events = [];
|
||||
} else {
|
||||
$sql_where = sprintf(
|
||||
' WHERE id_grupo IN (%s) AND estado<>1 ',
|
||||
implode(',', $id_group)
|
||||
);
|
||||
$events = events_get_events_grouped(
|
||||
$sql_where,
|
||||
// ID group.
|
||||
if (empty($id_group) === false) {
|
||||
$filters['id_group_filter'] = $id_group;
|
||||
}
|
||||
|
||||
// Status.
|
||||
if (empty($filter_event_status) === false) {
|
||||
$filters['status'] = EVENT_NO_VALIDATED;
|
||||
}
|
||||
|
||||
// Grouped.
|
||||
$filters['group_rep'] = 1;
|
||||
|
||||
$events = Event::search(
|
||||
[
|
||||
'te.*',
|
||||
'ta.alias',
|
||||
],
|
||||
$filters,
|
||||
0,
|
||||
1000,
|
||||
false
|
||||
'desc',
|
||||
'te.utimestamp'
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -3791,12 +3802,14 @@ function reporting_event_report_agent(
|
|||
$event_graph_by_criticity = $style['event_graph_by_criticity'];
|
||||
$event_graph_validated_vs_unvalidated = $style['event_graph_validated_vs_unvalidated'];
|
||||
|
||||
if (is_metaconsole() === true) {
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
$return['data'] = reporting_get_agents_detailed_event(
|
||||
$content['id_agent'],
|
||||
$content['period'],
|
||||
$report['datetime'],
|
||||
true,
|
||||
true,
|
||||
$history,
|
||||
$show_summary_group,
|
||||
$filter_event_severity,
|
||||
|
@ -3808,10 +3821,6 @@ function reporting_event_report_agent(
|
|||
$show_custom_data
|
||||
);
|
||||
|
||||
if (is_metaconsole() === true) {
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
reporting_set_conf_charts(
|
||||
$width,
|
||||
$height,
|
||||
|
@ -3833,28 +3842,10 @@ function reporting_event_report_agent(
|
|||
$return['chart']['by_criticity'] = null;
|
||||
$return['chart']['validated_vs_unvalidated'] = null;
|
||||
|
||||
$server_name = $content['server_name'];
|
||||
if (is_metaconsole() && $server_name != '') {
|
||||
$metaconsole_dbtable = true;
|
||||
} else {
|
||||
$metaconsole_dbtable = false;
|
||||
}
|
||||
|
||||
if ($event_graph_by_user_validator) {
|
||||
$data_graph = events_get_count_events_validated_by_user(
|
||||
['id_agent' => $content['id_agent']],
|
||||
$content['period'],
|
||||
$report['datetime'],
|
||||
$filter_event_severity,
|
||||
$filter_event_type,
|
||||
$filter_event_status,
|
||||
$filter_event_filter_search,
|
||||
$metaconsole_dbtable,
|
||||
$filter_event_filter_exclude
|
||||
);
|
||||
|
||||
$data_graph_by_user = events_get_count_events_validated_by_user($return['data']);
|
||||
$return['chart']['by_user_validator'] = pie_graph(
|
||||
$data_graph,
|
||||
$data_graph_by_user,
|
||||
500,
|
||||
150,
|
||||
__('other'),
|
||||
|
@ -3867,22 +3858,22 @@ function reporting_event_report_agent(
|
|||
}
|
||||
|
||||
if ($event_graph_by_criticity) {
|
||||
$data_graph = events_get_count_events_by_criticity(
|
||||
['id_agent' => $content['id_agent']],
|
||||
$content['period'],
|
||||
$report['datetime'],
|
||||
$filter_event_severity,
|
||||
$filter_event_type,
|
||||
$filter_event_status,
|
||||
$filter_event_filter_search,
|
||||
$metaconsole_dbtable,
|
||||
$filter_event_filter_exclude
|
||||
);
|
||||
$data_graph_by_criticity = [];
|
||||
if (empty($return['data']) === false) {
|
||||
foreach ($return['data'] as $value) {
|
||||
$k = get_priority_name($value['criticity']);
|
||||
if (isset($data_graph_by_criticity[$k]) === true) {
|
||||
$data_graph_by_criticity[$k]++;
|
||||
} else {
|
||||
$data_graph_by_criticity[$k] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$colors = get_criticity_pie_colors($data_graph);
|
||||
$colors = get_criticity_pie_colors($data_graph_by_criticity);
|
||||
|
||||
$return['chart']['by_criticity'] = pie_graph(
|
||||
$data_graph,
|
||||
$data_graph_by_criticity,
|
||||
500,
|
||||
150,
|
||||
__('other'),
|
||||
|
@ -3897,20 +3888,24 @@ function reporting_event_report_agent(
|
|||
}
|
||||
|
||||
if ($event_graph_validated_vs_unvalidated) {
|
||||
$data_graph = events_get_count_events_validated(
|
||||
['id_agent' => $content['id_agent']],
|
||||
$content['period'],
|
||||
$report['datetime'],
|
||||
$filter_event_severity,
|
||||
$filter_event_type,
|
||||
$filter_event_status,
|
||||
$filter_event_filter_search,
|
||||
$metaconsole_dbtable,
|
||||
$filter_event_filter_exclude
|
||||
);
|
||||
$data_graph_by_status = [];
|
||||
if (empty($return['data']) === false) {
|
||||
$status = [
|
||||
1 => __('Validated'),
|
||||
0 => __('Not validated'),
|
||||
];
|
||||
foreach ($return['data'] as $value) {
|
||||
$k = $status[$value['estado']];
|
||||
if (isset($data_graph_by_status[$k]) === true) {
|
||||
$data_graph_by_status[$k]++;
|
||||
} else {
|
||||
$data_graph_by_status[$k] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$return['chart']['validated_vs_unvalidated'] = pie_graph(
|
||||
$data_graph,
|
||||
$data_graph_by_status,
|
||||
500,
|
||||
150,
|
||||
__('other'),
|
||||
|
@ -10459,14 +10454,14 @@ function reporting_get_module_detailed_event(
|
|||
$event['data'] = [];
|
||||
}
|
||||
|
||||
// total_events
|
||||
// Total events.
|
||||
if (isset($event['data'])) {
|
||||
$event['total_events'] = count($event['data']);
|
||||
} else {
|
||||
$event['total_events'] = 0;
|
||||
}
|
||||
|
||||
// graphs
|
||||
// Graphs.
|
||||
if (!empty($force_width_chart)) {
|
||||
$width = $force_width_chart;
|
||||
}
|
||||
|
@ -10476,20 +10471,9 @@ function reporting_get_module_detailed_event(
|
|||
}
|
||||
|
||||
if ($event_graph_by_user_validator) {
|
||||
$data_graph = events_get_count_events_validated_by_user(
|
||||
['id_agentmodule' => $id_module],
|
||||
$period,
|
||||
$date,
|
||||
$filter_event_severity,
|
||||
$filter_event_type,
|
||||
$filter_event_status,
|
||||
$filter_event_filter_search,
|
||||
$metaconsole_dbtable,
|
||||
$filter_event_filter_exclude
|
||||
);
|
||||
|
||||
$data_graph_by_user = events_get_count_events_validated_by_user($event['data']);
|
||||
$event['chart']['by_user_validator'] = pie_graph(
|
||||
$data_graph,
|
||||
$data_graph_by_user,
|
||||
500,
|
||||
150,
|
||||
__('other'),
|
||||
|
@ -10502,22 +10486,22 @@ function reporting_get_module_detailed_event(
|
|||
}
|
||||
|
||||
if ($event_graph_by_criticity) {
|
||||
$data_graph = events_get_count_events_by_criticity(
|
||||
['id_agentmodule' => $id_module],
|
||||
$period,
|
||||
$date,
|
||||
$filter_event_severity,
|
||||
$filter_event_type,
|
||||
$filter_event_status,
|
||||
$filter_event_filter_search,
|
||||
$metaconsole_dbtable,
|
||||
$filter_event_filter_exclude
|
||||
);
|
||||
$data_graph_by_criticity = [];
|
||||
if (empty($event['data']) === false) {
|
||||
foreach ($event['data'] as $value) {
|
||||
$k = get_priority_name($value['criticity']);
|
||||
if (isset($data_graph_by_criticity[$k]) === true) {
|
||||
$data_graph_by_criticity[$k]++;
|
||||
} else {
|
||||
$data_graph_by_criticity[$k] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$colors = get_criticity_pie_colors($data_graph);
|
||||
$colors = get_criticity_pie_colors($data_graph_by_criticity);
|
||||
|
||||
$event['chart']['by_criticity'] = pie_graph(
|
||||
$data_graph,
|
||||
$data_graph_by_criticity,
|
||||
500,
|
||||
150,
|
||||
__('other'),
|
||||
|
@ -10532,20 +10516,24 @@ function reporting_get_module_detailed_event(
|
|||
}
|
||||
|
||||
if ($event_graph_validated_vs_unvalidated) {
|
||||
$data_graph = events_get_count_events_validated(
|
||||
['id_agentmodule' => $id_module],
|
||||
$period,
|
||||
$date,
|
||||
$filter_event_severity,
|
||||
$filter_event_type,
|
||||
$filter_event_status,
|
||||
$filter_event_filter_search,
|
||||
$metaconsole_dbtable,
|
||||
$filter_event_filter_exclude
|
||||
);
|
||||
$data_graph_by_status = [];
|
||||
if (empty($event['data']) === false) {
|
||||
$status = [
|
||||
1 => __('Validated'),
|
||||
0 => __('Not validated'),
|
||||
];
|
||||
foreach ($event['data'] as $value) {
|
||||
$k = $status[$value['estado']];
|
||||
if (isset($data_graph_by_status[$k]) === true) {
|
||||
$data_graph_by_status[$k]++;
|
||||
} else {
|
||||
$data_graph_by_status[$k] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$event['chart']['validated_vs_unvalidated'] = pie_graph(
|
||||
$data_graph,
|
||||
$data_graph_by_status,
|
||||
500,
|
||||
150,
|
||||
__('other'),
|
||||
|
@ -10592,8 +10580,6 @@ function reporting_get_agents_detailed_event(
|
|||
$id_agents,
|
||||
$period=0,
|
||||
$date=0,
|
||||
$return=false,
|
||||
$only_data=false,
|
||||
$history=false,
|
||||
$show_summary_group=false,
|
||||
$filter_event_severity=false,
|
||||
|
@ -10606,10 +10592,7 @@ function reporting_get_agents_detailed_event(
|
|||
) {
|
||||
global $config;
|
||||
|
||||
if ($only_data) {
|
||||
$return_data = [];
|
||||
}
|
||||
|
||||
$id_agents = (array) safe_int($id_agents, 1);
|
||||
|
||||
if (!is_numeric($date)) {
|
||||
|
@ -10620,8 +10603,6 @@ function reporting_get_agents_detailed_event(
|
|||
$date = get_system_time();
|
||||
}
|
||||
|
||||
$events = [];
|
||||
|
||||
foreach ($id_agents as $id_agent) {
|
||||
$event = events_get_agent(
|
||||
$id_agent,
|
||||
|
@ -10645,7 +10626,6 @@ function reporting_get_agents_detailed_event(
|
|||
$event = [];
|
||||
}
|
||||
|
||||
if ($only_data) {
|
||||
$nevents = count($event);
|
||||
for ($i = ($nevents - 1); $i >= 0; $i--) {
|
||||
$e = $event[$i];
|
||||
|
@ -10657,7 +10637,7 @@ function reporting_get_agents_detailed_event(
|
|||
'type' => $e['event_type'],
|
||||
'criticity' => $e['criticity'],
|
||||
'validated_by' => $e['id_usuario'],
|
||||
'timestamp' => $e['timestamp_rep'],
|
||||
'timestamp' => $e['timestamp_last'],
|
||||
'id_evento' => $e['id_evento'],
|
||||
'custom_data' => ($show_custom_data === true) ? $e['custom_data'] : '',
|
||||
];
|
||||
|
@ -10670,91 +10650,16 @@ function reporting_get_agents_detailed_event(
|
|||
'validated_by' => $e['id_usuario'],
|
||||
'timestamp' => $e['timestamp'],
|
||||
'id_evento' => $e['id_evento'],
|
||||
'id_usuario' => $e['id_usuario'],
|
||||
'custom_data' => ($show_custom_data === true) ? $e['custom_data'] : '',
|
||||
];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!empty($event)) {
|
||||
array_push($events, $event);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($only_data) {
|
||||
return $return_data;
|
||||
}
|
||||
|
||||
if ($events) {
|
||||
$note = '';
|
||||
if (count($events) >= 1000) {
|
||||
$note .= '* '.__('Maximum of events shown').' (1000)<br>';
|
||||
}
|
||||
|
||||
foreach ($events as $eventRow) {
|
||||
foreach ($eventRow as $k => $event) {
|
||||
// First pass along the class of this row.
|
||||
$table->cellclass[$k][1] = $table->cellclass[$k][2] = $table->cellclass[$k][4] = $table->cellclass[$k][5] = $table->cellclass[$k][6] = get_priority_class($event['criticity']);
|
||||
|
||||
$data = [];
|
||||
// Colored box.
|
||||
switch ($event['estado']) {
|
||||
case 0:
|
||||
$img_st = 'images/star.png';
|
||||
$title_st = __('New event');
|
||||
break;
|
||||
|
||||
case 1:
|
||||
$img_st = 'images/tick.png';
|
||||
$title_st = __('Event validated');
|
||||
break;
|
||||
|
||||
case 2:
|
||||
$img_st = 'images/hourglass.png';
|
||||
$title_st = __('Event in process');
|
||||
break;
|
||||
}
|
||||
|
||||
$data[] = html_print_image(
|
||||
$img_st,
|
||||
true,
|
||||
[
|
||||
'class' => 'image_status invert filter',
|
||||
'width' => 16,
|
||||
'title' => $title_st,
|
||||
]
|
||||
);
|
||||
|
||||
$data[] = $event['event_rep'];
|
||||
|
||||
$data[] = ui_print_truncate_text(
|
||||
io_safe_output($event['evento']),
|
||||
140,
|
||||
false,
|
||||
true
|
||||
);
|
||||
// $data[] = $event['event_type'];
|
||||
$data[] = events_print_type_img($event['event_type'], true);
|
||||
|
||||
$data[] = get_priority_name($event['criticity']);
|
||||
if (empty($event['id_usuario']) && $event['estado'] == EVENT_VALIDATE) {
|
||||
$data[] = '<i>'.__('System').'</i>';
|
||||
} else {
|
||||
$user_name = db_get_value('fullname', 'tusuario', 'id_user', $event['id_usuario']);
|
||||
$data[] = io_safe_output($user_name);
|
||||
}
|
||||
|
||||
$data[] = '<font style="font-size: 6pt;">'.date($config['date_format'], $event['timestamp_rep']).'</font>';
|
||||
array_push($table->data, $data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($events) {
|
||||
return html_print_table($table, $return).$note;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get general statistical info on a group
|
||||
|
|
|
@ -1068,20 +1068,26 @@ function reporting_html_event_report_group($table, $item, $pdf=0)
|
|||
foreach ($item['data'] as $k => $event) {
|
||||
// First pass along the class of this row.
|
||||
if ($item['show_summary_group']) {
|
||||
$table1->cellclass[$k][1] = $table1->cellclass[$k][2] = $table1->cellclass[$k][4] = $table1->cellclass[$k][5] = $table1->cellclass[$k][6] = $table1->cellclass[$k][7] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$k][1] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$k][2] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$k][4] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$k][5] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$k][6] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$k][7] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$k][8] = get_priority_class($event['criticity']);
|
||||
} else {
|
||||
$table1->cellclass[$k][1] = $table1->cellclass[$k][3] = $table1->cellclass[$k][4] = $table1->cellclass[$k][5] = $table1->cellclass[$k][6] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$k][1] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$k][3] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$k][4] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$k][5] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$k][6] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$k][7] = get_priority_class($event['criticity']);
|
||||
}
|
||||
|
||||
$data = [];
|
||||
|
||||
// Colored box.
|
||||
switch ($event['estado']) {
|
||||
case 0:
|
||||
$img_st = 'images/star.png';
|
||||
$title_st = __('New event');
|
||||
break;
|
||||
|
||||
case 1:
|
||||
$img_st = 'images/tick.png';
|
||||
$title_st = __('Event validated');
|
||||
|
@ -1091,6 +1097,12 @@ function reporting_html_event_report_group($table, $item, $pdf=0)
|
|||
$img_st = 'images/hourglass.png';
|
||||
$title_st = __('Event in process');
|
||||
break;
|
||||
|
||||
default:
|
||||
case 0:
|
||||
$img_st = 'images/star.png';
|
||||
$title_st = __('New event');
|
||||
break;
|
||||
}
|
||||
|
||||
$data[] = html_print_image(
|
||||
|
@ -1117,32 +1129,48 @@ function reporting_html_event_report_group($table, $item, $pdf=0)
|
|||
|
||||
$data[] = events_print_type_img($event['event_type'], true);
|
||||
|
||||
if (!empty($event['id_agente'])) {
|
||||
$data[] = agents_get_alias($event['id_agente']);
|
||||
if (empty($event['alias']) === false) {
|
||||
$alias = $event['alias'];
|
||||
if (is_metaconsole() === true) {
|
||||
$alias = '('.$event['server_name'].') '.$event['alias'];
|
||||
}
|
||||
|
||||
$data[] = $alias;
|
||||
} else {
|
||||
$data[] = __('%s System', get_product_name());
|
||||
}
|
||||
|
||||
$data[] = get_priority_name($event['criticity']);
|
||||
if (empty($event['id_usuario']) && $event['estado'] == EVENT_VALIDATE) {
|
||||
if (empty($event['id_usuario']) === true
|
||||
&& $event['estado'] == EVENT_VALIDATE
|
||||
) {
|
||||
$data[] = '<i>'.__('System').'</i>';
|
||||
} else {
|
||||
$user_name = db_get_value('fullname', 'tusuario', 'id_user', $event['id_usuario']);
|
||||
$user_name = db_get_value(
|
||||
'fullname',
|
||||
'tusuario',
|
||||
'id_user',
|
||||
$event['id_usuario']
|
||||
);
|
||||
$data[] = io_safe_output($user_name);
|
||||
}
|
||||
|
||||
if ($item['show_summary_group']) {
|
||||
$data[] = '<font class="font_6pt">'.date($config['date_format'], $event['timestamp_rep']).'</font>';
|
||||
$data[] = '<font class="font_6pt">'.date($config['date_format'], $event['timestamp_last']).'</font>';
|
||||
} else {
|
||||
$data[] = '<font class="font_6pt">'.date($config['date_format'], strtotime($event['timestamp'])).'</font>';
|
||||
}
|
||||
|
||||
if ($show_custom_data === true) {
|
||||
$custom_data = json_decode($event['custom_data'], true);
|
||||
$custom_data_text = '';
|
||||
if (empty($event['custom_data']) === false) {
|
||||
$custom_data = json_decode($event['custom_data'], true);
|
||||
if (empty($custom_data) === false) {
|
||||
foreach ($custom_data as $key => $value) {
|
||||
$custom_data_text .= $key.' = '.$value.'<br>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$data[] = $custom_data_text;
|
||||
}
|
||||
|
@ -1306,9 +1334,17 @@ function reporting_html_event_report_module($table, $item, $pdf=0)
|
|||
foreach ($item_data as $i => $event) {
|
||||
$data = [];
|
||||
if ($show_summary_group) {
|
||||
$table1->cellclass[$i][1] = $table1->cellclass[$i][2] = $table1->cellclass[$i][3] = $table1->cellclass[$i][4] = $table1->cellclass[$i][5] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][1] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][2] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][3] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][4] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][5] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][6] = get_priority_class($event['criticity']);
|
||||
} else {
|
||||
$table1->cellclass[$i][1] = $table1->cellclass[$i][3] = $table1->cellclass[$i][4] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][1] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][3] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][4] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][6] = get_priority_class($event['criticity']);
|
||||
}
|
||||
|
||||
// Colored box.
|
||||
|
@ -1345,7 +1381,7 @@ function reporting_html_event_report_module($table, $item, $pdf=0)
|
|||
$data[3] = get_priority_name($event['criticity']);
|
||||
if ($show_summary_group) {
|
||||
$data[4] = $event['event_rep'];
|
||||
$data[5] = date($config['date_format'], $event['timestamp_rep']);
|
||||
$data[5] = date($config['date_format'], $event['timestamp_last']);
|
||||
} else {
|
||||
$data[4] = date($config['date_format'], strtotime($event['timestamp']));
|
||||
}
|
||||
|
@ -2397,9 +2433,18 @@ function reporting_html_event_report_agent($table, $item, $pdf=0)
|
|||
|
||||
foreach ($item['data'] as $i => $event) {
|
||||
if ($item['show_summary_group']) {
|
||||
$table1->cellclass[$i][1] = $table1->cellclass[$i][2] = $table1->cellclass[$i][4] = $table1->cellclass[$i][5] = $table1->cellclass[$i][6] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][1] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][2] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][4] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][5] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][6] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][7] = get_priority_class($event['criticity']);
|
||||
} else {
|
||||
$table1->cellclass[$i][1] = $table1->cellclass[$i][3] = $table1->cellclass[$i][4] = $table1->cellclass[$i][5] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][1] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][3] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][4] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][5] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][6] = get_priority_class($event['criticity']);
|
||||
}
|
||||
|
||||
$data = [];
|
||||
|
@ -2454,7 +2499,7 @@ function reporting_html_event_report_agent($table, $item, $pdf=0)
|
|||
}
|
||||
|
||||
if ($item['show_summary_group']) {
|
||||
$data[] = '<font class="font_6pt">'.date($config['date_format'], $event['timestamp']).'</font>';
|
||||
$data[] = '<font class="font_6pt">'.date($config['date_format'], strtotime($event['timestamp'])).'</font>';
|
||||
} else {
|
||||
$data[] = '<font class="font_6pt">'.date($config['date_format'], strtotime($event['timestamp'])).'</font>';
|
||||
}
|
||||
|
@ -5947,7 +5992,7 @@ function reporting_get_event_histogram($events, $text_header_event=false)
|
|||
}
|
||||
|
||||
|
||||
function reporting_get_event_histogram_meta($width)
|
||||
function reporting_get_event_histogram_meta($width, $events)
|
||||
{
|
||||
global $config;
|
||||
if (!defined('METACONSOLE')) {
|
||||
|
@ -5990,21 +6035,6 @@ function reporting_get_event_histogram_meta($width)
|
|||
EVENT_CRIT_CRITICAL => COL_CRITICAL,
|
||||
];
|
||||
|
||||
$user_groups = users_get_groups($config['id_user'], 'ER');
|
||||
$user_groups_ids = array_keys($user_groups);
|
||||
|
||||
if (empty($user_groups)) {
|
||||
$groups_condition = ' AND 1 = 0 ';
|
||||
} else {
|
||||
$groups_condition = ' AND id_grupo IN ('.implode(',', $user_groups_ids).') ';
|
||||
}
|
||||
|
||||
if (!check_acl($config['id_user'], 0, 'PM')) {
|
||||
$groups_condition .= ' AND id_grupo != 0';
|
||||
}
|
||||
|
||||
$status_condition = ' AND estado = 0 ';
|
||||
|
||||
$cont = 0;
|
||||
for ($i = 0; $i < $interval; $i++) {
|
||||
$bottom = ($datelimit + ($periodtime * $i));
|
||||
|
@ -6028,25 +6058,14 @@ function reporting_get_event_histogram_meta($width)
|
|||
|
||||
$top = ($datelimit + ($periodtime * ($i + 1)));
|
||||
|
||||
$time_condition = 'utimestamp > '.$bottom.' AND utimestamp < '.$top;
|
||||
$sql = sprintf(
|
||||
'SELECT criticity,utimestamp
|
||||
FROM tmetaconsole_event
|
||||
WHERE %s %s %s
|
||||
ORDER BY criticity DESC',
|
||||
$time_condition,
|
||||
$groups_condition,
|
||||
$status_condition
|
||||
);
|
||||
|
||||
$events = db_get_all_rows_sql($sql);
|
||||
|
||||
$events_criticity = [];
|
||||
if (is_array($events)) {
|
||||
foreach ($events as $key => $value) {
|
||||
foreach ($events as $value) {
|
||||
if ($value['utimestamp'] >= $bottom && $value['utimestamp'] < $top) {
|
||||
array_push($events_criticity, $value['criticity']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($events)) {
|
||||
if (array_search('4', $events_criticity) !== false) {
|
||||
|
|
|
@ -34,15 +34,22 @@
|
|||
*
|
||||
* @param boolean $id_user
|
||||
* @param boolean $user_strict
|
||||
* @param [type] $acltags
|
||||
* @param array $acltags
|
||||
* @param boolean $returnAllGroup
|
||||
* @param string $mode
|
||||
* @param array $agent_filter
|
||||
* @param array $module_filter
|
||||
* @return void
|
||||
*/
|
||||
function tactical_get_data($id_user=false, $user_strict=false, $acltags, $returnAllGroup=false, $mode='group', $agent_filter=[], $module_filter=[])
|
||||
{
|
||||
function tactical_get_data(
|
||||
$id_user=false,
|
||||
$user_strict=false,
|
||||
$acltags=[],
|
||||
$returnAllGroup=false,
|
||||
$mode='group',
|
||||
$agent_filter=[],
|
||||
$module_filter=[]
|
||||
) {
|
||||
global $config;
|
||||
if ($id_user == false) {
|
||||
$id_user = $config['id_user'];
|
||||
|
@ -504,10 +511,12 @@ function tactical_status_modules_agents($id_user=false, $user_strict=false, $acc
|
|||
|
||||
function tactical_monitor_alerts($strict_user=false)
|
||||
{
|
||||
global $config;
|
||||
$groups = users_get_groups($config['id_user'], 'AR', false);
|
||||
$id_groups = array_keys($groups);
|
||||
|
||||
if (empty($id_groups)) {
|
||||
$where_clause = '';
|
||||
if (empty($id_groups) === true) {
|
||||
$where_clause .= ' AND (1 = 0) ';
|
||||
} else {
|
||||
$where_clause .= sprintf(
|
||||
|
|
|
@ -3254,7 +3254,7 @@ function ui_print_datatable(array $parameters)
|
|||
$parameters['paging'] = true;
|
||||
}
|
||||
|
||||
$no_sortable_columns = [];
|
||||
$no_sortable_columns = json_encode([]);
|
||||
if (isset($parameters['no_sortable_columns'])) {
|
||||
$no_sortable_columns = json_encode($parameters['no_sortable_columns']);
|
||||
}
|
||||
|
@ -3326,6 +3326,11 @@ function ui_print_datatable(array $parameters)
|
|||
$parameters['datacolumns'] = $parameters['columns'];
|
||||
}
|
||||
|
||||
if (isset($parameters['csv']) === false) {
|
||||
$parameters['csv'] = 1;
|
||||
}
|
||||
|
||||
$filter = '';
|
||||
// Datatable filter.
|
||||
if (isset($parameters['form']) && is_array($parameters['form'])) {
|
||||
if (isset($parameters['form']['id'])) {
|
||||
|
@ -3377,7 +3382,7 @@ function ui_print_datatable(array $parameters)
|
|||
foreach ($parameters['form']['extra_buttons'] as $button) {
|
||||
$filter .= '<button id="'.$button['id'].'" ';
|
||||
$filter .= ' class="'.$button['class'].'" ';
|
||||
$filter .= ' style="'.$button['style'].'" ';
|
||||
$filter .= ' style="'.($button['style'] ?? '').'" ';
|
||||
$filter .= ' onclick="'.$button['onclick'].'" >';
|
||||
$filter .= $button['text'];
|
||||
$filter .= '</button>';
|
||||
|
@ -3496,7 +3501,7 @@ function ui_print_datatable(array $parameters)
|
|||
language: {
|
||||
processing:"'.$processing.'"
|
||||
},
|
||||
buttons: [
|
||||
buttons: '.$parameters['csv'].'== 1 ? [
|
||||
{
|
||||
extend: "csv",
|
||||
text : "'.__('Export current page to CSV').'",
|
||||
|
@ -3512,14 +3517,14 @@ function ui_print_datatable(array $parameters)
|
|||
}'.$export_columns.'
|
||||
}
|
||||
}
|
||||
],
|
||||
] : [],
|
||||
lengthMenu: '.json_encode($pagination_options).',
|
||||
ajax: {
|
||||
url: "'.ui_get_full_url('ajax.php', false, false, false).'",
|
||||
type: "POST",
|
||||
dataSrc: function (json) {
|
||||
if (json.error) {
|
||||
console.log(json.error);
|
||||
console.error(json.error);
|
||||
$("#error-'.$table_id.'").html(json.error);
|
||||
$("#error-'.$table_id.'").dialog({
|
||||
title: "Filter failed",
|
||||
|
@ -3535,6 +3540,19 @@ function ui_print_datatable(array $parameters)
|
|||
}
|
||||
}).parent().addClass("ui-state-error");
|
||||
} else {';
|
||||
|
||||
if (isset($parameters['ajax_return_operation']) === true
|
||||
&& empty($parameters['ajax_return_operation']) === false
|
||||
&& isset($parameters['ajax_return_operation_function']) === true
|
||||
&& empty($parameters['ajax_return_operation_function']) === false
|
||||
) {
|
||||
$js .= '
|
||||
if (json.'.$parameters['ajax_return_operation'].' !== undefined) {
|
||||
'.$parameters['ajax_return_operation_function'].'(json.'.$parameters['ajax_return_operation'].');
|
||||
}
|
||||
';
|
||||
}
|
||||
|
||||
if (isset($parameters['ajax_postprocess'])) {
|
||||
$js .= '
|
||||
if (json.data) {
|
||||
|
@ -5882,7 +5900,7 @@ function ui_print_agent_autocomplete_input($parameters)
|
|||
}
|
||||
|
||||
$attrs = [];
|
||||
$attrs['style'] = 'padding-right: 20px; background: url('.$icon_image.') no-repeat right; '.$text_color.'';
|
||||
$attrs['style'] = 'padding-right: 20px; padding: 2px 5px; margin-bottom: 4px; border: none; border-bottom: 1px solid #ccc; border-radius: 0; background: url('.$icon_image.') no-repeat right; '.$text_color.'';
|
||||
|
||||
if (!$disabled_javascript_on_blur_function) {
|
||||
$attrs['onblur'] = $javascript_on_blur_function_name.'()';
|
||||
|
|
|
@ -82,7 +82,7 @@ function visual_map_print_user_line_handles($layoutData)
|
|||
|
||||
function visual_map_print_item(
|
||||
$mode='read',
|
||||
$layoutData,
|
||||
$layoutData=[],
|
||||
$proportion=null,
|
||||
$show_links=true,
|
||||
$isExternalLink=false,
|
||||
|
@ -2554,13 +2554,13 @@ function visual_map_process_wizard_add(
|
|||
$range,
|
||||
$width=0,
|
||||
$height=0,
|
||||
$period,
|
||||
$process_value,
|
||||
$percentileitem_width,
|
||||
$max_value,
|
||||
$type_percentile,
|
||||
$value_show,
|
||||
$type
|
||||
$period='',
|
||||
$process_value='',
|
||||
$percentileitem_width='',
|
||||
$max_value=0,
|
||||
$type_percentile='',
|
||||
$value_show='',
|
||||
$type=''
|
||||
) {
|
||||
if (empty($id_agents)) {
|
||||
print_error_message(__('No agents selected'));
|
||||
|
@ -3956,7 +3956,15 @@ function visual_map_get_layout_status($layout_id, $status_data=[], $depth=0)
|
|||
sort_by_column($valid_layout_items, 'id_metaconsole');
|
||||
}
|
||||
|
||||
$num_elements_by_status = [];
|
||||
$num_elements_by_status = [
|
||||
VISUAL_MAP_STATUS_CRITICAL_BAD => 0,
|
||||
VISUAL_MAP_STATUS_CRITICAL_ALERT => 0,
|
||||
VISUAL_MAP_STATUS_NORMAL => 0,
|
||||
VISUAL_MAP_STATUS_WARNING => 0,
|
||||
VISUAL_MAP_STATUS_UNKNOWN => 0,
|
||||
VISUAL_MAP_STATUS_WARNING_ALERT => 0,
|
||||
];
|
||||
|
||||
$meta_connected_to = null;
|
||||
|
||||
foreach ($valid_layout_items as $layout_item_data) {
|
||||
|
@ -3993,7 +4001,7 @@ function visual_map_get_layout_status($layout_id, $status_data=[], $depth=0)
|
|||
|
||||
$ent_element_status = enterprise_hook(
|
||||
'enterprise_visual_map_get_status_element',
|
||||
[$layoutData]
|
||||
[$layout_item_data]
|
||||
);
|
||||
if ($ent_element_status === ENTERPRISE_NOT_HOOK) {
|
||||
$ent_element_status = false;
|
||||
|
@ -4558,7 +4566,7 @@ function css_label_styles_visual_console($uniq, $ratio=1)
|
|||
$output .= '.c-'.$uniq.' a {color: #3f3f3f } ';
|
||||
$output .= '.c-'.$uniq.' .label p strong span {display: inline-block !important; line-height: normal !important} ';
|
||||
$output .= '.c-'.$uniq.' *:not(.parent_graph p table tr td span) { font-size: '.(8 * $ratio).'pt; line-height:'.(8 * ($ratio)).'pt; }';
|
||||
$output .= '.c-'.$uniq.' .visual-console-item-label table tr td { padding: 0; margin: 0; }';
|
||||
$output .= '.c-'.$uniq.' .visual-console-item-label table tr td { padding: 0; margin: 0; white-space: pre-wrap; }';
|
||||
$output .= '.c-'.$uniq.' .visual_font_size_4pt, .c-'.$uniq.' .visual_font_size_4pt * { font-size: '.(4 * $ratio).'pt !important; line-height:'.(4 * ($ratio)).'pt !important; }';
|
||||
$output .= '.c-'.$uniq.' .visual_font_size_6pt, .c-'.$uniq.' .visual_font_size_6pt * { font-size: '.(6 * $ratio).'pt !important; line-height:'.(6 * ($ratio)).'pt !important; }';
|
||||
$output .= '.c-'.$uniq.' .visual_font_size_8pt, .c-'.$uniq.' .visual_font_size_8pt * { font-size: '.(8 * $ratio).'pt !important; line-height:'.(8 * ($ratio)).'pt !important; }';
|
||||
|
|
|
@ -32,13 +32,13 @@ function wmi_compose_query($wmi_client, $user, $password, $host, $namespace='')
|
|||
{
|
||||
$wmi_command = '';
|
||||
|
||||
if (!empty($password)) {
|
||||
$wmi_command = $wmi_client.' -U "'.$user.'"%"'.$password.'"';
|
||||
if (empty($password) === false) {
|
||||
$wmi_command = $wmi_client.' -U \''.$user.'\'%\''.$password.'\'';
|
||||
} else {
|
||||
$wmi_command = $wmi_client.' -U "'.$user.'"';
|
||||
}
|
||||
|
||||
if (!empty($namespace)) {
|
||||
if (empty($namespace) === false) {
|
||||
$namespace = str_replace('"', "'", $namespace);
|
||||
$wmi_command .= ' --namespace="'.$namespace.'"';
|
||||
}
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
global $config;
|
||||
|
||||
require_once __DIR__.'/config.php';
|
|
@ -2945,39 +2945,6 @@ function set_watermark(graph_id, plot, watermark_src) {
|
|||
);
|
||||
}
|
||||
|
||||
function get_event_details(event_ids) {
|
||||
table = "";
|
||||
if (typeof event_ids != "undefined") {
|
||||
var inputs = [];
|
||||
var table;
|
||||
inputs.push("get_events_details=1");
|
||||
inputs.push("event_ids=" + event_ids);
|
||||
inputs.push("page=include/ajax/events");
|
||||
|
||||
// Autologin
|
||||
if ($("#hidden-loginhash").val() != undefined) {
|
||||
inputs.push("loginhash=" + $("#hidden-loginhash").val());
|
||||
inputs.push("loginhash_data=" + $("#hidden-loginhash_data").val());
|
||||
inputs.push("loginhash_user=" + $("#hidden-loginhash_user").val());
|
||||
}
|
||||
|
||||
jQuery.ajax({
|
||||
data: inputs.join("&"),
|
||||
type: "GET",
|
||||
url: (action = "../../ajax.php"),
|
||||
timeout: 10000,
|
||||
dataType: "html",
|
||||
async: false,
|
||||
success: function(data) {
|
||||
table = data;
|
||||
//forced_title_callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return table;
|
||||
}
|
||||
|
||||
//Ajusta la grafica pequenña con el desplazamiento del eje y
|
||||
function adjust_left_width_canvas(adapter_id, adapted_id) {
|
||||
var adapter_left_margin = $("#" + adapter_id + " .yAxis .tickLabel").width();
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
<?php
|
||||
/*
|
||||
Include package help/en
|
||||
*/
|
||||
?>
|
||||
|
||||
<p> If the event replication is activated, all the events will be copied to the remote metaconsole's database.
|
||||
<br><br>
|
||||
It is necessary to configure the credentials of the metaconsole's database, the replication mode (all events or only validated events) and the replication interval, specified in seconds.
|
||||
<br><br>
|
||||
<b>NOTES:</b>
|
||||
<br><br>
|
||||
The event viewer will be disabled if this option is enabled.
|
||||
<br><br>
|
||||
To apply the changes made on the event replication setup, it is necessary to restart the server.
|
||||
<br><br>
|
||||
The token "event_replication" must be set to 1 in the server's configuration file.
|
||||
</p>
|
|
@ -1,22 +0,0 @@
|
|||
<?php
|
||||
/*
|
||||
Include package help/es
|
||||
*/
|
||||
?>
|
||||
|
||||
<p> Cuando la replicación de eventos está activada, los eventos recibidos se copiarán a la base de datos remota de una metaconsola.
|
||||
<br><br>
|
||||
Es necesario configurar las credenciales de la base de datos de la metaconsola, así como el modo de replicación (todos los eventos o solo los validados) y el intervalo de replicación en segundos.
|
||||
<br><br>
|
||||
<b>NOTAS:</b>
|
||||
<br><br>
|
||||
El visor de eventos se deshabilita cuando se activa esta opción.
|
||||
<br><br>
|
||||
Para que los cambios en la configuración de replicación de eventos se hagan efectivos será necesario reiniciar el servidor.
|
||||
<br><br>
|
||||
El fichero de configuración del servidor deberá tener el token:
|
||||
|
||||
<i>event_replication 1</i>
|
||||
|
||||
</p>
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
<?php
|
||||
/*
|
||||
Include package help/ja
|
||||
*/
|
||||
?>
|
||||
|
||||
<p> イベントの複製が有効の場合、受け取ったイベントは、メタコンソールのリモートデータベースにコピーされます。
|
||||
<br><br>
|
||||
メタコンソールのデータベースへのアクセス権、複製モード(全イベントまたは承諾済のみ)、複製間隔(秒)を設定する必要があります。
|
||||
<br><br>
|
||||
<b>注意:</b>
|
||||
<br><br>
|
||||
このオプションが有効の場合は、イベントビューワは無効になります。
|
||||
<br><br>
|
||||
イベントの複製の設定変更を反映させるには、サーバを再起動する必要があります。
|
||||
<br><br>
|
||||
サーバの設定ファイルに、次の設定を行う必要があります。
|
||||
|
||||
<i>event_replication 1</i>
|
||||
|
||||
</p>
|
|
@ -1243,6 +1243,8 @@ function dashboardLoadVC(settings) {
|
|||
var ratio_visualconsole = props.height / props.width;
|
||||
var ratio_w = size.width / props.width;
|
||||
var ratio_h = size.height / props.height;
|
||||
var acum_height = props.height;
|
||||
var acum_width = props.width;
|
||||
|
||||
props.width = size.width;
|
||||
props.height = size.width * ratio_visualconsole;
|
||||
|
@ -1255,6 +1257,11 @@ function dashboardLoadVC(settings) {
|
|||
props.height = size.height;
|
||||
props.width = size.height / ratio_visualconsole;
|
||||
}
|
||||
} else {
|
||||
ratio = ratio_w;
|
||||
var height = (acum_height * size.width) / acum_width;
|
||||
props.height = height;
|
||||
props.width = height / ratio_visualconsole;
|
||||
}
|
||||
} else {
|
||||
if (props.height > size.height) {
|
||||
|
@ -1310,22 +1317,30 @@ function dashboardLoadVC(settings) {
|
|||
var regex_hash = /(hash=)[^&]+(&?)/gi;
|
||||
var replacement_hash = "$1" + props.hash + "$2";
|
||||
|
||||
/*
|
||||
var regex_width = /(width=)[^&]+(&?)/gi;
|
||||
var replacement_width = "$1" + size.width + "$2";
|
||||
|
||||
var regex_height = /(height=)[^&]+(&?)/gi;
|
||||
var replacement_height =
|
||||
"$1" + (size.height + headerMobileFix) + "$2";
|
||||
*/
|
||||
|
||||
// Change the URL (if the browser has support).
|
||||
if ("history" in window) {
|
||||
var href = window.location.href.replace(regex, replacement);
|
||||
href = href.replace(regex_hash, replacement_hash);
|
||||
href = href.replace(regex_width, replacement_width);
|
||||
href = href.replace(regex_height, replacement_height);
|
||||
//href = href.replace(regex_width, replacement_width);
|
||||
//href = href.replace(regex_height, replacement_height);
|
||||
window.history.replaceState({}, document.title, href);
|
||||
}
|
||||
|
||||
if (props.height > props.width) {
|
||||
$(".container-center").css("overflow", "auto");
|
||||
} else {
|
||||
$(".container-center").css("overflow", "inherit");
|
||||
}
|
||||
|
||||
container.classList.remove("cv-overflow");
|
||||
|
||||
// View title.
|
||||
|
@ -1371,6 +1386,7 @@ function dashboardLoadVC(settings) {
|
|||
: "dashboard"
|
||||
);
|
||||
|
||||
if (settings.mobile_view_orientation_vc === true) {
|
||||
$(window).on("orientationchange", function() {
|
||||
$(container).width($(window).height());
|
||||
$(container).height($(window).width() - headerMobileFix);
|
||||
|
@ -1406,145 +1422,6 @@ function dashboardLoadVC(settings) {
|
|||
visualConsoleManager.changeDimensionsVc(dimensions, interval);
|
||||
});
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
function dashboardShowEventDialog(settings) {
|
||||
settings = JSON.parse(atob(settings));
|
||||
var dialog_exist = $("div[aria-describedby='event_details_window']");
|
||||
if (dialog_exist.length == 1) {
|
||||
$("div[aria-describedby='event_details_window']").remove();
|
||||
}
|
||||
$.ajax({
|
||||
method: "post",
|
||||
url: settings.ajaxUrl,
|
||||
data: {
|
||||
page: settings.page,
|
||||
get_extended_event: 1,
|
||||
event: settings.event,
|
||||
dialog_page: "",
|
||||
meta: 0,
|
||||
history: 0,
|
||||
filter: [],
|
||||
node_id: settings.node_id
|
||||
},
|
||||
dataType: "html",
|
||||
success: function(data) {
|
||||
$("#event_details_window")
|
||||
.hide()
|
||||
.empty()
|
||||
.append(data)
|
||||
.dialog({
|
||||
title: settings.event.evento,
|
||||
resizable: true,
|
||||
draggable: true,
|
||||
modal: true,
|
||||
create: function() {
|
||||
$("#button-delete_button").removeAttr("onclick");
|
||||
$("#button-delete_button").click(function() {
|
||||
var confirm_message = $("#hidden-delete_confirm_message").val();
|
||||
if (confirm(confirm_message) == false) {
|
||||
return false;
|
||||
}
|
||||
$.ajax({
|
||||
method: "post",
|
||||
url: settings.ajaxUrl,
|
||||
data: {
|
||||
page: "include/ajax/events",
|
||||
delete_event: 1,
|
||||
node_id: settings.node_id,
|
||||
id_evento: settings.event.id_evento,
|
||||
filter: []
|
||||
},
|
||||
success: function() {
|
||||
$("#notification_delete_error").show();
|
||||
$("#event_details_window").dialog("close");
|
||||
},
|
||||
error: function(error) {
|
||||
console.error(error);
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
close: function() {
|
||||
//$("#refrcounter").countdown("resume");
|
||||
//$("div.vc-countdown").countdown("resume");
|
||||
$.ajax({
|
||||
method: "post",
|
||||
url: settings.ajaxUrl,
|
||||
data: {
|
||||
page: "operation/dashboard/dashboard",
|
||||
method: "drawWidget",
|
||||
dashboardId: settings.dashboardId,
|
||||
cellId: settings.cellId,
|
||||
widgetId: settings.widgetId,
|
||||
redraw: 1
|
||||
},
|
||||
success: function(dataWidget) {
|
||||
// Widget empty and reload.
|
||||
$("#widget-" + settings.cellId + " .content-widget").empty();
|
||||
$("#widget-" + settings.cellId + " .content-widget").append(
|
||||
dataWidget
|
||||
);
|
||||
},
|
||||
error: function(error) {
|
||||
console.error(error);
|
||||
}
|
||||
});
|
||||
},
|
||||
overlay: {
|
||||
opacity: 0.5,
|
||||
background: "black"
|
||||
},
|
||||
width: 710,
|
||||
height: 600
|
||||
})
|
||||
.show();
|
||||
|
||||
$.post({
|
||||
url: settings.ajaxUrl,
|
||||
data: {
|
||||
page: "include/ajax/events",
|
||||
get_comments: 1,
|
||||
event: settings.event,
|
||||
filter: []
|
||||
},
|
||||
dataType: "html",
|
||||
success: function(data) {
|
||||
$("#extended_event_comments_page").empty();
|
||||
$("#extended_event_comments_page").html(data);
|
||||
}
|
||||
});
|
||||
|
||||
//$("#refrcounter").countdown("pause");
|
||||
//$("div.vc-countdown").countdown("pause");
|
||||
|
||||
switch (settings.result) {
|
||||
case "comment_ok":
|
||||
$("#notification_comment_success").show();
|
||||
break;
|
||||
case "comment_error":
|
||||
$("#notification_comment_error").show();
|
||||
break;
|
||||
case "status_ok":
|
||||
$("#notification_status_success").show();
|
||||
break;
|
||||
case "status_error":
|
||||
$("#notification_status_error").show();
|
||||
break;
|
||||
case "owner_ok":
|
||||
$("#notification_owner_success").show();
|
||||
break;
|
||||
case "owner_error":
|
||||
$("#notification_owner_error").show();
|
||||
break;
|
||||
}
|
||||
|
||||
forced_title_callback();
|
||||
},
|
||||
error: function(error) {
|
||||
console.error(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*global jQuery,$,forced_title_callback,Base64, dt_events*/
|
||||
/*global jQuery, $, forced_title_callback, confirmDialog*/
|
||||
|
||||
// Show the modal window of an event
|
||||
function show_event_dialog(event, dialog_page, result) {
|
||||
function show_event_dialog(event, dialog_page) {
|
||||
var ajax_file = $("#hidden-ajax_file").val();
|
||||
|
||||
if (dialog_page == undefined) {
|
||||
|
@ -81,24 +81,11 @@ function show_event_dialog(event, dialog_page, result) {
|
|||
}
|
||||
})
|
||||
.show();
|
||||
$.post({
|
||||
url: "ajax.php",
|
||||
data: {
|
||||
page: "include/ajax/events",
|
||||
get_comments: 1,
|
||||
event: event,
|
||||
filter: values
|
||||
},
|
||||
dataType: "html",
|
||||
success: function(data) {
|
||||
$("#extended_event_comments_page").empty();
|
||||
$("#extended_event_comments_page").html(data);
|
||||
}
|
||||
});
|
||||
|
||||
$("#refrcounter").countdown("pause");
|
||||
$("div.vc-countdown").countdown("pause");
|
||||
|
||||
/*
|
||||
switch (result) {
|
||||
case "comment_ok":
|
||||
$("#notification_comment_success").show();
|
||||
|
@ -119,6 +106,7 @@ function show_event_dialog(event, dialog_page, result) {
|
|||
$("#notification_owner_error").show();
|
||||
break;
|
||||
}
|
||||
*/
|
||||
|
||||
forced_title_callback();
|
||||
},
|
||||
|
@ -131,7 +119,7 @@ function show_event_dialog(event, dialog_page, result) {
|
|||
function execute_response(event_id, server_id) {
|
||||
var response_id = $("#select_custom_response option:selected").val();
|
||||
|
||||
var response = get_response(response_id);
|
||||
var response = get_response(response_id, server_id);
|
||||
|
||||
// If cannot get response abort it
|
||||
if (response == null) {
|
||||
|
@ -246,13 +234,14 @@ function show_massive_response_dialog(
|
|||
}
|
||||
|
||||
// Get an event response from db
|
||||
function get_response(response_id) {
|
||||
function get_response(response_id, server_id) {
|
||||
var response = "";
|
||||
|
||||
var params = [];
|
||||
params.push("page=include/ajax/events");
|
||||
params.push("get_response=1");
|
||||
params.push("response_id=" + response_id);
|
||||
params.push("server_id=" + server_id);
|
||||
|
||||
jQuery.ajax({
|
||||
data: params.join("&"),
|
||||
|
@ -314,31 +303,6 @@ function get_response_description(response_id) {
|
|||
return response_description;
|
||||
}
|
||||
|
||||
// Get an event response description from db
|
||||
function get_event_name(event_id, meta, history) {
|
||||
var name = "";
|
||||
|
||||
var params = [];
|
||||
params.push("page=include/ajax/events");
|
||||
params.push("get_event_name=1");
|
||||
params.push("event_id=" + event_id);
|
||||
params.push("meta=" + meta);
|
||||
params.push("history=" + history);
|
||||
|
||||
jQuery.ajax({
|
||||
data: params.join("&"),
|
||||
type: "POST",
|
||||
url: $("#hidden-ajax_file").val(),
|
||||
async: false,
|
||||
dataType: "html",
|
||||
success: function(data) {
|
||||
name = data;
|
||||
}
|
||||
});
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
function add_row_param(id_table, param) {
|
||||
$("#" + id_table).append(
|
||||
'<tr class="params_rows"><td style="text-align:left; padding-left:40px; font-weight: normal; font-style: italic;">' +
|
||||
|
@ -472,11 +436,8 @@ function perform_response_massive(response, response_id, out_iterator) {
|
|||
}
|
||||
|
||||
// Change the status of an event to new, in process or validated.
|
||||
function event_change_status(event_ids) {
|
||||
function event_change_status(event_ids, server_id) {
|
||||
var new_status = $("#estado").val();
|
||||
var meta = $("#hidden-meta").val();
|
||||
var history = $("#hidden-history").val();
|
||||
var node_id = $("#hidden-node_id").val();
|
||||
|
||||
$("#button-status_button").attr("disabled", "disabled");
|
||||
$("#response_loading").show();
|
||||
|
@ -487,13 +448,10 @@ function event_change_status(event_ids) {
|
|||
change_status: 1,
|
||||
event_ids: event_ids,
|
||||
new_status: new_status,
|
||||
meta: meta,
|
||||
node_id: node_id,
|
||||
history: history
|
||||
server_id: server_id
|
||||
},
|
||||
type: "POST",
|
||||
url: $("#hidden-ajax_file").val(),
|
||||
async: true,
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
$("#button-status_button").removeAttr("disabled");
|
||||
|
@ -537,12 +495,8 @@ function event_change_status(event_ids) {
|
|||
}
|
||||
|
||||
// Change te owner of an event to one user of empty
|
||||
function event_change_owner() {
|
||||
var event_id = $("#hidden-id_event").val();
|
||||
function event_change_owner(event_id, server_id) {
|
||||
var new_owner = $("#id_owner").val();
|
||||
var meta = $("#hidden-meta").val();
|
||||
var history = $("#hidden-history").val();
|
||||
var node_id = $("#hidden-node_id").val();
|
||||
|
||||
$("#button-owner_button").attr("disabled", "disabled");
|
||||
$("#response_loading").show();
|
||||
|
@ -552,10 +506,8 @@ function event_change_owner() {
|
|||
page: "include/ajax/events",
|
||||
change_owner: 1,
|
||||
event_id: event_id,
|
||||
new_owner: new_owner,
|
||||
meta: meta,
|
||||
node_id: node_id,
|
||||
history: history
|
||||
server_id: server_id,
|
||||
new_owner: new_owner
|
||||
},
|
||||
type: "POST",
|
||||
url: $("#hidden-ajax_file").val(),
|
||||
|
@ -607,15 +559,6 @@ function event_comment(current_event) {
|
|||
}
|
||||
|
||||
var comment = $("#textarea_comment").val();
|
||||
var meta = 0;
|
||||
if ($("#hidden-meta").val() != undefined) {
|
||||
meta = $("#hidden-meta").val();
|
||||
}
|
||||
|
||||
var history = 0;
|
||||
if ($("#hidden-history").val() != undefined) {
|
||||
history = $("#hidden-history").val();
|
||||
}
|
||||
|
||||
if (comment == "") {
|
||||
show_event_dialog(current_event, "comments", "comment_error");
|
||||
|
@ -631,8 +574,7 @@ function event_comment(current_event) {
|
|||
params.push("event_id=" + event.id_evento);
|
||||
}
|
||||
params.push("comment=" + comment);
|
||||
params.push("meta=" + meta);
|
||||
params.push("history=" + history);
|
||||
params.push("server_id=" + event.server_id);
|
||||
|
||||
$("#button-comment_button").attr("disabled", "disabled");
|
||||
$("#response_loading").show();
|
||||
|
@ -641,9 +583,8 @@ function event_comment(current_event) {
|
|||
data: params.join("&"),
|
||||
type: "POST",
|
||||
url: $("#hidden-ajax_file").val(),
|
||||
async: true,
|
||||
dataType: "html",
|
||||
success: function(data) {
|
||||
success: function() {
|
||||
$("#button-comment_button").removeAttr("disabled");
|
||||
$("#response_loading").hide();
|
||||
$("#link_comments").click();
|
||||
|
@ -653,60 +594,6 @@ function event_comment(current_event) {
|
|||
return false;
|
||||
}
|
||||
|
||||
//Show event list when fielter repetead is Group agents
|
||||
function show_events_group_agent(id_insert, id_agent, server_id) {
|
||||
var parameter = [];
|
||||
parameter.push({ name: "id_agent", value: id_agent });
|
||||
parameter.push({ name: "server_id", value: server_id });
|
||||
parameter.push({ name: "event_type", value: $("#event_type").val() });
|
||||
parameter.push({ name: "severity", value: $("#severity").val() });
|
||||
parameter.push({ name: "status", value: $("#status").val() });
|
||||
parameter.push({ name: "search", value: $("#text-search").val() });
|
||||
parameter.push({
|
||||
name: "id_agent_module",
|
||||
value: $("input:hidden[name=module_search_hidden]").val()
|
||||
});
|
||||
parameter.push({
|
||||
name: "event_view_hr",
|
||||
value: $("#text-event_view_hr").val()
|
||||
});
|
||||
parameter.push({ name: "id_user_ack", value: $("#id_user_ack").val() });
|
||||
parameter.push({
|
||||
name: "tag_with",
|
||||
value: Base64.decode($("#hidden-tag_with").val())
|
||||
});
|
||||
parameter.push({
|
||||
name: "tag_without",
|
||||
value: Base64.decode($("#hidden-tag_without").val())
|
||||
});
|
||||
parameter.push({
|
||||
name: "filter_only_alert",
|
||||
value: $("#filter_only_alert").val()
|
||||
});
|
||||
parameter.push({ name: "date_from", value: $("#text-date_from").val() });
|
||||
parameter.push({ name: "date_to", value: $("#text-date_to").val() });
|
||||
parameter.push({ name: "server_id_search", value: $("#server_id").val() });
|
||||
parameter.push({
|
||||
name: "page",
|
||||
value: "include/ajax/events"
|
||||
});
|
||||
parameter.push({
|
||||
name: "get_list_events_agents",
|
||||
value: 1
|
||||
});
|
||||
|
||||
jQuery.ajax({
|
||||
type: "POST",
|
||||
url: $("#hidden-ajax_file").val(),
|
||||
data: parameter,
|
||||
dataType: "html",
|
||||
success: function(data) {
|
||||
$("#" + id_insert).html(data);
|
||||
$("#" + id_insert).toggle();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function show_event_response_command_dialog(id, response, total_checked) {
|
||||
var params = [];
|
||||
params.push("page=include/ajax/events");
|
||||
|
@ -756,7 +643,7 @@ function show_event_response_command_dialog(id, response, total_checked) {
|
|||
}
|
||||
|
||||
var processed = 0;
|
||||
function update_event(table, id_evento, type, event_rep, row) {
|
||||
function update_event(table, id_evento, type, event_rep, row, server_id) {
|
||||
var inputs = $("#events_form :input");
|
||||
var values = {};
|
||||
var redraw = false;
|
||||
|
@ -775,6 +662,7 @@ function update_event(table, id_evento, type, event_rep, row) {
|
|||
in_process_event: type.in_process_event,
|
||||
delete_event: type.delete_event,
|
||||
id_evento: id_evento,
|
||||
server_id: server_id,
|
||||
event_rep: event_rep,
|
||||
filter: values
|
||||
},
|
||||
|
@ -789,7 +677,9 @@ function update_event(table, id_evento, type, event_rep, row) {
|
|||
redraw = true;
|
||||
}
|
||||
if (redraw) {
|
||||
table.draw(false);
|
||||
$("#" + table)
|
||||
.DataTable()
|
||||
.draw(false);
|
||||
} else {
|
||||
$(row)
|
||||
.closest("tr")
|
||||
|
@ -804,8 +694,13 @@ function update_event(table, id_evento, type, event_rep, row) {
|
|||
}
|
||||
// Update events matching current filters and id_evento selected.
|
||||
|
||||
function validate_event(table, id_evento, event_rep, row) {
|
||||
function validate_event(table, id_evento, event_rep, row, server_id) {
|
||||
var button = document.getElementById("val-" + id_evento);
|
||||
var meta = $("#hidden-meta").val();
|
||||
if (meta != 0) {
|
||||
button = document.getElementById("val-" + id_evento + "-" + server_id);
|
||||
}
|
||||
|
||||
if (!button) {
|
||||
// Button does not exist. Ignore.
|
||||
processed += 1;
|
||||
|
@ -814,11 +709,23 @@ function validate_event(table, id_evento, event_rep, row) {
|
|||
|
||||
button.children[0];
|
||||
button.children[0].src = "images/spinner.gif";
|
||||
return update_event(table, id_evento, { validate_event: 1 }, event_rep, row);
|
||||
return update_event(
|
||||
table,
|
||||
id_evento,
|
||||
{ validate_event: 1 },
|
||||
event_rep,
|
||||
row,
|
||||
server_id
|
||||
);
|
||||
}
|
||||
|
||||
function in_process_event(table, id_evento, event_rep, row) {
|
||||
function in_process_event(table, id_evento, event_rep, row, server_id) {
|
||||
var button = document.getElementById("proc-" + id_evento);
|
||||
var meta = $("#hidden-meta").val();
|
||||
if (meta != 0) {
|
||||
button = document.getElementById("proc-" + id_evento + "-" + server_id);
|
||||
}
|
||||
|
||||
if (!button) {
|
||||
// Button does not exist. Ignore.
|
||||
processed += 1;
|
||||
|
@ -832,18 +739,24 @@ function in_process_event(table, id_evento, event_rep, row) {
|
|||
id_evento,
|
||||
{ in_process_event: 1 },
|
||||
event_rep,
|
||||
row
|
||||
row,
|
||||
server_id
|
||||
);
|
||||
}
|
||||
|
||||
function delete_event(table, id_evento, event_rep, row) {
|
||||
function delete_event(table, id_evento, event_rep, row, server_id) {
|
||||
var button = document.getElementById("del-" + id_evento);
|
||||
var meta = $("#hidden-meta").val();
|
||||
if (meta != 0) {
|
||||
button = document.getElementById("del-" + id_evento + "-" + server_id);
|
||||
}
|
||||
|
||||
if (!button) {
|
||||
// Button does not exist. Ignore.
|
||||
processed += 1;
|
||||
return;
|
||||
}
|
||||
var message = "<h4 style = 'text-align: center;' > Are you sure?</h4> ";
|
||||
var message = "<h3 style = 'text-align: center;' > Are you sure?</h3> ";
|
||||
confirmDialog({
|
||||
title: "ATTENTION",
|
||||
message: message,
|
||||
|
@ -857,7 +770,8 @@ function delete_event(table, id_evento, event_rep, row) {
|
|||
id_evento,
|
||||
{ delete_event: 1 },
|
||||
event_rep,
|
||||
row
|
||||
row,
|
||||
server_id
|
||||
);
|
||||
},
|
||||
onDeny: function() {
|
||||
|
@ -868,8 +782,19 @@ function delete_event(table, id_evento, event_rep, row) {
|
|||
});
|
||||
}
|
||||
|
||||
function execute_delete_event_reponse(table, id_evento, event_rep, row) {
|
||||
function execute_delete_event_reponse(
|
||||
table,
|
||||
id_evento,
|
||||
event_rep,
|
||||
row,
|
||||
server_id
|
||||
) {
|
||||
var button = document.getElementById("del-" + id_evento);
|
||||
var meta = $("#hidden-meta").val();
|
||||
if (meta != 0) {
|
||||
button = document.getElementById("del-" + id_evento + "-" + server_id);
|
||||
}
|
||||
|
||||
if (!button) {
|
||||
// Button does not exist. Ignore.
|
||||
processed += 1;
|
||||
|
@ -877,7 +802,14 @@ function execute_delete_event_reponse(table, id_evento, event_rep, row) {
|
|||
}
|
||||
button.children[0];
|
||||
button.children[0].src = "images/spinner.gif";
|
||||
return update_event(table, id_evento, { delete_event: 1 }, event_rep, row);
|
||||
return update_event(
|
||||
table,
|
||||
id_evento,
|
||||
{ delete_event: 1 },
|
||||
event_rep,
|
||||
row,
|
||||
server_id
|
||||
);
|
||||
}
|
||||
|
||||
// Imported from old files.
|
||||
|
@ -964,32 +896,61 @@ function execute_event_response(event_list_btn) {
|
|||
switch (response_id) {
|
||||
case "in_progress_selected":
|
||||
$(".chk_val:checked").each(function() {
|
||||
// Parent: TD. GrandParent: TR.
|
||||
var event_id = $(this).val();
|
||||
var meta = $("#hidden-meta").val();
|
||||
var server_id = 0;
|
||||
if (meta != 0) {
|
||||
var split_id = event_id.split("|");
|
||||
event_id = split_id[0];
|
||||
server_id = split_id[1];
|
||||
}
|
||||
|
||||
in_process_event(
|
||||
dt_events,
|
||||
$(this).val(),
|
||||
"events",
|
||||
event_id,
|
||||
$(this).attr("event_rep"),
|
||||
this.parentElement.parentElement
|
||||
this.parentElement.parentElement,
|
||||
server_id
|
||||
);
|
||||
});
|
||||
break;
|
||||
case "validate_selected":
|
||||
$(".chk_val:checked").each(function() {
|
||||
var event_id = $(this).val();
|
||||
var meta = $("#hidden-meta").val();
|
||||
var server_id = 0;
|
||||
if (meta != 0) {
|
||||
var split_id = event_id.split("|");
|
||||
event_id = split_id[0];
|
||||
server_id = split_id[1];
|
||||
}
|
||||
|
||||
validate_event(
|
||||
dt_events,
|
||||
$(this).val(),
|
||||
"events",
|
||||
event_id,
|
||||
$(this).attr("event_rep"),
|
||||
this.parentElement.parentElement
|
||||
this.parentElement.parentElement,
|
||||
server_id
|
||||
);
|
||||
});
|
||||
break;
|
||||
case "delete_selected":
|
||||
$(".chk_val:checked").each(function() {
|
||||
var event_id = $(this).val();
|
||||
var meta = $("#hidden-meta").val();
|
||||
var server_id = 0;
|
||||
if (meta != 0) {
|
||||
var split_id = event_id.split("|");
|
||||
event_id = split_id[0];
|
||||
server_id = split_id[1];
|
||||
}
|
||||
|
||||
execute_delete_event_reponse(
|
||||
dt_events,
|
||||
$(this).val(),
|
||||
"events",
|
||||
event_id,
|
||||
$(this).attr("event_rep"),
|
||||
this.parentElement.parentElement
|
||||
this.parentElement.parentElement,
|
||||
server_id
|
||||
);
|
||||
});
|
||||
break;
|
||||
|
@ -1016,8 +977,10 @@ function check_massive_response_event(
|
|||
var event_id = $(this).val();
|
||||
var meta = $("#hidden-meta").val();
|
||||
var server_id = 0;
|
||||
if (meta) {
|
||||
server_id = $("#hidden-server_id_" + event_id).val();
|
||||
if (meta != 0) {
|
||||
var split_id = event_id.split("|");
|
||||
event_id = split_id[0];
|
||||
server_id = split_id[1];
|
||||
}
|
||||
|
||||
response["target"] = get_response_target(
|
||||
|
@ -1044,3 +1007,24 @@ function event_widget_options() {
|
|||
$(".event-widget-input").enable();
|
||||
}
|
||||
}
|
||||
|
||||
function process_buffers(buffers) {
|
||||
$("#events_buffers_display").empty();
|
||||
if (buffers != null && buffers.settings != undefined && buffers.data) {
|
||||
var params = [];
|
||||
params.push("page=include/ajax/events");
|
||||
params.push("process_buffers=1");
|
||||
params.push("buffers=" + JSON.stringify(buffers));
|
||||
|
||||
jQuery.ajax({
|
||||
data: params.join("&"),
|
||||
type: "POST",
|
||||
url: $("#hidden-ajax_file").val(),
|
||||
async: true,
|
||||
dataType: "html",
|
||||
success: function(data) {
|
||||
$("#events_buffers_display").html(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -501,7 +501,6 @@ class EventsListWidget extends Widget
|
|||
$output = '';
|
||||
|
||||
\ui_require_css_file('events', 'include/styles/', true);
|
||||
\ui_require_css_file('tables', 'include/styles/', true);
|
||||
\ui_require_javascript_file('pandora_events', 'include/javascript/', true);
|
||||
|
||||
$this->values['groupId'] = explode(',', $this->values['groupId'][0]);
|
||||
|
@ -535,7 +534,7 @@ class EventsListWidget extends Widget
|
|||
io_safe_output($filter['tag_without'])
|
||||
);
|
||||
|
||||
if (!empty($filter['id_agent_module'])) {
|
||||
if (empty($filter['id_agent_module']) === false) {
|
||||
$name = \modules_get_modules_name(
|
||||
' FROM tagente_modulo',
|
||||
' WHERE id_agente_modulo = '.$filter['id_agent_module'],
|
||||
|
@ -580,89 +579,38 @@ class EventsListWidget extends Widget
|
|||
}
|
||||
}
|
||||
|
||||
// Order.
|
||||
$order['field'] = 'timestamp';
|
||||
$order['direction'] = 'DESC';
|
||||
|
||||
$fields = [
|
||||
'te.id_evento',
|
||||
'te.id_agente',
|
||||
'te.id_usuario',
|
||||
'te.id_grupo',
|
||||
'te.estado',
|
||||
'te.timestamp',
|
||||
'te.evento',
|
||||
'te.utimestamp',
|
||||
'te.event_type',
|
||||
'te.id_alert_am',
|
||||
'te.criticity',
|
||||
'te.user_comment',
|
||||
'te.tags',
|
||||
'te.source',
|
||||
'te.id_extra',
|
||||
'te.critical_instructions',
|
||||
'te.warning_instructions',
|
||||
'te.unknown_instructions',
|
||||
'te.owner_user',
|
||||
'if(te.ack_utimestamp > 0, from_unixtime(te.ack_utimestamp),"") as ack_utimestamp',
|
||||
'te.custom_data',
|
||||
'te.data',
|
||||
'te.module_status',
|
||||
'ta.alias as agent_name',
|
||||
'tg.nombre as group_name',
|
||||
$default_fields = [
|
||||
[
|
||||
'text' => 'evento',
|
||||
'class' => 'mw120px',
|
||||
],
|
||||
[
|
||||
'text' => 'mini_severity',
|
||||
'class' => 'no-padding',
|
||||
],
|
||||
'id_evento',
|
||||
'agent_name',
|
||||
'timestamp',
|
||||
'event_type',
|
||||
[
|
||||
'text' => 'options',
|
||||
'class' => 'action_buttons w120px',
|
||||
],
|
||||
];
|
||||
$fields = explode(',', $config['event_fields']);
|
||||
|
||||
$home_url = $config['homeurl'];
|
||||
|
||||
if ((bool) \is_metaconsole() === false
|
||||
|| $this->nodeId > 0
|
||||
) {
|
||||
$fields[] = 'am.nombre as module_name';
|
||||
$fields[] = 'am.id_agente_modulo as id_agentmodule';
|
||||
$fields[] = 'am.custom_id as module_custom_id';
|
||||
$fields[] = 'ta.server_name as server_name';
|
||||
} else {
|
||||
$fields[] = 'ts.server_name as server_name';
|
||||
$fields[] = 'te.id_agentmodule';
|
||||
$fields[] = 'te.server_id';
|
||||
// Always check something is shown.
|
||||
if (empty($fields) === true) {
|
||||
$fields = $default_fields;
|
||||
}
|
||||
|
||||
$events = \events_get_all(
|
||||
// Fields.
|
||||
$fields,
|
||||
// Filter.
|
||||
$filter,
|
||||
// Offset.
|
||||
0,
|
||||
// Limit.
|
||||
$this->values['limit'],
|
||||
// Order.
|
||||
$order['direction'],
|
||||
// Sort field.
|
||||
$order['field'],
|
||||
// History.
|
||||
false,
|
||||
// SQL.
|
||||
false,
|
||||
// Having.
|
||||
'',
|
||||
// ValidatedEvents.
|
||||
false,
|
||||
// Recursive Groups.
|
||||
(bool) $this->values['groupRecursion'],
|
||||
// Already connected.
|
||||
($this->nodeId > 0)
|
||||
);
|
||||
// Get column names.
|
||||
$column_names = events_get_column_names($fields, true);
|
||||
|
||||
if ($events === false) {
|
||||
$events = [];
|
||||
}
|
||||
|
||||
$i = 0;
|
||||
if (isset($events) === true
|
||||
&& is_array($events) === true
|
||||
&& empty($events) === false
|
||||
) {
|
||||
// AJAX call options responses.
|
||||
$output .= '<div id="event_details_window" style="display:none"></div>';
|
||||
$output .= '<div id="event_response_window" style="display:none"></div>';
|
||||
$output .= '<div id="event_response_command_window" title="'.__('Parameters').'" style="display:none"></div>';
|
||||
$output .= \html_print_input_hidden(
|
||||
'ajax_file',
|
||||
\ui_get_full_url('ajax.php', false, false, false),
|
||||
|
@ -681,121 +629,51 @@ class EventsListWidget extends Widget
|
|||
true
|
||||
);
|
||||
|
||||
$table = new \StdClass;
|
||||
$table->class = 'widget_groups_status databox';
|
||||
$table->cellspacing = '1';
|
||||
$table->width = '100%';
|
||||
$table->data = [];
|
||||
$table->size = [];
|
||||
$table->rowclass = [];
|
||||
$table_id = 'dashboard_list_events_'.$this->cellId;
|
||||
|
||||
// If its node, get direccion value and construct rute.
|
||||
if ($this->nodeId !== null && $this->nodeId > 0) {
|
||||
metaconsole_restore_db();
|
||||
$result = db_get_all_rows_sql('SELECT server_url FROM tmetaconsole_setup WHERE id = '.$this->nodeId.'');
|
||||
$home_url = $result[0]['server_url'];
|
||||
metaconsole_connect(null, $this->nodeId);
|
||||
}
|
||||
|
||||
foreach ($events as $event) {
|
||||
$data = [];
|
||||
$event['evento'] = \io_safe_output($event['evento']);
|
||||
|
||||
$data[0] = \events_print_type_img($event['event_type'], true);
|
||||
$agent_alias = \agents_get_alias($event['id_agente']);
|
||||
|
||||
if ($agent_alias !== '') {
|
||||
$data[1] = '<a href="'.$home_url;
|
||||
$data[1] .= '/index.php?sec=estado';
|
||||
$data[1] .= '&sec2=operation/agentes/ver_agente';
|
||||
$data[1] .= '&id_agente='.$event['id_agente'];
|
||||
$data[1] .= '" title="'.$event['evento'].'">';
|
||||
$data[1] .= $agent_alias;
|
||||
$data[1] .= '</a>';
|
||||
} else {
|
||||
$data[1] = ' ';
|
||||
}
|
||||
|
||||
if (isset($event['event_rep']) === true
|
||||
&& $event['event_rep'] > 1
|
||||
) {
|
||||
$data[1] .= ' ('.$event['event_rep'].')';
|
||||
}
|
||||
|
||||
// Group.
|
||||
$data[2] = $event['group_name'];
|
||||
|
||||
// Tags.
|
||||
$data[3] = $event['tags'];
|
||||
|
||||
$settings = json_encode(
|
||||
// Print datatable.
|
||||
$output .= ui_print_datatable(
|
||||
[
|
||||
'event' => $event,
|
||||
'page' => 'include/ajax/events',
|
||||
'cellId' => $this->cellId,
|
||||
'ajaxUrl' => \ui_get_full_url(
|
||||
'ajax.php',
|
||||
false,
|
||||
false,
|
||||
false
|
||||
),
|
||||
'result' => false,
|
||||
'dashboardId' => $this->dashboardId,
|
||||
'widgetId' => $this->widgetId,
|
||||
'cellId' => $this->cellId,
|
||||
'node_id' => $this->nodeId,
|
||||
'id' => $table_id,
|
||||
'class' => 'info_table events',
|
||||
'style' => 'width: 100%;',
|
||||
'ajax_url' => 'operation/events/events',
|
||||
'ajax_data' => [
|
||||
'get_events' => 1,
|
||||
'table_id' => $table_id,
|
||||
'filter' => $filter,
|
||||
'length' => $this->values['limit'],
|
||||
'groupRecursion' => (bool) $this->values['groupRecursion'],
|
||||
],
|
||||
'default_pagination' => $this->values['limit'],
|
||||
'pagination_options' => [
|
||||
[
|
||||
$this->values['limit'],
|
||||
10,
|
||||
25,
|
||||
100,
|
||||
],
|
||||
[
|
||||
$this->values['limit'],
|
||||
10,
|
||||
25,
|
||||
100,
|
||||
],
|
||||
],
|
||||
'order' => [
|
||||
'field' => 'timestamp',
|
||||
'direction' => 'desc',
|
||||
],
|
||||
'column_names' => $column_names,
|
||||
'columns' => $fields,
|
||||
'ajax_return_operation' => 'buffers',
|
||||
'ajax_return_operation_function' => 'process_buffers',
|
||||
// 'drawCallback' => 'process_datatables_callback(this, settings)',
|
||||
'return' => true,
|
||||
'csv' => 0,
|
||||
]
|
||||
);
|
||||
|
||||
if ($this->publicLink === false) {
|
||||
$data[4] = '<a href="javascript:"onclick="';
|
||||
$data[4] .= 'dashboardShowEventDialog(\'';
|
||||
$data[4] .= base64_encode($settings).'\');">';
|
||||
}
|
||||
|
||||
$data[4] .= substr(\io_safe_output($event['evento']), 0, 150);
|
||||
if (strlen($event['evento']) > 150) {
|
||||
$data[4] .= '...';
|
||||
}
|
||||
|
||||
if ($this->publicLink === false) {
|
||||
$data[4] .= '<a>';
|
||||
}
|
||||
|
||||
$data[5] = \ui_print_timestamp($event['timestamp'], true);
|
||||
|
||||
$table->data[$i] = $data;
|
||||
|
||||
$bg_color = 'background: #E8E8E8;';
|
||||
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
|
||||
$bg_color = 'background: #222;';
|
||||
}
|
||||
|
||||
$table->cellstyle[$i][0] = $bg_color;
|
||||
$rowclass = \events_get_criticity_class($event['criticity']);
|
||||
$table->cellclass[$i][1] = $rowclass;
|
||||
$table->cellclass[$i][2] = $rowclass;
|
||||
$table->cellclass[$i][3] = $rowclass;
|
||||
$table->cellclass[$i][4] = $rowclass;
|
||||
$table->cellclass[$i][5] = $rowclass;
|
||||
$i++;
|
||||
}
|
||||
|
||||
$output .= \html_print_table($table, true);
|
||||
$output .= "<div id='event_details_window'></div>";
|
||||
$output .= "<div id='event_response_window'></div>";
|
||||
$output .= "<div id='event_response_command_window' title='";
|
||||
$output .= \__('Parameters')."'></div>";
|
||||
} else {
|
||||
$output .= '<div class="container-center">';
|
||||
$output .= \ui_print_info_message(
|
||||
\__('There are no events matching selected search filters'),
|
||||
'',
|
||||
true
|
||||
);
|
||||
$output .= '</div>';
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
|
@ -440,7 +440,12 @@ class MapsMadeByUser extends Widget
|
|||
[
|
||||
'props' => $visualConsoleData,
|
||||
'items' => $visualConsoleItems,
|
||||
'baseUrl' => ui_get_full_url('/', false, false, false),
|
||||
'baseUrl' => ui_get_full_url(
|
||||
'/',
|
||||
false,
|
||||
false,
|
||||
false
|
||||
),
|
||||
'ratio' => $ratio,
|
||||
'size' => $size,
|
||||
'cellId' => $this->cellId,
|
||||
|
@ -448,6 +453,7 @@ class MapsMadeByUser extends Widget
|
|||
'id_user' => $config['id_user'],
|
||||
'page' => 'include/ajax/visual_console.ajax',
|
||||
'uniq' => $uniq,
|
||||
'mobile_view_orientation_vc' => false,
|
||||
]
|
||||
);
|
||||
|
||||
|
@ -507,7 +513,6 @@ class MapsMadeByUser extends Widget
|
|||
},
|
||||
dataType: 'JSON',
|
||||
success: function(data) {
|
||||
console.log(data);
|
||||
$('#vcId').empty();
|
||||
Object.entries(data).forEach(e => {
|
||||
key = e[0];
|
||||
|
|
|
@ -367,8 +367,6 @@ class TopNEventByGroupWidget extends Widget
|
|||
|
||||
$this->values['groupId'] = explode(',', $this->values['groupId'][0]);
|
||||
|
||||
$event_table = (is_metaconsole() === true) ? 'tmetaconsole_event' : 'tevento';
|
||||
|
||||
if (empty($this->values['groupId']) === true) {
|
||||
$output .= '<div class="container-center">';
|
||||
$output .= \ui_print_info_message(
|
||||
|
@ -390,13 +388,12 @@ class TopNEventByGroupWidget extends Widget
|
|||
if ($all_group === false) {
|
||||
$sql = sprintf(
|
||||
'SELECT id_agente, COUNT(*) AS count
|
||||
FROM %s
|
||||
FROM tevento
|
||||
WHERE utimestamp >= %d
|
||||
AND id_grupo IN (%s)
|
||||
GROUP BY id_agente
|
||||
ORDER BY count DESC
|
||||
LIMIT %d',
|
||||
$event_table,
|
||||
$timestamp,
|
||||
implode(',', $this->values['groupId']),
|
||||
$this->values['amountShow']
|
||||
|
@ -404,12 +401,11 @@ class TopNEventByGroupWidget extends Widget
|
|||
} else {
|
||||
$sql = sprintf(
|
||||
'SELECT id_agente, COUNT(*) AS count
|
||||
FROM %s
|
||||
FROM tevento
|
||||
WHERE utimestamp >= %d
|
||||
GROUP BY id_agente
|
||||
ORDER BY count DESC
|
||||
LIMIT %d',
|
||||
$event_table,
|
||||
$timestamp,
|
||||
$this->values['amountShow']
|
||||
);
|
||||
|
|
|
@ -365,8 +365,6 @@ class TopNEventByModuleWidget extends Widget
|
|||
|
||||
$this->values['groupId'] = explode(',', $this->values['groupId'][0]);
|
||||
|
||||
$event_table = (is_metaconsole() === true) ? 'tmetaconsole_event' : 'tevento';
|
||||
|
||||
if (empty($this->values['groupId']) === true) {
|
||||
$output = '<div class="container-center">';
|
||||
$output .= \ui_print_info_message(
|
||||
|
@ -391,13 +389,12 @@ class TopNEventByModuleWidget extends Widget
|
|||
id_agentmodule,
|
||||
event_type,
|
||||
COUNT(*) AS count
|
||||
FROM %s
|
||||
FROM tevento
|
||||
WHERE utimestamp >= %d
|
||||
AND id_grupo IN (%s)
|
||||
GROUP BY id_agentmodule, event_type
|
||||
ORDER BY count DESC
|
||||
LIMIT %d',
|
||||
$event_table,
|
||||
$timestamp,
|
||||
implode(',', $this->values['groupId']),
|
||||
$this->values['amountShow']
|
||||
|
@ -408,12 +405,11 @@ class TopNEventByModuleWidget extends Widget
|
|||
id_agentmodule,
|
||||
event_type,
|
||||
COUNT(*) AS count
|
||||
FROM %s
|
||||
FROM tevento
|
||||
WHERE utimestamp >= %d
|
||||
GROUP BY id_agentmodule, event_type
|
||||
ORDER BY count DESC
|
||||
LIMIT %d',
|
||||
$event_table,
|
||||
$timestamp,
|
||||
$this->values['amountShow']
|
||||
);
|
||||
|
|
|
@ -60,7 +60,7 @@ class Event extends Entity
|
|||
*/
|
||||
public function __construct(?int $event_id=null)
|
||||
{
|
||||
$this->table = ((bool) \is_metaconsole() === true) ? 'tmetaconsole_event' : 'tevento';
|
||||
$this->table = 'tevento';
|
||||
|
||||
if ($event_id === 0) {
|
||||
parent::__construct($this->table);
|
||||
|
|
|
@ -147,12 +147,13 @@ class Module extends Entity
|
|||
*
|
||||
* @param array $data Module information.
|
||||
* @param string $class_str Class type.
|
||||
*
|
||||
* @param boolean $return_deleted_modules Check.
|
||||
* @return PandoraFMS\Module Object.
|
||||
*/
|
||||
public static function build(
|
||||
array $data=[],
|
||||
string $class_str='\PandoraFMS\Module'
|
||||
string $class_str='\PandoraFMS\Module',
|
||||
bool $return_deleted_modules=false
|
||||
) {
|
||||
$obj = new $class_str();
|
||||
|
||||
|
@ -161,8 +162,9 @@ class Module extends Entity
|
|||
$obj->{$k}($v);
|
||||
}
|
||||
|
||||
if ($obj->nombre() === 'delete_pending'
|
||||
|| $obj->nombre() === 'pendingdelete'
|
||||
if (($obj->nombre() === 'delete_pending'
|
||||
|| $obj->nombre() === 'pendingdelete')
|
||||
&& $return_deleted_modules === false
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -223,21 +223,37 @@ abstract class Model
|
|||
*/
|
||||
public function adjustToViewport($size, $mode='')
|
||||
{
|
||||
global $config;
|
||||
$ratio_visualconsole = $this->getRatio();
|
||||
$ratio_w = ($size['width'] / $this->data['width']);
|
||||
$ratio_h = ($size['height'] / $this->data['height']);
|
||||
$acum_height = $this->data['height'];
|
||||
$acum_width = $this->data['width'];
|
||||
|
||||
$this->data['width'] = $size['width'];
|
||||
$this->data['height'] = ($size['width'] * $ratio_visualconsole);
|
||||
|
||||
$ratio = $ratio_w;
|
||||
if ($mode === 'mobile') {
|
||||
if ((bool) $config['mobile_view_orientation_vc'] === true) {
|
||||
if ($this->data['height'] < $this->data['width']) {
|
||||
if ($this->data['height'] > $size['height']) {
|
||||
$ratio = $ratio_h;
|
||||
$this->data['height'] = $size['height'];
|
||||
$this->data['width'] = ($size['height'] / $ratio_visualconsole);
|
||||
}
|
||||
} else {
|
||||
$ratio = $ratio_w;
|
||||
$height = (($acum_height * ($size['width'])) / $acum_width);
|
||||
$this->data['height'] = $height;
|
||||
$this->data['width'] = ($height / $ratio_visualconsole);
|
||||
}
|
||||
} else {
|
||||
if ($this->data['height'] > $this->data['width']) {
|
||||
$ratio = $ratio_h;
|
||||
$this->data['height'] = $size['height'];
|
||||
$this->data['width'] = ($size['height'] / $ratio_visualconsole);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ($this->data['height'] > $size['height']) {
|
||||
|
|
|
@ -174,6 +174,14 @@ final class StaticGraph extends Item
|
|||
throw new \InvalidArgumentException('missing module Id');
|
||||
}
|
||||
|
||||
if (isset($data['agentDisabled']) === false) {
|
||||
$data['agentDisabled'] = false;
|
||||
}
|
||||
|
||||
if (isset($data['moduleDisabled']) === false) {
|
||||
$data['moduleDisabled'] = false;
|
||||
}
|
||||
|
||||
if ((bool) $data['agentDisabled'] === false
|
||||
&& (bool) $data['moduleDisabled'] === false
|
||||
) {
|
||||
|
|
|
@ -94,6 +94,7 @@ form#advanced_filters_alert textarea {
|
|||
flex: 1 1 auto;
|
||||
height: 5em;
|
||||
min-height: 5em;
|
||||
width: 2em;
|
||||
}
|
||||
|
||||
form#advanced_filters_alert ul li label img {
|
||||
|
|
|
@ -572,3 +572,8 @@ div#main_pure {
|
|||
#main_page > .ui-content div.label > p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.content-widget .dataTables_wrapper {
|
||||
width: 98%;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
|
|
@ -344,3 +344,47 @@ div.multi-response-buttons {
|
|||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
#events_buffers_display {
|
||||
margin-bottom: 10px;
|
||||
width: fit-content;
|
||||
min-width: 300px;
|
||||
}
|
||||
|
||||
#events_buffers_display ul {
|
||||
min-width: 300px;
|
||||
}
|
||||
|
||||
#events_buffers_display li {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
#events_buffers_display ul li span.info {
|
||||
flex: 1 1 100px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#events_buffers_display ul li span.danger {
|
||||
color: red;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#events_buffers_display ul li span.danger img {
|
||||
position: absolute;
|
||||
top: -3px;
|
||||
}
|
||||
#events_buffers_display ul li span.text {
|
||||
color: #3f3f3f;
|
||||
}
|
||||
|
||||
.white_table_graph_header {
|
||||
align-items: center;
|
||||
}
|
||||
|
|
|
@ -9054,3 +9054,21 @@ div#err_msg_centralised {
|
|||
padding-top: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
.text_input {
|
||||
background-color: transparent !important;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
border-bottom: 1px solid #ccc;
|
||||
margin-bottom: 4px;
|
||||
padding: 2px 5px;
|
||||
}
|
||||
|
||||
.password_input {
|
||||
background-color: transparent !important;
|
||||
border: none !important;
|
||||
border-radius: 0 !important;
|
||||
border-bottom: 1px solid #ccc !important;
|
||||
margin-bottom: 4px !important;
|
||||
padding: 2px 5px !important;
|
||||
}
|
||||
|
|