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