mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 15:54:29 +02:00
Merge branch 'develop' into ent-12997-eliminar-sistema-de-skins
This commit is contained in:
commit
9fc77e69b2
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.775, AIX version
|
# Version 7.0NG.776, AIX version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2023 Pandora FMS
|
# Copyright (c) 2003-2023 Pandora FMS
|
||||||
# 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.775, FreeBSD Version
|
# Version 7.0NG.776, FreeBSD Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2023 Pandora FMS
|
# Copyright (c) 2003-2023 Pandora FMS
|
||||||
# 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.775, HP-UX Version
|
# Version 7.0NG.776, HP-UX Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2023 Pandora FMS
|
# Copyright (c) 2003-2023 Pandora FMS
|
||||||
# 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.775, GNU/Linux
|
# Version 7.0NG.776, GNU/Linux
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2023 Pandora FMS
|
# Copyright (c) 2003-2023 Pandora FMS
|
||||||
# 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.775, GNU/Linux
|
# Version 7.0NG.776, GNU/Linux
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2023 Pandora FMS
|
# Copyright (c) 2003-2023 Pandora FMS
|
||||||
# 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.775, Solaris Version
|
# Version 7.0NG.776, Solaris Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2023 Pandora FMS
|
# Copyright (c) 2003-2023 Pandora FMS
|
||||||
# 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-2023 Pandora FMS
|
# (c) 2006-2023 Pandora FMS
|
||||||
# Version 7.0NG.775
|
# Version 7.0NG.776
|
||||||
# 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.775, AIX version
|
# Version 7.0NG.776, 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.775
|
# Version 7.0NG.776
|
||||||
# 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.775, HPUX Version
|
# Version 7.0NG.776, 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.775
|
# Version 7.0NG.776
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# (c) 2003-2023 Pandora FMS
|
# (c) 2003-2023 Pandora FMS
|
||||||
# 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.775
|
# Version 7.0NG.776
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# (c) 2003-2023 Pandora FMS
|
# (c) 2003-2023 Pandora FMS
|
||||||
# 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.775
|
# Version 7.0NG.776
|
||||||
# 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.775, Solaris version
|
# Version 7.0NG.776, 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.775, AIX version
|
# Version 7.0NG.776, AIX version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2023 Pandora FMS
|
# Copyright (c) 2003-2023 Pandora FMS
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-agent-unix
|
package: pandorafms-agent-unix
|
||||||
Version: 7.0NG.775-240311
|
Version: 7.0NG.776-240319
|
||||||
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.775-240311"
|
pandora_version="7.0NG.776-240319"
|
||||||
|
|
||||||
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.775"
|
VERSION="7.0NG.776"
|
||||||
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.775" onConclusion="none">pandorafms_src.pdk</pkg-ref>
|
<pkg-ref id="com.pandorafms.pandorafms_src" version="7.0NG.776" 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.775" onConclusion="none">pandorafms_uninstall.pdk</pkg-ref>
|
<pkg-ref id="com.pandorafms.pandorafms_uninstall" version="7.0NG.776" 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.775</string>
|
<key>CFBundleVersion</key> <string>7.0NG.776</string>
|
||||||
<key>CFBundleGetInfoString</key> <string>7.0NG.775 Pandora FMS on Aug 2020</string>
|
<key>CFBundleGetInfoString</key> <string>7.0NG.776 Pandora FMS on Aug 2020</string>
|
||||||
<key>CFBundleShortVersionString</key> <string>7.0NG.775</string>
|
<key>CFBundleShortVersionString</key> <string>7.0NG.776</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.775, GNU/Linux
|
# Version 7.0NG.776, GNU/Linux
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2023 Pandora FMS
|
# Copyright (c) 2003-2023 Pandora FMS
|
||||||
# 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.775, FreeBSD Version
|
# Version 7.0NG.776, FreeBSD Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2023 Pandora FMS
|
# Copyright (c) 2003-2023 Pandora FMS
|
||||||
# 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.775, HP-UX Version
|
# Version 7.0NG.776, HP-UX Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2023 Pandora FMS
|
# Copyright (c) 2003-2023 Pandora FMS
|
||||||
# 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.775
|
# Version 7.0NG.776
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2004-2023 Pandora FMS
|
# Copyright (c) 2004-2023 Pandora FMS
|
||||||
# https://pandorafms.com
|
# https://pandorafms.com
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.775, GNU/Linux
|
# Version 7.0NG.776, GNU/Linux
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2023 Pandora FMS
|
# Copyright (c) 2003-2023 Pandora FMS
|
||||||
# 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.775, NetBSD Version
|
# Version 7.0NG.776, NetBSD Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2023 Pandora FMS
|
# Copyright (c) 2003-2023 Pandora FMS
|
||||||
# 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.775, Solaris Version
|
# Version 7.0NG.776, Solaris Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2023 Pandora FMS
|
# Copyright (c) 2003-2023 Pandora FMS
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
@ -1038,8 +1038,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.775';
|
use constant AGENT_VERSION => '7.0NG.776';
|
||||||
use constant AGENT_BUILD => '240311';
|
use constant AGENT_BUILD => '240319';
|
||||||
|
|
||||||
# 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;
|
||||||
|
@ -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.775
|
%define version 7.0NG.776
|
||||||
%define release 240311
|
%define release 240319
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, PERL version
|
Summary: Pandora FMS Linux agent, PERL version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
%global __os_install_post %{nil}
|
%global __os_install_post %{nil}
|
||||||
%define name pandorafms_agent_linux_bin
|
%define name pandorafms_agent_linux_bin
|
||||||
%define source_name pandorafms_agent_linux
|
%define source_name pandorafms_agent_linux
|
||||||
%define version 7.0NG.775
|
%define version 7.0NG.776
|
||||||
%define release 240311
|
%define release 240319
|
||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, binary version
|
Summary: Pandora FMS Linux agent, binary version
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
%global __os_install_post %{nil}
|
%global __os_install_post %{nil}
|
||||||
%define name pandorafms_agent_linux_bin
|
%define name pandorafms_agent_linux_bin
|
||||||
%define source_name pandorafms_agent_linux
|
%define source_name pandorafms_agent_linux
|
||||||
%define version 7.0NG.775
|
%define version 7.0NG.776
|
||||||
%define release 240311
|
%define release 240319
|
||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, binary version
|
Summary: Pandora FMS Linux agent, binary version
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
%global __os_install_post %{nil}
|
%global __os_install_post %{nil}
|
||||||
%define name pandorafms_agent_linux_bin
|
%define name pandorafms_agent_linux_bin
|
||||||
%define source_name pandorafms_agent_linux
|
%define source_name pandorafms_agent_linux
|
||||||
%define version 7.0NG.775
|
%define version 7.0NG.776
|
||||||
%define release 240311
|
%define release 240319
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, binary version
|
Summary: Pandora FMS Linux agent, binary 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.775
|
%define version 7.0NG.776
|
||||||
%define release 240311
|
%define release 240319
|
||||||
|
|
||||||
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.775"
|
PI_VERSION="7.0NG.776"
|
||||||
PI_BUILD="240311"
|
PI_BUILD="240319"
|
||||||
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-2023 Pandora FMS
|
# (c) 2006-2023 Pandora FMS
|
||||||
# Version 7.0NG.775
|
# Version 7.0NG.776
|
||||||
# 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.775}
|
{Pandora FMS Windows Agent v7.0NG.776}
|
||||||
|
|
||||||
ApplicationID
|
ApplicationID
|
||||||
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
|
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
|
||||||
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
Version
|
Version
|
||||||
{240311}
|
{240319}
|
||||||
|
|
||||||
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.775 Build 240311")
|
#define PANDORA_VERSION ("7.0NG.776 Build 240319")
|
||||||
|
|
||||||
string pandora_path;
|
string pandora_path;
|
||||||
string pandora_dir;
|
string pandora_dir;
|
||||||
|
@ -11,7 +11,7 @@ BEGIN
|
|||||||
VALUE "LegalCopyright", "Pandora FMS"
|
VALUE "LegalCopyright", "Pandora FMS"
|
||||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||||
VALUE "ProductVersion", "(7.0NG.775(Build 240311))"
|
VALUE "ProductVersion", "(7.0NG.776(Build 240319))"
|
||||||
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.775-240311
|
Version: 7.0NG.776-240319
|
||||||
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.775-240311"
|
pandora_version="7.0NG.776-240319"
|
||||||
|
|
||||||
package_pear=0
|
package_pear=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
@ -23,7 +23,7 @@ window.onload = function() {
|
|||||||
|
|
||||||
// the following lines will be replaced by docker/configurator, when it runs in a docker-container
|
// the following lines will be replaced by docker/configurator, when it runs in a docker-container
|
||||||
const ui = SwaggerUIBundle({
|
const ui = SwaggerUIBundle({
|
||||||
url: "../v1/swagger.json",
|
url: "../v2/swagger.json",
|
||||||
dom_id: "#swagger-ui",
|
dom_id: "#swagger-ui",
|
||||||
docExpansion: "none",
|
docExpansion: "none",
|
||||||
deepLinking: true,
|
deepLinking: true,
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
},
|
},
|
||||||
"servers": [
|
"servers": [
|
||||||
{
|
{
|
||||||
"url": "/api/v1",
|
"url": "/api/v2",
|
||||||
"description": "PandoraFMS API Server"
|
"description": "PandoraFMS API Server"
|
||||||
}
|
}
|
||||||
],
|
],
|
@ -1,4 +1,6 @@
|
|||||||
pandorafms.vmware=248788e0fb2cd4e11623e4a52ee7d05b
|
pandorafms.vmware=a272ee00a9b5f201bb708bef72bbe276
|
||||||
|
pandorafms.mysql=fadb4750d18285c0eca34f47c6aa3cfe
|
||||||
|
pandorafms.vmware=1deafce1d55d3574645d8b136104e9ad
|
||||||
pandorafms.mysql=ca7dd8b80a1a03a25eb0fb077818ad63
|
pandorafms.mysql=ca7dd8b80a1a03a25eb0fb077818ad63
|
||||||
pandorafms.mssql=1cc215409741d19080269ffba112810e
|
pandorafms.mssql=1cc215409741d19080269ffba112810e
|
||||||
pandorafms.oracle=abdfd7280f76276f696115cabdac731e
|
pandorafms.oracle=abdfd7280f76276f696115cabdac731e
|
||||||
|
@ -61,6 +61,11 @@ CREATE TABLE IF NOT EXISTS `tmerge_queries` (
|
|||||||
|
|
||||||
ALTER TABLE `tmerge_queries` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
|
ALTER TABLE `tmerge_queries` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
|
||||||
|
|
||||||
|
-- Update version for plugin oracle
|
||||||
|
UPDATE `tdiscovery_apps` SET `version` = '1.2' WHERE `short_name` = 'pandorafms.oracle';
|
||||||
|
-- Update version for plugin oracle
|
||||||
|
UPDATE `tdiscovery_apps` SET `version` = '1.3' WHERE `short_name` = 'pandorafms.vmware';
|
||||||
|
|
||||||
ALTER TABLE `tevent_sound` MODIFY COLUMN `name` text NULL;
|
ALTER TABLE `tevent_sound` MODIFY COLUMN `name` text NULL;
|
||||||
ALTER TABLE `tevent_sound` MODIFY COLUMN `sound` text NULL;
|
ALTER TABLE `tevent_sound` MODIFY COLUMN `sound` text NULL;
|
||||||
ALTER TABLE `treport_content` MODIFY COLUMN `use_prefix_notation` tinyint unsigned NOT NULL DEFAULT 1;
|
ALTER TABLE `treport_content` MODIFY COLUMN `use_prefix_notation` tinyint unsigned NOT NULL DEFAULT 1;
|
||||||
@ -69,8 +74,17 @@ ALTER TABLE `tsesion_filter` MODIFY COLUMN `id_name` text NULL;
|
|||||||
ALTER TABLE `tsesion_filter` MODIFY COLUMN `ip` text NULL;
|
ALTER TABLE `tsesion_filter` MODIFY COLUMN `ip` text NULL;
|
||||||
ALTER TABLE `tsesion_filter` MODIFY COLUMN `type` text NULL;
|
ALTER TABLE `tsesion_filter` MODIFY COLUMN `type` text NULL;
|
||||||
ALTER TABLE `tsesion_filter` MODIFY COLUMN `user` text NULL;
|
ALTER TABLE `tsesion_filter` MODIFY COLUMN `user` text NULL;
|
||||||
ALTER TABLE `tncm_agent_data`
|
|
||||||
ADD COLUMN `id_agent_data` int not null default 0 AFTER `script_type`;
|
SET @st_oum776 = (SELECT IF(
|
||||||
|
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'tncm_agent_data' AND table_schema = DATABASE() AND column_name = 'id_agent_data') > 0,
|
||||||
|
"SELECT 1",
|
||||||
|
"ALTER TABLE `tncm_agent_data` ADD COLUMN `id_agent_data` int not null default 0 AFTER `script_type`"
|
||||||
|
));
|
||||||
|
|
||||||
|
PREPARE pr_oum776 FROM @st_oum776;
|
||||||
|
EXECUTE pr_oum776;
|
||||||
|
DEALLOCATE PREPARE pr_oum776;
|
||||||
|
|
||||||
ALTER TABLE `tusuario` CHANGE COLUMN `metaconsole_data_section` `metaconsole_data_section` TEXT NOT NULL DEFAULT '' ;
|
ALTER TABLE `tusuario` CHANGE COLUMN `metaconsole_data_section` `metaconsole_data_section` TEXT NOT NULL DEFAULT '' ;
|
||||||
ALTER TABLE `tmensajes` ADD COLUMN `icon_notification` VARCHAR(250) NULL DEFAULT NULL AFTER `url`;
|
ALTER TABLE `tmensajes` ADD COLUMN `icon_notification` VARCHAR(250) NULL DEFAULT NULL AFTER `url`;
|
||||||
|
|
||||||
@ -159,4 +173,8 @@ CREATE TABLE IF NOT EXISTS `tmetaconsole_ha_databases` (
|
|||||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||||
ALTER TABLE `tserver` ADD COLUMN `disabled` BOOLEAN NOT NULL DEFAULT FALSE;
|
ALTER TABLE `tserver` ADD COLUMN `disabled` BOOLEAN NOT NULL DEFAULT FALSE;
|
||||||
|
|
||||||
|
ALTER TABLE `tuser_task_scheduled` ADD COLUMN `id_report` INT NULL AFTER `id_user_task`;
|
||||||
|
ALTER TABLE `tuser_task_scheduled` ADD COLUMN `name` VARCHAR(255) NULL AFTER `id_user_task`;
|
||||||
|
|
||||||
|
|
||||||
COMMIT;
|
COMMIT;
|
@ -2,7 +2,7 @@
|
|||||||
echo '<script src="'.ui_get_full_url('include/javascript/jquery.current.js', false, false, false).'" type="text/javascript"></script>';
|
echo '<script src="'.ui_get_full_url('include/javascript/jquery.current.js', false, false, false).'" type="text/javascript"></script>';
|
||||||
|
|
||||||
$message = '';
|
$message = '';
|
||||||
|
$config['ignore_cache_translate'] = true;
|
||||||
if ($config['history_db_connection'] === false) {
|
if ($config['history_db_connection'] === false) {
|
||||||
$message = __('Failure to connect to historical database, please check the configuration or contact system administrator if you need assistance.');
|
$message = __('Failure to connect to historical database, please check the configuration or contact system administrator if you need assistance.');
|
||||||
} else {
|
} else {
|
||||||
|
@ -376,6 +376,7 @@ $img_style = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
if ($id_agente) {
|
if ($id_agente) {
|
||||||
|
$menu_tabs = [];
|
||||||
// View tab.
|
// View tab.
|
||||||
$viewtab['text'] = html_print_anchor(
|
$viewtab['text'] = html_print_anchor(
|
||||||
[
|
[
|
||||||
@ -391,6 +392,8 @@ if ($id_agente) {
|
|||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agente.'">'.__('View').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
$viewtab['active'] = ($tab === 'view');
|
$viewtab['active'] = ($tab === 'view');
|
||||||
$viewtab['operation'] = 1;
|
$viewtab['operation'] = 1;
|
||||||
@ -410,6 +413,8 @@ if ($id_agente) {
|
|||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=main&id_agente='.$id_agente.'">'.__('Setup').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
$maintab['active'] = ($tab === 'main');
|
$maintab['active'] = ($tab === 'main');
|
||||||
|
|
||||||
@ -428,6 +433,8 @@ if ($id_agente) {
|
|||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=module&id_agente='.$id_agente.'">'.__('Modules').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
$moduletab['active'] = ($tab === 'module');
|
$moduletab['active'] = ($tab === 'module');
|
||||||
|
|
||||||
@ -446,6 +453,8 @@ if ($id_agente) {
|
|||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=alert&id_agente='.$id_agente.'">'.__('Alerts').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
$alerttab['active'] = ($tab === 'alert');
|
$alerttab['active'] = ($tab === 'alert');
|
||||||
|
|
||||||
@ -458,6 +467,8 @@ if ($id_agente) {
|
|||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=template&id_agente='.$id_agente.'">'.__('Module templates').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
$templatetab['active'] = ($tab === 'template');
|
$templatetab['active'] = ($tab === 'template');
|
||||||
|
|
||||||
@ -470,6 +481,8 @@ if ($id_agente) {
|
|||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=policy&id_agente='.$id_agente.'">'.__('Manage policy').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
$policyTab['active'] = ($tab === 'policy');
|
$policyTab['active'] = ($tab === 'policy');
|
||||||
|
|
||||||
@ -482,6 +495,8 @@ if ($id_agente) {
|
|||||||
'class' => 'main_menu_icon invert_filter',
|
'class' => 'main_menu_icon invert_filter',
|
||||||
]
|
]
|
||||||
).'</a>';
|
).'</a>';
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=inventory&id_agente='.$id_agente.'">'.__('Inventory').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
if ($tab == 'inventory') {
|
if ($tab == 'inventory') {
|
||||||
$inventorytab['active'] = true;
|
$inventorytab['active'] = true;
|
||||||
@ -502,6 +517,9 @@ if ($id_agente) {
|
|||||||
$pluginstab = enterprise_hook('plugins_tab');
|
$pluginstab = enterprise_hook('plugins_tab');
|
||||||
if ($pluginstab === ENTERPRISE_NOT_HOOK) {
|
if ($pluginstab === ENTERPRISE_NOT_HOOK) {
|
||||||
$pluginstab = '';
|
$pluginstab = '';
|
||||||
|
} else {
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=plugins&id_agente='.$id_agente.'">'.__('Plugins').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$pluginstab = '';
|
$pluginstab = '';
|
||||||
@ -512,6 +530,9 @@ if ($id_agente) {
|
|||||||
$collectiontab = enterprise_hook('collection_tab');
|
$collectiontab = enterprise_hook('collection_tab');
|
||||||
if ($collectiontab === ENTERPRISE_NOT_HOOK) {
|
if ($collectiontab === ENTERPRISE_NOT_HOOK) {
|
||||||
$collectiontab = '';
|
$collectiontab = '';
|
||||||
|
} else {
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=collection&id_agente='.$id_agente.'">'.__('Collection').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$collectiontab = '';
|
$collectiontab = '';
|
||||||
@ -532,6 +553,8 @@ if ($id_agente) {
|
|||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&ag_group='.$group.'">'.__('Group').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
$grouptab['active'] = false;
|
$grouptab['active'] = false;
|
||||||
|
|
||||||
@ -550,6 +573,8 @@ if ($id_agente) {
|
|||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=gis&id_agente='.$id_agente.'">'.__('GIS data').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
$gistab['active'] = ($tab === 'gis');
|
$gistab['active'] = ($tab === 'gis');
|
||||||
}
|
}
|
||||||
@ -598,6 +623,12 @@ if ($id_agente) {
|
|||||||
).'</a>';
|
).'</a>';
|
||||||
$agent_wizard['sub_menu'] .= '</li>';
|
$agent_wizard['sub_menu'] .= '</li>';
|
||||||
$agent_wizard['sub_menu'] .= '</ul>';
|
$agent_wizard['sub_menu'] .= '</ul>';
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=agent_wizard&wizard_section=snmp_explorer&id_agente='.$id_agente.'">'.__('SNMP Wizard').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=agent_wizard&wizard_section=snmp_interfaces_explorer&id_agente='.$id_agente.'">'.__('SNMP Interfaces wizard').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=agent_wizard&wizard_section=wmi_explorer&id_agente='.$id_agente.'">'.__('WMI Wizard').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
|
|
||||||
if ($tab == 'agent_wizard') {
|
if ($tab == 'agent_wizard') {
|
||||||
@ -816,22 +847,6 @@ if ($id_agente) {
|
|||||||
|
|
||||||
$helper = ($help_header === 'main_tab') ? 'main_tab' : '';
|
$helper = ($help_header === 'main_tab') ? 'main_tab' : '';
|
||||||
$pure = (int) get_parameter('pure');
|
$pure = (int) get_parameter('pure');
|
||||||
$menu_tabs = [];
|
|
||||||
// Agent details.
|
|
||||||
$menu_tab_url = '<a href="index.php?sec=gsetup&sec2=godmode/setup/setup§ion=general">'.__('General setup').'</a>';
|
|
||||||
array_push($menu_tabs, $menu_tab_url);
|
|
||||||
// Agent details.
|
|
||||||
$menu_tab_url = '<a href="index.php?sec=view&sec2=operation/agentes/estado_agente">'.__('Agent detail').'</a>';
|
|
||||||
array_push($menu_tabs, $menu_tab_url);
|
|
||||||
// Manage agents.
|
|
||||||
$menu_tab_url = '<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente">'.__('Manage agents').'</a>';
|
|
||||||
array_push($menu_tabs, $menu_tab_url);
|
|
||||||
// Events.
|
|
||||||
$menu_tab_url = '<a href="index.php?sec=eventos&sec2=operation/events/events">'.__('View events').'</a>';
|
|
||||||
array_push($menu_tabs, $menu_tab_url);
|
|
||||||
// Events.
|
|
||||||
$menu_tab_url = '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder">'.__('Custom reports').'</a>';
|
|
||||||
array_push($menu_tabs, $menu_tab_url);
|
|
||||||
$dots = dot_tab($menu_tabs);
|
$dots = dot_tab($menu_tabs);
|
||||||
if ($pure === 0) {
|
if ($pure === 0) {
|
||||||
ui_print_standard_header(
|
ui_print_standard_header(
|
||||||
|
@ -71,7 +71,7 @@ if ((bool) check_acl($config['id_user'], 0, 'AR') === true
|
|||||||
$sub2['godmode/servers/discovery&wiz=hd&mode=managenetscanscripts']['text'] = __('Manage scan scripts');
|
$sub2['godmode/servers/discovery&wiz=hd&mode=managenetscanscripts']['text'] = __('Manage scan scripts');
|
||||||
}
|
}
|
||||||
|
|
||||||
$sub['godmode/servers/discovery&wiz=hd']['text'] = __('Host & devices');
|
$sub['godmode/servers/discovery&wiz=hd']['text'] = __('Host & Devices');
|
||||||
$sub['godmode/servers/discovery&wiz=hd']['id'] = 'hd';
|
$sub['godmode/servers/discovery&wiz=hd']['id'] = 'hd';
|
||||||
$sub['godmode/servers/discovery&wiz=hd']['type'] = 'direct';
|
$sub['godmode/servers/discovery&wiz=hd']['type'] = 'direct';
|
||||||
$sub['godmode/servers/discovery&wiz=hd']['subtype'] = 'nolink';
|
$sub['godmode/servers/discovery&wiz=hd']['subtype'] = 'nolink';
|
||||||
|
343
pandora_console/godmode/reporting/manage_schedule.php
Normal file
343
pandora_console/godmode/reporting/manage_schedule.php
Normal file
@ -0,0 +1,343 @@
|
|||||||
|
<?php
|
||||||
|
// Pandora FMS - https://pandorafms.com
|
||||||
|
// ==================================================
|
||||||
|
// Copyright (c) 2005-2023 Pandora FMS
|
||||||
|
// Please see https://pandorafms.com/community/ 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.
|
||||||
|
// Load global vars.
|
||||||
|
global $config;
|
||||||
|
|
||||||
|
// Check ACL.
|
||||||
|
if (!check_acl($config['id_user'], 0, 'RW')
|
||||||
|
&& !check_acl($config['id_user'], 0, 'RM')
|
||||||
|
) {
|
||||||
|
db_pandora_audit(
|
||||||
|
AUDIT_LOG_ACL_VIOLATION,
|
||||||
|
'Trying to access SNMP Filter Management'
|
||||||
|
);
|
||||||
|
include 'general/noaccess.php';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
require 'include/functions_cron.php';
|
||||||
|
|
||||||
|
// Header.
|
||||||
|
ui_print_standard_header(
|
||||||
|
__('Schedule'),
|
||||||
|
'images/op_snmp.png',
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
[],
|
||||||
|
[
|
||||||
|
[
|
||||||
|
'link' => '',
|
||||||
|
'label' => __('Reporting'),
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'link' => '',
|
||||||
|
'label' => __('Custom Reports'),
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$id_task = get_parameter('id_task', null);
|
||||||
|
$name = '';
|
||||||
|
$id_report = '';
|
||||||
|
$task = '';
|
||||||
|
$group = 0;
|
||||||
|
$schedule = '';
|
||||||
|
$console = '';
|
||||||
|
$date = '';
|
||||||
|
$time = '';
|
||||||
|
$args = '';
|
||||||
|
|
||||||
|
if (isset($id_task) === true) {
|
||||||
|
$row = db_get_row('tuser_task_scheduled', 'id', $id_task);
|
||||||
|
$name = $row['name'];
|
||||||
|
$id_report = $row['id_report'];
|
||||||
|
$task = $row['id_user_task'];
|
||||||
|
$group = $row['id_grupo'];
|
||||||
|
$schedule = $row['scheduled'];
|
||||||
|
$console = $row['id_console'];
|
||||||
|
$args = unserialize($row['args']);
|
||||||
|
$date = date('Y/m/d', $args['first_execution']);
|
||||||
|
$time = date('H:i:s', $args['first_execution']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$table = new stdClass();
|
||||||
|
$traps_generator = '<form id="form_manage" class="max_floating_element_size" method="POST" action="index.php?sec=custom_report&sec2=godmode/reporting/schedule">';
|
||||||
|
$table->id = 'table_manage';
|
||||||
|
$table->width = '100%';
|
||||||
|
$table->class = 'filter-table-adv databox';
|
||||||
|
$table->size = [];
|
||||||
|
$table->data = [];
|
||||||
|
$table->size[0] = '50%';
|
||||||
|
$table->size[1] = '50%';
|
||||||
|
|
||||||
|
$table->data[0][0] = html_print_label_input_block(
|
||||||
|
__('Name'),
|
||||||
|
html_print_input_text(
|
||||||
|
'name',
|
||||||
|
$name,
|
||||||
|
'',
|
||||||
|
50,
|
||||||
|
255,
|
||||||
|
true
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$reports = db_get_all_rows_sql('SELECT id_report, name FROM treport');
|
||||||
|
if ($reports !== false) {
|
||||||
|
$array_reports = [];
|
||||||
|
foreach ($reports as $row) {
|
||||||
|
$array_reports[$row['id_report']] = $row['name'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$table->data[0][1] = html_print_label_input_block(
|
||||||
|
__('Report'),
|
||||||
|
html_print_select(
|
||||||
|
$array_reports,
|
||||||
|
'id_report',
|
||||||
|
$id_report,
|
||||||
|
'',
|
||||||
|
__('Select'),
|
||||||
|
-1,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
'w100p'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
// Remove Send csv log in list new console task.
|
||||||
|
$tasks = get_tasks();
|
||||||
|
// Unset to take just Reports ones.
|
||||||
|
unset($tasks[4], $tasks[5], $tasks[6], $tasks[7]);
|
||||||
|
if (($key = array_search('Send csv log', $tasks)) !== false) {
|
||||||
|
unset($tasks[$key]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$table->data[1][0] = html_print_label_input_block(
|
||||||
|
__('Task'),
|
||||||
|
html_print_select(
|
||||||
|
$tasks,
|
||||||
|
'id_user_task',
|
||||||
|
$task,
|
||||||
|
'',
|
||||||
|
__('Select'),
|
||||||
|
-1,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
'width: 100%'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$table->data[1][1] = html_print_label_input_block(
|
||||||
|
__('Group'),
|
||||||
|
html_print_select_groups(
|
||||||
|
false,
|
||||||
|
'AR',
|
||||||
|
true,
|
||||||
|
'group',
|
||||||
|
$group,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
'width: 100%',
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
true
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$table->data[2][0] = html_print_label_input_block(
|
||||||
|
__('Scheduled'),
|
||||||
|
html_print_select(
|
||||||
|
cron_get_scheduled_options(),
|
||||||
|
'scheduled',
|
||||||
|
$schedule,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
0,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
'width: 100%'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$table->data[2][1] = html_print_label_input_block(
|
||||||
|
__('Console'),
|
||||||
|
html_print_select(
|
||||||
|
$registered_consoles_opts,
|
||||||
|
'console',
|
||||||
|
$console,
|
||||||
|
'',
|
||||||
|
__('Any'),
|
||||||
|
0,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
'width: 100%'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$table->data[3][0] = html_print_label_input_block(
|
||||||
|
__('Next execution'),
|
||||||
|
html_print_input_text(
|
||||||
|
'date',
|
||||||
|
$date,
|
||||||
|
'',
|
||||||
|
50,
|
||||||
|
255,
|
||||||
|
true
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$table->data[3][1] = html_print_label_input_block(
|
||||||
|
__('Hour'),
|
||||||
|
html_print_input_text(
|
||||||
|
'time',
|
||||||
|
$time,
|
||||||
|
'',
|
||||||
|
50,
|
||||||
|
255,
|
||||||
|
true
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$table->colspan[4][0] = 2;
|
||||||
|
$table->data[4][0] = html_print_label_input_block(__('Parameters'), cron_render_parameters($task, $args, $id_report, true));
|
||||||
|
$traps_generator .= html_print_table($table, true);
|
||||||
|
if (isset($id_task) === true) {
|
||||||
|
$buttons[] = html_print_submit_button(
|
||||||
|
__('Update schedule'),
|
||||||
|
'btn_generate_trap',
|
||||||
|
false,
|
||||||
|
[
|
||||||
|
'class' => 'sub ok submitButton',
|
||||||
|
'icon' => 'next',
|
||||||
|
],
|
||||||
|
true
|
||||||
|
).html_print_input_hidden('update_schedule', 1, true).html_print_input_hidden('id', $id_task, true);
|
||||||
|
} else {
|
||||||
|
$buttons[] = html_print_submit_button(
|
||||||
|
__('Create schedule'),
|
||||||
|
'btn_generate_trap',
|
||||||
|
false,
|
||||||
|
[
|
||||||
|
'class' => 'sub ok submitButton',
|
||||||
|
'icon' => 'next',
|
||||||
|
],
|
||||||
|
true
|
||||||
|
).html_print_input_hidden('new_schedule', 1, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
$buttons[] = html_print_button(
|
||||||
|
__('Go back'),
|
||||||
|
'button_back',
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
[
|
||||||
|
'icon' => 'back',
|
||||||
|
'mode' => 'secondary',
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
$traps_generator .= '<div class="action-buttons">'.html_print_action_buttons(implode('', $buttons), ['type' => 'form_action'], true).'</div>';
|
||||||
|
|
||||||
|
unset($table);
|
||||||
|
$traps_generator .= '</form>';
|
||||||
|
|
||||||
|
echo $traps_generator;
|
||||||
|
|
||||||
|
ui_require_css_file('datepicker');
|
||||||
|
ui_include_time_picker();
|
||||||
|
ui_require_jquery_file('ui.datepicker-'.get_user_language(), 'include/javascript/i18n/');
|
||||||
|
|
||||||
|
?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#text-time').timepicker({
|
||||||
|
showSecond: true,
|
||||||
|
timeFormat: '<?php echo TIME_FORMAT_JS; ?>',
|
||||||
|
timeOnlyTitle: '<?php echo __('Choose time'); ?>',
|
||||||
|
timeText: '<?php echo __('Time'); ?>',
|
||||||
|
hourText: '<?php echo __('Hour'); ?>',
|
||||||
|
minuteText: '<?php echo __('Minute'); ?>',
|
||||||
|
secondText: '<?php echo __('Second'); ?>',
|
||||||
|
currentText: '<?php echo __('Now'); ?>',
|
||||||
|
closeText: '<?php echo __('Close'); ?>'});
|
||||||
|
|
||||||
|
$('#text-date').datepicker ({
|
||||||
|
dateFormat: '<?php echo DATE_FORMAT_JS; ?>',
|
||||||
|
changeMonth: true,
|
||||||
|
changeYear: true,
|
||||||
|
showAnim: 'slideDown',
|
||||||
|
firstDay: "<?php echo $config['datepicker_first_day']; ?>",
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#id_user_task, #id_report').on('change', function() {
|
||||||
|
$.ajax({
|
||||||
|
url: 'ajax.php',
|
||||||
|
data: {
|
||||||
|
"page" : "enterprise/include/ajax/ConsoleTasks.ajax",
|
||||||
|
"get_task_parameters": 1,
|
||||||
|
"id_user_task": $('#id_user_task :selected').val(),
|
||||||
|
"id_report": $('#id_report :selected').val(),
|
||||||
|
},
|
||||||
|
type: 'POST',
|
||||||
|
success: function (data) {
|
||||||
|
$('#table_manage-4-0').find('table').html("");
|
||||||
|
$('#table_manage-4-0').append(data);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#button-btn_generate_trap').on('click', function() {
|
||||||
|
event.preventDefault();
|
||||||
|
var name = $('#text-name').val();
|
||||||
|
var report = $('#id_report :selected').val();
|
||||||
|
var task = $('#id_user_task :selected').val();
|
||||||
|
var group = $('#group :selected').val();
|
||||||
|
if (name !== '' && report !== '-1' && task !== '-1' && group !== '') {
|
||||||
|
$('#form_manage').submit();
|
||||||
|
} else {
|
||||||
|
confirmDialog({
|
||||||
|
title: "<?php echo __('Error'); ?>",
|
||||||
|
message: "<?php echo __('Name, Report, Task and Group are required.'); ?>",
|
||||||
|
hideCancelButton: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#button-button_back').on('click', function(){
|
||||||
|
window.location = '<?php echo ui_get_full_url('index.php?sec=custom_report&sec2=godmode/reporting/schedule'); ?>';
|
||||||
|
});
|
||||||
|
</script>
|
@ -1282,24 +1282,6 @@ switch ($action) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$discovery_tasklist = new DiscoveryTaskList();
|
|
||||||
$report_task_data = $discovery_tasklist->showListConsoleTask(true);
|
|
||||||
if (is_array($report_task_data) === true || (strpos($report_task_data, 'class="nf"') === false && $report_task_data !== -1)) {
|
|
||||||
$task_table = '<div class="mrgn_top_15px white_box">';
|
|
||||||
$task_table .= '<span class="white_table_graph_header">'.__('Report tasks');
|
|
||||||
$task_table .= ui_print_help_tip(__('To schedule a report, do it from the editing view of each report.'), true);
|
|
||||||
$task_table .= '</span><div>';
|
|
||||||
$task_table .= $report_task_data;
|
|
||||||
$task_table .= '</div></div>';
|
|
||||||
echo $task_table;
|
|
||||||
} else {
|
|
||||||
if ($report_task_data === -1) {
|
|
||||||
$report_task_data = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
ui_print_info_message($report_task_data.__('To schedule a report, do it from the editing view of each report.'));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (check_acl($config['id_user'], 0, 'RW')
|
if (check_acl($config['id_user'], 0, 'RW')
|
||||||
|| check_acl($config['id_user'], 0, 'RM')
|
|| check_acl($config['id_user'], 0, 'RM')
|
||||||
) {
|
) {
|
||||||
|
271
pandora_console/godmode/reporting/schedule.php
Normal file
271
pandora_console/godmode/reporting/schedule.php
Normal file
@ -0,0 +1,271 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Report item list.
|
||||||
|
*
|
||||||
|
* @category Reporting
|
||||||
|
* @package Pandora FMS
|
||||||
|
* @subpackage Community
|
||||||
|
* @version 1.0.0
|
||||||
|
* @license See below
|
||||||
|
*
|
||||||
|
* ______ ___ _______ _______ ________
|
||||||
|
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||||
|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||||
|
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||||
|
*
|
||||||
|
* ============================================================================
|
||||||
|
* Copyright (c) 2005-2023 Pandora FMS
|
||||||
|
* Please see https://pandorafms.com/community/ 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.
|
||||||
|
* ============================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
|
global $config;
|
||||||
|
|
||||||
|
// Login check.
|
||||||
|
check_login();
|
||||||
|
if (!check_acl($config['id_user'], 0, 'RW')
|
||||||
|
&& !check_acl($config['id_user'], 0, 'RM')
|
||||||
|
) {
|
||||||
|
db_pandora_audit(
|
||||||
|
AUDIT_LOG_ACL_VIOLATION,
|
||||||
|
'Trying to access report builder'
|
||||||
|
);
|
||||||
|
include 'general/noaccess.php';
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
require_once $config['homedir'].'/include/functions_agents.php';
|
||||||
|
enterprise_include_once('include/functions_metaconsole.php');
|
||||||
|
|
||||||
|
// Header.
|
||||||
|
ui_print_standard_header(
|
||||||
|
__('Schedule'),
|
||||||
|
'images/op_reporting.png',
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
[],
|
||||||
|
[
|
||||||
|
[
|
||||||
|
'link' => '',
|
||||||
|
'label' => __('Reporting'),
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'link' => '',
|
||||||
|
'label' => __('Custom reports'),
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$delete_task = get_parameter('delete_task', false);
|
||||||
|
if ($delete_task !== false) {
|
||||||
|
db_process_sql(sprintf('DELETE FROM tuser_task_scheduled WHERE id = %s', $delete_task));
|
||||||
|
ui_print_result_message(
|
||||||
|
true,
|
||||||
|
__('Successfully deleted')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$update_schedule = get_parameter('update_schedule', false);
|
||||||
|
if ($update_schedule === '1') {
|
||||||
|
enterprise_include_once('/godmode/wizards/ConsoleTasks.class.php');
|
||||||
|
$task = new ConsoleTasks(0, 'Default message. Not set.', '/images/wizard/consoletasks.png', 'Report Tasks', true);
|
||||||
|
$task->updateTask();
|
||||||
|
ui_print_result_message(
|
||||||
|
true,
|
||||||
|
__('Successfully updated')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$new_schedule = get_parameter('new_schedule', false);
|
||||||
|
if ($new_schedule === '1') {
|
||||||
|
$name = get_parameter('name', null);
|
||||||
|
$sql = sprintf('SELECT * FROM tuser_task_scheduled WHERE name = "%s"', $name);
|
||||||
|
if (db_get_all_rows_sql($sql) === false) {
|
||||||
|
enterprise_include_once('/godmode/wizards/ConsoleTasks.class.php');
|
||||||
|
$task = new ConsoleTasks(0, 'Default message. Not set.', '/images/wizard/consoletasks.png', 'Report Tasks', true);
|
||||||
|
$result = $task->createTask();
|
||||||
|
} else {
|
||||||
|
$result = false;
|
||||||
|
$_SESSION['report_task_msg'] = __('The schedule name is already in use.');
|
||||||
|
}
|
||||||
|
|
||||||
|
ui_print_result_message(
|
||||||
|
$result,
|
||||||
|
__('Successfully created'),
|
||||||
|
$_SESSION['report_task_msg']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$id_group = get_parameter('id_group', 0);
|
||||||
|
$search = get_parameter('search', '');
|
||||||
|
|
||||||
|
$table_aux = new stdClass();
|
||||||
|
$table_aux->width = '100%';
|
||||||
|
$table_aux->class = 'filter-table-adv';
|
||||||
|
$table_aux->size[0] = '50%';
|
||||||
|
$table_aux->size[1] = '50%';
|
||||||
|
|
||||||
|
$table_aux->data[0][0] = html_print_label_input_block(
|
||||||
|
__('Group'),
|
||||||
|
html_print_select_groups(
|
||||||
|
false,
|
||||||
|
$access,
|
||||||
|
true,
|
||||||
|
'id_group',
|
||||||
|
$id_group,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
'id_grupo'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$table_aux->data[0][1] = html_print_label_input_block(
|
||||||
|
__('Free text for search: ').ui_print_help_tip(
|
||||||
|
__('Search by report name or description, list matches.'),
|
||||||
|
true
|
||||||
|
),
|
||||||
|
html_print_input_text(
|
||||||
|
__('search'),
|
||||||
|
$search,
|
||||||
|
'',
|
||||||
|
30,
|
||||||
|
'',
|
||||||
|
true
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$where = '';
|
||||||
|
if ((bool) users_is_admin() === false) {
|
||||||
|
$where = sprintf(' AND id_usuario = "%s"', $config['id_user']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = 'SELECT * FROM tuser_task_scheduled WHERE id_user_task IN (1,2,3,4) '.$where;
|
||||||
|
$reports = db_get_all_rows_sql($sql);
|
||||||
|
if ($reports !== false) {
|
||||||
|
$table = new stdClass();
|
||||||
|
$table->class = 'info_table';
|
||||||
|
$table->width = '100%';
|
||||||
|
$table->data = [];
|
||||||
|
|
||||||
|
$table->head[0] = __('Name');
|
||||||
|
$table->head[1] = __('Report');
|
||||||
|
$table->head[2] = __('Type');
|
||||||
|
$table->head[3] = __('Schedule / Day');
|
||||||
|
$table->head[4] = __('Action');
|
||||||
|
$table->head[5] = __('Operations');
|
||||||
|
|
||||||
|
foreach ($reports as $row) {
|
||||||
|
$table->cellclass[][5] = 'table_action_buttons';
|
||||||
|
$function_name = db_get_value(
|
||||||
|
'name',
|
||||||
|
'tuser_task',
|
||||||
|
'id',
|
||||||
|
$row['id_user_task']
|
||||||
|
);
|
||||||
|
$params = unserialize($row['args']);
|
||||||
|
$id_report = ($row['id_report'] ?? $params[0]);
|
||||||
|
$report_name = db_get_value(
|
||||||
|
'name',
|
||||||
|
'treport',
|
||||||
|
'id_report',
|
||||||
|
$id_report
|
||||||
|
);
|
||||||
|
$data = [];
|
||||||
|
$data[0] = ($row['name'] ?? __('No name'));
|
||||||
|
$data[1] = $report_name;
|
||||||
|
$data[2] = $function_name;
|
||||||
|
$data[3] = date('Y/m/d H:i:s', $params['first_execution']);
|
||||||
|
$data[4] = cron_get_scheduled_string($row['scheduled']);
|
||||||
|
$data[5] = '';
|
||||||
|
if (check_acl($config['id_user'], 0, 'RW')) {
|
||||||
|
$data[5] .= html_print_anchor(
|
||||||
|
[
|
||||||
|
'href' => ui_get_full_url(
|
||||||
|
sprintf(
|
||||||
|
'index.php?sec=reporting&sec2=godmode/reporting/manage_schedule&id_task=%s',
|
||||||
|
$row['id']
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'content' => html_print_image(
|
||||||
|
'images/edit.svg',
|
||||||
|
true,
|
||||||
|
[
|
||||||
|
'title' => __('Edit'),
|
||||||
|
'class' => 'main_menu_icon invert_filter',
|
||||||
|
]
|
||||||
|
),
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
|
$data[5] .= html_print_anchor(
|
||||||
|
[
|
||||||
|
'href' => sprintf(
|
||||||
|
'index.php?sec=custom_report&sec2=godmode/reporting/schedule&delete_task=%s',
|
||||||
|
$row['id']
|
||||||
|
),
|
||||||
|
'onClick' => 'if (!confirm(\''.__('Are you sure?').'\')) return false;',
|
||||||
|
'content' => html_print_image(
|
||||||
|
'images/delete.svg',
|
||||||
|
true,
|
||||||
|
[
|
||||||
|
'title' => __('Delete'),
|
||||||
|
'class' => 'main_menu_icon invert_filter',
|
||||||
|
]
|
||||||
|
),
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
array_push($table->data, $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
html_print_table($table);
|
||||||
|
} else {
|
||||||
|
ui_print_info_message(
|
||||||
|
__('No data to show')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (check_acl($config['id_user'], 0, 'RW') || check_acl($config['id_user'], 0, 'RM')
|
||||||
|
) {
|
||||||
|
$buttonsOutput = [];
|
||||||
|
// Create form.
|
||||||
|
$buttonsOutput[] = '<form method="post" action="index.php?sec=reporting&sec2=godmode/reporting/manage_schedule">';
|
||||||
|
$buttonsOutput[] = html_print_submit_button(
|
||||||
|
__('Create report'),
|
||||||
|
'create',
|
||||||
|
false,
|
||||||
|
[ 'icon' => 'next' ],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
$buttonsOutput[] = '</form>';
|
||||||
|
|
||||||
|
echo html_print_action_buttons(
|
||||||
|
implode('', $buttonsOutput),
|
||||||
|
[
|
||||||
|
'type' => 'form_action',
|
||||||
|
'right_content' => $tablePagination,
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
}
|
@ -85,6 +85,7 @@ enterprise_include_once('godmode/setup/setup.php');
|
|||||||
$section = (string) get_parameter('section', 'general');
|
$section = (string) get_parameter('section', 'general');
|
||||||
|
|
||||||
$buttons = [];
|
$buttons = [];
|
||||||
|
$menu_tabs = [];
|
||||||
|
|
||||||
// Draws header.
|
// Draws header.
|
||||||
$buttons['general'] = [
|
$buttons['general'] = [
|
||||||
@ -99,9 +100,22 @@ $buttons['general'] = [
|
|||||||
]
|
]
|
||||||
).'</a>',
|
).'</a>',
|
||||||
];
|
];
|
||||||
|
$menu_tab_url = '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=general').'">'.__('General setup').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
if (enterprise_installed()) {
|
if (enterprise_installed()) {
|
||||||
$buttons = setup_enterprise_add_Tabs($buttons);
|
$buttons = setup_enterprise_add_Tabs($buttons);
|
||||||
|
$menu_tab_url = '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=enterprise').'">'.__('Enterprise').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
$menu_tab_url = '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=pass').'">'.__('Password').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
$menu_tab_url = '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=hist_db').'">'.__('History database').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
|
if ($config['log_collector']) {
|
||||||
|
$menu_tab_url = '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=log').'">'.__('Log collector').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$buttons['auth'] = [
|
$buttons['auth'] = [
|
||||||
@ -115,6 +129,8 @@ $buttons['auth'] = [
|
|||||||
]
|
]
|
||||||
).'</a>',
|
).'</a>',
|
||||||
];
|
];
|
||||||
|
$menu_tab_url = '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup&section=auth').'">'.__('Authentication').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
$buttons['perf'] = [
|
$buttons['perf'] = [
|
||||||
'active' => false,
|
'active' => false,
|
||||||
@ -127,6 +143,8 @@ $buttons['perf'] = [
|
|||||||
]
|
]
|
||||||
).'</a>',
|
).'</a>',
|
||||||
];
|
];
|
||||||
|
$menu_tab_url = '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup&section=perf').'">'.__('Performance').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
$buttons['vis'] = [
|
$buttons['vis'] = [
|
||||||
'active' => false,
|
'active' => false,
|
||||||
@ -139,6 +157,8 @@ $buttons['vis'] = [
|
|||||||
]
|
]
|
||||||
).'</a>',
|
).'</a>',
|
||||||
];
|
];
|
||||||
|
$menu_tab_url = '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup&section=vis').'">'.__('Visual styles').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
if (check_acl($config['id_user'], 0, 'AW')) {
|
if (check_acl($config['id_user'], 0, 'AW')) {
|
||||||
if ($config['activate_netflow']) {
|
if ($config['activate_netflow']) {
|
||||||
@ -153,6 +173,8 @@ if (check_acl($config['id_user'], 0, 'AW')) {
|
|||||||
]
|
]
|
||||||
).'</a>',
|
).'</a>',
|
||||||
];
|
];
|
||||||
|
$menu_tab_url = '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup&section=net').'">'.__('Netflow').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($config['activate_sflow']) {
|
if ($config['activate_sflow']) {
|
||||||
@ -167,6 +189,8 @@ if (check_acl($config['id_user'], 0, 'AW')) {
|
|||||||
]
|
]
|
||||||
).'</a>',
|
).'</a>',
|
||||||
];
|
];
|
||||||
|
$menu_tab_url = '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup&section=sflow').'">'.__('Sflow').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -181,6 +205,8 @@ $buttons['ITSM'] = [
|
|||||||
]
|
]
|
||||||
).'</a>',
|
).'</a>',
|
||||||
];
|
];
|
||||||
|
$menu_tab_url = '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=ITSM').'">'.__('ITSM').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
$buttons['ehorus'] = [
|
$buttons['ehorus'] = [
|
||||||
'active' => false,
|
'active' => false,
|
||||||
@ -193,6 +219,8 @@ $buttons['ehorus'] = [
|
|||||||
]
|
]
|
||||||
).'</a>',
|
).'</a>',
|
||||||
];
|
];
|
||||||
|
$menu_tab_url = '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=pandorarc').'">'.__('Pandora RC').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
if (check_acl($config['id_user'], 0, 'PM') && enterprise_installed()) {
|
if (check_acl($config['id_user'], 0, 'PM') && enterprise_installed()) {
|
||||||
$buttons['module_library'] = [
|
$buttons['module_library'] = [
|
||||||
@ -206,6 +234,8 @@ if (check_acl($config['id_user'], 0, 'PM') && enterprise_installed()) {
|
|||||||
]
|
]
|
||||||
).'</a>',
|
).'</a>',
|
||||||
];
|
];
|
||||||
|
$menu_tab_url = '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=module_library').'">'.__('Module Library').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: Not definitive icon
|
// FIXME: Not definitive icon
|
||||||
@ -220,6 +250,8 @@ $buttons['notifications'] = [
|
|||||||
]
|
]
|
||||||
).'</a>',
|
).'</a>',
|
||||||
];
|
];
|
||||||
|
$menu_tab_url = '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=notifications').'">'.__('Notifications').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
$buttons['quickshell'] = [
|
$buttons['quickshell'] = [
|
||||||
'active' => false,
|
'active' => false,
|
||||||
@ -232,21 +264,29 @@ $buttons['quickshell'] = [
|
|||||||
]
|
]
|
||||||
).'</a>',
|
).'</a>',
|
||||||
];
|
];
|
||||||
|
$menu_tab_url = '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=quickshell').'">'.__('QuickShell').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
$buttons['external_tools'] = [
|
$buttons['external_tools'] = [
|
||||||
'active' => false,
|
'active' => false,
|
||||||
'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=external_tools').'">'.html_print_image('images/nettool.png', true, ['title' => __('External Tools'), 'class' => 'invert_filter']).'</a>',
|
'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=external_tools').'">'.html_print_image('images/nettool.png', true, ['title' => __('External Tools'), 'class' => 'invert_filter']).'</a>',
|
||||||
];
|
];
|
||||||
|
$menu_tab_url = '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=external_tools').'">'.__('External Tools').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
$buttons['welcome_tips'] = [
|
$buttons['welcome_tips'] = [
|
||||||
'active' => false,
|
'active' => false,
|
||||||
'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=welcome_tips').'">'.html_print_image('images/inventory.png', true, ['title' => __('Welcome tips'), 'class' => 'invert_filter']).'</a>',
|
'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=welcome_tips').'">'.html_print_image('images/inventory.png', true, ['title' => __('Welcome tips'), 'class' => 'invert_filter']).'</a>',
|
||||||
];
|
];
|
||||||
|
$menu_tab_url = '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=welcome_tips').'">'.__('Welcome tips').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
$buttons['demo_data'] = [
|
$buttons['demo_data'] = [
|
||||||
'active' => false,
|
'active' => false,
|
||||||
'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=demo_data').'">'.html_print_image('images/demo_data.png', true, ['title' => __('Demo data'), 'class' => 'invert_filter']).'</a>',
|
'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=demo_data').'">'.html_print_image('images/demo_data.png', true, ['title' => __('Demo data'), 'class' => 'invert_filter']).'</a>',
|
||||||
];
|
];
|
||||||
|
$menu_tab_url = '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=demo_data').'">'.__('Demo data').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
if ($config['activate_gis']) {
|
if ($config['activate_gis']) {
|
||||||
$buttons['gis'] = [
|
$buttons['gis'] = [
|
||||||
@ -260,6 +300,8 @@ if ($config['activate_gis']) {
|
|||||||
]
|
]
|
||||||
).'</a>',
|
).'</a>',
|
||||||
];
|
];
|
||||||
|
$menu_tab_url = '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=gis').'">'.__('GIS Map connection').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
}
|
}
|
||||||
|
|
||||||
$help_header = '';
|
$help_header = '';
|
||||||
@ -386,26 +428,6 @@ switch ($section) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$menu_tabs = [];
|
|
||||||
// Agent details.
|
|
||||||
$menu_tab_url = '<a href="index.php?sec=gsetup&sec2=godmode/setup/setup§ion=general">'.__('General setup').'</a>';
|
|
||||||
array_push($menu_tabs, $menu_tab_url);
|
|
||||||
// Agent details.
|
|
||||||
$menu_tab_url = '<a href="index.php?sec=view&sec2=operation/agentes/estado_agente">'.__('Agent detail').'</a>';
|
|
||||||
array_push($menu_tabs, $menu_tab_url);
|
|
||||||
|
|
||||||
// Manage agents.
|
|
||||||
$menu_tab_url = '<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente">'.__('Manage agents').'</a>';
|
|
||||||
array_push($menu_tabs, $menu_tab_url);
|
|
||||||
|
|
||||||
// Events.
|
|
||||||
$menu_tab_url = '<a href="index.php?sec=eventos&sec2=operation/events/events">'.__('View events').'</a>';
|
|
||||||
array_push($menu_tabs, $menu_tab_url);
|
|
||||||
|
|
||||||
// Events.
|
|
||||||
$menu_tab_url = '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder">'.__('Custom reports').'</a>';
|
|
||||||
array_push($menu_tabs, $menu_tab_url);
|
|
||||||
|
|
||||||
$dots = dot_tab($menu_tabs);
|
$dots = dot_tab($menu_tabs);
|
||||||
|
|
||||||
// Header.
|
// Header.
|
||||||
|
@ -123,7 +123,7 @@ $table_remote->data['ITSM_user_level_conf'] = $row;
|
|||||||
$row = [];
|
$row = [];
|
||||||
$row['hostname'] = html_print_label_input_block(
|
$row['hostname'] = html_print_label_input_block(
|
||||||
__('URL to Pandora ITSM setup').ui_print_help_tip(
|
__('URL to Pandora ITSM setup').ui_print_help_tip(
|
||||||
__('Full URL to your Pandora ITSM setup (e.g., http://192.168.1.20/integria/api/v1).'),
|
__('Full URL to your Pandora ITSM setup (e.g., http://192.168.1.20/integria/api/v2).'),
|
||||||
true
|
true
|
||||||
),
|
),
|
||||||
html_print_input_text(
|
html_print_input_text(
|
||||||
|
@ -76,7 +76,7 @@ class Applications extends Wizard
|
|||||||
$this->msg = $msg;
|
$this->msg = $msg;
|
||||||
$this->icon = $icon;
|
$this->icon = $icon;
|
||||||
$this->class = $class_style;
|
$this->class = $class_style;
|
||||||
$this->label = $label;
|
$this->label = __($label);
|
||||||
$this->page = $page;
|
$this->page = $page;
|
||||||
$this->url = ui_get_full_url(
|
$this->url = ui_get_full_url(
|
||||||
'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=app'
|
'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=app'
|
||||||
|
@ -97,7 +97,7 @@ class Cloud extends Wizard
|
|||||||
$this->task = [];
|
$this->task = [];
|
||||||
$this->msg = $msg;
|
$this->msg = $msg;
|
||||||
$this->icon = $icon;
|
$this->icon = $icon;
|
||||||
$this->label = $label;
|
$this->label = __($label);
|
||||||
$this->page = $page;
|
$this->page = $page;
|
||||||
$this->url = ui_get_full_url(
|
$this->url = ui_get_full_url(
|
||||||
'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=cloud'
|
'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=cloud'
|
||||||
|
@ -90,7 +90,7 @@ class HostDevices extends Wizard
|
|||||||
$this->task = [];
|
$this->task = [];
|
||||||
$this->msg = $msg;
|
$this->msg = $msg;
|
||||||
$this->icon = $icon;
|
$this->icon = $icon;
|
||||||
$this->label = $label;
|
$this->label = __($label);
|
||||||
$this->page = $page;
|
$this->page = $page;
|
||||||
$this->url = ui_get_full_url(
|
$this->url = ui_get_full_url(
|
||||||
'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=hd'
|
'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=hd'
|
||||||
|
@ -129,7 +129,7 @@ class ManageExtensions extends HTML
|
|||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'icon' => $this->icon,
|
'icon' => $this->icon,
|
||||||
'label' => $this->label,
|
'label' => __($this->label),
|
||||||
'url' => $this->url,
|
'url' => $this->url,
|
||||||
|
|
||||||
];
|
];
|
||||||
|
@ -294,7 +294,7 @@ function process_user_login_remote($login, $pass, $api=false)
|
|||||||
$pass,
|
$pass,
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
defined('METACONSOLE'),
|
defined('METACONSOLE') && is_centralized() === false,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -314,6 +314,13 @@ class ConsoleSupervisor
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$this->checkTotalModulesByAgent();
|
$this->checkTotalModulesByAgent();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Check connection with historical DB (if enabled).
|
||||||
|
* NOTIF.HISTORYDB
|
||||||
|
*/
|
||||||
|
|
||||||
|
$this->checkPandoraHistoryDB();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2041,7 +2048,7 @@ class ConsoleSupervisor
|
|||||||
'title' => __('Historical database not available'),
|
'title' => __('Historical database not available'),
|
||||||
'message' => __('Historical database is enabled, though not accessible with the current configuration.'),
|
'message' => __('Historical database is enabled, though not accessible with the current configuration.'),
|
||||||
'url' => '__url__/index.php?sec=general&sec2=godmode/setup/setup§ion=hist_db',
|
'url' => '__url__/index.php?sec=general&sec2=godmode/setup/setup§ion=hist_db',
|
||||||
'icon_notification' => self::ICON_QUESTION,
|
'icon_notification' => self::ICON_ERROR,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1270,6 +1270,7 @@ class Heatmap
|
|||||||
*/
|
*/
|
||||||
public function showHeatmap()
|
public function showHeatmap()
|
||||||
{
|
{
|
||||||
|
global $config;
|
||||||
$result = $this->getData();
|
$result = $this->getData();
|
||||||
|
|
||||||
if (empty($result) === true) {
|
if (empty($result) === true) {
|
||||||
@ -1371,6 +1372,8 @@ class Heatmap
|
|||||||
type: type,
|
type: type,
|
||||||
id: id,
|
id: id,
|
||||||
id_server: server,
|
id_server: server,
|
||||||
|
auth_hash: '<?php echo $this->hash; ?>',
|
||||||
|
id_user: '<?php echo $config['id_user']; ?>'
|
||||||
},
|
},
|
||||||
dataType: 'html',
|
dataType: 'html',
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
|
@ -22,8 +22,8 @@ use DI\ContainerBuilder;
|
|||||||
/*
|
/*
|
||||||
* Pandora build version and version
|
* Pandora build version and version
|
||||||
*/
|
*/
|
||||||
$build_version = 'PC240311';
|
$build_version = 'PC240319';
|
||||||
$pandora_version = 'v7.0NG.775';
|
$pandora_version = 'v7.0NG.776';
|
||||||
|
|
||||||
// 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();
|
||||||
@ -345,7 +345,7 @@ if (empty($container) === true) {
|
|||||||
|
|
||||||
// Solution to load the ContainerBuilder class.
|
// Solution to load the ContainerBuilder class.
|
||||||
$containerBuilder = new ContainerBuilder();
|
$containerBuilder = new ContainerBuilder();
|
||||||
$containerBuilder->addDefinitions(__DIR__.'/../api/v1/config/container.php');
|
$containerBuilder->addDefinitions(__DIR__.'/../api/v2/config/container.php');
|
||||||
|
|
||||||
// Create DI container instance.
|
// Create DI container instance.
|
||||||
$container = $containerBuilder->build();
|
$container = $containerBuilder->build();
|
||||||
|
@ -925,3 +925,6 @@ define('HPUX', '5');
|
|||||||
define('CISCO', '7');
|
define('CISCO', '7');
|
||||||
define('MACOS', '8');
|
define('MACOS', '8');
|
||||||
define('WINDOWS', '9');
|
define('WINDOWS', '9');
|
||||||
|
|
||||||
|
// Alert list.
|
||||||
|
define('AGENT_ALERT_LIMIT', 20);
|
||||||
|
@ -33,7 +33,8 @@ function mysql_connect_db(
|
|||||||
$port=null,
|
$port=null,
|
||||||
$charset=null,
|
$charset=null,
|
||||||
$ssl=null,
|
$ssl=null,
|
||||||
$verify=null
|
$verify=null,
|
||||||
|
$history=false
|
||||||
) {
|
) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
@ -83,11 +84,17 @@ function mysql_connect_db(
|
|||||||
try {
|
try {
|
||||||
$connect_id = mysqli_connect($host, $user, $pass, $db, $port);
|
$connect_id = mysqli_connect($host, $user, $pass, $db, $port);
|
||||||
if (mysqli_connect_errno() > 0) {
|
if (mysqli_connect_errno() > 0) {
|
||||||
|
if ($history === false) {
|
||||||
include 'general/mysqlerr.php';
|
include 'general/mysqlerr.php';
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} catch (\mysqli_sql_exception $e) {
|
} catch (\mysqli_sql_exception $e) {
|
||||||
|
if ($history === false) {
|
||||||
include 'general/mysqlerr.php';
|
include 'general/mysqlerr.php';
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -110,7 +117,10 @@ function mysql_connect_db(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (mysqli_connect_errno() > 0) {
|
if (mysqli_connect_errno() > 0) {
|
||||||
|
if ($history === false) {
|
||||||
include 'general/mysqlerr.php';
|
include 'general/mysqlerr.php';
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -156,7 +166,7 @@ function mysql_db_get_all_rows_sql($sql, $search_history_db=false, $cache=true,
|
|||||||
|
|
||||||
// Connect to the history DB
|
// Connect to the history DB
|
||||||
if (!isset($config['history_db_connection']) || $config['history_db_connection'] === false) {
|
if (!isset($config['history_db_connection']) || $config['history_db_connection'] === false) {
|
||||||
$config['history_db_connection'] = db_connect($config['history_db_host'], $config['history_db_name'], $config['history_db_user'], io_output_password($config['history_db_pass']), $config['history_db_port'], false);
|
$config['history_db_connection'] = db_connect($config['history_db_host'], $config['history_db_name'], $config['history_db_user'], io_output_password($config['history_db_pass']), $config['history_db_port'], false, null, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($config['history_db_connection'] !== false) {
|
if ($config['history_db_connection'] !== false) {
|
||||||
|
@ -6904,7 +6904,9 @@ function get_defined_translation($string)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_array($cache_translation) === true && count($cache_translation) === 0) {
|
if ((isset($config['ignore_cache_translate']) === false || $config['ignore_cache_translate'] !== true)
|
||||||
|
&& is_array($cache_translation) === true && count($cache_translation) === 0
|
||||||
|
) {
|
||||||
$cache_translation_all = db_get_all_rows_sql(
|
$cache_translation_all = db_get_all_rows_sql(
|
||||||
sprintf(
|
sprintf(
|
||||||
'SELECT translation, string
|
'SELECT translation, string
|
||||||
|
@ -4553,6 +4553,7 @@ function agents_get_starmap(
|
|||||||
var randomPoint = getRandomInteger(1, total_modules);
|
var randomPoint = getRandomInteger(1, total_modules);
|
||||||
let target = $(`#rect_${randomPoint}`);
|
let target = $(`#rect_${randomPoint}`);
|
||||||
let class_name = target.attr('class');
|
let class_name = target.attr('class');
|
||||||
|
if(target.length){
|
||||||
class_name = class_name.split('_')[0];
|
class_name = class_name.split('_')[0];
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
target.removeClass();
|
target.removeClass();
|
||||||
@ -4560,6 +4561,7 @@ function agents_get_starmap(
|
|||||||
oneSquare(getRandomInteger(1, 10), getRandomInteger(100, 900));
|
oneSquare(getRandomInteger(1, 10), getRandomInteger(100, 900));
|
||||||
}, time);
|
}, time);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let cont = 0;
|
let cont = 0;
|
||||||
while (cont < Math.ceil(total_modules / 3)) {
|
while (cont < Math.ceil(total_modules / 3)) {
|
||||||
|
@ -87,7 +87,8 @@ function db_connect(
|
|||||||
$pass=null,
|
$pass=null,
|
||||||
$port=null,
|
$port=null,
|
||||||
$critical=true,
|
$critical=true,
|
||||||
$charset=null
|
$charset=null,
|
||||||
|
$history=false,
|
||||||
) {
|
) {
|
||||||
global $config;
|
global $config;
|
||||||
static $error = 0;
|
static $error = 0;
|
||||||
@ -100,7 +101,10 @@ function db_connect(
|
|||||||
$user,
|
$user,
|
||||||
$pass,
|
$pass,
|
||||||
$port,
|
$port,
|
||||||
$charset
|
$charset,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
$history,
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -143,11 +147,13 @@ function db_connect(
|
|||||||
// Display the error once even if multiple
|
// Display the error once even if multiple
|
||||||
// connection attempts are made.
|
// connection attempts are made.
|
||||||
$error = 1;
|
$error = 1;
|
||||||
|
if ($history === false) {
|
||||||
ui_print_error_message(
|
ui_print_error_message(
|
||||||
__('Error connecting to database %s at %s.', $db, $host)
|
__('Error connecting to database %s at %s.', $db, $host)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
@ -151,6 +151,14 @@ function menu_print_menu(&$menu)
|
|||||||
if (empty($operation) === false) {
|
if (empty($operation) === false) {
|
||||||
$sec2 = $sec2.'&operation='.$operation;
|
$sec2 = $sec2.'&operation='.$operation;
|
||||||
}
|
}
|
||||||
|
} else if ($sec2 === 'godmode/reporting/reporting_builder') {
|
||||||
|
$tab = (string) get_parameter('tab', '');
|
||||||
|
$action = (string) get_parameter('action', '');
|
||||||
|
if ($tab === 'template' && $action === 'list_template') {
|
||||||
|
$sec2 = $sec2.'&tab=template&action=list_template';
|
||||||
|
}
|
||||||
|
} else if ($sec2 === 'godmode/reporting/manage_schedule') {
|
||||||
|
$sec2 = 'godmode/reporting/schedule';
|
||||||
} else if ($sec2 === 'godmode/users/configure_user') {
|
} else if ($sec2 === 'godmode/users/configure_user') {
|
||||||
$sec2 = 'godmode/users/user_list';
|
$sec2 = 'godmode/users/user_list';
|
||||||
} else if ($sec2 === 'godmode/modules/manage_inventory_modules_form') {
|
} else if ($sec2 === 'godmode/modules/manage_inventory_modules_form') {
|
||||||
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -164,8 +164,6 @@ class GroupRepositoryMySQL extends RepositoryMySQL implements GroupRepository
|
|||||||
$pagination
|
$pagination
|
||||||
);
|
);
|
||||||
|
|
||||||
hd($sql, true);
|
|
||||||
|
|
||||||
return $sql;
|
return $sql;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ More useful links:
|
|||||||
* bearerFormat="pandoraBearer",
|
* bearerFormat="pandoraBearer",
|
||||||
* ),
|
* ),
|
||||||
* @OA\Server(
|
* @OA\Server(
|
||||||
* url="/api/v1",
|
* url="/api/v2",
|
||||||
* description="PandoraFMS API Server"
|
* description="PandoraFMS API Server"
|
||||||
* ),
|
* ),
|
||||||
* @OA\Tag(
|
* @OA\Tag(
|
||||||
|
@ -25,15 +25,6 @@ final class UserTokenMiddleware
|
|||||||
|
|
||||||
public function check(Request $request): bool
|
public function check(Request $request): bool
|
||||||
{
|
{
|
||||||
hd('El server UUID:', true);
|
|
||||||
hd($this->config->get('server_unique_identifier'), true);
|
|
||||||
|
|
||||||
hd('El api pass es:', true);
|
|
||||||
hd($this->config->get('api_password'), true);
|
|
||||||
|
|
||||||
hd('El token de md5 con el que se puede loguear: ', true);
|
|
||||||
hd(md5($this->config->get('server_unique_identifier')).'-'.md5($this->config->get('api_password')), true);
|
|
||||||
|
|
||||||
$authorization = ($request->getHeader('Authorization')[0] ?? '');
|
$authorization = ($request->getHeader('Authorization')[0] ?? '');
|
||||||
|
|
||||||
$token = null;
|
$token = null;
|
||||||
@ -46,6 +37,9 @@ final class UserTokenMiddleware
|
|||||||
);
|
);
|
||||||
|
|
||||||
$uuid = ($matches[0] ?? '');
|
$uuid = ($matches[0] ?? '');
|
||||||
|
if (empty($uuid) === true) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
$strToken = str_replace($uuid.'-', '', $authorization);
|
$strToken = str_replace($uuid.'-', '', $authorization);
|
||||||
$validTokenUiniqueServerIdentifier = $this->validateServerIdentifierTokenService->__invoke($strToken);
|
$validTokenUiniqueServerIdentifier = $this->validateServerIdentifierTokenService->__invoke($strToken);
|
||||||
if ($validTokenUiniqueServerIdentifier === false) {
|
if ($validTokenUiniqueServerIdentifier === false) {
|
||||||
@ -64,7 +58,7 @@ final class UserTokenMiddleware
|
|||||||
$token = null;
|
$token = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($token !== null) {
|
if ($token !== null && $validToken) {
|
||||||
if (session_status() === PHP_SESSION_NONE) {
|
if (session_status() === PHP_SESSION_NONE) {
|
||||||
session_start();
|
session_start();
|
||||||
}
|
}
|
||||||
|
@ -228,29 +228,29 @@ class GeneralTacticalView
|
|||||||
|
|
||||||
if ($name !== '') {
|
if ($name !== '') {
|
||||||
$emojiOptions = [
|
$emojiOptions = [
|
||||||
'have_good_day' => __('Have a good day %s ✌', $name),
|
'have_good_day' => __('Have a good day %s', $name).' ✌',
|
||||||
'welcome_back' => __('Welcome back! %s 👋', $name),
|
'welcome_back' => __('Welcome back! %s', $name).' 👋',
|
||||||
'merry_christmas' => __('Welcome back! %s 🎅', $name),
|
'merry_christmas' => __('Welcome back! %s', $name).' 🎅',
|
||||||
'good_morning' => __('Good morning, %s! ☕', $name),
|
'good_morning' => __('Good morning, %s!', $name).' ☕',
|
||||||
'good_evening' => __('Good evening, %s 🌇', $name),
|
'good_evening' => __('Good evening, %s', $name).' 🌇',
|
||||||
'good_night' => __('Good night, %s 🌕', $name),
|
'good_night' => __('Good night, %s', $name).' 🌕',
|
||||||
'happy_summer' => __('Happy summer, %s 🌞', $name),
|
'happy_summer' => __('Happy summer, %s', $name).' 🌞',
|
||||||
'happy_winter' => __('Happy winter, %s ⛄', $name),
|
'happy_winter' => __('Happy winter, %s', $name).' ⛄',
|
||||||
'happy_autumn' => __('Happy autumn, %s 🍂', $name),
|
'happy_autumn' => __('Happy autumn, %s', $name).' 🍂',
|
||||||
'happy_spring' => __('Happy spring, %s 🌻', $name),
|
'happy_spring' => __('Happy spring, %s', $name).' 🌻',
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
$emojiOptions = [
|
$emojiOptions = [
|
||||||
'have_good_day' => __('Have a good day ✌'),
|
'have_good_day' => __('Have a good day').' ✌',
|
||||||
'welcome_back' => __('Welcome back! 👋'),
|
'welcome_back' => __('Welcome back!').' 👋',
|
||||||
'merry_christmas' => __('Welcome back! 🎅'),
|
'merry_christmas' => __('Welcome back!').' 🎅',
|
||||||
'good_morning' => __('Good morning! ☕'),
|
'good_morning' => __('Good morning!').' ☕',
|
||||||
'good_evening' => __('Good evening 🌇'),
|
'good_evening' => __('Good evening').' 🌇',
|
||||||
'good_night' => __('Good night 🌕'),
|
'good_night' => __('Good night').' 🌕',
|
||||||
'happy_summer' => __('Happy summer 🌞'),
|
'happy_summer' => __('Happy summer').' 🌞',
|
||||||
'happy_winter' => __('Happy winter ⛄'),
|
'happy_winter' => __('Happy winter').' ⛄',
|
||||||
'happy_autumn' => __('Happy autumn 🍂'),
|
'happy_autumn' => __('Happy autumn').' 🍂',
|
||||||
'happy_spring' => __('Happy spring 🌻'),
|
'happy_spring' => __('Happy spring').' 🌻',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13722,7 +13722,7 @@ button.disabled {
|
|||||||
border: 0px;
|
border: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-draggable-handle {
|
#graph_analytics .ui-draggable-handle {
|
||||||
z-index: 2 !important;
|
z-index: 2 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,8 +130,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div style='padding-bottom: 50px'>
|
<div style='padding-bottom: 50px'>
|
||||||
<?php
|
<?php
|
||||||
$version = '7.0NG.775';
|
$version = '7.0NG.776';
|
||||||
$build = '240311';
|
$build = '240319';
|
||||||
$banner = "v$version Build $build";
|
$banner = "v$version Build $build";
|
||||||
error_reporting(0);
|
error_reporting(0);
|
||||||
|
|
||||||
|
@ -363,6 +363,13 @@ if (isset($agent_view_page) === false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($agent_view_page === true) {
|
if ($agent_view_page === true) {
|
||||||
|
$alerts_count = alerts_get_alerts(0, '', 'all', -1, true, true, $agent['id_agente']);
|
||||||
|
$disabled_alert = false;
|
||||||
|
// Optimal limit to display alerts.
|
||||||
|
if ((int) $alerts_count > AGENT_ALERT_LIMIT) {
|
||||||
|
$disabled_alert = true;
|
||||||
|
}
|
||||||
|
|
||||||
ui_print_datatable(
|
ui_print_datatable(
|
||||||
[
|
[
|
||||||
'id' => 'alerts_status_datatable',
|
'id' => 'alerts_status_datatable',
|
||||||
@ -405,7 +412,7 @@ if ($agent_view_page === true) {
|
|||||||
'no_toggle' => true,
|
'no_toggle' => true,
|
||||||
'class' => 'flex',
|
'class' => 'flex',
|
||||||
],
|
],
|
||||||
'start_disabled' => true,
|
'start_disabled' => $disabled_alert,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -505,7 +512,6 @@ $html_content = ob_get_clean();
|
|||||||
|
|
||||||
if ($agent_view_page === true) {
|
if ($agent_view_page === true) {
|
||||||
// Create controlled toggle content.
|
// Create controlled toggle content.
|
||||||
$alerts_count = alerts_get_alerts(0, '', 'all', -1, $true, true, $agent['id_agente']);
|
|
||||||
html_print_div(
|
html_print_div(
|
||||||
[
|
[
|
||||||
'class' => 'agent_details_line',
|
'class' => 'agent_details_line',
|
||||||
|
@ -431,7 +431,7 @@ ui_include_time_picker(true);
|
|||||||
margin = 50;
|
margin = 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
var browserZoomLevel = (Math.round(window.devicePixelRatio * 100)/100);
|
var browserZoomLevel = window.outerWidth / window.innerWidth;
|
||||||
let height = ($('#chart-modal').height() + margin) * browserZoomLevel;
|
let height = ($('#chart-modal').height() + margin) * browserZoomLevel;
|
||||||
let width = 800 * browserZoomLevel;
|
let width = 800 * browserZoomLevel;
|
||||||
window.resizeTo(width, height);
|
window.resizeTo(width, height);
|
||||||
|
@ -1525,6 +1525,7 @@ $tab = get_parameter('tab', 'main');
|
|||||||
|
|
||||||
// Manage tab.
|
// Manage tab.
|
||||||
$managetab = [];
|
$managetab = [];
|
||||||
|
$menu_tabs = [];
|
||||||
|
|
||||||
if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW') === true) {
|
if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW') === true) {
|
||||||
$managetab['text'] = html_print_menu_button(
|
$managetab['text'] = html_print_menu_button(
|
||||||
@ -1538,9 +1539,10 @@ if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW') === true) {
|
|||||||
|
|
||||||
$managetab['active'] = ($tab === 'manage');
|
$managetab['active'] = ($tab === 'manage');
|
||||||
$managetab['godmode'] = 1;
|
$managetab['godmode'] = 1;
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'">'.__('Manage').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Main tab.
|
// Main tab.
|
||||||
$maintab['text'] = html_print_menu_button(
|
$maintab['text'] = html_print_menu_button(
|
||||||
[
|
[
|
||||||
@ -1550,6 +1552,8 @@ $maintab['text'] = html_print_menu_button(
|
|||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agente.'">'.__('Main').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
$maintab['active'] = ($tab === 'main');
|
$maintab['active'] = ($tab === 'main');
|
||||||
|
|
||||||
@ -1579,6 +1583,8 @@ if ($agent_interfaces_count > 0) {
|
|||||||
'class' => 'invert_filter',
|
'class' => 'invert_filter',
|
||||||
]
|
]
|
||||||
).'</a>';
|
).'</a>';
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agente.'&tab=interface">'.__('Interfaces').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
if ($tab === 'interface') {
|
if ($tab === 'interface') {
|
||||||
$interfacetab['active'] = true;
|
$interfacetab['active'] = true;
|
||||||
@ -1596,6 +1602,8 @@ $alerttab['text'] = html_print_menu_button(
|
|||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agente.'&tab=alert">'.__('Alerts').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
$alerttab['active'] = ($tab === 'alert');
|
$alerttab['active'] = ($tab === 'alert');
|
||||||
|
|
||||||
@ -1611,6 +1619,8 @@ if ($inventoryCount > 0) {
|
|||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=inventory&id_agente='.$id_agente.'">'.__('Inventory').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
if ($tab === 'inventory') {
|
if ($tab === 'inventory') {
|
||||||
$inventorytab['active'] = true;
|
$inventorytab['active'] = true;
|
||||||
@ -1624,6 +1634,9 @@ if ((int) $config['license_nms'] !== 1) {
|
|||||||
$collectiontab = enterprise_hook('collection_tab');
|
$collectiontab = enterprise_hook('collection_tab');
|
||||||
if ($collectiontab === ENTERPRISE_NOT_HOOK) {
|
if ($collectiontab === ENTERPRISE_NOT_HOOK) {
|
||||||
$collectiontab = '';
|
$collectiontab = '';
|
||||||
|
} else {
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=collection&id_agente='.$id_agente.'">'.__('Collection').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$collectiontab = '';
|
$collectiontab = '';
|
||||||
@ -1634,6 +1647,9 @@ if ((int) $config['license_nms'] !== 1) {
|
|||||||
$policyTab = enterprise_hook('policy_tab');
|
$policyTab = enterprise_hook('policy_tab');
|
||||||
if ($policyTab === ENTERPRISE_NOT_HOOK) {
|
if ($policyTab === ENTERPRISE_NOT_HOOK) {
|
||||||
$policyTab = '';
|
$policyTab = '';
|
||||||
|
} else {
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=policy&id_agente='.$id_agente.'">'.__('Policies').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Omnishell.
|
// Omnishell.
|
||||||
@ -1643,6 +1659,9 @@ if ($tasks === true) {
|
|||||||
$omnishellTab = enterprise_hook('omnishell_tab');
|
$omnishellTab = enterprise_hook('omnishell_tab');
|
||||||
if ($omnishellTab == -1) {
|
if ($omnishellTab == -1) {
|
||||||
$omnishellTab = '';
|
$omnishellTab = '';
|
||||||
|
} else {
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=omnishell&id_agente='.$id_agente.'">'.__('Omnishell').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1652,6 +1671,9 @@ if ((bool) $modules_wux === true) {
|
|||||||
$wux_console_tab = enterprise_hook('wux_console_tab');
|
$wux_console_tab = enterprise_hook('wux_console_tab');
|
||||||
if ($wux_console_tab === ENTERPRISE_NOT_HOOK) {
|
if ($wux_console_tab === ENTERPRISE_NOT_HOOK) {
|
||||||
$wux_console_tab = '';
|
$wux_console_tab = '';
|
||||||
|
} else {
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=wux_console_tab&id_agente='.$id_agente.'">'.__('WUX Console').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1660,12 +1682,18 @@ if ((bool) $url_route_analyzer === true) {
|
|||||||
$url_route_analyzer_tab = enterprise_hook('url_route_analyzer_tab');
|
$url_route_analyzer_tab = enterprise_hook('url_route_analyzer_tab');
|
||||||
if ($url_route_analyzer_tab === ENTERPRISE_NOT_HOOK) {
|
if ($url_route_analyzer_tab === ENTERPRISE_NOT_HOOK) {
|
||||||
$url_route_analyzer_tab = '';
|
$url_route_analyzer_tab = '';
|
||||||
|
} else {
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=url_route_analyzer_tab&id_agente='.$id_agente.'">'.__('URL Route Analyzer').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$ncm_tab = enterprise_hook('networkconfigmanager_console_tab');
|
$ncm_tab = enterprise_hook('networkconfigmanager_console_tab');
|
||||||
if ($ncm_tab === ENTERPRISE_NOT_HOOK) {
|
if ($ncm_tab === ENTERPRISE_NOT_HOOK) {
|
||||||
$ncm_tab = '';
|
$ncm_tab = '';
|
||||||
|
} else if (isset($ncm)) {
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=ncm&id_agente='.$id_agente.'">'.__('Network config manager').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
}
|
}
|
||||||
|
|
||||||
// GIS tab.
|
// GIS tab.
|
||||||
@ -1680,6 +1708,9 @@ if ((bool) $config['activate_gis'] === true) {
|
|||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=gis&id_agente='.$id_agente.'">'.__('GIS data').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
$gistab['active'] = ($tab === 'gis');
|
$gistab['active'] = ($tab === 'gis');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1706,6 +1737,9 @@ if ((bool) $config['ITSM_enabled'] === true) {
|
|||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=gagente&sec2=operation/agentes/ver_agente&tab=incident&id_agente='.$id_agente.'">'.__('Incidents').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
$incidenttab['active'] = ($tab === 'incident');
|
$incidenttab['active'] = ($tab === 'incident');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1720,6 +1754,8 @@ if (empty($agent['url_address']) === false) {
|
|||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=gagente&sec2=operation/agentes/ver_agente&tab=url_address&id_agente='.$id_agente.'">'.__('Url address').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
}
|
}
|
||||||
|
|
||||||
$urladdresstab['active'] = ($tab === 'url_address');
|
$urladdresstab['active'] = ($tab === 'url_address');
|
||||||
@ -1733,6 +1769,8 @@ $custom_fields['text'] = html_print_menu_button(
|
|||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=custom_fields&id_agente='.$id_agente.'">'.__('Custom fields').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
$custom_fields['active'] = ($tab === 'custom_fields');
|
$custom_fields['active'] = ($tab === 'custom_fields');
|
||||||
|
|
||||||
@ -1746,6 +1784,8 @@ $graphs['text'] = html_print_menu_button(
|
|||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=graphs&id_agente='.$id_agente.'">'.__('Graphs').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
$graphs['active'] = ($tab === 'graphs');
|
$graphs['active'] = ($tab === 'graphs');
|
||||||
|
|
||||||
@ -1764,6 +1804,8 @@ if (enterprise_installed() === true && (bool) $config['log_collector'] === true)
|
|||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=log_viewer&id_agente='.$id_agente.'">'.__('Log Viewer').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
$log_viewer_tab['active'] = ($tab === 'log_viewer');
|
$log_viewer_tab['active'] = ($tab === 'log_viewer');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1791,6 +1833,8 @@ if ((bool) $config['ehorus_enabled'] === true && empty($config['ehorus_custom_fi
|
|||||||
'class' => 'invert_filter',
|
'class' => 'invert_filter',
|
||||||
]
|
]
|
||||||
).'</a>';
|
).'</a>';
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=ehorus&id_agente='.$id_agente.'">'.__('Pandora RC').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
// Hidden subtab layer.
|
// Hidden subtab layer.
|
||||||
$ehorus_tab['sub_menu'] = '<ul class="mn subsubmenu float-none">';
|
$ehorus_tab['sub_menu'] = '<ul class="mn subsubmenu float-none">';
|
||||||
@ -1866,6 +1910,8 @@ if ($is_sap === true) {
|
|||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=sap_view&page=1&id_agente='.$id_agente.'">'.__('SAP view').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
$saptab['active'] = ($tab === 'sap_view');
|
$saptab['active'] = ($tab === 'sap_view');
|
||||||
} else {
|
} else {
|
||||||
@ -1881,6 +1927,8 @@ $external_tools['text'] = html_print_menu_button(
|
|||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=external_tools&id_agente='.$id_agente.'">'.__('External Tools').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
$external_tools['active'] = ($tab === 'external_tools');
|
$external_tools['active'] = ($tab === 'external_tools');
|
||||||
|
|
||||||
@ -1893,6 +1941,8 @@ if (enterprise_installed() === true && security_hardening_installed() === true)
|
|||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=security_hardening&id_agente='.$id_agente.'">'.__('Security hardening').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
$security_hardening['active'] = ($tab === 'security_hardening');
|
$security_hardening['active'] = ($tab === 'security_hardening');
|
||||||
}
|
}
|
||||||
@ -1911,6 +1961,8 @@ if (function_exists('vulnerabilities_last_scan_agent') === true) {
|
|||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
$menu_tab_url = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=vulnerabilities&id_agente='.$id_agente.'">'.__('Vulnerabilities').'</a>';
|
||||||
|
array_push($menu_tabs, $menu_tab_url);
|
||||||
|
|
||||||
$vulnerabilities['active'] = ($tab === 'vulnerabilities');
|
$vulnerabilities['active'] = ($tab === 'vulnerabilities');
|
||||||
}
|
}
|
||||||
@ -2131,26 +2183,6 @@ switch ($tab) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((bool) $config['pure'] === false) {
|
if ((bool) $config['pure'] === false) {
|
||||||
$menu_tabs = [];
|
|
||||||
// Agent details.
|
|
||||||
$menu_tab_url = '<a href="index.php?sec=gsetup&sec2=godmode/setup/setup§ion=general">'.__('General setup').'</a>';
|
|
||||||
array_push($menu_tabs, $menu_tab_url);
|
|
||||||
// Agent details.
|
|
||||||
$menu_tab_url = '<a href="index.php?sec=view&sec2=operation/agentes/estado_agente">'.__('Agent detail').'</a>';
|
|
||||||
array_push($menu_tabs, $menu_tab_url);
|
|
||||||
|
|
||||||
// Manage agents.
|
|
||||||
$menu_tab_url = '<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente">'.__('Manage agents').'</a>';
|
|
||||||
array_push($menu_tabs, $menu_tab_url);
|
|
||||||
|
|
||||||
// Events.
|
|
||||||
$menu_tab_url = '<a href="index.php?sec=eventos&sec2=operation/events/events">'.__('View events').'</a>';
|
|
||||||
array_push($menu_tabs, $menu_tab_url);
|
|
||||||
|
|
||||||
// Events.
|
|
||||||
$menu_tab_url = '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder">'.__('Custom reports').'</a>';
|
|
||||||
array_push($menu_tabs, $menu_tab_url);
|
|
||||||
|
|
||||||
$dots = dot_tab($menu_tabs);
|
$dots = dot_tab($menu_tabs);
|
||||||
ui_print_standard_header(
|
ui_print_standard_header(
|
||||||
__('Agent main view').' ( '.strtolower(agents_get_alias($id_agente)).' )',
|
__('Agent main view').' ( '.strtolower(agents_get_alias($id_agente)).' )',
|
||||||
|
@ -51,6 +51,8 @@ $height = get_parameter('height', 0);
|
|||||||
$width = get_parameter('width', 0);
|
$width = get_parameter('width', 0);
|
||||||
$search = get_parameter('search', '');
|
$search = get_parameter('search', '');
|
||||||
$filter = get_parameter('filter', []);
|
$filter = get_parameter('filter', []);
|
||||||
|
$hash = get_parameter('auth_hash', '');
|
||||||
|
|
||||||
if (is_array($filter) === false) {
|
if (is_array($filter) === false) {
|
||||||
$filter = explode(',', $filter);
|
$filter = explode(',', $filter);
|
||||||
}
|
}
|
||||||
@ -233,7 +235,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, $dashboard);
|
$heatmap = new Heatmap($type, $filter, $randomId, $refresh, $width, $height, $search, $group, $dashboard, $hash);
|
||||||
} 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() ]);
|
||||||
@ -261,7 +263,7 @@ if ($is_ajax === true) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Stop any execution.
|
// Stop any execution.
|
||||||
exit;
|
return;
|
||||||
} else {
|
} else {
|
||||||
// Run.
|
// Run.
|
||||||
$heatmap->run();
|
$heatmap->run();
|
||||||
|
@ -460,13 +460,20 @@ if ($access_console_node === true) {
|
|||||||
|
|
||||||
$sub = [];
|
$sub = [];
|
||||||
|
|
||||||
$sub['godmode/reporting/reporting_builder']['text'] = __('Custom reporting');
|
$sub['custom_report']['text'] = __('Custom Reports');
|
||||||
$sub['godmode/reporting/reporting_builder']['id'] = 'Custom_reporting';
|
$sub['custom_report']['id'] = 'Custom_reporting';
|
||||||
// Set godomode path.
|
$sub['custom_report']['type'] = 'direct';
|
||||||
$sub['godmode/reporting/reporting_builder']['subsecs'] = [
|
$sub['custom_report']['subtype'] = 'nolink';
|
||||||
'godmode/reporting/reporting_builder',
|
$sub['custom_report']['refr'] = 0;
|
||||||
'operation/reporting/reporting_viewer',
|
|
||||||
];
|
$sub2 = [];
|
||||||
|
$sub2['godmode/reporting/reporting_builder']['text'] = __('Reports');
|
||||||
|
$sub2['godmode/reporting/reporting_builder&tab=template&action=list_template']['text'] = __('Templates');
|
||||||
|
if (check_acl($config['id_user'], 0, 'RW') || check_acl($config['id_user'], 0, 'RM')) {
|
||||||
|
$sub2['godmode/reporting/schedule']['text'] = __('Schedule');
|
||||||
|
}
|
||||||
|
|
||||||
|
$sub['custom_report']['sub2'] = $sub2;
|
||||||
|
|
||||||
|
|
||||||
$sub['godmode/reporting/graphs']['text'] = __('Custom graphs');
|
$sub['godmode/reporting/graphs']['text'] = __('Custom graphs');
|
||||||
@ -655,9 +662,17 @@ if (!empty($rows)) {
|
|||||||
$menu_operation['links']['sec2'] = '';
|
$menu_operation['links']['sec2'] = '';
|
||||||
$menu_operation['links']['id'] = 'god-links';
|
$menu_operation['links']['id'] = 'god-links';
|
||||||
|
|
||||||
|
$traslations = [
|
||||||
|
'Get support' => __('Get support'),
|
||||||
|
'Report a bug' => __('Report a bug'),
|
||||||
|
'Suggest new feature' => __('Suggest new feature'),
|
||||||
|
];
|
||||||
|
|
||||||
$sub = [];
|
$sub = [];
|
||||||
foreach ($rows as $row) {
|
foreach ($rows as $row) {
|
||||||
$sub[$row['link']]['text'] = __($row['name']);
|
$sub[$row['link']]['text'] = (empty($traslations[$row['name']]) === false)
|
||||||
|
? $traslations[$row['name']]
|
||||||
|
: __($row['name']);
|
||||||
$sub[$row['link']]['id'] = $row['name'];
|
$sub[$row['link']]['id'] = $row['name'];
|
||||||
$sub[$row['link']]['type'] = 'direct';
|
$sub[$row['link']]['type'] = 'direct';
|
||||||
$sub[$row['link']]['subtype'] = 'new_blank';
|
$sub[$row['link']]['subtype'] = 'new_blank';
|
||||||
|
@ -954,6 +954,7 @@ $filters_div = html_print_div(
|
|||||||
|
|
||||||
$graphs_div = html_print_div(
|
$graphs_div = html_print_div(
|
||||||
[
|
[
|
||||||
|
'id' => 'graph_analytics',
|
||||||
'class' => 'padding-div graphs-div-main',
|
'class' => 'padding-div graphs-div-main',
|
||||||
'content' => $right_content,
|
'content' => $right_content,
|
||||||
],
|
],
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
%define __strip /bin/true
|
%define __strip /bin/true
|
||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.775
|
%define version 7.0NG.776
|
||||||
%define release 240311
|
%define release 240319
|
||||||
|
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
%define __strip /bin/true
|
%define __strip /bin/true
|
||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.775
|
%define version 7.0NG.776
|
||||||
%define release 240311
|
%define release 240319
|
||||||
|
|
||||||
# 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.775
|
%define version 7.0NG.776
|
||||||
%define release 240311
|
%define release 240319
|
||||||
%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.775"
|
PI_VERSION="7.0NG.776"
|
||||||
FORCE=0
|
FORCE=0
|
||||||
DESTDIR=""
|
DESTDIR=""
|
||||||
LOG_TIMESTAMP=`date +"%Y/%m/%d %H:%M:%S"`
|
LOG_TIMESTAMP=`date +"%Y/%m/%d %H:%M:%S"`
|
||||||
|
@ -3885,6 +3885,8 @@ CREATE TABLE IF NOT EXISTS `tuser_task_scheduled` (
|
|||||||
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||||
`id_usuario` VARCHAR(255) NOT NULL DEFAULT '0',
|
`id_usuario` VARCHAR(255) NOT NULL DEFAULT '0',
|
||||||
`id_user_task` INT UNSIGNED NOT NULL DEFAULT 0,
|
`id_user_task` INT UNSIGNED NOT NULL DEFAULT 0,
|
||||||
|
`id_report` INT NULL,
|
||||||
|
`name` VARCHAR(255) NULL,
|
||||||
`args` TEXT,
|
`args` TEXT,
|
||||||
`scheduled` ENUM('no','hourly','daily','weekly','monthly','yearly','custom') DEFAULT 'no',
|
`scheduled` ENUM('no','hourly','daily','weekly','monthly','yearly','custom') DEFAULT 'no',
|
||||||
`last_run` INT UNSIGNED DEFAULT 0,
|
`last_run` INT UNSIGNED DEFAULT 0,
|
||||||
|
@ -125,10 +125,10 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
|
|||||||
('custom_report_front_logo', 'images/pandora_logo_white.jpg'),
|
('custom_report_front_logo', 'images/pandora_logo_white.jpg'),
|
||||||
('custom_report_front_header', ''),
|
('custom_report_front_header', ''),
|
||||||
('custom_report_front_footer', ''),
|
('custom_report_front_footer', ''),
|
||||||
('MR', 67),
|
('MR', 68),
|
||||||
('identification_reminder', 1),
|
('identification_reminder', 1),
|
||||||
('identification_reminder_timestamp', 0),
|
('identification_reminder_timestamp', 0),
|
||||||
('current_package', 775),
|
('current_package', 776),
|
||||||
('post_process_custom_values', '{"0.00000038580247":"Seconds to months","0.00000165343915":"Seconds to weeks","0.00001157407407":"Seconds to days","0.01666666666667":"Seconds to minutes","0.00000000093132":"Bytes to Gigabytes","0.00000095367432":"Bytes to Megabytes","0.00097656250000":"Bytes to Kilobytes","0.00000001653439":"Timeticks to weeks","0.00000011574074":"Timeticks to days"}'),
|
('post_process_custom_values', '{"0.00000038580247":"Seconds to months","0.00000165343915":"Seconds to weeks","0.00001157407407":"Seconds to days","0.01666666666667":"Seconds to minutes","0.00000000093132":"Bytes to Gigabytes","0.00000095367432":"Bytes to Megabytes","0.00097656250000":"Bytes to Kilobytes","0.00000001653439":"Timeticks to weeks","0.00000011574074":"Timeticks to days"}'),
|
||||||
('custom_docs_logo', 'default_docs.png'),
|
('custom_docs_logo', 'default_docs.png'),
|
||||||
('custom_support_logo', 'default_support.png'),
|
('custom_support_logo', 'default_support.png'),
|
||||||
@ -2869,7 +2869,7 @@ SET @short_name = 'pandorafms.vmware';
|
|||||||
SET @name = 'VMware';
|
SET @name = 'VMware';
|
||||||
SET @section = 'app';
|
SET @section = 'app';
|
||||||
SET @description = 'Monitor ESXi hosts, datastores and VMs from a specific datacenter';
|
SET @description = 'Monitor ESXi hosts, datastores and VMs from a specific datacenter';
|
||||||
SET @version = '1.2';
|
SET @version = '1.3';
|
||||||
INSERT IGNORE INTO `tdiscovery_apps` (`id_app`, `short_name`, `name`, `section`, `description`, `version`) VALUES ('', @short_name, @name, @section, @description, @version);
|
INSERT IGNORE INTO `tdiscovery_apps` (`id_app`, `short_name`, `name`, `section`, `description`, `version`) VALUES ('', @short_name, @name, @section, @description, @version);
|
||||||
SELECT @id_app := `id_app` FROM `tdiscovery_apps` WHERE `short_name` = @short_name;
|
SELECT @id_app := `id_app` FROM `tdiscovery_apps` WHERE `short_name` = @short_name;
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user