mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 07:44:35 +02:00
Merge remote-tracking branch 'origin/develop' into ent-13004-mejorar-sincronizacion-agentes-inventario-pandora-itsm
Conflicts: pandora_console/godmode/setup/setup_ITSM.php
This commit is contained in:
commit
9dfc052e2f
@ -304,7 +304,6 @@ server_dependencies=" \
|
||||
perl(Sys::Syslog) \
|
||||
perl(DBI) \
|
||||
perl(XML::Simple) \
|
||||
perl(Geo::IP) \
|
||||
perl(IO::Socket::INET6) \
|
||||
perl(XML::Twig) \
|
||||
expect \
|
||||
@ -344,7 +343,6 @@ ipam_dependencies=" \
|
||||
perl(Sys::Syslog) \
|
||||
perl(DBI) \
|
||||
perl(XML::Simple) \
|
||||
perl(Geo::IP) \
|
||||
perl(IO::Socket::INET6) \
|
||||
perl(XML::Twig)"
|
||||
execute_cmd "yum install -y $ipam_dependencies" "Installing IPAM Instant client"
|
||||
@ -521,8 +519,9 @@ include (\$ownDir . "config_process.php");
|
||||
EO_CONFIG_F
|
||||
|
||||
cat > /etc/httpd/conf.d/pandora.conf << EO_CONFIG_F
|
||||
ServerTokens Prod
|
||||
<Directory "/var/www/html">
|
||||
Options Indexes FollowSymLinks
|
||||
Options FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
@ -417,7 +417,6 @@ server_dependencies=" \
|
||||
perl(Sys::Syslog) \
|
||||
perl(DBI) \
|
||||
perl(XML::Simple) \
|
||||
perl(Geo::IP) \
|
||||
perl(IO::Socket::INET6) \
|
||||
perl(XML::Twig) \
|
||||
expect \
|
||||
@ -457,7 +456,6 @@ ipam_dependencies=" \
|
||||
perl(Sys::Syslog) \
|
||||
perl(DBI) \
|
||||
perl(XML::Simple) \
|
||||
perl(Geo::IP) \
|
||||
perl(IO::Socket::INET6) \
|
||||
perl(XML::Twig)"
|
||||
execute_cmd "dnf install -y $ipam_dependencies" "Installing IPAM Instant client"
|
||||
@ -632,8 +630,9 @@ include (\$ownDir . "config_process.php");
|
||||
EO_CONFIG_F
|
||||
|
||||
cat > /etc/httpd/conf.d/pandora.conf << EO_CONFIG_F
|
||||
ServerTokens Prod
|
||||
<Directory "/var/www/html">
|
||||
Options Indexes FollowSymLinks
|
||||
Options FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
783
extras/deploy-scripts/pandora_deploy_community_el9.sh
Normal file
783
extras/deploy-scripts/pandora_deploy_community_el9.sh
Normal file
@ -0,0 +1,783 @@
|
||||
#!/bin/bash
|
||||
#######################################################
|
||||
# PandoraFMS Community online installation script
|
||||
#######################################################
|
||||
## Tested versions ##
|
||||
# Rockylinux 9.3
|
||||
# RHEL 9.3
|
||||
|
||||
#Constants
|
||||
PANDORA_CONSOLE=/var/www/html/pandora_console
|
||||
PANDORA_SERVER_CONF=/etc/pandora/pandora_server.conf
|
||||
PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
|
||||
|
||||
|
||||
S_VERSION='2024021301'
|
||||
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
|
||||
|
||||
# define default variables
|
||||
[ "$TZ" ] || TZ="Europe/Madrid"
|
||||
[ "$MYVER" ] || MYVER=80
|
||||
[ "$PHPVER" ] || PHPVER=8
|
||||
[ "$DBHOST" ] || DBHOST=127.0.0.1
|
||||
[ "$DBNAME" ] || DBNAME=pandora
|
||||
[ "$DBUSER" ] || DBUSER=pandora
|
||||
[ "$DBPASS" ] || DBPASS='Pandor4!'
|
||||
[ "$DBPORT" ] || DBPORT=3306
|
||||
[ "$DBROOTUSER" ] || DBROOTUSER=root
|
||||
[ "$DBROOTPASS" ] || DBROOTPASS='Pandor4!'
|
||||
[ "$SKIP_PRECHECK" ] || SKIP_PRECHECK=0
|
||||
[ "$SKIP_DATABASE_INSTALL" ] || SKIP_DATABASE_INSTALL=0
|
||||
[ "$SKIP_KERNEL_OPTIMIZATIONS" ] || SKIP_KERNEL_OPTIMIZATIONS=0
|
||||
[ "$POOL_SIZE" ] || POOL_SIZE=$(grep -i total /proc/meminfo | head -1 | awk '{printf "%.2f \n", $(NF-1)*0.4/1024}' | sed "s/\\..*$/M/g")
|
||||
[ "$PANDORA_LTS" ] || PANDORA_LTS=1
|
||||
[ "$PANDORA_BETA" ] || PANDORA_BETA=0
|
||||
[ "$RHEL_CHECK_SUBSCRIPTION" ] || RHEL_CHECK_SUBSCRIPTION=1
|
||||
|
||||
#Check if possible to get os version
|
||||
if [ ! -e /etc/os-release ]; then
|
||||
echo ' > Imposible to determinate the OS version for this machine, please make sure you are intalling in a compatible OS'
|
||||
echo ' > More info: https://pandorafms.com/manual/en/documentation/02_installation/01_installing#minimum_software_requirements'
|
||||
exit -1
|
||||
fi
|
||||
|
||||
# Ansi color code variables
|
||||
red="\e[0;91m"
|
||||
green="\e[0;92m"
|
||||
cyan="\e[0;36m"
|
||||
yellow="\e[33m"
|
||||
reset="\e[0m"
|
||||
|
||||
# Functions
|
||||
execute_cmd () {
|
||||
local cmd="$1"
|
||||
local msg="$2"
|
||||
|
||||
echo -e "${cyan}$msg...${reset}"
|
||||
$cmd &>> "$LOGFILE"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "${red}Fail${reset}"
|
||||
[ "$3" ] && echo "$3"
|
||||
echo "Error installing Pandora FMS for detailed error please check log: $LOGFILE"
|
||||
rm -rf "$HOME"/pandora_deploy_tmp &>> "$LOGFILE"
|
||||
exit 1
|
||||
else
|
||||
echo -e "\e[1A\e ${cyan}$msg...${reset} ${green}OK${reset}"
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
check_cmd_status () {
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "${red}Fail${reset}"
|
||||
[ "$1" ] && echo "$1"
|
||||
echo "Error installing Pandora FMS for detailed error please check log: $LOGFILE"
|
||||
rm -rf "$HOME"/pandora_deploy_tmp/*.rpm* &>> "$LOGFILE"
|
||||
exit 1
|
||||
else
|
||||
echo -e "${green}OK${reset}"
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
check_pre_pandora () {
|
||||
|
||||
echo -en "${cyan}Checking environment ... ${reset}"
|
||||
rpm -qa | grep 'pandorafms_' | grep -v pandorafms_agent_* | grep -v "pandorawmic" | grep -v "pandorafms_made" &>> /dev/null && local fail=true
|
||||
[ -d "$PANDORA_CONSOLE" ] && local fail=true
|
||||
[ -f /usr/bin/pandora_server ] && local fail=true
|
||||
|
||||
if [ "$SKIP_DATABASE_INSTALL" -eq '0' ]; then
|
||||
export MYSQL_PWD=$DBPASS
|
||||
echo "use $DBNAME" | mysql -u$DBUSER -P$DBPORT -h$DBHOST &>> /dev/null && local fail=true
|
||||
fi
|
||||
|
||||
[ ! $fail ]
|
||||
check_cmd_status 'Error there is a current Pandora FMS installation on this node, please remove it to execute a clean install'
|
||||
}
|
||||
|
||||
check_repo_connection () {
|
||||
execute_cmd "ping -c 2 firefly.pandorafms.com" "Checking Community repo"
|
||||
execute_cmd "ping -c 2 support.pandorafms.com" "Checking Enterprise repo"
|
||||
}
|
||||
|
||||
check_root_permissions () {
|
||||
echo -en "${cyan}Checking root account... ${reset}"
|
||||
if [ "$(whoami)" != "root" ]; then
|
||||
echo -e "${red}Fail${reset}"
|
||||
echo "Please use a root account or sudo for installing Pandora FMS"
|
||||
echo "Error installing Pandora FMS for detailed error please check log: $LOGFILE"
|
||||
exit 1
|
||||
|
||||
else
|
||||
echo -e "${green}OK${reset}"
|
||||
fi
|
||||
}
|
||||
|
||||
installing_docker () {
|
||||
#Installing docker for debug
|
||||
echo "Start installig docker" &>> "$LOGFILE"
|
||||
dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo &>> "$LOGFILE"
|
||||
dnf install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin &>> "$LOGFILE"
|
||||
systemctl disable --now docker &>> "$LOGFILE"
|
||||
systemctl disable docker.socket --now &>> "$LOGFILE"
|
||||
echo "End installig docker" &>> "$LOGFILE"
|
||||
}
|
||||
|
||||
# Function to check if a password meets the MySQL secure password requirements
|
||||
is_mysql_secure_password() {
|
||||
local password=$1
|
||||
|
||||
# Check password length (at least 8 characters)
|
||||
if [[ ${#password} -lt 8 ]]; then
|
||||
echo "Password length should be at least 8 characters."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check if password contains at least one uppercase letter
|
||||
if [[ $password == ${password,,} ]]; then
|
||||
echo "Password should contain at least one uppercase letter."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check if password contains at least one lowercase letter
|
||||
if [[ $password == ${password^^} ]]; then
|
||||
echo "Password should contain at least one lowercase letter."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check if password contains at least one digit
|
||||
if ! [[ $password =~ [0-9] ]]; then
|
||||
echo "Password should contain at least one digit."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check if password contains at least one special character
|
||||
if ! [[ $password =~ [[:punct:]] ]]; then
|
||||
echo "Password should contain at least one special character."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check if password is not a common pattern (e.g., "password", "123456")
|
||||
local common_patterns=("password" "123456" "qwerty")
|
||||
for pattern in "${common_patterns[@]}"; do
|
||||
if [[ $password == *"$pattern"* ]]; then
|
||||
echo "Password should not contain common patterns."
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
|
||||
# If all checks pass, the password is MySQL secure compliant
|
||||
return 0
|
||||
}
|
||||
|
||||
## Main
|
||||
echo "Starting PandoraFMS Community deployment EL8 ver. $S_VERSION"
|
||||
|
||||
#check tools
|
||||
if ! grep --version &>> $LOGFILE ; then echo 'Error grep is not detected on the system, grep tool is needed for installation.'; exit -1 ;fi
|
||||
if ! sed --version &>> $LOGFILE ; then echo 'Error sed is not detected on the system, sed tool is needed for installation.'; exit -1 ;fi
|
||||
if ! curl --version &>> $LOGFILE ; then echo 'Error curl is not detected on the system, curl tool is needed for installation.'; exit -1 ;fi
|
||||
if ! ping -V &>> $LOGFILE ; then echo 'Error ping is not detected on the system, ping tool is needed for installation.'; exit -1 ;fi
|
||||
|
||||
# Centos Version
|
||||
if [ ! "$(grep -Ei 'centos|rocky|Almalinux|Red Hat Enterprise' /etc/redhat-release)" ]; then
|
||||
printf "\n ${red}Error this is not a Centos/Rocky/Almalinux Base system, this installer is compatible with RHEL/Almalinux/Centos/Rockylinux systems only${reset}\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
echo -en "${cyan}Check Centos Version...${reset}"
|
||||
[[ $(sed -nr 's/VERSION_ID+=\s*"([0-9]).*"$/\1/p' /etc/os-release) -eq '9' ]]
|
||||
check_cmd_status 'Error OS version, RHEL/Almalinux/Centos/Rockylinux 8.x is expected'
|
||||
|
||||
#Detect OS
|
||||
os_name=$(grep ^PRETTY_NAME= /etc/os-release | cut -d '=' -f2 | tr -d '"')
|
||||
execute_cmd "echo $os_name" "OS detected: ${os_name}"
|
||||
|
||||
# initialice logfile
|
||||
execute_cmd "echo 'Starting community deployment' > $LOGFILE" "All installer activity is logged on $LOGFILE"
|
||||
echo "Community installer version: $S_VERSION" >> "$LOGFILE"
|
||||
|
||||
# Pre checks
|
||||
# Root permisions
|
||||
check_root_permissions
|
||||
|
||||
# Pre installed pandora
|
||||
[ "$SKIP_PRECHECK" == 1 ] || check_pre_pandora
|
||||
|
||||
#advicing BETA PROGRAM
|
||||
INSTALLING_VER="${green}RRR version enable using RRR 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
|
||||
|
||||
# Connectivity
|
||||
check_repo_connection
|
||||
|
||||
# Systemd
|
||||
execute_cmd "systemctl status" "Checking SystemD" 'This is not a SystemD enable system, if tryng to use in a docker env please check: https://github.com/pandorafms/pandorafms/tree/develop/extras/docker/centos8'
|
||||
|
||||
# Check memomry greather or equal to 2G
|
||||
execute_cmd "[ $(grep MemTotal /proc/meminfo | awk '{print $2}') -ge 1700000 ]" 'Checking memory (required: 2 GB)'
|
||||
|
||||
# Check disk size at least 10 Gb free space
|
||||
execute_cmd "[ $(df -BM / | tail -1 | awk '{print $4}' | tr -d M) -gt 10000 ]" 'Checking Disk (required: 10 GB free min)'
|
||||
|
||||
# Setting timezone
|
||||
rm -rf /etc/localtime &>> "$LOGFILE"
|
||||
execute_cmd "timedatectl set-timezone $TZ" "Setting Timezone $TZ"
|
||||
|
||||
# Execute tools check
|
||||
execute_cmd "awk --version" 'Checking needed tools: awk'
|
||||
execute_cmd "grep --version" 'Checking needed tools: grep'
|
||||
execute_cmd "sed --version" 'Checking needed tools: sed'
|
||||
execute_cmd "dnf --version" 'Checking needed tools: dnf'
|
||||
|
||||
#Check mysql pass
|
||||
execute_cmd "is_mysql_secure_password $DBROOTPASS" "Checking DBROOTPASS password match policy" 'This password do not match minimum MySQL policy requirements, more info in: https://dev.mysql.com/doc/refman/8.0/en/validate-password.html'
|
||||
execute_cmd "is_mysql_secure_password $DBPASS" "Checking DBPASS password match policy" 'This password do not match minimum MySQL policy requirements, more info in: https://dev.mysql.com/doc/refman/8.0/en/validate-password.html'
|
||||
|
||||
# Creating working directory
|
||||
rm -rf "$HOME"/pandora_deploy_tmp/*.rpm* &>> "$LOGFILE"
|
||||
mkdir "$HOME"/pandora_deploy_tmp &>> "$LOGFILE"
|
||||
execute_cmd "cd $HOME/pandora_deploy_tmp" "Moving to workspace: $HOME/pandora_deploy_tmp"
|
||||
|
||||
## Extra steps on redhat envs
|
||||
if [ "$(grep -Ei 'Red Hat Enterprise' /etc/redhat-release)" ]; then
|
||||
## In case REDHAT
|
||||
if [ "$RHEL_CHECK_SUBSCRIPTION" -eq '1' ] ; then
|
||||
|
||||
# Check susbscription manager status:
|
||||
echo -en "${cyan}Checking Red Hat Enterprise subscription... ${reset}"
|
||||
subscription-manager list &>> "$LOGFILE"
|
||||
subscription-manager status &>> "$LOGFILE"
|
||||
check_cmd_status 'Error checking subscription status, make sure your server is activated and suscribed to Red Hat Enterprise repositories'
|
||||
|
||||
# Ckeck repolist
|
||||
dnf repolist &>> "$LOGFILE"
|
||||
echo -en "${cyan}Checking Red Hat Enterprise repolist... ${reset}"
|
||||
dnf repolist | grep 'rhel-9-for-x86_64-baseos-rpms' &>> "$LOGFILE"
|
||||
check_cmd_status 'Error checking repositories status, could try a subscription-manager attach command or contact sysadmin'
|
||||
fi
|
||||
#install extra repos
|
||||
extra_repos=" \
|
||||
tar \
|
||||
dnf-utils \
|
||||
https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm \
|
||||
https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-9.noarch.rpm \
|
||||
https://rpms.remirepo.net/enterprise/remi-release-9.rpm \
|
||||
https://repo.percona.com/yum/percona-release-latest.noarch.rpm"
|
||||
|
||||
execute_cmd "dnf install -y $extra_repos" "Installing extra repositories"
|
||||
execute_cmd "subscription-manager repos --enable codeready-builder-for-rhel-9-x86_64-rpms" "Enabling subscription to codeready-builder"
|
||||
else
|
||||
# For alma/rocky/centos
|
||||
extra_repos=" \
|
||||
tar \
|
||||
dnf-utils \
|
||||
https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm \
|
||||
https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-9.noarch.rpm \
|
||||
https://rpms.remirepo.net/enterprise/remi-release-9.rpm \
|
||||
https://repo.percona.com/yum/percona-release-latest.noarch.rpm"
|
||||
|
||||
execute_cmd "dnf install -y $extra_repos" "Installing extra repositories"
|
||||
execute_cmd "dnf config-manager --enable crb" "Configuring crb"
|
||||
fi
|
||||
|
||||
execute_cmd "installing_docker" "Installing Docker for debug"
|
||||
|
||||
#Installing wget
|
||||
execute_cmd "dnf install -y wget" "Installing wget"
|
||||
|
||||
#Installing php
|
||||
execute_cmd "dnf module reset -y php " "Disabling standard PHP module"
|
||||
|
||||
if [ "$PHPVER" -eq '8' ] ; then
|
||||
PHPVER=8.2
|
||||
fi
|
||||
execute_cmd "dnf module install -y php:remi-$PHPVER" "Configuring PHP $PHPVER"
|
||||
|
||||
|
||||
|
||||
if [ "$MYVER" -eq '80' ] ; then
|
||||
execute_cmd "percona-release setup ps80 -y" "Enabling mysql80 module"
|
||||
execute_cmd "dnf install -y percona-server-server percona-xtrabackup-80" "Installing Percona Server 80"
|
||||
fi
|
||||
|
||||
# Console dependencies
|
||||
console_dependencies=" \
|
||||
php \
|
||||
postfix \
|
||||
php-mcrypt \
|
||||
php-cli \
|
||||
php-gd \
|
||||
php-curl \
|
||||
php-session \
|
||||
php-mysqlnd \
|
||||
php-ldap \
|
||||
php-zip \
|
||||
php-zlib \
|
||||
php-fileinfo \
|
||||
php-gettext \
|
||||
php-snmp \
|
||||
php-mbstring \
|
||||
php-pecl-zip \
|
||||
php-xmlrpc \
|
||||
libxslt \
|
||||
wget \
|
||||
php-xml \
|
||||
httpd \
|
||||
mod_php \
|
||||
atk \
|
||||
avahi-libs \
|
||||
cairo \
|
||||
cups-libs \
|
||||
fribidi \
|
||||
gd \
|
||||
gdk-pixbuf2 \
|
||||
ghostscript \
|
||||
graphite2 \
|
||||
graphviz \
|
||||
gtk2 \
|
||||
harfbuzz \
|
||||
hicolor-icon-theme \
|
||||
hwdata \
|
||||
jasper-libs \
|
||||
lcms2 \
|
||||
libICE \
|
||||
libSM \
|
||||
libXaw \
|
||||
libXcomposite \
|
||||
libXcursor \
|
||||
libXdamage \
|
||||
libXext \
|
||||
libXfixes \
|
||||
libXft \
|
||||
libXi \
|
||||
libXinerama \
|
||||
libXmu \
|
||||
libXrandr \
|
||||
libXrender \
|
||||
libXt \
|
||||
libXxf86vm \
|
||||
libdrm \
|
||||
libfontenc \
|
||||
libglvnd \
|
||||
libglvnd-egl \
|
||||
libglvnd-glx \
|
||||
libpciaccess \
|
||||
librsvg2 \
|
||||
libthai \
|
||||
libtool-ltdl \
|
||||
libwayland-client \
|
||||
libwayland-server \
|
||||
libxshmfence \
|
||||
mesa-libEGL \
|
||||
mesa-libGL \
|
||||
mesa-libgbm \
|
||||
mesa-libglapi \
|
||||
pango \
|
||||
pixman \
|
||||
xorg-x11-fonts-75dpi \
|
||||
xorg-x11-fonts-misc \
|
||||
poppler-data \
|
||||
php-yaml \
|
||||
mod_ssl \
|
||||
libzstd \
|
||||
openldap-clients \
|
||||
https://firefly.pandorafms.com/centos8/chromium-110.0.5481.177-1.el7.x86_64.rpm \
|
||||
https://firefly.pandorafms.com/centos8/chromium-common-110.0.5481.177-1.el7.x86_64.rpm \
|
||||
https://firefly.pandorafms.com/centos8/pandora_gotty-1.0-1.el8.x86_64.rpm \
|
||||
https://firefly.pandorafms.com/centos8/pandorafms_made-0.1.0-1.el8.x86_64.rpm "
|
||||
execute_cmd "dnf install -y $console_dependencies" "Installing Pandora FMS Console dependencies"
|
||||
|
||||
# Server dependencies
|
||||
server_dependencies=" \
|
||||
perl \
|
||||
vim \
|
||||
fping \
|
||||
perl-IO-Compress \
|
||||
nmap \
|
||||
sudo \
|
||||
perl-Time-HiRes \
|
||||
nfdump \
|
||||
net-snmp-utils \
|
||||
perl(NetAddr::IP) \
|
||||
perl(Sys::Syslog) \
|
||||
perl(DBI) \
|
||||
perl(XML::Simple) \
|
||||
perl(IO::Socket::INET6) \
|
||||
perl(XML::Twig) \
|
||||
perl-JSON \
|
||||
expect \
|
||||
openssh-clients \
|
||||
java \
|
||||
bind-utils \
|
||||
whois \
|
||||
libnsl \
|
||||
libxcrypt-compat \
|
||||
https://firefly.pandorafms.com/pandorafms-el9/perl-Geo-IP-1.51-1.el9.x86_64.rpm \
|
||||
https://firefly.pandorafms.com/centos8/pandorawmic-1.0.0-1.x86_64.rpm"
|
||||
execute_cmd "dnf install -y $server_dependencies" "Installing Pandora FMS Server dependencies"
|
||||
|
||||
#ipam dependencies
|
||||
ipam_dependencies=" \
|
||||
perl(NetAddr::IP) \
|
||||
perl(Sys::Syslog) \
|
||||
perl(DBI) \
|
||||
perl(XML::Simple) \
|
||||
perl(IO::Socket::INET6) \
|
||||
perl(XML::Twig)"
|
||||
execute_cmd "dnf install -y $ipam_dependencies" "Installing IPAM Instant client"
|
||||
|
||||
# Disabling SELINUX and firewalld
|
||||
setenforce 0 &>> "$LOGFILE"
|
||||
sed -i -e "s/^SELINUX=.*/SELINUX=disabled/g" /etc/selinux/config &>> "$LOGFILE"
|
||||
systemctl disable firewalld --now &>> "$LOGFILE"
|
||||
|
||||
|
||||
# Adding standar cnf for initial setup.
|
||||
cat > /etc/my.cnf << EO_CONFIG_TMP
|
||||
[mysqld]
|
||||
datadir=/var/lib/mysql
|
||||
socket=/var/lib/mysql/mysql.sock
|
||||
symbolic-links=0
|
||||
log-error=/var/log/mysqld.log
|
||||
pid-file=/var/run/mysqld/mysqld.pid
|
||||
EO_CONFIG_TMP
|
||||
|
||||
#Configuring Database
|
||||
if [ "$SKIP_DATABASE_INSTALL" -eq '0' ] ; then
|
||||
execute_cmd "systemctl start mysqld" "Starting database engine"
|
||||
export MYSQL_PWD=$(grep "temporary password" /var/log/mysqld.log | rev | cut -d' ' -f1 | rev)
|
||||
if [ "$MYVER" -eq '80' ] ; then
|
||||
echo """
|
||||
SET PASSWORD FOR '$DBROOTUSER'@'localhost' = 'Pandor4!';
|
||||
SET PASSWORD FOR '$DBROOTUSER'@'localhost' = '$DBROOTPASS';
|
||||
""" | mysql --connect-expired-password -u$DBROOTUSER &>> "$LOGFILE"
|
||||
fi
|
||||
|
||||
if [ "$MYVER" -ne '80' ] ; then
|
||||
echo """
|
||||
SET PASSWORD FOR '$DBROOTUSER'@'localhost' = PASSWORD('Pandor4!');
|
||||
SET PASSWORD FOR '$DBROOTUSER'@'localhost' = PASSWORD('$DBROOTPASS');
|
||||
""" | mysql --connect-expired-password -u$DBROOTUSER &>> "$LOGFILE"fi
|
||||
fi
|
||||
|
||||
export MYSQL_PWD=$DBROOTPASS
|
||||
echo -en "${cyan}Creating Pandora FMS database...${reset}"
|
||||
echo "create database $DBNAME" | mysql -u$DBROOTUSER -P$DBPORT -h$DBHOST
|
||||
check_cmd_status "Error creating database $DBNAME, is this an empty node? if you have a previus installation please contact with support."
|
||||
|
||||
echo "CREATE USER \"$DBUSER\"@'%' IDENTIFIED BY \"$DBPASS\";" | mysql -u$DBROOTUSER -P$DBPORT -h$DBHOST
|
||||
echo "ALTER USER \"$DBUSER\"@'%' IDENTIFIED WITH mysql_native_password BY \"$DBPASS\"" | mysql -u$DBROOTUSER -P$DBPORT -h$DBHOST
|
||||
echo "GRANT ALL PRIVILEGES ON $DBNAME.* TO \"$DBUSER\"@'%'" | mysql -u$DBROOTUSER -P$DBPORT -h$DBHOST
|
||||
|
||||
#Generating my.cnf
|
||||
cat > /etc/my.cnf << EO_CONFIG_F
|
||||
[mysqld]
|
||||
datadir=/var/lib/mysql
|
||||
socket=/var/lib/mysql/mysql.sock
|
||||
user=mysql
|
||||
character-set-server=utf8
|
||||
skip-character-set-client-handshake
|
||||
# Disabling symbolic-links is recommended to prevent assorted security risks
|
||||
symbolic-links=0
|
||||
# Mysql optimizations for Pandora FMS
|
||||
# Please check the documentation in https://pandorafms.com for better results
|
||||
|
||||
max_allowed_packet = 64M
|
||||
innodb_buffer_pool_size = $POOL_SIZE
|
||||
innodb_lock_wait_timeout = 90
|
||||
innodb_file_per_table
|
||||
innodb_flush_log_at_trx_commit = 0
|
||||
innodb_flush_method = O_DIRECT
|
||||
innodb_log_file_size = 64M
|
||||
innodb_log_buffer_size = 16M
|
||||
innodb_io_capacity = 300
|
||||
thread_cache_size = 8
|
||||
thread_stack = 256K
|
||||
max_connections = 100
|
||||
|
||||
key_buffer_size=4M
|
||||
read_buffer_size=128K
|
||||
read_rnd_buffer_size=128K
|
||||
sort_buffer_size=128K
|
||||
join_buffer_size=4M
|
||||
|
||||
#skip-log-bin
|
||||
|
||||
sql_mode=""
|
||||
|
||||
[mysqld_safe]
|
||||
log-error=/var/log/mysqld.log
|
||||
pid-file=/var/run/mysqld/mysqld.pid
|
||||
|
||||
EO_CONFIG_F
|
||||
|
||||
execute_cmd "systemctl restart mysqld" "Configuring database engine"
|
||||
execute_cmd "systemctl enable mysqld --now" "Enabling Database service"
|
||||
fi
|
||||
export MYSQL_PWD=$DBPASS
|
||||
|
||||
#Define packages
|
||||
if [ "$PANDORA_LTS" -eq '1' ] ; then
|
||||
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_server-7.0NG.noarch.rpm"
|
||||
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_console-7.0NG.noarch.rpm"
|
||||
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux_bin-7.0NG.x86_64.rpm"
|
||||
elif [ "$PANDORA_LTS" -ne '1' ] ; then
|
||||
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_server-7.0NG.x86_64.rpm"
|
||||
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_console-7.0NG.x86_64.rpm"
|
||||
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux_bin-7.0NG.x86_64.rpm"
|
||||
fi
|
||||
|
||||
# if beta is enable
|
||||
if [ "$PANDORA_BETA" -eq '1' ] ; then
|
||||
PANDORA_SERVER_PACKAGE="https://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_server-latest.x86_64.rpm"
|
||||
PANDORA_CONSOLE_PACKAGE="https://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_console-latest.x86_64.rpm"
|
||||
PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux_bin-7.0NG.x86_64.rpm"
|
||||
fi
|
||||
|
||||
# Downloading Pandora Packages
|
||||
execute_cmd "curl -LSs --output pandorafms_server-7.0NG.noarch.rpm ${PANDORA_SERVER_PACKAGE}" "Downloading Pandora FMS Server community"
|
||||
execute_cmd "curl -LSs --output pandorafms_console-7.0NG.noarch.rpm ${PANDORA_CONSOLE_PACKAGE}" "Downloading Pandora FMS Console community"
|
||||
execute_cmd "curl -LSs --output pandorafms_agent_linux-7.0NG.noarch.rpm ${PANDORA_AGENT_PACKAGE}" "Downloading Pandora FMS Agent community"
|
||||
|
||||
# Install Pandora
|
||||
execute_cmd "dnf install -y $HOME/pandora_deploy_tmp/pandorafms_console*.rpm $HOME/pandora_deploy_tmp/pandorafms_agent*.rpm" "Installing Pandora FMS packages"
|
||||
execute_cmd "rpm -i --nodeps $HOME/pandora_deploy_tmp/pandorafms_server-7.0NG.noarch.rpm " "Installing Pandora FMS Server package"
|
||||
|
||||
# Enable Services
|
||||
execute_cmd "systemctl enable httpd --now" "Enabling HTTPD service"
|
||||
execute_cmd "systemctl enable php-fpm --now" "Enabling PHP-FPM service"
|
||||
|
||||
# Populate Database
|
||||
echo -en "${cyan}Loading pandoradb.sql to $DBNAME database...${reset}"
|
||||
mysql -u$DBUSER -P$DBPORT -h$DBHOST $DBNAME < $PANDORA_CONSOLE/pandoradb.sql &>> "$LOGFILE"
|
||||
check_cmd_status 'Error Loading database schema'
|
||||
|
||||
echo -en "${cyan}Loading pandoradb_data.sql to $DBNAME database...${reset}"
|
||||
mysql -u$DBUSER -P$DBPORT -h$DBHOST $DBNAME < $PANDORA_CONSOLE/pandoradb_data.sql &>> "$LOGFILE"
|
||||
check_cmd_status 'Error Loading database schema data'
|
||||
|
||||
# Configure console
|
||||
cat > $PANDORA_CONSOLE/include/config.php << EO_CONFIG_F
|
||||
<?php
|
||||
\$config["dbtype"] = "mysql";
|
||||
\$config["dbname"]="$DBNAME";
|
||||
\$config["dbuser"]="$DBUSER";
|
||||
\$config["dbpass"]="$DBPASS";
|
||||
\$config["dbhost"]="$DBHOST";
|
||||
\$config["homedir"]="$PANDORA_CONSOLE";
|
||||
\$config["homeurl"]="/pandora_console";
|
||||
error_reporting(0);
|
||||
\$ownDir = dirname(__FILE__) . '/';
|
||||
include (\$ownDir . "config_process.php");
|
||||
|
||||
EO_CONFIG_F
|
||||
|
||||
cat > /etc/httpd/conf.d/pandora.conf << EO_CONFIG_F
|
||||
ServerTokens Prod
|
||||
<Directory "/var/www/html">
|
||||
Options FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
EO_CONFIG_F
|
||||
|
||||
# Temporal quitar htaccess
|
||||
sed -i -e "s/php_flag engine off//g" $PANDORA_CONSOLE/images/.htaccess
|
||||
sed -i -e "s/php_flag engine off//g" $PANDORA_CONSOLE/attachment/.htaccess
|
||||
|
||||
# Fixing console permissions
|
||||
chmod 600 $PANDORA_CONSOLE/include/config.php
|
||||
chown apache. $PANDORA_CONSOLE/include/config.php
|
||||
mv $PANDORA_CONSOLE/install.php $PANDORA_CONSOLE/install.done &>> "$LOGFILE"
|
||||
|
||||
# Prepare php.ini
|
||||
sed -i -e "s/^max_input_time.*/max_input_time = -1/g" /etc/php.ini
|
||||
sed -i -e "s/^max_execution_time.*/max_execution_time = 0/g" /etc/php.ini
|
||||
sed -i -e "s/^upload_max_filesize.*/upload_max_filesize = 800M/g" /etc/php.ini
|
||||
sed -i -e "s/^memory_limit.*/memory_limit = 800M/g" /etc/php.ini
|
||||
sed -i -e "s/.*post_max_size =.*/post_max_size = 800M/" /etc/php.ini
|
||||
|
||||
#adding 900s to httpd timeout and 300 to ProxyTimeout
|
||||
echo 'TimeOut 900' > /etc/httpd/conf.d/timeout.conf
|
||||
echo 'ProxyTimeout 300' >> /etc/httpd/conf.d/timeout.conf
|
||||
|
||||
cat > /var/www/html/index.html << EOF_INDEX
|
||||
<meta HTTP-EQUIV="REFRESH" content="0; url=/pandora_console/">
|
||||
EOF_INDEX
|
||||
|
||||
execute_cmd "systemctl restart httpd" "Restarting httpd after configuration"
|
||||
execute_cmd "systemctl restart php-fpm" "Restarting php-fpm after configuration"
|
||||
|
||||
# prepare snmptrapd
|
||||
cat > /etc/snmp/snmptrapd.conf << EOF
|
||||
authCommunity log public
|
||||
disableAuthorization yes
|
||||
EOF
|
||||
|
||||
# Prepare Server conf
|
||||
sed -i -e "s/^dbhost.*/dbhost $DBHOST/g" $PANDORA_SERVER_CONF
|
||||
sed -i -e "s/^dbname.*/dbname $DBNAME/g" $PANDORA_SERVER_CONF
|
||||
sed -i -e "s/^dbuser.*/dbuser $DBUSER/g" $PANDORA_SERVER_CONF
|
||||
sed -i -e "s|^dbpass.*|dbpass $DBPASS|g" $PANDORA_SERVER_CONF
|
||||
sed -i -e "s/^dbport.*/dbport $DBPORT/g" $PANDORA_SERVER_CONF
|
||||
sed -i -e "s/^#.mssql_driver.*/mssql_driver $MS_ID/g" $PANDORA_SERVER_CONF
|
||||
|
||||
#check fping
|
||||
fping_bin=$(which fping)
|
||||
execute_cmd "[ $fping_bin ]" "Check fping location: $fping_bin"
|
||||
if [ "$fping_bin" != "" ]; then
|
||||
sed -i -e "s|^fping.*|fping $fping_bin|g" $PANDORA_SERVER_CONF
|
||||
fi
|
||||
|
||||
# Enable agent remote config
|
||||
sed -i "s/^remote_config.*$/remote_config 1/g" $PANDORA_AGENT_CONF
|
||||
|
||||
# Kernel optimization
|
||||
if [ "$SKIP_KERNEL_OPTIMIZATIONS" -eq '0' ] ; then
|
||||
|
||||
old_sysctl_file=$(cat /etc/sysctl.conf)
|
||||
|
||||
cat >> /etc/sysctl.conf <<EO_KO
|
||||
# Pandora FMS Optimization
|
||||
|
||||
# default=5
|
||||
net.ipv4.tcp_syn_retries = 3
|
||||
|
||||
# default=5
|
||||
net.ipv4.tcp_synack_retries = 3
|
||||
|
||||
# default=1024
|
||||
net.ipv4.tcp_max_syn_backlog = 65536
|
||||
|
||||
# default=124928
|
||||
net.core.wmem_max = 8388608
|
||||
|
||||
# default=131071
|
||||
net.core.rmem_max = 8388608
|
||||
|
||||
# default = 128
|
||||
net.core.somaxconn = 1024
|
||||
|
||||
# default = 20480
|
||||
net.core.optmem_max = 81920
|
||||
|
||||
EO_KO
|
||||
|
||||
echo -en "${cyan}Applying Kernel optimization... ${reset}"
|
||||
sysctl --system &>> $LOGFILE
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "${red}Fail${reset}"
|
||||
echo -e "${yellow}Your kernel could not be optimized, you may be running this script in a virtualized environment with no support for accessing the kernel.${reset}"
|
||||
echo -e "${yellow}This system can be used for testing but is not recommended for a production environment.${reset}"
|
||||
echo "$old_sysctl_file" > old_sysctl_file
|
||||
else
|
||||
echo -e "${green}OK${reset}"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
# Fix pandora_server.{log,error} permissions to allow Console check them
|
||||
chown pandora:apache /var/log/pandora
|
||||
chmod g+s /var/log/pandora
|
||||
|
||||
cat > /etc/logrotate.d/pandora_server <<EO_LR
|
||||
/var/log/pandora/pandora_server.log
|
||||
/var/log/pandora/web_socket.log
|
||||
/var/log/pandora/pandora_server.error {
|
||||
su root apache
|
||||
weekly
|
||||
missingok
|
||||
size 300000
|
||||
rotate 3
|
||||
maxage 90
|
||||
compress
|
||||
notifempty
|
||||
copytruncate
|
||||
create 660 pandora apache
|
||||
}
|
||||
|
||||
/var/log/pandora/pandora_snmptrap.log {
|
||||
su root apache
|
||||
weekly
|
||||
missingok
|
||||
size 500000
|
||||
rotate 1
|
||||
maxage 30
|
||||
notifempty
|
||||
copytruncate
|
||||
create 660 pandora apache
|
||||
}
|
||||
|
||||
EO_LR
|
||||
|
||||
cat > /etc/logrotate.d/pandora_agent <<EO_LRA
|
||||
/var/log/pandora/pandora_agent.log {
|
||||
su root apache
|
||||
weekly
|
||||
missingok
|
||||
size 300000
|
||||
rotate 3
|
||||
maxage 90
|
||||
compress
|
||||
notifempty
|
||||
copytruncate
|
||||
}
|
||||
|
||||
EO_LRA
|
||||
|
||||
chmod 0644 /etc/logrotate.d/pandora_server
|
||||
chmod 0644 /etc/logrotate.d/pandora_agent
|
||||
|
||||
# Enable pandora ha service
|
||||
systemctl enable pandora_server --now &>> "$LOGFILE"
|
||||
execute_cmd "/etc/init.d/pandora_server start" "Starting Pandora FMS Server"
|
||||
|
||||
# starting tentacle server
|
||||
systemctl enable tentacle_serverd &>> "$LOGFILE"
|
||||
execute_cmd "service tentacle_serverd start" "Starting Tentacle Server"
|
||||
|
||||
# Enabling console cron
|
||||
execute_cmd "echo \"* * * * * root wget -q -O - --no-check-certificate --load-cookies /tmp/cron-session-cookies --save-cookies /tmp/cron-session-cookies --keep-session-cookies http://127.0.0.1/pandora_console/cron.php >> $PANDORA_CONSOLE/log/cron.log\" >> /etc/crontab" "Enabling Pandora FMS Console cron"
|
||||
echo "* * * * * root wget -q -O - --no-check-certificate --load-cookies /tmp/cron-session-cookies --save-cookies /tmp/cron-session-cookies --keep-session-cookies http://127.0.0.1/pandora_console/cron.php >> $PANDORA_CONSOLE/log/cron.log" >> /etc/crontab
|
||||
## Enabling agent
|
||||
systemctl enable pandora_agent_daemon &>> "$LOGFILE"
|
||||
execute_cmd "systemctl start pandora_agent_daemon" "Starting Pandora FMS Agent"
|
||||
|
||||
# Enable postfix
|
||||
systemctl enable postfix --now &>> "$LOGFILE"
|
||||
|
||||
#SSH banner
|
||||
[ "$(curl -s ifconfig.me)" ] && ipplublic=$(curl -s ifconfig.me)
|
||||
|
||||
cat > /etc/issue.net << EOF_banner
|
||||
|
||||
Welcome to Pandora FMS appliance on RHEL/Rocky Linux 8
|
||||
------------------------------------------
|
||||
Go to Public http://$ipplublic/pandora_console to login web console
|
||||
$(ip addr | grep -w "inet" | grep -v "127.0.0.1" | grep -v "172.17.0.1" | awk '{print $2}' | awk -F '/' '{print "Go to Local http://"$1"/pandora_console to login web console"}')
|
||||
|
||||
You can find more information at http://pandorafms.com
|
||||
|
||||
EOF_banner
|
||||
|
||||
rm -f /etc/issue
|
||||
ln -s /etc/issue.net /etc/issue
|
||||
|
||||
echo 'Banner /etc/issue.net' >> /etc/ssh/sshd_config
|
||||
|
||||
# Remove temporary files
|
||||
execute_cmd "echo done" "Pandora FMS Community installed"
|
||||
cd
|
||||
execute_cmd "rm -rf $HOME/pandora_deploy_tmp" "Removing temporary files"
|
||||
|
||||
# Print nice finish message
|
||||
GREEN='\033[01;32m'
|
||||
NONE='\033[0m'
|
||||
printf " -> Go to Public ${green}http://"$ipplublic"/pandora_console${reset} to manage this server"
|
||||
ip addr | grep -w "inet" | grep -v "127.0.0.1" | grep -v -e "172.1[0-9].0.1" | awk '{print $2}' | awk -v g=$GREEN -v n=$NONE -F '/' '{printf "\n -> Go to Local "g"http://"$1"/pandora_console"n" to manage this server \n -> Use these credentials to log in Pandora Console "g"[ User: admin / Password: pandora ]"n" \n"}'
|
@ -640,8 +640,9 @@ EO_CONFIG_F
|
||||
|
||||
#Enable allow Override
|
||||
cat > /etc/apache2/conf-enabled/pandora_security.conf << EO_CONFIG_F
|
||||
ServerTokens Prod
|
||||
<Directory "/var/www/html">
|
||||
Options Indexes FollowSymLinks
|
||||
Options FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
@ -116,7 +116,6 @@ RUN dnf install -y --setopt=tsflags=nodocs \
|
||||
"perl(Sys::Syslog)" \
|
||||
"perl(DBI)" \
|
||||
"perl(XML::Simple)" \
|
||||
"perl(Geo::IP)" \
|
||||
"perl(IO::Socket::INET6)" \
|
||||
"perl(XML::Twig)" \
|
||||
expect \
|
||||
@ -135,7 +134,7 @@ RUN dnf install -y http://firefly.artica.es/centos8/perl-Crypt-OpenSSL-AES-0.02-
|
||||
# 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
|
||||
# Install IPAM dependencies
|
||||
RUN dnf install -y "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
|
||||
RUN dnf install -y "perl(NetAddr::IP)" "perl(Sys::Syslog)" "perl(DBI)" "perl(XML::Simple)" "perl(IO::Socket::INET6)" "perl(XML::Twig)" "perl(DBD::mysql)" --setopt=tsflags=nodocs
|
||||
|
||||
|
||||
EXPOSE 80 443 41121 162/udp
|
||||
|
@ -1,5 +1,5 @@
|
||||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.776-240320
|
||||
Version: 7.0NG.776-240401
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
@ -14,7 +14,7 @@
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.776-240320"
|
||||
pandora_version="7.0NG.776-240401"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
@ -1039,7 +1039,7 @@ my $Sem = undef;
|
||||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '7.0NG.776';
|
||||
use constant AGENT_BUILD => '240320';
|
||||
use constant AGENT_BUILD => '240401';
|
||||
|
||||
# Agent log default file size maximum and instances
|
||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||
|
@ -4,7 +4,7 @@
|
||||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_agent_linux
|
||||
%define version 7.0NG.776
|
||||
%define release 240320
|
||||
%define release 240401
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
@ -5,7 +5,7 @@
|
||||
%define name pandorafms_agent_linux_bin
|
||||
%define source_name pandorafms_agent_linux
|
||||
%define version 7.0NG.776
|
||||
%define release 240320
|
||||
%define release 240401
|
||||
%define debug_package %{nil}
|
||||
|
||||
Summary: Pandora FMS Linux agent, binary version
|
||||
|
@ -5,7 +5,7 @@
|
||||
%define name pandorafms_agent_linux_bin
|
||||
%define source_name pandorafms_agent_linux
|
||||
%define version 7.0NG.776
|
||||
%define release 240320
|
||||
%define release 240401
|
||||
%define debug_package %{nil}
|
||||
|
||||
Summary: Pandora FMS Linux agent, binary version
|
||||
|
@ -5,7 +5,7 @@
|
||||
%define name pandorafms_agent_linux_bin
|
||||
%define source_name pandorafms_agent_linux
|
||||
%define version 7.0NG.776
|
||||
%define release 240320
|
||||
%define release 240401
|
||||
|
||||
Summary: Pandora FMS Linux agent, binary version
|
||||
Name: %{name}
|
||||
|
@ -4,7 +4,7 @@
|
||||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_agent_linux
|
||||
%define version 7.0NG.776
|
||||
%define release 240320
|
||||
%define release 240401
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
@ -10,7 +10,7 @@
|
||||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.776"
|
||||
PI_BUILD="240320"
|
||||
PI_BUILD="240401"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
||||
{}
|
||||
|
||||
Version
|
||||
{240320}
|
||||
{240401}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
||||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("7.0NG.776 Build 240320")
|
||||
#define PANDORA_VERSION ("7.0NG.776 Build 240401")
|
||||
|
||||
string pandora_path;
|
||||
string pandora_dir;
|
||||
|
@ -11,7 +11,7 @@ BEGIN
|
||||
VALUE "LegalCopyright", "Pandora FMS"
|
||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||
VALUE "ProductVersion", "(7.0NG.776(Build 240320))"
|
||||
VALUE "ProductVersion", "(7.0NG.776(Build 240401))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
@ -1,5 +1,5 @@
|
||||
package: pandorafms-console
|
||||
Version: 7.0NG.776-240320
|
||||
Version: 7.0NG.776-240401
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
@ -14,7 +14,7 @@
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.776-240320"
|
||||
pandora_version="7.0NG.776-240401"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
@ -299,7 +299,7 @@ function agents_modules_load_js()
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function mainAgentsModules()
|
||||
function mainAgentsModules($params=[], $post_data=[])
|
||||
{
|
||||
global $config;
|
||||
|
||||
@ -352,29 +352,39 @@ function mainAgentsModules()
|
||||
|
||||
$updated_time = $updated_info;
|
||||
|
||||
$modulegroup = get_parameter('modulegroup', 0);
|
||||
$refr = (int) get_parameter('refresh', 0);
|
||||
// By default 30 seconds.
|
||||
$recursion = get_parameter('recursion', 0);
|
||||
if ($post_data === []) {
|
||||
$show_type = (int) get_parameter('show_type', 0);
|
||||
$group_id = (int) get_parameter('group_id', 0);
|
||||
$offset = (int) get_parameter('offset', 0);
|
||||
$hor_offset = (int) get_parameter('hor_offset', 0);
|
||||
$block = $config['block_size'];
|
||||
if (intval($block) > 15) {
|
||||
$block = '15';
|
||||
}
|
||||
|
||||
$recursion = get_parameter('recursion', 0);
|
||||
$modulegroup = get_parameter('modulegroup', 0);
|
||||
if (get_parameter('modulegroup') != null) {
|
||||
$agents_id = (array) get_parameter('id_agents2', null);
|
||||
}
|
||||
|
||||
$selection_a_m = (int) get_parameter('selection_agent_module');
|
||||
$modules_selected = (array) get_parameter('module', 0);
|
||||
} else {
|
||||
$show_type = (int) ($post_data['show_type'] ?? 0);
|
||||
$group_id = (int) ($post_data['group_id'] ?? 0);
|
||||
$recursion = ($post_data['recursion'] ?? 0);
|
||||
$modulegroup = ($post_data['modulegroup'] ?? 0);
|
||||
if ($modulegroup !== 0) {
|
||||
$agents_id = (array) ($post_data['id_agents2'] ?? []);
|
||||
}
|
||||
|
||||
$selection_a_m = ($post_data['selection_agent_module'] ?? '');
|
||||
$modules_selected = ($post_data['module'] ?? []);
|
||||
}
|
||||
|
||||
$refr = (int) get_parameter('refresh', 0);
|
||||
// By default 30 seconds.
|
||||
$offset = (int) get_parameter('offset', 0);
|
||||
$hor_offset = (int) get_parameter('hor_offset', 0);
|
||||
$block = (string) ($params['block_size'] ?? $hor_offset);
|
||||
$update_item = (string) get_parameter('edit_item', '');
|
||||
$save_serialize = (int) get_parameter('save_serialize', 0);
|
||||
$full_modules_selected = explode(';', get_parameter('full_modules_selected', 0));
|
||||
$full_agents_id = explode(';', get_parameter('full_agents_id', 0));
|
||||
$show_type = (int) get_parameter('show_type', 0);
|
||||
|
||||
// In full screen there is no pagination neither filters.
|
||||
if (( ($config['pure'] == 0 && $save_serialize) && $update_item == '' ) || ( ($config['pure'] == 1 && $save_serialize == 0) && $update_item == '' )) {
|
||||
@ -572,6 +582,7 @@ function mainAgentsModules()
|
||||
*/
|
||||
|
||||
if ($config['pure'] == 0) {
|
||||
include_once 'include/class/HTML.class.php';
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
__('Agents/Modules'),
|
||||
@ -895,7 +906,9 @@ function mainAgentsModules()
|
||||
return;
|
||||
}
|
||||
|
||||
echo '<table cellpadding="4" cellspacing="4" border="0" class="info_table mrgn_btn_20px" id="agents_modules_table">';
|
||||
echo '<div id="div-agents-modules-table">';
|
||||
echo '<div id="agents-modules-spinner" class="spinner-fixed"><span></span><span></span><span></span><span></span></div>';
|
||||
echo '<table cellpadding="4" cellspacing="4" border="0" class="info_table mrgn_btn_20px invisible" id="agents_modules_table">';
|
||||
|
||||
echo '<tr>';
|
||||
|
||||
@ -1084,6 +1097,7 @@ function mainAgentsModules()
|
||||
}
|
||||
|
||||
echo '</table>';
|
||||
echo '</div>';
|
||||
|
||||
if ($show_type === 0) {
|
||||
$show_legend = "<div class='legend_white'>";
|
||||
@ -1114,4 +1128,66 @@ function mainAgentsModules()
|
||||
|
||||
|
||||
extensions_add_operation_menu_option(__('Agents/Modules view'), 'estado', 'agents_modules/icon_menu.png', 'v1r1', 'view');
|
||||
|
||||
$pure = (int) get_parameter('pure', 0);
|
||||
$hor_offset = (int) get_parameter('hor_offset', 0);
|
||||
$offset = (int) get_parameter('offset', 0);
|
||||
|
||||
$sec2 = get_parameter('sec2');
|
||||
|
||||
if ($pure !== 0) {
|
||||
extensions_add_main_function('mainAgentsModules');
|
||||
if ($sec2 === 'extensions/agents_modules') {
|
||||
echo '<script>
|
||||
$(document).ready(function () {
|
||||
$("#agents-modules-spinner").hide();
|
||||
$("#agents_modules_table").show();
|
||||
});
|
||||
</script>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($pure === 0) {
|
||||
if (is_ajax()) {
|
||||
$params = [];
|
||||
$post_data = get_parameter('post_data', []);
|
||||
$items_offset = get_parameter('items_offset', 15);
|
||||
$params['block_size'] = $items_offset;
|
||||
$params['offset'] = $offset;
|
||||
$params['hor_offset'] = $hor_offset;
|
||||
mainAgentsModules($params, $post_data);
|
||||
return;
|
||||
}
|
||||
|
||||
if ($sec2 === 'extensions/agents_modules') {
|
||||
echo '<script>
|
||||
$(document).ready(function () {
|
||||
// Calc items per page.
|
||||
const mainWidth = $("#page #main").width();
|
||||
const itemsOffset = Math.floor((mainWidth - 240) / 46);
|
||||
|
||||
$.ajax({
|
||||
url: "ajax.php",
|
||||
data: {
|
||||
page: "extensions/agents_modules",
|
||||
post_data: '.json_encode($_POST).',
|
||||
items_offset: itemsOffset,
|
||||
offset: '.$offset.',
|
||||
hor_offset: '.$hor_offset.',
|
||||
},
|
||||
dataType: "html",
|
||||
success: function (data) {
|
||||
$("#page > #main").html(data);
|
||||
$("#agents-modules-spinner").hide();
|
||||
$("#agents_modules_table").show();
|
||||
menuActionButtonResizing();
|
||||
},
|
||||
error: function (error) {
|
||||
console.error(error);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>';
|
||||
}
|
||||
}
|
@ -196,6 +196,15 @@ function pandora_realtime_graphs()
|
||||
[
|
||||
'class' => 'action-buttons',
|
||||
'content' => html_print_submit_button(
|
||||
__('Filter'),
|
||||
'filterbutton',
|
||||
false,
|
||||
[
|
||||
'icon' => 'search',
|
||||
'mode' => 'mini',
|
||||
],
|
||||
true
|
||||
).html_print_submit_button(
|
||||
__('Clear graph'),
|
||||
'srcbutton',
|
||||
false,
|
||||
|
@ -160,10 +160,6 @@
|
||||
return +(Math.round(num + "e+2") + "e-2");
|
||||
}
|
||||
|
||||
$("#graph").change(function() {
|
||||
$("form#realgraph").submit();
|
||||
});
|
||||
|
||||
$("#refresh").change(function() {
|
||||
refresh = parseInt($("#refresh").val());
|
||||
resetDataPooling();
|
||||
|
@ -1738,3 +1738,12 @@ extensions/files_repo/sql/files_repo.sql
|
||||
extensions/files_repo
|
||||
extensions/resource_exportation.php
|
||||
extensions/resource_registration.php
|
||||
enterprise/include/class/Aws.cloud.php
|
||||
enterprise/include/class/Azure.cloud.php
|
||||
enterprise/include/class/DB2.app.php
|
||||
enterprise/include/class/Google.cloud.php
|
||||
enterprise/include/class/MicrosoftSQLServer.app.php
|
||||
enterprise/include/class/MySQL.app.php
|
||||
enterprise/include/class/Oracle.app.php
|
||||
enterprise/include/class/SAP.app.php
|
||||
enterprise/include/class/VMware.app.php
|
||||
|
@ -53,7 +53,7 @@ refresh[2]="0"
|
||||
source[2]="0"
|
||||
source_data[2]="{\"tagente\":{\"nombre\":\"freebsd-1\"}}"
|
||||
options[2]=""
|
||||
style[2]="{\"shape\":\"circle\",\"image\":\"images/networkmap/freebsd@os.svg\",\"width\":null,\"height\":null,\"label\":\"freebsd-1\"}"
|
||||
style[2]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/freebsd@os.svg\",\"width\":null,\"height\":null,\"label\":\"freebsd-1\"}"
|
||||
|
||||
id[3]="3"
|
||||
id_map[3]="2"
|
||||
@ -66,7 +66,7 @@ refresh[3]="0"
|
||||
source[3]="0"
|
||||
source_data[3]="{\"tagente\":{\"nombre\":\"macos-1\"}}"
|
||||
options[3]=""
|
||||
style[3]="{\"shape\":\"circle\",\"image\":\"images/networkmap/apple@os.svg\",\"width\":null,\"height\":null,\"label\":\"macos-1\"}"
|
||||
style[3]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/apple@os.svg\",\"width\":null,\"height\":null,\"label\":\"macos-1\"}"
|
||||
|
||||
id[4]="4"
|
||||
id_map[4]="2"
|
||||
@ -79,7 +79,7 @@ refresh[4]="0"
|
||||
source[4]="0"
|
||||
source_data[4]="{\"tagente\":{\"nombre\":\"windows-1\"}}"
|
||||
options[4]=""
|
||||
style[4]="{\"shape\":\"circle\",\"image\":\"images/networkmap/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-1\"}"
|
||||
style[4]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-1\"}"
|
||||
|
||||
id[5]="5"
|
||||
id_map[5]="2"
|
||||
@ -92,7 +92,7 @@ refresh[5]="0"
|
||||
source[5]="0"
|
||||
source_data[5]="{\"tagente\":{\"nombre\":\"windows-2\"}}"
|
||||
options[5]=""
|
||||
style[5]="{\"shape\":\"circle\",\"image\":\"images/networkmap/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-2\"}"
|
||||
style[5]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-2\"}"
|
||||
|
||||
id[6]="6"
|
||||
id_map[6]="2"
|
||||
@ -105,7 +105,7 @@ refresh[6]="0"
|
||||
source[6]="0"
|
||||
source_data[6]="{\"tagente\":{\"nombre\":\"linux-1\"}}"
|
||||
options[6]=""
|
||||
style[6]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-1\"}"
|
||||
style[6]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-1\"}"
|
||||
|
||||
id[7]="7"
|
||||
id_map[7]="2"
|
||||
@ -118,7 +118,7 @@ refresh[7]="0"
|
||||
source[7]="0"
|
||||
source_data[7]="{\"tagente\":{\"nombre\":\"linux-2\"}}"
|
||||
options[7]=""
|
||||
style[7]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-2\"}"
|
||||
style[7]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-2\"}"
|
||||
|
||||
id[8]="8"
|
||||
id_map[8]="2"
|
||||
@ -131,7 +131,7 @@ refresh[8]="0"
|
||||
source[8]="0"
|
||||
source_data[8]="{\"tagente\":{\"nombre\":\"linux-3\"}}"
|
||||
options[8]=""
|
||||
style[8]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-3\"}"
|
||||
style[8]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-3\"}"
|
||||
|
||||
id[9]="9"
|
||||
id_map[9]="2"
|
||||
@ -144,7 +144,7 @@ refresh[9]="0"
|
||||
source[9]="0"
|
||||
source_data[9]="{\"tagente\":{\"nombre\":\"linux-4\"}}"
|
||||
options[9]=""
|
||||
style[9]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-4\"}"
|
||||
style[9]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-4\"}"
|
||||
|
||||
id[10]="10"
|
||||
id_map[10]="2"
|
||||
@ -157,7 +157,7 @@ refresh[10]="0"
|
||||
source[10]="0"
|
||||
source_data[10]="{\"tagente\":{\"nombre\":\"cisco-2\"}}"
|
||||
options[10]=""
|
||||
style[10]="{\"shape\":\"circle\",\"image\":\"images/networkmap/cisco@os.svg\",\"width\":null,\"height\":null,\"label\":\"cisco-2\"}"
|
||||
style[10]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/cisco@os.svg\",\"width\":null,\"height\":null,\"label\":\"cisco-2\"}"
|
||||
|
||||
id[11]="11"
|
||||
id_map[11]="2"
|
||||
@ -170,7 +170,7 @@ refresh[11]="0"
|
||||
source[11]="0"
|
||||
source_data[11]="{\"tagente\":{\"nombre\":\"freebsd-2\"}}"
|
||||
options[11]=""
|
||||
style[11]="{\"shape\":\"circle\",\"image\":\"images/networkmap/freebsd@os.svg\",\"width\":null,\"height\":null,\"label\":\"freebsd-2\"}"
|
||||
style[11]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/freebsd@os.svg\",\"width\":null,\"height\":null,\"label\":\"freebsd-2\"}"
|
||||
|
||||
id[12]="12"
|
||||
id_map[12]="2"
|
||||
@ -183,7 +183,7 @@ refresh[12]="0"
|
||||
source[12]="0"
|
||||
source_data[12]="{\"tagente\":{\"nombre\":\"macos-2\"}}"
|
||||
options[12]=""
|
||||
style[12]="{\"shape\":\"circle\",\"image\":\"images/networkmap/apple@os.svg\",\"width\":null,\"height\":null,\"label\":\"macos-2\"}"
|
||||
style[12]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/apple@os.svg\",\"width\":null,\"height\":null,\"label\":\"macos-2\"}"
|
||||
|
||||
id[13]="13"
|
||||
id_map[13]="2"
|
||||
@ -196,7 +196,7 @@ refresh[13]="0"
|
||||
source[13]="0"
|
||||
source_data[13]="{\"tagente\":{\"nombre\":\"windows-3\"}}"
|
||||
options[13]=""
|
||||
style[13]="{\"shape\":\"circle\",\"image\":\"images/networkmap/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-3\"}"
|
||||
style[13]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-3\"}"
|
||||
|
||||
id[14]="14"
|
||||
id_map[14]="2"
|
||||
@ -209,7 +209,7 @@ refresh[14]="0"
|
||||
source[14]="0"
|
||||
source_data[14]="{\"tagente\":{\"nombre\":\"windows-4\"}}"
|
||||
options[14]=""
|
||||
style[14]="{\"shape\":\"circle\",\"image\":\"images/networkmap/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-4\"}"
|
||||
style[14]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-4\"}"
|
||||
|
||||
id[15]="15"
|
||||
id_map[15]="2"
|
||||
@ -222,7 +222,7 @@ refresh[15]="0"
|
||||
source[15]="0"
|
||||
source_data[15]="{\"tagente\":{\"nombre\":\"linux-5\"}}"
|
||||
options[15]=""
|
||||
style[15]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-5\"}"
|
||||
style[15]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-5\"}"
|
||||
|
||||
id[16]="16"
|
||||
id_map[16]="2"
|
||||
@ -235,7 +235,7 @@ refresh[16]="0"
|
||||
source[16]="0"
|
||||
source_data[16]="{\"tagente\":{\"nombre\":\"linux-6\"}}"
|
||||
options[16]=""
|
||||
style[16]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-6\"}"
|
||||
style[16]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-6\"}"
|
||||
|
||||
id[17]="17"
|
||||
id_map[17]="2"
|
||||
@ -248,7 +248,7 @@ refresh[17]="0"
|
||||
source[17]="0"
|
||||
source_data[17]="{\"tagente\":{\"nombre\":\"linux-7\"}}"
|
||||
options[17]=""
|
||||
style[17]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-7\"}"
|
||||
style[17]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-7\"}"
|
||||
|
||||
id[18]="18"
|
||||
id_map[18]="2"
|
||||
@ -261,7 +261,7 @@ refresh[18]="0"
|
||||
source[18]="0"
|
||||
source_data[18]="{\"tagente\":{\"nombre\":\"linux-8\"}}"
|
||||
options[18]=""
|
||||
style[18]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-8\"}"
|
||||
style[18]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-8\"}"
|
||||
|
||||
id[19]="19"
|
||||
id_map[19]="2"
|
||||
@ -274,7 +274,7 @@ refresh[19]="0"
|
||||
source[19]="0"
|
||||
source_data[19]="{\"tagente\":{\"nombre\":\"cisco-3\"}}"
|
||||
options[19]=""
|
||||
style[19]="{\"shape\":\"circle\",\"image\":\"images/networkmap/cisco@os.svg\",\"width\":null,\"height\":null,\"label\":\"cisco-3\"}"
|
||||
style[19]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/cisco@os.svg\",\"width\":null,\"height\":null,\"label\":\"cisco-3\"}"
|
||||
|
||||
id[20]="20"
|
||||
id_map[20]="2"
|
||||
@ -287,7 +287,7 @@ refresh[20]="0"
|
||||
source[20]="0"
|
||||
source_data[20]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}"
|
||||
options[20]=""
|
||||
style[20]="{\"shape\":\"circle\",\"image\":\"images/networkmap/freebsd@os.svg\",\"width\":null,\"height\":null,\"label\":\"freebsd-3\"}"
|
||||
style[20]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/freebsd@os.svg\",\"width\":null,\"height\":null,\"label\":\"freebsd-3\"}"
|
||||
|
||||
id[21]="21"
|
||||
id_map[21]="2"
|
||||
@ -300,7 +300,7 @@ refresh[21]="0"
|
||||
source[21]="0"
|
||||
source_data[21]="{\"tagente\":{\"nombre\":\"macos-3\"}}"
|
||||
options[21]=""
|
||||
style[21]="{\"shape\":\"circle\",\"image\":\"images/networkmap/apple@os.svg\",\"width\":null,\"height\":null,\"label\":\"macos-3\"}"
|
||||
style[21]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/apple@os.svg\",\"width\":null,\"height\":null,\"label\":\"macos-3\"}"
|
||||
|
||||
id[22]="22"
|
||||
id_map[22]="2"
|
||||
@ -313,7 +313,7 @@ refresh[22]="0"
|
||||
source[22]="0"
|
||||
source_data[22]="{\"tagente\":{\"nombre\":\"windows-5\"}}"
|
||||
options[22]=""
|
||||
style[22]="{\"shape\":\"circle\",\"image\":\"images/networkmap/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-5\"}"
|
||||
style[22]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-5\"}"
|
||||
|
||||
id[23]="23"
|
||||
id_map[23]="2"
|
||||
@ -326,7 +326,7 @@ refresh[23]="0"
|
||||
source[23]="0"
|
||||
source_data[23]="{\"tagente\":{\"nombre\":\"windows-6\"}}"
|
||||
options[23]=""
|
||||
style[23]="{\"shape\":\"circle\",\"image\":\"images/networkmap/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-6\"}"
|
||||
style[23]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-6\"}"
|
||||
|
||||
id[24]="24"
|
||||
id_map[24]="2"
|
||||
@ -339,7 +339,7 @@ refresh[24]="0"
|
||||
source[24]="0"
|
||||
source_data[24]="{\"tagente\":{\"nombre\":\"linux-9\"}}"
|
||||
options[24]=""
|
||||
style[24]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-9\"}"
|
||||
style[24]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-9\"}"
|
||||
|
||||
id[25]="25"
|
||||
id_map[25]="2"
|
||||
@ -352,7 +352,7 @@ refresh[25]="0"
|
||||
source[25]="0"
|
||||
source_data[25]="{\"tagente\":{\"nombre\":\"linux-10\"}}"
|
||||
options[25]=""
|
||||
style[25]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-10\"}"
|
||||
style[25]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-10\"}"
|
||||
|
||||
id[26]="26"
|
||||
id_map[26]="2"
|
||||
@ -365,7 +365,7 @@ refresh[26]="0"
|
||||
source[26]="0"
|
||||
source_data[26]="{\"tagente\":{\"nombre\":\"linux-11\"}}"
|
||||
options[26]=""
|
||||
style[26]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-11\"}"
|
||||
style[26]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-11\"}"
|
||||
|
||||
id[27]="27"
|
||||
id_map[27]="2"
|
||||
@ -378,13 +378,13 @@ refresh[27]="0"
|
||||
source[27]="0"
|
||||
source_data[27]="{\"tagente\":{\"nombre\":\"linux-12\"}}"
|
||||
options[27]=""
|
||||
style[27]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-12\"}"
|
||||
style[27]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-12\"}"
|
||||
|
||||
[trel_item]
|
||||
|
||||
id[1]="1"
|
||||
id_parent[1]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
|
||||
id_child[1]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"11\",\"x\":\"1184\",\"y\":\"-25\",\"z\":\"0\"}}"
|
||||
id_parent[1]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
|
||||
id_child[1]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-1\"}},\"x\":\"1184\",\"y\":\"-25\",\"z\":\"0\"}}"
|
||||
id_map[1]="2"
|
||||
id_parent_source_data[1]="{\"tagente\":{\"nombre\":\"cisco-1\"}}"
|
||||
id_child_source_data[1]="{\"tagente\":{\"nombre\":\"freebsd-1\"}}"
|
||||
@ -394,8 +394,8 @@ id_item[1]="0"
|
||||
deleted[1]="0"
|
||||
|
||||
id[2]="2"
|
||||
id_parent[2]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
|
||||
id_child[2]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"10\",\"x\":\"1268\",\"y\":\"235\",\"z\":\"0\"}}"
|
||||
id_parent[2]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
|
||||
id_child[2]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"macos-1\"}},\"x\":\"1268\",\"y\":\"235\",\"z\":\"0\"}}"
|
||||
id_map[2]="2"
|
||||
id_parent_source_data[2]="{\"tagente\":{\"nombre\":\"cisco-1\"}}"
|
||||
id_child_source_data[2]="{\"tagente\":{\"nombre\":\"macos-1\"}}"
|
||||
@ -405,8 +405,8 @@ id_item[2]="0"
|
||||
deleted[2]="0"
|
||||
|
||||
id[3]="3"
|
||||
id_parent[3]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
|
||||
id_child[3]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"8\",\"x\":\"528\",\"y\":\"-37\",\"z\":\"0\"}}"
|
||||
id_parent[3]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
|
||||
id_child[3]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-1\"}},\"x\":\"528\",\"y\":\"-37\",\"z\":\"0\"}}"
|
||||
id_map[3]="2"
|
||||
id_parent_source_data[3]="{\"tagente\":{\"nombre\":\"cisco-1\"}}"
|
||||
id_child_source_data[3]="{\"tagente\":{\"nombre\":\"windows-1\"}}"
|
||||
@ -416,8 +416,8 @@ id_item[3]="0"
|
||||
deleted[3]="0"
|
||||
|
||||
id[4]="4"
|
||||
id_parent[4]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
|
||||
id_child[4]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"9\",\"x\":\"514\",\"y\":\"389\",\"z\":\"0\"}}"
|
||||
id_parent[4]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
|
||||
id_child[4]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-2\"}},\"x\":\"514\",\"y\":\"389\",\"z\":\"0\"}}"
|
||||
id_map[4]="2"
|
||||
id_parent_source_data[4]="{\"tagente\":{\"nombre\":\"cisco-1\"}}"
|
||||
id_child_source_data[4]="{\"tagente\":{\"nombre\":\"windows-2\"}}"
|
||||
@ -427,8 +427,8 @@ id_item[4]="0"
|
||||
deleted[4]="0"
|
||||
|
||||
id[5]="5"
|
||||
id_parent[5]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"8\",\"x\":\"528\",\"y\":\"-37\",\"z\":\"0\"}}"
|
||||
id_child[5]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"4\",\"x\":\"342\",\"y\":\"-273\",\"z\":\"0\"}}"
|
||||
id_parent[5]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-1\"}},\"x\":\"528\",\"y\":\"-37\",\"z\":\"0\"}}"
|
||||
id_child[5]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-1\"}},\"x\":\"342\",\"y\":\"-273\",\"z\":\"0\"}}"
|
||||
id_map[5]="2"
|
||||
id_parent_source_data[5]="{\"tagente\":{\"nombre\":\"windows-1\"}}"
|
||||
id_child_source_data[5]="{\"tagente\":{\"nombre\":\"linux-1\"}}"
|
||||
@ -438,8 +438,8 @@ id_item[5]="0"
|
||||
deleted[5]="0"
|
||||
|
||||
id[6]="6"
|
||||
id_parent[6]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"8\",\"x\":\"528\",\"y\":\"-37\",\"z\":\"0\"}}"
|
||||
id_child[6]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"5\",\"x\":\"240\",\"y\":\"-7\",\"z\":\"0\"}}"
|
||||
id_parent[6]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-1\"}},\"x\":\"528\",\"y\":\"-37\",\"z\":\"0\"}}"
|
||||
id_child[6]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-2\"}},\"x\":\"240\",\"y\":\"-7\",\"z\":\"0\"}}"
|
||||
id_map[6]="2"
|
||||
id_parent_source_data[6]="{\"tagente\":{\"nombre\":\"windows-1\"}}"
|
||||
id_child_source_data[6]="{\"tagente\":{\"nombre\":\"linux-2\"}}"
|
||||
@ -449,8 +449,8 @@ id_item[6]="0"
|
||||
deleted[6]="0"
|
||||
|
||||
id[7]="7"
|
||||
id_parent[7]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"9\",\"x\":\"514\",\"y\":\"389\",\"z\":\"0\"}}"
|
||||
id_child[7]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"6\",\"x\":\"214\",\"y\":\"275\",\"z\":\"0\"}}"
|
||||
id_parent[7]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-2\"}},\"x\":\"514\",\"y\":\"389\",\"z\":\"0\"}}"
|
||||
id_child[7]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-3\"}},\"x\":\"214\",\"y\":\"275\",\"z\":\"0\"}}"
|
||||
id_map[7]="2"
|
||||
id_parent_source_data[7]="{\"tagente\":{\"nombre\":\"windows-2\"}}"
|
||||
id_child_source_data[7]="{\"tagente\":{\"nombre\":\"linux-3\"}}"
|
||||
@ -460,8 +460,8 @@ id_item[7]="0"
|
||||
deleted[7]="0"
|
||||
|
||||
id[8]="8"
|
||||
id_parent[8]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"9\",\"x\":\"514\",\"y\":\"389\",\"z\":\"0\"}}"
|
||||
id_child[8]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"7\",\"x\":\"226\",\"y\":\"595\",\"z\":\"0\"}}"
|
||||
id_parent[8]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-2\"}},\"x\":\"514\",\"y\":\"389\",\"z\":\"0\"}}"
|
||||
id_child[8]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-4\"}},\"x\":\"226\",\"y\":\"595\",\"z\":\"0\"}}"
|
||||
id_map[8]="2"
|
||||
id_parent_source_data[8]="{\"tagente\":{\"nombre\":\"windows-2\"}}"
|
||||
id_child_source_data[8]="{\"tagente\":{\"nombre\":\"linux-4\"}}"
|
||||
@ -471,8 +471,8 @@ id_item[8]="0"
|
||||
deleted[8]="0"
|
||||
|
||||
id[9]="9"
|
||||
id_parent[9]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
|
||||
id_child[9]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"22\",\"x\":\"1036\",\"y\":\"711\",\"z\":\"0\"}}"
|
||||
id_parent[9]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
|
||||
id_child[9]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-2\"}},\"x\":\"1036\",\"y\":\"711\",\"z\":\"0\"}}"
|
||||
id_map[9]="2"
|
||||
id_parent_source_data[9]="{\"tagente\":{\"nombre\":\"cisco-1\"}}"
|
||||
id_child_source_data[9]="{\"tagente\":{\"nombre\":\"cisco-2\"}}"
|
||||
@ -482,8 +482,8 @@ id_item[9]="0"
|
||||
deleted[9]="0"
|
||||
|
||||
id[10]="10"
|
||||
id_parent[10]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
|
||||
id_child[10]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"21\",\"x\":\"892\",\"y\":\"-47\",\"z\":\"0\"}}"
|
||||
id_parent[10]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
|
||||
id_child[10]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-2\"}},\"x\":\"892\",\"y\":\"-47\",\"z\":\"0\"}}"
|
||||
id_map[10]="2"
|
||||
id_parent_source_data[10]="{\"tagente\":{\"nombre\":\"cisco-1\"}}"
|
||||
id_child_source_data[10]="{\"tagente\":{\"nombre\":\"freebsd-2\"}}"
|
||||
@ -493,8 +493,8 @@ id_item[10]="0"
|
||||
deleted[10]="0"
|
||||
|
||||
id[11]="11"
|
||||
id_parent[11]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
|
||||
id_child[11]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"20\",\"x\":\"1150\",\"y\":\"409\",\"z\":\"0\"}}"
|
||||
id_parent[11]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
|
||||
id_child[11]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"macos-2\"}},\"x\":\"1150\",\"y\":\"409\",\"z\":\"0\"}}"
|
||||
id_map[11]="2"
|
||||
id_parent_source_data[11]="{\"tagente\":{\"nombre\":\"cisco-1\"}}"
|
||||
id_child_source_data[11]="{\"tagente\":{\"nombre\":\"macos-2\"}}"
|
||||
@ -504,8 +504,8 @@ id_item[11]="0"
|
||||
deleted[11]="0"
|
||||
|
||||
id[12]="12"
|
||||
id_parent[12]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"22\",\"x\":\"1036\",\"y\":\"711\",\"z\":\"0\"}}"
|
||||
id_child[12]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"18\",\"x\":\"686\",\"y\":\"875\",\"z\":\"0\"}}"
|
||||
id_parent[12]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-2\"}},\"x\":\"1036\",\"y\":\"711\",\"z\":\"0\"}}"
|
||||
id_child[12]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-3\"}},\"x\":\"686\",\"y\":\"875\",\"z\":\"0\"}}"
|
||||
id_map[12]="2"
|
||||
id_parent_source_data[12]="{\"tagente\":{\"nombre\":\"cisco-2\"}}"
|
||||
id_child_source_data[12]="{\"tagente\":{\"nombre\":\"windows-3\"}}"
|
||||
@ -515,8 +515,8 @@ id_item[12]="0"
|
||||
deleted[12]="0"
|
||||
|
||||
id[13]="13"
|
||||
id_parent[13]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"22\",\"x\":\"1036\",\"y\":\"711\",\"z\":\"0\"}}"
|
||||
id_child[13]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"19\",\"x\":\"1452\",\"y\":\"847\",\"z\":\"0\"}}"
|
||||
id_parent[13]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-2\"}},\"x\":\"1036\",\"y\":\"711\",\"z\":\"0\"}}"
|
||||
id_child[13]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-4\"}},\"x\":\"1452\",\"y\":\"847\",\"z\":\"0\"}}"
|
||||
id_map[13]="2"
|
||||
id_parent_source_data[13]="{\"tagente\":{\"nombre\":\"cisco-2\"}}"
|
||||
id_child_source_data[13]="{\"tagente\":{\"nombre\":\"windows-4\"}}"
|
||||
@ -526,8 +526,8 @@ id_item[13]="0"
|
||||
deleted[13]="0"
|
||||
|
||||
id[14]="14"
|
||||
id_parent[14]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"18\",\"x\":\"686\",\"y\":\"875\",\"z\":\"0\"}}"
|
||||
id_child[14]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"14\",\"x\":\"314\",\"y\":\"845\",\"z\":\"0\"}}"
|
||||
id_parent[14]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-3\"}},\"x\":\"686\",\"y\":\"875\",\"z\":\"0\"}}"
|
||||
id_child[14]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-5\"}},\"x\":\"314\",\"y\":\"845\",\"z\":\"0\"}}"
|
||||
id_map[14]="2"
|
||||
id_parent_source_data[14]="{\"tagente\":{\"nombre\":\"windows-3\"}}"
|
||||
id_child_source_data[14]="{\"tagente\":{\"nombre\":\"linux-5\"}}"
|
||||
@ -537,8 +537,8 @@ id_item[14]="0"
|
||||
deleted[14]="0"
|
||||
|
||||
id[15]="15"
|
||||
id_parent[15]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"18\",\"x\":\"686\",\"y\":\"875\",\"z\":\"0\"}}"
|
||||
id_child[15]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"15\",\"x\":\"474\",\"y\":\"1043\",\"z\":\"0\"}}"
|
||||
id_parent[15]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-3\"}},\"x\":\"686\",\"y\":\"875\",\"z\":\"0\"}}"
|
||||
id_child[15]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-6\"}},\"x\":\"474\",\"y\":\"1043\",\"z\":\"0\"}}"
|
||||
id_map[15]="2"
|
||||
id_parent_source_data[15]="{\"tagente\":{\"nombre\":\"windows-3\"}}"
|
||||
id_child_source_data[15]="{\"tagente\":{\"nombre\":\"linux-6\"}}"
|
||||
@ -548,8 +548,8 @@ id_item[15]="0"
|
||||
deleted[15]="0"
|
||||
|
||||
id[16]="16"
|
||||
id_parent[16]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"19\",\"x\":\"1452\",\"y\":\"847\",\"z\":\"0\"}}"
|
||||
id_child[16]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"16\",\"x\":\"1812\",\"y\":\"1011\",\"z\":\"0\"}}"
|
||||
id_parent[16]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-4\"}},\"x\":\"1452\",\"y\":\"847\",\"z\":\"0\"}}"
|
||||
id_child[16]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-7\"}},\"x\":\"1812\",\"y\":\"1011\",\"z\":\"0\"}}"
|
||||
id_map[16]="2"
|
||||
id_parent_source_data[16]="{\"tagente\":{\"nombre\":\"windows-4\"}}"
|
||||
id_child_source_data[16]="{\"tagente\":{\"nombre\":\"linux-7\"}}"
|
||||
@ -559,8 +559,8 @@ id_item[16]="0"
|
||||
deleted[16]="0"
|
||||
|
||||
id[17]="17"
|
||||
id_parent[17]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"19\",\"x\":\"1452\",\"y\":\"847\",\"z\":\"0\"}}"
|
||||
id_child[17]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"17\",\"x\":\"1828\",\"y\":\"723\",\"z\":\"0\"}}"
|
||||
id_parent[17]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-4\"}},\"x\":\"1452\",\"y\":\"847\",\"z\":\"0\"}}"
|
||||
id_child[17]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-8\"}},\"x\":\"1828\",\"y\":\"723\",\"z\":\"0\"}}"
|
||||
id_map[17]="2"
|
||||
id_parent_source_data[17]="{\"tagente\":{\"nombre\":\"windows-4\"}}"
|
||||
id_child_source_data[17]="{\"tagente\":{\"nombre\":\"linux-8\"}}"
|
||||
@ -570,8 +570,8 @@ id_item[17]="0"
|
||||
deleted[17]="0"
|
||||
|
||||
id[18]="18"
|
||||
id_parent[18]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"10\",\"x\":\"1268\",\"y\":\"235\",\"z\":\"0\"}}"
|
||||
id_child[18]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"32\",\"x\":\"1824\",\"y\":\"285\",\"z\":\"0\"}}"
|
||||
id_parent[18]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"macos-1\"}},\"x\":\"1268\",\"y\":\"235\",\"z\":\"0\"}}"
|
||||
id_child[18]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-3\"}},\"x\":\"1824\",\"y\":\"285\",\"z\":\"0\"}}"
|
||||
id_map[18]="2"
|
||||
id_parent_source_data[18]="{\"tagente\":{\"nombre\":\"macos-1\"}}"
|
||||
id_child_source_data[18]="{\"tagente\":{\"nombre\":\"cisco-3\"}}"
|
||||
@ -581,8 +581,8 @@ id_item[18]="0"
|
||||
deleted[18]="0"
|
||||
|
||||
id[19]="19"
|
||||
id_parent[19]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"7\",\"x\":\"226\",\"y\":\"595\",\"z\":\"0\"}}"
|
||||
id_child[19]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"31\",\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
|
||||
id_parent[19]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-4\"}},\"x\":\"226\",\"y\":\"595\",\"z\":\"0\"}}"
|
||||
id_child[19]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-3\"}},\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
|
||||
id_map[19]="2"
|
||||
id_parent_source_data[19]="{\"tagente\":{\"nombre\":\"linux-4\"}}"
|
||||
id_child_source_data[19]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}"
|
||||
@ -592,8 +592,8 @@ id_item[19]="0"
|
||||
deleted[19]="0"
|
||||
|
||||
id[20]="20"
|
||||
id_parent[20]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"31\",\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
|
||||
id_child[20]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"30\",\"x\":\"-140\",\"y\":\"299\",\"z\":\"0\"}}"
|
||||
id_parent[20]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-3\"}},\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
|
||||
id_child[20]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"macos-3\"}},\"x\":\"-140\",\"y\":\"299\",\"z\":\"0\"}}"
|
||||
id_map[20]="2"
|
||||
id_parent_source_data[20]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}"
|
||||
id_child_source_data[20]="{\"tagente\":{\"nombre\":\"macos-3\"}}"
|
||||
@ -603,8 +603,8 @@ id_item[20]="0"
|
||||
deleted[20]="0"
|
||||
|
||||
id[21]="21"
|
||||
id_parent[21]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"31\",\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
|
||||
id_child[21]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"28\",\"x\":\"-390\",\"y\":\"385\",\"z\":\"0\"}}"
|
||||
id_parent[21]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-3\"}},\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
|
||||
id_child[21]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-5\"}},\"x\":\"-390\",\"y\":\"385\",\"z\":\"0\"}}"
|
||||
id_map[21]="2"
|
||||
id_parent_source_data[21]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}"
|
||||
id_child_source_data[21]="{\"tagente\":{\"nombre\":\"windows-5\"}}"
|
||||
@ -614,8 +614,8 @@ id_item[21]="0"
|
||||
deleted[21]="0"
|
||||
|
||||
id[22]="22"
|
||||
id_parent[22]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"31\",\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
|
||||
id_child[22]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"29\",\"x\":\"-470\",\"y\":\"671\",\"z\":\"0\"}}"
|
||||
id_parent[22]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-3\"}},\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
|
||||
id_child[22]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-6\"}},\"x\":\"-470\",\"y\":\"671\",\"z\":\"0\"}}"
|
||||
id_map[22]="2"
|
||||
id_parent_source_data[22]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}"
|
||||
id_child_source_data[22]="{\"tagente\":{\"nombre\":\"windows-6\"}}"
|
||||
@ -625,8 +625,8 @@ id_item[22]="0"
|
||||
deleted[22]="0"
|
||||
|
||||
id[23]="23"
|
||||
id_parent[23]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"31\",\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
|
||||
id_child[23]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"24\",\"x\":\"-296\",\"y\":\"899\",\"z\":\"0\"}}"
|
||||
id_parent[23]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-3\"}},\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
|
||||
id_child[23]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-9\"}},\"x\":\"-296\",\"y\":\"899\",\"z\":\"0\"}}"
|
||||
id_map[23]="2"
|
||||
id_parent_source_data[23]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}"
|
||||
id_child_source_data[23]="{\"tagente\":{\"nombre\":\"linux-9\"}}"
|
||||
@ -636,8 +636,8 @@ id_item[23]="0"
|
||||
deleted[23]="0"
|
||||
|
||||
id[24]="24"
|
||||
id_parent[24]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"31\",\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
|
||||
id_child[24]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"25\",\"x\":\"-25\",\"y\":\"961\",\"z\":\"0\"}}"
|
||||
id_parent[24]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-3\"}},\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
|
||||
id_child[24]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-10\"}},\"x\":\"-25\",\"y\":\"961\",\"z\":\"0\"}}"
|
||||
id_map[24]="2"
|
||||
id_parent_source_data[24]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}"
|
||||
id_child_source_data[24]="{\"tagente\":{\"nombre\":\"linux-10\"}}"
|
||||
@ -647,8 +647,8 @@ id_item[24]="0"
|
||||
deleted[24]="0"
|
||||
|
||||
id[25]="25"
|
||||
id_parent[25]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"32\",\"x\":\"1824\",\"y\":\"285\",\"z\":\"0\"}}"
|
||||
id_child[25]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"26\",\"x\":\"1683\",\"y\":\"13\",\"z\":\"0\"}}"
|
||||
id_parent[25]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-3\"}},\"x\":\"1824\",\"y\":\"285\",\"z\":\"0\"}}"
|
||||
id_child[25]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-11\"}},\"x\":\"1683\",\"y\":\"13\",\"z\":\"0\"}}"
|
||||
id_map[25]="2"
|
||||
id_parent_source_data[25]="{\"tagente\":{\"nombre\":\"cisco-3\"}}"
|
||||
id_child_source_data[25]="{\"tagente\":{\"nombre\":\"linux-11\"}}"
|
||||
@ -658,8 +658,8 @@ id_item[25]="0"
|
||||
deleted[25]="0"
|
||||
|
||||
id[26]="26"
|
||||
id_parent[26]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"32\",\"x\":\"1824\",\"y\":\"285\",\"z\":\"0\"}}"
|
||||
id_child[26]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"27\",\"x\":\"2135\",\"y\":\"51\",\"z\":\"0\"}}"
|
||||
id_parent[26]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-3\"}},\"x\":\"1824\",\"y\":\"285\",\"z\":\"0\"}}"
|
||||
id_child[26]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-12\"}},\"x\":\"2135\",\"y\":\"51\",\"z\":\"0\"}}"
|
||||
id_map[26]="2"
|
||||
id_parent_source_data[26]="{\"tagente\":{\"nombre\":\"cisco-3\"}}"
|
||||
id_child_source_data[26]="{\"tagente\":{\"nombre\":\"linux-12\"}}"
|
||||
|
@ -1,5 +1,5 @@
|
||||
pandorafms.vmware=a272ee00a9b5f201bb708bef72bbe276
|
||||
pandorafms.mysql=fadb4750d18285c0eca34f47c6aa3cfe
|
||||
pandorafms.mysql=33d470c7492214d4b384ed307e81adf4
|
||||
pandorafms.vmware=1deafce1d55d3574645d8b136104e9ad
|
||||
pandorafms.mysql=ca7dd8b80a1a03a25eb0fb077818ad63
|
||||
pandorafms.mssql=1cc215409741d19080269ffba112810e
|
||||
|
@ -125,7 +125,7 @@ UPDATE `tncm_agent_data_template` SET `vendors` = CONCAT('["', TRIM(BOTH '"' FRO
|
||||
-- Update version for plugin oracle
|
||||
UPDATE `tdiscovery_apps` SET `version` = '1.2' WHERE `short_name` = 'pandorafms.oracle';
|
||||
-- Update version for plugin mysql
|
||||
UPDATE `tdiscovery_apps` SET `version` = '1.1' WHERE `short_name` = 'pandorafms.mysql';
|
||||
UPDATE `tdiscovery_apps` SET `version` = '1.2' WHERE `short_name` = 'pandorafms.mysql';
|
||||
|
||||
|
||||
SET @widget_id = NULL;
|
||||
|
7710
pandora_console/extras/mr/69.sql
Normal file
7710
pandora_console/extras/mr/69.sql
Normal file
File diff suppressed because one or more lines are too long
@ -599,21 +599,12 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
|
||||
function filter_notification() {
|
||||
let notification_type = '';
|
||||
$('.notification-item').hide();
|
||||
$(".checkbox_filter_notifications:checkbox:checked").each(function() {
|
||||
notification_type = $(this).val();
|
||||
console.log(notification_type);
|
||||
notification_type = $("#notifications_filter_options").val()
|
||||
|
||||
if (notification_type === 'All') {
|
||||
$('.notification-item').show();
|
||||
} else {
|
||||
$('.notification-item[value='+notification_type+']').show();
|
||||
if (notification_type == 'All'){
|
||||
$('.notification-item').show();
|
||||
}
|
||||
});
|
||||
|
||||
if (notification_type == 'All'){
|
||||
$('.notification-item').show();
|
||||
}
|
||||
|
||||
if (notification_type == ''){
|
||||
$('.notification-item').hide();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1058,8 +1049,10 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
|
||||
})
|
||||
}
|
||||
},
|
||||
closeOnEscape: true,
|
||||
onload: () => {
|
||||
$(document).ready(function () {
|
||||
$(".ui-dialog-titlebar-close").hide();
|
||||
var buttonpane = $("div[aria-describedby='welcome_modal_window'] .ui-dialog-buttonpane.ui-widget-content.ui-helper-clearfix");
|
||||
$(buttonpane).append(`
|
||||
<div class="welcome-wizard-buttons">
|
||||
|
@ -1514,6 +1514,7 @@ if ($update_module === true || $create_module === true) {
|
||||
$old_configuration_data = (string) get_parameter('old_configuration_data');
|
||||
$new_configuration_data = '';
|
||||
|
||||
|
||||
$custom_string_1_default = '';
|
||||
$custom_string_2_default = '';
|
||||
$custom_string_3_default = '';
|
||||
@ -1979,6 +1980,19 @@ if ($update_module) {
|
||||
}
|
||||
}
|
||||
|
||||
$def_msg = __('There was a problem updating module. Processing error');
|
||||
|
||||
if (preg_match('/module_type\s+([^\\n]+)/', io_safe_output($configuration_data), $matches)) {
|
||||
$config_module_type = $matches[1];
|
||||
|
||||
$type_id = (int) db_get_value('id_tipo', 'ttipo_modulo', 'nombre', $config_module_type);
|
||||
|
||||
if ($type_id !== $id_module_type) {
|
||||
$def_msg = __('There was a problem updating module: module type cannot be edited');
|
||||
$result = ERR_GENERIC;
|
||||
}
|
||||
}
|
||||
|
||||
if (is_error($result) === true) {
|
||||
switch ($result) {
|
||||
case ERR_EXIST:
|
||||
@ -1996,7 +2010,7 @@ if ($update_module) {
|
||||
case ERR_DB:
|
||||
case ERR_GENERIC:
|
||||
default:
|
||||
$msg = __('There was a problem updating module. Processing error');
|
||||
$msg = $def_msg;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -318,7 +318,7 @@ $filterTable->data[0][0] = html_print_label_input_block(
|
||||
$return_all_group,
|
||||
'ag_group',
|
||||
$ag_group,
|
||||
'this.form.submit();',
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true,
|
||||
@ -337,7 +337,7 @@ $filterTable->data[0][1] = html_print_label_input_block(
|
||||
$recursion,
|
||||
true,
|
||||
false,
|
||||
'this.form.submit()'
|
||||
''
|
||||
).'</div>'
|
||||
);
|
||||
|
||||
@ -347,7 +347,7 @@ $filterTable->data[0][2] = html_print_label_input_block(
|
||||
$showAgentFields,
|
||||
'disabled',
|
||||
$disabled,
|
||||
'this.form.submit()',
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true,
|
||||
@ -365,7 +365,7 @@ $filterTable->data[0][3] = html_print_label_input_block(
|
||||
$fields,
|
||||
'os',
|
||||
$os,
|
||||
'this.form.submit()',
|
||||
'',
|
||||
'All',
|
||||
0,
|
||||
true,
|
||||
|
@ -662,6 +662,7 @@ if ($modules !== false) {
|
||||
$table->width = '100%';
|
||||
$table->class = 'tactical_table info_table';
|
||||
$table->head = [];
|
||||
if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW') === true) {
|
||||
$table->head['checkbox'] = html_print_checkbox(
|
||||
'all_delete',
|
||||
0,
|
||||
@ -669,6 +670,8 @@ if ($modules !== false) {
|
||||
true,
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
$table->head[0] = '<span>'.__('Name').'</span>'.ui_get_sorting_arrows(
|
||||
$url_name.'up',
|
||||
$url_name.'down',
|
||||
@ -1262,23 +1265,11 @@ html_print_div(
|
||||
$('#modal').dialog("close");
|
||||
});
|
||||
|
||||
$('[id^=checkbox-id_delete]').change(function(){
|
||||
if($(this).parent().parent().hasClass('checkselected')){
|
||||
$(this).parent().parent().removeClass('checkselected');
|
||||
}
|
||||
else{
|
||||
$(this).parent().parent().addClass('checkselected');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('[id^=checkbox-all_delete]').change(function(){
|
||||
if ($("#checkbox-all_delete").prop("checked")) {
|
||||
$('[id^=checkbox-id_delete]').parent().parent().addClass('checkselected');
|
||||
$("[name^=id_delete").prop("checked", true);
|
||||
}
|
||||
else{
|
||||
$('[id^=checkbox-id_delete]').parent().parent().removeClass('checkselected');
|
||||
$("[name^=id_delete").prop("checked", false);
|
||||
}
|
||||
});
|
||||
|
@ -58,7 +58,6 @@ if ($id_group > 0) {
|
||||
$alerts_disabled = $group['disabled'];
|
||||
$custom_id = $group['custom_id'];
|
||||
$propagate = $group['propagate'];
|
||||
$skin = $group['id_skin'];
|
||||
$contact = $group['contact'];
|
||||
$other = $group['other'];
|
||||
$description = $group['description'];
|
||||
@ -80,7 +79,6 @@ if ($id_group > 0) {
|
||||
$alerts_disabled = 0;
|
||||
$custom_id = '';
|
||||
$propagate = 0;
|
||||
$skin = 0;
|
||||
$contact = '';
|
||||
$other = '';
|
||||
$description = '';
|
||||
@ -261,12 +259,12 @@ $table->data[3][1] = html_print_label_input_block(
|
||||
|
||||
$table->data[4][0] = html_print_label_input_block(
|
||||
__('Contact').ui_print_help_tip(__('Contact information accessible through the _groupcontact_ macro'), true),
|
||||
html_print_textarea('contact', 4, 40, $contact, "class='min-height-0px'", true)
|
||||
html_print_input_text('contact', $contact, '', false, '', true)
|
||||
);
|
||||
|
||||
$table->data[4][1] = html_print_label_input_block(
|
||||
__('Other').ui_print_help_tip(__('Information accessible through the _group_other_ macro'), true),
|
||||
html_print_textarea('other', 4, 40, $other, "class='min-height-0px'", true)
|
||||
html_print_input_text('other', $other, '', false, '', true)
|
||||
);
|
||||
|
||||
$table->data[5][0] = html_print_label_input_block(
|
||||
|
@ -439,7 +439,6 @@ if ($is_management_allowed === true
|
||||
$group_pass = (string) get_parameter('group_pass');
|
||||
$alerts_disabled = (bool) get_parameter('alerts_disabled');
|
||||
$custom_id = (string) get_parameter('custom_id');
|
||||
$skin = (string) get_parameter('skin');
|
||||
$description = (string) get_parameter('description');
|
||||
$contact = (string) get_parameter('contact');
|
||||
$other = (string) get_parameter('other');
|
||||
@ -462,7 +461,6 @@ if ($is_management_allowed === true
|
||||
'parent' => $id_parent,
|
||||
'disabled' => $alerts_disabled,
|
||||
'custom_id' => $custom_id,
|
||||
'id_skin' => $skin,
|
||||
'description' => $description,
|
||||
'contact' => $contact,
|
||||
'propagate' => $propagate,
|
||||
@ -498,7 +496,6 @@ if ($is_management_allowed === true && $update_group === true) {
|
||||
$alerts_enabled = (bool) get_parameter('alerts_enabled');
|
||||
$custom_id = (string) get_parameter('custom_id');
|
||||
$propagate = (bool) get_parameter('propagate');
|
||||
$skin = (string) get_parameter('skin');
|
||||
$description = (string) get_parameter('description');
|
||||
$contact = (string) get_parameter('contact');
|
||||
$other = (string) get_parameter('other');
|
||||
@ -530,7 +527,6 @@ if ($is_management_allowed === true && $update_group === true) {
|
||||
'parent' => ($id_parent == -1) ? 0 : $id_parent,
|
||||
'disabled' => !$alerts_enabled,
|
||||
'custom_id' => $custom_id,
|
||||
'id_skin' => $skin,
|
||||
'description' => $description,
|
||||
'contact' => $contact,
|
||||
'propagate' => $propagate,
|
||||
|
@ -628,7 +628,7 @@ if (is_metaconsole() === true) {
|
||||
$url = 'index.php?sec=advanced&sec2=advanced/massive_operations&tab=massive_agents&pure=0&option=edit_agents';
|
||||
}
|
||||
|
||||
echo '<form method="post" autocomplete="off" id="form_agent" action="'.$url.'">';
|
||||
echo '<form method="post" autocomplete="off" id="form_agent" class="form-agent-bulk-operation" action="'.$url.'">';
|
||||
echo html_print_avoid_autocomplete();
|
||||
$params = [
|
||||
'id_group' => ($id_group ?? ''),
|
||||
@ -651,14 +651,11 @@ echo '<div id="form_agents" style="display:none">';
|
||||
|
||||
$table = new StdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox filters';
|
||||
$table->class = 'databox filters filter-table-adv';
|
||||
$table->head = [];
|
||||
$table->style = [];
|
||||
$table->style[0] = 'font-weight: bold; width: 150px;';
|
||||
$table->size[0] = '15%';
|
||||
$table->size[1] = '35%';
|
||||
$table->size[2] = '15%';
|
||||
$table->size[3] = '35%';
|
||||
$table->size[0] = '50%';
|
||||
$table->size[1] = '50%';
|
||||
|
||||
$table->data = [];
|
||||
|
||||
@ -683,7 +680,6 @@ if (is_metaconsole() === false) {
|
||||
$modules_values[$m['id_module']] = $m['name'];
|
||||
}
|
||||
|
||||
$table->data[0][0] = __('Parent');
|
||||
$params = [];
|
||||
$params['return'] = true;
|
||||
$params['show_helptip'] = true;
|
||||
@ -694,10 +690,16 @@ if (is_metaconsole() === false) {
|
||||
$params['value'] = db_get_value('alias', 'tagente', 'id_agente', $id_parent);
|
||||
$params['selectbox_id'] = 'cascade_protection_module';
|
||||
$params['javascript_is_function_select'] = true;
|
||||
$table->data[0][1] = ui_print_agent_autocomplete_input($params);
|
||||
|
||||
$table->data[0][1] .= '<b>'.__('Cascade protection').'</b>';
|
||||
$table->data[0][1] .= html_print_select(
|
||||
$table->data[0][0] = html_print_label_input_block(
|
||||
__('Parent'),
|
||||
ui_print_agent_autocomplete_input($params)
|
||||
);
|
||||
|
||||
|
||||
$table->data[0][1] = html_print_label_input_block(
|
||||
__('Cascade protection'),
|
||||
'<div class="flex-row-center">'.html_print_select(
|
||||
[
|
||||
1 => __('Yes'),
|
||||
0 => __('No'),
|
||||
@ -707,24 +709,32 @@ if (is_metaconsole() === false) {
|
||||
'',
|
||||
__('No change'),
|
||||
-1,
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[0][1] .= ' '.__('Module').' ';
|
||||
$table->data[0][1] .= html_print_select(
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'w50p',
|
||||
false,
|
||||
'width: 48%;'
|
||||
).'<div class="flex-row-center mrgn_lft_20px">'.__('Module').' '.html_print_select(
|
||||
($modules ?? ''),
|
||||
'cascade_protection_module',
|
||||
($cascade_protection_module ?? ''),
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'width: 100%;'
|
||||
).'</div></div>'
|
||||
);
|
||||
}
|
||||
|
||||
$table->data[1][0] = __('Group');
|
||||
$table->data[1][1] = '<div class="w290px inline">';
|
||||
$table->data[1][1] .= html_print_select_groups(
|
||||
$table->data[1][0] = html_print_label_input_block(
|
||||
__('Group'),
|
||||
html_print_select_groups(
|
||||
false,
|
||||
'AR',
|
||||
false,
|
||||
@ -737,14 +747,13 @@ $table->data[1][1] .= html_print_select_groups(
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'width: 150px;'
|
||||
false
|
||||
)
|
||||
);
|
||||
$table->data[1][1] .= '</div>';
|
||||
|
||||
$table->data[2][0] = __('Interval');
|
||||
|
||||
$table->data[2][1] = html_print_extended_select_for_time(
|
||||
$table->data[1][1] = html_print_label_input_block(
|
||||
__('Interval'),
|
||||
html_print_extended_select_for_time(
|
||||
'interval',
|
||||
-2,
|
||||
'',
|
||||
@ -752,17 +761,23 @@ $table->data[2][1] = html_print_extended_select_for_time(
|
||||
'0',
|
||||
10,
|
||||
true,
|
||||
'width: 150px',
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[3][0] = __('OS');
|
||||
$table->data[3][1] = html_print_select_from_sql(
|
||||
$os_preview = ' <span id="os_preview" class="mrgn_lft_10px">';
|
||||
$os_preview .= ui_print_os_icon($id_os, false, true);
|
||||
$os_preview .= '</span>';
|
||||
|
||||
$table->data[2][0] = html_print_label_input_block(
|
||||
__('OS'),
|
||||
'<div class="flex-row-center">'.html_print_select_from_sql(
|
||||
'SELECT id_os, name FROM tconfig_os',
|
||||
'id_os',
|
||||
$id_os,
|
||||
@ -773,11 +788,9 @@ $table->data[3][1] = html_print_select_from_sql(
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
'width: 105px;'
|
||||
'width: 100%;'
|
||||
).$os_preview.'</div>'
|
||||
);
|
||||
$table->data[3][1] .= ' <span id="os_preview">';
|
||||
$table->data[3][1] .= ui_print_os_icon($id_os, false, true);
|
||||
$table->data[3][1] .= '</span>';
|
||||
|
||||
// Network server.
|
||||
$none = '';
|
||||
@ -785,8 +798,9 @@ if ($server_name == '' && $id_agente) {
|
||||
$none = __('None');
|
||||
}
|
||||
|
||||
$table->data[4][0] = __('Server');
|
||||
$table->data[4][1] = html_print_select(
|
||||
$table->data[2][1] = html_print_label_input_block(
|
||||
__('Server'),
|
||||
html_print_select(
|
||||
servers_get_names(),
|
||||
'server_name',
|
||||
$server_name,
|
||||
@ -797,19 +811,21 @@ $table->data[4][1] = html_print_select(
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'width: 150px;'
|
||||
false
|
||||
)
|
||||
);
|
||||
|
||||
// Description.
|
||||
$table->data[5][0] = __('Description');
|
||||
$table->data[5][1] = html_print_input_text(
|
||||
$table->data[3][0] = html_print_label_input_block(
|
||||
__('Description'),
|
||||
html_print_input_text(
|
||||
'description',
|
||||
$description,
|
||||
'',
|
||||
45,
|
||||
255,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
html_print_table($table);
|
||||
@ -827,12 +843,10 @@ $quiet_select = -1;
|
||||
|
||||
$table = new StdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox filters';
|
||||
$table->class = 'databox filters filter-table-adv';
|
||||
|
||||
$table->size[0] = '15%';
|
||||
$table->size[1] = '35%';
|
||||
$table->size[2] = '15%';
|
||||
$table->size[3] = '35%';
|
||||
$table->size[0] = '50%';
|
||||
$table->size[1] = '50%';
|
||||
|
||||
$table->head = [];
|
||||
$table->style = [];
|
||||
@ -840,21 +854,24 @@ $table->style[0] = 'font-weight: bold; width: 150px;';
|
||||
$table->data = [];
|
||||
|
||||
// Custom ID.
|
||||
$table->data[0][0] = __('Custom ID');
|
||||
$table->data[0][1] = html_print_input_text(
|
||||
$table->data[0][0] = html_print_label_input_block(
|
||||
__('Custom ID'),
|
||||
html_print_input_text(
|
||||
'custom_id',
|
||||
$custom_id,
|
||||
'',
|
||||
16,
|
||||
255,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
// Secondary Groups.
|
||||
if (enterprise_installed() === true) {
|
||||
$groups = users_get_groups($config['id_user'], 'AW', false);
|
||||
$table->data['secondary_groups_added'][0] = __('Add secondary groups');
|
||||
$table->data['secondary_groups_added'][1] = html_print_select(
|
||||
$table->data[1][0] = html_print_label_input_block(
|
||||
__('Add secondary groups'),
|
||||
html_print_select(
|
||||
$groups,
|
||||
'secondary_groups_added[]',
|
||||
0,
|
||||
@ -877,10 +894,12 @@ if (enterprise_installed() === true) {
|
||||
false,
|
||||
true,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table->data['secondary_groups_removed'][0] = __('Remove secondary groups');
|
||||
$table->data['secondary_groups_removed'][1] = html_print_select(
|
||||
$table->data[1][1] = html_print_label_input_block(
|
||||
__('Remove secondary groups'),
|
||||
html_print_select(
|
||||
$groups,
|
||||
'secondary_groups_removed[]',
|
||||
0,
|
||||
@ -903,13 +922,13 @@ if (enterprise_installed() === true) {
|
||||
false,
|
||||
true,
|
||||
true
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// Learn mode / Normal mode.
|
||||
$table->data[1][0] = __('Module definition');
|
||||
$table->data[1][1] = __('No change').' ';
|
||||
$table->data[1][1] .= html_print_radio_button_extended(
|
||||
$module_definition = __('No change').' ';
|
||||
$module_definition .= html_print_radio_button_extended(
|
||||
'mode',
|
||||
-1,
|
||||
'',
|
||||
@ -919,8 +938,8 @@ $table->data[1][1] .= html_print_radio_button_extended(
|
||||
'class="mrgn_right_40px"',
|
||||
true
|
||||
);
|
||||
$table->data[1][1] .= __('Learning mode').' ';
|
||||
$table->data[1][1] .= html_print_radio_button_extended(
|
||||
$module_definition .= __('Learning mode').' ';
|
||||
$module_definition .= html_print_radio_button_extended(
|
||||
'mode',
|
||||
1,
|
||||
'',
|
||||
@ -930,8 +949,8 @@ $table->data[1][1] .= html_print_radio_button_extended(
|
||||
'class="mrgn_right_40px"',
|
||||
true
|
||||
);
|
||||
$table->data[1][1] .= __('Normal mode').' ';
|
||||
$table->data[1][1] .= html_print_radio_button_extended(
|
||||
$module_definition .= __('Normal mode').' ';
|
||||
$module_definition .= html_print_radio_button_extended(
|
||||
'mode',
|
||||
0,
|
||||
'',
|
||||
@ -941,8 +960,8 @@ $table->data[1][1] .= html_print_radio_button_extended(
|
||||
'class="mrgn_right_40px"',
|
||||
true
|
||||
);
|
||||
$table->data[1][1] .= __('Autodisable mode').' ';
|
||||
$table->data[1][1] .= html_print_radio_button_extended(
|
||||
$module_definition .= __('Autodisable mode').' ';
|
||||
$module_definition .= html_print_radio_button_extended(
|
||||
'mode',
|
||||
2,
|
||||
'',
|
||||
@ -953,10 +972,14 @@ $table->data[1][1] .= html_print_radio_button_extended(
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[2][0] = html_print_label_input_block(
|
||||
__('Module definition'),
|
||||
'<div class="flex-row-center">'.$module_definition.'</div>'
|
||||
);
|
||||
|
||||
// Status (Disabled / Enabled).
|
||||
$table->data[2][0] = __('Status');
|
||||
$table->data[2][1] = __('No change').' ';
|
||||
$table->data[2][1] .= html_print_radio_button_extended(
|
||||
$status_item = __('No change').' ';
|
||||
$status_item .= html_print_radio_button_extended(
|
||||
'disabled',
|
||||
-1,
|
||||
'',
|
||||
@ -966,12 +989,12 @@ $table->data[2][1] .= html_print_radio_button_extended(
|
||||
'class="mrgn_right_40px"',
|
||||
true
|
||||
);
|
||||
$table->data[2][1] .= __('Disabled').' ';
|
||||
$table->data[2][1] .= ui_print_help_tip(
|
||||
$status_item .= __('Disabled').' ';
|
||||
$status_item .= ui_print_help_tip(
|
||||
__('If the remote configuration is enabled, it will also go into standby mode when disabling it.'),
|
||||
true
|
||||
).' ';
|
||||
$table->data[2][1] .= html_print_radio_button_extended(
|
||||
$status_item .= html_print_radio_button_extended(
|
||||
'disabled',
|
||||
1,
|
||||
'',
|
||||
@ -981,8 +1004,8 @@ $table->data[2][1] .= html_print_radio_button_extended(
|
||||
'class="mrgn_right_40px"',
|
||||
true
|
||||
);
|
||||
$table->data[2][1] .= __('Active').' ';
|
||||
$table->data[2][1] .= html_print_radio_button_extended(
|
||||
$status_item .= __('Active').' ';
|
||||
$status_item .= html_print_radio_button_extended(
|
||||
'disabled',
|
||||
0,
|
||||
'',
|
||||
@ -993,15 +1016,19 @@ $table->data[2][1] .= html_print_radio_button_extended(
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[2][1] = html_print_label_input_block(
|
||||
__('Status'),
|
||||
'<div class="flex-row-center">'.$status_item.'</div>'
|
||||
);
|
||||
|
||||
// Remote configuration.
|
||||
$table->data[3][0] = __('Remote configuration');
|
||||
// Delete remote configuration.
|
||||
$table->data[3][1] = '<div id="delete_configurations" class="invisible">';
|
||||
$table->data[3][1] .= __('Delete available remote configurations');
|
||||
$table->data[3][1] .= ' (';
|
||||
$table->data[3][1] .= '<span id="n_configurations"></span>';
|
||||
$table->data[3][1] .= ') ';
|
||||
$table->data[3][1] .= html_print_checkbox_extended(
|
||||
$remote_config = '<div id="delete_configurations" class="invisible">';
|
||||
$remote_config .= __('Delete available remote configurations');
|
||||
$remote_config .= ' (';
|
||||
$remote_config .= '<span id="n_configurations"></span>';
|
||||
$remote_config .= ') ';
|
||||
$remote_config .= html_print_checkbox_extended(
|
||||
'delete_conf',
|
||||
1,
|
||||
0,
|
||||
@ -1010,11 +1037,16 @@ $table->data[3][1] .= html_print_checkbox_extended(
|
||||
'class="mrgn_right_40px"',
|
||||
true
|
||||
);
|
||||
$table->data[3][1] .= '</div>';
|
||||
$remote_config .= '</div>';
|
||||
|
||||
$table->data[3][1] .= '<div id="not_available_configurations" class="invisible"><em>';
|
||||
$table->data[3][1] .= __('Not available');
|
||||
$table->data[3][1] .= '</em></div>';
|
||||
$remote_config .= '<div id="not_available_configurations" class="invisible"><em>';
|
||||
$remote_config .= __('Not available');
|
||||
$remote_config .= '</em></div>';
|
||||
|
||||
$table->data[3][0] = html_print_label_input_block(
|
||||
__('Remote configuration'),
|
||||
'<div class="flex-row-center">'.$remote_config.'</div>'
|
||||
);
|
||||
|
||||
$listIcons = gis_get_array_list_icons();
|
||||
|
||||
@ -1042,8 +1074,7 @@ if ($icon_path == '') {
|
||||
$path_warning = $path.$icon_path.'.warning.png';
|
||||
}
|
||||
|
||||
$table->data[4][0] = __('Agent icon');
|
||||
$table->data[4][1] = html_print_select(
|
||||
$agent_icon = html_print_select(
|
||||
$arraySelectIcon,
|
||||
'icon_path',
|
||||
$icon_path,
|
||||
@ -1052,9 +1083,9 @@ $table->data[4][1] = html_print_select(
|
||||
'',
|
||||
true
|
||||
);
|
||||
$table->data[4][1] .= ' ';
|
||||
$table->data[4][1] .= __('Without status').': ';
|
||||
$table->data[4][1] .= html_print_image(
|
||||
$agent_icon .= ' ';
|
||||
$agent_icon .= __('Without status').': ';
|
||||
$agent_icon .= html_print_image(
|
||||
$path_without,
|
||||
true,
|
||||
[
|
||||
@ -1062,8 +1093,8 @@ $table->data[4][1] .= html_print_image(
|
||||
'style' => 'display:'.$display_icons.';',
|
||||
]
|
||||
);
|
||||
$table->data[4][1] .= ' '.__('Default').': ';
|
||||
$table->data[4][1] .= html_print_image(
|
||||
$agent_icon .= ' '.__('Default').': ';
|
||||
$agent_icon .= html_print_image(
|
||||
$path_default,
|
||||
true,
|
||||
[
|
||||
@ -1071,8 +1102,8 @@ $table->data[4][1] .= html_print_image(
|
||||
'style' => 'display:'.$display_icons.';',
|
||||
]
|
||||
);
|
||||
$table->data[4][1] .= ' '.__('Ok').': ';
|
||||
$table->data[4][1] .= html_print_image(
|
||||
$agent_icon .= ' '.__('Ok').': ';
|
||||
$agent_icon .= html_print_image(
|
||||
$path_ok,
|
||||
true,
|
||||
[
|
||||
@ -1080,8 +1111,8 @@ $table->data[4][1] .= html_print_image(
|
||||
'style' => 'display:'.$display_icons.';',
|
||||
]
|
||||
);
|
||||
$table->data[4][1] .= ' '.__('Bad').': ';
|
||||
$table->data[4][1] .= html_print_image(
|
||||
$agent_icon .= ' '.__('Bad').': ';
|
||||
$agent_icon .= html_print_image(
|
||||
$path_bad,
|
||||
true,
|
||||
[
|
||||
@ -1089,8 +1120,8 @@ $table->data[4][1] .= html_print_image(
|
||||
'style' => 'display:'.$display_icons.';',
|
||||
]
|
||||
);
|
||||
$table->data[4][1] .= ' '.__('Warning').': ';
|
||||
$table->data[4][1] .= html_print_image(
|
||||
$agent_icon .= ' '.__('Warning').': ';
|
||||
$agent_icon .= html_print_image(
|
||||
$path_warning,
|
||||
true,
|
||||
[
|
||||
@ -1099,10 +1130,14 @@ $table->data[4][1] .= html_print_image(
|
||||
]
|
||||
);
|
||||
|
||||
$table->data[3][1] = html_print_label_input_block(
|
||||
__('Agent icon'),
|
||||
'<div class="flex-row-center">'.$agent_icon.'</div>'
|
||||
);
|
||||
|
||||
if ($config['activate_gis']) {
|
||||
$table->data[5][0] = __('Ignore new GIS data:');
|
||||
$table->data[5][1] = __('No change').' ';
|
||||
$table->data[5][1] .= html_print_radio_button_extended(
|
||||
$ignore_gis = __('No change').' ';
|
||||
$ignore_gis .= html_print_radio_button_extended(
|
||||
'update_gis_data',
|
||||
-1,
|
||||
'',
|
||||
@ -1112,8 +1147,8 @@ if ($config['activate_gis']) {
|
||||
'class="mrgn_right_40px"',
|
||||
true
|
||||
);
|
||||
$table->data[5][1] .= __('Yes').' ';
|
||||
$table->data[5][1] .= html_print_radio_button_extended(
|
||||
$ignore_gis .= __('Yes').' ';
|
||||
$ignore_gis .= html_print_radio_button_extended(
|
||||
'update_gis_data',
|
||||
0,
|
||||
'',
|
||||
@ -1123,8 +1158,8 @@ if ($config['activate_gis']) {
|
||||
'class="mrgn_right_40px"',
|
||||
true
|
||||
);
|
||||
$table->data[5][1] .= __('No').' ';
|
||||
$table->data[5][1] .= html_print_radio_button_extended(
|
||||
$ignore_gis .= __('No').' ';
|
||||
$ignore_gis .= html_print_radio_button_extended(
|
||||
'update_gis_data',
|
||||
1,
|
||||
'',
|
||||
@ -1134,14 +1169,20 @@ if ($config['activate_gis']) {
|
||||
'class="mrgn_right_40px"',
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[4][0] = html_print_label_input_block(
|
||||
__('Ignore new GIS data:'),
|
||||
'<div class="flex-row-center">'.$ignore_gis.'</div>'
|
||||
);
|
||||
}
|
||||
|
||||
$table->data[6][0] = __('Quiet');
|
||||
$table->data[6][0] .= ui_print_help_tip(
|
||||
|
||||
$table->data[5][0] = html_print_label_input_block(
|
||||
__('Quiet:').ui_print_help_tip(
|
||||
__('The agent still runs but the alerts and events will be stop'),
|
||||
true
|
||||
);
|
||||
$table->data[6][1] = html_print_select(
|
||||
),
|
||||
html_print_select(
|
||||
[
|
||||
-1 => __('No change'),
|
||||
1 => __('Yes'),
|
||||
@ -1153,16 +1194,18 @@ $table->data[6][1] = html_print_select(
|
||||
'',
|
||||
0,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[7][0] = __('Safe operation mode').': '.ui_print_help_tip(
|
||||
$table->data[5][1] = html_print_label_input_block(
|
||||
__('Safe operation mode').': '.ui_print_help_tip(
|
||||
__(
|
||||
'This mode allow %s to disable all modules of this agent while the selected module is on CRITICAL status',
|
||||
get_product_name()
|
||||
),
|
||||
true
|
||||
);
|
||||
$table->data[7][1] = html_print_select(
|
||||
),
|
||||
'<div class="flex-row-center">'.html_print_select(
|
||||
[
|
||||
1 => __('Enabled'),
|
||||
0 => __('Disabled'),
|
||||
@ -1173,10 +1216,7 @@ $table->data[7][1] = html_print_select(
|
||||
__('No change'),
|
||||
-1,
|
||||
true
|
||||
).' ';
|
||||
|
||||
$table->data[7][1] .= __('Module').' ';
|
||||
$table->data[7][1] .= html_print_select(
|
||||
).'<div class="flex-row-center mrgn_lft_20px">'.__('Module').' '.html_print_select(
|
||||
'',
|
||||
'safe_mode_module',
|
||||
'',
|
||||
@ -1184,10 +1224,12 @@ $table->data[7][1] .= html_print_select(
|
||||
__('Any'),
|
||||
-1,
|
||||
true
|
||||
).'</div></div>'
|
||||
);
|
||||
|
||||
$table->data[8][0] = __('Ignore unknown').ui_print_help_tip(_('This disables the calculation of the unknown state in the agent and any of its modules, so it will never transition to unknown. The state it reflects is the last known status.'), true);
|
||||
$table->data[8][1] = html_print_select(
|
||||
$table->data[6][0] = html_print_label_input_block(
|
||||
__('Ignore unknown').ui_print_help_tip(_('This disables the calculation of the unknown state in the agent and any of its modules, so it will never transition to unknown. The state it reflects is the last known status.'), true),
|
||||
html_print_select(
|
||||
[
|
||||
'' => __('No change'),
|
||||
'1' => __('Yes'),
|
||||
@ -1202,6 +1244,7 @@ $table->data[8][1] = html_print_select(
|
||||
false,
|
||||
false,
|
||||
'w100p'
|
||||
)
|
||||
);
|
||||
|
||||
ui_toggle(html_print_table($table, true), __('Advanced options'));
|
||||
@ -1209,16 +1252,13 @@ unset($table);
|
||||
|
||||
$table = new StdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox filters';
|
||||
$table->class = 'databox filters filter-table-adv';
|
||||
|
||||
$table->head = [];
|
||||
$table->style = [];
|
||||
$table->style[0] = 'font-weight: bold; width: 150px;';
|
||||
$table->data = [];
|
||||
$table->size[0] = '15%';
|
||||
$table->size[1] = '35%';
|
||||
$table->size[2] = '15%';
|
||||
$table->size[3] = '35%';
|
||||
$table->size[0] = '50%';
|
||||
$table->size[1] = '50%';
|
||||
|
||||
$fields = db_get_all_fields_in_table('tagent_custom_fields');
|
||||
|
||||
@ -1226,6 +1266,8 @@ if ($fields === false) {
|
||||
$fields = [];
|
||||
}
|
||||
|
||||
$row = 0;
|
||||
$col = 0;
|
||||
foreach ($fields as $field) {
|
||||
$data[0] = '<b>'.$field['name'].'</b>';
|
||||
$combo = [];
|
||||
@ -1270,7 +1312,7 @@ foreach ($fields as $field) {
|
||||
2,
|
||||
65,
|
||||
$custom_value,
|
||||
'class="mrgn_right_30px"',
|
||||
'class=""',
|
||||
true
|
||||
);
|
||||
}
|
||||
@ -1290,7 +1332,20 @@ foreach ($fields as $field) {
|
||||
);
|
||||
};
|
||||
|
||||
array_push($table->data, $data);
|
||||
$output = html_print_label_input_block(
|
||||
$data[0],
|
||||
$data[1]
|
||||
);
|
||||
|
||||
// array_push($table->data, $output);
|
||||
$table->data[$row][$col] = $output;
|
||||
|
||||
if ($col === 1) {
|
||||
$col = 0;
|
||||
$row++;
|
||||
} else {
|
||||
$col++;
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($fields) === false) {
|
||||
|
@ -81,16 +81,6 @@ if ((bool) check_acl($config['id_user'], 0, 'AR') === true
|
||||
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
|
||||
// Applications.
|
||||
$sub2 = [];
|
||||
// Check if app has been migrated.
|
||||
if (enterprise_installed() === true) {
|
||||
(ManageExtensions::isMigrated('pandorafms.mssql') === true) ?: ($sub2['godmode/servers/discovery&wiz=app&mode=MicrosoftSQLServer']['text'] = __('Microsoft SQL Server (legacy)'));
|
||||
(ManageExtensions::isMigrated('pandorafms.mysql') === true) ?: ($sub2['godmode/servers/discovery&wiz=app&mode=mysql']['text'] = __('Mysql (legacy)'));
|
||||
(ManageExtensions::isMigrated('pandorafms.oracle') === true) ?: ($sub2['godmode/servers/discovery&wiz=app&mode=oracle']['text'] = __('Oracle (legacy)'));
|
||||
(ManageExtensions::isMigrated('pandorafms.vmware') === true) ?: ($sub2['godmode/servers/discovery&wiz=app&mode=vmware']['text'] = __('VMware (legacy)'));
|
||||
(ManageExtensions::isMigrated('pandorafms.sap.desert') === true) ?: ($sub2['godmode/servers/discovery&wiz=app&mode=SAP']['text'] = __('SAP (legacy)'));
|
||||
(ManageExtensions::isMigrated('pandorafms.db2') === true) ?: ($sub2['godmode/servers/discovery&wiz=app&mode=DB2']['text'] = __('DB2 (legacy)'));
|
||||
}
|
||||
|
||||
$extensions = ManageExtensions::getExtensionBySection('app');
|
||||
if ($extensions !== false) {
|
||||
foreach ($extensions as $key => $extension) {
|
||||
@ -112,13 +102,6 @@ if ((bool) check_acl($config['id_user'], 0, 'AR') === true
|
||||
|
||||
// Cloud.
|
||||
$sub2 = [];
|
||||
if (enterprise_installed() === true) {
|
||||
(ManageExtensions::isMigrated('pandorafms.aws.ec2') === true) ?: (ManageExtensions::isMigrated('pandorafms.aws.s3') === true) ?: (ManageExtensions::isMigrated('pandorafms.aws.rds') === true) ?: ($sub2['godmode/servers/discovery&wiz=cloud&mode=amazonws']['text'] = __('Amazon Web Services (legacy)'));
|
||||
(ManageExtensions::isMigrated('pandorafms.azure.mc') === true) ?: ($sub2['godmode/servers/discovery&wiz=cloud&mode=azure']['text'] = __('Microsoft Azure (legacy)'));
|
||||
(ManageExtensions::isMigrated('pandorafms.azure.gcp.ce') === true) ?: ($sub2['godmode/servers/discovery&wiz=cloud&mode=gcp']['text'] = __('Google Compute Platform (legacy)'));
|
||||
}
|
||||
|
||||
|
||||
$extensions = ManageExtensions::getExtensionBySection('cloud');
|
||||
if ($extensions !== false) {
|
||||
foreach ($extensions as $key => $extension) {
|
||||
@ -517,8 +500,6 @@ if ($access_console_node === true) {
|
||||
$sub['godmode/setup/license']['text'] = __('License');
|
||||
$sub['godmode/setup/license']['id'] = 'license';
|
||||
|
||||
enterprise_hook('skins_submenu');
|
||||
|
||||
enterprise_hook('translate_string_submenu');
|
||||
|
||||
$menu_godmode['gsetup']['sub'] = $sub;
|
||||
@ -555,7 +536,7 @@ if ((bool) check_acl($config['id_user'], 0, 'PM') === true || (bool) check_acl($
|
||||
$sub['godmode/setup/links']['id'] = 'links';
|
||||
$sub['tools/diagnostics']['text'] = __('Diagnostic info');
|
||||
$sub['tools/diagnostics']['id'] = 'diagnostic_info';
|
||||
enterprise_hook('omnishell');
|
||||
// enterprise_hook('omnishell');
|
||||
$sub['godmode/setup/news']['text'] = __('Site news');
|
||||
$sub['godmode/setup/news']['id'] = 'site_news';
|
||||
}
|
||||
@ -823,8 +804,10 @@ $("#conf_wizard").click(function() {
|
||||
})
|
||||
}
|
||||
},
|
||||
closeOnEscape: true,
|
||||
onload: () => {
|
||||
$(document).ready(function () {
|
||||
$(".ui-dialog-titlebar-close").hide();
|
||||
var buttonpane = $("div[aria-describedby='welcome_modal_window'] .ui-dialog-buttonpane.ui-widget-content.ui-helper-clearfix");
|
||||
$(buttonpane).append(`
|
||||
<div class="welcome-wizard-buttons">
|
||||
|
@ -319,7 +319,7 @@ $ActionButtons[] = html_print_button(
|
||||
__('Go back'),
|
||||
'back',
|
||||
false,
|
||||
"window.location.href = 'index.php?sec=reporting&sec2=godmode/reporting/graphs'",
|
||||
'history.go(-1)',
|
||||
[
|
||||
'class' => 'sub ok submitButton',
|
||||
'icon' => 'back',
|
||||
|
@ -366,12 +366,12 @@ $filterTable->data[0][] = html_print_label_input_block(
|
||||
|
||||
$filterTable->data[0][] = html_print_label_input_block(
|
||||
__('Group'),
|
||||
html_print_select_groups(false, 'AR', $return_all_group, 'ag_group', $ag_group, 'this.form.submit();', '', 0, true, false, true, '', false)
|
||||
html_print_select_groups(false, 'AR', $return_all_group, 'ag_group', $ag_group, '', '', 0, true, false, true, '', false)
|
||||
);
|
||||
|
||||
$filterTable->data[0][] = html_print_label_input_block(
|
||||
__('Group Recursion'),
|
||||
html_print_checkbox_switch('recursion', 1, $recursion, true, false, 'this.form.submit()')
|
||||
html_print_checkbox_switch('recursion', 1, $recursion, true, false, '')
|
||||
);
|
||||
|
||||
if (is_metaconsole() === false) {
|
||||
@ -553,6 +553,10 @@ if (!$maps && is_metaconsole() === false) {
|
||||
['class' => 'main_menu_icon invert_filter']
|
||||
).'</a>';
|
||||
} else {
|
||||
$table->cellclass[] = [
|
||||
3 => 'table_action_buttons',
|
||||
4 => 'table_action_buttons',
|
||||
];
|
||||
$data[3] = '<a class="copy_visualmap" href="index.php?sec=screen&sec2=screens/screens&action=visualmap&pure='.$pure.'&id_layout='.$map['id'].'&copy_layout=1">'.html_print_image(
|
||||
'images/copy.svg',
|
||||
true,
|
||||
|
@ -2860,20 +2860,32 @@ if (is_metaconsole() === true) {
|
||||
|
||||
if (!empty($style_button_create_custom_graph)) {
|
||||
$style_create = [
|
||||
'mode' => 'link',
|
||||
'mode' => 'mini',
|
||||
'icon' => 'next',
|
||||
'class' => 'mrgn_lft_10px',
|
||||
'style' => 'display:none',
|
||||
];
|
||||
} else {
|
||||
$style_create = [ 'mode' => 'link' ];
|
||||
$style_create = [
|
||||
'mode' => 'mini',
|
||||
'icon' => 'next',
|
||||
'class' => 'mrgn_lft_10px',
|
||||
];
|
||||
}
|
||||
|
||||
if (!empty($style_button_edit_custom_graph)) {
|
||||
$style_edit = [
|
||||
'mode' => 'link',
|
||||
'mode' => 'mini',
|
||||
'icon' => 'update',
|
||||
'class' => 'mrgn_lft_10px',
|
||||
'style' => 'display:none',
|
||||
];
|
||||
} else {
|
||||
$style_edit = [ 'mode' => 'link' ];
|
||||
$style_edit = [
|
||||
'mode' => 'mini',
|
||||
'icon' => 'update',
|
||||
'class' => 'mrgn_lft_10px',
|
||||
];
|
||||
}
|
||||
|
||||
html_print_button(
|
||||
|
@ -157,7 +157,7 @@ if ((bool) users_is_admin() === false) {
|
||||
$where = sprintf(' AND id_usuario = "%s"', $config['id_user']);
|
||||
}
|
||||
|
||||
$sql = 'SELECT * FROM tuser_task_scheduled WHERE id_user_task IN (1,2,3,4) '.$where;
|
||||
$sql = 'SELECT * FROM tuser_task_scheduled WHERE id_user_task IN (1,2,3) '.$where;
|
||||
$reports = db_get_all_rows_sql($sql);
|
||||
if ($reports !== false) {
|
||||
$table = new stdClass();
|
||||
|
@ -643,6 +643,7 @@ foreach ($layoutDatas as $layoutData) {
|
||||
default:
|
||||
if ($layoutData['id_layout_linked'] != 0) {
|
||||
// It is a item that links with other visualmap
|
||||
$table->data[($i + 2)][1] = '';
|
||||
break;
|
||||
}
|
||||
|
||||
@ -756,7 +757,7 @@ foreach ($layoutDatas as $layoutData) {
|
||||
$layoutData['id_layout_linked'],
|
||||
'',
|
||||
'None',
|
||||
'',
|
||||
'0',
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
|
@ -145,6 +145,11 @@ $table->data['all_0'][0] = html_print_label_input_block(
|
||||
|
||||
$table->rowstyle['staticgraph'] = 'display: none;';
|
||||
$table->colspan['staticgraph'][0] = 2;
|
||||
$src = $config['homeurl'].'/images/console/icons/appliance_ok.png';
|
||||
if (is_metaconsole() === true) {
|
||||
$src = $config['homeurl'].'../../images/console/icons/appliance_ok.png';
|
||||
}
|
||||
|
||||
$table->data['staticgraph'][0] = html_print_label_input_block(
|
||||
__('Image'),
|
||||
'<div class="flex">'.html_print_select(
|
||||
@ -160,7 +165,7 @@ $table->data['staticgraph'][0] = html_print_label_input_block(
|
||||
'',
|
||||
false,
|
||||
'width: 49%'
|
||||
).'<span id="image_prev" class="mrgn_lft_10px mrgn_top-10px"><img src="'.$config['homeurl'].'/images/console/icons/appliance_ok.png"></span></div>'
|
||||
).'<span id="image_prev" class="mrgn_lft_10px mrgn_top-10px"><img src="'.$src.'"></span></div>'
|
||||
);
|
||||
|
||||
$table->rowstyle['all_1'] = 'display: none;';
|
||||
@ -904,8 +909,13 @@ function findInSelect(selectid, find){
|
||||
|
||||
$('#image').on('change', function() {
|
||||
var img = $(this).val();
|
||||
$('#image_prev').html('<img src="<?php echo $config['homeurl']; ?>/images/console/icons/'+img+'.png">');
|
||||
})
|
||||
var src = "<?php echo $config['homeurl']; ?>"+`/images/console/icons/${img}.png`;
|
||||
if (metaconsole_enabled) {
|
||||
src = "<?php echo $config['homeurl']; ?>"+`../../images/console/icons/${img}.png`;
|
||||
}
|
||||
|
||||
$('#image_prev').html(`<img src="${src}">`);
|
||||
});
|
||||
|
||||
</script>
|
||||
<style type="text/css">
|
||||
|
@ -632,7 +632,7 @@ if (empty($create) === false || empty($view) === false) {
|
||||
|
||||
$datam[1] = html_print_label_input_block(
|
||||
__('Default value').'<span class="normal_weight">('.$macro_name.')</span>',
|
||||
html_print_input_text_extended($macro_value_name, $macro_value_value, 'text-'.$macro_value_name, '', 30, 255, false, '', "class='command_component command_macro text_input'", true)
|
||||
html_print_input_text_extended($macro_value_name, io_safe_input($macro_value_value), 'text-'.$macro_value_name, '', 30, 255, false, '', "class='command_component command_macro text_input'", true)
|
||||
);
|
||||
|
||||
$table->data['plugin_'.$next_name_number] = $datam;
|
||||
|
@ -187,7 +187,7 @@ $button_test .= html_print_image(
|
||||
'images/status_sets/default/severity_normal.png',
|
||||
true
|
||||
);
|
||||
$button_test .= ' '.__('Connection its OK').'</span>';
|
||||
$button_test .= ' '.__('Connection is OK').'</span>';
|
||||
$button_test .= '<span id="ITSM-failure" class="invisible"> ';
|
||||
$button_test .= html_print_image(
|
||||
'images/status_sets/default/severity_critical.png',
|
||||
@ -197,7 +197,7 @@ $button_test .= ' '.__('Connection failed').'</span>';
|
||||
$button_test .= ' <span id="ITSM-message" class="invisible"></span>';
|
||||
|
||||
$row['control'] = html_print_label_input_block(
|
||||
__('Test connection pandora to ITSM'),
|
||||
__('Test connection PFMS to Pandora ITSM'),
|
||||
$button_test,
|
||||
['div_class' => 'ITSM-remote-setup-ITSM_token']
|
||||
);
|
||||
@ -213,7 +213,7 @@ if (empty($itsm_public_url) === true) {
|
||||
}
|
||||
|
||||
$row['publicUrl'] = html_print_label_input_block(
|
||||
__('URL conect to API %s', get_product_name()).ui_print_help_tip(
|
||||
__('URL connect to API %s', get_product_name()).ui_print_help_tip(
|
||||
__('Full URL (e.g., http://192.168.1.20/XXX/api/v2).'),
|
||||
true
|
||||
),
|
||||
@ -228,7 +228,7 @@ $row['publicUrl'] = html_print_label_input_block(
|
||||
);
|
||||
|
||||
$row['agentsSync'] = html_print_label_input_block(
|
||||
__('Number Agents to synchronize').ui_print_help_tip(
|
||||
__('Number of Agents to synchronize').ui_print_help_tip(
|
||||
__('Number of agents that will synchronize at the same time, minimum 10 max 1000'),
|
||||
true
|
||||
),
|
||||
@ -317,7 +317,7 @@ $button_test_pandora .= html_print_image(
|
||||
'images/status_sets/default/severity_normal.png',
|
||||
true
|
||||
);
|
||||
$button_test_pandora .= ' '.__('Connection its OK').'</span>';
|
||||
$button_test_pandora .= ' '.__('Connection is OK').'</span>';
|
||||
$button_test_pandora .= '<span id="ITSM-failure-pandora" class="invisible"> ';
|
||||
$button_test_pandora .= html_print_image(
|
||||
'images/status_sets/default/severity_critical.png',
|
||||
@ -356,7 +356,7 @@ if (empty($node) === false) {
|
||||
|
||||
// $progressbar .= (empty($node['dateStart']) === false) ? human_time_comparation($node['dateStart']) : __('Never');
|
||||
$row['control-test-pandora'] = html_print_label_input_block(
|
||||
__('Progress agents to synch'),
|
||||
__('Progress on agents to be synchronized'),
|
||||
$progressbar
|
||||
);
|
||||
}
|
||||
|
@ -569,7 +569,7 @@ $table->data[$i][] = html_print_label_input_block(
|
||||
)
|
||||
);
|
||||
$table->data[$i++][] = html_print_label_input_block(
|
||||
__('Referer security').ui_print_help_tip(__('When it is active, the source of the requests is checked. If the user comes from a URL external to Pandora FMS, the source of the activity will be considered suspicious.'), true),
|
||||
__('Referrer security').ui_print_help_tip(__('When it is active, the source of the requests is checked. If the user comes from a URL external to Pandora FMS, the source of the activity will be considered suspicious.'), true),
|
||||
html_print_checkbox_switch(
|
||||
'referer_security',
|
||||
1,
|
||||
|
@ -42,7 +42,7 @@ $table->border = 0;
|
||||
$table->data = [];
|
||||
|
||||
$table->data[0][] = html_print_label_input_block(
|
||||
__('Data storage path'),
|
||||
__('Data storage path').ui_print_help_tip(__('The Netflow data will be saved in the directory specified here, which will be located in the path defined by the "General Network path" parameter (this parameter is found in the General Settings).'), true),
|
||||
html_print_input_text('netflow_name_dir', $config['netflow_name_dir'], false, 50, 200, true)
|
||||
);
|
||||
|
||||
|
@ -148,7 +148,6 @@ $table_behaviour->data[$row][] = html_print_label_input_block(
|
||||
__('Display text when proc modules have state critical'),
|
||||
html_print_input_text('render_proc_fail', $config['render_proc_fail'], '', 25, 25, true)
|
||||
);
|
||||
$row++;
|
||||
|
||||
if (enterprise_installed() === true) {
|
||||
$row++;
|
||||
@ -162,6 +161,29 @@ if (enterprise_installed() === true) {
|
||||
);
|
||||
}
|
||||
|
||||
$row++;
|
||||
// Tabs menus.
|
||||
$tabs_menu_options = [];
|
||||
$tabs_menu_options['both'] = __('Show both (tabs and menu)');
|
||||
$tabs_menu_options['icons'] = __('Show only icons');
|
||||
$tabs_menu_options['menu'] = __('Show only menu');
|
||||
$table_behaviour->data[$row][] = html_print_label_input_block(
|
||||
__('Tabs menu'),
|
||||
html_print_select(
|
||||
$tabs_menu_options,
|
||||
'tabs_menu',
|
||||
$config['tabs_menu'],
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
false
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// ----------------------------------------------------------------------
|
||||
|
@ -40,6 +40,19 @@ if (! check_acl($config['id_user'], 0, 'PM') && ! is_user_admin($config['id_user
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_ajax()) {
|
||||
$stopShowingModal = get_parameter('stopShowingModal', 0);
|
||||
if ($stopShowingModal === '1') {
|
||||
db_process_sql_update(
|
||||
'tusuario',
|
||||
['stop_lts_modal' => '1'],
|
||||
['id_user' => $config['id_user']],
|
||||
);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
require_once $config['homedir'].'/vendor/autoload.php';
|
||||
|
||||
$php_version = phpversion();
|
||||
@ -83,7 +96,10 @@ if ($php_version_array[0] < 7) {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$stop_lts_modal = db_get_value('stop_lts_modal', 'tusuario', 'id_user', $config['id_user']);
|
||||
if ($stop_lts_modal === '0') {
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
// Lts Updates.
|
||||
@ -100,12 +116,36 @@ if ($php_version_array[0] < 7) {
|
||||
buttons: [{
|
||||
text: "OK",
|
||||
click: function() {
|
||||
var no_show_more = $('#checkbox-no_show_more').is(':checked');
|
||||
if (no_show_more === true){
|
||||
$.ajax({
|
||||
url: 'ajax.php',
|
||||
data: {
|
||||
page: 'godmode/update_manager/modal_lts_update',
|
||||
stopShowingModal: 1,
|
||||
},
|
||||
type: 'POST',
|
||||
async: false,
|
||||
dataType: 'json'
|
||||
});
|
||||
}
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}],
|
||||
open: function(event, ui) {
|
||||
$(".ui-dialog-titlebar-close").hide();
|
||||
$("div.ui-dialog-buttonset").addClass('flex-rr-sb-important');
|
||||
$("div.ui-dialog-buttonset").append(`
|
||||
<div class="welcome-wizard-buttons">
|
||||
<label class="flex-row-center">
|
||||
<input type="checkbox" id="checkbox-no_show_more" class="welcome-wizard-do-not-show"/>
|
||||
<?php echo __('Do not show anymore'); ?>
|
||||
</label>
|
||||
</div>
|
||||
`);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
@ -242,6 +242,14 @@ if (!$action_update_url_update_manager) {
|
||||
$result = config_update_value('identification_reminder', $identification_reminder);
|
||||
}
|
||||
|
||||
if ($result && $lts_updates === 1) {
|
||||
db_process_sql_update(
|
||||
'tusuario',
|
||||
['stop_lts_modal' => '0'],
|
||||
['id_user' => $config['id_user']],
|
||||
);
|
||||
}
|
||||
|
||||
ui_print_result_message(
|
||||
$result,
|
||||
__('Succesful Update the url config vars.'),
|
||||
|
@ -40,8 +40,6 @@ require_once $config['homedir'].'/include/functions_visual_map.php';
|
||||
require_once $config['homedir'].'/include/functions_custom_fields.php';
|
||||
enterprise_include_once('include/functions_profile.php');
|
||||
|
||||
$isFunctionSkins = enterprise_include_once('include/functions_skins.php');
|
||||
|
||||
// Add the columns for the enterprise Pandora edition.
|
||||
$enterprise_include = false;
|
||||
if (ENTERPRISE_NOT_HOOK !== enterprise_include('include/functions_policies.php')) {
|
||||
@ -1306,12 +1304,12 @@ if ($new_user) {
|
||||
|
||||
if (is_metaconsole() === false) {
|
||||
// User only can change skins if has more than one group.
|
||||
if (function_exists('skins_print_select')) {
|
||||
if (count($usr_groups) > 1) {
|
||||
if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) {
|
||||
$skin = '<div class="label_select"><p class="edit_user_labels">'.__('Skin').'</p>';
|
||||
$skin .= skins_print_select($id_usr, 'skin', $user_info['id_skin'], '', __('None'), 0, true).'</div>';
|
||||
}
|
||||
$skins[DEFAULT_THEME] = __('Default theme');
|
||||
$skins[BLACK_THEME] = __('Black theme');
|
||||
$skin .= html_print_select($skins, 'skin', $user_info['id_skin'], '', __('None'), 0, true).'</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -720,10 +720,10 @@ if (is_metaconsole() === true) {
|
||||
$userManagementTable->data['line2_looknfeel'][1] = $outputMetaAccess[1];
|
||||
}
|
||||
} else {
|
||||
if (function_exists('skins_print_select')) {
|
||||
$userManagementTable->data['line1_looknfeel'][1] = __('User color scheme').$hin_change_theme;
|
||||
$userManagementTable->data['line2_looknfeel'][1] = skins_print_select($id_usr, 'skin', $user_info['id_skin'], '', __('None'), 0, true);
|
||||
}
|
||||
$skins[DEFAULT_THEME] = __('Default theme');
|
||||
$skins[BLACK_THEME] = __('Black theme');
|
||||
$userManagementTable->data['line2_looknfeel'][1] = html_print_select($skins, 'skin', $user_info['id_skin'], '', __('None'), 0, true);
|
||||
}
|
||||
|
||||
$performance_variables_control = (array) json_decode(io_safe_output($config['performance_variables_control']));
|
||||
|
@ -82,9 +82,6 @@ class Applications extends Wizard
|
||||
'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=app'
|
||||
);
|
||||
|
||||
// Print Warning Message.
|
||||
$this->printWarningMessage();
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@ -108,90 +105,14 @@ class Applications extends Wizard
|
||||
);
|
||||
|
||||
$mode = get_parameter('mode', null);
|
||||
|
||||
// Load application wizards.
|
||||
$enterprise_classes = glob(
|
||||
$config['homedir'].'/'.ENTERPRISE_DIR.'/include/class/*.app.php'
|
||||
);
|
||||
$extensions = new ExtensionsDiscovery('app', $mode);
|
||||
|
||||
foreach ($enterprise_classes as $classpath) {
|
||||
enterprise_include_once(
|
||||
'include/class/'.basename($classpath)
|
||||
);
|
||||
}
|
||||
|
||||
switch ($mode) {
|
||||
case 'DB2':
|
||||
$classname_selected = 'DB2';
|
||||
break;
|
||||
|
||||
case 'SAP':
|
||||
$classname_selected = 'SAP';
|
||||
break;
|
||||
|
||||
case 'vmware':
|
||||
$classname_selected = 'VMware';
|
||||
break;
|
||||
|
||||
case 'mysql':
|
||||
$classname_selected = 'MySQL';
|
||||
break;
|
||||
|
||||
case 'oracle':
|
||||
$classname_selected = 'Oracle';
|
||||
break;
|
||||
|
||||
case 'MicrosoftSQLServer':
|
||||
$classname_selected = 'MicrosoftSQLServer';
|
||||
break;
|
||||
|
||||
default:
|
||||
$classname_selected = null;
|
||||
break;
|
||||
}
|
||||
|
||||
// Else: class not found pseudo exception.
|
||||
if ($classname_selected !== null) {
|
||||
$wiz = new $classname_selected($this->page);
|
||||
// Check if app has been migrated.
|
||||
if (method_exists($wiz, 'isMigrated') === true) {
|
||||
if ($wiz->isMigrated() === true) {
|
||||
ui_print_info_message(__('This legacy app has been migrated to new discovery 2.0 system'));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$result = $wiz->run();
|
||||
if (is_array($result) === true) {
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
if ($classname_selected === null) {
|
||||
if ($mode !== null) {
|
||||
// Load extension if exist.
|
||||
$extensions->run();
|
||||
return;
|
||||
}
|
||||
|
||||
// Load classes and print selector.
|
||||
$wiz_data = [];
|
||||
foreach ($enterprise_classes as $classpath) {
|
||||
$classname = basename($classpath, '.app.php');
|
||||
$obj = new $classname();
|
||||
|
||||
if (method_exists($obj, 'isMigrated') === true) {
|
||||
if ($obj->isMigrated() === true) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$wiz_data[] = $obj->load();
|
||||
}
|
||||
|
||||
$wiz_data = array_merge($wiz_data, $extensions->loadExtensions());
|
||||
|
||||
$this->prepareBreadcrum(
|
||||
[
|
||||
[
|
||||
@ -225,7 +146,7 @@ class Applications extends Wizard
|
||||
$this->printHeader(true)
|
||||
);
|
||||
|
||||
Wizard::printBigButtonsList($wiz_data);
|
||||
Wizard::printBigButtonsList($extensions->loadExtensions());
|
||||
|
||||
$not_defined_extensions = $extensions->loadExtensions(true);
|
||||
|
||||
@ -249,7 +170,6 @@ class Applications extends Wizard
|
||||
echo $output;
|
||||
|
||||
echo '<div class="app_mssg"><i>*'.__('All company names used here are for identification purposes only. Use of these names, logos, and brands does not imply endorsement.').'</i></div>';
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
@ -114,8 +114,6 @@ class Cloud extends Wizard
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
global $config;
|
||||
|
||||
// Load styles.
|
||||
parent::run();
|
||||
|
||||
@ -127,54 +125,8 @@ class Cloud extends Wizard
|
||||
|
||||
$mode = get_parameter('mode', null);
|
||||
|
||||
// Load cloud wizards.
|
||||
$enterprise_classes = glob(
|
||||
$config['homedir'].'/'.ENTERPRISE_DIR.'/include/class/*.cloud.php'
|
||||
);
|
||||
$extensions = new ExtensionsDiscovery('cloud', $mode);
|
||||
|
||||
foreach ($enterprise_classes as $classpath) {
|
||||
enterprise_include_once(
|
||||
'include/class/'.basename($classpath)
|
||||
);
|
||||
}
|
||||
|
||||
switch ($mode) {
|
||||
case 'amazonws':
|
||||
$classname_selected = 'Aws';
|
||||
break;
|
||||
|
||||
case 'azure':
|
||||
$classname_selected = 'Azure';
|
||||
break;
|
||||
|
||||
case 'gcp':
|
||||
$classname_selected = 'Google';
|
||||
break;
|
||||
|
||||
default:
|
||||
$classname_selected = null;
|
||||
break;
|
||||
}
|
||||
|
||||
// Else: class not found pseudo exception.
|
||||
if ($classname_selected !== null) {
|
||||
$wiz = new $classname_selected($this->page);
|
||||
// Check if app has been migrated.
|
||||
if (method_exists($wiz, 'isMigrated') === true) {
|
||||
if ($wiz->isMigrated() === true) {
|
||||
ui_print_info_message(__('This legacy app has been migrated to new discovery 2.0 system'));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$result = $wiz->run();
|
||||
if (is_array($result) === true) {
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
if ($classname_selected === null) {
|
||||
if ($mode !== null) {
|
||||
// Load extension if exist.
|
||||
$extensions->run();
|
||||
@ -182,22 +134,6 @@ class Cloud extends Wizard
|
||||
}
|
||||
|
||||
// Load classes and print selector.
|
||||
$wiz_data = [];
|
||||
foreach ($enterprise_classes as $classpath) {
|
||||
$classname = basename($classpath, '.cloud.php');
|
||||
$obj = new $classname();
|
||||
// Check if legacy has been migrated.
|
||||
if (method_exists($obj, 'isMigrated') === true) {
|
||||
if ($obj->isMigrated() === true) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$wiz_data[] = $obj->load();
|
||||
}
|
||||
|
||||
$wiz_data = array_merge($wiz_data, $extensions->loadExtensions());
|
||||
|
||||
$this->prepareBreadcrum(
|
||||
[
|
||||
[
|
||||
@ -230,7 +166,7 @@ class Cloud extends Wizard
|
||||
$this->printHeader(true)
|
||||
);
|
||||
|
||||
Wizard::printBigButtonsList($wiz_data);
|
||||
Wizard::printBigButtonsList($extensions->loadExtensions());
|
||||
|
||||
$not_defined_extensions = $extensions->loadExtensions(true);
|
||||
|
||||
@ -256,12 +192,6 @@ class Cloud extends Wizard
|
||||
echo '<div class="app_mssg"><i>*'.__('All company names used here are for identification purposes only. Use of these names, logos, and brands does not imply endorsement.').'</i></div>';
|
||||
}
|
||||
|
||||
// Print Warning Message.
|
||||
$this->printWarningMessage();
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Run credentials wizard.
|
||||
|
@ -124,6 +124,14 @@ class DiscoveryTaskList extends HTML
|
||||
$this->printHeader(true)
|
||||
);
|
||||
|
||||
// Div neccesary for modal map task.
|
||||
echo '<div id="map_task" class="invisible"></div>';
|
||||
echo '<div id="task_review" class="invisible"></div>';
|
||||
echo '<div id="msg" class="invisible"></div>';
|
||||
echo '<input type="hidden" id="ajax-url" value="'.ui_get_full_url('ajax.php').'"/>';
|
||||
echo '<input type="hidden" id="success-str" value="'.__('Success').'"/>';
|
||||
echo '<input type="hidden" id="failed-str" value="'.__('Failed').'"/>';
|
||||
|
||||
// Show redirected messages from discovery.php.
|
||||
if ($status === 0) {
|
||||
ui_print_success_message($message);
|
||||
@ -222,10 +230,6 @@ class DiscoveryTaskList extends HTML
|
||||
html_print_action_buttons($this->printForm($form, true));
|
||||
}
|
||||
|
||||
// Warning Message.
|
||||
$wizar_main = new Wizard();
|
||||
$wizar_main->printWarningMessage();
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
@ -1149,14 +1153,6 @@ class DiscoveryTaskList extends HTML
|
||||
|
||||
ui_toggle($content, $titleTable, '', '', false);
|
||||
|
||||
// Div neccesary for modal map task.
|
||||
echo '<div id="map_task" class="invisible"></div>';
|
||||
echo '<div id="task_review" class="invisible"></div>';
|
||||
echo '<div id="msg" class="invisible"></div>';
|
||||
echo '<input type="hidden" id="ajax-url" value="'.ui_get_full_url('ajax.php').'"/>';
|
||||
echo '<input type="hidden" id="success-str" value="'.__('Success').'"/>';
|
||||
echo '<input type="hidden" id="failed-str" value="'.__('Failed').'"/>';
|
||||
|
||||
unset($table);
|
||||
|
||||
ui_require_javascript_file('pandora_ui');
|
||||
|
@ -767,24 +767,6 @@ class ManageExtensions extends HTML
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
$migrationHash = $this->canMigrate($row['short_name']);
|
||||
if ($migrationHash !== false && empty($migrationHash) !== true) {
|
||||
// Migrate button.
|
||||
$data[$key]['actions'] .= html_print_input_image(
|
||||
'button_migrate-'.$row['short_name'],
|
||||
'images/reset.png',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
[
|
||||
'onclick' => 'show_migration_form(\''.$row['short_name'].'\',\''.$migrationHash.'\')',
|
||||
'title' => __('Migrate old discovery tasks.'),
|
||||
'alt' => __('Migrate old discovery tasks.'),
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($data) === true) {
|
||||
@ -1123,386 +1105,6 @@ class ManageExtensions extends HTML
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Checks if the discovery app can be migrated to .disco system.
|
||||
* If app is migrated or is not in .ini file, it cannot be migrated.
|
||||
*
|
||||
* @param string $shortName Short name of the discovery app.
|
||||
*
|
||||
* @return string App hash, false in case hash doesnt exist on ini file, or is already migraeted..
|
||||
*/
|
||||
private function canMigrate(string $shortName='')
|
||||
{
|
||||
global $config;
|
||||
|
||||
if (empty($shortName) === true) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 1. Check if app is already migrated:
|
||||
// Get migrated Discovery Apps from config.
|
||||
$migratedAppsJson = db_get_value('value', 'tconfig', 'token', 'migrated_discovery_apps');
|
||||
|
||||
if ($migratedAppsJson === false || empty($migratedAppsJson) === true) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Decode JSON migrated apps.
|
||||
$migrateApps = json_decode(io_safe_output($migratedAppsJson), true);
|
||||
|
||||
if (json_last_error() !== JSON_ERROR_NONE) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check app migrated.
|
||||
if (array_key_exists($shortName, $migrateApps)) {
|
||||
if (empty($migrateApps[$shortName]) === false && (bool) $migrateApps[$shortName] === true) {
|
||||
// Already migrated.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// 2. If app not migrated yet, check DiscoveryApplicationsMigrateCodes.ini
|
||||
// Path to the INI file
|
||||
$filePath = $config['homedir'].'/extras/discovery/DiscoveryApplicationsMigrateCodes.ini';
|
||||
|
||||
// Parse the INI file.
|
||||
$migrationCodes = parse_ini_file($filePath, true);
|
||||
|
||||
if ($migrationCodes === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check shortname in ini file.
|
||||
if (array_key_exists($shortName, $migrationCodes) === false) {
|
||||
return false;
|
||||
} else {
|
||||
return $migrationCodes[$shortName];
|
||||
}
|
||||
|
||||
// All checks ok, discovery app can be migrated.
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Prints html for migrate modal
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function loadMigrateModal()
|
||||
{
|
||||
$shortname = get_parameter('shortname', null);
|
||||
$hash = get_parameter('hash', null);
|
||||
|
||||
$form = [
|
||||
'action' => '#',
|
||||
'id' => 'modal_migrate_form',
|
||||
'onsubmit' => 'return false;',
|
||||
'class' => 'modal',
|
||||
'name' => 'migrate_form',
|
||||
];
|
||||
|
||||
$inputs = [];
|
||||
$migrateMessage = __(
|
||||
'All ‘legacy‘ tasks for this application will be migrated to the new ‘.disco’ package system. All configurations and executions will be managed with the new system. This process will not be reversible.</br></br>'
|
||||
);
|
||||
$migrateMessage .= _('Please check the migration code for the application before proceeding.');
|
||||
|
||||
$inputs[] = [
|
||||
'wrapper' => 'div',
|
||||
'block_id' => 'div_migrate_message',
|
||||
'class' => 'hole flex-row flex-items-center w98p',
|
||||
'direct' => 1,
|
||||
'block_content' => [
|
||||
[
|
||||
'label' => $migrateMessage,
|
||||
'arguments' => [
|
||||
'class' => 'first_lbl w98p',
|
||||
'name' => 'lbl_migrate_message',
|
||||
'id' => 'lbl_migrate_message',
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
$inputs[] = [
|
||||
'label' => __('Applicattion hash'),
|
||||
'id' => 'div-hash',
|
||||
'arguments' => [
|
||||
'name' => 'hash',
|
||||
'type' => 'text',
|
||||
'value' => $hash,
|
||||
'return' => true,
|
||||
],
|
||||
];
|
||||
|
||||
$inputs[] = [
|
||||
'block_id' => 'migrate_buttons',
|
||||
'class' => 'flex-row flex-items-center w98p',
|
||||
'direct' => 1,
|
||||
'block_content' => [
|
||||
[
|
||||
'arguments' => [
|
||||
'name' => 'cancel',
|
||||
'label' => __('Cancel'),
|
||||
'type' => 'button',
|
||||
'attributes' => [
|
||||
'icon' => 'left',
|
||||
'mode' => 'secondary',
|
||||
'class' => 'sub cancel float-left',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'arguments' => [
|
||||
'name' => 'migrate',
|
||||
'label' => __('Migrate'),
|
||||
'type' => 'submit',
|
||||
'attributes' => [
|
||||
'icon' => 'wand',
|
||||
'class' => 'sub wand float-right',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
$spinner = '<div id="migration-spinner" class="invisible spinner-fixed"></div>';
|
||||
|
||||
$migration_form = $this->printForm(
|
||||
[
|
||||
'form' => $form,
|
||||
'inputs' => $inputs,
|
||||
],
|
||||
true,
|
||||
);
|
||||
|
||||
echo $migration_form.$spinner;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Migrate app to new .disco system
|
||||
*
|
||||
* @return true if success, false in case of error.
|
||||
*/
|
||||
public function migrateApp()
|
||||
{
|
||||
global $config;
|
||||
|
||||
$hash = get_parameter('hash', false);
|
||||
$shortName = get_parameter('shortName', false);
|
||||
|
||||
if ($hash === false || $shortName === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 1. Gets md5
|
||||
try {
|
||||
$console_md5 = $this->calculateDirectoryMD5($shortName, false);
|
||||
$server_md5 = $this->calculateDirectoryMD5($shortName, true);
|
||||
} catch (Exception $e) {
|
||||
$return = [
|
||||
'error' => $e->getMessage(),
|
||||
];
|
||||
echo json_encode($return);
|
||||
return;
|
||||
}
|
||||
|
||||
if ($console_md5 === false || $server_md5 === false) {
|
||||
$return = [
|
||||
'error' => __('Error calculating app MD5'),
|
||||
];
|
||||
echo json_encode($return);
|
||||
return;
|
||||
}
|
||||
|
||||
// 2. Checks MD5
|
||||
if ($hash === $console_md5 && $hash === $server_md5) {
|
||||
// Init migration script.
|
||||
$return = $this->executeMigrationScript($shortName);
|
||||
} else {
|
||||
$return = [
|
||||
'error' => __('App hash does not match.'),
|
||||
];
|
||||
}
|
||||
|
||||
// Add shotrname to return for showing messages.
|
||||
$return['shortname'] = $shortName;
|
||||
|
||||
echo \json_encode($return);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Calculates directory MD% and saves it into array
|
||||
*
|
||||
* @param string $shortName Shorname of app.
|
||||
* @param boolean $server If true, perform checks into server folder.
|
||||
*
|
||||
* @return $md5 Array of md5 of filess.
|
||||
*/
|
||||
private function calculateDirectoryMD5($shortName, $server)
|
||||
{
|
||||
global $config;
|
||||
|
||||
$md5List = [];
|
||||
|
||||
$serverPath = $config['remote_config'].'/discovery/'.$shortName;
|
||||
$consolePath = $config['homedir'].'/'.$this->path.'/'.$shortName;
|
||||
|
||||
if ($server === true) {
|
||||
$directory = $serverPath;
|
||||
} else {
|
||||
$directory = $consolePath;
|
||||
}
|
||||
|
||||
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($directory));
|
||||
|
||||
foreach ($iterator as $file) {
|
||||
if ($file->isFile()) {
|
||||
$md5List[] = md5_file($file->getPathname());
|
||||
}
|
||||
}
|
||||
|
||||
if ($server === true) {
|
||||
$console_ini = $consolePath.'/discovery_definition.ini';
|
||||
$logo = $consolePath.'/logo.png';
|
||||
|
||||
if (file_exists($console_ini)) {
|
||||
$md5List[] = md5_file($console_ini);
|
||||
}
|
||||
|
||||
if (file_exists($logo)) {
|
||||
$md5List[] = md5_file($logo);
|
||||
}
|
||||
}
|
||||
|
||||
sort($md5List);
|
||||
$concatenatedChecksums = implode('', $md5List);
|
||||
return md5($concatenatedChecksums);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Executed migration script for app
|
||||
*
|
||||
* @param string $shortName Shortname of the app.
|
||||
*
|
||||
* @return true on success, false in case of error.
|
||||
*/
|
||||
private function executeMigrationScript(string $shortName)
|
||||
{
|
||||
global $config;
|
||||
|
||||
$dblock = db_get_lock('migrate-working');
|
||||
// Try to get a lock from DB.
|
||||
if ($dblock !== 1) {
|
||||
// Locked!
|
||||
return false;
|
||||
}
|
||||
|
||||
$scriptName = preg_replace('/^pandorafms\.(\w+\.?\w*)$/m', 'migrate.$1.sql', $shortName);
|
||||
|
||||
$script_path = $config['homedir'].'/extras/discovery/migration_scripts/'.$scriptName;
|
||||
if (file_exists($script_path) === false) {
|
||||
$return = [
|
||||
'error' => __('Migration script '.$scriptName.' could not be found'),
|
||||
];
|
||||
} else {
|
||||
try {
|
||||
$res = db_process_file($script_path, false);
|
||||
} catch (\Exception $e) {
|
||||
$return = [
|
||||
'error' => $e->getMessage(),
|
||||
];
|
||||
} finally {
|
||||
db_release_lock('migrate_working');
|
||||
}
|
||||
|
||||
if ($res === true) {
|
||||
$migrateAppsJson = io_safe_output(
|
||||
db_get_value(
|
||||
'value',
|
||||
'tconfig',
|
||||
'token',
|
||||
'migrated_discovery_apps'
|
||||
)
|
||||
);
|
||||
|
||||
$migrateApps = json_decode(
|
||||
$migrateAppsJson,
|
||||
true
|
||||
);
|
||||
|
||||
$migrateApps[$shortName] = 1;
|
||||
|
||||
$migratedAppsJson = json_encode($migrateApps);
|
||||
|
||||
if (json_last_error() === JSON_ERROR_NONE) {
|
||||
config_update_value(
|
||||
'migrated_discovery_apps',
|
||||
$migratedAppsJson
|
||||
);
|
||||
} else {
|
||||
$return = [
|
||||
'error' => __('Error decoding migrated apps json.'),
|
||||
];
|
||||
}
|
||||
|
||||
$return = [
|
||||
'result' => __('App migrated successfully'),
|
||||
'shortName' => $shortName,
|
||||
];
|
||||
} else {
|
||||
$return = [
|
||||
'error' => __('Error migrating app'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
return $return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if legacy app has been migrated.
|
||||
*
|
||||
* @param string $shortName Shorn name of the app.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
static public function isMigrated($shortName)
|
||||
{
|
||||
global $config;
|
||||
|
||||
$migrateAppsJson = io_safe_output(
|
||||
db_get_value(
|
||||
'value',
|
||||
'tconfig',
|
||||
'token',
|
||||
'migrated_discovery_apps'
|
||||
)
|
||||
);
|
||||
|
||||
$migratedApps = json_decode($migrateAppsJson, true);
|
||||
|
||||
if (json_last_error() !== JSON_ERROR_NONE) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (array_key_exists($shortName, $migratedApps) === true && empty($migratedApps[$shortName] === false)) {
|
||||
return (bool) $migratedApps[$shortName];
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Read metadata CSV from system and store data structure in memory.
|
||||
*
|
||||
|
@ -584,28 +584,4 @@ class Wizard
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Generates warning message.
|
||||
*
|
||||
* @return void Warning message.
|
||||
*/
|
||||
public function printWarningMessage()
|
||||
{
|
||||
return ui_print_warning_message(
|
||||
__(
|
||||
'Starting with version 773, the new modular system of discovery 2.0 has been implemented. The current
|
||||
discovery (1.0) and its defined tasks will continue to function normally until the next LTS version,
|
||||
in which migration to the new system will be mandatory.
|
||||
The tasks of the current discovery (1.0) will be marked as legacy although it will not affect their
|
||||
operation, it will only be a visual indicator to identify and differentiate the tasks of discovery 1.0
|
||||
from those of the new version 2.0.
|
||||
In the intermediate versions between the 773 and the next LTS version, more applications of the new
|
||||
discovery 2.0 will be added. Both new and those that will come to replace the applications of the
|
||||
current discovery 1.0. In addition, an automatic migration tool for legacy (1.0) tasks to the new 2.0
|
||||
model will be included.'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -789,7 +789,6 @@ if ($action === 'create_demo_data') {
|
||||
}
|
||||
|
||||
// Get last trap in database.
|
||||
|
||||
/*
|
||||
$id_trap_begin = db_get_value(
|
||||
'MAX(id_trap)',
|
||||
@ -1068,37 +1067,37 @@ if ($action === 'cleanup_demo_data') {
|
||||
|
||||
$demo_items = db_get_all_rows_in_table('tdemo_data');
|
||||
|
||||
$module_items = array_filter(
|
||||
$module_items = array_map(
|
||||
function ($item) {
|
||||
$json_data = json_decode($item['item_id'], true);
|
||||
return $json_data['id_agente_modulo'];
|
||||
},
|
||||
array_filter(
|
||||
$demo_items,
|
||||
function ($item) {
|
||||
return ($item['table_name'] === 'tagente_modulo');
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
$inventory_module_items = array_filter(
|
||||
$inventory_module_items = array_map(
|
||||
function ($item) {
|
||||
$json_data = json_decode($item['item_id'], true);
|
||||
return $json_data['id_agent_module_inventory'];
|
||||
},
|
||||
array_filter(
|
||||
$demo_items,
|
||||
function ($item) {
|
||||
return ($item['table_name'] === 'tagent_module_inventory');
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
$items_delete_id_bfr = [];
|
||||
|
||||
foreach ($inventory_module_items as $item) {
|
||||
$items_delete_id_bfr[] = $item['item_id'];
|
||||
}
|
||||
|
||||
$in_clause = implode(',', $items_delete_id_bfr);
|
||||
$in_clause = implode(',', $inventory_module_items);
|
||||
// Delete data from tagente_datos_inventory given inventory module id.
|
||||
db_process_sql('DELETE FROM tagente_datos_inventory where id_agent_module_inventory IN ('.$in_clause.')');
|
||||
|
||||
$items_delete_id_bfr = [];
|
||||
|
||||
foreach ($module_items as $item) {
|
||||
$items_delete_id_bfr[] = $item['item_id'];
|
||||
}
|
||||
|
||||
$in_clause = implode(',', $items_delete_id_bfr);
|
||||
$in_clause = implode(',', $module_items);
|
||||
// Delete data from tagente_datos give agent module id.
|
||||
db_process_sql('DELETE FROM tagente_datos where id_agente_modulo IN ('.$in_clause.')');
|
||||
|
||||
|
@ -166,7 +166,18 @@ if ($delete_event === true) {
|
||||
return;
|
||||
}
|
||||
|
||||
$name = events_get_description($id_evento);
|
||||
$r = events_delete($id_evento, $filter, false, true);
|
||||
db_pandora_audit(
|
||||
AUDIT_LOG_EVENT,
|
||||
sprintf(
|
||||
'ID event %s deleted by %s - %s',
|
||||
$id_evento,
|
||||
$config['id_user'],
|
||||
$name
|
||||
),
|
||||
$config['id_user']
|
||||
);
|
||||
} catch (\Exception $e) {
|
||||
// Unexistent agent.
|
||||
if (is_metaconsole() === true
|
||||
@ -224,6 +235,19 @@ if ($validate_event === true) {
|
||||
EVENT_VALIDATE,
|
||||
$filter
|
||||
);
|
||||
|
||||
$name = events_get_description($id_evento);
|
||||
|
||||
db_pandora_audit(
|
||||
AUDIT_LOG_EVENT,
|
||||
sprintf(
|
||||
'ID event %s validated by %s - %s',
|
||||
$id_evento,
|
||||
$config['id_user'],
|
||||
$name
|
||||
),
|
||||
$config['id_user']
|
||||
);
|
||||
} catch (\Exception $e) {
|
||||
// Unexistent agent.
|
||||
if (is_metaconsole() === true
|
||||
|
@ -1196,7 +1196,7 @@ if (check_login()) {
|
||||
$data[2] .= ui_print_truncate_text($module['nombre'], 'module_medium', false, true, true, '…', 'font-size: 9pt;');
|
||||
$data[2] .= '</a>';
|
||||
if (empty($module['extended_info']) === false) {
|
||||
$data[2] .= ui_print_help_tip($module['extended_info'], true, '/images/default_list.png');
|
||||
$data[2] .= ui_print_help_tip(io_safe_output($module['extended_info']), true, '/images/default_list.png');
|
||||
}
|
||||
|
||||
// Adds tag context information.
|
||||
|
@ -48,16 +48,17 @@ if ($check_web) {
|
||||
if ($status_webserver === '1') {
|
||||
$name = array_keys(servers_get_names())[0];
|
||||
$id_group = get_parameter('id_group', 4);
|
||||
$agent_name = get_parameter('module_name', 'Web monitoring');
|
||||
|
||||
$array_other['data'] = [
|
||||
'Web monitoring',
|
||||
$agent_name,
|
||||
'',
|
||||
2,
|
||||
$id_group,
|
||||
0,
|
||||
30,
|
||||
30,
|
||||
9,
|
||||
11,
|
||||
$name,
|
||||
0,
|
||||
0,
|
||||
|
@ -1358,9 +1358,12 @@ class AgentWizard extends HTML
|
||||
$table->rowstyle[$i] = 'color:#ccc;';
|
||||
$data[0] .= ' ';
|
||||
$data[0] .= html_print_image(
|
||||
'images/alert-warning@svg.svg',
|
||||
'images/info-warning.svg',
|
||||
true,
|
||||
['title' => $msgError]
|
||||
[
|
||||
'title' => $msgError,
|
||||
'class' => 'main_menu_icon',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -262,6 +262,7 @@ class AgentsAlerts extends HTML
|
||||
$data[0] = io_safe_output($agent_module['alias']);
|
||||
$data[1] = io_safe_output($agent_module['nombre']);
|
||||
$uniqid = $agent_module['id_agente_modulo'];
|
||||
if (check_acl($this->idUser, 0, 'LM')) {
|
||||
$data[2] = html_print_anchor(
|
||||
[
|
||||
'href' => sprintf(
|
||||
@ -276,6 +277,9 @@ class AgentsAlerts extends HTML
|
||||
],
|
||||
true
|
||||
);
|
||||
} else {
|
||||
$data[2] = '';
|
||||
}
|
||||
|
||||
array_push($table->data, $data);
|
||||
|
||||
@ -780,7 +784,7 @@ class AgentsAlerts extends HTML
|
||||
'nothing' => false,
|
||||
'selected' => $this->groupId,
|
||||
'return' => true,
|
||||
'script' => 'this.form.submit()',
|
||||
'script' => '',
|
||||
'size' => '100%',
|
||||
],
|
||||
];
|
||||
|
@ -280,6 +280,13 @@ class Prd
|
||||
*/
|
||||
private $itemsReferences;
|
||||
|
||||
/**
|
||||
* Current prdData.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $currentPrdData;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
@ -2282,12 +2289,37 @@ class Prd
|
||||
|
||||
$value = implode($csv_separator, $ref_arr);
|
||||
} else {
|
||||
$columns_ref = $this->getOneColumnRefs($ref['table']);
|
||||
|
||||
$value = $this->searchValue(
|
||||
$ref['columns'],
|
||||
$ref['table'],
|
||||
$ref['id'],
|
||||
$value
|
||||
);
|
||||
|
||||
// Get reference in value
|
||||
if ($columns_ref !== false) {
|
||||
foreach ($columns_ref as $col => $col_ref) {
|
||||
if (array_key_exists($col, $value[$ref['table']])) {
|
||||
$sql = sprintf(
|
||||
'SELECT * FROM %s WHERE %s = "%s"',
|
||||
$ref['table'],
|
||||
$col,
|
||||
$value[$ref['table']][$col],
|
||||
);
|
||||
$row = db_get_row_sql($sql);
|
||||
|
||||
$this->getReferenceFromValue(
|
||||
$ref['table'],
|
||||
$col,
|
||||
$col_ref,
|
||||
$row,
|
||||
$value[$ref['table']][$col]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2413,12 +2445,37 @@ class Prd
|
||||
|
||||
$value = implode($csv_separator, $ref_arr);
|
||||
} else {
|
||||
$columns_ref = $this->getOneColumnRefs($ref['table']);
|
||||
|
||||
$value = $this->searchValue(
|
||||
$ref['columns'],
|
||||
$ref['table'],
|
||||
$ref['id'],
|
||||
$value
|
||||
);
|
||||
|
||||
// Get reference in value
|
||||
if ($columns_ref !== false) {
|
||||
foreach ($columns_ref as $col => $col_ref) {
|
||||
if (array_key_exists($col, $value[$ref['table']])) {
|
||||
$sql = sprintf(
|
||||
'SELECT * FROM %s WHERE %s = "%s"',
|
||||
$ref['table'],
|
||||
$col,
|
||||
$value[$ref['table']][$col],
|
||||
);
|
||||
$row = db_get_row_sql($sql);
|
||||
|
||||
$this->getReferenceFromValue(
|
||||
$ref['table'],
|
||||
$col,
|
||||
$col_ref,
|
||||
$row,
|
||||
$value[$ref['table']][$col]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2435,7 +2492,7 @@ class Prd
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
private function getValueFromReference($table, $column, $reference, &$value)
|
||||
private function getValueFromReference($table, $column, $reference, $item, &$value)
|
||||
{
|
||||
if (isset($reference['conditional_refs']) === true) {
|
||||
// Conditional refs.
|
||||
@ -2445,8 +2502,8 @@ class Prd
|
||||
if (isset($condition['when']) === true
|
||||
&& isset($condition['ref']) === true
|
||||
) {
|
||||
if (isset($this->currentItem['parsed'][array_key_first($condition['when'])]) === true) {
|
||||
$compare_value = $this->currentItem['parsed'][array_key_first($condition['when'])];
|
||||
if (isset($item[array_key_first($condition['when'])]) === true) {
|
||||
$compare_value = $item[array_key_first($condition['when'])];
|
||||
|
||||
if ($this->evalConditionalRef($compare_value, $condition['when']) === true
|
||||
&& empty($value) === false
|
||||
@ -2656,6 +2713,7 @@ class Prd
|
||||
$result = '';
|
||||
|
||||
$prd_data = $this->getOnePrdData($type);
|
||||
$this->currentPrdData = $prd_data;
|
||||
if (empty($prd_data) === false) {
|
||||
$result .= '[prd_data]'.LINE_BREAK.LINE_BREAK;
|
||||
$result .= 'type="'.$type.'"'.LINE_BREAK;
|
||||
@ -2903,6 +2961,7 @@ class Prd
|
||||
unset($data_file['prd_data']);
|
||||
|
||||
$prd_data = $this->getOnePrdData($type);
|
||||
$this->currentPrdData = $prd_data;
|
||||
if ($prd_data !== false) {
|
||||
// Begin transaction.
|
||||
$db = $config['dbconnection'];
|
||||
@ -2941,6 +3000,7 @@ class Prd
|
||||
$table,
|
||||
$column,
|
||||
$column_refs[$column],
|
||||
$this->currentItem['parsed'],
|
||||
$value
|
||||
);
|
||||
|
||||
@ -2968,6 +3028,7 @@ class Prd
|
||||
$table,
|
||||
$column,
|
||||
$json_refs[$column][$json_key],
|
||||
$this->currentItem['parsed'],
|
||||
$json_value
|
||||
) === true
|
||||
) {
|
||||
@ -3064,8 +3125,42 @@ class Prd
|
||||
&& empty($array_value[$ref['table']]) === false
|
||||
) {
|
||||
$where = '';
|
||||
$columns_ref = $this->getOneColumnRefs($ref['table']);
|
||||
foreach ($ref['columns'] as $column_name) {
|
||||
if (isset($array_value[$ref['table']][$column_name])) {
|
||||
// Get value from crossed reference in current value
|
||||
if (isset($this->crossed_refs[$ref['table']]) === true
|
||||
&& empty($this->crossed_refs[$ref['table']]['ref']) === false
|
||||
&& in_array($column_name, $this->crossed_refs[$ref['table']]['ref'])
|
||||
) {
|
||||
$parent_table = $this->crossed_refs[$ref['table']]['parent_table'];
|
||||
foreach ($this->crossed_refs[$ref['table']]['ref'] as $k => $f) {
|
||||
$itemReference = $this->getItemReference(
|
||||
$parent_table,
|
||||
$this->crossed_refs[$parent_table]['value'][$k],
|
||||
$array_value[$ref['table']][$f]
|
||||
);
|
||||
|
||||
if ($itemReference !== false) {
|
||||
$array_value[$ref['table']][$column_name] = $itemReference;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($columns_ref !== false) {
|
||||
if (array_key_exists($column_name, $columns_ref)) {
|
||||
$temp_value = $array_value[$ref['table']][$column_name];
|
||||
$temp_value = (is_array($temp_value) ? json_encode($temp_value) : $temp_value);
|
||||
|
||||
// Get value from reference in current value
|
||||
$ref_value = $this->getValueFromReference($ref['table'], $column_name, $columns_ref[$column_name], $array_value[$ref['table']], $temp_value);
|
||||
|
||||
if ($ref_value === true) {
|
||||
$array_value[$ref['table']][$column_name] = $temp_value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$where .= sprintf(
|
||||
"%s = '%s' AND ",
|
||||
$column_name,
|
||||
|
@ -134,7 +134,7 @@ class WebServerModuleDebug extends Wizard
|
||||
public function showWebServerDebug()
|
||||
{
|
||||
// Show QueryResult editor.
|
||||
ui_query_result_editor('webserverdebug');
|
||||
ui_query_result_editor('webserverdebug', false);
|
||||
// Spinner for wait loads.
|
||||
html_print_div(
|
||||
[
|
||||
|
@ -182,8 +182,10 @@ class WelcomeWindow extends Wizard
|
||||
})
|
||||
}
|
||||
},
|
||||
closeOnEscape: true,
|
||||
onload: () => {
|
||||
$(document).ready(function () {
|
||||
$(".ui-dialog-titlebar-close").hide();
|
||||
var buttonpane = $("div[aria-describedby='welcome_modal_window'] .ui-dialog-buttonpane.ui-widget-content.ui-helper-clearfix");
|
||||
$(buttonpane).append(`
|
||||
<div class="welcome-wizard-buttons">
|
||||
@ -470,7 +472,7 @@ class WelcomeWindow extends Wizard
|
||||
],
|
||||
[
|
||||
'arguments' => [
|
||||
'label' => __('Cancel'),
|
||||
'label' => __('Change'),
|
||||
'type' => 'button',
|
||||
'attributes' => [
|
||||
'class' => (empty($btn_update_manager_class) === false) ? $btn_update_manager_class : 'invisible_important',
|
||||
@ -498,7 +500,7 @@ class WelcomeWindow extends Wizard
|
||||
],
|
||||
[
|
||||
'arguments' => [
|
||||
'label' => __('Cancel'),
|
||||
'label' => __('Change'),
|
||||
'type' => 'button',
|
||||
'attributes' => [
|
||||
'class' => (empty($btn_configure_mail_class) === false) ? $btn_configure_mail_class : 'invisible_important',
|
||||
@ -526,7 +528,7 @@ class WelcomeWindow extends Wizard
|
||||
],
|
||||
[
|
||||
'arguments' => [
|
||||
'label' => __('Cancel'),
|
||||
'label' => __('Change'),
|
||||
'type' => 'button',
|
||||
'attributes' => [
|
||||
'class' => (empty($btn_servers_up_class) === false) ? $btn_servers_up_class : 'invisible_important',
|
||||
@ -554,7 +556,7 @@ class WelcomeWindow extends Wizard
|
||||
],
|
||||
[
|
||||
'arguments' => [
|
||||
'label' => __('Cancel'),
|
||||
'label' => __('Change'),
|
||||
'type' => 'button',
|
||||
'attributes' => [
|
||||
'class' => (empty($btn_license_valid_class) === false) ? $btn_license_valid_class : 'invisible_important',
|
||||
|
@ -22,7 +22,7 @@ use DI\ContainerBuilder;
|
||||
/*
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC240320';
|
||||
$build_version = 'PC240401';
|
||||
$pandora_version = 'v7.0NG.776';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
@ -300,6 +300,10 @@ define('HEADER_LOGO_DEFAULT_COLLAPSED', 'logo-default-pandorafms-collapsed.png')
|
||||
define('HEADER_LOGO_BLACK_CLASSIC', 'logo-black-pandorafms.png');
|
||||
define('HEADER_LOGO_BLACK_COLLAPSED', 'logo-default-pandorafms-collapsed.png');
|
||||
|
||||
// Pandora Themes.
|
||||
define('DEFAULT_THEME', 1);
|
||||
define('BLACK_THEME', 2);
|
||||
|
||||
// Status images.
|
||||
// For modules.
|
||||
define('STATUS_MODULE_OK', 'module_ok.png');
|
||||
|
@ -1006,13 +1006,14 @@ function get_parameter($name, $default='')
|
||||
|
||||
function get_parameter_date($name, $default='', $date_format='Y/m/d')
|
||||
{
|
||||
// TODO: Configure default value.
|
||||
$date_end = get_parameter('date_end', 0);
|
||||
$time_end = get_parameter('time_end');
|
||||
$datetime_end = strtotime($date_end.' '.$time_end);
|
||||
|
||||
$custom_date = get_parameter('custom_date', 0);
|
||||
$range = get_parameter('range', SECONDS_1DAY);
|
||||
$date_text = get_parameter('range_text', SECONDS_1DAY);
|
||||
$range = get_parameter($name, SECONDS_1DAY);
|
||||
$date_text = get_parameter($name.'_text', SECONDS_1DAY);
|
||||
$date_init_less = (strtotime(date('Y/m/d')) - SECONDS_1DAY);
|
||||
$date_init = get_parameter('date_init', date(DATE_FORMAT, $date_init_less));
|
||||
$time_init = get_parameter('time_init', date(TIME_FORMAT, $date_init_less));
|
||||
@ -1026,7 +1027,7 @@ function get_parameter_date($name, $default='', $date_format='Y/m/d')
|
||||
$date_end = date('Y/m/d H:i:s', $datetime_end);
|
||||
$period = ($datetime_end - $datetime_init);
|
||||
} else if ($custom_date === '2') {
|
||||
$date_units = get_parameter('range_units');
|
||||
$date_units = get_parameter($name.'_units');
|
||||
$date_end = date('Y/m/d H:i:s');
|
||||
$date_init = date('Y/m/d H:i:s', (strtotime($date_end) - ((int) $date_text * (int) $date_units)));
|
||||
$period = (strtotime($date_end) - strtotime($date_init));
|
||||
@ -2427,11 +2428,6 @@ function check_login($output=true)
|
||||
return false;
|
||||
}
|
||||
|
||||
db_pandora_audit(
|
||||
AUDIT_LOG_HACK_ATTEMPT,
|
||||
'Trying to access without a valid session',
|
||||
'N/A'
|
||||
);
|
||||
include $config['homedir'].'/general/noaccess.php';
|
||||
exit;
|
||||
}
|
||||
|
@ -2312,26 +2312,35 @@ function agents_get_agent_with_ip($ip_address)
|
||||
* Get all IP addresses of an agent
|
||||
*
|
||||
* @param int Agent id
|
||||
* @param bool Order by id
|
||||
*
|
||||
* @return array Array with the IP address of the given agent or an empty array.
|
||||
*/
|
||||
function agents_get_addresses($id_agent)
|
||||
{
|
||||
function agents_get_addresses(
|
||||
$id_agent,
|
||||
$order_by_id=false
|
||||
) {
|
||||
$order_clause = ($order_by_id === true) ? 'ORDER BY taddress.id_a DESC' : '';
|
||||
|
||||
if (is_array($id_agent)) {
|
||||
$sql = sprintf(
|
||||
'SELECT ip
|
||||
FROM taddress_agent, taddress
|
||||
WHERE taddress_agent.id_a = taddress.id_a
|
||||
AND id_agent IN (%s)',
|
||||
implode(',', $id_agent)
|
||||
AND id_agent IN (%s)
|
||||
%s',
|
||||
implode(',', $id_agent),
|
||||
$order_clause
|
||||
);
|
||||
} else {
|
||||
$sql = sprintf(
|
||||
'SELECT ip
|
||||
FROM taddress_agent, taddress
|
||||
WHERE taddress_agent.id_a = taddress.id_a
|
||||
AND id_agent = %d',
|
||||
$id_agent
|
||||
AND id_agent = %d
|
||||
%s',
|
||||
$id_agent,
|
||||
$order_clause
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -13489,6 +13489,19 @@ function api_set_validate_event_by_id($id, $trash1=null, $trash2=null, $returnTy
|
||||
'estado' => 1,
|
||||
];
|
||||
|
||||
$name = events_get_description($id);
|
||||
|
||||
db_pandora_audit(
|
||||
AUDIT_LOG_EVENT,
|
||||
sprintf(
|
||||
'ID event %s validated by %s - %s',
|
||||
$id,
|
||||
$config['id_user'],
|
||||
$name
|
||||
),
|
||||
$config['id_user']
|
||||
);
|
||||
|
||||
$result = db_process_sql_update('tevento', $values, ['id_evento' => $id]);
|
||||
|
||||
if ($result === false) {
|
||||
|
@ -1443,6 +1443,10 @@ function config_update_config()
|
||||
);
|
||||
}
|
||||
|
||||
if (config_update_value('tabs_menu', get_parameter('tabs_menu', 'both'), true) === false) {
|
||||
$error_update[] = __('Tabs menu');
|
||||
}
|
||||
|
||||
// --------------------------------------------------
|
||||
// CUSTOM VALUES POST PROCESS
|
||||
// --------------------------------------------------
|
||||
@ -2827,7 +2831,7 @@ function config_process_config()
|
||||
}
|
||||
|
||||
if (!isset($config['custom_splash_login'])) {
|
||||
config_update_value('custom_splash_login', 'none.png');
|
||||
config_update_value('custom_splash_login', 'default');
|
||||
}
|
||||
|
||||
if (!isset($config['custom_docs_logo'])) {
|
||||
@ -3973,6 +3977,10 @@ function config_process_config()
|
||||
config_update_value('control_session_timeout', 'check_activity');
|
||||
}
|
||||
|
||||
if (isset($config['tabs_menu']) === false) {
|
||||
config_update_value('tabs_menu', 'both');
|
||||
}
|
||||
|
||||
// Finally, check if any value was overwritten in a form.
|
||||
config_update_config();
|
||||
}
|
||||
|
@ -1946,9 +1946,9 @@ function events_get_all(
|
||||
case 'utimestamp':
|
||||
case 'criticity':
|
||||
case 'estado':
|
||||
if ($a[$sort_field] === $b[$sort_field]) {
|
||||
if ((isset($a[$sort_field]) === true && isset($b[$sort_field]) === true) && $a[$sort_field] === $b[$sort_field]) {
|
||||
$res = 0;
|
||||
} else if ($a[$sort_field] > $b[$sort_field]) {
|
||||
} else if ((isset($a[$sort_field]) === true && isset($b[$sort_field]) === true) && $a[$sort_field] > $b[$sort_field]) {
|
||||
$res = ($order === 'asc') ? 1 : (-1);
|
||||
} else {
|
||||
$res = ($order === 'asc') ? (-1) : 1;
|
||||
@ -6539,3 +6539,165 @@ function event_print_graph(
|
||||
|
||||
return $graph;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get comments of array events.
|
||||
*
|
||||
* @param array $events Array of events.
|
||||
* @param array $filter Filter of view events.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
function reduce_events_comments($events, $filter=null)
|
||||
{
|
||||
$group_by_server = [];
|
||||
foreach ($events as $key => $event) {
|
||||
if (isset($group_by_server[$event['server_id']]) === false) {
|
||||
$group_by_server[$event['server_id']] = [];
|
||||
}
|
||||
|
||||
$group_by_server[$event['server_id']][] = $event;
|
||||
}
|
||||
|
||||
$comments = [];
|
||||
foreach ($group_by_server as $server_id => $events) {
|
||||
$events_comments = event_get_comments_with_all_events($events, $filter, $server_id);
|
||||
foreach ($events_comments as $key => $comment) {
|
||||
$comments[$server_id.'_'.$comment['id_event']] = $comment;
|
||||
}
|
||||
}
|
||||
|
||||
return $comments;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Ge all coments of events grouped by server.
|
||||
*
|
||||
* @param array $events Array of events.
|
||||
* @param array $filter Filter of view events.
|
||||
* @param integer $server_id Id of server.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
function event_get_comments_with_all_events($events, $filter=null, $server_id=0)
|
||||
{
|
||||
$whereGrouped = [];
|
||||
if (empty($filter) === false) {
|
||||
if (isset($filter['event_view_hr_cs']) === true && ($filter['event_view_hr_cs'] > 0)) {
|
||||
$whereGrouped[] = sprintf(
|
||||
' AND tevent_comment.utimestamp > UNIX_TIMESTAMP(now() - INTERVAL %d SECOND) ',
|
||||
$filter['event_view_hr_cs']
|
||||
);
|
||||
} else if (isset($filter['event_view_hr']) === true && ($filter['event_view_hr'] > 0)) {
|
||||
$whereGrouped[] = sprintf(
|
||||
' AND tevent_comment.utimestamp > UNIX_TIMESTAMP(now() - INTERVAL %d SECOND) ',
|
||||
((int) $filter['event_view_hr'] * 3600)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$mode = (int) ($filter['group_rep'] ?? 0);
|
||||
|
||||
$eventsGrouped = [];
|
||||
$idEvents = [];
|
||||
$idExtras = [];
|
||||
$idAgentsModules = [];
|
||||
$idAgentes = [];
|
||||
$eventos = [];
|
||||
foreach ($events as $key => $event) {
|
||||
// Consider if the event is grouped.
|
||||
if ($mode === EVENT_GROUP_REP_EVENTS) {
|
||||
// Default grouped message filtering (evento and estado).
|
||||
$eventos[] = io_safe_input(io_safe_output($event['evento']));
|
||||
|
||||
// If id_agente is reported, filter the messages by them as well.
|
||||
if ((int) $event['id_agente'] > 0) {
|
||||
$idAgentes[] = (int) $event['id_agente'];
|
||||
}
|
||||
|
||||
if ((int) $event['id_agentmodule'] > 0) {
|
||||
$idAgentsModules[] = (int) $event['id_agentmodule'];
|
||||
}
|
||||
} else if ($mode === EVENT_GROUP_REP_EXTRAIDS) {
|
||||
$idExtras[] = io_safe_input(io_safe_output($event['id_extra']));
|
||||
} else {
|
||||
$idEvents[] = $event['id_evento'];
|
||||
}
|
||||
}
|
||||
|
||||
if ($mode === EVENT_GROUP_REP_EVENTS) {
|
||||
// Default grouped message filtering (evento and estado).
|
||||
$whereGrouped[] = sprintf(
|
||||
'AND `tevento`.`evento` IN ("%s")',
|
||||
implode('","', $eventos)
|
||||
);
|
||||
|
||||
// If id_agente is reported, filter the messages by them as well.
|
||||
if ((int) $event['id_agente'] > 0) {
|
||||
$whereGrouped[] = sprintf(
|
||||
' AND `tevento`.`id_agente` IN (%s)',
|
||||
implode(',', $idAgentes)
|
||||
);
|
||||
}
|
||||
|
||||
if ((int) $event['id_agentmodule'] > 0) {
|
||||
$whereGrouped[] = sprintf(
|
||||
' AND `tevento`.`id_agentmodule` IN (%s)',
|
||||
implode(',', $idAgentsModules)
|
||||
);
|
||||
}
|
||||
} else if ($mode === EVENT_GROUP_REP_EXTRAIDS) {
|
||||
$whereGrouped[] = sprintf(
|
||||
'AND `tevento`.`id_extra` IN ("%s")',
|
||||
implode('","', $idExtras),
|
||||
);
|
||||
} else {
|
||||
$whereGrouped[] = sprintf('AND `tevento`.`id_evento` IN (%s)', implode(',', $idEvents));
|
||||
}
|
||||
|
||||
try {
|
||||
if (is_metaconsole() === true
|
||||
&& $server_id > 0
|
||||
) {
|
||||
$node = new Node($server_id);
|
||||
$node->connect();
|
||||
}
|
||||
|
||||
$sql = sprintf(
|
||||
'SELECT tevent_comment.*
|
||||
FROM tevento
|
||||
INNER JOIN tevent_comment
|
||||
ON tevento.id_evento = tevent_comment.id_event
|
||||
JOIN(
|
||||
SELECT id_event, max(utimestamp) as utimestamp
|
||||
FROM tevent_comment a
|
||||
GROUP BY a.id_event
|
||||
) max_ut ON max_ut.id_event = tevent_comment.id_event AND max_ut.utimestamp = tevent_comment.utimestamp
|
||||
WHERE 1=1 %s
|
||||
ORDER BY tevent_comment.utimestamp DESC',
|
||||
implode(' ', $whereGrouped)
|
||||
);
|
||||
|
||||
// Get grouped comments.
|
||||
$eventsGrouped = db_get_all_rows_sql($sql);
|
||||
} catch (\Exception $e) {
|
||||
// Unexistent agent.
|
||||
if (is_metaconsole() === true
|
||||
&& $server_id > 0
|
||||
) {
|
||||
$node->disconnect();
|
||||
}
|
||||
|
||||
$eventsGrouped = [];
|
||||
} finally {
|
||||
if (is_metaconsole() === true
|
||||
&& $server_id > 0
|
||||
) {
|
||||
$node->disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
return $eventsGrouped;
|
||||
}
|
||||
|
@ -805,7 +805,7 @@ function filemanager_file_explorer(
|
||||
|
||||
// Actions buttons
|
||||
// Delete button.
|
||||
$data[4] = '<div class="table_action_buttons flex">';
|
||||
$data[4] = '<div class="table_action_buttons flex flex-end">';
|
||||
$typefile = array_pop(explode('.', $fileinfo['name']));
|
||||
if (is_writable($fileinfo['realpath']) === true
|
||||
&& (is_dir($fileinfo['realpath']) === false || count(scandir($fileinfo['realpath'])) < 3)
|
||||
@ -1069,7 +1069,7 @@ function filemanager_file_explorer(
|
||||
);
|
||||
|
||||
// Show Modal Real Path
|
||||
$modal_real_path = "<div><b>Real path to plugin execution is:</b></div>
|
||||
$modal_real_path = "<div><b>Real path is:</b></div>
|
||||
<div id='real_path'></div>";
|
||||
|
||||
if (isset($_SERVER['HTTPS']) === true) {
|
||||
|
@ -3398,8 +3398,10 @@ function graph_custom_sql_graph(
|
||||
|
||||
if ($count <= $max_num_elements) {
|
||||
$label = __('Data');
|
||||
$full_label = __('Data');
|
||||
if (empty($data_item['label']) === false) {
|
||||
$label = io_safe_output($data_item['label']);
|
||||
$full_label = io_safe_output($data_item['label']);
|
||||
if (strlen($label) > $SQL_GRAPH_MAX_LABEL_SIZE) {
|
||||
$first_label = $label;
|
||||
$label = substr(
|
||||
@ -3413,11 +3415,13 @@ function graph_custom_sql_graph(
|
||||
$labels_bar[] = $label;
|
||||
if ($type === 'sql_graph_hbar') {
|
||||
$data_bar[] = [
|
||||
'full_title' => $full_label,
|
||||
'y' => $label,
|
||||
'x' => $value,
|
||||
];
|
||||
} else {
|
||||
$data_bar[] = [
|
||||
'full_title' => $full_label,
|
||||
'x' => $label,
|
||||
'y' => $value,
|
||||
];
|
||||
@ -3493,6 +3497,9 @@ function graph_custom_sql_graph(
|
||||
'grid' => ['display' => false],
|
||||
],
|
||||
],
|
||||
'tooltip' => [
|
||||
'title' => ['fullTitle' => true],
|
||||
],
|
||||
'labels' => $labels_bar,
|
||||
];
|
||||
|
||||
|
@ -1010,6 +1010,10 @@ function html_print_select(
|
||||
ui_require_javascript_file('select2.min');
|
||||
}
|
||||
|
||||
if ($placeholder === '' && $select2_multiple_enable === true) {
|
||||
$placeholder = __('Select one or more elements');
|
||||
}
|
||||
|
||||
$output .= '<script type="text/javascript">';
|
||||
$output .= '$("#'.$id.'").select2({
|
||||
closeOnSelect: '.(($select2_multiple_enable === true) ? 'false' : 'true').',
|
||||
|
@ -108,21 +108,20 @@ function get_table_inputs_masive_agents($params)
|
||||
|
||||
$table = new stdClass;
|
||||
$table->id = 'delete_table';
|
||||
$table->class = 'databox filters';
|
||||
$table->class = 'databox filters filter-table-adv';
|
||||
$table->width = '100%';
|
||||
$table->data = [];
|
||||
$table->style = [];
|
||||
$table->style[0] = 'font-weight: bold;';
|
||||
$table->style[2] = 'font-weight: bold';
|
||||
$table->size = [];
|
||||
$table->size[0] = '15%';
|
||||
$table->size[1] = '35%';
|
||||
$table->size[2] = '15%';
|
||||
$table->size[3] = '35%';
|
||||
$table->size[0] = '50%';
|
||||
$table->size[1] = '50%';
|
||||
|
||||
$table->data = [];
|
||||
$table->data[0][0] = __('Group');
|
||||
$table->data[0][1] = html_print_select_groups(
|
||||
$table->data[0][0] = html_print_label_input_block(
|
||||
__('Group'),
|
||||
html_print_select_groups(
|
||||
false,
|
||||
'AW',
|
||||
true,
|
||||
@ -131,15 +130,24 @@ function get_table_inputs_masive_agents($params)
|
||||
false,
|
||||
'',
|
||||
'',
|
||||
true
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
'width:100%; max-width: 420px;'
|
||||
)
|
||||
);
|
||||
$table->data[0][2] = __('Group recursion');
|
||||
$table->data[0][3] = html_print_checkbox(
|
||||
|
||||
$table->data[0][1] = html_print_label_input_block(
|
||||
__('Group recursion'),
|
||||
html_print_checkbox(
|
||||
'recursion',
|
||||
1,
|
||||
$params['recursion'],
|
||||
true,
|
||||
false
|
||||
)
|
||||
);
|
||||
|
||||
$status_list = [];
|
||||
@ -149,19 +157,27 @@ function get_table_inputs_masive_agents($params)
|
||||
$status_list[AGENT_STATUS_UNKNOWN] = __('Unknown');
|
||||
$status_list[AGENT_STATUS_NOT_NORMAL] = __('Not normal');
|
||||
$status_list[AGENT_STATUS_NOT_INIT] = __('Not init');
|
||||
$table->data[1][0] = __('Status');
|
||||
$table->data[1][1] = html_print_select(
|
||||
$table->data[1][0] = html_print_label_input_block(
|
||||
__('Status'),
|
||||
html_print_select(
|
||||
$status_list,
|
||||
'status_agents',
|
||||
'selected',
|
||||
'',
|
||||
__('All'),
|
||||
AGENT_STATUS_ALL,
|
||||
true
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'width:100%; max-width: 420px;'
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[1][2] = __('Show agents');
|
||||
$table->data[1][3] = html_print_select(
|
||||
$table->data[1][1] = html_print_label_input_block(
|
||||
__('Show agents'),
|
||||
html_print_select(
|
||||
[
|
||||
0 => 'Only enabled',
|
||||
1 => 'Only disabled',
|
||||
@ -176,7 +192,8 @@ function get_table_inputs_masive_agents($params)
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'width:30%;'
|
||||
'width:100%; max-width: 420px;'
|
||||
)
|
||||
);
|
||||
|
||||
if (is_metaconsole() === true) {
|
||||
@ -186,8 +203,9 @@ function get_table_inputs_masive_agents($params)
|
||||
$server_fields[$key] = $server['server_name'];
|
||||
}
|
||||
|
||||
$table->data[2][2] = __('Node');
|
||||
$table->data[2][3] = html_print_select(
|
||||
$table->data[2][0] = html_print_label_input_block(
|
||||
__('Node'),
|
||||
html_print_select(
|
||||
$server_fields,
|
||||
'nodes[]',
|
||||
0,
|
||||
@ -199,7 +217,7 @@ function get_table_inputs_masive_agents($params)
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'min-width: 500px; max-width: 500px; max-height: 100px',
|
||||
'width:100%; max-width: 420px; max-height: 100px',
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
@ -211,36 +229,50 @@ function get_table_inputs_masive_agents($params)
|
||||
true,
|
||||
true,
|
||||
true
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$os_list = os_get_os(true);
|
||||
|
||||
$table->data[3][0] = __('OS');
|
||||
$table->data[3][1] = html_print_select(
|
||||
$table->data[3][0] = html_print_label_input_block(
|
||||
__('OS'),
|
||||
html_print_select(
|
||||
$os_list,
|
||||
'os_agent',
|
||||
'selected',
|
||||
'',
|
||||
__('All'),
|
||||
'',
|
||||
true
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'width:100%; max-width: 420px;'
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[3][2] = __('OS Version');
|
||||
$table->data[3][3] = html_print_input_text(
|
||||
$table->data[3][1] = html_print_label_input_block(
|
||||
__('OS Version'),
|
||||
html_print_input_text(
|
||||
'os_agent_version',
|
||||
'',
|
||||
__('Select OS version'),
|
||||
35,
|
||||
255,
|
||||
true
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
'w100p'
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[4][0] = __('Agents');
|
||||
$table->data[4][0] .= '<span id="agent_loading" class="invisible">';
|
||||
$table->data[4][0] .= html_print_image('images/spinner.png', true);
|
||||
$table->data[4][0] .= '</span>';
|
||||
$label_agents = __('Agents');
|
||||
$label_agents .= '<span id="agent_loading" class="invisible">';
|
||||
$label_agents .= html_print_image('images/spinner.png', true);
|
||||
$label_agents .= '</span>';
|
||||
|
||||
$agents = [];
|
||||
if (is_metaconsole() === false) {
|
||||
@ -251,7 +283,9 @@ function get_table_inputs_masive_agents($params)
|
||||
);
|
||||
}
|
||||
|
||||
$table->data[4][1] = html_print_select(
|
||||
$table->data[4][0] = html_print_label_input_block(
|
||||
$label_agents,
|
||||
html_print_select(
|
||||
$agents,
|
||||
'id_agents[]',
|
||||
0,
|
||||
@ -263,7 +297,7 @@ function get_table_inputs_masive_agents($params)
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'min-width: 500px; max-width: 500px; max-height: 100px',
|
||||
'width: 100%; max-height: 100px',
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
@ -275,6 +309,7 @@ function get_table_inputs_masive_agents($params)
|
||||
true,
|
||||
true,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$output = html_print_table($table, true);
|
||||
|
@ -64,8 +64,6 @@ function menu_print_menu(&$menu)
|
||||
$sec2 = 'godmode/alerts/alert_actions';
|
||||
} else if ($sec2 === 'godmode/alerts/configure_alert_command') {
|
||||
$sec2 = 'godmode/alerts/alert_commands';
|
||||
} else if ($sec2 === 'enterprise/godmode/setup/edit_skin') {
|
||||
$sec2 = 'enterprise/godmode/setup/setup_skins';
|
||||
} else if ($sec2 === 'operation/agentes/networkmap.dinamic') {
|
||||
$sec2 = 'operation/agentes/pandora_networkmap';
|
||||
} else if ($sec2 === 'godmode/gis_maps/configure_gis_map') {
|
||||
|
@ -484,10 +484,13 @@ function modules_delete_agent_module($id_agent_module)
|
||||
|
||||
db_process_sql_delete('tgraph_source', $where);
|
||||
db_process_sql_delete('treport_content', $where);
|
||||
// Disabled delete events when module is deleted.
|
||||
/*
|
||||
db_process_sql_delete(
|
||||
'tevento',
|
||||
['id_agentmodule' => $id_agent_module]
|
||||
);
|
||||
*/
|
||||
$where = ['id_agente_modulo' => $id_agent_module];
|
||||
db_process_sql_delete('tlayout_data', $where);
|
||||
db_process_sql_delete('tagente_estado', $where);
|
||||
|
@ -1066,39 +1066,39 @@ function notification_filter()
|
||||
}
|
||||
|
||||
$types_list = array_unique($types_list);
|
||||
$notification_filter = "<ul id='menu-filter_notification'>";
|
||||
$notification_filter = '';
|
||||
$filter_options = [];
|
||||
|
||||
$notification_filter .= "<li>
|
||||
<input type='checkbox' name='filter_menu' id='filter_menu'>
|
||||
<label for='filter_menu' id='filter_menu_label'>".__('Filter').'</label>';
|
||||
|
||||
$notification_filter .= "<ul class='sublevel-filter_notification'>";
|
||||
foreach ($types_list as $type) {
|
||||
if ($type === 'All') {
|
||||
$checked = 'checked';
|
||||
$checked = 'All';
|
||||
} else {
|
||||
$checked = '';
|
||||
}
|
||||
|
||||
switch ($type) {
|
||||
case 'All':
|
||||
$type_name = __('Show all');
|
||||
break;
|
||||
|
||||
case 'HISTORYDB':
|
||||
$type_name = 'HISTORY DB';
|
||||
$type_name = __('History DB');
|
||||
break;
|
||||
|
||||
case 'PANDORADB':
|
||||
$type_name = 'PANDORA DB';
|
||||
$type_name = __('Pandora DB');
|
||||
break;
|
||||
|
||||
case 'UPDATEMANAGER':
|
||||
$type_name = 'WARP UPDATE';
|
||||
$type_name = __('Warp update');
|
||||
break;
|
||||
|
||||
case 'ALLOWOVERRIDE':
|
||||
$type_name = 'ALLOW OVERRIDE';
|
||||
$type_name = __('Allow override');
|
||||
break;
|
||||
|
||||
case 'DISCOVERYTASK':
|
||||
$type_name = 'DISCOVERY TASK';
|
||||
$type_name = __('Discovery task');
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -1106,29 +1106,31 @@ function notification_filter()
|
||||
break;
|
||||
}
|
||||
|
||||
$notification_filter .= "<li><div class='item-filter'>
|
||||
<input type='checkbox'
|
||||
class='checkbox_filter_notifications'
|
||||
value=".$type."
|
||||
name='filter_".$type."'
|
||||
".$checked."
|
||||
id='filter_".$type."'>
|
||||
<label for='filter_".$type."'>".$type_name.'</label>
|
||||
</div>
|
||||
</li>';
|
||||
$filter_options[$type] = $type_name;
|
||||
}
|
||||
|
||||
$notification_filter .= "<li><div class='item-filter'>";
|
||||
$filter_select = html_print_select(
|
||||
$filter_options,
|
||||
'notifications_filter_options',
|
||||
$checked,
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'w150px'
|
||||
);
|
||||
|
||||
$notification_filter .= html_print_div(
|
||||
[
|
||||
'class' => 'action-buttons w100p',
|
||||
'content' => html_print_submit_button(
|
||||
__('Filter'),
|
||||
'content' => $filter_select.html_print_submit_button(
|
||||
__('Apply filter'),
|
||||
'btn_submit',
|
||||
false,
|
||||
[
|
||||
'class' => 'mini sub filter',
|
||||
'icon' => 'search mini',
|
||||
'class' => 'link font_14px link-bold text-nowrap',
|
||||
'onClick' => 'filter_notification()',
|
||||
],
|
||||
true
|
||||
@ -1137,14 +1139,6 @@ function notification_filter()
|
||||
true
|
||||
);
|
||||
|
||||
$notification_filter .= '</div>
|
||||
</li>';
|
||||
|
||||
$notification_filter .= '</ul>';
|
||||
|
||||
$notification_filter .= '</li>';
|
||||
|
||||
$notification_filter .= '</ul>';
|
||||
return $notification_filter;
|
||||
}
|
||||
|
||||
@ -1161,19 +1155,23 @@ function notifications_print_dropdown()
|
||||
$mess = [];
|
||||
}
|
||||
|
||||
$redirection_notifications = html_print_menu_button(
|
||||
$redirection_notifications = html_print_button(
|
||||
__('See all notifications'),
|
||||
'see_all_notifications',
|
||||
false,
|
||||
'window.location="'.ui_get_full_url('index.php?sec=message_list&sec2=operation/messages/message_list').'"',
|
||||
[
|
||||
'href' => 'javascript:',
|
||||
'class' => 'notification_menu_actions',
|
||||
'text' => __('View all messages'),
|
||||
'onClick' => "window.location='".ui_get_full_url('index.php?sec=message_list&sec2=operation/messages/message_list')."'",
|
||||
'mode' => 'secondary',
|
||||
'class' => 'bolder',
|
||||
'icon' => 'unset',
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
$notification_menu = html_print_menu_button(
|
||||
[
|
||||
'href' => 'javascript:',
|
||||
'class' => 'notification_menu_actions',
|
||||
'class' => 'notification_menu_actions link-bold font_14px',
|
||||
'text' => __('Mark all as read'),
|
||||
'onClick' => 'mark_all_notification_as_read()',
|
||||
],
|
||||
@ -1187,10 +1185,14 @@ function notifications_print_dropdown()
|
||||
<div class='notificaion_menu_container'>
|
||||
<div class='menu_tab filter_notification'>%s</div>
|
||||
<div class='menu_tab notification_menu'>%s</div>
|
||||
<div class='menu_tab notification_menu'>%s</div>
|
||||
</div>
|
||||
<div class='notifications-div'>
|
||||
%s
|
||||
</div>
|
||||
<center>
|
||||
<div class='mrgn_top_10px mrgn_btn_10px'>%s</div>
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
id='notification-wrapper-shadow'
|
||||
@ -1200,14 +1202,14 @@ function notifications_print_dropdown()
|
||||
",
|
||||
$notification_filter,
|
||||
$notification_menu,
|
||||
$redirection_notifications,
|
||||
array_reduce(
|
||||
$mess,
|
||||
function ($carry, $message) {
|
||||
return $carry.notifications_print_dropdown_element($message);
|
||||
},
|
||||
''
|
||||
)
|
||||
),
|
||||
$redirection_notifications
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -47,6 +47,10 @@ function themes_get_css($path=false)
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($file === 'pandoraitsm.css') {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Skip '..' and '.' entries and files not ended in '.css'.
|
||||
if ($path && ($file == '.' || $file == '..' || strtolower(substr($file, (strlen($file) - 4))) !== '.css')) {
|
||||
continue;
|
||||
|
@ -2946,7 +2946,7 @@ function ui_print_help_tip(
|
||||
|
||||
$id = random_int(1, 99999);
|
||||
$output = '<div id="div_tip_'.$id.'" class="tip" style="'.$style.'" >';
|
||||
$output .= '<div id="tip_dialog_'.$id.'" class="invisible margin-15" data-title="'.__('Help').'"><span class="font_13px">'.$text.'</span></div>';
|
||||
$output .= '<div id="tip_dialog_'.$id.'" class="invisible margin-15" data-title="'.__('Help').'"><span class="font_13px">'.io_safe_output($text).'</span></div>';
|
||||
$output .= html_print_image(
|
||||
$img,
|
||||
true,
|
||||
@ -5419,6 +5419,18 @@ function ui_print_page_header(
|
||||
|
||||
if (is_array($options)) {
|
||||
$buffer .= '<div id="menu_tab"><ul class="mn">';
|
||||
|
||||
$menu_dots_class = 'menu-dots-hide';
|
||||
if (isset($dots) === true && $dots !== '' && $config['tabs_menu'] !== 'icons') {
|
||||
$menu_dots_class = 'menu-dots-show';
|
||||
}
|
||||
|
||||
if (isset($dots) === true && $dots !== '') {
|
||||
$buffer .= '<li class="nomn menu-dots-li '.$menu_dots_class.'">';
|
||||
$buffer .= '<div id="menu_dots">'.$dots.'</div>';
|
||||
$buffer .= '</li>';
|
||||
}
|
||||
|
||||
foreach ($options as $key => $option) {
|
||||
if (empty($option)) {
|
||||
continue;
|
||||
@ -5428,6 +5440,13 @@ function ui_print_page_header(
|
||||
// $buffer .= '</li>';
|
||||
} else {
|
||||
if (is_array($option)) {
|
||||
if ($config['tabs_menu'] === 'menu' && (isset($dots) === true && $dots !== '')) {
|
||||
$tabs_class = 'tabs-hide';
|
||||
if (isset($option['active']) === true && (bool) $option['active'] === true) {
|
||||
$tabs_class = 'tabs-show';
|
||||
}
|
||||
}
|
||||
|
||||
$class = 'nomn';
|
||||
if (isset($option['active'])) {
|
||||
if ($option['active']) {
|
||||
@ -5444,7 +5463,7 @@ function ui_print_page_header(
|
||||
$class .= ($godmode) ? ' tab_godmode' : ' tab_operation';
|
||||
}
|
||||
|
||||
$buffer .= '<li class="'.$class.' ">';
|
||||
$buffer .= '<li class="'.$class.' '.$tabs_class.'">';
|
||||
$buffer .= $option['text'];
|
||||
if (isset($option['sub_menu'])) {
|
||||
$buffer .= $option['sub_menu'];
|
||||
@ -5460,11 +5479,19 @@ function ui_print_page_header(
|
||||
}
|
||||
|
||||
$buffer .= '</ul>';
|
||||
if (isset($dots) === true) {
|
||||
$buffer .= '<div id="menu_dots">'.$dots.'</div>';
|
||||
}
|
||||
|
||||
$buffer .= '</div>';
|
||||
|
||||
if (is_metaconsole() === false) {
|
||||
$buffer .= '
|
||||
<script>
|
||||
menuTabsShowHide();
|
||||
|
||||
$(window).on("resize", function() {
|
||||
menuTabsShowHide();
|
||||
});
|
||||
</script>
|
||||
';
|
||||
}
|
||||
} else {
|
||||
if ($options != '') {
|
||||
$buffer .= '<div id="menu_tab"><ul class="mn"><li>';
|
||||
@ -7303,7 +7330,7 @@ function ui_print_message_dialog($title, $text, $id='', $img='', $text_button=''
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
function ui_query_result_editor($name='default')
|
||||
function ui_query_result_editor($name='default', $button_in_action_buttons=true)
|
||||
{
|
||||
$editorSubContainer = html_print_div(
|
||||
[
|
||||
@ -7379,9 +7406,22 @@ function ui_query_result_editor($name='default')
|
||||
]
|
||||
);
|
||||
|
||||
$execute_button = html_print_submit_button(__('Execute query'), 'execute_query', false, ['icon' => 'update'], true);
|
||||
html_print_action_buttons($execute_button);
|
||||
$execute_button = html_print_submit_button(
|
||||
__('Execute query'),
|
||||
'execute_query',
|
||||
false,
|
||||
[
|
||||
'icon' => 'update',
|
||||
'class' => 'float-right',
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
if ($button_in_action_buttons === true) {
|
||||
html_print_action_buttons($execute_button);
|
||||
} else {
|
||||
echo $execute_button;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1272,6 +1272,28 @@ function get_build_setup_charts($type, $options, $data)
|
||||
$chart->labels()->exchangeArray($options['labels']);
|
||||
}
|
||||
|
||||
// Edit tooltip.
|
||||
if (isset($options['tooltip']) === true && empty($options['tooltip']) === false) {
|
||||
$tooltip_callback_value = 'item.formattedValue';
|
||||
if (isset($options['tooltip']['value']) === true && empty($options['tooltip']['value']) === false) {
|
||||
$tooltip_callback_value = ''.$options['tooltip']['value'].'';
|
||||
}
|
||||
|
||||
$tooltip_callback_unit = '';
|
||||
if (isset($options['tooltip']['unit']) === true && empty($options['tooltip']['unit']) === false) {
|
||||
$tooltip_callback_unit = '"'.$options['tooltip']['unit'].'"';
|
||||
}
|
||||
|
||||
$tooltip_callback = '(item) => " " + '.$tooltip_callback_value.' + "'.$tooltip_callback_unit.'"';
|
||||
$chart->options()->getPlugins()->getTooltip()->callbacks()->setLabel($tooltip_callback);
|
||||
|
||||
if (isset($options['tooltip']['title']) === true && empty($options['tooltip']['title']) === false) {
|
||||
if (isset($options['tooltip']['title']['fullTitle']) === true && $options['tooltip']['title']['fullTitle'] === true) {
|
||||
$chart->options()->getPlugins()->getTooltip()->callbacks()->setTitle('(item) => item[0].dataset.data[item[0].dataIndex].full_title');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add Datasets.
|
||||
$setData = $chart->createDataSet();
|
||||
switch ($type) {
|
||||
|
@ -2705,3 +2705,34 @@ function show_email_test(id) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function menuTabsShowHide() {
|
||||
const dotsLi = $(".menu-dots-li");
|
||||
if (dotsLi.length) {
|
||||
const tabsLi = $("#menu_tab .nomn:not(.menu-dots-li)");
|
||||
const menuTabWidth = $("#menu_tab_frame_view").width();
|
||||
const menuTabLeftWidth = $(".menu_tab_left_bc").width();
|
||||
const menuTabsRightCount = $("#menu_tab > ul.mn > li").length * 46;
|
||||
const margins = 50;
|
||||
|
||||
const menuTabFree = menuTabWidth - (menuTabLeftWidth + margins);
|
||||
|
||||
if (menuTabFree >= menuTabsRightCount) {
|
||||
// Big.
|
||||
if ($(dotsLi).hasClass("menu-dots-show") === true) {
|
||||
if ($(tabsLi).hasClass("tabs-hide") === false) {
|
||||
$(tabsLi).show();
|
||||
}
|
||||
} else {
|
||||
$(dotsLi).hide();
|
||||
if ($(tabsLi).hasClass("tabs-hide") === false) {
|
||||
$(tabsLi).show();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Small.
|
||||
$(dotsLi).show();
|
||||
$(tabsLi).hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1553,9 +1553,11 @@ function changePlugin() {
|
||||
var moduleProtocol = $("#module_protocol").val();
|
||||
var executionType = $("#execution_type").val();
|
||||
var pluginSelected = $("#server_plugin_" + moduleProtocol).val();
|
||||
var pluginAllData = JSON.parse(
|
||||
$("#hidden-server_plugin_data_" + pluginSelected).val()
|
||||
);
|
||||
var pluginAllDataSafe = $("#hidden-server_plugin_data_" + pluginSelected)
|
||||
.val()
|
||||
.replace(/(?:\r\n|\r|\n)/g, "<br>");
|
||||
|
||||
var pluginAllData = JSON.parse(pluginAllDataSafe);
|
||||
|
||||
var pluginDescription = pluginAllData.description;
|
||||
var pluginMacros = pluginAllData.macros;
|
||||
@ -1586,11 +1588,15 @@ function changePlugin() {
|
||||
let macro = this.macro;
|
||||
let value = this.value;
|
||||
|
||||
if (pluginMacrosElement !== null) {
|
||||
if (pluginMacrosElement["server_plugin"] == pluginSelected) {
|
||||
if (pluginMacrosElement[macro + "_" + moduleProtocol + "_field"]) {
|
||||
value = pluginMacrosElement[macro + "_" + moduleProtocol + "_field"];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
value = "";
|
||||
}
|
||||
|
||||
if (
|
||||
typeof description == "undefined" ||
|
||||
|
@ -449,6 +449,10 @@ function load_modal(settings) {
|
||||
}
|
||||
};
|
||||
|
||||
if (settings.closeOnEscape == undefined) {
|
||||
settings.closeOnEscape = true;
|
||||
}
|
||||
|
||||
required_buttons.push({
|
||||
class:
|
||||
"ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next",
|
||||
@ -518,7 +522,7 @@ function load_modal(settings) {
|
||||
collision: "fit"
|
||||
},
|
||||
buttons: required_buttons,
|
||||
closeOnEscape: true,
|
||||
closeOnEscape: settings.closeOnEscape,
|
||||
open: function() {
|
||||
//$(".ui-dialog-titlebar-close").hide();
|
||||
},
|
||||
|
@ -172,18 +172,21 @@ class Overview extends Element
|
||||
$used = 0;
|
||||
}
|
||||
|
||||
$data = [
|
||||
'agents_used' => [
|
||||
if ($used > 0) {
|
||||
$data['agents_used'] = [
|
||||
'label' => __('% Agents used'),
|
||||
'perc' => $used,
|
||||
'color' => '#1C4E6B',
|
||||
],
|
||||
'free_agents' => [
|
||||
];
|
||||
}
|
||||
|
||||
if ($free > 0) {
|
||||
$data['free_agents'] = [
|
||||
'label' => __('% Free agents'),
|
||||
'perc' => $free,
|
||||
'color' => '#5C63A2',
|
||||
],
|
||||
];
|
||||
}
|
||||
} else {
|
||||
$agents = agents_get_agents();
|
||||
$enabled_agents = agents_get_agents(
|
||||
@ -207,23 +210,26 @@ class Overview extends Element
|
||||
$total_disabled_agents = round((($total - count($enabled_agents)) * 100) / $total);
|
||||
$total_enabled_agents = round((count($enabled_agents) * 100) / $total);
|
||||
} else {
|
||||
$total_disabled_agents = 0;
|
||||
$total_enabled_agents = 100;
|
||||
$total_disabled_agents = 100;
|
||||
$total_enabled_agents = 0;
|
||||
}
|
||||
|
||||
$data = [
|
||||
'agents_enabled' => [
|
||||
if ($total_enabled_agents > 0) {
|
||||
$data['agents_enabled'] = [
|
||||
'label' => __('% Agents enabled'),
|
||||
'perc' => $total_enabled_agents,
|
||||
'color' => '#1C4E6B',
|
||||
],
|
||||
'agents_disabled' => [
|
||||
];
|
||||
}
|
||||
|
||||
if ($total_disabled_agents > 0) {
|
||||
$data['agents_disabled'] = [
|
||||
'label' => __('% Agents disabled'),
|
||||
'perc' => $total_disabled_agents,
|
||||
'color' => '#5C63A2',
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
$bar = $this->printHorizontalBar($data);
|
||||
$output = html_print_div(
|
||||
|
@ -1859,6 +1859,30 @@ class Item extends CachedModel
|
||||
$save = array_merge($dataModelEncode, $dataEncode);
|
||||
|
||||
if (!empty($save['label'])) {
|
||||
// Multi-span problem with TinyMCE. Do not delete.
|
||||
$dom = new \DOMDocument();
|
||||
$dom->loadHTML(io_safe_output($save['label']));
|
||||
|
||||
// XPath object.
|
||||
$xpath = new \DOMXPath($dom);
|
||||
|
||||
// Find all span tags with style attribute.
|
||||
$span_nodes = $xpath->query('//span[@style]');
|
||||
|
||||
if ($span_nodes->length > 1) {
|
||||
$style = '';
|
||||
foreach ($span_nodes as $span) {
|
||||
$style .= $span->getAttribute('style');
|
||||
}
|
||||
|
||||
$last_span = $span_nodes[($span_nodes->length - 1)];
|
||||
|
||||
// Set style.
|
||||
$last_span->setAttribute('style', $style);
|
||||
|
||||
$save['label'] = io_safe_input($dom->saveHTML());
|
||||
}
|
||||
|
||||
$save['label'] = io_safe_output(io_safe_input(str_replace("'", "\'", $save['label'])));
|
||||
}
|
||||
|
||||
@ -2416,10 +2440,10 @@ class Item extends CachedModel
|
||||
foreach ($fields as $k => $v) {
|
||||
if (isset($v['id']) === true && isset($v['name']) === true) {
|
||||
// Modern environments use id-name format.
|
||||
$rs[$v['id']] = $v;
|
||||
$rs[$v['id']] = io_safe_output($v);
|
||||
} else {
|
||||
// In MC environments is key-value.
|
||||
$rs[$k] = $v;
|
||||
$rs[$k] = io_safe_output($v);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -180,11 +180,6 @@ form.flex-row div.filter_input.filter_input_switch .p-slider {
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
form .filter_input_not_search .p-switch {
|
||||
flex: 0 1 30px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
@ -225,6 +225,7 @@ div.graphs-div-main {
|
||||
/* height: 20px; */
|
||||
margin-bottom: 5px;
|
||||
display: flex;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
#droppable-graphs .droppable-zone {
|
||||
|
@ -265,7 +265,6 @@ div#welcome_modal_window .wizard #li-div_wizard_agent > div {
|
||||
}
|
||||
|
||||
div#welcome_modal_window .wizard #li-div_wizard_agent .select2-selection {
|
||||
background-color: #f6f7fb !important;
|
||||
border: 1px solid #c0ccdc !important;
|
||||
border-radius: 6px !important;
|
||||
width: 290px;
|
||||
|
@ -676,6 +676,10 @@ select:-internal-list-box {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.align-center-important {
|
||||
align-items: center !important;
|
||||
}
|
||||
|
||||
.relative {
|
||||
position: relative;
|
||||
}
|
||||
@ -943,6 +947,18 @@ select:-internal-list-box {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.flex-rr-sb {
|
||||
display: flex;
|
||||
flex-direction: row-reverse;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.flex-rr-sb-important {
|
||||
display: flex !important;
|
||||
flex-direction: row-reverse !important;
|
||||
justify-content: space-between !important;
|
||||
}
|
||||
|
||||
.flex-row-vcenter {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
@ -1956,7 +1972,7 @@ div.title_line {
|
||||
#menu_tab_frame_view_bc {
|
||||
position: sticky;
|
||||
top: 61px;
|
||||
z-index: 3;
|
||||
z-index: 2;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
@ -1986,6 +2002,7 @@ div.title_line {
|
||||
justify-content: space-between;
|
||||
overflow: hidden;
|
||||
margin-left: 20px;
|
||||
min-width: fit-content;
|
||||
}
|
||||
|
||||
.breadcrumbs_container {
|
||||
@ -2025,6 +2042,11 @@ div.title_line {
|
||||
margin: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
#menu_tab > ul.mn {
|
||||
display: inline-flex;
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
|
||||
#menu_tab .mn li {
|
||||
float: right;
|
||||
position: relative;
|
||||
@ -4040,7 +4062,7 @@ div.div_groups_status {
|
||||
min-height: 53px;
|
||||
}
|
||||
|
||||
#menu_tab li:hover {
|
||||
#menu_tab li:hover:not(.menu-dots-li) {
|
||||
box-shadow: inset 0px 4px var(--primary-color);
|
||||
}
|
||||
|
||||
@ -4082,6 +4104,11 @@ div.div_groups_status {
|
||||
border: 1px solid #e2e2e2;
|
||||
}
|
||||
|
||||
#agents_modules_table th:nth-child(1),
|
||||
#agents_modules_table td:nth-child(1) {
|
||||
max-width: 215px;
|
||||
}
|
||||
|
||||
.dashboard {
|
||||
top: 23px;
|
||||
}
|
||||
@ -4965,14 +4992,14 @@ div#dialog_messages table th:last-child {
|
||||
|
||||
#notification-wrapper {
|
||||
background: white;
|
||||
border: #a5a5a5 solid 1px;
|
||||
border: 1px solid #e5e9ed;
|
||||
z-index: 900000;
|
||||
position: absolute;
|
||||
width: 550px;
|
||||
margin-top: 55px;
|
||||
border-radius: 5px;
|
||||
max-height: 530px;
|
||||
border-radius: 8px;
|
||||
position: fixed;
|
||||
box-shadow: 0 3px 6px 0 rgba(0, 0, 0, 0.13);
|
||||
}
|
||||
|
||||
#notification-wrapper::before {
|
||||
@ -4980,29 +5007,38 @@ div#dialog_messages table th:last-child {
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 0px;
|
||||
height: 0;
|
||||
border-color: transparent;
|
||||
border-width: 12px;
|
||||
border-style: solid;
|
||||
bottom: 100%;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
bottom: calc(100% - 8px);
|
||||
left: calc(58% - 7px);
|
||||
margin-left: -12px;
|
||||
border-bottom-color: white;
|
||||
margin-left: -9px;
|
||||
border-left: 1px solid #e5e9ed;
|
||||
transform: rotate(45deg);
|
||||
border-left: 1px solid #e5e9ed;
|
||||
border-top: 1px solid #e5e9ed;
|
||||
background-color: var(--secondary-color);
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
#notification-wrapper-inner {
|
||||
max-height: 400px;
|
||||
#notification-wrapper-inner center {
|
||||
border-top: 1px solid #e5e9ed;
|
||||
}
|
||||
|
||||
.notifications-div {
|
||||
max-height: calc(100vh - 200px);
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.notifications-div::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#notification-wrapper-shadow {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background: #111;
|
||||
position: fixed;
|
||||
z-index: 9009;
|
||||
top: 0;
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
.notification-item {
|
||||
@ -5015,6 +5051,10 @@ div#dialog_messages table th:last-child {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.notification-item:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.notification-item > * {
|
||||
padding-left: 7px;
|
||||
pointer-events: none;
|
||||
@ -10560,7 +10600,7 @@ button.submitButton:active {
|
||||
border: 2px solid #57ea82;
|
||||
}
|
||||
|
||||
button.buttonButton > div,
|
||||
button.buttonButton > div:not(.unset),
|
||||
button.submitButton > div {
|
||||
background-color: #fff;
|
||||
width: 2rem;
|
||||
@ -12649,11 +12689,12 @@ form.cfv_status_agent input:checked + label:before {
|
||||
|
||||
.notificaion_menu_container {
|
||||
display: flex;
|
||||
padding-top: 10px;
|
||||
padding-left: 15px;
|
||||
}
|
||||
.notification_menu {
|
||||
width: 100px;
|
||||
padding: 10px 15px;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #e5e9ed;
|
||||
}
|
||||
|
||||
.filter_notification {
|
||||
@ -13727,6 +13768,12 @@ button.disabled {
|
||||
}
|
||||
|
||||
/* Dot tab */
|
||||
#menu_tab li.nomn.menu-dots-li:hover a {
|
||||
color: var(--text-color);
|
||||
padding: 5px 15px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#menu_dots {
|
||||
margin-left: 10px;
|
||||
}
|
||||
@ -13763,6 +13810,7 @@ button.disabled {
|
||||
top: 20px;
|
||||
right: -20px;
|
||||
padding: 0px 10px 10px 10px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.dot-tab-menu {
|
||||
@ -13773,7 +13821,10 @@ button.disabled {
|
||||
min-height: 20px;
|
||||
box-shadow: 0 3px 6px 0 rgba(0, 0, 0, 0.13);
|
||||
padding: 10px 0px;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
display: none;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.dot-tab:hover .dot-tab-menu {
|
||||
@ -13786,6 +13837,7 @@ button.disabled {
|
||||
padding: 5px 15px;
|
||||
display: block;
|
||||
white-space: nowrap;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.dot-tab-menu a:hover {
|
||||
@ -13794,6 +13846,11 @@ button.disabled {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.dot-tab-menu .dot-tab-link {
|
||||
max-height: calc(100vh - (60px + 49px + 65px + 15px));
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.dot-tab-menu .dot-tab-link > a {
|
||||
font-weight: 900;
|
||||
color: black;
|
||||
@ -13804,3 +13861,38 @@ button.disabled {
|
||||
margin-top: 10px;
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
.menu-dots-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.menu-dots-show {
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
.tabs-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tabs-show {
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
.white_table_graph > div {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.link-bold {
|
||||
color: var(--primary-color);
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.link-bold:hover {
|
||||
opacity: 0.9;
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
.text-nowrap {
|
||||
text-wrap: nowrap;
|
||||
}
|
||||
|
@ -38,7 +38,8 @@ ul.subsubmenu li,
|
||||
input.search_input,
|
||||
.filters input,
|
||||
input#text-id_parent.ac_input,
|
||||
input:not(div.login_pass > input):not(div.login_nick > input),
|
||||
input:not(div.login_pass > input):not(div.login_nick
|
||||
> input):not([src$=".svg"]),
|
||||
textarea,
|
||||
select,
|
||||
.edit_user_comments #textarea_comments,
|
||||
@ -1885,3 +1886,9 @@ a.pandora_pagination,
|
||||
#score-bar .labels-bar div {
|
||||
color: white;
|
||||
}
|
||||
|
||||
a.link-bold {
|
||||
color: var(--primary-color) !important;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
@ -76,7 +76,7 @@
|
||||
position: absolute;
|
||||
left: -100000px;
|
||||
width: 100%;
|
||||
z-index: 1051;
|
||||
z-index: 1118;
|
||||
}
|
||||
.select2-results {
|
||||
display: block;
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -131,7 +131,7 @@
|
||||
<div style='padding-bottom: 50px'>
|
||||
<?php
|
||||
$version = '7.0NG.776';
|
||||
$build = '240320';
|
||||
$build = '240401';
|
||||
$banner = "v$version Build $build";
|
||||
error_reporting(0);
|
||||
|
||||
|
@ -493,6 +493,11 @@ if (is_metaconsole() === false) {
|
||||
['type' => 'form_action']
|
||||
);
|
||||
}
|
||||
} else {
|
||||
html_print_action_buttons(
|
||||
'',
|
||||
['type' => 'form_action']
|
||||
);
|
||||
}
|
||||
} else {
|
||||
echo "<form method='post' action='index.php?sec=galertas&sec2=godmode/alerts/alert_list&tab=builder&pure=0'>";
|
||||
|
@ -333,7 +333,7 @@ $table->data['group'][0] = html_print_label_input_block(
|
||||
true,
|
||||
'group_id',
|
||||
$group_id,
|
||||
'this.form.submit()',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
@ -361,7 +361,7 @@ $table->data['group'][1] = html_print_label_input_block(
|
||||
$fields,
|
||||
'status',
|
||||
$status,
|
||||
'this.form.submit()',
|
||||
'',
|
||||
__('All'),
|
||||
AGENT_STATUS_ALL,
|
||||
true,
|
||||
@ -430,13 +430,14 @@ if (function_exists('policies_get_policies') === true) {
|
||||
}
|
||||
}
|
||||
|
||||
if (enterprise_installed() === true) {
|
||||
$table->data[2][1] = html_print_label_input_block(
|
||||
__('Policies'),
|
||||
html_print_select(
|
||||
$fields,
|
||||
'policies',
|
||||
$policies,
|
||||
'this.form.submit()',
|
||||
'',
|
||||
__('All'),
|
||||
0,
|
||||
true,
|
||||
@ -447,6 +448,7 @@ $table->data[2][1] = html_print_label_input_block(
|
||||
'width: 100%'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$custom_fields = db_get_all_fields_in_table('tagent_custom_fields');
|
||||
if ($custom_fields === false) {
|
||||
|
@ -142,7 +142,7 @@ if (empty($agent['os_version']) !== true) {
|
||||
$table_status->data['agent_os_version'][1] = $os_agent_text;
|
||||
}
|
||||
|
||||
$addresses = agents_get_addresses($id_agente);
|
||||
$addresses = agents_get_addresses($id_agente, true);
|
||||
$address = agents_get_address($id_agente);
|
||||
|
||||
foreach ($addresses as $k => $add) {
|
||||
@ -154,8 +154,30 @@ foreach ($addresses as $k => $add) {
|
||||
if (empty($address) === false) {
|
||||
$address_text = '<span class="bolder" >'.$address.'</span>';
|
||||
if (!empty($addresses) === true) {
|
||||
foreach ($addresses as $sec_address) {
|
||||
$address_text .= '<br/><span class="italic">'.$sec_address.'</span>';
|
||||
if (count($addresses) > 3) {
|
||||
$address_text .= '  <span id="deploy_sec_ips_down">'.html_print_image(
|
||||
'images/sort_down_black.png',
|
||||
true,
|
||||
['alt' => 'down']
|
||||
).'</span><span id="deploy_sec_ips_up" style="display: none;">'.html_print_image(
|
||||
'images/sort_up_black.png',
|
||||
true,
|
||||
['alt' => 'up']
|
||||
).'</span>';
|
||||
$address_text .= '<div id="secondary_ips" class="invisible">';
|
||||
}
|
||||
|
||||
$first_key = key($addresses);
|
||||
foreach ($addresses as $key => $sec_address) {
|
||||
if ($first_key !== $key || count($addresses) <= 3) {
|
||||
$address_text .= '<br/>';
|
||||
}
|
||||
|
||||
$address_text .= '<span class="italic">'.$sec_address.'</span>';
|
||||
}
|
||||
|
||||
if (count($addresses) > 3) {
|
||||
$address_text .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -638,3 +660,23 @@ if (isset($table_interface) === true) {
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready (function () {
|
||||
$('#deploy_sec_ips_up').on('click', function() {
|
||||
$('#secondary_ips').hide();
|
||||
// Avoid setting display block property with show/hide methods.
|
||||
$('#deploy_sec_ips_up').css('display', 'none');
|
||||
$('#deploy_sec_ips_down').css('display', '');
|
||||
});
|
||||
|
||||
$('#deploy_sec_ips_down').on('click', function() {
|
||||
$('#secondary_ips').show();
|
||||
// Avoid setting display block property with show/hide methods.
|
||||
$('#deploy_sec_ips_down').css('display', 'none');
|
||||
$('#deploy_sec_ips_up').css('display', '');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
@ -187,22 +187,18 @@ if (empty($modules)) {
|
||||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox filters';
|
||||
$table->class = 'databox filters filter-table-adv';
|
||||
|
||||
$table->style[0] = 'font-weight: bolder; text-align: left;';
|
||||
$table->size[0] = '10%';
|
||||
$table->style[1] = 'font-weight: bolder; text-align: left;';
|
||||
$table->size[1] = '15%';
|
||||
$table->style[2] = 'font-weight: bolder; text-align: left;';
|
||||
$table->size[2] = '10%';
|
||||
$table->style[3] = 'font-weight: bolder; text-align: left;';
|
||||
$table->size[3] = '20%';
|
||||
$table->size[0] = '50%';
|
||||
$table->size[1] = '25%';
|
||||
$table->size[2] = '25%';
|
||||
|
||||
$table->rowspan[0][0] = 7;
|
||||
$table->rowspan[0][1] = 7;
|
||||
|
||||
$table->data[0][0] = __('Modules');
|
||||
$table->data[0][1] = html_print_select(
|
||||
$table->rowspan[0][0] = 3;
|
||||
|
||||
$table->data[0][0] = html_print_label_input_block(
|
||||
__('Modules'),
|
||||
html_print_select(
|
||||
$list_modules,
|
||||
'modules[]',
|
||||
$modules,
|
||||
@ -214,26 +210,32 @@ $table->data[0][1] = html_print_select(
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'min-width:200px;max-width:460px;height: 200px;'
|
||||
'min-width: 200px; max-width: 100%; width: 100%; height: 194px;'
|
||||
)
|
||||
);
|
||||
|
||||
$table->rowspan[2][0] = 7;
|
||||
$table->data[2][0] = '';
|
||||
|
||||
$table->data[2][1] = __('Begin date');
|
||||
$table->data[2][2] = html_print_input_text('start_date', substr($start_date, 0, 10), '', 10, 40, true);
|
||||
$table->data[2][2] .= html_print_image(
|
||||
$table->data[0][1] = html_print_label_input_block(
|
||||
__('Begin date'),
|
||||
'<div class="flex-row-center">'.html_print_input_text(
|
||||
'start_date',
|
||||
substr($start_date, 0, 10),
|
||||
'',
|
||||
10,
|
||||
40,
|
||||
true
|
||||
).html_print_image(
|
||||
'images/calendar_view_day.png',
|
||||
true,
|
||||
[
|
||||
'class' => 'invert_filter',
|
||||
'onclick' => "scwShow(scwID('text-start_date'),this);",
|
||||
]
|
||||
).'</div>'
|
||||
);
|
||||
|
||||
$table->data[3][1] = __('Time range');
|
||||
|
||||
$table->data[3][2] = html_print_extended_select_for_time(
|
||||
$table->data[0][2] = html_print_label_input_block(
|
||||
__('Time range'),
|
||||
html_print_extended_select_for_time(
|
||||
'period',
|
||||
$period,
|
||||
'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||
@ -251,20 +253,29 @@ $table->data[3][2] = html_print_extended_select_for_time(
|
||||
0,
|
||||
null,
|
||||
'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')'
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[1][1] = html_print_label_input_block(
|
||||
__('Show events'),
|
||||
html_print_checkbox('draw_events', 1, (bool) $draw_events, true)
|
||||
);
|
||||
|
||||
$table->data[1][2] = html_print_label_input_block(
|
||||
__('Show alerts').ui_print_help_tip(__('the combined graph does not show the alerts into this graph'), true),
|
||||
html_print_checkbox('draw_alerts', 1, (bool) $draw_alerts, true)
|
||||
);
|
||||
|
||||
$table->data[4][2] = __('Show events');
|
||||
$table->data[4][3] = html_print_checkbox('draw_events', 1, (bool) $draw_events, true);
|
||||
$table->data[5][2] = __('Show alerts').ui_print_help_tip(__('the combined graph does not show the alerts into this graph'), true);
|
||||
$table->data[5][3] = html_print_checkbox('draw_alerts', 1, (bool) $draw_alerts, true);
|
||||
$table->data[6][2] = __('Show as one combined graph');
|
||||
$graph_option_one_or_several = [
|
||||
0 => __('several graphs for each module'),
|
||||
1 => __('One combined graph'),
|
||||
];
|
||||
$table->data[6][3] = html_print_select($graph_option_one_or_several, 'combined', $combined, '', '', 1, true);
|
||||
|
||||
$table->data[7][2] = __('Chart type');
|
||||
$table->data[2][1] = html_print_label_input_block(
|
||||
__('Show as one combined graph'),
|
||||
html_print_select($graph_option_one_or_several, 'combined', $combined, '', '', 1, true)
|
||||
);
|
||||
|
||||
if ($combined == 1) {
|
||||
$graph_option_type = [
|
||||
0 => __('Area'),
|
||||
@ -279,7 +290,10 @@ if ($combined == 1) {
|
||||
];
|
||||
}
|
||||
|
||||
$table->data[7][3] = html_print_select($graph_option_type, 'option_type', $option_type, '', '', 1, true);
|
||||
$table->data[2][2] = html_print_label_input_block(
|
||||
__('Chart type'),
|
||||
html_print_select($graph_option_type, 'option_type', $option_type, '', '', 1, true)
|
||||
);
|
||||
|
||||
$htmlForm = '<form method="post" action="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=graphs&id_agente='.$id_agente.'" >';
|
||||
$htmlForm .= html_print_table($table, true);
|
||||
|
@ -597,6 +597,7 @@ function print_table(
|
||||
} else {
|
||||
foreach ($all_interfaces as $key => $value) {
|
||||
// Filter interfaces array.
|
||||
if (empty($selected_interfaces) === false && in_array('', $selected_interfaces) === false) {
|
||||
$filtered_interfaces[$key] = array_filter(
|
||||
$value,
|
||||
function ($interface) use ($selected_interfaces) {
|
||||
@ -606,6 +607,9 @@ function print_table(
|
||||
);
|
||||
}
|
||||
);
|
||||
} else {
|
||||
$filtered_interfaces = $all_interfaces;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user