10848-confict

This commit is contained in:
Pablo Aragon 2023-04-16 18:06:54 +02:00
commit 6bc185e148
74 changed files with 1397 additions and 1031 deletions

View File

@ -14,7 +14,7 @@ PANDORA_SERVER_CONF=/etc/pandora/pandora_server.conf
PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
S_VERSION='202302201' S_VERSION='202304111'
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log" LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
# define default variables # define default variables
@ -149,8 +149,8 @@ check_root_permissions
#advicing BETA PROGRAM #advicing BETA PROGRAM
INSTALLING_VER="${green}RRR version enable using RRR PandoraFMS packages${reset}" INSTALLING_VER="${green}RRR version enable using RRR PandoraFMS packages${reset}"
[ "$PANDORA_BETA" -ne '0' ] && INSTALLING_VER="${red}BETA version enable using nightly PandoraFMS packages${reset}"
[ "$PANDORA_LTS" -ne '0' ] && INSTALLING_VER="${green}LTS version enable using LTS PandoraFMS packages${reset}" [ "$PANDORA_LTS" -ne '0' ] && INSTALLING_VER="${green}LTS version enable using LTS PandoraFMS packages${reset}"
[ "$PANDORA_BETA" -ne '0' ] && INSTALLING_VER="${red}BETA version enable using nightly PandoraFMS packages${reset}"
echo -e $INSTALLING_VER echo -e $INSTALLING_VER
# Connectivity # Connectivity
@ -327,12 +327,15 @@ console_dependencies=" \
mod_ssl \ mod_ssl \
libzstd \ libzstd \
openldap-clients \ openldap-clients \
chromium \ http://firefly.artica.es/centos8/chromium-110.0.5481.177-1.el7.x86_64.rpm \
http://firefly.artica.es/centos8/chromium-common-110.0.5481.177-1.el7.x86_64.rpm \
http://firefly.artica.es/centos8/perl-Net-Telnet-3.04-1.el8.noarch.rpm \ http://firefly.artica.es/centos8/perl-Net-Telnet-3.04-1.el8.noarch.rpm \
http://firefly.artica.es/centos7/wmic-1.4-1.el7.x86_64.rpm \ http://firefly.artica.es/centos7/wmic-1.4-1.el7.x86_64.rpm \
http://firefly.artica.es/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm" http://firefly.artica.es/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm"
execute_cmd "dnf install -y $console_dependencies" "Installing Pandora FMS Console dependencies" execute_cmd "dnf install -y $console_dependencies" "Installing Pandora FMS Console dependencies"
# Server dependencies # Server dependencies
server_dependencies=" \ server_dependencies=" \
perl \ perl \
@ -516,9 +519,9 @@ fi
# if beta is enable # if beta is enable
if [ "$PANDORA_BETA" -eq '1' ] ; then if [ "$PANDORA_BETA" -eq '1' ] ; then
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_server-latest.x86_64.rpm" PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_server-latest.x86_64.rpm"
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="https://pandorafms.com/community/community-console-rpm-beta/" PANDORA_CONSOLE_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_console-latest.noarch.rpm"
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm" PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm"
fi fi
# Downloading Pandora Packages # Downloading Pandora Packages

View File

@ -17,7 +17,7 @@ PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
WORKDIR=/opt/pandora/deploy WORKDIR=/opt/pandora/deploy
S_VERSION='202302201' S_VERSION='202304111'
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log" LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
rm -f $LOGFILE &> /dev/null # remove last log before start rm -f $LOGFILE &> /dev/null # remove last log before start
@ -153,8 +153,8 @@ check_root_permissions
#advicing BETA PROGRAM #advicing BETA PROGRAM
INSTALLING_VER="${green}RRR version enable using RRR PandoraFMS packages${reset}" INSTALLING_VER="${green}RRR version enable using RRR PandoraFMS packages${reset}"
[ "$PANDORA_BETA" -ne '0' ] && INSTALLING_VER="${red}BETA version enable using nightly PandoraFMS packages${reset}"
[ "$PANDORA_LTS" -ne '0' ] && INSTALLING_VER="${green}LTS version enable using LTS PandoraFMS packages${reset}" [ "$PANDORA_LTS" -ne '0' ] && INSTALLING_VER="${green}LTS version enable using LTS PandoraFMS packages${reset}"
[ "$PANDORA_BETA" -ne '0' ] && INSTALLING_VER="${red}BETA version enable using nightly PandoraFMS packages${reset}"
echo -e $INSTALLING_VER echo -e $INSTALLING_VER
# Connectivity # Connectivity
@ -304,8 +304,9 @@ ln -s /usr/bin/fping /usr/sbin/fping &>> "$LOGFILE"
# Chrome # Chrome
rm -f /usr/bin/chromium-browser &>> "$LOGFILE" rm -f /usr/bin/chromium-browser &>> "$LOGFILE"
execute_cmd "wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb" "Downloading google chrome" CHROME_VERSION=google-chrome-stable_110.0.5481.177-1_amd64.deb
execute_cmd "apt install -y ./google-chrome-stable_current_amd64.deb" "Intalling google chrome" execute_cmd "wget https://dl.google.com/linux/deb/pool/main/g/google-chrome-stable/${CHROME_VERSION}" "Downloading google chrome"
execute_cmd "apt install -y ./${CHROME_VERSION}" "Intalling google chrome"
execute_cmd "ln -s /usr/bin/google-chrome /usr/bin/chromium-browser" "Creating /usr/bin/chromium-browser Symlink" execute_cmd "ln -s /usr/bin/google-chrome /usr/bin/chromium-browser" "Creating /usr/bin/chromium-browser Symlink"
# SDK VMware perl dependencies # SDK VMware perl dependencies
@ -466,9 +467,9 @@ elif [ "$PANDORA_LTS" -ne '1' ] ; then
fi fi
if [ "$PANDORA_BETA" -eq '1' ] ; then if [ "$PANDORA_BETA" -eq '1' ] ; then
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_server-latest_x86_64.tar.gz" PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_server-latest_x86_64.tar.gz"
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_console-latest.tar.gz" PANDORA_CONSOLE_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_console-latest.tar.gz"
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.tar.gz" PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.tar.gz"
fi fi
# Downloading Pandora Packages # Downloading Pandora Packages

View File

@ -8,265 +8,135 @@ RUN dnf install -y --setopt=tsflags=nodocs \
dnf-utils \ dnf-utils \
http://rpms.remirepo.net/enterprise/remi-release-8.rpm http://rpms.remirepo.net/enterprise/remi-release-8.rpm
RUN dnf module reset -y php && dnf module install -y php:remi-7.4 RUN dnf module reset -y php && dnf module install -y php:remi-8.0
RUN dnf config-manager --set-enabled powertools RUN dnf config-manager --set-enabled powertools
# Install console dependencies # Install console dependencies
RUN dnf install -y --setopt=tsflags=nodocs \ RUN dnf install -y --setopt=tsflags=nodocs \
php \ php \
php-mcrypt \php-cli \ postfix \
php-gd \ php-mcrypt \
php-curl \ php-cli \
php-session \ php-gd \
php-mysqlnd \ php-curl \
php-ldap \ php-session \
php-zip \ php-mysqlnd \
php-zlib \ php-ldap \
php-fileinfo \ php-zip \
php-gettext \ php-zlib \
php-snmp \ php-fileinfo \
php-mbstring \ php-gettext \
php-pecl-zip \ php-snmp \
php-xmlrpc \ php-mbstring \
libxslt \ php-pecl-zip \
wget \ php-xmlrpc \
php-xml \ libxslt \
httpd \ wget \
mod_php \ php-xml \
atk \ httpd \
avahi-libs \ mod_php \
cairo \ atk \
cups-libs \ avahi-libs \
fribidi \ cairo \
gd \ cups-libs \
gdk-pixbuf2 \ fribidi \
ghostscript \ gd \
graphite2 \ gdk-pixbuf2 \
graphviz \ ghostscript \
gtk2 \ graphite2 \
harfbuzz \ graphviz \
hicolor-icon-theme \ gtk2 \
hwdata \ harfbuzz \
jasper-libs \ hicolor-icon-theme \
lcms2 \ hwdata \
libICE \ jasper-libs \
libSM \ lcms2 \
libXaw \ libICE \
libXcomposite \ libSM \
libXcursor \ libXaw \
libXdamage \ libXcomposite \
libXext \ libXcursor \
libXfixes \ libXdamage \
libXft \ libXext \
libXi \ libXfixes \
libXinerama \ libXft \
libXmu \ libXi \
libXrandr \ libXinerama \
libXrender \ libXmu \
libXt \ libXrandr \
libXxf86vm \ libXrender \
libcroco \ libXt \
libdrm \ libXxf86vm \
libfontenc \ libcroco \
libglvnd \ libdrm \
libglvnd-egl \ libfontenc \
libglvnd-glx \ libglvnd \
libpciaccess \ libglvnd-egl \
librsvg2 \ libglvnd-glx \
libthai \ libpciaccess \
libtool-ltdl \ librsvg2 \
libwayland-client \ libthai \
libwayland-server \ libtool-ltdl \
libxshmfence \ libwayland-client \
mesa-libEGL \ libwayland-server \
mesa-libGL \ libxshmfence \
mesa-libgbm \ mesa-libEGL \
mesa-libglapi \ mesa-libGL \
pango \ mesa-libgbm \
pixman \ mesa-libglapi \
nfdump \ pango \
xorg-x11-fonts-75dpi \ pixman \
xorg-x11-fonts-misc \ xorg-x11-fonts-75dpi \
poppler-data \ xorg-x11-fonts-misc \
php-yaml poppler-data \
php-yaml \
libzstd \
openldap-clients \
http://firefly.artica.es/centos8/chromium-110.0.5481.177-1.el7.x86_64.rpm \
http://firefly.artica.es/centos8/chromium-common-110.0.5481.177-1.el7.x86_64.rpm \
http://firefly.artica.es/centos8/perl-Net-Telnet-3.04-1.el8.noarch.rpm \
http://firefly.artica.es/centos7/wmic-1.4-1.el7.x86_64.rpm \
http://firefly.artica.es/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm
RUN mkdir -p /run/php-fpm/ ; chown -R root:apache /run/php-fpm/ RUN mkdir -p /run/php-fpm/ ; chown -R root:apache /run/php-fpm/
# Not installed perl-Net-Telnet gtk-update-icon-cach ghostscript-fonts # Not installed perl-Net-Telnet gtk-update-icon-cach ghostscript-fonts
# Install server dependencies # Install server dependencies
RUN dnf install -y --setopt=tsflags=nodocs \
RUN dnf install -y --setopt=tsflags=nodocs \ perl \
GeoIP \ vim \
GeoIP-GeoLite-data \ fping \
dwz \ perl-IO-Compress \
efi-srpm-macros \ nmap \
ghc-srpm-macros \ sudo \
go-srpm-macros \ perl-Time-HiRes \
ocaml-srpm-macros \ nfdump \
openblas-srpm-macros \ net-snmp-utils \
perl \ "perl(NetAddr::IP)" \
perl-Algorithm-Diff \ "perl(Sys::Syslog)" \
perl-Archive-Tar \ "perl(DBI)" \
perl-Archive-Zip \ "perl(XML::Simple)" \
perl-Attribute-Handlers \ "perl(Geo::IP)" \
perl-B-Debug \ "perl(IO::Socket::INET6)" \
perl-CPAN \ "perl(XML::Twig)" \
perl-CPAN-Meta \ expect \
perl-CPAN-Meta-Requirements \ openssh-clients \
perl-CPAN-Meta-YAML \ java \
perl-Compress-Bzip2 \ bind-utils \
perl-Config-Perl-V \ whois \
perl-DBD-MySQL \ libnsl \
perl-DBI \ http://firefly.artica.es/centos7/xprobe2-0.3-12.2.x86_64.rpm \
perl-DB_File \ http://firefly.artica.es/centos7/wmic-1.4-1.el7.x86_64.rpm \
perl-Data-Dump \ https://firefly.artica.es/centos8/pandorawmic-1.0.0-1.x86_64.rpm ; dnf clean all
perl-Data-OptList \
perl-Data-Section \
perl-Devel-PPPort \
perl-Devel-Peek \
perl-Devel-SelfStubber \
perl-Devel-Size \
perl-Digest-HMAC \
perl-Digest-SHA \
perl-Encode-Locale \
perl-Encode-devel \
perl-Env \
perl-ExtUtils-CBuilder \
perl-ExtUtils-Command \
perl-ExtUtils-Embed \
perl-ExtUtils-Install \
perl-ExtUtils-MM-Utils \
perl-ExtUtils-MakeMaker \
perl-ExtUtils-Manifest \
perl-ExtUtils-Miniperl \
perl-ExtUtils-ParseXS \
perl-File-Fetch \
perl-File-HomeDir \
perl-File-Listing \
perl-File-Which \
perl-Filter \
perl-Filter-Simple \
perl-Geo-IP \
perl-HTML-Parser \
perl-HTML-Tagset \
perl-HTML-Tree \
perl-HTTP-Cookies \
perl-HTTP-Date \
perl-HTTP-Message \
perl-HTTP-Negotiate \
perl-IO-HTML \
perl-IO-Socket-INET6 \
perl-IO-Zlib \
perl-IO-stringy \
perl-IPC-Cmd \
perl-IPC-SysV \
perl-IPC-System-Simple \
perl-JSON \
perl-JSON-PP \
perl-LWP-MediaTypes \
perl-Locale-Codes \
perl-Locale-Maketext \
perl-Locale-Maketext-Simple \
perl-MRO-Compat \
perl-Math-BigInt \
perl-Math-BigInt-FastCalc \
perl-Math-BigRat \
perl-Memoize \
perl-Module-Build \
perl-Module-CoreList \
perl-Module-CoreList-tools \
perl-Module-Load \
perl-Module-Load-Conditional \
perl-Module-Loaded \
perl-Module-Metadata \
perl-NTLM \
perl-Net-HTTP \
perl-Net-Ping \
perl-NetAddr-IP \
perl-Package-Generator \
perl-Params-Check \
perl-Params-Util \
perl-Perl-OSType \
perl-PerlIO-via-QuotedPrint \
perl-Pod-Checker \
perl-Pod-Html \
perl-Pod-Parser \
perl-SelfLoader \
perl-Socket6 \
perl-Software-License \
perl-Sub-Exporter \
perl-Sub-Install \
perl-Sys-Syslog \
perl-Test \
perl-Test-Harness \
perl-Test-Simple \
perl-Text-Balanced \
perl-Text-Diff \
perl-Text-Glob \
perl-Text-Template \
perl-Thread-Queue \
perl-Time-Piece \
perl-TimeDate \
perl-Try-Tiny \
perl-Unicode-Collate \
perl-WWW-RobotRules \
perl-XML-NamespaceSupport \
perl-XML-Parser \
perl-XML-SAX \
perl-XML-SAX-Base \
perl-XML-Simple \
perl-XML-Twig \
perl-autodie \
perl-bignum \
perl-devel \
perl-encoding \
perl-experimental \
perl-inc-latest \
perl-libnetcfg \
perl-libwww-perl \
perl-local-lib \
perl-open \
perl-perlfaq \
perl-srpm-macros \
perl-utils \
perl-version \
python-srpm-macros \
python3-pyparsing \
python3-rpm-macros \
qt5-srpm-macros \
redhat-rpm-config \
rust-srpm-macros \
systemtap-sdt-devel \
perl-TermReadKey \
perl \
perl-DBD-MySQL \
perl-DBI \
initscripts \
vim \
fping \
perl-IO-Compress \
perl-Time-HiRes \
perl-Math-Complex \
libnsl \
mysql \
java \
net-snmp-utils \
net-tools \
nmap-ncat \
nmap \
net-snmp-utils \
sudo \
expect \
openssh-clients \
http://firefly.artica.es/centos8/perl-Net-Telnet-3.04-1.el8.noarch.rpm \
http://firefly.artica.es/centos7/wmic-1.4-1.el7.x86_64.rpm
# Install utils # Install utils
RUN dnf install -y supervisor chromium crontabs http://firefly.artica.es/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm --setopt=tsflags=nodocs RUN dnf install -y supervisor mysql chromium crontabs http://firefly.artica.es/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm --setopt=tsflags=nodocs
# SDK VMware perl dependencies # SDK VMware perl dependencies
RUN dnf install -y http://firefly.artica.es/centos8/perl-Crypt-OpenSSL-AES-0.02-1.el8.x86_64.rpm http://firefly.artica.es/centos8/perl-Crypt-SSLeay-0.73_07-1.gf.el8.x86_64.rpm perl-Net-HTTP perl-libwww-perl openssl-devel perl-Crypt-CBC perl-Bytes-Random-Secure perl-Crypt-Random-Seed perl-Math-Random-ISAAC perl-JSON http://firefly.artica.es/centos8/VMware-vSphere-Perl-SDK-6.5.0-4566394.x86_64.rpm RUN dnf install -y http://firefly.artica.es/centos8/perl-Crypt-OpenSSL-AES-0.02-1.el8.x86_64.rpm http://firefly.artica.es/centos8/perl-Crypt-SSLeay-0.73_07-1.gf.el8.x86_64.rpm perl-Net-HTTP perl-libwww-perl openssl-devel perl-Crypt-CBC perl-Bytes-Random-Secure perl-Crypt-Random-Seed perl-Math-Random-ISAAC perl-JSON http://firefly.artica.es/centos8/VMware-vSphere-Perl-SDK-6.5.0-4566394.x86_64.rpm
# Instant client Oracle # Instant client Oracle
RUN dnf install -y https://download.oracle.com/otn_software/linux/instantclient/19800/oracle-instantclient19.8-basic-19.8.0.0.0-1.x86_64.rpm https://download.oracle.com/otn_software/linux/instantclient/19800/oracle-instantclient19.8-sqlplus-19.8.0.0.0-1.x86_64.rpm RUN dnf install -y https://download.oracle.com/otn_software/linux/instantclient/19800/oracle-instantclient19.8-basic-19.8.0.0.0-1.x86_64.rpm https://download.oracle.com/otn_software/linux/instantclient/19800/oracle-instantclient19.8-sqlplus-19.8.0.0.0-1.x86_64.rpm
# Install IPAM dependencies
RUN dnf install -y http://firefly.artica.es/centos7/xprobe2-0.3-12.2.x86_64.rpm "perl(NetAddr::IP)" "perl(Sys::Syslog)" "perl(DBI)" "perl(XML::Simple)" "perl(Geo::IP)" "perl(IO::Socket::INET6)" "perl(XML::Twig)" "perl(DBD::mysql)" --setopt=tsflags=nodocs
EXPOSE 80 443 41121 162/udp EXPOSE 80 443 41121 162/udp

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix package: pandorafms-agent-unix
Version: 7.0NG.770-230405 Version: 7.0NG.770-230416
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -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.770-230405" pandora_version="7.0NG.770-230416"
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

View File

@ -1023,7 +1023,7 @@ my $Sem = undef;
my $ThreadSem = undef; my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.770'; use constant AGENT_VERSION => '7.0NG.770';
use constant AGENT_BUILD => '230405'; use constant AGENT_BUILD => '230416';
# 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;

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil} %global __os_install_post %{nil}
%define name pandorafms_agent_linux %define name pandorafms_agent_linux
%define version 7.0NG.770 %define version 7.0NG.770
%define release 230405 %define release 230416
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil} %global __os_install_post %{nil}
%define name pandorafms_agent_linux %define name pandorafms_agent_linux
%define version 7.0NG.770 %define version 7.0NG.770
%define release 230405 %define release 230416
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -10,7 +10,7 @@
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.770" PI_VERSION="7.0NG.770"
PI_BUILD="230405" PI_BUILD="230416"
OS_NAME=`uname -s` OS_NAME=`uname -s`
FORCE=0 FORCE=0

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS Windows Agent # Base config file for Pandora FMS Windows Agent
# (c) 2006-2021 Artica Soluciones Tecnologicas # (c) 2006-2023 Pandora FMS
# Version 7.0NG.770 # Version 7.0NG.770
# This program is Free Software, you can redistribute it and/or modify it # This program is Free Software, you can redistribute it and/or modify it
# under the terms of the GNU General Public Licence as published by the Free Software # under the terms of the GNU General Public Licence as published by the Free Software
@ -257,6 +257,8 @@ module_plugin cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\network.vbs"
#module_end #module_end
# Service autodiscovery plugin # Service autodiscovery plugin
# Services monitored by default: MySQL, postgresql, pgsql, oracle, MSSQL, IISADMIN, apache,
# nginx, W3svc, NTDS, Netlogon, DNS, MSExchangeADTopology, MSExchangeServiceHost, MSExchangeSA, MSExchangeTransport
module_plugin "%PROGRAMFILES%\Pandora_Agent\util\autodiscover.exe" --default module_plugin "%PROGRAMFILES%\Pandora_Agent\util\autodiscover.exe" --default
@ -264,6 +266,37 @@ module_plugin "%PROGRAMFILES%\Pandora_Agent\util\autodiscover.exe" --default
# EXAMPLES # # EXAMPLES #
######################################### #########################################
# Example: Show a snapshot (screencapture) of a command
#module_begin
#module_name ProcessList Snapshot
#module_exec tasklist
#module_type generic_data_string
#module_end
# Get logs from System source. Need enterprise version.
#module_begin
#module_name Eventlog_System
#module_type log
#module_logevent
#module_source System
#module_end
# Get logs from Security source. Need enterprise version.
#module_begin
#module_name Eventlog_Security
#module_type log
#module_logevent
#module_source Security
#module_end
# Get logs from Application source. Need enterprise version.
#module_begin
#module_name Eventlog_Application
#module_type log
#module_logevent
#module_source Application
#module_end
# Example: get Network information using Agent plugin # Example: get Network information using Agent plugin
#module_plugin cscript //B "%ProgramFiles%\Pandora_Agent\util\nettraffic.vbs" #module_plugin cscript //B "%ProgramFiles%\Pandora_Agent\util\nettraffic.vbs"
@ -377,9 +410,6 @@ module_plugin "%PROGRAMFILES%\Pandora_Agent\util\autodiscover.exe" --default
# module_crontab * 12-15 * * 1 # module_crontab * 12-15 * * 1
# module_end # module_end
# Example plugin to retrieve last 5 min events in log4x format
# module_plugin cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\logevent_log4x.vbs" Aplicacion System 300
# Sample on how to get a value from registry # Sample on how to get a value from registry
# This returns the last time user launch microsoft Windows update # This returns the last time user launch microsoft Windows update
#module_begin #module_begin

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{230405} {230416}
ViewReadme ViewReadme
{Yes} {Yes}

View File

@ -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.770 Build 230405") #define PANDORA_VERSION ("7.0NG.770 Build 230416")
string pandora_path; string pandora_path;
string pandora_dir; string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST" VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent" VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.770(Build 230405))" VALUE "ProductVersion", "(7.0NG.770(Build 230416))"
VALUE "FileVersion", "1.0.0.0" VALUE "FileVersion", "1.0.0.0"
END END
END END

View File

@ -1,5 +1,5 @@
package: pandorafms-console package: pandorafms-console
Version: 7.0NG.770-230405 Version: 7.0NG.770-230416
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -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.770-230405" pandora_version="7.0NG.770-230416"
package_pear=0 package_pear=0
package_pandora=1 package_pandora=1

View File

@ -224,7 +224,7 @@ function pandora_realtime_graphs()
false, false,
'', '',
'white-box-content', 'white-box-content',
'box-flat white_table_graph fixed_filter_bar' 'box-flat white_table_graph'
); );
$chart[time()]['graph'] = '0'; $chart[time()]['graph'] = '0';

View File

@ -117,12 +117,12 @@ if (empty($config['random_background']) === false) {
unset($random_backgrounds[0], $random_backgrounds[1]); unset($random_backgrounds[0], $random_backgrounds[1]);
$random_background = array_rand($random_backgrounds); $random_background = array_rand($random_backgrounds);
$background_url = 'images/backgrounds/random_backgrounds/'.$random_backgrounds[$random_background]; $background_url = 'images/backgrounds/random_backgrounds/'.$random_backgrounds[$random_background];
$background_100 = 'background-size: 100% 100% !important; '; $background_100 = 'background-size: cover !important; background-position: center !important; ';
} }
if (empty($config['login_background']) === false) { if (empty($config['login_background']) === false) {
$background_url = 'images/backgrounds/'.$config['login_background']; $background_url = 'images/backgrounds/'.$config['login_background'];
$background_100 = 'background-size: 100% 100% !important; '; $background_100 = 'background-size: cover !important; background-position: center !important; ';
} }
// Support for Internet Explorer and Microsoft Edge browsers // Support for Internet Explorer and Microsoft Edge browsers

View File

@ -237,8 +237,9 @@ if (db_get_num_rows($sql) == 0) {
$table->head[5] = __('Actions'); $table->head[5] = __('Actions');
$table->align = []; $table->align = [];
$table->align[5] = 'left'; $table->align[5] = 'left';
$i = 0;
foreach ($result as $row) { foreach ($result as $row) {
$table->cellclass[$i++][5] = 'table_action_buttons';
$data = []; $data = [];
$sql = sprintf('SELECT id_policy FROM tpolicy_modules_inventory WHERE id = %d', $row['id_policy_module_inventory']); $sql = sprintf('SELECT id_policy FROM tpolicy_modules_inventory WHERE id = %d', $row['id_policy_module_inventory']);

View File

@ -1184,6 +1184,11 @@ html_print_div(
} }
}); });
var show_dialog_create = "<?php echo get_parameter('show_dialog_create', 0); ?>";
if (show_dialog_create !== '0'){
$('#button-create_module').click();
}
}); });

View File

@ -227,7 +227,7 @@ if (is_ajax()) {
'field'.$i.'_value', 'field'.$i.'_value',
'text/plain', 'text/plain',
'', '',
$content_type == 'text/plain', '',
$is_management_allowed, $is_management_allowed,
'', '',
'', '',
@ -239,7 +239,7 @@ if (is_ajax()) {
'field'.$i.'_value', 'field'.$i.'_value',
'text/html', 'text/html',
'', '',
$content_type == 'text/html', 'text/html',
$is_management_allowed, $is_management_allowed,
'', '',
'', '',

View File

@ -712,7 +712,6 @@ $(document).ready (function () {
old_recovery_value = old_recovery_value =
$("[name=field" + i + "_recovery_value]").val(); $("[name=field" + i + "_recovery_value]").val();
} }
// Replace the old column with the new // Replace the old column with the new
$table_macros_field.replaceWith(field_row); $table_macros_field.replaceWith(field_row);
if (old_value != '' || old_recovery_value != '') { if (old_value != '' || old_recovery_value != '') {
@ -720,12 +719,14 @@ $(document).ready (function () {
if (inputType == 'radio') { if (inputType == 'radio') {
if(old_value == 'text/plain'){ if(old_value == 'text/plain'){
if ($("[name=field" + i + "_value]").val() == 'text/plain') { if ($("[name=field" + i + "_value]").val() == 'text/plain') {
$("[name=field" + i + "_value]").attr('checked','checked'); $("[name=field" + i + "_value][value='text/plain']").attr('checked','checked');
$("[name=field" + i + "_value][value='text/html']").removeAttr("checked")
} }
} }
else{ else{
if($("[name=field" + i + "_value]").val() == 'text/html') { $("[name=field" + i + "_value]").val()
$("[name=field" + i + "_value]").attr('checked','checked'); if ($("[name=field" + i + "_value]").val() == 'text/html') {
$("[name=field" + i + "_value][value='text/html']").attr('checked','checked');
} }
} }
if(old_recovery_value == 'text/plain'){ if(old_recovery_value == 'text/plain'){

View File

@ -120,6 +120,16 @@ if (is_metaconsole() === true) {
// Data before table. // Data before table.
$files = list_files(((is_metaconsole() === true) ? '../../' : '').'images/', '@groups.svg', 1, 0); $files = list_files(((is_metaconsole() === true) ? '../../' : '').'images/', '@groups.svg', 1, 0);
$files_old = list_files('images/groups_small/', 'png', 1, 0);
foreach ($files_old as $key => $f) {
// Remove from the list the non-desired .png files.
if (strpos($f, '.bad.png') !== false || strpos($f, '.default.png') !== false || strpos($f, '.ok.png') !== false || strpos($f, '.warning.png') !== false) {
unset($files_old[$key]);
}
}
$files = array_merge($files, $files_old);
$table = new stdClass(); $table = new stdClass();
$table->width = '100%'; $table->width = '100%';
$table->class = 'databox filter-table-adv'; $table->class = 'databox filter-table-adv';
@ -133,10 +143,19 @@ $table->data[0][0] = html_print_label_input_block(
html_print_input_text('name', $name, '', 35, 100, true) html_print_input_text('name', $name, '', 35, 100, true)
); );
$extension = pathinfo($icon, PATHINFO_EXTENSION);
if (empty($extension) === true) {
$icon .= '.png';
}
$input_icon = html_print_select($files, 'icon', $icon, '', 'None', '', true, false, true, '', false, 'width: 100%;'); $input_icon = html_print_select($files, 'icon', $icon, '', 'None', '', true, false, true, '', false, 'width: 100%;');
$input_icon .= ' <span id="icon_preview" class="mrgn_lft_05em">'; $input_icon .= ' <span id="icon_preview" class="mrgn_lft_05em">';
if (empty($icon) === false) { if (empty($icon) === false) {
$input_icon .= html_print_image('images/'.$icon, true); if (empty($extension) === true || $extension === 'png') {
$input_icon .= html_print_image('images/groups_small/'.$icon, true);
} else {
$input_icon .= html_print_image('images/'.$icon, true);
}
} }
$input_icon .= '</span>'; $input_icon .= '</span>';
@ -304,12 +323,17 @@ echo '</form>';
function icon_changed () { function icon_changed () {
var inputs = []; var inputs = [];
var data = this.value; var data = this.value;
var extension = data.split('.').pop();
$('#icon_preview').fadeOut ('normal', function () { $('#icon_preview').fadeOut ('normal', function () {
$('#icon_preview').empty (); $('#icon_preview').empty ();
if (data != "") { if (data != "") {
var params = []; var params = [];
params.push("get_image_path=1"); params.push("get_image_path=1");
params.push("img_src=images/" + data); if (extension === 'png') {
params.push("img_src=images/groups_small/" + data);
} else {
params.push("img_src=images/" + data);
}
params.push("page=include/ajax/skins.ajax"); params.push("page=include/ajax/skins.ajax");
params.push("only_src=1"); params.push("only_src=1");
jQuery.ajax ({ jQuery.ajax ({

View File

@ -920,8 +920,19 @@ if ($tab == 'tree') {
} }
if ($group['icon'] != '') { if ($group['icon'] != '') {
$extension = pathinfo($group['icon'], PATHINFO_EXTENSION);
if (empty($extension) === true) {
$group['icon'] .= '.png';
}
if (empty($extension) === true || $extension === 'png') {
$path = 'images/groups_small/'.$group['icon'];
} else {
$path = 'images/'.$group['icon'];
}
$table->data[$key][2] = html_print_image( $table->data[$key][2] = html_print_image(
'images/'.$group['icon'], $path,
true, true,
[ [
'style' => '', 'style' => '',

View File

@ -177,9 +177,8 @@ if ($access_console_node === true) {
$sub2['godmode/modules/manage_module_templates']['text'] = __('Module templates'); $sub2['godmode/modules/manage_module_templates']['text'] = __('Module templates');
$sub2['godmode/modules/manage_module_templates']['id'] = 'module_templates'; $sub2['godmode/modules/manage_module_templates']['id'] = 'module_templates';
$sub2['godmode/modules/private_enterprise_numbers']['text'] = __('Private Enterprise Numbers'); $sub2['godmode/modules/private_enterprise_numbers']['text'] = __('Private Enterprise Numbers');
enterprise_hook('local_components_menu');
$sub2['godmode/modules/private_enterprise_numbers']['id'] = 'private_Enterprise_Numbers'; $sub2['godmode/modules/private_enterprise_numbers']['id'] = 'private_Enterprise_Numbers';
$sub2['enterprise/godmode/modules/local_components']['text'] = __('Local components');
$sub2['enterprise/godmode/modules/local_components']['id'] = 'local_components';
$sub2['godmode/modules/manage_network_components']['text'] = __('Remote components'); $sub2['godmode/modules/manage_network_components']['text'] = __('Remote components');
$sub2['godmode/modules/manage_network_components']['id'] = 'network_components'; $sub2['godmode/modules/manage_network_components']['id'] = 'network_components';
$sub['templates']['sub2'] = $sub2; $sub['templates']['sub2'] = $sub2;

View File

@ -117,6 +117,7 @@ $period = SECONDS_1DAY;
$search = ''; $search = '';
$full_text = 0; $full_text = 0;
$log_number = 1000; $log_number = 1000;
$inventory_regular_expression = '';
// Added support for projection graphs. // Added support for projection graphs.
$period_pg = SECONDS_5DAY; $period_pg = SECONDS_5DAY;
$projection_period = SECONDS_5DAY; $projection_period = SECONDS_5DAY;
@ -940,6 +941,7 @@ switch ($action) {
$inventory_modules = $es['inventory_modules']; $inventory_modules = $es['inventory_modules'];
$id_agents = $es['id_agents']; $id_agents = $es['id_agents'];
$recursion = $item['recursion']; $recursion = $item['recursion'];
$inventory_regular_expression = $es['inventory_regular_expression'];
$idAgent = $es['id_agents']; $idAgent = $es['id_agents'];
$idAgentModule = $inventory_modules; $idAgentModule = $inventory_modules;
@ -1231,8 +1233,8 @@ $class = 'databox filters';
?> ?>
<?php <?php
$servers_all_opt = array_merge(['all' => 'All nodes'], $servers); if (is_metaconsole() === true) {
if ($meta) { $servers_all_opt = array_merge(['all' => 'All nodes'], $servers);
?> ?>
<tr id="row_servers_all_opt" class="datos"> <tr id="row_servers_all_opt" class="datos">
<td class="bolder"><?php echo __('Server'); ?></td> <td class="bolder"><?php echo __('Server'); ?></td>
@ -2196,6 +2198,15 @@ $class = 'databox filters';
</td> </td>
</tr> </tr>
<tr id="row_regular_expression" class="datos">
<td class="bolder"><?php echo __('Regular expression'); ?></td>
<td>
<?php
html_print_input_text('inventory_regular_expression', $inventory_regular_expression, '', false, 255, false, false, false, '', 'w50p');
?>
</td>
</tr>
<tr id="row_date" class="datos"> <tr id="row_date" class="datos">
<td class="bolder"><?php echo __('Date'); ?></td> <td class="bolder"><?php echo __('Date'); ?></td>
<td class="mx180px"> <td class="mx180px">
@ -4271,7 +4282,7 @@ function print_SLA_list($width, $action, $idItem=null)
echo '</td>'; echo '</td>';
echo '<td class="sla_list_action_col center">'; echo '<td class="sla_list_action_col center">';
echo '<a href="javascript: deleteSLARow('.$item['id'].');">'; echo '<a href="javascript: deleteSLARow('.$item['id'].');">';
echo html_print_image('images/delete.svg', true, ['class' => 'invert_filter']); echo html_print_image('images/delete.svg', true, ['class' => 'invert_filter main_menu_icon']);
echo '</a>'; echo '</a>';
echo '</td>'; echo '</td>';
echo '</tr>'; echo '</tr>';
@ -4314,7 +4325,7 @@ function print_SLA_list($width, $action, $idItem=null)
html_print_image( html_print_image(
'images/delete.svg', 'images/delete.svg',
false, false,
['class' => 'invert_filter'] ['class' => 'invert_filter main_menu_icon']
); );
?> ?>
</a> </a>
@ -4738,7 +4749,7 @@ function print_General_list($width, $action, $idItem=null, $type='general')
<td>'.printSmallFont($nameAgentFailover).$server_name_element.'</td> <td>'.printSmallFont($nameAgentFailover).$server_name_element.'</td>
<td>'.printSmallFont($nameModuleFailover).'</td> <td>'.printSmallFont($nameModuleFailover).'</td>
<td class="center"> <td class="center">
<a href="javascript: deleteGeneralRow('.$item['id'].');">'.html_print_image('images/delete.svg', true, ['class' => 'invert_filter']).'</a> <a href="javascript: deleteGeneralRow('.$item['id'].');">'.html_print_image('images/delete.svg', true, ['class' => 'invert_filter main_menu_icon']).'</a>
</td> </td>
</tr>'; </tr>';
} else { } else {
@ -4746,7 +4757,7 @@ function print_General_list($width, $action, $idItem=null, $type='general')
<td>'.printSmallFont($nameAgent).$server_name_element.'</td> <td>'.printSmallFont($nameAgent).$server_name_element.'</td>
<td>'.printSmallFont($nameModule).'</td> <td>'.printSmallFont($nameModule).'</td>
<td class="center"> <td class="center">
<a href="javascript: deleteGeneralRow('.$item['id'].');">'.html_print_image('images/delete.svg', true, ['class' => 'invert_filter']).'</a> <a href="javascript: deleteGeneralRow('.$item['id'].');">'.html_print_image('images/delete.svg', true, ['class' => 'invert_filter main_menu_icon']).'</a>
</td> </td>
</tr>'; </tr>';
} }
@ -4756,7 +4767,7 @@ function print_General_list($width, $action, $idItem=null, $type='general')
<td>'.printSmallFont($nameModule).'</td> <td>'.printSmallFont($nameModule).'</td>
<td>'.printSmallFont($operation[$item['operation']]).'</td> <td>'.printSmallFont($operation[$item['operation']]).'</td>
<td class="center"> <td class="center">
<a href="javascript: deleteGeneralRow('.$item['id'].');">'.html_print_image('images/delete.svg', true, ['class' => 'invert_filter']).'</a> <a href="javascript: deleteGeneralRow('.$item['id'].');">'.html_print_image('images/delete.svg', true, ['class' => 'invert_filter main_menu_icon']).'</a>
</td> </td>
</tr>'; </tr>';
} }
@ -4796,7 +4807,7 @@ function print_General_list($width, $action, $idItem=null, $type='general')
html_print_image( html_print_image(
'images/delete.svg', 'images/delete.svg',
false, false,
['class' => 'invert_filter'] ['class' => 'invert_filter main_menu_icon']
); );
?> ?>
</a> </a>
@ -6445,6 +6456,7 @@ function chooseType() {
$("#row_date").hide(); $("#row_date").hide();
$("#row_agent_multi").hide(); $("#row_agent_multi").hide();
$("#row_module_multi").hide(); $("#row_module_multi").hide();
$('#row_regular_expression').hide();
$("#row_event_graphs").hide(); $("#row_event_graphs").hide();
$("#row_event_graph_by_agent").hide(); $("#row_event_graph_by_agent").hide();
$("#row_event_graph_by_user").hide(); $("#row_event_graph_by_user").hide();
@ -7154,6 +7166,7 @@ function chooseType() {
$("#row_group").show(); $("#row_group").show();
$("#row_agent_multi").show(); $("#row_agent_multi").show();
$("#row_module_multi").show(); $("#row_module_multi").show();
$('#row_regular_expression').show();
$("#row_date").show(); $("#row_date").show();
$("#id_agents") $("#id_agents")

View File

@ -1756,6 +1756,7 @@ switch ($action) {
$es['inventory_modules'] = get_parameter( $es['inventory_modules'] = get_parameter(
'inventory_modules' 'inventory_modules'
); );
$es['inventory_regular_expression'] = get_parameter('inventory_regular_expression', '');
$description = get_parameter('description'); $description = get_parameter('description');
$values['external_source'] = json_encode($es); $values['external_source'] = json_encode($es);
$good_format = true; $good_format = true;
@ -2538,6 +2539,7 @@ switch ($action) {
$es['inventory_modules'] = get_parameter( $es['inventory_modules'] = get_parameter(
'inventory_modules' 'inventory_modules'
); );
$es['inventory_regular_expression'] = get_parameter('inventory_regular_expression', '');
$values['external_source'] = json_encode($es); $values['external_source'] = json_encode($es);
$good_format = true; $good_format = true;
break; break;

View File

@ -116,6 +116,22 @@ function get_list_os_icons_dir()
} }
} }
$items2 = scandir($config['homedir'].'/images/os_icons');
foreach ($items2 as $item2) {
if (strstr($item2, '_small.png') || strstr($item2, '_small.gif')
|| strstr($item2, '_small.jpg')
) {
continue;
}
if (strstr($item2, '.png') || strstr($item2, '.gif')
|| strstr($item2, '.jpg')
) {
$return[$item2] = $item2;
}
}
return $return; return $return;
} }
@ -124,10 +140,15 @@ function get_list_os_icons_dir()
<script type="text/javascript"> <script type="text/javascript">
function show_icon_OS() { function show_icon_OS() {
var extension = $("#icon").val().split('.').pop();
var params = []; var params = [];
params.push("get_image_path=1"); params.push("get_image_path=1");
params.push('img_src=images/' + $("#icon").val()); if (extension !== 'svg') {
params.push('img_src=images/os_icons/' + $("#icon").val());
} else {
params.push('img_src=images/' + $("#icon").val());
}
params.push("page=include/ajax/skins.ajax"); params.push("page=include/ajax/skins.ajax");
jQuery.ajax ({ jQuery.ajax ({
data: params.join ("&"), data: params.join ("&"),

View File

@ -431,7 +431,7 @@ $table->data[$i++][] = html_print_label_input_block(
$table->colspan[$i][] = 2; $table->colspan[$i][] = 2;
$table->data[$i++][] = html_print_label_input_block( $table->data[$i++][] = html_print_label_input_block(
__('Timezone setup'), __('Server timezone setup'),
html_print_div( html_print_div(
[ [
'class' => '', 'class' => '',

View File

@ -970,7 +970,7 @@ foreach ($info as $user_id => $user_info) {
*/ */
$userListActionButtons[] = html_print_menu_button( $userListActionButtons[] = html_print_menu_button(
[ [
'href' => ui_get_full_url( 'href' => ui_get_full_url(
sprintf( sprintf(
'index.php?sec=%s&amp;sec2=godmode/users/user_list&user_del=1&pure=%s&delete_user=%s', 'index.php?sec=%s&amp;sec2=godmode/users/user_list&user_del=1&pure=%s&delete_user=%s',
$sec, $sec,
@ -978,8 +978,9 @@ foreach ($info as $user_id => $user_info) {
$user_info['id_user'] $user_info['id_user']
) )
), ),
'image' => 'images/delete.svg', 'image' => 'images/delete.svg',
'title' => __('Delete'), 'title' => __('Delete'),
'onClick' => 'if (!confirm(\''.__('Are you sure?').'\')) return false;',
], ],
true true
); );

View File

@ -37,6 +37,7 @@ require_once 'include/functions_ui.php';
require_once 'include/functions_db.php'; require_once 'include/functions_db.php';
require_once 'include/functions_io.php'; require_once 'include/functions_io.php';
require_once 'include/functions.php'; require_once 'include/functions.php';
require_once $config['homedir'].'/include/class/HTML.class.php';
enterprise_include_once('meta/include/functions_events_meta.php'); enterprise_include_once('meta/include/functions_events_meta.php');
enterprise_include_once('include/functions_metaconsole.php'); enterprise_include_once('include/functions_metaconsole.php');

View File

@ -137,6 +137,7 @@ if (is_ajax() === true) {
switch ($type) { switch ($type) {
case 0: case 0:
case 3:
default: default:
$label = __('Group'); $label = __('Group');
$input = html_print_input( $input = html_print_input(
@ -234,10 +235,6 @@ if (is_ajax() === true) {
'5' '5'
); );
break; break;
case 3:
// Empty.
break;
} }
echo html_print_label_input_block( echo html_print_label_input_block(
@ -246,6 +243,7 @@ if (is_ajax() === true) {
[ [
'label_class' => 'font-title-font', 'label_class' => 'font-title-font',
'div_class' => 'mrgn_top_10px', 'div_class' => 'mrgn_top_10px',
'div_id' => 'filter_type',
] ]
); );
} }
@ -259,10 +257,19 @@ if (is_ajax() === true) {
$nd->connect(); $nd->connect();
} }
echo '<div class="box-flat white_table_graph">';
switch ($type) { switch ($type) {
case 3: case 3:
case 2: case 2:
$data = db_get_row('tagente_modulo', 'id_agente_modulo', $id); $sql = sprintf(
'SELECT * FROM tagente_modulo ag
INNER JOIN tagente_estado ae ON ag.id_agente_modulo = ae.id_agente_modulo
WHERE ag.id_agente_modulo = %d',
$id
);
$data = db_get_row_sql($sql);
// Nombre. // Nombre.
$link = sprintf( $link = sprintf(
@ -298,6 +305,92 @@ if (is_ajax() === true) {
echo '<p class="title-dialog">'.__('Module group').'</p>'; echo '<p class="title-dialog">'.__('Module group').'</p>';
echo '<p class="info-dialog">'.$group.'</p>'; echo '<p class="info-dialog">'.$group.'</p>';
echo '</div>'; echo '</div>';
$graph_type = return_graphtype($data['module_type']);
$url = ui_get_full_url('operation/agentes/stat_win.php', false, false, false);
$handle = dechex(crc32($data['id_agente_modulo'].$data['module_name']));
$win_handle = 'day_'.$handle;
$graph_params = [
'type' => $graph_type,
'period' => SECONDS_1DAY,
'id' => $data['id_agente_modulo'],
'refresh' => SECONDS_10MINUTES,
];
$graph_params_str = http_build_query($graph_params);
$link = 'winopeng_var(\''.$url.'?'.$graph_params_str.'\',\''.$win_handle.'\', 800, 480)';
$img_graph = html_print_anchor(
[
'href' => 'javascript:'.$link,
'content' => html_print_image('images/module-graph.svg', true, ['border' => '0', 'alt' => '', 'class' => 'invert_filter main_menu_icon']),
],
true
);
echo '<div class="div-dialog">';
echo '<p class="title-dialog">'.__('Data').'</p>';
$data_module = '';
if (is_numeric($data['datos'])) {
$data_module = remove_right_zeros(
number_format(
$data['datos'],
$config['graph_precision'],
$config['decimal_separator'],
$config['thousand_separator']
)
);
echo '<p class="info-dialog">'.$data_module.' '.$data['unit'].'&nbsp;&nbsp;&nbsp;'.$img_graph.'</p>';
} else {
$data_module = $data['datos'];
echo '<p class="info-dialog">'.$data['datos'].' '.$data['unit'].'&nbsp;&nbsp;&nbsp;'.$img_graph.'</p>';
}
echo '</div>';
echo '<div class="div-dialog">';
echo '<p class="title-dialog">'.__('Date of last data').'</p>';
echo '<p class="info-dialog">'.date('Y-m-d H:i:s', $data['utimestamp']).'</p>';
echo '</div>';
$status = modules_get_agentmodule_status($id);
switch ($status) {
case AGENT_MODULE_STATUS_NORMAL:
$status = ui_print_status_image('module_ok.png', $data_module, true);
break;
case AGENT_MODULE_STATUS_CRITICAL_BAD:
$status = ui_print_status_image('module_critical.png', $data_module, false);
break;
case AGENT_MODULE_STATUS_WARNING:
$status = ui_print_status_image('module_warning.png', $data_module, false);
break;
case AGENT_MODULE_STATUS_NORMAL_ALERT:
case AGENT_MODULE_STATUS_WARNING_ALERT:
case AGENT_MODULE_STATUS_CRITICAL_ALERT:
$status = ui_print_status_image('module_alertsfired.png', $data_module, false);
break;
case 4:
$status = ui_print_status_image('module_no_data.png', $data_module, false);
break;
default:
case AGENT_MODULE_STATUS_UNKNOWN:
$status = ui_print_status_image('module_unknown.png', $data_module, false);
break;
}
echo '<div class="div-dialog">';
echo '<p class="title-dialog">'.__('Status').'</p>';
echo '<div class="status_rounded_rectangles">'.$status.'</div>';
echo '</div>';
break; break;
case 1: case 1:
@ -381,6 +474,43 @@ if (is_ajax() === true) {
echo '<p class="info-dialog">'.$data['comentarios'].'</p>'; echo '<p class="info-dialog">'.$data['comentarios'].'</p>';
echo '</div>'; echo '</div>';
// Last contact.
$lastContactDate = ui_print_timestamp($data['ultimo_contacto'], true);
$remoteContactDate = ($data['ultimo_contacto_remoto'] === '01-01-1970 00:00:00') ? __('Never') : date_w_fixed_tz($data['ultimo_contacto_remoto']);
$lastAndRemoteContact = sprintf('%s / %s', $lastContactDate, $remoteContactDate);
echo '<div class="div-dialog">';
echo '<p class="title-dialog">'.__('Last contact').' / '.__('Remote').'</p>';
echo '<p class="info-dialog">'.$lastAndRemoteContact.'</p>';
echo '</div>';
// Next contact progress.
$progress = agents_get_next_contact($id);
$tempTimeToShow = ($data['intervalo'] - (strtotime('now') - strtotime($data['ultimo_contacto'])));
$progressCaption = ($tempTimeToShow >= 0) ? sprintf('%d s', $tempTimeToShow) : __('Out of bounds');
$ajaxNextContactInterval = (empty($data['intervalo']) === true) ? 0 : (100 / $data['intervalo']);
echo '<div class="div-dialog">';
echo '<p class="title-dialog">'.__('Next contact').'</p>';
echo '<p class="info-dialog">'.ui_progress(
$progress,
'80%',
'1.2',
'#ececec',
true,
$progressCaption,
[
'page' => 'operation/agentes/ver_agente',
'interval' => $ajaxNextContactInterval,
'data' => [
'id_agente' => $id,
'refresh_contact' => 1,
],
]
).'</p>';
echo '</div>';
// Group. // Group.
$secondary_groups = ''; $secondary_groups = '';
$secondary = enterprise_hook('agents_get_secondary_groups', [$data['id_agente']]); $secondary = enterprise_hook('agents_get_secondary_groups', [$data['id_agente']]);
@ -394,6 +524,27 @@ if (is_ajax() === true) {
echo '<p class="info-dialog">'.groups_get_name($data['id_grupo']).$secondary_groups.'</p>'; echo '<p class="info-dialog">'.groups_get_name($data['id_grupo']).$secondary_groups.'</p>';
echo '</div>'; echo '</div>';
echo '<div class="div-dialog">';
echo graph_agent_status(
$id,
150,
150,
true,
false,
false,
true
);
echo '</div>';
echo '<div class="div-dialog" style="justify-content: center;">';
echo reporting_tiny_stats(
$data,
true,
'agent',
// Useless.
':',
true
);
echo '</div>';
// Events. // Events.
$result_graph_event = enterprise_hook( $result_graph_event = enterprise_hook(
@ -419,6 +570,8 @@ if (is_ajax() === true) {
break; break;
} }
echo '</div>';
if (empty($id_server) === false) { if (empty($id_server) === false) {
$nd->disconnect(); $nd->disconnect();
} }

View File

@ -1361,7 +1361,7 @@ class AgentWizard extends HTML
true, true,
[ [
'title' => __('Plugin server'), 'title' => __('Plugin server'),
'class' => 'invert_filter', 'class' => 'invert_filter main_menu_icon',
] ]
); );
} else { } else {
@ -1371,7 +1371,7 @@ class AgentWizard extends HTML
true, true,
[ [
'title' => __('WMI server'), 'title' => __('WMI server'),
'class' => 'invert_filter', 'class' => 'invert_filter main_menu_icon',
] ]
); );
} else { } else {
@ -1380,7 +1380,7 @@ class AgentWizard extends HTML
true, true,
[ [
'title' => __('Network server'), 'title' => __('Network server'),
'class' => 'invert_filter', 'class' => 'invert_filter main_menu_icon',
] ]
); );
} }
@ -4096,16 +4096,16 @@ class AgentWizard extends HTML
'title' => __('Modules selected'), 'title' => __('Modules selected'),
'alt' => __('Modules selected'), 'alt' => __('Modules selected'),
'id' => 'image-info-modules-'.$idBlock, 'id' => 'image-info-modules-'.$idBlock,
'class' => 'hidden', 'class' => 'hidden main_menu_icon',
] ]
); );
$blockTitle .= '</b>'; $blockTitle .= '</b>';
} }
} else { } else {
$blockTitle = '<b>'.$block['name']; $blockTitle = '<b>'.$block['name'];
$classImg = ''; $classImg = 'main_menu_icon ';
if ($activeModules === 0) { if ($activeModules === 0) {
$classImg = 'hidden'; $classImg .= 'hidden';
} }
$blockTitle .= '&nbsp;&nbsp;'; $blockTitle .= '&nbsp;&nbsp;';

View File

@ -134,7 +134,7 @@ class AuditLog extends HTML
ui_print_standard_header( ui_print_standard_header(
__('%s audit', get_product_name()).' &raquo; '.__('Review Logs'), __('%s audit', get_product_name()).' &raquo; '.__('Review Logs'),
'images/gm_log.png', 'images/gm_log@svg.svg',
false, false,
'', '',
false, false,

View File

@ -282,7 +282,6 @@ class Heatmap
while (cont <= limit) { while (cont <= limit) {
if (typeof lista[cont] !== 'undefined') { if (typeof lista[cont] !== 'undefined') {
const rect = document.getElementsByName(`${lista[cont]['id']}`); const rect = document.getElementsByName(`${lista[cont]['id']}`);
console.log(rect[0]);
$(`#${rect[0].id}`).removeClass(); $(`#${rect[0].id}`).removeClass();
$(`#${rect[0].id}`).addClass(`${lista[cont]['status']} hover`); $(`#${rect[0].id}`).addClass(`${lista[cont]['status']} hover`);
} }
@ -938,10 +937,27 @@ class Heatmap
if (users_is_admin() === false) { if (users_is_admin() === false) {
$user_groups = array_keys(users_get_groups($config['user'], 'AR', false)); $user_groups = array_keys(users_get_groups($config['user'], 'AR', false));
if (empty($user_groups) === false) { if (empty($user_groups) === false) {
if (empty($this->filter) === false && empty(current($this->filter)) === false) {
$user_groups = array_intersect($this->filter, $user_groups);
$id_user_groups = sprintf(
'INNER JOIN tagente a ON a.id_agente = ae.id_agente
AND a.id_grupo IN (%s)',
implode(',', $user_groups)
);
} else {
$id_user_groups = sprintf(
'INNER JOIN tagente a ON a.id_agente = ae.id_agente
AND a.id_grupo IN (%s)',
implode(',', $user_groups)
);
}
}
} else {
if (empty($this->filter) === false && empty(current($this->filter)) === false) {
$id_user_groups = sprintf( $id_user_groups = sprintf(
'INNER JOIN tagente a ON a.id_agente = ae.id_agente 'INNER JOIN tagente a ON a.id_agente = ae.id_agente
AND a.id_grupo IN (%s)', AND a.id_grupo IN (%s)',
implode(',', $user_groups) implode(',', $this->filter)
); );
} }
} }
@ -1292,13 +1308,31 @@ class Heatmap
const id = name.split('|')[0]; const id = name.split('|')[0];
const server = name.split('|')[1]; const server = name.split('|')[1];
let height = 400;
let width = 530;
switch (type) {
case 0:
height = 670;
width = 460;
break;
case 2:
case 3:
height = 450;
width = 460;
break;
default:
break;
}
$("#info_dialog").dialog({ $("#info_dialog").dialog({
resizable: true, resizable: true,
draggable: true, draggable: true,
modal: true, modal: true,
closeOnEscape: true, closeOnEscape: true,
height: 400, height: height,
width: 530, width: width,
title: '<?php echo __('Info'); ?>', title: '<?php echo __('Info'); ?>',
open: function() { open: function() {
$.ajax({ $.ajax({
@ -1325,13 +1359,23 @@ class Heatmap
if (count($groups) > 1 && $this->group === 1 && $this->dashboard === false) { if (count($groups) > 1 && $this->group === 1 && $this->dashboard === false) {
$x_back = 0; $x_back = 0;
$y_back = 0; $y_back = 0;
$x_text_correction = 0.25;
if ($count_result <= 100) { if ($count_result <= 10) {
$fontSize = 'small-size'; $fontSize = 'small-size';
$stroke = 'small-stroke'; $stroke = 'small-stroke';
} else { } else if ($count_result > 10 && $count_result <= 100) {
$fontSize = 'tiny-size';
$stroke = 'tiny-stroke';
} else if ($count_result > 100 && $count_result <= 1000) {
$fontSize = 'medium-size';
$stroke = 'medium-stroke';
} else if ($count_result > 1000 && $count_result <= 10000) {
$fontSize = 'big-size'; $fontSize = 'big-size';
$stroke = 'big-stroke'; $stroke = 'big-stroke';
} else {
$fontSize = 'huge-size';
$stroke = 'huge-stroke';
} }
echo '<polyline points="0,0 '.$Xaxis.',0" class="polyline '.$stroke.'" />'; echo '<polyline points="0,0 '.$Xaxis.',0" class="polyline '.$stroke.'" />';
@ -1385,7 +1429,7 @@ class Heatmap
echo '<polyline points="'.$points.'" class="polyline '.$stroke.'" />'; echo '<polyline points="'.$points.'" class="polyline '.$stroke.'" />';
// Name. // Name.
echo '<text x="'.((($x_position - $x_back) / 2) + $x_back).'" y="'.($y_position + 1).'" echo '<text x="'.((($x_position - $x_back) / 2) + $x_back - $x_text_correction).'" y="'.($y_position + 1 - 0.01).'"
class="'.$fontSize.'">'.$name.'</text>'; class="'.$fontSize.'">'.$name.'</text>';
$x_back = $x_position; $x_back = $x_position;
@ -1436,7 +1480,7 @@ class Heatmap
echo '<polyline points="'.$points.'" class="polyline '.$stroke.'" />'; echo '<polyline points="'.$points.'" class="polyline '.$stroke.'" />';
// Name. // Name.
echo '<text x="'.(($x_position) / 2).'" y="'.($y_position + 1).'" echo '<text x="'.(($x_position) / 2 - $x_text_correction).'" y="'.($y_position + 1 - 0.01).'"
class="'.$fontSize.'">'.$name.'</text>'; class="'.$fontSize.'">'.$name.'</text>';
// Bottom-right of last line. // Bottom-right of last line.
@ -1493,7 +1537,7 @@ class Heatmap
echo '<polyline points="'.$points.'" class="polyline '.$stroke.'" />'; echo '<polyline points="'.$points.'" class="polyline '.$stroke.'" />';
// Name. // Name.
echo '<text x="'.(($x_position) / 2).'" y="'.($y_position + 1).'" echo '<text x="'.(($x_position) / 2 - $x_text_correction).'" y="'.($y_position + 1 - 0.02).'"
class="'.$fontSize.'">'.$name.'</text>'; class="'.$fontSize.'">'.$name.'</text>';
// Bottom-top of last line. // Bottom-top of last line.

View File

@ -1443,7 +1443,7 @@ class SnmpConsole extends HTML
binding_vars.forEach(function(oid) { binding_vars.forEach(function(oid) {
string += oid+'<br/>'; string += oid+'<br/>';
}); });
variableBindings = `<td align="left" colspan="8">${string}</td>`; variableBindings = `<td align="left" colspan="8" class="break-word w200px">${string}</td>`;
} }
tr.after(`<tr id="show_" role="row">${labelBindings}${variableBindings}</tr>`); tr.after(`<tr id="show_" role="row">${labelBindings}${variableBindings}</tr>`);

View File

@ -570,7 +570,7 @@ class TipsWindow
$sql = sprintf( $sql = sprintf(
'SELECT id, name AS language, title, text, url, enable 'SELECT id, name AS language, title, text, url, enable
FROM twelcome_tip t FROM twelcome_tip t
LEFT JOIN tlanguage l ON t.id_lang = l.id_language COLLATE utf8mb4_0900_ai_ci LEFT JOIN tlanguage l ON t.id_lang = l.id_language COLLATE utf8mb4_unicode_ci
%s %s %s', %s %s %s',
$filter, $filter,
$order, $order,
@ -582,7 +582,7 @@ class TipsWindow
$sqlCount = sprintf( $sqlCount = sprintf(
'SELECT count(*) 'SELECT count(*)
FROM twelcome_tip t FROM twelcome_tip t
LEFT JOIN tlanguage l ON t.id_lang = l.id_language COLLATE utf8mb4_0900_ai_ci LEFT JOIN tlanguage l ON t.id_lang = l.id_language COLLATE utf8mb4_unicode_ci
%s', %s',
$filter $filter
); );

View File

@ -20,7 +20,7 @@
/** /**
* Pandora build version and version * Pandora build version and version
*/ */
$build_version = 'PC230405'; $build_version = 'PC230416';
$pandora_version = 'v7.0NG.770'; $pandora_version = 'v7.0NG.770';
// Do not overwrite default timezone set if defined. // Do not overwrite default timezone set if defined.

View File

@ -5272,7 +5272,7 @@ function events_page_comments($event, $ajax=false, $groupedComments=[])
'<b>%s %s %s%s</b>', '<b>%s %s %s%s</b>',
$c['action'], $c['action'],
__('by'), __('by'),
get_user_fullname($c['id_user']).' ('.$c['id_user'].')', get_user_fullname(io_safe_input($c['id_user'])).' ('.io_safe_input($c['id_user']).')',
$eventIdExplanation $eventIdExplanation
); );

View File

@ -445,6 +445,15 @@ function groups_get_icon($id_group)
} else { } else {
$icon = (string) db_get_value('icon', 'tgrupo', 'id_grupo', (int) $id_group); $icon = (string) db_get_value('icon', 'tgrupo', 'id_grupo', (int) $id_group);
$extension = pathinfo($icon, PATHINFO_EXTENSION);
if (empty($extension) === true) {
$icon .= '.png';
}
if (empty($extension) === true || $extension === 'png') {
$icon = 'groups_small/'.$icon;
}
if (empty($icon) === true) { if (empty($icon) === true) {
$icon = 'unknown@groups.svg'; $icon = 'unknown@groups.svg';
} }

View File

@ -36,7 +36,8 @@ function inventory_get_data(
$return_mode=false, $return_mode=false,
$order_by_agent=false, $order_by_agent=false,
$node='', $node='',
$pagination_url_parameters=[] $pagination_url_parameters=[],
$regular_expression=''
) { ) {
global $config; global $config;
@ -268,7 +269,15 @@ function inventory_get_data(
$i++; $i++;
} }
$data[] = $temp_row; if ($regular_expression !== '') {
if (is_array(preg_grep('/'.$regular_expression.'/', $temp_row))) {
if (count(preg_grep('/'.$regular_expression.'/', $temp_row)) > 0) {
$data[] = $temp_row;
}
}
} else {
$data[] = $temp_row;
}
} }
} }
@ -756,8 +765,10 @@ function inventory_get_datatable(
foreach ($rows as $row) { foreach ($rows as $row) {
$data_rows = explode(PHP_EOL, $row['data']); $data_rows = explode(PHP_EOL, $row['data']);
foreach ($data_rows as $data_key => $data_value) { foreach ($data_rows as $data_key => $data_value) {
$row['data'] = $data_value; if (empty($data_value) === false) {
$modules[$row['name']][$row['name_agent'].'-'.$data_key.'-'.$data_value] = $row; $row['data'] = $data_value;
$modules[$row['name']][$row['name_agent'].'-'.$data_key.'-'.$data_value] = $row;
}
} }
} }

View File

@ -3170,6 +3170,7 @@ function reporting_inventory($report, $content, $type)
$date = $es['date']; $date = $es['date'];
$description = $content['description']; $description = $content['description'];
$inventory_regular_expression = $es['inventory_regular_expression'];
switch ($type) { switch ($type) {
case 'data': case 'data':
@ -3179,7 +3180,11 @@ function reporting_inventory($report, $content, $type)
$date, $date,
'', '',
false, false,
'csv' 'csv',
false,
'',
[],
$inventory_regular_expression
); );
break; break;
@ -3190,7 +3195,11 @@ function reporting_inventory($report, $content, $type)
$date, $date,
'', '',
false, false,
'hash' 'hash',
false,
'',
[],
$inventory_regular_expression
); );
break; break;
} }

View File

@ -1996,6 +1996,13 @@ function reporting_html_inventory($table, $item, $pdf=0)
&& is_array($type_modules) === true && is_array($type_modules) === true
) { ) {
foreach ($type_modules as $key_type_module => $type_module) { foreach ($type_modules as $key_type_module => $type_module) {
$print_table = true;
foreach ($type_module as $key => $module) {
if (count($module['data']) == 0) {
unset($type_module[$key]);
}
}
$table1 = new stdClass(); $table1 = new stdClass();
$table1->width = '99%'; $table1->width = '99%';
$table1->class = 'info_table'; $table1->class = 'info_table';
@ -2006,57 +2013,62 @@ function reporting_html_inventory($table, $item, $pdf=0)
if (isset($type_module) === true if (isset($type_module) === true
&& is_array($type_module) === true && is_array($type_module) === true
) { ) {
foreach ($type_module as $key_type => $module) { if (count($type_module) > 0) {
if (isset($module['data']) === true foreach ($type_module as $key_type => $module) {
&& is_array($module['data']) === true if (isset($module['data']) === true
) { && is_array($module['data']) === true
array_pop($module['data']); ) {
foreach ($module['data'] as $k_module => $v_module) { foreach ($module['data'] as $k_module => $v_module) {
$str_key = $key_type_module.'-'.$key_type.'-'.$k_module; $str_key = $key_type_module.'-'.$key_type.'-'.$k_module;
$table1->head[0] = __('Agent'); $table1->head[0] = __('Agent');
$table1->head[1] = __('Module'); $table1->head[1] = __('Module');
$table1->head[2] = __('Date'); $table1->head[2] = __('Date');
$table1->headstyle[0] = 'text-align: left'; $table1->headstyle[0] = 'text-align: left';
$table1->headstyle[1] = 'text-align: left'; $table1->headstyle[1] = 'text-align: left';
$table1->headstyle[2] = 'text-align: left'; $table1->headstyle[2] = 'text-align: left';
$table1->cellstyle[$str_key][0] = 'text-align: left;'; $table1->cellstyle[$str_key][0] = 'text-align: left;';
$table1->cellstyle[$str_key][1] = 'text-align: left;'; $table1->cellstyle[$str_key][1] = 'text-align: left;';
$table1->cellstyle[$str_key][2] = 'text-align: left;'; $table1->cellstyle[$str_key][2] = 'text-align: left;';
$table1->data[$str_key][0] = $module['agent_name']; $table1->data[$str_key][0] = $module['agent_name'];
$table1->data[$str_key][1] = $key_type_module; $table1->data[$str_key][1] = $key_type_module;
$dateModule = explode(' ', $module['timestamp']); $dateModule = explode(' ', $module['timestamp']);
$table1->data[$str_key][2] = $dateModule[0]; $table1->data[$str_key][2] = $dateModule[0];
if (isset($v_module) === true if (isset($v_module) === true
&& is_array($v_module) === true && is_array($v_module) === true
) { ) {
foreach ($v_module as $k => $v) { foreach ($v_module as $k => $v) {
$table1->head[$k] = $k; $table1->head[$k] = $k;
$table1->headstyle[$k] = 'text-align: left'; $table1->headstyle[$k] = 'text-align: left';
$table1->cellstyle[$str_key][$k] = 'text-align: left;'; $table1->cellstyle[$str_key][$k] = 'text-align: left;';
if ($pdf === 0) { if ($pdf === 0) {
$table1->data[$str_key][$k] = $v; $table1->data[$str_key][$k] = $v;
} else { } else {
// Workaround to prevent table columns from growing indefinitely in PDFs. // Workaround to prevent table columns from growing indefinitely in PDFs.
$table1->data[$str_key][$k] = preg_replace( $table1->data[$str_key][$k] = preg_replace(
'/([^\s]{30})(?=[^\s])/', '/([^\s]{30})(?=[^\s])/',
'$1'.'<br>', '$1'.'<br>',
$v $v
); );
}
} }
} }
} }
} }
} }
} else {
$print_table = false;
} }
} else {
$print_table = false;
} }
if ($pdf === 0) { if ($pdf === 0 && $print_table === true) {
$table->colspan[$key_type_module]['cell'] = 3; $table->colspan[$key_type_module]['cell'] = 3;
$table->data[$key_type_module]['cell'] = html_print_table( $table->data[$key_type_module]['cell'] = html_print_table(
$table1, $table1,
true true
); );
} else { } else if ($print_table === true) {
$return_pdf .= html_print_table( $return_pdf .= html_print_table(
$table1, $table1,
true true
@ -5986,8 +5998,14 @@ function reporting_get_events($data, $links=false)
$table_events->size[2] = '10%'; $table_events->size[2] = '10%';
$table_events->size[3] = '10%'; $table_events->size[3] = '10%';
$event_view = '<fieldset class="tactical_set"> $tooltip = ui_print_help_tip(
<legend>'.__('Important Events by Criticity').'</legend>'.html_print_table($table_events, true).'</fieldset>'; __(
'Event count corresponds to events within the last hour'
),
true
);
$event_view = '<fieldset class="tactical_set"><legend>'.__('Important Events by Criticity').$tooltip.'</legend>'.html_print_table($table_events, true).'</fieldset>';
} }
return $event_view; return $event_view;

View File

@ -944,12 +944,12 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false)
true true
); );
} else { } else {
$buttons_act .= '<a target=_blank href="'.$console_url.'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.$ent.'&tab=module">'; $buttons_act .= '<a target=_blank href="'.$console_url.'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.$ent.'&tab=module&show_dialog_create=1">';
$buttons_act .= html_print_submit_button( $buttons_act .= html_print_submit_button(
__('Go to module creation'), __('Go to module creation'),
'upd_button', 'upd_button',
false, false,
['class' => 'secondary mini'], ['class' => 'secondary mini no_decoration'],
true true
); );
@ -958,7 +958,7 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false)
__('Go to agent edition'), __('Go to agent edition'),
'upd_button', 'upd_button',
false, false,
['class' => 'secondary mini'], ['class' => 'secondary mini no_decoration'],
true true
); );
} }

View File

@ -713,6 +713,10 @@ function ui_print_group_icon($id_group, $return=false, $path='', $style='', $lin
$output = ''; $output = '';
$icon = ($id_group > 0) ? (string) db_get_value('icon', 'tgrupo', 'id_grupo', (int) $id_group) : 'unknown@groups.svg'; $icon = ($id_group > 0) ? (string) db_get_value('icon', 'tgrupo', 'id_grupo', (int) $id_group) : 'unknown@groups.svg';
$extension = pathinfo($icon, PATHINFO_EXTENSION);
if (empty($extension) === true) {
$icon .= '.png';
}
// Don't show link in metaconsole. // Don't show link in metaconsole.
if (is_metaconsole() === true) { if (is_metaconsole() === true) {
@ -756,10 +760,14 @@ function ui_print_group_icon($id_group, $return=false, $path='', $style='', $lin
} }
} }
$icon = (str_contains($icon, '.svg') === true) ? $icon : $icon.'.svg'; $icon = (str_contains($icon, '.svg') === true || str_contains($icon, '.png') === true) ? $icon : $icon.'.svg';
$folder = '';
if (str_contains($icon, '.png')) {
$folder = 'groups_small/';
}
$output .= html_print_image( $output .= html_print_image(
'images/'.$icon, 'images/'.$folder.$icon,
true, true,
[ [
'style' => $style, 'style' => $style,
@ -876,6 +884,17 @@ function ui_print_os_icon(
$no_in_meta = (is_metaconsole() === false); $no_in_meta = (is_metaconsole() === false);
$icon = (string) db_get_value('icon_name', 'tconfig_os', 'id_os', (int) $id_os); $icon = (string) db_get_value('icon_name', 'tconfig_os', 'id_os', (int) $id_os);
$extension = pathinfo($icon, PATHINFO_EXTENSION);
if (empty($extension) === true) {
$icon .= '.png';
}
if (empty($extension) === true || $extension === 'png'
|| $extension === 'jpg' || $extension === 'gif' && $subfolder === '.'
) {
$subfolder = 'os_icons';
}
$os_name = get_os_name($id_os); $os_name = get_os_name($id_os);
if (empty($icon) === true) { if (empty($icon) === true) {
if ($only_src) { if ($only_src) {
@ -6944,7 +6963,7 @@ function ui_get_favicon()
global $config; global $config;
if (empty($config['custom_favicon'])) { if (empty($config['custom_favicon'])) {
return (!is_metaconsole()) ? 'images/pandora.ico' : 'enterprise/meta/images/favicon_meta.ico'; return (!is_metaconsole()) ? 'images/pandora.ico' : '/images/custom_favicon/favicon_meta.ico';
} }
return 'images/custom_favicon/'.$config['custom_favicon']; return 'images/custom_favicon/'.$config['custom_favicon'];

View File

@ -1571,16 +1571,12 @@ function type_change() {
var type = document.getElementById("type").value; var type = document.getElementById("type").value;
switch (type) { switch (type) {
case "3":
$("#li_tags").hide();
$("#li_groups").hide();
$("#li_module_groups").hide();
break;
case "2": case "2":
$("#li_tags").hide(); $("#li_tags").hide();
$("#li_groups").hide(); $("#li_groups").hide();
$("#li_module_groups").show(); $("#li_module_groups").show();
break; break;
case "1": case "1":
$("#li_tags").show(); $("#li_tags").show();
$("#li_groups").hide(); $("#li_groups").hide();
@ -1588,6 +1584,7 @@ function type_change() {
break; break;
default: default:
case "3":
case "0": case "0":
$("#li_tags").hide(); $("#li_tags").hide();
$("#li_groups").show(); $("#li_groups").show();

View File

@ -652,13 +652,19 @@ var TreeController = {
typeof element.icon != "undefined" && typeof element.icon != "undefined" &&
element.icon.length > 0 element.icon.length > 0
) { ) {
var extension = element.icon.split(".").pop();
$content.append( $content.append(
'<div class="node-icon"><div class="node-icon-container"><img src="' + '<div class="node-icon"><div class="node-icon-container"><img src="' +
(controller.baseURL.length > 0 ? controller.baseURL : "") + (controller.baseURL.length > 0 ? controller.baseURL : "") +
(controller.baseURL.indexOf("meta") !== -1 (controller.baseURL.indexOf("meta") !== -1
? "../../images/" ? "../../images/"
: "images/") + : "images/") +
element.icon + (extension === "png" || extension === element.icon
? "groups_small/"
: "") +
(extension === element.icon
? element.icon + ".png"
: element.icon) +
'" class="invert_filter"/></div></div>' '" class="invert_filter"/></div></div>'
); );
} else if ( } else if (

View File

@ -764,6 +764,7 @@ class ClusterWizard extends \HTML
'action' => $target_url, 'action' => $target_url,
'method' => 'POST', 'method' => 'POST',
'extra' => 'autocomplete="false"', 'extra' => 'autocomplete="false"',
'id' => 'cluster-edit-'.($this->page + 1),
]; ];
if ($load_success === false && $this->page !== 0) { if ($load_success === false && $this->page !== 0) {
@ -1245,17 +1246,16 @@ class ClusterWizard extends \HTML
} }
// Submit button. // Submit button.
$form['inputs'][] = [ $form['submit-external-input'] = [
'arguments' => [ 'name' => 'next',
'name' => 'next', 'label' => $str,
'label' => $str, 'type' => 'submit',
'type' => 'submit', 'attributes' => [
'attributes' => [ 'icon' => 'wand',
'icon' => 'wand', 'mode' => 'primary',
'mode' => 'primary', 'form' => 'cluster-edit-'.($this->page + 1),
],
'return' => true,
], ],
'return' => true,
]; ];
return $form; return $form;

View File

@ -302,9 +302,16 @@ class GroupsStatusWidget extends Widget
); );
$data .= '</span>'; $data .= '</span>';
$url = $config['homeurl']; if (is_metaconsole() === true) {
$url .= 'index.php?sec=estado&sec2=operation/agentes/estado_agente'; $url = $config['homeurl'];
$url .= '&refr=60&group_id='.$this->values['groupId']; $url .= 'index.php?sec=monitoring&sec2=operation/tree&refr=0&tab=group&pure='.$config['pure'];
$url .= '&refr=60&searchGroup='.groups_get_name($this->values['groupId']);
} else {
$url = $config['homeurl'];
$url .= 'index.php?sec=estado&sec2=operation/agentes/estado_agente';
$url .= '&refr=60&group_id='.$this->values['groupId'];
}
$data .= '<h1>'; $data .= '<h1>';
$data .= '<a href="'.$url.'">'; $data .= '<a href="'.$url.'">';
$data .= groups_get_name($this->values['groupId']); $data .= groups_get_name($this->values['groupId']);

View File

@ -264,7 +264,7 @@ class HeatmapWidget extends Widget
// Filters. // Filters.
$inputs[] = [ $inputs[] = [
'label' => __('Groups'), 'label' => __('Groups'),
'style' => ($values['type'] === '0') ? '' : 'display:none', 'style' => ($values['type'] === '0' || $values['type'] === '3') ? '' : 'display:none',
'id' => 'li_groups', 'id' => 'li_groups',
'arguments' => [ 'arguments' => [
'type' => 'select_groups', 'type' => 'select_groups',
@ -363,6 +363,7 @@ class HeatmapWidget extends Widget
break; break;
case 0: case 0:
case 3:
$values['groups'] = \get_parameter('groups', 0); $values['groups'] = \get_parameter('groups', 0);
break; break;

View File

@ -704,7 +704,7 @@ class Group extends Entity
$agent['total_count'], $agent['total_count'],
$agent['notinit_count'] $agent['notinit_count']
); );
$data[$key]['alias'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=main&id_agente='.$agent['id_agente'].'"><b>'.$agent['alias'].'</b></a>'; $data[$key]['alias'] = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$agent['id_agente'].'"><b>'.$agent['alias'].'</b></a>';
$data[$key]['status'] = $status_img; $data[$key]['status'] = $status_img;
$data[$key]['alerts'] = agents_tree_view_alert_img($agent['fired_count']); $data[$key]['alerts'] = agents_tree_view_alert_img($agent['fired_count']);
} }

View File

@ -185,8 +185,6 @@
.hover:hover { .hover:hover {
filter: brightness(1.5); filter: brightness(1.5);
stroke-width: 0.009;
stroke: black;
} }
.group { .group {
@ -255,13 +253,14 @@ div#heatmap-controls div.heatmap-refr > div {
.title-dialog { .title-dialog {
width: 40%; width: 40%;
font-weight: bold; font-weight: bold !important;
padding-left: 20px; padding-left: 20px;
} }
.info-dialog { .info-dialog {
width: 60%; width: 60%;
font-weight: bold; display: flex;
align-items: center;
} }
.polyline { .polyline {
@ -271,17 +270,77 @@ div#heatmap-controls div.heatmap-refr > div {
} }
.small-stroke { .small-stroke {
stroke-width: 0.03; stroke-width: 0.005;
}
.tiny-stroke {
stroke-width: 0.01;
}
.medium-stroke {
stroke-width: 0.02;
} }
.big-stroke { .big-stroke {
stroke-width: 0.05; stroke-width: 0.03;
}
.huge-stroke {
stroke-width: 0.04;
} }
.small-size { .small-size {
font-size: 0.2px; font-size: 1%;
}
.tiny-size {
font-size: 2%;
}
.medium-size {
font-size: 4%;
} }
.big-size { .big-size {
font-size: 0.4px; font-size: 6%;
}
.huge-size {
font-size: 8%;
}
.progress_main {
height: 2.5em;
border: 2px solid #82b92e;
position: relative;
width: 100%;
display: inline-block;
display: flex;
border-radius: 4px;
line-height: 9pt;
font-size: 9pt;
}
.progress_main_noborder {
height: 2.5em;
position: relative;
width: 100%;
display: inline-block;
display: flex;
}
.progress_main:before {
content: attr(data-label);
position: absolute;
text-align: center;
left: 0;
right: 0;
margin-top: 0.2em;
}
.progress {
width: 0%;
background: #82b92e;
height: 100%;
float: left;
} }

View File

@ -166,7 +166,7 @@ div.login_logo_icon {
div.login_logo_icon img { div.login_logo_icon img {
margin: 0 auto; margin: 0 auto;
max-height: 185px; max-height: 150px;
max-width: 300px; max-width: 300px;
} }
@ -346,19 +346,21 @@ div.text_banner_login {
span.span1 { span.span1 {
display: block; display: block;
max-width: 700px; max-width: 700px;
font-size: 80pt; font-size: 6vw;
line-height: 80pt; line-height: 6vw;
font-family: "lato-bolder"; font-family: "lato-bolder";
color: #fff; color: #fff;
margin-right: 30px;
} }
span.span2 { span.span2 {
display: block; display: block;
max-width: 700px; max-width: 700px;
font-size: 30pt; font-size: 3vw;
line-height: 30pt; line-height: 3vw;
font-family: "lato-bolder"; font-family: "lato-bolder";
color: #fff; color: #fff;
margin-right: 30px;
} }
div.img_banner_login img { div.img_banner_login img {
@ -384,16 +386,16 @@ div.img_banner_login img {
span.span1 { span.span1 {
display: block; display: block;
max-width: 500px; max-width: 500px;
font-size: 60pt; font-size: 6vw;
line-height: 60pt; line-height: 6vw;
font-weight: bold; font-weight: bold;
color: #fff; color: #fff;
} }
span.span2 { span.span2 {
display: block; display: block;
max-width: 500px; max-width: 500px;
font-size: 20pt; font-size: 3vw;
line-height: 20pt; line-height: 3vw;
font-family: "lato-bolder"; font-family: "lato-bolder";
color: #fff; color: #fff;
} }

View File

@ -241,7 +241,7 @@ table tbody tr td h4 {
a { a {
color: #3f3f3f; color: #3f3f3f;
text-decoration: none; text-decoration: none !important;
} }
a:hover { a:hover {
@ -11931,3 +11931,7 @@ td[id^="table_info_box"] a {
.small-input-select2 div .select2-selection__arrow { .small-input-select2 div .select2-selection__arrow {
top: -1px !important; top: -1px !important;
} }
.break-word {
word-wrap: break-word;
}

View File

@ -131,7 +131,7 @@
<div style='padding-bottom: 50px'> <div style='padding-bottom: 50px'>
<?php <?php
$version = '7.0NG.770'; $version = '7.0NG.770';
$build = '230405'; $build = '230416';
$banner = "v$version Build $build"; $banner = "v$version Build $build";
error_reporting(0); error_reporting(0);

View File

@ -25,6 +25,11 @@
* GNU General Public License for more details. * GNU General Public License for more details.
* ============================================================================ * ============================================================================
*/ */
:root {
--primary-color: #14524f;
--secondary-color: #ffffff;
--input-border: #c0ccdc;
}
@font-face { @font-face {
font-family: "lato"; font-family: "lato";
@ -1505,3 +1510,39 @@ div.nodata_container {
.visual-console-container-dashboard a:visited { .visual-console-container-dashboard a:visited {
color: inherit !important; color: inherit !important;
} }
/* SVG icons mask */
.module_background_state {
mask: url(../../../images/modules@svg.svg) no-repeat center / contain;
-webkit-mask: url(../../../images/modules@svg.svg) no-repeat center / contain;
margin: 0 auto;
}
.alert_background_state {
mask: url(../../../images/alert@svg.svg) no-repeat center / contain;
-webkit-mask: url(../../../images/alert@svg.svg) no-repeat center / contain;
margin: 0 auto;
}
div.main_menu_icon,
img.main_menu_icon[src$=".svg"] {
width: 18px;
height: 18px;
}
img.os-big-icon[src$=".svg"] {
width: 100px;
height: 100px;
}
div.noresizevc.graph.adapted_sparse
div.flot-x-axis.flot-x1-axis.xAxis.x1Axis
> div.flot-tick-label.tickLabel:nth-child(odd) {
visibility: hidden !important;
}
div.noresizevc.graph.adapted_sparse
div.flot-x-axis.flot-x1-axis.xAxis.x1Axis
> div.flot-tick-label.tickLabel:first-child {
visibility: visible !important;
}

View File

@ -213,8 +213,8 @@ class Agent
false, false,
false, false,
false, false,
false, ['class' => 'invert_filter os-big-icon'],
true false
).'</div>'; ).'</div>';
$html .= '<div class="agent_list_ips">'; $html .= '<div class="agent_list_ips">';
$html .= $ip.' - '.groups_get_name($this->agent['id_grupo'], true); $html .= $ip.' - '.groups_get_name($this->agent['id_grupo'], true);

View File

@ -206,6 +206,7 @@ class ModuleGraph
$graph = grafico_modulo_sparse($params); $graph = grafico_modulo_sparse($params);
if ($this->draw_events) { if ($this->draw_events) {
$this->width = 100;
$graph .= '<br>'; $graph .= '<br>';
$graph .= graphic_module_events( $graph .= graphic_module_events(
$this->id, $this->id,

View File

@ -218,7 +218,7 @@ foreach ($rows as $row) {
} }
if ($idModuleInventory != $row['id_module_inventory']) { if ($idModuleInventory != $row['id_module_inventory']) {
if (isset($table) === true && $rowTable >= 1) { if (isset($table) === true && $rowTable > 1) {
html_print_table($table); html_print_table($table);
unset($table); unset($table);
$rowTable = 1; $rowTable = 1;
@ -310,17 +310,16 @@ foreach ($rows as $row) {
$rowTable++; $rowTable++;
} }
if ($iterator1 > 5) { // PRINT COUNT TOTAL.
// PRINT COUNT TOTAL. $table->colspan[$rowTable][0] = 10;
$table->data[$rowTable][0] = '<b>'.__('Total').': </b>'.$iterator1; $table->data[$rowTable][0] = '<b>'.__('Total').': </b>'.$iterator1;
$rowTable++; $rowTable++;
}
} }
$idModuleInventory = $row['id_module_inventory']; $idModuleInventory = $row['id_module_inventory'];
} }
if (isset($table) === true && $rowTable >= 1) { if (isset($table) === true && $rowTable > 1) {
html_print_table($table); html_print_table($table);
$printedTables++; $printedTables++;
} }

View File

@ -331,16 +331,7 @@ if ((bool) $has_remote_conf) {
} }
} }
// $table_agent_count_modules .= ui_print_help_tip(__('Agent statuses are re-calculated by the server, they are not shown in real time.'), true);
/*
$table_agent = html_print_div(
[
'class' => 'agent_details_header',
'content' => $table_agent_header,
],
true
);
*/
$table_agent = $agentStatusHeader.' $table_agent = $agentStatusHeader.'
<div class="agent_details_content"> <div class="agent_details_content">
<div class="agent_details_graph"> <div class="agent_details_graph">
@ -352,26 +343,6 @@ $table_agent = $agentStatusHeader.'
</div>'; </div>';
/*
$table_agent = '
<div class="agent_details_header">
'.$table_agent_header.'
</div>
<div class="agent_details_content">
<div class="agent_details_graph">
'.$table_agent_graph.'
<div class="agent_details_bullets">
'.$table_agent_count_modules.'
</div>
</div>
<div class="agent_details_info">
'.$alive_animation.$table_agent_os.$table_agent_ip.$table_agent_version.$table_agent_description.$remote_cfg.'
</div>
</div>';
*/
/* /*
* END: TABLE AGENT BUILD. * END: TABLE AGENT BUILD.
*/ */

View File

@ -30,7 +30,7 @@ use PandoraFMS\Enterprise\Metaconsole\Node;
global $config; global $config;
require_once 'include/functions_gis.php'; require_once $config['homedir'].'/include/functions_gis.php';
require_once $config['homedir'].'/include/functions_agents.php'; require_once $config['homedir'].'/include/functions_agents.php';
require_once $config['homedir'].'/include/functions_groups.php'; require_once $config['homedir'].'/include/functions_groups.php';
require_once $config['homedir'].'/include/functions_modules.php'; require_once $config['homedir'].'/include/functions_modules.php';
@ -1442,22 +1442,24 @@ $alerttab['active'] = ($tab === 'alert');
// Inventory. // Inventory.
$inventoryCount = db_get_num_rows('SELECT id_agent_module_inventory FROM tagent_module_inventory WHERE id_agente = '.$agent['id_agente']); $inventoryCount = db_get_num_rows('SELECT id_agent_module_inventory FROM tagent_module_inventory WHERE id_agente = '.$agent['id_agente']);
$inventorytab['text'] = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=inventory&id_agente='.$id_agente.'">'.html_print_image(
'images/hardware-software-component@svg.svg',
true,
[
'class' => 'main_menu_icon invert_filter',
'title' => __('Inventory'),
]
).'</a>';
if ($tab == 'inventory') { if ($inventoryCount > 0) {
$inventorytab['active'] = true; $inventorytab['text'] = html_print_menu_button(
} else { [
$inventorytab['active'] = false; 'href' => 'index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=inventory&id_agente='.$id_agente,
'image' => 'images/hardware-software-component@svg.svg',
'title' => __('Inventory'),
],
true
);
if ($tab === 'inventory') {
$inventorytab['active'] = true;
} else {
$inventorytab['active'] = false;
}
} }
// Collection. // Collection.
if ((int) $config['license_nms'] !== 1) { if ((int) $config['license_nms'] !== 1) {
$collectiontab = enterprise_hook('collection_tab'); $collectiontab = enterprise_hook('collection_tab');
@ -1475,9 +1477,8 @@ if ($policyTab === ENTERPRISE_NOT_HOOK) {
$policyTab = ''; $policyTab = '';
} }
// Omnishell. // Omnishell.
$tasks = count_tasks_agent($id_agente); $tasks = enterprise_hook('count_tasks_agent', [$id_agente]);
if ($tasks === true) { if ($tasks === true) {
$omnishellTab = enterprise_hook('omnishell_tab'); $omnishellTab = enterprise_hook('omnishell_tab');
@ -1587,7 +1588,7 @@ if (enterprise_installed() === true && (bool) $config['log_collector'] === true)
$log_viewer_tab['text'] = html_print_menu_button( $log_viewer_tab['text'] = html_print_menu_button(
[ [
'href' => 'index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=log_viewer&id_agente='.$id_agente, 'href' => 'index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=log_viewer&id_agente='.$id_agente,
'image' => 'images/gm_log.png', 'image' => 'images/gm_log@svg.svg',
'title' => __('Log Viewer'), 'title' => __('Log Viewer'),
], ],
true true
@ -1917,7 +1918,7 @@ switch ($tab) {
if ((bool) $config['pure'] === false) { if ((bool) $config['pure'] === false) {
ui_print_standard_header( ui_print_standard_header(
__('Agent main view'), __('Agent main view').' ( '.strtolower(agents_get_alias($id_agente)).' )',
$icon, $icon,
false, false,
($help_header ?? ''), ($help_header ?? ''),
@ -1936,6 +1937,12 @@ if ((bool) $config['pure'] === false) {
'link' => '', 'link' => '',
'label' => $tab_name, 'label' => $tab_name,
], ],
],
[
'id_element' => $id_agente,
'url' => 'operation/agentes/ver_agente&id_agente='.$id_agente,
'label' => agents_get_alias($id_agente),
'section' => 'Agents',
] ]
); );
} }

View File

@ -538,22 +538,27 @@ if (is_ajax() === true) {
); );
$user_timezone = users_get_user_by_id($_SESSION['id_usuario'])['timezone']; $user_timezone = users_get_user_by_id($_SESSION['id_usuario'])['timezone'];
if (!$user_timezone) { if (empty($user_timezone) === true) {
$timezone = timezone_open(date_default_timezone_get()); if (date_default_timezone_get() !== $config['timezone']) {
$datetime_eur = date_create('now', timezone_open($config['timezone'])); $timezone = timezone_open(date_default_timezone_get());
$dif = timezone_offset_get($timezone, $datetime_eur); $datetime_eur = date_create('now', timezone_open($config['timezone']));
date($config['date_format'], $dif); $dif = timezone_offset_get($timezone, $datetime_eur);
if (!date('I')) { date($config['date_format'], $dif);
// For summer -3600sec. if (!date('I')) {
$dif -= 3600; // For summer -3600sec.
} $dif -= 3600;
}
$total_sec = strtotime($tmp->timestamp); $total_sec = strtotime($tmp->timestamp);
$total_sec += $dif; $total_sec += $dif;
$last_contact = date($config['date_format'], $total_sec); $last_contact = date($config['date_format'], $total_sec);
$last_contact_value = ui_print_timestamp($last_contact, true); $last_contact_value = ui_print_timestamp($last_contact, true);
} else {
$title = date($config['date_format'], strtotime($tmp->timestamp));
$value = human_time_comparation(strtotime($tmp->timestamp), 'large');
$last_contact_value = '<span title="'.$title.'">'.$value.'</span>';
}
} else { } else {
$user_timezone = users_get_user_by_id($_SESSION['id_usuario'])['timezone'];
date_default_timezone_set($user_timezone); date_default_timezone_set($user_timezone);
$title = date($config['date_format'], strtotime($tmp->timestamp)); $title = date($config['date_format'], strtotime($tmp->timestamp));
$value = human_time_comparation(strtotime($tmp->timestamp), 'large'); $value = human_time_comparation(strtotime($tmp->timestamp), 'large');
@ -1209,17 +1214,17 @@ foreach ((array) $tags as $id_tag => $tag) {
if (is_array($tag_with) === true if (is_array($tag_with) === true
&& ((array_search($id_tag, $tag_with) === false) || (array_search($id_tag, $tag_with) === null)) && ((array_search($id_tag, $tag_with) === false) || (array_search($id_tag, $tag_with) === null))
) { ) {
$tags_select_with[$id_tag] = ui_print_truncate_text($tag, 50, true); $tags_select_with[$id_tag] = $tag;
} else { } else {
$tag_with_temp[$id_tag] = ui_print_truncate_text($tag, 50, true); $tag_with_temp[$id_tag] = $tag;
} }
if (is_array($tag_without) === true if (is_array($tag_without) === true
&& ((array_search($id_tag, $tag_without) === false) || (array_search($id_tag, $tag_without) === null)) && ((array_search($id_tag, $tag_without) === false) || (array_search($id_tag, $tag_without) === null))
) { ) {
$tags_select_without[$id_tag] = ui_print_truncate_text($tag, 50, true); $tags_select_without[$id_tag] = $tag;
} else { } else {
$tag_without_temp[$id_tag] = ui_print_truncate_text($tag, 50, true); $tag_without_temp[$id_tag] = $tag;
} }
} }
@ -1255,7 +1260,16 @@ $data[0] = html_print_select(
true, true,
true, true,
'select_tags', 'select_tags',
false false,
false,
false,
false,
false,
'',
false,
false,
false,
25
); );
$data[1] = html_print_image( $data[1] = html_print_image(
@ -1297,7 +1311,16 @@ $data[2] = html_print_select(
true, true,
true, true,
'select_tags', 'select_tags',
false false,
false,
false,
false,
false,
'',
false,
false,
false,
25
); );
$tabletags_with->data[] = $data; $tabletags_with->data[] = $data;
@ -1330,7 +1353,16 @@ $data[0] = html_print_select(
true, true,
true, true,
'select_tags', 'select_tags',
false false,
false,
false,
false,
false,
'',
false,
false,
false,
25
); );
$data[1] = html_print_image( $data[1] = html_print_image(
'images/darrowright.png', 'images/darrowright.png',
@ -1368,7 +1400,16 @@ $data[2] = html_print_select(
true, true,
true, true,
'select_tags', 'select_tags',
false false,
false,
false,
false,
false,
'',
false,
false,
false,
25
); );
$tabletags_without->data[] = $data; $tabletags_without->data[] = $data;
$tabletags_without->rowclass[] = ''; $tabletags_without->rowclass[] = '';

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.770 %define version 7.0NG.770
%define release 230405 %define release 230416
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name httpd %define httpd_name httpd

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.770 %define version 7.0NG.770
%define release 230405 %define release 230416
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name httpd %define httpd_name httpd

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.770 %define version 7.0NG.770
%define release 230405 %define release 230416
%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

View File

@ -120,42 +120,17 @@ if (empty($wizard->errMessages) === false) {
} }
} }
$buttons_input = '';
if (empty($form) === false) { if (empty($form) === false) {
// Print form (prepared in ClusterWizard). // Print form (prepared in ClusterWizard).
$submit = $form['submit-external-input'];
unset($form['submit-external-input']);
HTML::printForm($form, false, ($wizard->page < 6)); HTML::printForm($form, false, ($wizard->page < 6));
$buttons_input .= HTML::printInput($submit);
} }
// Print always go back button. // Print always go back button.
HTML::printForm($wizard->getGoBackForm(), false); $buttons_input .= HTML::printForm($wizard->getGoBackForm(), true);
html_print_action_buttons( html_print_action_buttons($buttons_input);
'',
[]
);
?>
<script type="text/javascript">
$(document).ready(function() {
var buttonnext = $('#button-next').parent().html();
$('#button-next').hide();
var buttonnext = buttonnext.replace('button-next','button-next_copy');
var buttonback = $('#button-submit').parent().html();
$('#button-submit').hide();
var buttonback = buttonback.replace('button-submit','button-submit_copy');
var buttonalert = $('#button-add').parent().html();
var buttonalert = buttonalert.replace('button-add','button-add_copy');
$('.action_buttons_right_content').parent().html(buttonnext+buttonback+buttonalert);
var style = $('#principal_action_buttons').attr('style');
$('#principal_action_buttons').attr('style',style+' justify-content: unset;');
// Button next/finish on action buttons.
$('#button-next_copy').click(function(){
$('#button-next').trigger('click');
});
// Button back on action buttons.
$('#button-submit_copy').click(function(){
$('#button-submit').trigger('click');
});
});
</script>

View File

@ -1,5 +1,5 @@
package: pandorafms-server package: pandorafms-server
Version: 7.0NG.770-230405 Version: 7.0NG.770-230416
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -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.770-230405" pandora_version="7.0NG.770-230416"
package_cpan=0 package_cpan=0
package_pandora=1 package_pandora=1

View File

@ -46,7 +46,7 @@ our @EXPORT = qw(
# version: Defines actual version of Pandora Server for this module only # version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.770"; my $pandora_version = "7.0NG.770";
my $pandora_build = "230405"; my $pandora_build = "230416";
our $VERSION = $pandora_version." ".$pandora_build; our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash # Setup hash

View File

@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
# version: Defines actual version of Pandora Server for this module only # version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.770"; my $pandora_version = "7.0NG.770";
my $pandora_build = "230405"; my $pandora_build = "230416";
our $VERSION = $pandora_version." ".$pandora_build; our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] ); our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil} %global __os_install_post %{nil}
%define name pandorafms_server %define name pandorafms_server
%define version 7.0NG.770 %define version 7.0NG.770
%define release 230405 %define release 230416
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}
@ -49,6 +49,7 @@ rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_bindir}/ mkdir -p $RPM_BUILD_ROOT%{_bindir}/
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pandora/ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pandora/
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pandora/conf.d
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/tentacle/ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/tentacle/
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in/conf mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in/conf
@ -60,6 +61,7 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in/trans
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in/commands mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in/commands
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/pandora/ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/pandora/
mkdir -p $RPM_BUILD_ROOT%{prefix}/pandora_server/conf/ mkdir -p $RPM_BUILD_ROOT%{prefix}/pandora_server/conf/
mkdir -p $RPM_BUILD_ROOT%{prefix}/pandora_server/conf.d/
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1/ mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1/
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly/ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly/
@ -89,6 +91,7 @@ if [ ! -f $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/pandora_server ] ; then
install -m 0644 util/pandora_server_logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/pandora_server install -m 0644 util/pandora_server_logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/pandora_server
fi fi
install -m 0640 conf/pandora_server.conf.new $RPM_BUILD_ROOT%{_sysconfdir}/pandora/pandora_server.conf.new install -m 0640 conf/pandora_server.conf.new $RPM_BUILD_ROOT%{_sysconfdir}/pandora/pandora_server.conf.new
install -m 0640 conf/pandora_server_sec.conf.template $RPM_BUILD_ROOT%{_sysconfdir}/pandora/conf.d/pandora_server_sec.conf.template
install -m 0640 conf/tentacle_server.conf.new $RPM_BUILD_ROOT%{_sysconfdir}/tentacle/tentacle_server.conf.new install -m 0640 conf/tentacle_server.conf.new $RPM_BUILD_ROOT%{_sysconfdir}/tentacle/tentacle_server.conf.new
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sudoers.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sudoers.d
@ -228,6 +231,9 @@ exit 0
%defattr(600,root,root) %defattr(600,root,root)
/etc/pandora/pandora_server.conf.new /etc/pandora/pandora_server.conf.new
%defattr(600,root,root)
/etc/pandora/conf.d/pandora_server_sec.conf.template
%defattr(664,root,root) %defattr(664,root,root)
/etc/tentacle/tentacle_server.conf.new /etc/tentacle/tentacle_server.conf.new

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil} %global __os_install_post %{nil}
%define name pandorafms_server %define name pandorafms_server
%define version 7.0NG.770 %define version 7.0NG.770
%define release 230405 %define release 230416
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}
@ -67,6 +67,7 @@ mkdir -p $RPM_BUILD_ROOT/var/spool/pandora/data_in/trans
mkdir -p $RPM_BUILD_ROOT/var/spool/pandora/data_in/commands mkdir -p $RPM_BUILD_ROOT/var/spool/pandora/data_in/commands
mkdir -p $RPM_BUILD_ROOT/var/log/pandora/ mkdir -p $RPM_BUILD_ROOT/var/log/pandora/
mkdir -p $RPM_BUILD_ROOT%{prefix}/pandora_server/conf/ mkdir -p $RPM_BUILD_ROOT%{prefix}/pandora_server/conf/
mkdir -p $RPM_BUILD_ROOT%{prefix}/pandora_server/conf.d/
mkdir -p $RPM_BUILD_ROOT%{prefix}/tentacle/conf/ mkdir -p $RPM_BUILD_ROOT%{prefix}/tentacle/conf/
mkdir -p $RPM_BUILD_ROOT/usr/lib/perl5/ mkdir -p $RPM_BUILD_ROOT/usr/lib/perl5/
mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1/ mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1/
@ -78,6 +79,7 @@ cp -aRf bin/tentacle_server $RPM_BUILD_ROOT/usr/bin/
cp -aRf conf/pandora_* $RPM_BUILD_ROOT%{prefix}/pandora_server/conf/ cp -aRf conf/pandora_* $RPM_BUILD_ROOT%{prefix}/pandora_server/conf/
cp -aRf conf/pandora_server.conf.new $RPM_BUILD_ROOT/etc/pandora/ cp -aRf conf/pandora_server.conf.new $RPM_BUILD_ROOT/etc/pandora/
cp -aRf conf/pandora_server_sec.conf.template $RPM_BUILD_ROOT/etc/pandora/conf.d/pandora_server_sec.conf.template
cp -aRf conf/tentacle_* $RPM_BUILD_ROOT%{prefix}/tentacle/conf/ cp -aRf conf/tentacle_* $RPM_BUILD_ROOT%{prefix}/tentacle/conf/
cp -aRf conf/tentacle_server.conf.new $RPM_BUILD_ROOT/etc/tentacle/ cp -aRf conf/tentacle_server.conf.new $RPM_BUILD_ROOT/etc/tentacle/
cp -aRf util $RPM_BUILD_ROOT%{prefix}/pandora_server/ cp -aRf util $RPM_BUILD_ROOT%{prefix}/pandora_server/
@ -202,6 +204,7 @@ rm -Rf %{prefix}pandora_server
rm -Rf /var/log/pandora rm -Rf /var/log/pandora
rm -Rf /usr/lib/perl5/PandoraFMS/ rm -Rf /usr/lib/perl5/PandoraFMS/
rm -Rf /etc/pandora/pandora_server.conf* rm -Rf /etc/pandora/pandora_server.conf*
rm -Rf /etc/pandora/conf.d/*
rm -Rf /etc/tentacle/tentacle_server.conf* rm -Rf /etc/tentacle/tentacle_server.conf*
rm -Rf /var/spool/pandora rm -Rf /var/spool/pandora
rm -Rf /etc/init.d/pandora_server /etc/init.d/tentacle_serverd rm -Rf /etc/init.d/pandora_server /etc/init.d/tentacle_serverd

View File

@ -9,7 +9,7 @@
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.770" PI_VERSION="7.0NG.770"
PI_BUILD="230405" PI_BUILD="230416"
MODE=$1 MODE=$1
if [ $# -gt 1 ]; then if [ $# -gt 1 ]; then

View File

@ -35,7 +35,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB; use PandoraFMS::DB;
# version: define current version # version: define current version
my $version = "7.0NG.770 Build 230405"; my $version = "7.0NG.770 Build 230416";
# Pandora server configuration # Pandora server configuration
my %conf; my %conf;

View File

@ -36,7 +36,7 @@ use Encode::Locale;
Encode::Locale::decode_argv; Encode::Locale::decode_argv;
# version: define current version # version: define current version
my $version = "7.0NG.770 Build 230405"; my $version = "7.0NG.770 Build 230416";
# save program name for logging # save program name for logging
my $progname = basename($0); my $progname = basename($0);