mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-26 23:35:02 +02:00
Merge remote-tracking branch 'origin/develop' into ent-9662-second-round
This commit is contained in:
commit
ebffb004e9
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.769, AIX version
|
# Version 7.0NG.770, 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.769, FreeBSD Version
|
# Version 7.0NG.770, 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.769, HP-UX Version
|
# Version 7.0NG.770, 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.769, GNU/Linux
|
# Version 7.0NG.770, 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.769, GNU/Linux
|
# Version 7.0NG.770, 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.769, Solaris Version
|
# Version 7.0NG.770, 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.769
|
# Version 7.0NG.770
|
||||||
# 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.769, AIX version
|
# Version 7.0NG.770, 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.769
|
# Version 7.0NG.770
|
||||||
# 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.769, HPUX Version
|
# Version 7.0NG.770, 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.769
|
# Version 7.0NG.770
|
||||||
# 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.769
|
# Version 7.0NG.770
|
||||||
# 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.769
|
# Version 7.0NG.770
|
||||||
# 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.769, Solaris version
|
# Version 7.0NG.770, 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.769, AIX version
|
# Version 7.0NG.770, 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.769-230327
|
Version: 7.0NG.770
|
||||||
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.769-230327"
|
pandora_version="7.0NG.770"
|
||||||
|
|
||||||
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.769"
|
VERSION="7.0NG.770"
|
||||||
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.769" onConclusion="none">pandorafms_src.pdk</pkg-ref>
|
<pkg-ref id="com.pandorafms.pandorafms_src" version="7.0NG.770" 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.769" onConclusion="none">pandorafms_uninstall.pdk</pkg-ref>
|
<pkg-ref id="com.pandorafms.pandorafms_uninstall" version="7.0NG.770" 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.769</string>
|
<key>CFBundleVersion</key> <string>7.0NG.770</string>
|
||||||
<key>CFBundleGetInfoString</key> <string>7.0NG.769 Pandora FMS Agent uninstaller for MacOS by Artica ST on Aug 2020</string>
|
<key>CFBundleGetInfoString</key> <string>7.0NG.770 Pandora FMS Agent uninstaller for MacOS by Artica ST on Aug 2020</string>
|
||||||
<key>CFBundleShortVersionString</key> <string>7.0NG.769</string>
|
<key>CFBundleShortVersionString</key> <string>7.0NG.770</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.769, GNU/Linux
|
# Version 7.0NG.770, 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.769, FreeBSD Version
|
# Version 7.0NG.770, 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.769, HP-UX Version
|
# Version 7.0NG.770, 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.769, GNU/Linux
|
# Version 7.0NG.770, 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.769, GNU/Linux
|
# Version 7.0NG.770, 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.769, NetBSD Version
|
# Version 7.0NG.770, 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.769, Solaris Version
|
# Version 7.0NG.770, 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
|
||||||
|
@ -1022,7 +1022,7 @@ 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.769';
|
use constant AGENT_VERSION => '7.0NG.770';
|
||||||
use constant AGENT_BUILD => '230327';
|
use constant AGENT_BUILD => '230327';
|
||||||
|
|
||||||
# Agent log default file size maximum and instances
|
# Agent log default file size maximum and instances
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
#
|
#
|
||||||
%global __os_install_post %{nil}
|
%global __os_install_post %{nil}
|
||||||
%define name pandorafms_agent_linux
|
%define name pandorafms_agent_linux
|
||||||
%define version 7.0NG.769
|
%define version 7.0NG.770
|
||||||
%define release 230327
|
%define release 1
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, PERL version
|
Summary: Pandora FMS Linux agent, PERL version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
#
|
#
|
||||||
%global __os_install_post %{nil}
|
%global __os_install_post %{nil}
|
||||||
%define name pandorafms_agent_linux
|
%define name pandorafms_agent_linux
|
||||||
%define version 7.0NG.769
|
%define version 7.0NG.770
|
||||||
%define release 230327
|
%define release 1
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, PERL version
|
Summary: Pandora FMS Linux agent, PERL version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# 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.769"
|
PI_VERSION="7.0NG.770"
|
||||||
PI_BUILD="230327"
|
PI_BUILD="230327"
|
||||||
OS_NAME=`uname -s`
|
OS_NAME=`uname -s`
|
||||||
|
|
||||||
|
@ -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.769
|
# Version 7.0NG.770
|
||||||
# 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.769}
|
{Pandora FMS Windows Agent v7.0NG.770}
|
||||||
|
|
||||||
ApplicationID
|
ApplicationID
|
||||||
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
|
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
|
||||||
@ -2387,7 +2387,7 @@ Windows,BuildSeparateArchives
|
|||||||
{No}
|
{No}
|
||||||
|
|
||||||
Windows,Executable
|
Windows,Executable
|
||||||
{<%AppName%>-<%Version%>-Setup<%Ext%>}
|
{<%AppName%>-Setup<%Ext%>}
|
||||||
|
|
||||||
Windows,FileDescription
|
Windows,FileDescription
|
||||||
{<%AppName%> <%Version%> Setup}
|
{<%AppName%> <%Version%> Setup}
|
||||||
|
@ -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.769 Build 230327")
|
#define PANDORA_VERSION ("7.0NG.770 Build 230327")
|
||||||
|
|
||||||
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.769(Build 230327))"
|
VALUE "ProductVersion", "(7.0NG.770(Build 230327))"
|
||||||
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.769-230327
|
Version: 7.0NG.770
|
||||||
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.769-230327"
|
pandora_version="7.0NG.770"
|
||||||
|
|
||||||
package_pear=0
|
package_pear=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
@ -1263,10 +1263,12 @@ if ($new_user) {
|
|||||||
|
|
||||||
if (is_metaconsole() === false) {
|
if (is_metaconsole() === false) {
|
||||||
// User only can change skins if has more than one group.
|
// User only can change skins if has more than one group.
|
||||||
if (count($usr_groups) > 1) {
|
if (function_exists('skins_print_select')) {
|
||||||
if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) {
|
if (count($usr_groups) > 1) {
|
||||||
$skin = '<div class="label_select"><p class="edit_user_labels">'.__('Skin').'</p>';
|
if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) {
|
||||||
$skin .= skins_print_select($id_usr, 'skin', $user_info['id_skin'], '', __('None'), 0, true).'</div>';
|
$skin = '<div class="label_select"><p class="edit_user_labels">'.__('Skin').'</p>';
|
||||||
|
$skin .= skins_print_select($id_usr, 'skin', $user_info['id_skin'], '', __('None'), 0, true).'</div>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -572,8 +572,10 @@ if (is_metaconsole() === true) {
|
|||||||
$userManagementTable->data['line2_looknfeel'][1] = $outputMetaAccess[1];
|
$userManagementTable->data['line2_looknfeel'][1] = $outputMetaAccess[1];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$userManagementTable->data['line1_looknfeel'][1] = __('User color scheme');
|
if (function_exists('skins_print_select')) {
|
||||||
$userManagementTable->data['line2_looknfeel'][1] = skins_print_select($id_usr, 'skin', $user_info['id_skin'], '', __('None'), 0, true);
|
$userManagementTable->data['line1_looknfeel'][1] = __('User color scheme');
|
||||||
|
$userManagementTable->data['line2_looknfeel'][1] = skins_print_select($id_usr, 'skin', $user_info['id_skin'], '', __('None'), 0, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$userManagementTable->rowclass['captions_blocksize_eventfilter'] = 'field_half_width';
|
$userManagementTable->rowclass['captions_blocksize_eventfilter'] = 'field_half_width';
|
||||||
|
BIN
pandora_console/images/widgets/heatmap.png
Normal file
BIN
pandora_console/images/widgets/heatmap.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.3 KiB |
@ -26,6 +26,8 @@
|
|||||||
* ============================================================================
|
* ============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use PandoraFMS\Enterprise\Metaconsole\Node;
|
||||||
|
|
||||||
if (is_ajax() === true) {
|
if (is_ajax() === true) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
@ -216,6 +218,12 @@ if (is_ajax() === true) {
|
|||||||
if ($getInfo === true) {
|
if ($getInfo === true) {
|
||||||
enterprise_include_once('include/functions_agents.php');
|
enterprise_include_once('include/functions_agents.php');
|
||||||
$id = get_parameter('id', 0);
|
$id = get_parameter('id', 0);
|
||||||
|
$id_server = get_parameter('id_server', 0);
|
||||||
|
if (empty($id_server) === false) {
|
||||||
|
$nd = new Node($id_server);
|
||||||
|
$nd->connect();
|
||||||
|
}
|
||||||
|
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 3:
|
case 3:
|
||||||
case 2:
|
case 2:
|
||||||
@ -375,6 +383,10 @@ if (is_ajax() === true) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (empty($id_server) === false) {
|
||||||
|
$nd->disconnect();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -21,7 +21,7 @@
|
|||||||
* Pandora build version and version
|
* Pandora build version and version
|
||||||
*/
|
*/
|
||||||
$build_version = 'PC230327';
|
$build_version = 'PC230327';
|
||||||
$pandora_version = 'v7.0NG.769';
|
$pandora_version = 'v7.0NG.770';
|
||||||
|
|
||||||
// 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();
|
||||||
|
@ -281,6 +281,7 @@ function menu_print_menu(&$menu)
|
|||||||
if (($sec2 == $subsec2 || $allsec2 == $subsec2
|
if (($sec2 == $subsec2 || $allsec2 == $subsec2
|
||||||
|| $selected_submenu2) && isset($sub[$subsec2]['options'])
|
|| $selected_submenu2) && isset($sub[$subsec2]['options'])
|
||||||
&& (get_parameter_get($sub[$subsec2]['options']['name']) == $sub[$subsec2]['options']['value'])
|
&& (get_parameter_get($sub[$subsec2]['options']['name']) == $sub[$subsec2]['options']['value'])
|
||||||
|
&& $main['id'] !== 'fav-menu'
|
||||||
) {
|
) {
|
||||||
// If the subclass is selected and there are options and that options value is true.
|
// If the subclass is selected and there are options and that options value is true.
|
||||||
$class .= 'submenu_selected selected';
|
$class .= 'submenu_selected selected';
|
||||||
@ -288,7 +289,7 @@ function menu_print_menu(&$menu)
|
|||||||
$menu2_selected = $sub['id'];
|
$menu2_selected = $sub['id'];
|
||||||
$selected = true;
|
$selected = true;
|
||||||
$visible = true;
|
$visible = true;
|
||||||
} else if (($sec2 === $subsec2 || $allsec2 === $subsec2 || $selected_submenu2 === true) && isset($sub[$subsec2]['options']) === false) {
|
} else if (($sec2 === $subsec2 || $allsec2 === $subsec2 || $selected_submenu2 === true) && isset($sub[$subsec2]['options']) === false && $main['id'] !== 'fav-menu') {
|
||||||
$class .= 'submenu_selected selected';
|
$class .= 'submenu_selected selected';
|
||||||
$selected = true;
|
$selected = true;
|
||||||
$menu_selected = true;
|
$menu_selected = true;
|
||||||
@ -410,7 +411,7 @@ function menu_print_menu(&$menu)
|
|||||||
|
|
||||||
$class = 'sub_subMenu';
|
$class = 'sub_subMenu';
|
||||||
|
|
||||||
if ($key == $sec2) {
|
if ($key == $sec2 && $main['id'] !== 'fav-menu') {
|
||||||
$class .= ' selected';
|
$class .= ' selected';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1562,3 +1562,36 @@ function showManualThresholds(element) {
|
|||||||
$(".dashboard-input-threshold-critical").addClass("invisible_important");
|
$(".dashboard-input-threshold-critical").addClass("invisible_important");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return {void}
|
||||||
|
*/
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
|
function type_change() {
|
||||||
|
var type = document.getElementById("type").value;
|
||||||
|
|
||||||
|
switch (type) {
|
||||||
|
case "3":
|
||||||
|
$("#li_tags").hide();
|
||||||
|
$("#li_groups").hide();
|
||||||
|
$("#li_module_groups").hide();
|
||||||
|
break;
|
||||||
|
case "2":
|
||||||
|
$("#li_tags").hide();
|
||||||
|
$("#li_groups").hide();
|
||||||
|
$("#li_module_groups").show();
|
||||||
|
break;
|
||||||
|
case "1":
|
||||||
|
$("#li_tags").show();
|
||||||
|
$("#li_groups").hide();
|
||||||
|
$("#li_module_groups").hide();
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
case "0":
|
||||||
|
$("#li_tags").hide();
|
||||||
|
$("#li_groups").show();
|
||||||
|
$("#li_module_groups").hide();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -426,6 +426,10 @@ class Widget
|
|||||||
$className .= '\\'.$name;
|
$className .= '\\'.$name;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'heatmap':
|
||||||
|
$className .= '\HeatmapWidget';
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$className = false;
|
$className = false;
|
||||||
break;
|
break;
|
||||||
|
478
pandora_console/include/lib/Dashboard/Widgets/heatmap.php
Normal file
478
pandora_console/include/lib/Dashboard/Widgets/heatmap.php
Normal file
@ -0,0 +1,478 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Widget Heatmap Pandora FMS Console
|
||||||
|
*
|
||||||
|
* @category Console Class
|
||||||
|
* @package Pandora FMS
|
||||||
|
* @subpackage Widget Heatmap
|
||||||
|
* @version 1.0.0
|
||||||
|
* @license See below
|
||||||
|
*
|
||||||
|
* ______ ___ _______ _______ ________
|
||||||
|
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||||
|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||||
|
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||||
|
*
|
||||||
|
* ============================================================================
|
||||||
|
* Copyright (c) 2005-2023 Artica Soluciones Tecnologicas
|
||||||
|
* Please see http://pandorafms.org for full contribution list
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation for version 2.
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
* ============================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace PandoraFMS\Dashboard;
|
||||||
|
|
||||||
|
global $config;
|
||||||
|
|
||||||
|
require_once $config['homedir'].'/include/class/Heatmap.class.php';
|
||||||
|
|
||||||
|
use PandoraFMS\Heatmap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Heatmap Widgets.
|
||||||
|
*/
|
||||||
|
class HeatmapWidget extends Widget
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name widget.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Title widget.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Page widget;
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $page;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class name widget.
|
||||||
|
*
|
||||||
|
* @var [type]
|
||||||
|
*/
|
||||||
|
protected $className;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Values options for each widget.
|
||||||
|
*
|
||||||
|
* @var [type]
|
||||||
|
*/
|
||||||
|
protected $values;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configuration required.
|
||||||
|
*
|
||||||
|
* @var boolean
|
||||||
|
*/
|
||||||
|
protected $configurationRequired;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Error load widget.
|
||||||
|
*
|
||||||
|
* @var boolean
|
||||||
|
*/
|
||||||
|
protected $loadError;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Width.
|
||||||
|
*
|
||||||
|
* @var integer
|
||||||
|
*/
|
||||||
|
protected $width;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Heigth.
|
||||||
|
*
|
||||||
|
* @var integer
|
||||||
|
*/
|
||||||
|
protected $height;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dashboard ID.
|
||||||
|
*
|
||||||
|
* @var integer
|
||||||
|
*/
|
||||||
|
protected $dashboardId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cell ID.
|
||||||
|
*
|
||||||
|
* @var integer
|
||||||
|
*/
|
||||||
|
protected $cellId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Construct.
|
||||||
|
*
|
||||||
|
* @param integer $cellId Cell ID.
|
||||||
|
* @param integer $dashboardId Dashboard ID.
|
||||||
|
* @param integer $widgetId Widget ID.
|
||||||
|
* @param integer|null $width New width.
|
||||||
|
* @param integer|null $height New height.
|
||||||
|
*/
|
||||||
|
public function __construct(
|
||||||
|
int $cellId,
|
||||||
|
int $dashboardId=0,
|
||||||
|
int $widgetId=0,
|
||||||
|
?int $width=0,
|
||||||
|
?int $height=0
|
||||||
|
) {
|
||||||
|
global $config;
|
||||||
|
|
||||||
|
// Includes.
|
||||||
|
// WARNING: Do not edit. This chunk must be in the constructor.
|
||||||
|
parent::__construct(
|
||||||
|
$cellId,
|
||||||
|
$dashboardId,
|
||||||
|
$widgetId
|
||||||
|
);
|
||||||
|
|
||||||
|
// Width.
|
||||||
|
$this->width = $width;
|
||||||
|
|
||||||
|
// Height.
|
||||||
|
$this->height = $height;
|
||||||
|
|
||||||
|
// Cell Id.
|
||||||
|
$this->cellId = $cellId;
|
||||||
|
|
||||||
|
// Widget ID.
|
||||||
|
$this->widgetId = $widgetId;
|
||||||
|
|
||||||
|
// Dashboard ID.
|
||||||
|
$this->dashboardId = $dashboardId;
|
||||||
|
|
||||||
|
// Options.
|
||||||
|
$this->values = $this->decoders($this->getOptionsWidget());
|
||||||
|
|
||||||
|
// Page.
|
||||||
|
$this->page = basename(__FILE__);
|
||||||
|
|
||||||
|
// ClassName.
|
||||||
|
$class = new \ReflectionClass($this);
|
||||||
|
$this->className = $class->getShortName();
|
||||||
|
|
||||||
|
// Title.
|
||||||
|
$this->title = __('Heatmap');
|
||||||
|
|
||||||
|
// Name.
|
||||||
|
if (empty($this->name) === true) {
|
||||||
|
$this->name = 'heatmap';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decoders hack for retrocompability.
|
||||||
|
*
|
||||||
|
* @param array $decoder Values.
|
||||||
|
*
|
||||||
|
* @return array Returns the values with the correct key.
|
||||||
|
*/
|
||||||
|
public function decoders(array $decoder): array
|
||||||
|
{
|
||||||
|
$values = [];
|
||||||
|
// Retrieve global - common inputs.
|
||||||
|
$values = parent::decoders($decoder);
|
||||||
|
|
||||||
|
if (isset($decoder['search']) === true) {
|
||||||
|
$values['search'] = $decoder['search'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($decoder['type']) === true) {
|
||||||
|
$values['type'] = $decoder['type'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($decoder['groups']) === true) {
|
||||||
|
$values['groups'] = $decoder['groups'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($decoder['tags']) === true) {
|
||||||
|
$values['tags'] = $decoder['tags'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($decoder['module_groups']) === true) {
|
||||||
|
$values['module_groups'] = $decoder['module_groups'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $values;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generates inputs for form (specific).
|
||||||
|
*
|
||||||
|
* @return array Of inputs.
|
||||||
|
*
|
||||||
|
* @throws Exception On error.
|
||||||
|
*/
|
||||||
|
public function getFormInputs(): array
|
||||||
|
{
|
||||||
|
global $config;
|
||||||
|
// Retrieve global - common inputs.
|
||||||
|
$inputs = parent::getFormInputs();
|
||||||
|
|
||||||
|
$values = $this->values;
|
||||||
|
|
||||||
|
// Search.
|
||||||
|
$inputs[] = [
|
||||||
|
'label' => \__('Search'),
|
||||||
|
'arguments' => [
|
||||||
|
'name' => 'search',
|
||||||
|
'type' => 'text',
|
||||||
|
'class' => 'event-widget-input',
|
||||||
|
'value' => $values['search'],
|
||||||
|
'return' => true,
|
||||||
|
'size' => 30,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
$inputs[] = [
|
||||||
|
'label' => __('Type'),
|
||||||
|
'arguments' => [
|
||||||
|
'type' => 'select',
|
||||||
|
'fields' => [
|
||||||
|
0 => __('Group agents'),
|
||||||
|
1 => __('Group modules by tag'),
|
||||||
|
2 => __('Group modules by module group'),
|
||||||
|
3 => __('Group modules by agents'),
|
||||||
|
],
|
||||||
|
'name' => 'type',
|
||||||
|
'selected' => $values['type'],
|
||||||
|
'script' => 'type_change()',
|
||||||
|
'return' => true,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
// Filters.
|
||||||
|
$inputs[] = [
|
||||||
|
'label' => __('Groups'),
|
||||||
|
'style' => ($values['type'] === '0') ? '' : 'display:none',
|
||||||
|
'id' => 'li_groups',
|
||||||
|
'arguments' => [
|
||||||
|
'type' => 'select_groups',
|
||||||
|
'name' => 'groups[]',
|
||||||
|
'returnAllGroup' => true,
|
||||||
|
'privilege' => 'AR',
|
||||||
|
'selected' => explode(',', $values['groups'][0]),
|
||||||
|
'return' => true,
|
||||||
|
'multiple' => true,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
if (tags_has_user_acl_tags($config['id_user']) === false) {
|
||||||
|
$tags = db_get_all_rows_sql(
|
||||||
|
'SELECT id_tag, name FROM ttag WHERE id_tag ORDER BY name'
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
$user_tags = tags_get_user_tags($config['id_user'], 'AR');
|
||||||
|
if (empty($user_tags) === false) {
|
||||||
|
$id_user_tags = array_keys($user_tags);
|
||||||
|
$tags = db_get_all_rows_sql(
|
||||||
|
'SELECT id_tag, name FROM ttag
|
||||||
|
WHERE id_tag IN ('.implode(',', $id_user_tags).')
|
||||||
|
ORDER BY name'
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
$tags = db_get_all_rows_sql(
|
||||||
|
'SELECT id_tag, name FROM ttag WHERE id_tag ORDER BY name'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$inputs[] = [
|
||||||
|
'label' => __('Tag'),
|
||||||
|
'style' => ($values['type'] === '1') ? '' : 'display:none',
|
||||||
|
'id' => 'li_tags',
|
||||||
|
'arguments' => [
|
||||||
|
'type' => 'select',
|
||||||
|
'fields' => $tags,
|
||||||
|
'name' => 'tags[]',
|
||||||
|
'selected' => explode(',', $values['tags'][0]),
|
||||||
|
'return' => true,
|
||||||
|
'multiple' => true,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
$module_groups_aux = db_get_all_rows_sql(
|
||||||
|
'SELECT id_mg, name FROM tmodule_group ORDER BY name'
|
||||||
|
);
|
||||||
|
|
||||||
|
$module_groups = [];
|
||||||
|
foreach ($module_groups_aux as $key => $module_group) {
|
||||||
|
$module_groups[$module_group['id_mg']] = $module_group['name'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$inputs[] = [
|
||||||
|
'label' => __('Module group'),
|
||||||
|
'style' => ($values['type'] === '2') ? '' : 'display:none',
|
||||||
|
'id' => 'li_module_groups',
|
||||||
|
'arguments' => [
|
||||||
|
'type' => 'select',
|
||||||
|
'fields' => $module_groups,
|
||||||
|
'name' => 'module_groups[]',
|
||||||
|
'selected' => explode(',', $values['module_groups'][0]),
|
||||||
|
'return' => true,
|
||||||
|
'multiple' => true,
|
||||||
|
'nothing' => __('Not assigned'),
|
||||||
|
'nothing_value' => 0,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
return $inputs;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Post for widget.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getPost(): array
|
||||||
|
{
|
||||||
|
// Retrieve global - common inputs.
|
||||||
|
$values = parent::getPost();
|
||||||
|
|
||||||
|
$values['search'] = \get_parameter('search', '');
|
||||||
|
$values['type'] = \get_parameter('type', 0);
|
||||||
|
|
||||||
|
switch ((int) $values['type']) {
|
||||||
|
case 2:
|
||||||
|
$values['module_groups'] = \get_parameter('module_groups', 0);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
$values['tags'] = \get_parameter('tags', 0);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 0:
|
||||||
|
$values['groups'] = \get_parameter('groups', 0);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// Do nothing.
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $values;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get description.
|
||||||
|
*
|
||||||
|
* @return string.
|
||||||
|
*/
|
||||||
|
public static function getDescription()
|
||||||
|
{
|
||||||
|
return __('Heatmap');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Name.
|
||||||
|
*
|
||||||
|
* @return string.
|
||||||
|
*/
|
||||||
|
public static function getName()
|
||||||
|
{
|
||||||
|
return 'heatmap';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get size Modal Configuration.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getSizeModalConfiguration(): array
|
||||||
|
{
|
||||||
|
$size = [
|
||||||
|
'width' => 500,
|
||||||
|
'height' => 300,
|
||||||
|
];
|
||||||
|
|
||||||
|
return $size;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Draw widget.
|
||||||
|
*
|
||||||
|
* @return string;
|
||||||
|
*/
|
||||||
|
public function load()
|
||||||
|
{
|
||||||
|
global $config;
|
||||||
|
|
||||||
|
\ui_require_css_file('heatmap', 'include/styles/', true);
|
||||||
|
|
||||||
|
$values = $this->values;
|
||||||
|
$search = (empty($values['search']) === false) ? $values['search'] : '';
|
||||||
|
$type = (empty($values['type']) === false) ? $values['type'] : 0;
|
||||||
|
$filter = [];
|
||||||
|
if (isset($values['groups'])) {
|
||||||
|
$filter = explode(',', $values['groups'][0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($values['tags'])) {
|
||||||
|
$filter = explode(',', $values['tags'][0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($values['module_groups'])) {
|
||||||
|
$filter = explode(',', $values['module_groups'][0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Control call flow.
|
||||||
|
$heatmap = new Heatmap($type, $filter, null, 300, 400, 200, $search, 0, true);
|
||||||
|
// AJAX controller.
|
||||||
|
if (is_ajax() === true) {
|
||||||
|
$method = get_parameter('method');
|
||||||
|
|
||||||
|
if ($method === 'drawWidget') {
|
||||||
|
// Run.
|
||||||
|
$heatmap->run();
|
||||||
|
} else {
|
||||||
|
if (method_exists($heatmap, $method) === true) {
|
||||||
|
if ($heatmap->ajaxMethod($method) === true) {
|
||||||
|
$heatmap->{$method}();
|
||||||
|
} else {
|
||||||
|
echo 'Unavailable method';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo 'Method not found';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Stop any execution.
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Run.
|
||||||
|
$heatmap->run();
|
||||||
|
|
||||||
|
// Dialog.
|
||||||
|
echo '<div id="config_dialog" style="padding:15px" class="invisible"></div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -130,7 +130,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div style='padding-bottom: 50px'>
|
<div style='padding-bottom: 50px'>
|
||||||
<?php
|
<?php
|
||||||
$version = '7.0NG.769';
|
$version = '7.0NG.770';
|
||||||
$build = '230327';
|
$build = '230327';
|
||||||
$banner = "v$version Build $build";
|
$banner = "v$version Build $build";
|
||||||
error_reporting(0);
|
error_reporting(0);
|
||||||
|
@ -41,6 +41,7 @@ if ($agent_a === false && $agent_w === false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
require_once $config['homedir'].'/include/class/Heatmap.class.php';
|
require_once $config['homedir'].'/include/class/Heatmap.class.php';
|
||||||
|
use PandoraFMS\Heatmap;
|
||||||
|
|
||||||
$pure = (bool) get_parameter('pure', false);
|
$pure = (bool) get_parameter('pure', false);
|
||||||
$type = get_parameter('type', 0);
|
$type = get_parameter('type', 0);
|
||||||
@ -61,6 +62,8 @@ if ($group_sent === true) {
|
|||||||
$group = (int) get_parameter('group', true);
|
$group = (int) get_parameter('group', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$dashboard = (bool) get_parameter('dashboard', false);
|
||||||
|
|
||||||
$is_ajax = is_ajax();
|
$is_ajax = is_ajax();
|
||||||
if ($is_ajax === false && $pure === false) {
|
if ($is_ajax === false && $pure === false) {
|
||||||
$viewtab['config'] = '<a id="config" href="">'.html_print_image(
|
$viewtab['config'] = '<a id="config" href="">'.html_print_image(
|
||||||
@ -191,6 +194,7 @@ if ($is_ajax === false && $pure === true) {
|
|||||||
html_print_input_hidden('type', $type);
|
html_print_input_hidden('type', $type);
|
||||||
html_print_input_hidden('search', $search);
|
html_print_input_hidden('search', $search);
|
||||||
html_print_input_hidden('filter', implode(',', $filter));
|
html_print_input_hidden('filter', implode(',', $filter));
|
||||||
|
html_print_input_hidden('dashboard', $dashboard);
|
||||||
echo '</form>';
|
echo '</form>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
@ -229,7 +233,7 @@ if ($is_ajax === false && $pure === true) {
|
|||||||
// Control call flow.
|
// Control call flow.
|
||||||
try {
|
try {
|
||||||
// Heatmap construct.
|
// Heatmap construct.
|
||||||
$heatmap = new Heatmap($type, $filter, $randomId, $refresh, $width, $height, $search, $group);
|
$heatmap = new Heatmap($type, $filter, $randomId, $refresh, $width, $height, $search, $group, $dashboard);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
if (is_ajax() === true) {
|
if (is_ajax() === true) {
|
||||||
echo json_encode(['error' => '[Heatmap]'.$e->getMessage() ]);
|
echo json_encode(['error' => '[Heatmap]'.$e->getMessage() ]);
|
||||||
|
@ -618,7 +618,7 @@ if ($favorite_menu !== false) {
|
|||||||
$sub[$section]['text'] = __(str_replace('_', ' ', $section));
|
$sub[$section]['text'] = __(str_replace('_', ' ', $section));
|
||||||
$sub[$section]['type'] = 'direct';
|
$sub[$section]['type'] = 'direct';
|
||||||
$sub[$section]['subtype'] = 'nolink';
|
$sub[$section]['subtype'] = 'nolink';
|
||||||
$sub[$section]['id'] = $row['section'];
|
$sub[$section]['id'] = $row['section'].'-fav-menu';
|
||||||
|
|
||||||
$sub2[$row['url']]['text'] = io_safe_output($row['label']);
|
$sub2[$row['url']]['text'] = io_safe_output($row['label']);
|
||||||
$sub[$section]['sub2'] = $sub2;
|
$sub[$section]['sub2'] = $sub2;
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
# Pandora FMS Console
|
# Pandora FMS Console
|
||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.769
|
%define version 7.0NG.770
|
||||||
%define release 230327
|
%define release 1
|
||||||
|
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
# Pandora FMS Console
|
# Pandora FMS Console
|
||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.769
|
%define version 7.0NG.770
|
||||||
%define release 230327
|
%define release 1
|
||||||
|
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
# Pandora FMS Console
|
# Pandora FMS Console
|
||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.769
|
%define version 7.0NG.770
|
||||||
%define release 230327
|
%define release 1
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name apache2
|
%define httpd_name apache2
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# This code is licensed under GPL 2.0 license.
|
# This code is licensed under GPL 2.0 license.
|
||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
PI_VERSION="7.0NG.769"
|
PI_VERSION="7.0NG.770"
|
||||||
FORCE=0
|
FORCE=0
|
||||||
DESTDIR=""
|
DESTDIR=""
|
||||||
LOG_TIMESTAMP=`date +"%Y/%m/%d %H:%M:%S"`
|
LOG_TIMESTAMP=`date +"%Y/%m/%d %H:%M:%S"`
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-server
|
package: pandorafms-server
|
||||||
Version: 7.0NG.769-230327
|
Version: 7.0NG.770
|
||||||
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.769-230327"
|
pandora_version="7.0NG.770"
|
||||||
|
|
||||||
package_cpan=0
|
package_cpan=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#############################################################################
|
#############################################################################
|
||||||
# Pandora FMS Server Parameters
|
# Pandora FMS Server Parameters
|
||||||
# Pandora FMS, the Flexible Monitoring System.
|
# Pandora FMS, the Flexible Monitoring System.
|
||||||
# Version 7.0NG.769
|
# Version 7.0NG.770
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# (c) 2003-2021 Artica Soluciones Tecnologicas
|
# (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
@ -45,7 +45,7 @@ our @EXPORT = qw(
|
|||||||
);
|
);
|
||||||
|
|
||||||
# version: Defines actual version of Pandora Server for this module only
|
# version: Defines actual version of Pandora Server for this module only
|
||||||
my $pandora_version = "7.0NG.769";
|
my $pandora_version = "7.0NG.770";
|
||||||
my $pandora_build = "230327";
|
my $pandora_build = "230327";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ use base 'Exporter';
|
|||||||
our @ISA = qw(Exporter);
|
our @ISA = qw(Exporter);
|
||||||
|
|
||||||
# version: Defines actual version of Pandora Server for this module only
|
# version: Defines actual version of Pandora Server for this module only
|
||||||
my $pandora_version = "7.0NG.769";
|
my $pandora_version = "7.0NG.770";
|
||||||
my $pandora_build = "230327";
|
my $pandora_build = "230327";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
#
|
#
|
||||||
%global __os_install_post %{nil}
|
%global __os_install_post %{nil}
|
||||||
%define name pandorafms_server
|
%define name pandorafms_server
|
||||||
%define version 7.0NG.769
|
%define version 7.0NG.770
|
||||||
%define release 230327
|
%define release 1
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
#
|
#
|
||||||
%global __os_install_post %{nil}
|
%global __os_install_post %{nil}
|
||||||
%define name pandorafms_server
|
%define name pandorafms_server
|
||||||
%define version 7.0NG.769
|
%define version 7.0NG.770
|
||||||
%define release 230327
|
%define release 1
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
# This code is licensed under GPL 2.0 license.
|
# This code is licensed under GPL 2.0 license.
|
||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
PI_VERSION="7.0NG.769"
|
PI_VERSION="7.0NG.770"
|
||||||
PI_BUILD="230327"
|
PI_BUILD="230327"
|
||||||
|
|
||||||
MODE=$1
|
MODE=$1
|
||||||
|
@ -35,7 +35,7 @@ use PandoraFMS::Config;
|
|||||||
use PandoraFMS::DB;
|
use PandoraFMS::DB;
|
||||||
|
|
||||||
# version: define current version
|
# version: define current version
|
||||||
my $version = "7.0NG.769 Build 230327";
|
my $version = "7.0NG.770 Build 230327";
|
||||||
|
|
||||||
# Pandora server configuration
|
# Pandora server configuration
|
||||||
my %conf;
|
my %conf;
|
||||||
|
@ -36,7 +36,7 @@ use Encode::Locale;
|
|||||||
Encode::Locale::decode_argv;
|
Encode::Locale::decode_argv;
|
||||||
|
|
||||||
# version: define current version
|
# version: define current version
|
||||||
my $version = "7.0NG.769 Build 230327";
|
my $version = "7.0NG.770 Build 230327";
|
||||||
|
|
||||||
# save program name for logging
|
# save program name for logging
|
||||||
my $progname = basename($0);
|
my $progname = basename($0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user