resolved conflict

This commit is contained in:
Daniel Maya 2022-07-04 13:40:06 +02:00
commit e839d82e00
549 changed files with 232507 additions and 185312 deletions

View File

@ -256,6 +256,8 @@ console_dependencies=" \
poppler-data \
php-yaml \
mod_ssl \
libzstd \
openldap-clients \
http://firefly.artica.es/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm"
execute_cmd "yum install -y $console_dependencies" "Installing Pandora FMS Console dependencies"

View File

@ -307,6 +307,8 @@ console_dependencies=" \
poppler-data \
php-yaml \
mod_ssl \
libzstd \
openldap-clients \
http://firefly.artica.es/centos8/perl-Net-Telnet-3.04-1.el8.noarch.rpm \
http://firefly.artica.es/centos7/wmic-1.4-1.el7.x86_64.rpm \
http://firefly.artica.es/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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
# ==================

View File

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

View File

@ -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
# ==================

View File

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

View File

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

View File

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

View File

@ -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
# ==================

View File

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

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.762-220607
Version: 7.0NG.763-220704
Architecture: all
Priority: optional
Section: admin

View File

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

View File

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

View 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[

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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 => '220607';
use constant AGENT_VERSION => '7.0NG.763';
use constant AGENT_BUILD => '220704';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

@ -2,8 +2,8 @@
#Pandora FMS Linux Agent
#
%define name pandorafms_agent_unix
%define version 7.0NG.762
%define release 220607
%define version 7.0NG.763
%define release 220704
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -2,8 +2,8 @@
#Pandora FMS Linux Agent
#
%define name pandorafms_agent_unix
%define version 7.0NG.762
%define release 220607
%define version 7.0NG.763
%define release 220704
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -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="220607"
PI_VERSION="7.0NG.763"
PI_BUILD="220704"
OS_NAME=`uname -s`
FORCE=0

View File

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

View File

@ -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
{220607}
{220704}
ViewReadme
{Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.762 Build 220607")
#define PANDORA_VERSION ("7.0NG.763 Build 220704")
string pandora_path;
string pandora_dir;

View File

@ -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 220607))"
VALUE "ProductVersion", "(7.0NG.763(Build 220704))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 7.0NG.762-220607
Version: 7.0NG.763-220704
Architecture: all
Priority: optional
Section: admin

View File

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

View File

@ -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": {

View File

@ -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",

View File

@ -1665,3 +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

View File

@ -1,7 +1,76 @@
START TRANSACTION;
ALTER TABLE `tservice` ADD COLUMN `enable_sunburst` tinyint(1) NOT NULL default 0;
ALTER TABLE `tuser_double_auth` DROP FOREIGN KEY `tuser_double_auth_ibfk_1`, MODIFY COLUMN `id_user` VARCHAR(255) NOT NULL;
ALTER TABLE `tnotification_user` DROP FOREIGN KEY `tnotification_user_ibfk_2`, MODIFY COLUMN `id_user` VARCHAR(255) NOT NULL;
ALTER TABLE `tnotification_source_user` DROP FOREIGN KEY `tnotification_source_user_ibfk_2`, MODIFY COLUMN `id_user` VARCHAR(255) NOT NULL;
ALTER TABLE `tnotification_source_group_user` DROP FOREIGN KEY `tnotification_source_group_user_ibfk_2`, MODIFY COLUMN `id_user` VARCHAR(255) NOT NULL;
ALTER TABLE `tvisual_console_elements_cache` DROP FOREIGN KEY `tvisual_console_elements_cache_ibfk_3`, MODIFY COLUMN `user_id` VARCHAR(255) DEFAULT NULL;
ALTER TABLE `tusuario` MODIFY COLUMN `id_user` VARCHAR(255) NOT NULL DEFAULT '0';
ALTER TABLE `tuser_double_auth` ADD CONSTRAINT `tuser_double_auth_ibfk_1` FOREIGN KEY (`id_user`) REFERENCES `tusuario` (`id_user`) ON DELETE CASCADE;
ALTER TABLE `tnotification_user` ADD CONSTRAINT `tnotification_user_ibfk_2` FOREIGN KEY (`id_user`) REFERENCES `tusuario` (`id_user`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `tnotification_source_user` ADD CONSTRAINT `tnotification_source_user_ibfk_2` FOREIGN KEY (`id_user`) REFERENCES `tusuario` (`id_user`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `tnotification_source_group_user` ADD CONSTRAINT `tnotification_source_group_user_ibfk_2` FOREIGN KEY (`id_user`) REFERENCES `tusuario` (`id_user`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `tvisual_console_elements_cache` ADD CONSTRAINT `tvisual_console_elements_cache_ibfk_3` FOREIGN KEY (`user_id`) REFERENCES `tusuario` (`id_user`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `tattachment` MODIFY COLUMN `id_usuario` VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE `tevento` MODIFY COLUMN `id_usuario` VARCHAR(255) NOT NULL DEFAULT '0';
ALTER TABLE `tincidencia` MODIFY COLUMN `id_usuario` VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE `tnota` MODIFY COLUMN `id_usuario` VARCHAR(255) NOT NULL DEFAULT '0';
ALTER TABLE `tsesion` MODIFY COLUMN `id_usuario` VARCHAR(255) NOT NULL DEFAULT '0';
ALTER TABLE `ttrap` MODIFY COLUMN `id_usuario` VARCHAR(255) DEFAULT '';
ALTER TABLE `tusuario_perfil` MODIFY COLUMN `id_usuario` VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE `treset_pass_history` MODIFY COLUMN `id_user` VARCHAR(255) NOT NULL;
ALTER TABLE `tmensajes` MODIFY COLUMN `id_usuario_origen` VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE `tgraph` MODIFY COLUMN `id_user` VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE `treport` MODIFY COLUMN `id_user` VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE `tplanned_downtime` MODIFY COLUMN `id_user` VARCHAR(255) NOT NULL DEFAULT '0';
ALTER TABLE `tnetwork_map` MODIFY COLUMN `id_user` VARCHAR(255) NOT NULL;
ALTER TABLE `tpassword_history` MODIFY COLUMN `id_user` VARCHAR(255) NOT NULL;
ALTER TABLE `tupdate_journal` MODIFY COLUMN `id_user` VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE `tmap` MODIFY COLUMN `id_user` VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE `tdashboard` MODIFY COLUMN `id_user` VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE `treport_template` MODIFY COLUMN `id_user` VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE `tmetaconsole_event` MODIFY COLUMN `id_usuario` VARCHAR(255) NOT NULL DEFAULT '0';
ALTER TABLE `tmetaconsole_event_history` MODIFY COLUMN `id_usuario` VARCHAR(255) NOT NULL DEFAULT '0';
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 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",
"ALTER TABLE `tautoconfig` ADD COLUMN `disabled` TINYINT DEFAULT 0"
));
PREPARE pr_oum763 FROM @st_oum763;
EXECUTE pr_oum763;
DEALLOCATE PREPARE pr_oum763;
COMMIT;

View File

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

View File

@ -42,17 +42,10 @@ if (tags_has_user_acl_tags()) {
ui_print_tags_warning();
}
$user_strict = (bool) db_get_value(
'strict_acl',
'tusuario',
'id_user',
$config['id_user']
);
$all_data = tactical_status_modules_agents(
$config['id_user'],
$user_strict,
'AR',
$user_strict
false,
'AR'
);
$data = [];
@ -288,7 +281,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(

View File

@ -26,6 +26,8 @@
* ============================================================================
*/
use function PHPSTORM_META\map;
// Begin.
if (isset($config['id_user']) === false) {
include 'general/login_page.php';
@ -57,52 +59,22 @@ if (isset($config['autohidden_menu']) === true && (bool) $config['autohidden_men
// Start of full lateral menu.
echo sprintf('<div id="menu_full" class="menu_full_%s">', $menuTypeClass);
$custom_logo = 'images/custom_logo/'.$config['custom_logo'];
$custom_logo_collapsed = 'images/custom_logo/'.$config['custom_logo_collapsed'];
if (defined('PANDORA_ENTERPRISE') === false) {
$logo_title = get_product_name().' Opensource';
$custom_logo = 'images/custom_logo/pandora_logo_head_3.png';
$custom_logo_collapsed = 'images/custom_logo/pandora_logo_green_collapsed.png';
} else {
if (file_exists(ENTERPRISE_DIR.'/'.$custom_logo) === true) {
$custom_logo = ENTERPRISE_DIR.'/'.$custom_logo;
}
$logo_title = get_product_name().' Enterprise';
}
echo '<div class="logo_green"><a href="index.php?sec=main">';
if (isset($config['custom_logo']) === true) {
echo html_print_image(
$custom_logo,
true,
[
'border' => '0',
'width' => '215',
'alt' => $logo_title,
'class' => 'logo_full',
'style' => ($menuCollapsed === true) ? 'display:none' : 'display:block',
]
);
}
if (isset($config['custom_logo_collapsed']) === true) {
echo html_print_image(
$custom_logo_collapsed,
true,
[
'border' => '0',
'width' => '60',
'alt' => $logo_title,
'class' => 'logo_icon',
'style' => ($menuCollapsed === true) ? 'display:block' : 'display:none',
]
);
}
echo '</a></div>';
// Header logo.
html_print_div(
[
'class' => 'logo_green',
'content' => html_print_anchor(
[
'href' => ui_get_full_url('index.php'),
'content' => html_print_header_logo_image(
$menuCollapsed,
true
),
],
true
),
]
);
require 'operation/menu.php';
require 'godmode/menu.php';

View File

@ -245,8 +245,11 @@ if (!$new_agent && $alias != '') {
}
// Remote configuration available.
$remote_agent = false;
if (isset($filename)) {
if (file_exists($filename['md5'])) {
$remote_agent = true;
$agent_name = agents_get_name($id_agente);
$agent_name = io_safe_output($agent_name);
$agent_md5 = md5($agent_name, false);
@ -427,6 +430,42 @@ $table_server .= html_print_select(
true
).'<div class="label_select_child_icons"></div></div></div>';
$table_satellite = '';
if ($remote_agent === true) {
// Satellite server selector.
$satellite_servers = db_get_all_rows_filter(
'tserver',
['server_type' => SERVER_TYPE_ENTERPRISE_SATELLITE],
[
'id_server',
'name',
]
);
$satellite_names = [];
if (empty($satellite_servers) === false) {
foreach ($satellite_servers as $s_server) {
$satellite_names[$s_server['id_server']] = $s_server['name'];
}
$table_satellite = '<div class="label_select"><p class="input_label">'.__('Satellite').'</p>';
$table_satellite .= '<div class="label_select_parent">';
$table_satellite .= html_print_input(
[
'type' => 'select',
'fields' => $satellite_names,
'name' => 'satellite_server',
'selected' => $satellite_server,
'nothing' => __('None'),
'nothinf_value' => 0,
'return' => true,
]
).'<div class="label_select_child_icons"></div></div></div>';
}
}
// Description.
$table_description = '<div class="label_select"><p class="input_label">'.__('Description').'</p>';
$table_description .= html_print_textarea(
@ -443,7 +482,7 @@ $table_description .= html_print_textarea(
echo '<div class="first_row">
<div class="box-shadow agent_options '.$agent_options_update.' white_box">
<div class="agent_options_column_left">'.$table_agent_name.$table_alias.$table_ip.$table_primary_group.'</div>
<div class="agent_options_column_right">'.$table_interval.$table_os.$table_server.$table_description.'</div>
<div class="agent_options_column_right">'.$table_interval.$table_os.$table_server.$table_satellite.$table_description.'</div>
</div>';
if (!$new_agent && $alias != '') {
echo $table_qr_code;
@ -523,7 +562,6 @@ if (enterprise_installed()) {
$table_adv_cascade .= $cps_html;
}
$table_adv_parent = '<div class="label_select"><label class="input_label">'.__('Parent').'</label>';
$params = [];
$params['return'] = true;
@ -536,6 +574,11 @@ $params['value'] = db_get_value('alias', 'tagente', 'id_agente', $id_parent);
$params['selectbox_id'] = 'cascade_protection_module';
$params['javascript_is_function_select'] = true;
$params['cascade_protection'] = true;
if ($id_agente !== 0) {
// Deletes the agent's offspring.
$params['delete_offspring_agents'] = $id_agente;
}
$table_adv_parent .= '<div class="label_simple_items">';
$table_adv_parent .= ui_print_agent_autocomplete_input($params);
if (enterprise_installed()) {

View File

@ -155,6 +155,7 @@ $alert_d7 = 1;
$alert_recovery = 0;
$alert_priority = 0;
$server_name = '';
$satellite_server = 0;
$grupo = 0;
$id_os = 9;
// Windows.
@ -985,6 +986,7 @@ if ($update_agent) {
$old_values = db_get_row('tagente', 'id_agente', $id_agente);
$fields = db_get_all_fields_in_table('tagent_custom_fields');
$secondary_groups = (string) get_parameter('secondary_hidden', '');
$satellite_server = (int) get_parameter('satellite_server', 0);
if ($fields === false) {
$fields = [];
@ -1092,6 +1094,7 @@ if ($update_agent) {
'quiet' => $quiet,
'cps' => $cps,
'safe_mode_module' => $safe_mode_module,
'satellite_server' => $satellite_server,
];
if ($config['metaconsole_agent_cache'] == 1) {
@ -1230,6 +1233,7 @@ if ($id_agente) {
$cps = $agent['cps'];
$safe_mode_module = $agent['safe_mode_module'];
$safe_mode = ($safe_mode_module) ? 1 : 0;
$satellite_server = (int) $agent['satellite_server'];
}
$update_module = (bool) get_parameter('update_module');

View File

@ -539,6 +539,12 @@ if ($id_downtime > 0) {
// only action to postpone on once type is enabled and the other are disabled.
$disabled_in_execution = (int) $running;
$return_all_group = false;
if (users_can_manage_group_all('AW') === true || $disabled) {
$return_all_group = true;
}
$table = new StdClass();
$table->class = 'databox filters';
$table->width = '100%';
@ -557,7 +563,7 @@ $table->data[1][0] = __('Group');
$table->data[1][1] = '<div class="w250px">'.html_print_select_groups(
false,
$access,
true,
$return_all_group,
'id_group',
$id_group,
'',
@ -793,7 +799,7 @@ $table->width = '100%';
$table->data = [];
$table->data[0][0] = __('Group filter');
$table->data[0][1] = html_print_select_groups(false, $access, true, 'filter_group', $filter_group, '', '', '', true, false, true, '', false, 'min-width:180px;margin-right:15px;');
$table->data[0][1] = html_print_select_groups(false, $access, $return_all_group, 'filter_group', $filter_group, '', '', '', true, false, true, '', false, 'min-width:180px;margin-right:15px;');
$table->data[0][2] = __('Recursion').'&nbsp&nbsp'.html_print_checkbox('recursion', 1, $recursion, true, false, '');
$table->data[1][0] = __('Available agents');

View File

@ -1,25 +1,35 @@
<?php
/**
* List view for Alerts.
*
* @category Alerts
* @package Community
* @subpackage Software agents repository
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ==========================================================
* Copyright (c) 2005-2022 Artica Soluciones Tecnológicas S.L
* This code is NOT free software. This code is NOT licenced under GPL2 licence
* You cannot redistribute it without written permission of copyright holder.
* ============================================================================
*/
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation for version 2.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Begin.
global $config;
// Login check
// Login check.
check_login();
// Check if this page is included from a agent edition
if (! check_acl($config['id_user'], 0, 'LW')
&& ! check_acl($config['id_user'], 0, 'AD')
&& ! check_acl($config['id_user'], 0, 'LM')
// Check if this page is included from a agent edition.
if ((bool) check_acl($config['id_user'], 0, 'LW') === false
&& (bool) check_acl($config['id_user'], 0, 'AD') === false
&& (bool) check_acl($config['id_user'], 0, 'LM') === false
) {
db_pandora_audit(
AUDIT_LOG_ACL_VIOLATION,
@ -36,7 +46,7 @@ require_once $config['homedir'].'/include/functions_users.php';
$pure = get_parameter('pure', 0);
$agent_id = get_parameter('agent_id', 0);
if (defined('METACONSOLE')) {
if (is_metaconsole() === true) {
$sec = 'advanced';
} else {
$sec = 'galertas';
@ -48,7 +58,7 @@ if ($id_agente) {
$sec2 = 'godmode/alerts/alert_list';
}
// Table for filter controls
// Table for filter controls.
$form_filter = '<form method="post" action="index.php?sec='.$sec.'&amp;sec2='.$sec2.'&amp;refr='.((int) get_parameter('refr', 0)).'&amp;pure='.$config['pure'].'">';
$form_filter .= "<input type='hidden' name='search' value='1' />";
$form_filter .= '<table cellpadding="0" cellspacing="0" class="databox filters w100p">';
@ -60,7 +70,7 @@ $temp = agents_get_agents();
$arrayAgents = [];
// Avoid empty arrays, warning messages are UGLY !
if ($temp) {
if ($temp !== false) {
foreach ($temp as $agentElement) {
$arrayAgents[$agentElement['id_agente']] = $agentElement['nombre'];
}
@ -93,11 +103,11 @@ $form_filter .= '</tr>';
$all_groups = db_get_value('is_admin', 'tusuario', 'id_user', $config['id_user']);
if (check_acl($config['id_user'], 0, 'AD')) {
if ((bool) check_acl($config['id_user'], 0, 'AD') === true) {
$groups_user = users_get_groups($config['id_user'], 'AD', $all_groups);
} else if (check_acl($config['id_user'], 0, 'LW')) {
} else if ((bool) check_acl($config['id_user'], 0, 'LW') === true) {
$groups_user = users_get_groups($config['id_user'], 'LW', $all_groups);
} else if (check_acl($config['id_user'], 0, 'LM')) {
} else if ((bool) check_acl($config['id_user'], 0, 'LM') === true) {
$groups_user = users_get_groups($config['id_user'], 'LM', $all_groups);
}
@ -109,16 +119,16 @@ $groups_id = implode(',', array_keys($groups_user));
$form_filter .= '<tr>';
$temp = db_get_all_rows_sql("SELECT id, name FROM talert_actions WHERE id_group IN ($groups_id);");
$temp = db_get_all_rows_sql('SELECT id, name FROM talert_actions WHERE id_group IN ('.$groups_id.');');
$arrayActions = [];
if (is_array($temp)) {
if (is_array($temp) === true) {
foreach ($temp as $actionElement) {
$arrayActions[$actionElement['id']] = $actionElement['name'];
}
}
$form_filter .= "<td class='bolder''>".__('Actions').'</td><td>';
$form_filter .= html_print_select($arrayActions, 'action_id', $actionID, '', __('All'), -1, true);
$form_filter .= html_print_select($arrayActions, 'action_id', $actionID, '', __('All'), -1, true, false, true, '', false, 'width:95%');
$form_filter .= '</td>';
$form_filter .= "<td class='bolder''>".__('Field content').'</td><td>';
$form_filter .= html_print_input_text('field_content', $fieldContent, '', 12, 255, true);
@ -155,7 +165,7 @@ if (!$own_info['is_admin'] && !check_acl($config['id_user'], 0, 'AR') && !check_
$form_filter .= html_print_select_groups(false, 'AR', $return_all_group, 'ag_group', $ag_group, '', '', 0, true, false, true, '', false);
$form_filter .= '</td></tr>';
if (defined('METACONSOLE')) {
if (is_metaconsole() === true) {
$form_filter .= '<tr>';
$form_filter .= "<td colspan='6' align='right'>";
$form_filter .= html_print_submit_button(__('Update'), '', false, 'class="sub upd"', true);
@ -170,7 +180,7 @@ if (defined('METACONSOLE')) {
}
$form_filter .= '</form>';
if (defined('METACONSOLE')) {
if (is_metaconsole() === true) {
echo '<br>';
}
@ -253,7 +263,7 @@ $total = agents_get_alerts_simple(
true
);
if (empty($total)) {
if (empty($total) === true) {
$total = 0;
}
@ -277,14 +287,6 @@ $selectTemplateDown = false;
switch ($sortField) {
case 'disabled':
switch ($sort) {
case 'up':
$selectDisabledUp = $selected;
$order = [
'field' => 'disabled',
'order' => 'ASC',
];
break;
case 'down':
$selectDisabledDown = $selected;
$order = [
@ -292,19 +294,20 @@ switch ($sortField) {
'order' => 'DESC',
];
break;
default:
case 'up':
$selectDisabledUp = $selected;
$order = [
'field' => 'disabled',
'order' => 'ASC',
];
break;
}
break;
case 'standby':
switch ($sort) {
case 'up':
$selectStandbyUp = $selected;
$order = [
'field' => 'standby',
'order' => 'ASC',
];
break;
case 'down':
$selectStandbyDown = $selected;
$order = [
@ -312,19 +315,20 @@ switch ($sortField) {
'order' => 'DESC',
];
break;
default:
case 'up':
$selectStandbyUp = $selected;
$order = [
'field' => 'standby',
'order' => 'ASC',
];
break;
}
break;
case 'agent':
switch ($sort) {
case 'up':
$selectAgentUp = $selected;
$order = [
'field' => 'agent_name',
'order' => 'ASC',
];
break;
case 'down':
$selectAgentDown = $selected;
$order = [
@ -332,19 +336,20 @@ switch ($sortField) {
'order' => 'DESC',
];
break;
default:
case 'up':
$selectAgentUp = $selected;
$order = [
'field' => 'agent_name',
'order' => 'ASC',
];
break;
}
break;
case 'module':
switch ($sort) {
case 'up':
$selectModuleUp = $selected;
$order = [
'field' => 'agent_module_name',
'order' => 'ASC',
];
break;
case 'down':
$selectModuleDown = $selected;
$order = [
@ -352,19 +357,20 @@ switch ($sortField) {
'order' => 'DESC',
];
break;
default:
case 'up':
$selectModuleUp = $selected;
$order = [
'field' => 'agent_module_name',
'order' => 'ASC',
];
break;
}
break;
case 'template':
switch ($sort) {
case 'up':
$selectTemplateUp = $selected;
$order = [
'field' => 'template_name',
'order' => 'ASC',
];
break;
case 'down':
$selectTemplateDown = $selected;
$order = [
@ -372,6 +378,15 @@ switch ($sortField) {
'order' => 'DESC',
];
break;
default:
case 'up':
$selectTemplateUp = $selected;
$order = [
'field' => 'template_name',
'order' => 'ASC',
];
break;
}
break;
@ -717,13 +732,13 @@ foreach ($simple_alerts as $alert) {
$data[3] .= '<div id="add_action-div-'.$alert['id'].'" class="invisible">';
$data[3] .= '<form id="add_action_form-'.$alert['id'].'" method="post" style="height:85%;">';
$data[3] .= '<table class="databox_color w100p bg_color222" style="height:100%;">';
$data[3] .= '<table class="w100p bg_color222">';
$data[3] .= html_print_input_hidden('add_action', 1, true);
$data[3] .= html_print_input_hidden('id_alert_module', $alert['id'], true);
if (! $id_agente) {
$data[3] .= '<tr class="datos2">';
$data[3] .= '<td class="datos2 bolder pdd_6px">';
$data[3] .= '<td class="datos2 bolder pdd_6px font_10pt">';
$data[3] .= __('Agent');
$data[3] .= '</td>';
$data[3] .= '<td class="datos">';
@ -733,7 +748,7 @@ foreach ($simple_alerts as $alert) {
}
$data[3] .= '<tr class="datos">';
$data[3] .= '<td class="datos bolder pdd_6px">';
$data[3] .= '<td class="datos bolder pdd_6px font_10pt">';
$data[3] .= __('Module');
$data[3] .= '</td>';
$data[3] .= '<td class="datos">';
@ -741,15 +756,15 @@ foreach ($simple_alerts as $alert) {
$data[3] .= '</td>';
$data[3] .= '</tr>';
$data[3] .= '<tr class="datos2">';
$data[3] .= '<td class="datos2 bolder pdd_6px">';
$data[3] .= '<td class="datos2 bolder pdd_6px font_10pt">';
$data[3] .= __('Action');
$data[3] .= '</td>';
$data[3] .= '<td class="datos2">';
$data[3] .= html_print_select($actions, 'action_select', '', '', __('None'), 0, true, false, true, '', false, 'width:150px');
$data[3] .= html_print_select($actions, 'action_select', '', '', __('None'), 0, true, false, true, '', false, 'width:95%');
$data[3] .= '</td>';
$data[3] .= '</tr>';
$data[3] .= '<tr class="datos">';
$data[3] .= '<td class="datos bolder pdd_6px">';
$data[3] .= '<td class="datos bolder pdd_6px font_10pt">';
$data[3] .= __('Number of alerts match from');
$data[3] .= '</td>';
$data[3] .= '<td class="datos">';
@ -773,7 +788,7 @@ foreach ($simple_alerts as $alert) {
$data[3] .= '</td>';
$data[3] .= '</tr>';
$data[3] .= '<tr class="datos2">';
$data[3] .= '<td class="datos2 bolder pdd_6px">';
$data[3] .= '<td class="datos2 bolder pdd_6px font_10pt">';
$data[3] .= __('Threshold');
$data[3] .= '</td>';
$data[3] .= '<td class="datos2">';
@ -1127,8 +1142,6 @@ function show_advance_options_action(id_alert) {
function show_add_action(id_alert) {
$("#add_action-div-" + id_alert).hide ()
.dialog ({
resizable: true,
draggable: true,
title: '<?php echo __('Add action'); ?>',
modal: true,
overlay: {
@ -1136,14 +1149,14 @@ function show_add_action(id_alert) {
background: "black"
},
open: function() {
$(`#add_action-div-${id_alert}`).css('overflow', 'hidden');
$(`#add_action-div-${id_alert}`).css('overflow', 'initial');
$("select[id^='action_select'], select[id^='action_select']").select2({
tags: true,
dropdownParent: $("#add_action-div-" + id_alert)
});
},
width: 455,
height: 500
width: 600,
height: 300
})
.show ();
}
@ -1179,8 +1192,8 @@ function show_display_update_action(id_module_action, alert_id, alert_id_agent_m
dropdownParent: $(`#update_action-div-${alert_id}`)
});
},
width: 455,
height: 500
width: 600,
height: 350
})
.show ();
}

View File

@ -352,14 +352,15 @@ if ($search_string) {
$filter[] = "(name LIKE '%".$search_string."%' OR description LIKE '%".$search_string."%' OR value LIKE '%".$search_string."%')";
}
$total_templates = alerts_get_alert_templates($filter, ['COUNT(*) AS total']);
$total_templates = $total_templates[0]['total'];
$filter['offset'] = (int) get_parameter('offset');
$filter['limit'] = (int) $config['block_size'];
if (!is_user_admin($config['id_user'])) {
$filter['id_group'] = array_keys(users_get_groups(false, 'LM'));
}
$total_templates = alerts_get_alert_templates($filter, ['COUNT(*) AS total']);
$total_templates = $total_templates[0]['total'];
$templates = alerts_get_alert_templates(
$filter,
[

View File

@ -45,7 +45,7 @@ if ($default != 0) {
'token' => 'event_fields',
'value' => $event_fields,
];
// update 'event_fields' in tconfig table to keep the value at update.
// Update 'event_fields' in tconfig table to keep the value at update.
$result = db_process_sql_update(
'tconfig',
$values,
@ -147,7 +147,7 @@ $table->data[1][1] .= '<br><br><br><br><a href="javascript:">'.html_print_image(
$table->data[0][1] = '';
$table->data[0][2] = '<b>'.__('Fields selected').'</b>';
$table->data[1][2] = html_print_select(
$table->data[1][2] = '<div class="flex_justify">'.html_print_select(
$result_selected,
'fields_selected[]',
true,
@ -162,6 +162,25 @@ $table->data[1][2] = html_print_select(
'width: 300px'
);
$table->data[1][2] .= '<div id="sort_arrows" class="flex-column">';
$table->data[1][2] .= '<a href="javascript:">'.html_print_image(
'images/darrowup.png',
true,
[
'onclick' => 'sortUpDown(\'up\');',
'title' => __('Move up selected fields'),
]
).'</a>';
$table->data[1][2] .= '<a href="javascript:">'.html_print_image(
'images/darrowdown.png',
true,
[
'onclick' => 'sortUpDown(\'down\');',
'title' => __('Move down selected fields'),
]
).'</a>';
$table->data[1][2] .= '</div></div>';
echo '<form id="custom_events" method="post" action="index.php?sec=geventos&sec2=godmode/events/events&section=fields&amp;pure='.$config['pure'].'">';
html_print_table($table);
@ -174,7 +193,7 @@ echo '</div>';
<script type="text/javascript">
/* <![CDATA[ */
$(document).ready (function () {
$("#right").click (function () {
jQuery.each($("select[name='fields_available[]'] option:selected"), function (key, value) {
field_name = $(value).html();
@ -186,9 +205,9 @@ $(document).ready (function () {
}
});
});
$("#left").click (function () {
var current_fields_size = ($('#fields_selected option').length);
var current_fields_size = ($('#fields_selected option').length);
var selected_fields = [];
var selected_fields_total = '';
@ -214,7 +233,7 @@ $(document).ready (function () {
move_left();
}
});
$("#submit-upd_button").click(function () {
$("#fields_selected").find("option[value='0']").remove();
$('#fields_selected option').map(function() {
@ -223,7 +242,7 @@ $(document).ready (function () {
});
});
function move_left(){
function move_left() {
jQuery.each($("select[name='fields_selected[]'] option:selected"), function (key, value) {
field_name = $(value).html();
if (field_name != <?php echo "'".__('None')."'"; ?>) {
@ -234,4 +253,16 @@ function move_left(){
}
});
}
// Change the order (to up or down).
function sortUpDown(mode) {
$("#fields_selected option:selected").each(function() {
const field = $(this);
if (field.length) {
(mode === 'up') ? field.first().prev().before(field): field.last().next().after(field);
}
});
}
</script>

View File

@ -77,7 +77,7 @@ if (check_acl($config['id_user'], 0, 'PM')) {
'images/custom_columns.png',
true,
[
'title' => __('Custom fields'),
'title' => __('Custom columns'),
'class' => 'invert_filter',
]
).'</a>',
@ -87,18 +87,17 @@ if (check_acl($config['id_user'], 0, 'PM')) {
switch ($section) {
case 'filter':
$buttons['filter']['active'] = true;
$subpage = ' - '.__('Filters');
$subpage = __('Filters');
break;
case 'fields':
$buttons['fields']['active'] = true;
$subpage = ' - '.__('Custom fields');
$subpage = __('Custom columns');
break;
case 'responses':
$buttons['responses']['active'] = true;
$subpage = ' - '.__('Responses');
$help_header = '';
$subpage = __('Responses');
break;
case 'view':
@ -107,18 +106,28 @@ switch ($section) {
default:
$buttons['filter']['active'] = true;
$subpage = ' - '.__('Filters');
$subpage = __('Filters');
break;
}
if (! defined('METACONSOLE')) {
ui_print_page_header(
__('Manage events').$subpage,
if (is_metaconsole() === false) {
ui_print_standard_header(
$subpage,
'images/gm_events.png',
false,
$help_header,
'',
true,
$buttons
(array) $buttons,
[
[
'link' => '',
'label' => __('Configuration'),
],
[
'link' => '',
'label' => __('Events'),
],
]
);
} else {
ui_meta_print_header(__('Manage events').$subpage, '', $buttons);

View File

@ -14,7 +14,7 @@
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
* Copyright (c) 2005-2022 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -89,9 +89,9 @@ if ($update) {
$agents_ = [];
}
// If the option to select all of one group or module type is checked
// If the option to select all of one group or module type is checked.
if ($force) {
if ($force == 'type') {
if ($force === 'type') {
$type_condition = '';
if ($module_type != 0) {
$type_condition = "AND tam.id_tipo_modulo = $module_type";
@ -109,7 +109,7 @@ if ($update) {
$agents_ = [];
}
// Create an array of agent ids
// Create an array of agent ids.
$agents_ = extract_column($agents_, 'id_agente');
foreach ($agents_ as $id_agent) {
@ -136,7 +136,7 @@ if ($update) {
if ($success == 0) {
$error_msg = __('Error updating the modules from a module type');
}
} else if ($force == 'group') {
} else if ($force === 'group') {
$agents_ = array_keys(agents_get_group_agents($group_select, false, 'none'));
foreach ($agents_ as $id_agent) {
@ -2226,28 +2226,30 @@ function process_manage_edit($module_name, $agents_select=null, $module_status='
$values['quiet'] = get_parameter('quiet_select');
}
$filter_modules = false;
if (!is_numeric($module_name) or ($module_name != 0)) {
$filter_modules['nombre'] = $module_name;
}
// Whether to update module tag info
// Whether to update module tag info.
$update_tags = get_parameter('id_tag', false);
if (array_search(0, $agents_select) !== false) {
// Apply at All agents.
$modules = db_get_all_rows_filter(
'tagente_modulo',
$filter_modules,
[
'id_agente_modulo',
'id_tipo_modulo',
]
if (is_numeric($module_name) === false || ($module_name !== 0)) {
$filterModules = sprintf('AND tam.nombre = \'%s\'', $module_name);
} else {
$filterModules = '';
}
// Apply at All agents (within valid groups).
$modules = db_get_all_rows_sql(
sprintf(
'SELECT tam.id_agente_modulo, tam.id_tipo_modulo
FROM tagente_modulo tam INNER JOIN tagente ta
ON ta.id_agente = tam.id_agente
WHERE ta.id_grupo IN (%s) %s;',
implode(',', array_keys(users_get_groups())),
$filterModules
)
);
} else {
if ($module_name == '0') {
// Any module
if ($module_name === '0') {
// Any module.
$modules = db_get_all_rows_filter(
'tagente_modulo',
['id_agente' => $agents_select],
@ -2275,12 +2277,12 @@ function process_manage_edit($module_name, $agents_select=null, $module_status='
return false;
}
if (($module_status == 'unknown') && ($module_name == '0')) {
if (($module_status === 'unknown') && ($module_name == '0')) {
$modules_to_delete = [];
foreach ($modules as $mod_id) {
$mod_status = (int) db_get_value_filter('estado', 'tagente_estado', ['id_agente_modulo' => $mod_id]);
// Unknown, not init and no data modules
// Unknown, not init and no data modules.
if ($mod_status == 3 || $mod_status == 4 || $mod_status == 5) {
$modules_to_delete[$mod_id] = $mod_id;
}

View File

@ -1,16 +1,32 @@
<?php
/**
* Godmode menu.
*
* @category Menu
* @package Pandora FMS
* @subpackage Community
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2022 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Begin.
require_once 'include/config.php';
check_login();
@ -21,11 +37,11 @@ require_once 'include/functions_menu.php';
$menu_godmode = [];
$menu_godmode['class'] = 'godmode';
if (check_acl($config['id_user'], 0, 'AR')
|| check_acl($config['id_user'], 0, 'AW')
|| check_acl($config['id_user'], 0, 'RR')
|| check_acl($config['id_user'], 0, 'RW')
|| check_acl($config['id_user'], 0, 'PM')
if ((bool) check_acl($config['id_user'], 0, 'AR') === true
|| (bool) check_acl($config['id_user'], 0, 'AW') === true
|| (bool) check_acl($config['id_user'], 0, 'RR') === true
|| (bool) check_acl($config['id_user'], 0, 'RW') === true
|| (bool) check_acl($config['id_user'], 0, 'PM') === true
) {
$sub = [];
$sub['godmode/servers/discovery&wiz=main']['text'] = __('Start');
@ -33,17 +49,17 @@ if (check_acl($config['id_user'], 0, 'AR')
$sub['godmode/servers/discovery&wiz=tasklist']['text'] = __('Task list');
$sub['godmode/servers/discovery&wiz=tasklist']['id'] = 'tasklist';
if (check_acl($config['id_user'], 0, 'AW')
|| check_acl($config['id_user'], 0, 'PM')
if ((bool) check_acl($config['id_user'], 0, 'AW') === true
|| (bool) check_acl($config['id_user'], 0, 'PM') === true
) {
if (check_acl($config['id_user'], 0, 'AW')) {
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
$sub2 = [];
$sub2['godmode/servers/discovery&wiz=hd&mode=netscan']['text'] = __('Network scan');
enterprise_hook('hostdevices_submenu');
$sub2['godmode/servers/discovery&wiz=hd&mode=customnetscan']['text'] = __('Custom network scan');
}
if (check_acl($config['id_user'], 0, 'PM')) {
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
$sub2['godmode/servers/discovery&wiz=hd&mode=managenetscanscripts']['text'] = __('Manage scan scripts');
}
@ -52,7 +68,7 @@ if (check_acl($config['id_user'], 0, 'AR')
$sub['godmode/servers/discovery&wiz=hd']['sub2'] = $sub2;
}
if (check_acl($config['id_user'], 0, 'AW')) {
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
enterprise_hook('applications_menu');
enterprise_hook('cloud_menu');
enterprise_hook('console_task_menu');
@ -67,19 +83,19 @@ if (check_acl($config['id_user'], 0, 'AR')
$sub = [];
if (check_acl($config['id_user'], 0, 'AW') || check_acl($config['id_user'], 0, 'AD')) {
if ((bool) check_acl($config['id_user'], 0, 'AW') === true || (bool) check_acl($config['id_user'], 0, 'AD') === true) {
$sub['godmode/agentes/modificar_agente']['text'] = __('Manage agents');
$sub['godmode/agentes/modificar_agente']['id'] = 'Manage agents';
$sub['godmode/agentes/modificar_agente']['subsecs'] = ['godmode/agentes/configurar_agente'];
}
if (check_acl($config['id_user'], 0, 'PM')) {
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
$sub['godmode/agentes/fields_manager']['text'] = __('Custom fields');
$sub['godmode/agentes/fields_manager']['id'] = 'Custom fields';
$sub['godmode/modules/manage_nc_groups']['text'] = __('Component groups');
$sub['godmode/modules/manage_nc_groups']['id'] = 'Component groups';
// Category
// Category.
$sub['godmode/category/category']['text'] = __('Module categories');
$sub['godmode/category/category']['id'] = 'Module categories';
$sub['godmode/category/category']['subsecs'] = 'godmode/category/edit_category';
@ -91,15 +107,15 @@ if (check_acl($config['id_user'], 0, 'PM')) {
$sub['godmode/groups/modu_group_list']['id'] = 'Module groups';
}
if (check_acl($config['id_user'], 0, 'AW')) {
// Netflow
if ($config['activate_netflow']) {
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
// Netflow.
if ((bool) $config['activate_netflow'] === true) {
$sub['godmode/netflow/nf_edit']['text'] = __('Netflow filters');
$sub['godmode/netflow/nf_edit']['id'] = 'Netflow filters';
}
}
if (!empty($sub)) {
if (empty($sub) === false) {
$menu_godmode['gagente']['text'] = __('Resources');
$menu_godmode['gagente']['sec2'] = 'godmode/agentes/modificar_agente';
$menu_godmode['gagente']['id'] = 'god-resources';
@ -107,13 +123,13 @@ if (!empty($sub)) {
}
$sub = [];
if (check_acl($config['id_user'], 0, 'PM')) {
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
$sub['godmode/groups/group_list']['text'] = __('Manage agents groups');
$sub['godmode/groups/group_list']['id'] = 'Manage agents groups';
}
if (check_acl($config['id_user'], 0, 'PM')) {
// Tag
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
// Tag.
$sub['godmode/tag/tag']['text'] = __('Module tags');
$sub['godmode/tag/tag']['id'] = 'Module tags';
$sub['godmode/tag/tag']['subsecs'] = 'godmode/tag/edit_tag';
@ -121,17 +137,17 @@ if (check_acl($config['id_user'], 0, 'PM')) {
enterprise_hook('enterprise_acl_submenu');
}
if (check_acl($config['id_user'], 0, 'UM')) {
if ((bool) check_acl($config['id_user'], 0, 'UM') === true) {
$sub['godmode/users/user_list']['text'] = __('Users management');
$sub['godmode/users/user_list']['id'] = 'Users management';
}
if (check_acl($config['id_user'], 0, 'PM')) {
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
$sub['godmode/users/profile_list']['text'] = __('Profile management');
$sub['godmode/users/profile_list']['id'] = 'Profile management';
}
if (!empty($sub)) {
if (empty($sub) === false) {
$menu_godmode['gusuarios']['sub'] = $sub;
$menu_godmode['gusuarios']['text'] = __('Profiles');
$menu_godmode['gusuarios']['sec2'] = 'godmode/users/user_list';
@ -139,8 +155,7 @@ if (!empty($sub)) {
}
$sub = [];
if (check_acl($config['id_user'], 0, 'PM')) {
// enterprise_hook('components_submenu');
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
$sub['templates']['text'] = __('Templates');
$sub['templates']['id'] = 'Templates';
$sub['templates']['type'] = 'direct';
@ -155,31 +170,22 @@ if (check_acl($config['id_user'], 0, 'PM')) {
$sub2['godmode/modules/manage_network_components']['text'] = __('Remote components');
$sub2['godmode/modules/manage_network_components']['id'] = 'Network components';
$sub['templates']['sub2'] = $sub2;
/*
$sub2['godmode/modules/manage_snmp_modules']['text'] = __('SNMP Modules');
$sub2['godmode/modules/manage_snmp_modules']['id'] = 'SNMP Modules';
$sub2['godmode/modules/manage_wmi_modules']['text'] = __('WMI Modules');
$sub2['godmode/modules/manage_wmi_modules']['id'] = 'WMI Modules';
$sub['godmode/modules/manage_block_templates']['text'] = __('Module blocks');
$sub['godmode/modules/manage_block_templates']['id'] = 'Module blocks';
*/
enterprise_hook('inventory_submenu');
enterprise_hook('autoconfiguration_menu');
enterprise_hook('agent_repository_menu');
}
if (check_acl($config['id_user'], 0, 'AW')) {
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
enterprise_hook('policies_menu');
enterprise_hook('agents_submenu');
}
if (check_acl($config['id_user'], 0, 'NW')) {
if ((bool) check_acl($config['id_user'], 0, 'NW') === true) {
enterprise_hook('agents_ncm_submenu');
}
if (check_acl($config['id_user'], 0, 'AW')) {
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
$sub['gmassive']['text'] = __('Bulk operations');
$sub['gmassive']['id'] = 'Bulk operations';
$sub['gmassive']['type'] = 'direct';
@ -188,7 +194,7 @@ if (check_acl($config['id_user'], 0, 'AW')) {
$sub2['godmode/massive/massive_operations&amp;tab=massive_agents']['text'] = __('Agents operations');
$sub2['godmode/massive/massive_operations&amp;tab=massive_modules']['text'] = __('Modules operations');
$sub2['godmode/massive/massive_operations&amp;tab=massive_plugins']['text'] = __('Plugins operations');
if (check_acl($config['id_user'], 0, 'UM')) {
if ((bool) check_acl($config['id_user'], 0, 'UM') === true) {
$sub2['godmode/massive/massive_operations&amp;tab=massive_users']['text'] = __('Users operations');
}
@ -199,23 +205,48 @@ if (check_acl($config['id_user'], 0, 'AW')) {
enterprise_hook('massiveservices_submenu');
$sub['gmassive']['sub2'] = $sub2;
$sub2 = [];
}
if (check_acl($config['id_user'], 0, 'PM') || check_acl($config['id_user'], 0, 'UM')) {
if ((bool) check_acl($config['id_user'], 0, 'PM') === true || (bool) check_acl($config['id_user'], 0, 'UM') === true) {
$sub['godmode/groups/group_list&tab=credbox']['text'] = __('Credential store');
$sub['godmode/groups/group_list&tab=credbox']['id'] = 'credential store';
}
if (!empty($sub)) {
// Manage events.
$sub2 = [];
if ((bool) check_acl($config['id_user'], 0, 'EW') === true || (bool) check_acl($config['id_user'], 0, 'EM') === true) {
// Custom event fields.
$sub2['godmode/events/events&section=filter']['text'] = __('Event filters');
$sub2['godmode/events/events&section=filter']['id'] = 'Event filters';
}
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
$sub2['godmode/events/events&section=fields']['text'] = __('Custom columns');
$sub2['godmode/events/events&section=fields']['id'] = 'Custom events';
$sub2['godmode/events/events&section=responses']['text'] = __('Event responses');
$sub2['godmode/events/events&section=responses']['id'] = 'Event responses';
}
if (empty($sub2) === false) {
$sub['geventos']['text'] = __('Events');
$sub['geventos']['id'] = 'events';
$sub['geventos']['sec2'] = 'godmode/events/events&section=filter';
$sub['geventos']['type'] = 'direct';
$sub['geventos']['subtype'] = 'nolink';
$sub['geventos']['sub2'] = $sub2;
}
if (empty($sub) === false) {
$menu_godmode['gmodules']['text'] = __('Configuration');
$menu_godmode['gmodules']['sec2'] = 'godmode/modules/manage_network_templates';
$menu_godmode['gmodules']['id'] = 'god-configuration';
$menu_godmode['gmodules']['sub'] = $sub;
}
if (check_acl($config['id_user'], 0, 'LW')
|| check_acl($config['id_user'], 0, 'LM')
|| check_acl($config['id_user'], 0, 'AD')
if ((bool) check_acl($config['id_user'], 0, 'LW') === true
|| (bool) check_acl($config['id_user'], 0, 'LM') === true
|| (bool) check_acl($config['id_user'], 0, 'AD') === true
) {
$menu_godmode['galertas']['text'] = __('Alerts');
$menu_godmode['galertas']['sec2'] = 'godmode/alerts/alert_list';
@ -226,7 +257,7 @@ if (check_acl($config['id_user'], 0, 'LW')
$sub['godmode/alerts/alert_list']['id'] = 'List of Alerts';
$sub['godmode/alerts/alert_list']['pages'] = ['godmode/alerts/alert_view'];
if (check_acl($config['id_user'], 0, 'LM')) {
if ((bool) check_acl($config['id_user'], 0, 'LM') === true) {
$sub['godmode/alerts/alert_templates']['text'] = __('Templates');
$sub['godmode/alerts/alert_templates']['id'] = 'Templates';
$sub['godmode/alerts/alert_templates']['pages'] = ['godmode/alerts/configure_alert_template'];
@ -250,44 +281,21 @@ if (check_acl($config['id_user'], 0, 'LW')
$menu_godmode['galertas']['sub'] = $sub;
}
// Manage events
$sub = [];
if (check_acl($config['id_user'], 0, 'EW') || check_acl($config['id_user'], 0, 'EM')) {
// Custom event fields
$sub['godmode/events/events&section=filter']['text'] = __('Event filters');
$sub['godmode/events/events&section=filter']['id'] = 'Event filters';
}
if (check_acl($config['id_user'], 0, 'PM')) {
$sub['godmode/events/events&section=fields']['text'] = __('Custom events');
$sub['godmode/events/events&section=fields']['id'] = 'Custom events';
$sub['godmode/events/events&section=responses']['text'] = __('Event responses');
$sub['godmode/events/events&section=responses']['id'] = 'Event responses';
}
if (!empty($sub)) {
$menu_godmode['geventos']['text'] = __('Events');
$menu_godmode['geventos']['sec2'] = 'godmode/events/events&section=filter';
$menu_godmode['geventos']['id'] = 'god-events';
$menu_godmode['geventos']['sub'] = $sub;
}
if (check_acl($config['id_user'], 0, 'AW') || check_acl($config['id_user'], 0, 'PM')) {
// Servers
if ((bool) check_acl($config['id_user'], 0, 'AW') === true || (bool) check_acl($config['id_user'], 0, 'PM') === true) {
// Servers.
$menu_godmode['gservers']['text'] = __('Servers');
$menu_godmode['gservers']['sec2'] = 'godmode/servers/modificar_server';
$menu_godmode['gservers']['id'] = 'god-servers';
$sub = [];
if (check_acl($config['id_user'], 0, 'AW')) {
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
$sub['godmode/servers/modificar_server']['text'] = __('Manage servers');
$sub['godmode/servers/modificar_server']['id'] = 'Manage servers';
}
// This subtabs are only for Pandora Admin.
if (check_acl($config['id_user'], 0, 'PM')) {
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
enterprise_hook('ha_cluster');
$sub['godmode/servers/plugin']['text'] = __('Plugins');
@ -304,15 +312,15 @@ if (check_acl($config['id_user'], 0, 'AW') || check_acl($config['id_user'], 0, '
$menu_godmode['gservers']['sub'] = $sub;
}
if (check_acl($config['id_user'], 0, 'PM')) {
// Setup
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
// Setup.
$menu_godmode['gsetup']['text'] = __('Setup');
$menu_godmode['gsetup']['sec2'] = 'general';
$menu_godmode['gsetup']['id'] = 'god-setup';
$sub = [];
// Options Setup
// Options Setup.
$sub['general']['text'] = __('Setup');
$sub['general']['id'] = 'Setup';
$sub['general']['type'] = 'direct';
@ -337,8 +345,8 @@ if (check_acl($config['id_user'], 0, 'PM')) {
$sub2['godmode/setup/setup&section=vis']['text'] = __('Visual styles');
$sub2['godmode/setup/setup&section=vis']['refr'] = 0;
if (check_acl($config['id_user'], 0, 'AW')) {
if ($config['activate_netflow']) {
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
if ((bool) $config['activate_netflow'] === true) {
$sub2['godmode/setup/setup&section=net']['text'] = __('Netflow');
$sub2['godmode/setup/setup&section=net']['refr'] = 0;
}
@ -361,7 +369,7 @@ if (check_acl($config['id_user'], 0, 'PM')) {
$sub2['godmode/setup/setup&section=external_tools']['text'] = __('External Tools');
$sub2['godmode/setup/setup&section=external_tools']['refr'] = 0;
if ($config['activate_gis']) {
if ((bool) $config['activate_gis'] === true) {
$sub2['godmode/setup/setup&section=gis']['text'] = __('Map conections GIS');
}
@ -376,14 +384,14 @@ if (check_acl($config['id_user'], 0, 'PM')) {
$menu_godmode['gsetup']['sub'] = $sub;
}
if (check_acl($config['id_user'], 0, 'PM') || check_acl($config['id_user'], 0, 'DM')) {
if ((bool) check_acl($config['id_user'], 0, 'PM') === true || (bool) check_acl($config['id_user'], 0, 'DM') === true) {
$menu_godmode['gextensions']['text'] = __('Admin tools');
$menu_godmode['gextensions']['sec2'] = 'godmode/extensions';
$menu_godmode['gextensions']['id'] = 'god-extensions';
$sub = [];
if (check_acl($config['id_user'], 0, 'PM')) {
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
// Audit //meter en extensiones.
$sub['godmode/audit_log']['text'] = __('System audit log');
$sub['godmode/audit_log']['id'] = 'System audit log';
@ -399,7 +407,7 @@ if (check_acl($config['id_user'], 0, 'PM') || check_acl($config['id_user'], 0, '
$sub['godmode/setup/file_manager']['text'] = __('File manager');
$sub['godmode/setup/file_manager']['id'] = 'File manager';
if (is_user_admin($config['id_user'])) {
if (is_user_admin($config['id_user']) === true) {
$sub['extensions/db_status']['text'] = __('DB Schema Check');
$sub['extensions/db_status']['id'] = 'DB Schema Check';
$sub['extensions/db_status']['sec'] = 'gbman';
@ -414,40 +422,38 @@ if (check_acl($config['id_user'], 0, 'PM') || check_acl($config['id_user'], 0, '
$menu_godmode['gextensions']['sub'] = $sub;
}
if (is_array($config['extensions'])) {
if (is_array($config['extensions']) === true) {
$sub = [];
$sub2 = [];
foreach ($config['extensions'] as $extension) {
// If no godmode_menu is a operation extension
if ($extension['godmode_menu'] == '') {
// If no godmode_menu is a operation extension.
if (empty($extension['godmode_menu']) === true) {
continue;
}
if ($extension['godmode_menu']['name'] == 'System Info') {
if ($extension['godmode_menu']['name'] === 'System Info') {
continue;
}
if ($extension['godmode_menu']['name'] != __('DB Schema check') && $extension['godmode_menu']['name'] != __('DB interface')) {
if ($extension['godmode_menu']['name'] !== __('DB Schema check') && $extension['godmode_menu']['name'] !== __('DB interface')) {
$extmenu = $extension['godmode_menu'];
}
// Check the ACL for this user
if (! check_acl($config['id_user'], 0, $extmenu['acl'])) {
// Check the ACL for this user.
if ((bool) check_acl($config['id_user'], 0, $extmenu['acl']) === false) {
continue;
}
// Check if was displayed inside other menu
if ($extension['godmode_menu']['fatherId'] == '') {
// Check if was displayed inside other menu.
if (empty($extension['godmode_menu']['fatherId']) === true) {
$sub2[$extmenu['sec2']]['text'] = __($extmenu['name']);
$sub2[$extmenu['sec2']]['id'] = $extmenu['name'];
$sub2[$extmenu['sec2']]['refr'] = 0;
} else {
if (is_array($extmenu) && array_key_exists('fatherId', $extmenu)) {
if (is_array($extmenu) === true && array_key_exists('fatherId', $extmenu) === true) {
if (strlen($extmenu['fatherId']) > 0) {
if (array_key_exists('subfatherId', $extmenu)) {
if (array_key_exists('subfatherId', $extmenu) === true) {
if (strlen($extmenu['subfatherId']) > 0) {
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]['text'] = __($extmenu['name']);
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]['id'] = $extmenu['name'];
@ -462,12 +468,7 @@ if (is_array($config['extensions'])) {
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['id'] = $extmenu['name'];
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['refr'] = 0;
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['icon'] = $extmenu['icon'];
if ($extmenu['name'] == 'Cron jobs') {
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['sec'] = $extmenu['fatherId'];
} else {
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['sec'] = $extmenu['fatherId'];
}
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['sec'] = $extmenu['fatherId'];
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['extension'] = true;
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['enterprise'] = $extension['enterprise'];
$menu_godmode[$extmenu['fatherId']]['hasExtensions'] = true;
@ -487,7 +488,7 @@ if (is_array($config['extensions'])) {
}
}
// Complete the submenu
// Complete the submenu.
$extension_view = [];
$extension_view['godmode/extensions']['id'] = 'Extension manager view';
$extension_view['godmode/extensions']['text'] = __('Extension manager view');
@ -499,7 +500,7 @@ if (is_array($config['extensions'])) {
$sub['godmode/extensions']['type'] = 'direct';
$sub['godmode/extensions']['subtype'] = 'nolink';
if (is_array($menu_godmode['gextensions']['sub'])) {
if (is_array($menu_godmode['gextensions']['sub']) === true) {
$submenu = array_merge($menu_godmode['gextensions']['sub'], $sub);
if ($menu_godmode['gextensions']['sub'] != null) {
$menu_godmode['gextensions']['sub'] = $submenu;
@ -514,7 +515,7 @@ $menu_godmode['links']['id'] = 'god-links';
$sub = [];
$rows = db_get_all_rows_in_table('tlink', 'name');
foreach ($rows as $row) {
// Audit //meter en extensiones
// Audit //meter en extensiones.
$sub[$row['link']]['text'] = $row['name'];
$sub[$row['link']]['id'] = $row['name'];
$sub[$row['link']]['type'] = 'direct';
@ -523,30 +524,31 @@ foreach ($rows as $row) {
$menu_godmode['links']['sub'] = $sub;
// Update Manager
if (check_acl($config['id_user'], 0, 'PM') && $config['enable_update_manager']) {
$menu_godmode['messages']['text'] = __('Update manager');
// Warp Manager.
if ((bool) check_acl($config['id_user'], 0, 'PM') === true && (bool) $config['enable_update_manager'] === true) {
$menu_godmode['messages']['text'] = __('Warp Update');
;
$menu_godmode['messages']['id'] = 'god-um_messages';
$menu_godmode['messages']['sec2'] = '';
$sub = [];
$sub['godmode/update_manager/update_manager&tab=offline']['text'] = __('Update Manager offline');
$sub['godmode/update_manager/update_manager&tab=offline']['text'] = __('Update offline');
$sub['godmode/update_manager/update_manager&tab=offline']['id'] = 'Offline';
$sub['godmode/update_manager/update_manager&tab=online']['text'] = __('Update Manager online');
$sub['godmode/update_manager/update_manager&tab=online']['text'] = __('Update online');
$sub['godmode/update_manager/update_manager&tab=online']['id'] = 'Online';
$sub['godmode/update_manager/update_manager&tab=setup']['text'] = __('Update Manager options');
$sub['godmode/update_manager/update_manager&tab=setup']['text'] = __('Options');
$sub['godmode/update_manager/update_manager&tab=setup']['id'] = 'Options';
$sub['godmode/update_manager/update_manager&tab=history']['text'] = __('Update Manager journal');
$sub['godmode/update_manager/update_manager&tab=history']['text'] = __('Warp journal');
$sub['godmode/update_manager/update_manager&tab=history']['id'] = 'Journal';
$menu_godmode['messages']['sub'] = $sub;
}
// Module library.
if (check_acl($config['id_user'], 0, 'AR')) {
if ((bool) check_acl($config['id_user'], 0, 'AR') === true) {
$menu_godmode['gmodule_library']['text'] = __('Module library');
$menu_godmode['gmodule_library']['id'] = 'god-module_library';
@ -560,6 +562,6 @@ if (check_acl($config['id_user'], 0, 'AR')) {
$menu_godmode['gmodule_library']['sub'] = $sub;
}
if (!$config['pure']) {
if ((bool) $config['pure'] === false) {
menu_print_menu($menu_godmode);
}

View File

@ -178,6 +178,7 @@ switch ($type) {
break;
}
$query_filter = [];
if (empty($query_filter) === false) {
$query_filter = json_decode($query_filter, true);
}

View File

@ -135,6 +135,7 @@ $current_month = true;
// Only avg is selected by default for the simple graphs.
$fullscale = false;
$percentil = false;
$image_threshold = false;
$time_compare_overlapped = false;
// Added for events items.
@ -179,6 +180,9 @@ $uncompressed_module = true;
$macros_definition = '';
$render_definition = '';
$text_agent = '';
$text_agent_module = '';
$only_data = false;
// Users.
@ -307,6 +311,7 @@ switch ($action) {
case 'simple_graph':
$fullscale = isset($style['fullscale']) ? (bool) $style['fullscale'] : 0;
$percentil = isset($style['percentil']) ? (bool) $style['percentil'] : 0;
$image_threshold = (isset($style['image_threshold']) === true) ? (bool) $style['image_threshold'] : false;
$graph_render = $item['graph_render'];
// The break hasn't be forgotten.
case 'simple_baseline_graph':
@ -676,6 +681,21 @@ switch ($action) {
$period = $item['period'];
$order_uptodown = $item['order_uptodown'];
$show_resume = $item['show_resume'];
$text_agent = '';
if (isset($style['text_agent']) === true
&& empty($style['text_agent']) === false
) {
$text_agent = base64_decode($style['text_agent']);
}
$text_agent_module = '';
if (isset($style['text_agent_module']) === true
&& empty($style['text_agent_module']) === false
) {
$text_agent_module = base64_decode($style['text_agent_module']);
}
break;
case 'availability':
@ -743,6 +763,21 @@ switch ($action) {
$show_resume = $item['show_resume'];
$show_graph = $item['show_graph'];
$order_uptodown = $item['order_uptodown'];
$text_agent = '';
if (isset($style['text_agent']) === true
&& empty($style['text_agent']) === false
) {
$text_agent = base64_decode($style['text_agent']);
}
$text_agent_module = '';
if (isset($style['text_agent_module']) === true
&& empty($style['text_agent_module']) === false
) {
$text_agent_module = base64_decode($style['text_agent_module']);
}
break;
case 'exception':
@ -753,6 +788,21 @@ switch ($action) {
$show_resume = $item['show_resume'];
$show_graph = $item['show_graph'];
$order_uptodown = $item['order_uptodown'];
$text_agent = '';
if (isset($style['text_agent']) === true
&& empty($style['text_agent']) === false
) {
$text_agent = base64_decode($style['text_agent']);
}
$text_agent_module = '';
if (isset($style['text_agent_module']) === true
&& empty($style['text_agent_module']) === false
) {
$text_agent_module = base64_decode($style['text_agent_module']);
}
break;
case 'agent_module':
@ -1091,6 +1141,52 @@ $class = 'databox filters';
</td>
</tr>
<tr id="row_agent_regexp" class="datos">
<td class="bolder">
<?php
echo __('Agent').ui_print_help_tip(
__('Case insensitive regular expression for agent name. For example: Network.* will match with the following agent names: network_agent1, NetworK CHECKS'),
true
);
?>
</td>
<td>
<?php
html_print_input_text(
'text_agent',
$text_agent,
'',
30,
100,
false
);
?>
</td>
</tr>
<tr id="row_module_regexp" class="datos">
<td class="bolder">
<?php
echo __('Module').ui_print_help_tip(
__('Case insensitive regular expression or string for module name. For example: if you use this field with "Module exact match" enabled then this field has to be fulfilled with the literally string of the module name, if not you can use a regular expression. Example: .*usage.* will match: cpu_usage, vram usage in matchine 1.'),
true
);
?>
</td>
<td class="mx180px">
<?php
html_print_input_text(
'text_agent_module',
$text_agent_module,
'',
30,
100,
false
);
?>
</td>
</tr>
<?php
if ($meta) {
?>
@ -2504,6 +2600,23 @@ $class = 'databox filters';
</td>
</tr>
<tr id="row_image_threshold" class="datos">
<td class="bolder">
<?php
echo __('Show threshold');
?>
</td>
<td>
<?php
html_print_checkbox_switch(
'image_threshold',
1,
$image_threshold
);
?>
</td>
</tr>
<tr id="row_time_compare_overlapped" class="datos">
<td class="bolder">
<?php
@ -5965,11 +6078,14 @@ function chooseType() {
$("#row_show_graph").hide();
$("#row_max_min_avg").hide();
$("#row_fullscale").hide();
$("#row_image_threshold").hide();
$("#row_graph_render").hide();
$("#row_macros_definition").hide();
$("#row_render_definition").hide();
$("#row_time_compare_overlapped").hide();
$("#row_quantity").hide();
$("#row_agent_regexp").hide();
$("#row_module_regexp").hide();
$("#row_exception_condition_value").hide();
$("#row_exception_condition").hide();
$("#row_dyn_height").hide();
@ -6099,6 +6215,7 @@ function chooseType() {
case 'simple_graph':
$("#row_time_compare_overlapped").show();
$("#row_fullscale").show();
$("#row_image_threshold").show();
$("#row_graph_render").show();
$("#row_percentil").show();
@ -6459,6 +6576,8 @@ function chooseType() {
$("#row_order_uptodown").show();
$("#row_show_resume").show();
$("#row_show_in_same_row").show();
$("#row_agent_regexp").show();
$("#row_module_regexp").show();
var checked = $("input[name='last_value']").prop("checked");
@ -6527,6 +6646,8 @@ function chooseType() {
$("#row_description").show();
$("#row_period").show();
$("#row_max_min_avg").show();
$("#row_agent_regexp").show();
$("#row_module_regexp").show();
$("#row_quantity").show();
$("#general_list").show();
$("#row_order_uptodown").show();
@ -6544,6 +6665,8 @@ function chooseType() {
$("#row_order_uptodown").show();
$("#row_show_resume").show();
$("#row_show_graph").show();
$("#row_agent_regexp").show();
$("#row_module_regexp").show();
var checked = $("input[name='last_value']").prop("checked");

View File

@ -743,8 +743,9 @@ switch ($action) {
$search = trim(get_parameter('search', ''));
$search_sql = '';
if ($search != '') {
$search_name = '%'.$search."%' OR description LIKE '%".$search.'%';
if ($search !== '') {
$search_name = "(name LIKE '%".$search."%' OR description LIKE '%".$search."%')";
}
$table_aux = new stdClass();
@ -830,13 +831,10 @@ switch ($action) {
$return_all_group = false;
}
if ($search != '') {
$filter = [
'name' => $search_name,
'order' => 'name',
];
} else {
$filter = ['order' => 'name'];
$filter = ['order' => 'name'];
if ($search !== '') {
$filter[] = $search_name;
}
// Fix : group filter was not working
@ -2255,6 +2253,9 @@ switch ($action) {
$style['fullscale'] = (int) get_parameter(
'fullscale'
);
$style['image_threshold'] = (int) get_parameter(
'image_threshold'
);
if ($label != '') {
$style['label'] = $label;
} else {
@ -2320,6 +2321,20 @@ switch ($action) {
// $values['external_source'] = json_encode($es);
break;
case 'top_n':
case 'general':
case 'exception':
$text_agent = get_parameter('text_agent', '');
$text_agent_module = get_parameter('text_agent_module', '');
if (empty($text_agent) === false) {
$style['text_agent'] = base64_encode($text_agent);
}
if (empty($text_agent_module) === false) {
$style['text_agent_module'] = base64_encode($text_agent_module);
}
break;
default:
// Default.
break;
@ -3006,6 +3021,9 @@ switch ($action) {
$style['fullscale'] = (int) get_parameter(
'fullscale'
);
$style['image_threshold'] = (int) get_parameter(
'image_threshold'
);
if ($label != '') {
$style['label'] = $label;
} else {
@ -3069,6 +3087,20 @@ switch ($action) {
$es['agent_not_assigned_to_ip'] = get_parameter('agent_not_assigned_to_ip');
break;
case 'top_n':
case 'general':
case 'exception':
$text_agent = get_parameter('text_agent', '');
$text_agent_module = get_parameter('text_agent_module', '');
if (empty($text_agent) === false) {
$style['text_agent'] = base64_encode($text_agent);
}
if (empty($text_agent_module) === false) {
$style['text_agent_module'] = base64_encode($text_agent_module);
}
break;
default:
// Default.
break;

View File

@ -165,6 +165,7 @@ if ($layoutDatas === false) {
$alternativeStyle = true;
$parents = visual_map_get_items_parents($idVisualConsole);
foreach ($layoutDatas as $layoutData) {
$idLayoutData = $layoutData['id'];
@ -473,7 +474,6 @@ foreach ($layoutDatas as $layoutData) {
break;
default:
$parents = visual_map_get_items_parents($idVisualConsole);
$table->data[($i + 1)][4] = html_print_select(
$parents,
'parent_'.$idLayoutData,
@ -740,9 +740,9 @@ foreach ($layoutDatas as $layoutData) {
$pure = get_parameter('pure', 0);
if (!defined('METACONSOLE')) {
echo '<form method="post" action="index.php?sec=network&sec2=godmode/reporting/visual_console_builder&tab='.$activeTab.'&id_visual_console='.$visualConsole['id'].'">';
echo '<form class="vc_elem_form" method="post" action="index.php?sec=network&sec2=godmode/reporting/visual_console_builder&tab='.$activeTab.'&id_visual_console='.$visualConsole['id'].'">';
} else {
echo "<form method='post' action='index.php?operation=edit_visualmap&sec=screen&sec2=screens/screens&action=visualmap&pure=0&tab=list_elements&id_visual_console=".$idVisualConsole."'>";
echo "<form class='vc_elem_form' method='post' action='index.php?operation=edit_visualmap&sec=screen&sec2=screens/screens&action=visualmap&pure=0&tab=list_elements&id_visual_console=".$idVisualConsole."'>";
}
if (!defined('METACONSOLE')) {
@ -807,7 +807,30 @@ ui_require_javascript_file('tiny_mce', 'include/javascript/tiny_mce/');
<script type="text/javascript">
$(document).ready (function () {
$('form.vc_elem_form').submit(function() {
var inputs_array = $(this).serializeArray();
var form_action = {};
form_action.name = 'go';
form_action.value = 'Update';
inputs_array.push(form_action);
var serialized_form_inputs = JSON.stringify(inputs_array);
var ajax_url = "<?php echo (is_metaconsole() === true) ? 'index.php?operation=edit_visualmap&sec=screen&sec2=screens/screens&action=visualmap&pure=0&tab=list_elements&id_visual_console='.$idVisualConsole : 'index.php?sec=network&sec2=godmode/reporting/visual_console_builder&tab='.$activeTab.'&id_visual_console='.$visualConsole['id']; ?>";
$.post({
url: ajax_url,
data: { serialized_form_inputs },
dataType: "json",
async: false,
complete: function (data) {
location.reload();
}
});
return false;
});
var added_config = {
"selector": "#tinyMCE_editor",
"elements": "text-label",

View File

@ -40,6 +40,21 @@ require_once $config['homedir'].'/include/functions_visual_map.php';
require_once $config['homedir'].'/include/functions_agents.php';
enterprise_include_once('include/functions_visual_map.php');
// Bypass the size limitation of posted inputs given by PHP config token 'max_input_vars'.
if (isset($_POST['serialized_form_inputs']) === true) {
$posted_data_serialized = json_decode($_POST['serialized_form_inputs'], true);
unset($_POST['serialized_form_inputs']);
$posted_data_array = array_combine(
array_column($posted_data_serialized, 'name'),
array_column($posted_data_serialized, 'value')
);
// Merge data to $_POST superglobal.
$_POST += $posted_data_array;
}
// Retrieve the visual console id.
set_unless_defined($idVisualConsole, 0);
// Set default.

View File

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

View File

@ -31,7 +31,7 @@ global $config;
check_login();
if (! check_acl($config['id_user'], 0, 'PM')) {
if ((bool) check_acl($config['id_user'], 0, 'PM') === false) {
db_pandora_audit(
AUDIT_LOG_ACL_VIOLATION,
'Trying to access File manager'
@ -43,7 +43,24 @@ if (! check_acl($config['id_user'], 0, 'PM')) {
require_once 'include/functions_filemanager.php';
// Header.
ui_print_page_header(__('File manager'), '', false, '', true);
ui_print_standard_header(
__('File manager'),
'',
false,
'',
true,
[],
[
[
'link' => '',
'label' => __('Admin tools'),
],
[
'link' => '',
'label' => __('File manager'),
],
]
);
if (isset($config['filemanager']['message']) === true) {
echo $config['filemanager']['message'];
@ -66,7 +83,7 @@ $real_directory = realpath($config['homedir'].'/'.$directory);
echo '<h4>'.__('Index of %s', io_safe_input($directory)).'</h4>';
$upload_file = (bool) get_parameter('upload_file');
$create_text_file = (bool) get_parameter('create_text_file');
$create_text_file = (bool) get_parameter('create_text_file');
$default_real_directory = realpath($config['homedir'].'/');

View File

@ -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%'>";

View File

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

View File

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

View File

@ -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++;
@ -1253,6 +1298,15 @@ $table_other->data[$row][1] = html_print_checkbox_switch(
);
$row++;
$table_other->data[$row][0] = __('Show empty groups in group view');
$table_other->data[$row][1] = html_print_checkbox_switch(
'show_empty_groups',
1,
$config['show_empty_groups'],
true
);
$row++;
$table_other->data[$row][0] = __('Date format string');
$table_other->data[$row][1] = '<em>'.__('Example').'</em> '.date($config['date_format']);
$table_other->data[$row][1] .= html_print_input_text('date_format', $config['date_format'], '', 30, 100, true);

File diff suppressed because it is too large Load Diff

View File

@ -203,20 +203,22 @@ if (is_ajax() !== true) {
var clientMode = '<?php echo $mode; ?>';
</script>
<?php
$server_version = (string) db_get_value_sql(
'SELECT `version` FROM `tserver` ORDER BY `master` DESC'
);
if ($server_version !== false
&& preg_match('/NG\.(\d\.*\d*?) /', $server_version, $matches) > 0
) {
if ((float) $matches[1] !== (float) $current_package) {
ui_print_warning_message(
__(
'Master server version %s does not match console version %s.',
(float) $matches[1],
(float) $current_package
)
);
if (function_exists('db_get_value_sql') === true) {
$server_version = (string) db_get_value_sql(
'SELECT `version` FROM `tserver` ORDER BY `master` DESC'
);
if ($server_version !== false
&& preg_match('/NG\.(\d\.*\d*?) /', $server_version, $matches) > 0
) {
if ((float) $matches[1] !== floor((float) $current_package)) {
ui_print_warning_message(
__(
'Master server version %s does not match console version %s.',
(float) $matches[1],
(float) $current_package
)
);
}
}
}
@ -313,7 +315,7 @@ if (is_array($config) === true) {
if ($mode === Manager::MODE_ONLINE
&& ($puid === null || $puid === 'OFFLINE')
) {
ui_print_error_message(__('Update manager online requires registration.'));
ui_print_error_message(__('Update online requires registration.'));
}
if ($mode === Manager::MODE_OFFLINE) {

View File

@ -1,21 +1,36 @@
<?php
/**
* Update manager.
*
* @category Update Manager
* @package Pandora FMS
* @subpackage Community
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2022 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Begin.
global $config;
check_login();
// The ajax is in
// include/ajax/update_manager.php
// The ajax is in include/ajax/update_manager.php.
if (! check_acl($config['id_user'], 0, 'PM') && ! is_user_admin($config['id_user'])) {
db_pandora_audit(
AUDIT_LOG_ACL_VIOLATION,
@ -36,59 +51,65 @@ if ($php_version_array[0] < 7) {
$tab = get_parameter('tab', 'online');
$buttons['setup'] = [
'active' => ($tab == 'setup') ? true : false,
'active' => ($tab === 'setup') ? true : false,
'text' => '<a href="'.ui_get_full_url(
'index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=setup'
).'">'.html_print_image('images/gm_setup.png', true, ['title' => __('Options'), 'class' => 'invert_filter']).'</a>',
).'">'.html_print_image('images/gm_setup.png', true, ['title' => __('Setup'), 'class' => 'invert_filter']).'</a>',
];
$buttons['history'] = [
'active' => ($tab == 'history') ? true : false,
'active' => ($tab === 'history') ? true : false,
'text' => '<a href="'.ui_get_full_url(
'index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=histo'
).'ry">'.html_print_image('images/gm_db.png', true, ['title' => __('Journal'), 'class' => 'invert_filter']).'</a>',
];
$buttons['offline'] = [
'active' => ($tab == 'offline') ? true : false,
'active' => ($tab === 'offline') ? true : false,
'text' => '<a href="'.ui_get_full_url(
'index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=offli'
).'ne">'.html_print_image('images/box.png', true, ['title' => __('Offline update manager'), 'class' => 'invert_filter']).'</a>',
).'ne">'.html_print_image('images/box.png', true, ['title' => __('Offline update'), 'class' => 'invert_filter']).'</a>',
];
$buttons['online'] = [
'active' => ($tab == 'online') ? true : false,
'active' => ($tab === 'online') ? true : false,
'text' => '<a href="'.ui_get_full_url(
'index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=onlin'
).'e">'.html_print_image('images/op_gis.png', true, ['title' => __('Online update manager'), 'class' => 'invert_filter']).'</a>',
).'e">'.html_print_image('images/op_gis.png', true, ['title' => __('Online update'), 'class' => 'invert_filter']).'</a>',
];
switch ($tab) {
case 'history':
$title = __('Update manager » Journal');
$title = __('Journal');
break;
case 'setup':
$title = __('Update manager » Setup');
$title = __('Setup');
break;
case 'offline':
$title = __('Update manager » Offline');
$title = __('Offline');
break;
case 'online':
default:
$title = __('Update manager » Online');
$title = __('Online');
break;
}
ui_print_page_header(
ui_print_standard_header(
$title,
'images/gm_setup.png',
false,
'',
true,
$buttons
$buttons,
[
[
'link' => '',
'label' => 'Warp Update',
],
]
);
switch ($tab) {
@ -107,6 +128,39 @@ switch ($tab) {
case 'online':
default:
if (is_metaconsole() === false && has_metaconsole() === true) {
$meta_puid = null;
$server_id = $config['metaconsole_node_id'];
$dbh = (object) $config['dbconnection'];
// Connect to metaconsole.
$result_code = metaconsole_load_external_db(
[
'dbhost' => $config['replication_dbhost'],
'dbuser' => $config['replication_dbuser'],
'dbpass' => io_output_password($config['replication_dbpass']),
'dbname' => $config['replication_dbname'],
]
);
if ($result_code < 0) {
break;
}
$value = db_get_value('value', 'tconfig', 'token', 'pandora_uid');
$meta_puid = $value;
// Return connection to node.
metaconsole_restore_db();
if ($meta_puid === false || $meta_puid === null) {
ui_print_warning_message(__('Please register on metaconsole first.'));
break;
}
}
$mode = \UpdateManager\UI\Manager::MODE_ONLINE;
include $config['homedir'].'/godmode/um_client/index.php';
break;

View File

@ -268,17 +268,18 @@ $table->style[$i] = 'font-weight: bolder;width:250px';
$url_update_manager = update_manager_get_url();
$table->data[$i][0] = __('URL update manager:');
$table->data[$i][0] = __('Warp Update URL');
$table->data[$i++][1] = html_print_input_text(
'url_update_manager',
$url_update_manager,
__('URL update manager'),
80,
255,
true,
true
);
$table->data[$i][0] = __('Use secured update manager:');
$table->data[$i][0] = __('Use secured Warp Update');
$table->data[$i++][1] = html_print_input(
[
'type' => 'switch',
@ -287,7 +288,7 @@ $table->data[$i++][1] = html_print_input(
]
);
$table->data[$i][0] = __('Proxy server:');
$table->data[$i][0] = __('Proxy server');
$table->data[$i++][1] = html_print_input_text(
'update_manager_proxy_server',
$update_manager_proxy_server,
@ -297,7 +298,7 @@ $table->data[$i++][1] = html_print_input_text(
true
);
$table->data[$i][0] = __('Proxy port:');
$table->data[$i][0] = __('Proxy port');
$table->data[$i++][1] = html_print_input_text(
'update_manager_proxy_port',
$update_manager_proxy_port,
@ -307,7 +308,7 @@ $table->data[$i++][1] = html_print_input_text(
true
);
$table->data[$i][0] = __('Proxy user:');
$table->data[$i][0] = __('Proxy user');
$table->data[$i++][1] = html_print_input_text(
'update_manager_proxy_user',
$update_manager_proxy_user,
@ -317,7 +318,7 @@ $table->data[$i++][1] = html_print_input_text(
true
);
$table->data[$i][0] = __('Proxy password:');
$table->data[$i][0] = __('Proxy password');
$table->data[$i++][1] = html_print_input_password(
'update_manager_proxy_password',
$update_manager_proxy_password,
@ -327,7 +328,7 @@ $table->data[$i++][1] = html_print_input_password(
true
);
$table->data[$i][0] = __('Allow no-consecutive patches:');
$table->data[$i][0] = __('Allow no-consecutive patches');
$table->data[$i++][1] = html_print_switch(
[
'name' => 'allow_offline_patches',
@ -336,7 +337,7 @@ $table->data[$i++][1] = html_print_switch(
]
);
$table->data[$i][0] = __('Limit to LTS updates:');
$table->data[$i][0] = __('Limit to LTS updates');
$table->data[$i++][1] = html_print_switch(
[
'name' => 'lts_updates',
@ -346,11 +347,11 @@ $table->data[$i++][1] = html_print_switch(
);
$table->data[$i][0] = __('Registration ID:');
$table->data[$i++][1] = '<i>'.$config['pandora_uid'].'</i>';
$table->data[$i][0] = __('Registration ID');
$table->data[$i++][1] = '<i>'.($config['pandora_uid'] ?? __('Not registred yet')).'</i>';
if (update_manager_verify_registration() === true && users_is_admin()) {
$table->data[$i][0] = __('Cancel registration:');
$table->data[$i][0] = __('Cancel registration');
$table->data[$i][1] = '<a href="';
if ((bool) is_metaconsole() === true) {
$table->data[$i][1] .= ui_get_full_url(
@ -367,7 +368,7 @@ if (update_manager_verify_registration() === true && users_is_admin()) {
if (license_free()) {
$config['identification_reminder'] = isset($config['identification_reminder']) ? $config['identification_reminder'] : 1;
$table->data[$i][0] = __('Pandora FMS community reminder').ui_print_help_tip(__('Every 8 days, a message is displayed to admin users to remember to register this Pandora instance'), true);
$table->data[$i][0] = __('%s community reminder', get_product_name()).ui_print_help_tip(__('Every 8 days, a message is displayed to admin users to remember to register this %s instance', get_product_name()), true);
$table->data[$i][1] = __('Yes').'&nbsp;&nbsp;&nbsp;'.html_print_radio_button('identification_reminder', 1, '', $config['identification_reminder'], true).'&nbsp;&nbsp;';
$table->data[$i++][1] .= __('No').'&nbsp;&nbsp;&nbsp;'.html_print_radio_button('identification_reminder', 0, '', $config['identification_reminder'], true);
}

View File

@ -321,7 +321,7 @@ if ($create_user) {
return;
}
$user_is_admin = (int) get_parameter('is_admin', 0);
$user_is_admin = (get_parameter('is_admin', 0) === 0) ? 0 : 1;
if (users_is_admin() === false && $user_is_admin !== 0) {
db_pandora_audit(
@ -540,7 +540,7 @@ if ($update_user) {
$values['email'] = (string) get_parameter('email');
$values['phone'] = (string) get_parameter('phone');
$values['comments'] = io_safe_input(strip_tags(io_safe_output((string) get_parameter('comments'))));
$values['is_admin'] = get_parameter('is_admin', 0);
$values['is_admin'] = (get_parameter('is_admin', 0) === 0) ? 0 : 1;
$values['language'] = (string) get_parameter('language');
$values['timezone'] = (string) get_parameter('timezone');
$values['default_event_filter'] = (int) get_parameter('default_event_filter');
@ -857,7 +857,7 @@ if (!$new_user) {
'',
'',
20,
100,
255,
!$new_user || $view_mode,
'',
[
@ -970,40 +970,24 @@ if ($config['user_can_update_password']) {
}
}
$own_info = get_user_info($config['id_user']);
$global_profile = '<div class="label_select_simple user_global_profile" ><span class="input_label" class"mrgn_0px">'.__('Global Profile').'</span>';
$global_profile .= '<div class="switch_radio_button">';
if (users_is_admin()) {
$global_profile .= html_print_radio_button_extended(
if (users_is_admin() === true) {
$global_profile = '<div class="label_select_simple" style="display: flex;align-items: center;">';
$global_profile .= '<p class="edit_user_labels" style="margin-top: 0;">'.__('Administrator user').'</p>';
$global_profile .= html_print_checkbox_switch(
'is_admin',
1,
[
'label' => __('Administrator'),
'help_tip' => __('This user has permissions to manage all. An admin user should not requiere additional group permissions, except for using Enterprise ACL.'),
],
0,
$user_info['is_admin'],
false,
'',
'',
true
);
$global_profile .= '</div>';
} else {
$global_profile = html_print_input_hidden(
'is_admin_sent',
0,
true
);
}
$global_profile .= html_print_radio_button_extended(
'is_admin',
0,
[
'label' => __('Standard User'),
'help_tip' => __('This user has separated permissions to view data in his group agents, create incidents belong to his groups, add notes in another incidents, create personal assignments or reviews and other tasks, on different profiles'),
],
$user_info['is_admin'],
false,
'',
'',
true
);
$global_profile .= '</div></div>';
$email = '<div class="label_select_simple">'.html_print_input_text_extended(
'email',
$user_info['email'],
@ -1538,19 +1522,29 @@ $(document).ready (function () {
}
});
$('input:radio[name="is_admin"]').change(function() {
if($('#radiobtn0002').prop('checked')) {
$('#checkbox-is_admin').change(function() {
if($('#checkbox-is_admin').is(':checked') == true) {
$('#metaconsole_agents_manager_div').show();
$('#metaconsole_access_node_div').show();
}
else {
if($('#checkbox-metaconsole_agents_manager').prop('checked')) {
$('#metaconsole_assigned_server_div').show();
}
} else {
$('#metaconsole_agents_manager_div').hide();
$('#metaconsole_access_node_div').hide();
$('#metaconsole_assigned_server_div').hide();
}
});
$('#checkbox-metaconsole_agents_manager').change(function() {
if($('#checkbox-metaconsole_agents_manager').prop('checked')) {
$('#metaconsole_assigned_server_div').show();
} else {
$('#metaconsole_assigned_server_div').hide();
}
});
$('input:radio[name="is_admin"]').trigger('change');
$('#checkbox-is_admin').trigger('change');
$('#checkbox-metaconsole_agents_manager').trigger('change');
show_data_section();
@ -1641,7 +1635,7 @@ $(document).ready (function () {
function checkProfiles(e) {
e.preventDefault();
if ($('input[name="is_admin"]:checked').val() == 1) {
if ($('#checkbox-is_admin').is(':checked') == true) {
// Admin does not require profiles.
$('#user_profile_form').submit();
} else {

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

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