Merge branch 'develop' into 'ent-11117-edicion-usuario-entorno-meta-nodo'

# Conflicts:
#   pandora_console/extras/mr/64.sql
#   pandora_console/godmode/users/user_management.php
This commit is contained in:
Miguel Angel Rasteu 2023-05-19 10:25:31 +00:00
commit 5470e4d749
160 changed files with 26810 additions and 23526 deletions

View File

@ -82,6 +82,10 @@ check_root_permissions () {
## Main
echo "Starting PandoraFMS External DB deployment EL8 ver. $S_VERSION"
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 grep is not detected on the system, grep 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"

View File

@ -89,6 +89,9 @@ check_root_permissions () {
## Main
echo "Starting PandoraFMS External DB deployment Ubuntu 22.04 ver. $S_VERSION"
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 grep is not detected on the system, grep tool is needed for installation.'; exit -1 ;fi
# Ubuntu Version
if [ ! "$(grep -Ei 'Ubuntu' /etc/lsb-release)" ]; then
printf "\n ${red}Error this is not a Ubuntu system, this installer is compatible with Ubuntu systems only${reset}\n"

View File

@ -1,12 +1,19 @@
#!/bin/bash
#export PANDORA_SERVER_IP='newdemos.artica.es' && curl -sSL http://firefly.artica.es/projects/pandora_deploy_agent.sh | bash
#export PANDORA_SERVER_IP='newdemos.artica.es' && curl -sSL http://firefly.pandorafms.com/projects/pandora_deploy_agent.sh | bash
# define variables
PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
S_VERSION='2022052301'
S_VERSION='2023050901'
LOGFILE="/tmp/pandora-agent-deploy-$(date +%F).log"
#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"
@ -49,7 +56,7 @@ check_cmd_status () {
}
check_repo_connection () {
execute_cmd "ping -c 2 firefly.artica.es" "Checking Community repo"
execute_cmd "ping -c 2 firefly.pandorafms.com" "Checking Community repo"
}
check_root_permissions () {
@ -73,7 +80,7 @@ cd unix && ./pandora_agent_installer --install
install_autodiscover () {
local arch=$1
wget http://firefly.artica.es/projects/autodiscover-linux.zip
wget http://firefly.pandorafms.com/projects/autodiscover-linux.zip
unzip autodiscover-linux.zip
chmod +x $arch/autodiscover
mv -f $arch/autodiscover /etc/pandora/plugins/autodiscover
@ -84,6 +91,9 @@ echo "Starting PandoraFMS Agent deployment ver. $S_VERSION"
execute_cmd "[ $PANDORA_SERVER_IP ]" 'Check Server IP Address' 'Please define env variable PANDORA_SERVER_IP'
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
#Detect OS
os_name=$(grep ^PRETTY_NAME= /etc/os-release | cut -d '=' -f2 | tr -d '"')
execute_cmd "echo $os_name" "OS detected: ${os_name}"
@ -148,7 +158,7 @@ if [[ $OS_RELEASE =~ 'rhel' ]] || [[ $OS_RELEASE =~ 'fedora' ]]; then
echo -e "${cyan}Installing agent dependencies...${reset}" ${green}OK${reset}
# Insatall pandora agent
$package_manager_cmd install -y http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm &>> $LOGFILE
$package_manager_cmd install -y http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm &>> $LOGFILE
echo -en "${cyan}Installing Pandora FMS agent...${reset}"
check_cmd_status 'Error installing Pandora FMS agent'
[[ $PANDORA_AGENT_SSL ]] && execute_cmd "$package_manager_cmd install -y perl-IO-Socket-SSL" "Installing SSL libraries for encrypted connection"
@ -158,7 +168,7 @@ fi
if [[ $OS_RELEASE == 'debian' ]]; then
execute_cmd "apt update" 'Updating repos'
execute_cmd "apt install -y perl wget curl unzip procps python3 python3-pip" 'Installing agent dependencies'
execute_cmd 'wget http://firefly.artica.es/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.tar.gz' 'Downloading Pandora FMS agent package'
execute_cmd 'wget http://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.tar.gz' 'Downloading Pandora FMS agent package'
execute_cmd 'install_tarball pandorafms_agent_linux-7.0NG.tar.gz' 'Installing Pandora FMS agent'
[[ $PANDORA_AGENT_SSL ]] && execute_cmd 'apt install -y libio-socket-ssl-perl' "Installing SSL libraries for encrypted connection"
cd $HOME/pandora_deploy_tmp
@ -204,4 +214,4 @@ execute_cmd '/etc/init.d/pandora_agent_daemon restart' 'Starting Pandora Agent'
cd
execute_cmd 'rm -rf $HOME/pandora_deploy_tmp' 'Cleaning up temporay files'
echo -e "${green}PandoraFMS Agent installed and running, sending data to: $PANDORA_SERVER_IP${reset}"
echo -e "${green}PandoraFMS Agent installed and running, sending data to: $PANDORA_SERVER_IP${reset}"

View File

@ -11,7 +11,7 @@ PANDORA_SERVER_CONF=/etc/pandora/pandora_server.conf
PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
S_VERSION='202304111'
S_VERSION='2023050901'
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
# define default variables
@ -31,6 +31,13 @@ LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
[ "$PANDORA_BETA" ] || PANDORA_BETA=0
[ "$PANDORA_LTS" ] || PANDORA_LTS=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"
@ -85,7 +92,7 @@ check_pre_pandora () {
}
check_repo_connection () {
execute_cmd "ping -c 2 firefly.artica.es" "Checking Community repo"
execute_cmd "ping -c 2 firefly.pandorafms.com" "Checking Community repo"
execute_cmd "ping -c 2 support.pandorafms.com" "Checking Enterprise repo"
}
@ -105,6 +112,12 @@ check_root_permissions () {
## Main
echo "Starting PandoraFMS Community deployment 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 -i centos /etc/redhat-release)" ]; then
printf "${red}Error this is not a Centos Base system, this installer is compatible with Centos systems only${reset}\n"
@ -118,7 +131,7 @@ os_name=$(grep ^PRETTY_NAME= /etc/os-release | cut -d '=' -f2 | tr -d '"')
execute_cmd "echo $os_name" "OS detected: ${os_name}"
echo -en "${cyan}Check Centos Version...${reset}"
[ $(sed -nr 's/VERSION_ID+=\s*"([0-9])"$/\1/p' /etc/os-release) -eq '7' ]
[[ $(sed -nr 's/VERSION_ID+=\s*"([0-9])"$/\1/p' /etc/os-release) -eq '7' ]]
check_cmd_status 'Error OS version, Centos 7 is expected'
# initialice logfile
@ -273,7 +286,7 @@ console_dependencies=" \
libzstd \
openldap-clients \
chromium \
http://firefly.artica.es/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm"
http://firefly.pandorafms.com/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm"
execute_cmd "yum install -y $console_dependencies" "Installing Pandora FMS Console dependencies"
# Server dependencies
@ -300,8 +313,9 @@ server_dependencies=" \
bind-utils \
whois \
cpanminus \
http://firefly.artica.es/centos7/wmic-1.4-1.el7.x86_64.rpm \
https://firefly.artica.es/centos7/pandorawmic-1.0.0-1.x86_64.rpm"
http://firefly.pandorafms.com/centos7/xprobe2-0.3-12.2.x86_64.rpm \
http://firefly.pandorafms.com/centos7/wmic-1.4-1.el7.x86_64.rpm \
https://firefly.pandorafms.com/centos7/pandorawmic-1.0.0-1.x86_64.rpm"
execute_cmd "yum install -y $server_dependencies" "Installing Pandora FMS Server dependencies"
# install cpan dependencies
@ -310,13 +324,13 @@ execute_cmd "cpanm -i Thread::Semaphore" "Installing Thread::Semaphore"
# SDK VMware perl dependencies
vmware_dependencies=" \
http://firefly.artica.es/centos8/VMware-vSphere-Perl-SDK-6.5.0-4566394.x86_64.rpm \
http://firefly.pandorafms.com/centos8/VMware-vSphere-Perl-SDK-6.5.0-4566394.x86_64.rpm \
perl-JSON \
perl-Archive-Zip \
openssl-devel \
perl-Crypt-CBC \
perl-Digest-SHA \
http://firefly.artica.es/centos7/perl-Crypt-OpenSSL-AES-0.02-1.el7.x86_64.rpm"
http://firefly.pandorafms.com/centos7/perl-Crypt-OpenSSL-AES-0.02-1.el7.x86_64.rpm"
execute_cmd "yum install -y $vmware_dependencies" "Installing SDK VMware perl dependencies"
# Instant client Oracle
@ -327,6 +341,7 @@ execute_cmd "yum install -y $oracle_dependencies || yum reinstall -y $oracle_dep
#ipam dependencies
ipam_dependencies=" \
http://firefly.pandorafms.com/centos7/xprobe2-0.3-12.2.x86_64.rpm \
perl(NetAddr::IP) \
perl(Sys::Syslog) \
perl(DBI) \
@ -449,20 +464,20 @@ export MYSQL_PWD=$DBPASS
#Define packages
#Define packages
if [ "$PANDORA_LTS" -eq '1' ] ; then
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_server-7.0NG.noarch.rpm"
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_console-7.0NG.noarch.rpm"
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_agent_linux-7.0NG.noarch.rpm"
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_server-7.0NG.noarch.rpm"
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_console-7.0NG.noarch.rpm"
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_agent_linux-7.0NG.noarch.rpm"
elif [ "$PANDORA_LTS" -ne '1' ] ; then
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_server-7.0NG.noarch.rpm"
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_console-7.0NG.noarch.rpm"
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm"
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_server-7.0NG.noarch.rpm"
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_console-7.0NG.noarch.rpm"
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm"
fi
# if beta is enable
if [ "$PANDORA_BETA" -eq '1' ] ; then
PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_server-latest.x86_64.rpm"
PANDORA_CONSOLE_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_console-latest.noarch.rpm"
PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm"
PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_server-latest.x86_64.rpm"
PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_console-latest.noarch.rpm"
PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm"
fi
# Downloading Pandora Packages
@ -615,7 +630,16 @@ net.core.optmem_max = 81920
EO_KO
[ -d /dev/lxd/ ] || execute_cmd "sysctl --system" "Applying Kernel optimization"
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
@ -702,7 +726,7 @@ cat > /etc/issue.net << EOF_banner
Welcome to Pandora FMS appliance on CentOS
------------------------------------------
Go to Public http://$ipplublic/pandora_console$to to login web console
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
@ -723,4 +747,4 @@ execute_cmd "rm -rf $HOME/pandora_deploy_tmp" "Removing temporary files"
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"}'
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"}'

View File

@ -14,7 +14,7 @@ PANDORA_SERVER_CONF=/etc/pandora/pandora_server.conf
PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
S_VERSION='202304111'
S_VERSION='2023050901'
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
# define default variables
@ -35,10 +35,18 @@ LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
[ "$PANDORA_LTS" ] || PANDORA_LTS=1
[ "$PANDORA_BETA" ] || PANDORA_BETA=0
#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
@ -90,7 +98,7 @@ check_pre_pandora () {
}
check_repo_connection () {
execute_cmd "ping -c 2 firefly.artica.es" "Checking Community repo"
execute_cmd "ping -c 2 firefly.pandorafms.com" "Checking Community repo"
execute_cmd "ping -c 2 support.pandorafms.com" "Checking Enterprise repo"
}
@ -121,6 +129,12 @@ installing_docker () {
## 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"
@ -129,8 +143,8 @@ fi
echo -en "${cyan}Check Centos Version...${reset}"
[ $(sed -nr 's/VERSION_ID+=\s*"([0-9]).*"$/\1/p' /etc/os-release) -eq '8' ]
check_cmd_status 'Error OS version, RHEL/Almalinux/Centos/Rockylinux 8+ is expected'
[[ $(sed -nr 's/VERSION_ID+=\s*"([0-9]).*"$/\1/p' /etc/os-release) -eq '8' ]]
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 '"')
@ -327,11 +341,11 @@ console_dependencies=" \
mod_ssl \
libzstd \
openldap-clients \
http://firefly.artica.es/centos8/chromium-110.0.5481.177-1.el7.x86_64.rpm \
http://firefly.artica.es/centos8/chromium-common-110.0.5481.177-1.el7.x86_64.rpm \
http://firefly.artica.es/centos8/perl-Net-Telnet-3.04-1.el8.noarch.rpm \
http://firefly.artica.es/centos7/wmic-1.4-1.el7.x86_64.rpm \
http://firefly.artica.es/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm"
http://firefly.pandorafms.com/centos8/chromium-110.0.5481.177-1.el7.x86_64.rpm \
http://firefly.pandorafms.com/centos8/chromium-common-110.0.5481.177-1.el7.x86_64.rpm \
http://firefly.pandorafms.com/centos8/perl-Net-Telnet-3.04-1.el8.noarch.rpm \
http://firefly.pandorafms.com/centos7/wmic-1.4-1.el7.x86_64.rpm \
http://firefly.pandorafms.com/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm"
execute_cmd "dnf install -y $console_dependencies" "Installing Pandora FMS Console dependencies"
# Server dependencies
@ -357,8 +371,9 @@ server_dependencies=" \
java \
bind-utils \
whois \
http://firefly.artica.es/centos7/wmic-1.4-1.el7.x86_64.rpm \
https://firefly.artica.es/centos8/pandorawmic-1.0.0-1.x86_64.rpm"
http://firefly.pandorafms.com/centos7/xprobe2-0.3-12.2.x86_64.rpm \
http://firefly.pandorafms.com/centos7/wmic-1.4-1.el7.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"
# SDK VMware perl dependencies
@ -372,8 +387,8 @@ vmware_dependencies=" \
perl-Math-Random-ISAAC \
perl-JSON \
perl-Crypt-SSLeay \
http://firefly.artica.es/centos8/perl-Crypt-OpenSSL-AES-0.02-1.el8.x86_64.rpm \
http://firefly.artica.es/centos8/VMware-vSphere-Perl-SDK-6.5.0-4566394.x86_64.rpm"
http://firefly.pandorafms.com/centos8/perl-Crypt-OpenSSL-AES-0.02-1.el8.x86_64.rpm \
http://firefly.pandorafms.com/centos8/VMware-vSphere-Perl-SDK-6.5.0-4566394.x86_64.rpm"
execute_cmd "dnf install -y $vmware_dependencies" "Installing SDK VMware perl dependencies"
# Instant client Oracle
@ -384,6 +399,7 @@ execute_cmd "dnf install -y $oracle_dependencies" "Installing Oracle Instant cli
#ipam dependencies
ipam_dependencies=" \
http://firefly.pandorafms.com/centos7/xprobe2-0.3-12.2.x86_64.rpm \
perl(NetAddr::IP) \
perl(Sys::Syslog) \
perl(DBI) \
@ -505,20 +521,20 @@ export MYSQL_PWD=$DBPASS
#Define packages
if [ "$PANDORA_LTS" -eq '1' ] ; then
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_server-7.0NG.noarch.rpm"
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_console-7.0NG.noarch.rpm"
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_agent_linux-7.0NG.noarch.rpm"
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_server-7.0NG.noarch.rpm"
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_console-7.0NG.noarch.rpm"
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_agent_linux-7.0NG.noarch.rpm"
elif [ "$PANDORA_LTS" -ne '1' ] ; then
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_server-7.0NG.noarch.rpm"
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_console-7.0NG.noarch.rpm"
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm"
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_server-7.0NG.noarch.rpm"
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_console-7.0NG.noarch.rpm"
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm"
fi
# if beta is enable
if [ "$PANDORA_BETA" -eq '1' ] ; then
PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_server-latest.x86_64.rpm"
PANDORA_CONSOLE_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_console-latest.noarch.rpm"
PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm"
PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_server-latest.x86_64.rpm"
PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_console-latest.noarch.rpm"
PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm"
fi
# Downloading Pandora Packages
@ -652,6 +668,9 @@ EOF_ENV
# 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
@ -678,7 +697,17 @@ net.core.optmem_max = 81920
EO_KO
[ -d /dev/lxd/ ] || execute_cmd "sysctl --system" "Applying Kernel optimization"
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
@ -765,7 +794,7 @@ cat > /etc/issue.net << EOF_banner
Welcome to Pandora FMS appliance on RHEL/Rocky Linux 8
------------------------------------------
Go to Public http://$ipplublic/pandora_console$to to login web console
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
@ -786,4 +815,4 @@ execute_cmd "rm -rf $HOME/pandora_deploy_tmp" "Removing temporary files"
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"}'
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"}'

View File

@ -17,7 +17,7 @@ PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
WORKDIR=/opt/pandora/deploy
S_VERSION='202304181'
S_VERSION='2023050901'
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
rm -f $LOGFILE &> /dev/null # remove last log before start
@ -37,6 +37,12 @@ rm -f $LOGFILE &> /dev/null # remove last log before start
[ "$PANDORA_BETA" ] || PANDORA_BETA=0
[ "$PANDORA_LTS" ] || PANDORA_LTS=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"
@ -90,7 +96,7 @@ check_pre_pandora () {
}
check_repo_connection () {
execute_cmd "ping -c 2 firefly.artica.es" "Checking Community repo"
execute_cmd "ping -c 2 firefly.pandorafms.com" "Checking Community repo"
execute_cmd "ping -c 2 support.pandorafms.com" "Checking Enterprise repo"
}
@ -125,6 +131,12 @@ installing_docker () {
## Main
echo "Starting PandoraFMS Community deployment Ubuntu 22.04 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
# Ubuntu Version
if [ ! "$(grep -Ei 'Ubuntu' /etc/lsb-release)" ]; then
printf "\n ${red}Error this is not a Ubuntu system, this installer is compatible with Ubuntu systems only${reset}\n"
@ -133,7 +145,7 @@ fi
echo -en "${cyan}Check Ubuntu Version...${reset}"
[ $(sed -nr 's/VERSION_ID+=\s*"([0-9][0-9].[0-9][0-9])"$/\1/p' /etc/os-release) == "22.04" ]
[[ $(sed -nr 's/VERSION_ID+=\s*"([0-9][0-9].[0-9][0-9])"$/\1/p' /etc/os-release) == "22.04" ]]
check_cmd_status 'Error OS version, Ubuntu 22.04 is expected'
#Detect OS
@ -253,6 +265,7 @@ server_dependencies=" \
openssh-client \
postfix \
unzip \
xprobe \
coreutils \
libio-compress-perl \
libmoosex-role-timer-perl \
@ -280,8 +293,8 @@ execute_cmd "apt install -y $server_dependencies" "Installing Pandora FMS Server
execute_cmd "installing_docker" "Installing Docker for debug"
# wmic and pandorawmic
execute_cmd "curl -O https://firefly.artica.es/pandorafms/utils/bin/wmic" "Downloading wmic"
execute_cmd "curl -O https://firefly.artica.es/pandorafms/utils/bin/pandorawmic" "Downloading pandorawmic"
execute_cmd "curl -O https://firefly.pandorafms.com/pandorafms/utils/bin/wmic" "Downloading wmic"
execute_cmd "curl -O https://firefly.pandorafms.com/pandorafms/utils/bin/pandorawmic" "Downloading pandorawmic"
echo -en "${cyan}Installing wmic and pandorawmic...${reset}"
chmod +x pandorawmic wmic &>> "$LOGFILE" && \
cp -a wmic /usr/bin/ &>> "$LOGFILE" && \
@ -292,7 +305,7 @@ check_cmd_status "Error Installing phanromjs"
echo -en "${cyan}Installing phantomjs...${reset}"
export PHANTOM_JS="phantomjs-2.1.1-linux-x86_64"
export OPENSSL_CONF=/etc/ssl
curl -LSs -O "https://firefly.artica.es/pandorafms/utils/$PHANTOM_JS.tar.bz2" &>> "$LOGFILE" && \
curl -LSs -O "https://firefly.pandorafms.com/pandorafms/utils/$PHANTOM_JS.tar.bz2" &>> "$LOGFILE" && \
tar xvjf "$PHANTOM_JS.tar.bz2" &>> "$LOGFILE" && \
mv $PHANTOM_JS/bin/phantomjs /usr/bin &>> "$LOGFILE" && \
/usr/bin/phantomjs --version &>> "$LOGFILE"
@ -322,7 +335,7 @@ vmware_dependencies="\
libsoap-lite-perl \
libmodule-build-perl"
execute_cmd "apt install -y $vmware_dependencies" "Installing VMware SDK dependencies"
execute_cmd "wget https://firefly.artica.es/pandorafms/utils/VMware-vSphere-Perl-SDK-7.0.0-16453907.x86_64.tar.gz" "Downloading VMware SDK"
execute_cmd "wget https://firefly.pandorafms.com/pandorafms/utils/VMware-vSphere-Perl-SDK-7.0.0-16453907.x86_64.tar.gz" "Downloading VMware SDK"
echo -en "${cyan}Installing VMware SDK...${reset}"
tar xvzf VMware-vSphere-Perl-SDK-7.0.0-16453907.x86_64.tar.gz &>> "$LOGFILE"
cd vmware-vsphere-cli-distrib/ &>> "$LOGFILE"
@ -357,6 +370,7 @@ source '/root/.profile' &>> "$LOGFILE"
#ipam dependencies
ipam_dependencies=" \
xprobe \
libnetaddr-ip-perl \
coreutils \
libdbd-mysql-perl \
@ -456,19 +470,19 @@ execute_cmd "systemctl restart mysql" "Configuring and restarting database engin
#Define packages
if [ "$PANDORA_LTS" -eq '1' ] ; then
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandorafms/latest/Tarball/LTS/pandorafms_server-7.0NG.tar.gz"
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.artica.es/pandorafms/latest/Tarball/LTS/pandorafms_console-7.0NG.tar.gz"
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/Tarball/LTS/pandorafms_agent_linux-7.0NG.tar.gz"
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/LTS/pandorafms_server-7.0NG.tar.gz"
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/LTS/pandorafms_console-7.0NG.tar.gz"
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/LTS/pandorafms_agent_linux-7.0NG.tar.gz"
elif [ "$PANDORA_LTS" -ne '1' ] ; then
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandorafms/latest/Tarball/pandorafms_server-7.0NG.tar.gz"
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.artica.es/pandorafms/latest/Tarball/pandorafms_console-7.0NG.tar.gz"
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.tar.gz"
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_server-7.0NG.tar.gz"
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_console-7.0NG.tar.gz"
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.tar.gz"
fi
if [ "$PANDORA_BETA" -eq '1' ] ; then
PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_server-latest_x86_64.tar.gz"
PANDORA_CONSOLE_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_console-latest.tar.gz"
PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.tar.gz"
PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_server-latest_x86_64.tar.gz"
PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_console-latest.tar.gz"
PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.tar.gz"
fi
# Downloading Pandora Packages
@ -679,7 +693,16 @@ net.core.optmem_max = 81920
EO_KO
[ -d /dev/lxd/ ] || execute_cmd "sysctl --system" "Applying Kernel optimization"
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
@ -776,7 +799,7 @@ cat > /etc/issue.net << EOF_banner
Welcome to Pandora FMS appliance on Ubuntu
------------------------------------------
Go to Public http://$ipplublic/pandora_console$to to login web console
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
@ -797,4 +820,4 @@ execute_cmd "rm -rf $WORKDIR" "Removing temporary files"
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"}'
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"}'

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.770, AIX version
# Version 7.0NG.771, AIX version
# Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.770, FreeBSD Version
# Version 7.0NG.771, FreeBSD Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.770, HP-UX Version
# Version 7.0NG.771, HP-UX Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.770, GNU/Linux
# Version 7.0NG.771, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.770, GNU/Linux
# Version 7.0NG.771, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.770, Solaris Version
# Version 7.0NG.771, Solaris Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,6 +1,6 @@
# Base config file for Pandora FMS Windows Agent
# (c) 2006-2021 Artica Soluciones Tecnologicas
# Version 7.0NG.770
# Version 7.0NG.771
# This program is Free Software, you can redistribute it and/or modify it
# under the terms of the GNU General Public Licence as published by the Free Software
# Foundation; either version 2 of the Licence or any later version

View File

@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
# Version 7.0NG.770, AIX version
# Version 7.0NG.771, AIX version
# General Parameters
# ==================

View File

@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
# Version 7.0NG.770
# Version 7.0NG.771
# FreeBSD/IPSO version
# Licenced under GPL licence, 2003-2007 Sancho Lerena

View File

@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
# Version 7.0NG.770, HPUX Version
# Version 7.0NG.771, HPUX Version
# General Parameters
# ==================

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.770
# Version 7.0NG.771
# Licensed under GPL license v2,
# (c) 2003-2021 Artica Soluciones Tecnologicas
# please visit http://pandora.sourceforge.net

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.770
# Version 7.0NG.771
# Licensed under GPL license v2,
# (c) 2003-2021 Artica Soluciones Tecnologicas
# please visit http://pandora.sourceforge.net

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.770
# Version 7.0NG.771
# Licensed under GPL license v2,
# please visit http://pandora.sourceforge.net

View File

@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
# Version 7.0NG.770, Solaris version
# Version 7.0NG.771, Solaris version
# General Parameters
# ==================

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.770, AIX version
# Version 7.0NG.771, AIX version
# Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

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

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.770-230508"
pandora_version="7.0NG.771-230519"
echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null

View File

@ -31,7 +31,7 @@ fi
if [ "$#" -ge 2 ]; then
VERSION="$2"
else
VERSION="7.0NG.770"
VERSION="7.0NG.771"
fi
# Path for the generated DMG file

View File

@ -19,11 +19,11 @@
<choice id="com.pandorafms.pandorafms_src" visible="false">
<pkg-ref id="com.pandorafms.pandorafms_src"/>
</choice>
<pkg-ref id="com.pandorafms.pandorafms_src" version="7.0NG.770" onConclusion="none">pandorafms_src.pdk</pkg-ref>
<pkg-ref id="com.pandorafms.pandorafms_src" version="7.0NG.771" onConclusion="none">pandorafms_src.pdk</pkg-ref>
<choice id="com.pandorafms.pandorafms_uninstall" visible="true" customLocation="/Applications">
<pkg-ref id="com.pandorafms.pandorafms_uninstall"/>
</choice>
<pkg-ref id="com.pandorafms.pandorafms_uninstall" version="7.0NG.770" onConclusion="none">pandorafms_uninstall.pdk</pkg-ref>
<pkg-ref id="com.pandorafms.pandorafms_uninstall" version="7.0NG.771" onConclusion="none">pandorafms_uninstall.pdk</pkg-ref>
<!-- <installation-check script="check()" />
<script>
<![CDATA[

View File

@ -5,9 +5,9 @@
<key>CFBundleIconFile</key> <string>pandorafms.icns</string>
<key>CFBundleIdentifier</key> <string>com.pandorafms.pandorafms_uninstall</string>
<key>CFBundleVersion</key> <string>7.0NG.770</string>
<key>CFBundleGetInfoString</key> <string>7.0NG.770 Pandora FMS Agent uninstaller for MacOS by Artica ST on Aug 2020</string>
<key>CFBundleShortVersionString</key> <string>7.0NG.770</string>
<key>CFBundleVersion</key> <string>7.0NG.771</string>
<key>CFBundleGetInfoString</key> <string>7.0NG.771 Pandora FMS Agent uninstaller for MacOS by Artica ST on Aug 2020</string>
<key>CFBundleShortVersionString</key> <string>7.0NG.771</string>
<key>NSPrincipalClass</key><string>NSApplication</string>
<key>NSMainNibFile</key><string>MainMenu</string>

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.770, GNU/Linux
# Version 7.0NG.771, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.770, FreeBSD Version
# Version 7.0NG.771, FreeBSD Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.770, HP-UX Version
# Version 7.0NG.771, HP-UX Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.770, GNU/Linux
# Version 7.0NG.771, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.770, GNU/Linux
# Version 7.0NG.771, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.770, NetBSD Version
# Version 7.0NG.771, NetBSD Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.770, Solaris Version
# Version 7.0NG.771, Solaris Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1022,8 +1022,8 @@ my $Sem = undef;
# Semaphore used to control the number of threads
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.770';
use constant AGENT_BUILD => '230508';
use constant AGENT_VERSION => '7.0NG.771';
use constant AGENT_BUILD => '230519';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

@ -3,8 +3,8 @@
#
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.770
%define release 230508
%define version 7.0NG.771
%define release 230519
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -3,8 +3,8 @@
#
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.770
%define release 230508
%define version 7.0NG.771
%define release 230519
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -9,8 +9,8 @@
# Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license.
# **********************************************************************
PI_VERSION="7.0NG.770"
PI_BUILD="230508"
PI_VERSION="7.0NG.771"
PI_BUILD="230519"
OS_NAME=`uname -s`
FORCE=0

View File

@ -1,6 +1,6 @@
# Base config file for Pandora FMS Windows Agent
# (c) 2006-2023 Pandora FMS
# Version 7.0NG.770
# Version 7.0NG.771
# This program is Free Software, you can redistribute it and/or modify it
# under the terms of the GNU General Public Licence as published by the Free Software
# Foundation; either version 2 of the Licence or any later version

View File

@ -3,7 +3,7 @@ AllowLanguageSelection
{Yes}
AppName
{Pandora FMS Windows Agent v7.0NG.770}
{Pandora FMS Windows Agent v7.0NG.771}
ApplicationID
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{230508}
{230519}
ViewReadme
{Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.770 Build 230508")
#define PANDORA_VERSION ("7.0NG.771 Build 230519")
string pandora_path;
string pandora_dir;

View File

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

View File

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

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.770-230508"
pandora_version="7.0NG.771-230519"
package_pear=0
package_pandora=1

View File

@ -186,10 +186,6 @@ function pandora_realtime_graphs()
$table->data[] = $data;
if ($graph == 'snmp_interface' || $graph == 'snmp_module') {
echo snmp_browser_print_container(true, '100%', '60%', 'none');
}
// Print the relative path to AJAX calls.
html_print_input_hidden('rel_path', get_parameter('rel_path', ''));
@ -224,7 +220,7 @@ function pandora_realtime_graphs()
false,
'',
'white-box-content',
'box-flat white_table_graph'
'box-flat white_table_graph fixed_filter_bar'
);
$chart[time()]['graph'] = '0';
@ -266,6 +262,16 @@ function pandora_realtime_graphs()
]
);
if ($graph == 'snmp_interface' || $graph == 'snmp_module') {
html_print_div(
[
'class' => 'white_box',
'id' => 'graph_snmp_interface',
'content' => snmp_browser_print_container(true, '100%', '60%', '', false, false),
]
);
}
// echo $canvas;
// Define a custom action to save
// the OID selected in the SNMP browser to the form.

View File

@ -453,7 +453,7 @@ function resource_exportation_extension_main()
true
)
);
$table->data[0][] = html_print_button(__('Export'), '', false, 'export_to_ptr(\'report\');', ['mode' => 'link'], true);
$table->data[0][] = html_print_button(__('Export'), '', false, 'export_to_ptr("report");', ['mode' => 'link'], true);
$table->data[1][] = html_print_label_input_block(
__('Visual console'),
@ -465,7 +465,7 @@ function resource_exportation_extension_main()
true
)
);
$table->data[1][] = html_print_button(__('Export'), '', false, 'export_to_ptr(\'visual_console\');', ['mode' => 'link'], true);
$table->data[1][] = html_print_button(__('Export'), '', false, 'export_to_ptr("visual_console");', ['mode' => 'link'], true);
if ($hook_enterprise === true) {
add_rows_for_enterprise($table->data);

View File

@ -13,4 +13,4 @@ ADD COLUMN `metaconsole_section` VARCHAR(255) NOT NULL DEFAULT 'Default' AFTER `
ALTER TABLE `tusuario`
ADD COLUMN `metaconsole_data_section` VARCHAR(255) NOT NULL DEFAULT '' AFTER `metaconsole_section`;
COMMIT;
COMMIT;

View File

@ -202,22 +202,58 @@ if (!empty($news)) {
$output_news = '<div id="news_board" class="new">';
foreach ($news as $article) {
$image = false;
$default = false;
if ($article['text'] == '&amp;lt;p&#x20;style=&quot;text-align:&#x20;center;&#x20;font-size:&#x20;13px;&quot;&amp;gt;Hello,&#x20;congratulations,&#x20;if&#x20;you&apos;ve&#x20;arrived&#x20;here&#x20;you&#x20;already&#x20;have&#x20;an&#x20;operational&#x20;monitoring&#x20;console.&#x20;Remember&#x20;that&#x20;our&#x20;forums&#x20;and&#x20;online&#x20;documentation&#x20;are&#x20;available&#x20;24x7&#x20;to&#x20;get&#x20;you&#x20;out&#x20;of&#x20;any&#x20;trouble.&#x20;You&#x20;can&#x20;replace&#x20;this&#x20;message&#x20;with&#x20;a&#x20;personalized&#x20;one&#x20;at&#x20;Admin&#x20;tools&#x20;-&amp;amp;gt;&#x20;Site&#x20;news.&amp;lt;/p&amp;gt;&#x20;') {
$image = true;
$article['subject'] = __('Welcome to Pandora FMS Console');
$default = true;
}
$text_bbdd = io_safe_output($article['text']);
$text = html_entity_decode($text_bbdd);
$output_news .= '<span class="green_title">'.$article['subject'].'</span>';
$output_news .= '<div class="new-board">';
$output_news .= '<div class="new-board-header">';
$output_news .= '<span class="new-board-title">'.$article['subject'].'</span>';
$output_news .= '<span class="new-board-author">'.__('By').' '.$article['author'].' '.ui_print_timestamp($article['timestamp'], true).'</span>';
$output_news .= '</div>';
$output_news .= '<div class="new content">';
$output_news .= '<p>'.__('by').' <b>'.$article['author'].'</b> <i>'.ui_print_timestamp($article['timestamp'], true).'</i> '.$comparation_suffix.'</p>';
if ($image) {
$output_news .= '<center><img src="./images/welcome_image.png" alt="img colabora con nosotros - Support" width="191" height="207"></center>';
if ($default) {
$output_news .= '<div class="default-new">';
$output_news .= '<div class="default-image-new">';
$output_news .= '<img src="./images/welcome_image.svg" alt="img colabora con nosotros - Support">';
$output_news .= '</div><div class="default-text-new">';
$output_news .= '
<p>'.__('Welcome to our monitoring tool so grand,').'
<br>'.__('Where data insights are at your command.').'
<br>'.__('Sales, marketing, operations too,').'
<br>'.__("Customer support, we've got you.").'
</p>
<p>'.__('Our interface is user-friendly,').'
<br>'.__("Customize your dashboard, it's easy.").'
<br>'.__('Set up alerts and gain insights so keen,').'
<br>'.__("Optimize your data, like you've never seen.").'
</p>
<p>'.__('Unleash its power now, and join the pro league,').'
<br>'.__('Unlock the potential of your data to intrigue.').'
<br>'.__('Monitoring made simple, efficient and fun,').'
<br>'.__('Discover a whole new way to get things done.').'
</p>
<p>'.__('And take control of your IT once and for all.').'</p>
<span>'.__('You can replace this message with a personalized one at Admin tools -> Site news.').'</span>
';
$output_news .= '</div></div>';
} else {
$output_news .= nl2br($text);
}
$output_news .= nl2br($text);
$output_news .= '</div>';
$output_news .= '</div></div>';
}
$output_news .= '</div>';

View File

@ -1546,7 +1546,11 @@ if ($update_module === true || $create_module === true) {
}
// Inverse string checkbox.
if ($id_module_type === MODULE_TYPE_GENERIC_DATA_STRING || $id_module_type === MODULE_TYPE_ASYNC_STRING) {
if ($id_module_type === MODULE_TYPE_GENERIC_DATA_STRING
|| $id_module_type === MODULE_TYPE_ASYNC_STRING
|| $id_module_type === MODULE_TYPE_REMOTE_TCP_STRING
|| $id_module_type === MODULE_TYPE_REMOTE_CMD_STRING
) {
// Warning inverse string checkbox.
$warning_string_checkbox = get_parameter('warning_inverse_string');
if (!empty($warning_string_checkbox) && $warning_string_checkbox === 'warning_inverse_string') {
@ -2521,10 +2525,10 @@ switch ($tab) {
});
// Change description when edit port
$( "#text-tcp_port" ).change(function() {
/*$( "#text-tcp_port" ).change(function() {
$( "#textarea_description" ).text(`Checks port ${$( "#text-tcp_port" ).val()} is opened`);
});
});*/
// Set the position and width of the subtab
/*
function agent_wizard_tab_setup() {

View File

@ -229,7 +229,7 @@ if ($enable_agent > 0) {
);
}
if ($disable_agent > 0) {
if ($disable_agent > 0 && $agent_to_delete === 0) {
$result = db_process_sql_update('tagente', ['disabled' => 1], ['id_agente' => $disable_agent]);
$alias = io_safe_output(agents_get_alias($disable_agent));
@ -765,7 +765,9 @@ if ($agents !== false) {
}
if (empty($agent['alias']) === true) {
$agent['alias'] = $agent['nombre'];
$agent['alias'] = io_safe_output($agent['nombre']);
} else {
$agent['alias'] = io_safe_output($agent['alias']);
}
$additionalDataAgentName = [];

View File

@ -840,8 +840,8 @@ if ($modules !== false) {
$linked = policies_is_module_linked($module['id_agente_modulo']);
$adopt = policies_is_module_adopt($module['id_agente_modulo']);
if ($linked !== false) {
if ($adopt === true) {
if ((bool) $linked !== false) {
if ((bool) $adopt === true) {
$img = 'images/policies_brick.png';
$title = '('.__('Adopted').') '.$policyInfo['name_policy'];
} else {
@ -849,7 +849,7 @@ if ($modules !== false) {
$title = $policyInfo['name_policy'];
}
} else {
if ($adopt === true) {
if ((bool) $adopt === true) {
$img = 'images/policies_not_brick.png';
$title = '('.__('Unlinked').') ('.__('Adopted').') '.$policyInfo['name_policy'];
} else {
@ -882,6 +882,10 @@ if ($modules !== false) {
$title
);
if (strlen($module['ip_target']) !== 0) {
$title .= '<br/>IP: '.$module['ip_target'];
}
// This module is initialized ? (has real data).
if ($status === STATUS_MODULE_NO_DATA) {
$data[2] .= html_print_image(
@ -1005,7 +1009,7 @@ if ($modules !== false) {
$data[8] .= html_print_menu_button(
[
'href' => 'index.php?sec=gagente&tab=module&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&delete_module='.$module['id_agente_modulo'],
'onClick' => "if (!confirm(\' '.__('Are you sure?').'\')) return false;",
'onClick' => 'javascript: if (!confirm(\''.__('Are you sure?').'\')) return false;',
'image' => 'images/delete.svg',
'title' => __('Delete'),
],
@ -1101,7 +1105,7 @@ $createModuleTable->data[0][] = html_print_label_input_block(
false,
'',
false,
'max-width:300px;'
'width:250px;'
)
);

View File

@ -509,7 +509,7 @@ $tableBasicThresholds->data['warning_threshold'][0] .= html_print_input_text(
10,
1024,
true,
$disabledBecauseInPolicy || $edit === false,
$disabledBecauseInPolicy,
false,
'',
$classdisabledBecauseInPolicy
@ -524,6 +524,11 @@ $tableBasicThresholds->data['switch_warning_threshold'][0] .= html_print_div(
true
);
// CHANGE TO CRITICAL STATUS
$tableBasicThresholds->data['caption_warning_time'][0] .= __('Change to critical status after');
$tableBasicThresholds->data['warning_time'][0] .= html_print_input_text('warning_time', $warning_time, '', 5, 15, true);
$tableBasicThresholds->data['warning_time'][1] .= '&nbsp;&nbsp;<b>'.__('intervals in warning status.').'</b>';
// CRITICAL THRESHOLD.
$tableBasicThresholds->rowclass['caption_critical_threshold'] = 'field_half_width pdd_t_10px';
$tableBasicThresholds->rowclass['critical_threshold'] = 'field_half_width';
@ -607,7 +612,7 @@ $tableBasicThresholds->data['critical_threshold'][0] .= html_print_input_text(
$classdisabledBecauseInPolicy
);
$table_simple->rowstyle['thresholds_table'] = 'margin-top: 15px;height: 340px;width: 100%';
$table_simple->rowstyle['thresholds_table'] = 'margin-top: 15px;height: 400px;width: 100%';
$table_simple->cellclass['thresholds_table'][0] = 'table_section half_section_left';
$table_simple->data['thresholds_table'][0] = html_print_table($tableBasicThresholds, true);
if (modules_is_string_type($id_module_type) === false || (bool) $edit === true) {
@ -1044,8 +1049,8 @@ $table_advanced->data['textarea_description_instructions'][1] = html_print_texta
$table_advanced->rowclass['caption_textarea_crit_warn_instructions'] = 'field_half_width pdd_t_10px';
$table_advanced->rowclass['textarea_crit_warn_instructions'] = 'field_half_width';
$table_advanced->data['caption_textarea_crit_warn_instructions'][1] = __('Warning instructions');
$table_advanced->data['caption_textarea_crit_warn_instructions'][0] = __('Critical instructions');
$table_advanced->data['caption_textarea_crit_warn_instructions'][1] = __('Warning instructions');
$table_advanced->data['textarea_crit_warn_instructions'][0] = html_print_textarea(
'critical_instructions',
5,
@ -1938,7 +1943,7 @@ $(document).ready (function () {
var thisLabel = $(this).attr('for');
$('#'+thisLabel).prop('checked', true);
$('#'+thisLabel).siblings().prop('checked', false);
if ($('#radius-percentage_warning').prop('checked') === true || $('#radius-percentage_critical').prop('checked') === true) {
$("#svg_dinamic").hide();
} else {

View File

@ -28,6 +28,7 @@
global $config;
require_once $config['homedir'].'/include/class/CredentialStore.class.php';
require_once $config['homedir'].'/operation/snmpconsole/snmp_browser.php';
require_once $config['homedir'].'/include/functions_snmp_browser.php';
$snmp_browser_path = (is_metaconsole() === true) ? '../../' : '';
$snmp_browser_path .= 'include/javascript/pandora_snmp_browser.js';
@ -310,7 +311,7 @@ $data[2] .= html_print_button(
__('SNMP Walk'),
'snmp_walk',
false,
'snmpBrowserWindow()',
'snmpBrowserWindow('.$id_agente.')',
[ 'mode' => 'link' ],
true
);
@ -390,14 +391,16 @@ $data[1] = html_print_input_text(
$data[2] = __('Auth password').ui_print_help_tip(__('The pass length must be eight character minimum.'), true);
$data[3] = html_print_input_password(
'snmp3_auth_pass',
'',
$snmp3_auth_pass,
'',
15,
60,
true,
$disabledBecauseInPolicy,
false,
$largeclassdisabledBecauseInPolicy
$largeclassdisabledBecauseInPolicy,
'off',
true
);
$data[3] .= html_print_input_hidden_extended('active_snmp_v3', 0, 'active_snmp_v3_mmen', true);
if ($snmp_version != 3) {
@ -412,14 +415,16 @@ $data[1] = html_print_select(['DES' => __('DES'), 'AES' => __('AES')], 'snmp3_pr
$data[2] = __('Privacy pass').ui_print_help_tip(__('The pass length must be eight character minimum.'), true);
$data[3] = html_print_input_password(
'snmp3_privacy_pass',
'',
$snmp3_privacy_pass,
'',
15,
60,
true,
$disabledBecauseInPolicy,
false,
$largeclassdisabledBecauseInPolicy
$largeclassdisabledBecauseInPolicy,
'off',
true
);
if ($snmp_version != 3) {
@ -731,12 +736,6 @@ $(document).ready (function () {
$("#text-custom_ip_target").hide();
}
});
// Add input password values with js to hide it in browser inspector.
$('#password-snmp3_auth_pass').val('<?php echo $snmp3_auth_pass; ?>');
$('#password-snmp3_privacy_pass').val('<?php echo $snmp3_privacy_pass; ?>');
observerInputPassword();
});

View File

@ -103,7 +103,19 @@ if (!empty($macros)) {
}
if ($m_hide) {
$data[1] = html_print_input_password($m['macro'], '', '', 100, 1024, true);
$data[1] = html_print_input_password(
$m['macro'],
io_output_password($m['value']),
'',
100,
1024,
true,
false,
false,
'',
'off',
true
);
array_push($password_fields, $m);
} else {
$data[1] = html_print_input_text(
@ -141,18 +153,24 @@ foreach ($password_fields as $k => $p) {
?>
<script type="text/javascript">
function changePluginSelect() {
if (flag_load_plugin_component) {
if (typeof flag_load_plugin_component !== 'undefined' && flag_load_plugin_component) {
flag_load_plugin_component = false;
return;
}
const moduleId = <?php echo $id_agent_module; ?>;
load_plugin_description($("#id_plugin").val());
load_plugin_macros_fields('simple-macro');
load_plugin_macros_fields('simple-macro', moduleId);
forced_title_callback();
$('select#id_plugin').select2('close');
}
$(document).ready(function () {
changePluginSelect();
});
</script>

View File

@ -193,7 +193,7 @@ $actionButtons .= html_print_button(
__('Debug'),
'btn_debugModule',
$disableDebug,
'loadDebugWindow()',
'',
[
'icon' => 'cog',
'mode' => 'mini secondary ',

View File

@ -148,7 +148,7 @@ $data[2] = html_print_label_input_block(
__('Password'),
html_print_input_password(
'plugin_pass',
'',
$plugin_pass,
'',
15,
60,

View File

@ -1430,10 +1430,10 @@ ui_print_spinner('Loading');
$table = new stdClass();
$table->id = 'editor';
$table->width = '100%';
$table->colspan['module'][1] = '5';
$table->colspan['module'][1] = '6';
$table->data = [];
$table->data['module'] = [];
$table->data['module'][0] = '';
// $table->data['module'][0] = '';
$table->data['module'][1] = '<h4>'.__('Modules').'</h4>';
// List of modules, empty, it is populated by javascript.
@ -1457,7 +1457,7 @@ $table->data['module'][1] = "
[
'border' => '0',
'alt' => __('Delete'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'</a>'."</td>
</tr>
@ -1576,14 +1576,12 @@ function insert_downtime_agent($id_downtime, $user_groups_ad)
} else {
// If is selected 'Any', get all the agents.
if (count($agents) === 1 && (int) $agents[0] === -2) {
if ($recursion === true) {
$filter_group = groups_get_children_ids(
$filter_group,
false,
true,
'AW'
);
};
$filter_group = groups_get_children_ids(
$filter_group,
false,
true,
'AW'
);
$agents = db_get_all_rows_filter(
'tagente',
@ -1781,7 +1779,6 @@ function insert_downtime_agent($id_downtime, $user_groups_ad)
//Avoid freak states.
if (action_in_progress)
return;
//Check if the row editor module exists
if ($('#loading_' + id_agent).length > 0) {
//The row exists
@ -1791,7 +1788,6 @@ function insert_downtime_agent($id_downtime, $user_groups_ad)
if ($('#module_editor_' + id_agent).length == 0) {
$("#list-agent_" + id_agent).after(
$("#loading-loading").clone().attr('id', 'loading_' + id_agent));
jQuery.post ('ajax.php',
{"page": "include/ajax/planned_downtime.ajax",
"get_modules_downtime": 1,
@ -1801,15 +1797,15 @@ function insert_downtime_agent($id_downtime, $user_groups_ad)
function (data) {
if (data['correct']) {
//Check if the row editor module exists
if ($('#loading_' + id_agent).length > 0) {
if ($('#list-agent_' + id_agent).length > 0) {
//The row exists
$('#loading_' + id_agent).remove();
//$('#loading_' + id_agent).remove();
$("#list-agent_" + id_agent).after(
$("#editor-module").clone()
.attr('id', 'module_editor_' + id_agent)
.hide());
fill_row_editor(id_agent, data);
}
}
@ -2041,7 +2037,7 @@ function insert_downtime_agent($id_downtime, $user_groups_ad)
var datetime_from = <?php echo json_encode(strtotime($once_date_from.' '.$once_time_from)); ?>;
var datetime_now = <?php echo json_encode($utimestamp); ?>;
var create = <?php echo json_encode($create); ?>;
if (!create && (type_execution == 'periodically' || (type_execution == 'once' && datetime_from < datetime_now))) {
if (!create && (type_execution == 'periodically' && (type_execution == 'once' && datetime_from < datetime_now))) {
$("input#submit-updbutton, input#submit-add_item, table#list a").click(function (e) {
if (!confirm("<?php echo __('WARNING: If you edit this scheduled downtime, the data of future SLA reports may be altered'); ?>")) {
e.preventDefault();

View File

@ -133,7 +133,7 @@ if (is_ajax()) {
}
}
$style = ((int) $field_hidden === 1) ? '-webkit-text-security: disc;' : '';
$style = ((int) $field_hidden === 1) ? '-webkit-text-security: disc; font-family: text-security-disc;' : '';
if (!empty($field_value)) {
$field_value = io_safe_output($field_value);

View File

@ -369,7 +369,7 @@ for ($i = 1; $i <= $config['max_macro_fields']; $i++) {
$selected,
!$is_management_allowed,
'cursor: \'pointer\'',
'class="hide_inputs"',
['input_class' => 'hide_inputs'],
true
)
);
@ -413,16 +413,16 @@ $(document).ready (function () {
$(".hide_inputs").each(function(index) {
var $input_in_row = $(this).closest('tr').find('.field_value');
if($(this).is(':checked')) {
$input_in_row.prop('style', '-webkit-text-security: disc;');
$input_in_row.prop('style', '-webkit-text-security: disc; font-family: text-security-disc;');
} else {
$input_in_row.prop('style', '');
}
});
$(".hide_inputs").click(function() {
var $input_in_row = $(this).closest('tr').find('.field_value');
if($(this).is(':checked')) {
$input_in_row.prop('style', '-webkit-text-security: disc;');
$input_in_row.prop('style', '-webkit-text-security: disc; font-family: text-security-disc;');
} else {
$input_in_row.prop('style', '');
}

View File

@ -98,16 +98,15 @@ if (count($groups) > 0) {
echo '<div id="tactic_view">';
echo '<table style="width: 100%;">';
echo '<tr>';
echo '<td class="tactical_group_left_column">';
echo '<div class="tactical_group_left_columns">';
echo '<div class="tactical_group_left_column">';
$table_col1 = new stdClass();
$table_col1->class = 'no-class';
$table_col1->data = [];
$table_col1->rowclass[] = '';
$table_col1->headstyle[0] = 'text-align:center;';
$table_col1->width = '100%';
$table_col1->data[0][0] = groups_get_heat_map_agents($id_groups, 450, 100);
$table_col1->data[0][0] = groups_get_heat_map_agents($id_groups, 330, 100);
$table_col1->data[1][0] = tactical_groups_get_agents_and_monitoring($id_groups);
$distribution_by_so = '<table cellpadding=0 cellspacing=0 class="databox pies graph-distribution-so" width=100%><tr><td style="width:50%;">';
@ -130,8 +129,8 @@ ui_toggle(
false
);
echo '</td>';
echo '<td class="tactical_group_left_column">';
echo '</div>';
echo '<div class="tactical_group_left_column">';
$table_col2 = new stdClass();
$table_col2->class = 'no-class';
$table_col2->data = [];
@ -158,8 +157,9 @@ ui_toggle(
false,
false
);
echo '</td>';
echo '<td class="tactical_group_right_column">';
echo '</div>';
echo '</div>';
echo '<div class="tactical_group_right_column">';
$table_col3 = new stdClass();
$table_col3->class = 'no-class';
$table_col3->data = [];
@ -179,7 +179,7 @@ try {
__('Alias'),
__('Status'),
__('Alerts'),
__('Ultimo contacto remoto'),
__('Last remote contact'),
];
// Load datatables user interface.
@ -216,9 +216,8 @@ ui_toggle(
false,
false
);
echo '</td>';
echo '</tr>';
echo '</table>';
echo '</div>';
echo '</div>';
echo '<div id="modal-info-agent"></div>'
?>

View File

@ -74,8 +74,8 @@ if ($id) {
// Header Buttons.
$buttons = [];
$buttons[] = ['text' => '<a href="index.php?sec=netf&sec2=godmode/netflow/nf_edit">'.html_print_image('images/logs@svg.svg', true, ['title' => __('Filter list')]).'</a>'];
$buttons[] = ['text' => '<a href="index.php?sec=netf&sec2=godmode/netflow/nf_edit_form">'.html_print_image('images/plus@svg.svg', true, ['title' => __('Add filter')]).'</a>'];
$buttons[] = ['text' => '<a href="index.php?sec=netf&sec2=godmode/netflow/nf_edit">'.html_print_image('images/logs@svg.svg', true, ['title' => __('Filter list'), 'main_menu_icon' => true]).'</a>'];
$buttons[] = ['text' => '<a href="index.php?sec=netf&sec2=godmode/netflow/nf_edit_form">'.html_print_image('images/plus@svg.svg', true, ['title' => __('Add filter'), 'main_menu_icon' => true]).'</a>'];
// Header Caption.
$headerTitle = ($id) ? __('Update filter') : __('Create filter');

View File

@ -208,7 +208,7 @@ $table->data[2][] = html_print_label_input_block(
if ($action === 'new') {
$backgroundColorInput = html_print_input_color(
'background_color',
'white',
'#FFFFFF',
'background_color',
false,
true

View File

@ -389,9 +389,9 @@ if (empty($create) === false || empty($view) === false) {
$disabled = ($locked === true) ? 'readonly="readonly"' : '';
if (empty($create) === true) {
$formAction = 'index.php?sec=gservers&sec2=godmode/servers/plugin&tab=$tab&update_plugin='.$plugin_id.'&pure='.$config['pure'];
$formAction = 'index.php?sec=gservers&sec2=godmode/servers/plugin&tab='.$tab.'&update_plugin='.$plugin_id.'&pure='.$config['pure'];
} else {
$formAction = 'index.php?sec=gservers&sec2=godmode/servers/plugin&tab=$tab&create_plugin=1&pure='.$config['pure'];
$formAction = 'index.php?sec=gservers&sec2=godmode/servers/plugin&tab='.$tab.'&create_plugin=1&pure='.$config['pure'];
}
$formPluginType = [
@ -403,7 +403,7 @@ if (empty($create) === false || empty($view) === false) {
$table = new stdClass();
$table->id = 'table-form';
$table->class = 'filter-table-adv';
$table->class = 'databox filter-table-adv';
$table->style = [];
$table->data['plugin_name_captions'] = $data;
$table->size[0] = '50%';
@ -625,22 +625,14 @@ if (empty($create) === false || empty($view) === false) {
$datam = [];
$buttons = '';
if (!$locked) {
$datam[0] = '<a id="add_macro_btn" href="javascript:;">'.'<span class="bolder">'.__('Add macro').'</span>'.'&nbsp;'.html_print_image(
'images/add.png',
true,
['class' => 'invert_filter']
).'</a>';
$datam[0] .= '<div id="next_macro" class="invisible">'.$i.'</div>';
$datam[0] .= '<div id="next_row" class="invisible">'.$next_name_number.'</div>';
$buttons = html_print_anchor(
[
'id' => 'add_macro_btn',
'href' => 'javascript:;',
'content' => html_print_image(
'content' => '<span>'.__('Add macro').'</span>'.html_print_image(
'images/plus@svg.svg',
true,
['class' => 'invert_filter']
['class' => 'invert_filter main_menu_icon']
),
],
true
@ -660,10 +652,10 @@ if (empty($create) === false || empty($view) === false) {
'id' => 'delete_macro_button',
'style' => $delete_macro_style,
'href' => 'javascript:;',
'content' => html_print_image(
'content' => '<span>'.__('Remove macro').'</span>'.html_print_image(
'images/delete.svg',
true,
['class' => 'main_menu_icon invert_filter']
['class' => 'main_menu_icon invert_filter mrgn_right_10px']
),
],
true
@ -1097,7 +1089,7 @@ if (empty($create) === false || empty($view) === false) {
}
if ($management_allowed === true) {
echo '<form name="plugin" method="POST" action="index.php?sec=gservers&sec2=godmode/servers/plugin&tab=$tab&create=1&pure='.$config['pure'].'">';
echo '<form name="plugin" method="POST" action="index.php?sec=gservers&sec2=godmode/servers/plugin&tab='.$tab.'&create=1&pure='.$config['pure'].'">';
html_print_action_buttons(
html_print_submit_button(
@ -1207,7 +1199,7 @@ ui_require_javascript_file('pandora_modules');
delete_macro_form('table-form-plugin_');
update_preview();
}
$('div#delete_macro_button>a').click(delete_macro_click_event);
$('a#delete_macro_button').click(delete_macro_click_event);
update_preview();

View File

@ -147,6 +147,10 @@ if ((isset($_GET['form_add'])) || (isset($_GET['form_edit']))) {
$result = db_get_row('tnews', 'id_news', $id_news);
if ($result['text'] == '&amp;lt;p&#x20;style=&quot;text-align:&#x20;center;&#x20;font-size:&#x20;13px;&quot;&amp;gt;Hello,&#x20;congratulations,&#x20;if&#x20;you&apos;ve&#x20;arrived&#x20;here&#x20;you&#x20;already&#x20;have&#x20;an&#x20;operational&#x20;monitoring&#x20;console.&#x20;Remember&#x20;that&#x20;our&#x20;forums&#x20;and&#x20;online&#x20;documentation&#x20;are&#x20;available&#x20;24x7&#x20;to&#x20;get&#x20;you&#x20;out&#x20;of&#x20;any&#x20;trouble.&#x20;You&#x20;can&#x20;replace&#x20;this&#x20;message&#x20;with&#x20;a&#x20;personalized&#x20;one&#x20;at&#x20;Admin&#x20;tools&#x20;-&amp;amp;gt;&#x20;Site&#x20;news.&amp;lt;/p&amp;gt;&#x20;') {
header('Location: '.ui_get_full_url('index.php?sec=gextensions&sec2=godmode/setup/news'));
}
if ($result !== false) {
$subject = $result['subject'];
$text = $result['text'];
@ -355,42 +359,37 @@ if ((isset($_GET['form_add'])) || (isset($_GET['form_edit']))) {
echo '</tr></thead>';
$color = 1;
foreach ($rows as $row) {
if ($color == 1) {
$tdcolor = 'datos';
$color = 0;
if ($row['text'] == '&amp;lt;p&#x20;style=&quot;text-align:&#x20;center;&#x20;font-size:&#x20;13px;&quot;&amp;gt;Hello,&#x20;congratulations,&#x20;if&#x20;you&apos;ve&#x20;arrived&#x20;here&#x20;you&#x20;already&#x20;have&#x20;an&#x20;operational&#x20;monitoring&#x20;console.&#x20;Remember&#x20;that&#x20;our&#x20;forums&#x20;and&#x20;online&#x20;documentation&#x20;are&#x20;available&#x20;24x7&#x20;to&#x20;get&#x20;you&#x20;out&#x20;of&#x20;any&#x20;trouble.&#x20;You&#x20;can&#x20;replace&#x20;this&#x20;message&#x20;with&#x20;a&#x20;personalized&#x20;one&#x20;at&#x20;Admin&#x20;tools&#x20;-&amp;amp;gt;&#x20;Site&#x20;news.&amp;lt;/p&amp;gt;&#x20;') {
echo '<tr><td><b>'.__('Welcome to Pandora FMS Console').'</b></td>';
} else {
$tdcolor = 'datos2';
$color = 1;
echo "<tr><td><b><a href='index.php?sec=gsetup&sec2=godmode/setup/news&form_edit=1&id_news=".$row['id_news']."'>".$row['subject'].'</a></b></td>';
}
echo "<tr><td class='$tdcolor'><b><a href='index.php?sec=gsetup&sec2=godmode/setup/news&form_edit=1&id_news=".$row['id_news']."'>".$row['subject'].'</a></b></td>';
if ($row['modal']) {
echo "<td class='$tdcolor'>".__('Modal').'</b></td>';
echo '<td>'.__('Modal').'</b></td>';
} else {
echo "<td class='$tdcolor'>".__('Board').'</b></td>';
echo '<td>'.__('Board').'</b></td>';
}
echo "<td class='$tdcolor'>".$row['author'].'</b></td>';
echo '<td>'.$row['author'].'</b></td>';
$utimestamp = time_w_fixed_tz($row['timestamp']);
echo "<td class='$tdcolor'>".date($config['date_format'], $utimestamp).'</b></td>';
echo '<td>'.date($config['date_format'], $utimestamp).'</b></td>';
if ($row['expire']) {
$expire_utimestamp = time_w_fixed_tz($row['expire_timestamp']);
$expire_in_secs = ($expire_utimestamp - $utimestamp);
if ($expire_in_secs <= 0) {
echo "<td class='$tdcolor'>".__('Expired').'</b></td>';
echo '<td>'.__('Expired').'</b></td>';
} else {
$expire_in = human_time_description_raw($expire_in_secs, false, 'large');
echo "<td class='$tdcolor'>".$expire_in.'</b></td>';
echo '<td>'.$expire_in.'</b></td>';
}
} else {
echo "<td class='$tdcolor'>".__('No').'</b></td>';
echo '<td>'.__('No').'</b></td>';
}
echo '<td class="'.$tdcolor.' table_action_buttons"><a href="index.php?sec=gsetup&sec2=godmode/setup/news&id_news='.$row['id_news'].'&borrar='.$row['id_news'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/delete.svg', true, ['border' => '0', 'class' => 'invert_filter']).'</a></td></tr>';
echo '<td class="'.$tdcolor.' table_action_buttons"><a href="index.php?sec=gsetup&sec2=godmode/setup/news&id_news='.$row['id_news'].'&borrar='.$row['id_news'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/delete.svg', true, ['border' => '0', 'class' => 'invert_filter main_menu_icon']).'</a></td></tr>';
}
echo '</table>';

View File

@ -24,7 +24,7 @@ global $config;
check_login();
if ((bool) check_acl($config['id_user'], 0, 'PM') === true && is_user_admin($config['id_user']) === false) {
if ((bool) check_acl($config['id_user'], 0, 'PM') === false && is_user_admin($config['id_user']) === false) {
db_pandora_audit(
AUDIT_LOG_ACL_VIOLATION,
'Trying to access Setup Management'

View File

@ -132,13 +132,13 @@ $table_remote->data['ehorus_req_timeout'] = $row;
// Test.
$row = [];
$test_start = '<span id="test-ehorus-spinner" class="invisible">&nbsp;'.html_print_image('images/spinner.gif', true).'</span>';
$test_start .= '<span id="test-ehorus-success" class="invisible">&nbsp;'.html_print_image('images/status_sets/default/severity_normal.png', true).'</span>';
$test_start .= '<span id="test-ehorus-failure" class="invisible">&nbsp;'.html_print_image('images/status_sets/default/severity_critical.png', true).'</span>';
$test_start .= '<span id="test-ehorus-success" class="invisible">&nbsp;'.html_print_image('images/status_sets/default/severity_normal.png', true).'&nbsp;'.__('Connection its OK').'</span>';
$test_start .= '<span id="test-ehorus-failure" class="invisible">&nbsp;'.html_print_image('images/status_sets/default/severity_critical.png', true).'&nbsp;'.__('Connection failed').'</span>';
$test_start .= '&nbsp;<span id="test-ehorus-message" class="invisible"></span>';
$row['ehorus_test'] = html_print_label_input_block(
__('Test'),
__('Test connection'),
html_print_button(
__('Start'),
__('Test'),
'test-ehorus',
false,
'',

View File

@ -649,9 +649,9 @@ $table_cr_settings->data[3] = $row;
// Test.
$row = [];
$row['control'] = __('Test');
$row['control'] = __('Test connection');
$row['control'] .= html_print_button(
__('Start'),
__('Test'),
'test-integria',
false,
'',
@ -662,8 +662,8 @@ $row['control'] .= html_print_button(
true
);
$row['control'] .= '<span id="test-integria-spinner" class="invisible">&nbsp;'.html_print_image('images/spinner.gif', true).'</span>';
$row['control'] .= '<span id="test-integria-success" class="invisible">&nbsp;'.html_print_image('images/status_sets/default/severity_normal.png', true).'</span>';
$row['control'] .= '<span id="test-integria-failure" class="invisible">&nbsp;'.html_print_image('images/status_sets/default/severity_critical.png', true).'</span>';
$row['control'] .= '<span id="test-integria-success" class="invisible">&nbsp;'.html_print_image('images/status_sets/default/severity_normal.png', true).'&nbsp;'.__('Connection its OK').'</span>';
$row['control'] .= '<span id="test-integria-failure" class="invisible">&nbsp;'.html_print_image('images/status_sets/default/severity_critical.png', true).'&nbsp;'.__('Connection failed').'</span>';
$row['control'] .= '&nbsp;<span id="test-integria-message" class="invisible"></span>';
$table_remote->data['integria_test'] = $row;

View File

@ -86,9 +86,9 @@ $row = [];
$test_start = '<span id="test-gotty-spinner" class="invisible">&nbsp;'.html_print_image('images/spinner.gif', true).'</span>';
$test_start .= '&nbsp;<span id="test-gotty-message" class="invisible"></span>';
$row['gotty_test'] = html_print_label_input_block(
__('Test'),
__('Test connection'),
html_print_button(
__('Start'),
__('Test'),
'test-gotty',
false,
'handleTest()',

View File

@ -212,7 +212,8 @@ $filter['limit'] = (int) $config['block_size'];
// Statements for pagination.
$url = 'index.php?sec=gusuarios&sec2=godmode/tag/tag';
$total_tags = tags_get_tag_count($filter);
$offset_delete = ($offset >= ($total_tags - 1)) ? ($offset - $config['block_size']) : $offset;
$offset_delete = ($offset >= $total_tags ) ? ($offset - $config['block_size']) : 0;
$result = tags_search_tag(false, $filter);
// Filter form.

View File

@ -54,9 +54,26 @@ if ($enterprise_include === true) {
enterprise_include_once('meta/include/functions_users_meta.php');
}
$homeScreenValues = [
HOME_SCREEN_DEFAULT => __('Default'),
HOME_SCREEN_VISUAL_CONSOLE => __('Visual console'),
HOME_SCREEN_EVENT_LIST => __('Event list'),
HOME_SCREEN_GROUP_VIEW => __('Group view'),
HOME_SCREEN_TACTICAL_VIEW => __('Tactical view'),
HOME_SCREEN_ALERT_DETAIL => __('Alert detail'),
HOME_SCREEN_EXTERNAL_LINK => __('External link'),
HOME_SCREEN_OTHER => __('Other'),
HOME_SCREEN_DASHBOARD => __('Dashboard'),
];
// This defines the working user. Beware with this, old code get confusses
// and operates with current logged user (dangerous).
$id = get_parameter('id', get_parameter('id_user', ''));
if (empty($id) === true) {
$id = $config['id_user'];
}
// Check if we are the same user for edit or we have a proper profile for edit users.
if ($id !== $config['id_user']) {
if ((bool) check_acl($config['id_user'], 0, 'UM') === false) {
@ -85,92 +102,6 @@ if (is_ajax() === true) {
$delete_profile = (bool) get_parameter('delete_profile');
$get_user_profile = (bool) get_parameter('get_user_profile');
if ($delete_profile === true) {
$id2 = (string) get_parameter('id_user');
$id_up = (int) get_parameter('id_user_profile');
$perfilUser = db_get_row('tusuario_perfil', 'id_up', $id_up);
$id_perfil = $perfilUser['id_perfil'];
$perfil = db_get_row('tperfil', 'id_perfil', $id_perfil);
db_pandora_audit(
AUDIT_LOG_USER_MANAGEMENT,
'Deleted profile for user '.io_safe_output($id2),
false,
false,
'The profile with id '.$id_perfil.' in the group '.$perfilUser['id_grupo']
);
$return = profile_delete_user_profile($id2, $id_up);
ui_print_result_message(
$return,
__('Successfully deleted'),
__('Could not be deleted')
);
$has_profile = db_get_row('tusuario_perfil', 'id_usuario', $id2);
$user_is_global_admin = users_is_admin($id2);
if ($has_profile === false && $user_is_global_admin === false) {
$result = delete_user($id2);
if ($result === true) {
db_pandora_audit(
AUDIT_LOG_USER_MANAGEMENT,
__('Deleted user %s', io_safe_output($id_user))
);
}
ui_print_result_message(
$result,
__('Successfully deleted'),
__('There was a problem deleting the user')
);
// Delete the user in all the consoles.
if (is_metaconsole() === true) {
$servers = metaconsole_get_servers();
foreach ($servers as $server) {
// Connect to the remote console.
metaconsole_connect($server);
// Delete the user.
$result = delete_user($id_user);
if ($result === true) {
db_pandora_audit(
AUDIT_LOG_USER_MANAGEMENT,
__('Deleted user %s from metaconsole', io_safe_output($id_user))
);
}
// Restore the db connection.
metaconsole_restore_db();
// Log to the metaconsole too.
if ($result === true) {
db_pandora_audit(
AUDIT_LOG_USER_MANAGEMENT,
__(
'Deleted user %s from %s',
io_safe_input($id_user),
io_safe_input($server['server_name'])
)
);
}
ui_print_result_message(
$result,
__('Successfully deleted from %s', io_safe_input($server['server_name'])),
__('There was a problem deleting the user from %s', io_safe_input($server['server_name']))
);
}
}
}
return;
}
if ($get_user_profile === true) {
$profile_id = (int) get_parameter('profile_id');
$group_id = (int) get_parameter('group_id', -1);
@ -302,7 +233,7 @@ if ((bool) $config['user_can_update_info'] === true) {
$view_mode = true;
}
$delete_profile = (is_ajax() === true) ? (bool) get_parameter('delete_profile') : false;
$delete_profile = (bool) get_parameter('delete_profile');
$new_user = (bool) get_parameter('new_user');
$create_user = (bool) get_parameter('create_user');
$add_profile = (bool) get_parameter('add_profile');
@ -420,6 +351,8 @@ if ($create_user === true) {
$values['data_section'] = get_parameter('data_section');
}
$values['section'] = $homeScreenValues[$values['section']];
if (enterprise_installed() === true) {
$values['force_change_pass'] = 1;
$values['last_pass_change'] = date('Y/m/d H:i:s', get_system_time());
@ -702,6 +635,8 @@ if ($update_user) {
$values['data_section'] = get_parameter('data_section');
}
$values['section'] = $homeScreenValues[$values['section']];
if (enterprise_installed() === true && is_metaconsole() === true) {
$values['metaconsole_access'] = get_parameter('metaconsole_access');
$values['metaconsole_agents_manager'] = get_parameter('metaconsole_agents_manager', '0');
@ -753,6 +688,10 @@ if ($update_user) {
]
);
$res3 = save_pass_history($id, $password_new);
// Generate new API token.
$newToken = api_token_generate();
$res4 = update_user($id, ['api_token' => $newToken]);
}
ui_print_result_message(
@ -777,6 +716,10 @@ if ($update_user) {
'utimestamp' => time(),
]
);
// Generate new API token.
$newToken = api_token_generate();
$res4 = update_user($id, ['api_token' => $newToken]);
}
ui_print_result_message(
@ -891,6 +834,89 @@ if ($update_user) {
$user_info = $values;
}
if ($delete_profile) {
$id2 = (string) get_parameter('id_user');
$id_up = (int) get_parameter('id_user_profile');
$perfilUser = db_get_row('tusuario_perfil', 'id_up', $id_up);
$id_perfil = $perfilUser['id_perfil'];
$perfil = db_get_row('tperfil', 'id_perfil', $id_perfil);
db_pandora_audit(
AUDIT_LOG_USER_MANAGEMENT,
'Deleted profile for user '.io_safe_output($id2),
false,
false,
'The profile with id '.$id_perfil.' in the group '.$perfilUser['id_grupo']
);
$return = profile_delete_user_profile($id2, $id_up);
ui_print_result_message(
$return,
__('Successfully deleted'),
__('Could not be deleted')
);
$has_profile = db_get_row('tusuario_perfil', 'id_usuario', $id2);
$user_is_global_admin = users_is_admin($id2);
if ($has_profile === false && $user_is_global_admin === false) {
$result = delete_user($id2);
if ($result === true) {
db_pandora_audit(
AUDIT_LOG_USER_MANAGEMENT,
__('Deleted user %s', io_safe_output($id_user))
);
}
ui_print_result_message(
$result,
__('Successfully deleted'),
__('There was a problem deleting the user')
);
// Delete the user in all the consoles.
if (is_metaconsole() === true) {
$servers = metaconsole_get_servers();
foreach ($servers as $server) {
// Connect to the remote console.
metaconsole_connect($server);
// Delete the user.
$result = delete_user($id_user);
if ($result === true) {
db_pandora_audit(
AUDIT_LOG_USER_MANAGEMENT,
__('Deleted user %s from metaconsole', io_safe_output($id_user))
);
}
// Restore the db connection.
metaconsole_restore_db();
// Log to the metaconsole too.
if ($result === true) {
db_pandora_audit(
AUDIT_LOG_USER_MANAGEMENT,
__(
'Deleted user %s from %s',
io_safe_input($id_user),
io_safe_input($server['server_name'])
)
);
}
ui_print_result_message(
$result,
__('Successfully deleted from %s', io_safe_input($server['server_name'])),
__('There was a problem deleting the user from %s', io_safe_input($server['server_name']))
);
}
}
}
}
if ((int) $status !== -1) {
ui_print_result_message(
$status,

View File

@ -413,10 +413,11 @@ if ($delete_user === true) {
);
} else if ($disable_user !== false) {
// CSRF Validator.
if (html_print_csrf_error()) {
/*
if (html_print_csrf_error()) {
return;
}
}
*/
// Disable_user.
$id_user = get_parameter('id', 0);

View File

@ -272,7 +272,7 @@ $passwordManageTable->data['fields_newpassword'][0] = html_print_input_text_exte
'password_new',
'',
'25',
'45',
'150',
$view_mode,
'',
[
@ -291,7 +291,7 @@ $passwordManageTable->data['fields_repeatpassword'][0] = html_print_input_text_e
'password_conf',
'',
'20',
'45',
'150',
$view_mode,
'',
[
@ -311,7 +311,7 @@ if ($new_user === false) {
'own_password_confirm',
'',
'20',
'45',
'150',
$view_mode,
'',
[
@ -621,14 +621,28 @@ $homeScreenTable->data['captions_homescreen'][0] = __('Home screen');
$homeScreenTable->colspan['captions_homescreen'][0] = 2;
$homeScreenTable->rowclass['captions_homescreen'] = 'field_half_width';
$homeScreenTable->rowclass['fields_homescreen'] = 'field_half_width flex';
$homeScreenTable->data['fields_homescreen'][0] = html_print_select(
$homeScreenValues,
'section',
array_search($user_info['section'], $homeScreenValues),
'show_data_section();',
'',
-1,
true,
false,
false
);
$homeScreenTable->data['fields_homescreen'][1] = html_print_div(
[
'class' => 'w100p',
'content' => $customHomeScreenDataField,
],
true
);
$userManagementTable->rowclass['homescreen_table'] = 'w100p';
$userManagementTable->data['homescreen_table'] = html_print_table($homeScreenTable, true);
$selected_homescreen = $user_info['section'];
foreach ($homeScreenValues as $key => $value) {
if ($value === $selected_homescreen) {
$selected_homescreen = $key;
break;
}
}
$homeScreenTable->data['fields_homescreen'][0] = html_print_select(
$homeScreenValues,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 87 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

View File

@ -0,0 +1,291 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="460px" height="414.288672px" viewBox="0 0 460 414.288672" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>9C390E1A-9FE4-4604-9F9A-D60ED1281F4D</title>
<defs>
<linearGradient x1="0%" y1="9.5%" x2="100%" y2="90.5%" id="linearGradient-1">
<stop stop-color="#D0FAD4" offset="0%"></stop>
<stop stop-color="#C5E9FF" offset="52.0871463%"></stop>
<stop stop-color="#DFD4FE" offset="100%"></stop>
</linearGradient>
<linearGradient x1="50%" y1="49.8604439%" x2="50%" y2="50.731762%" id="linearGradient-2">
<stop stop-color="#000000" stop-opacity="0.07" offset="0%"></stop>
<stop stop-color="#000000" stop-opacity="0" offset="100%"></stop>
</linearGradient>
<linearGradient x1="50%" y1="0%" x2="50%" y2="75.2845534%" id="linearGradient-3">
<stop stop-color="#222222" offset="0%"></stop>
<stop stop-color="#222222" stop-opacity="0" offset="100%"></stop>
</linearGradient>
<path d="M152.546053,35.3107345 L152.546053,0 L87.8813872,0 L87.8813872,35.3107345 C87.8813872,43.4322034 81.3232477,50 73.2137203,50 L167.21372,50 C159.174711,50 152.546053,43.4322034 152.546053,35.3107345 Z" id="path-4"></path>
<path d="M0,39 L36.1774744,0 C46.9053653,10.0936464 52.9966323,24.2151535 53,39 L53,39 L0,39 Z" id="path-5"></path>
<path d="M0,0 L53,0.378540773 C52.8892672,16.7302141 45.1662555,32.1052881 32.0932377,42 L0,0 Z" id="path-7"></path>
<path d="M0,53 L5.2208186,0 C16.7028189,1.12919445 27.5059639,5.96173317 36,13.7683596 L0,53 Z" id="path-9"></path>
<linearGradient x1="50%" y1="50%" x2="52.9793104%" y2="52.3544862%" id="linearGradient-11">
<stop stop-color="#FFFFFF" stop-opacity="0.7" offset="0%"></stop>
<stop stop-color="#FFFFFF" stop-opacity="0" offset="100%"></stop>
</linearGradient>
<path d="M93.68,170.68 L191.91,170.68 C194.119139,170.68 195.91,168.889139 195.91,166.68 L195.91,4 C195.91,1.790861 194.119139,-4.05812251e-16 191.91,0 L4,0 C1.790861,4.05812251e-16 -2.705415e-16,1.790861 0,4 L0,166.68 C1.5523329e-14,168.889139 1.790861,170.68 4,170.68 L47.56,170.68 L93.68,170.68 L93.68,170.68 Z" id="path-12"></path>
<linearGradient x1="56.4362504%" y1="50%" x2="0%" y2="50%" id="linearGradient-13">
<stop stop-color="#5E9FE1" offset="0%"></stop>
<stop stop-color="#E12D81" offset="100%"></stop>
</linearGradient>
<rect id="path-14" x="0" y="0" width="11.59" height="81.23" rx="3"></rect>
</defs>
<g id="Mockups" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Pantalla-bienvenida---Mensaje-bienvenida" transform="translate(-846.000000, -284.000000)">
<g id="Welcome-image" transform="translate(846.000000, 284.000000)">
<rect id="BG" fill="url(#linearGradient-1)" x="0" y="0" width="460" height="414" rx="6"></rect>
<g id="Welcome" transform="translate(40.000000, 40.000000)">
<g id="Mac" transform="translate(15.000000, 84.000000)">
<g id="Group" transform="translate(53.786280, 240.000000)" stroke-linejoin="round">
<g id="Path">
<use fill="#FFFFFF" xlink:href="#path-4"></use>
<use stroke="url(#linearGradient-3)" stroke-width="1.4" fill="url(#linearGradient-2)" xlink:href="#path-4"></use>
</g>
</g>
<path d="M335.224274,-0.7 C339.502123,-0.7 343.370554,1.02376203 346.169675,3.81257674 C348.969732,6.60232361 350.7,10.4579204 350.7,14.7213211 L350.7,225.278679 C350.7,229.54208 348.969732,233.397676 346.169675,236.187423 C343.370554,238.976238 339.502123,240.7 335.224274,240.7 L14.7757256,240.7 C10.4978772,240.7 6.62944618,238.976238 3.83032506,236.187423 C1.03026834,233.397676 -0.7,229.54208 -0.7,225.278679 L-0.7,14.7213211 C-0.7,10.4579204 1.03026834,6.60232361 3.83032506,3.81257674 C6.62944618,1.02376203 10.4978772,-0.7 14.7757256,-0.7 L335.224274,-0.7 Z" id="Path" stroke="#222222" stroke-width="1.4" fill="#FFFFFF" stroke-linejoin="round"></path>
<path d="M175.018401,214.00002 C179.989839,214.010307 184.010268,218.047143 184.00002,223.017956 C183.989859,227.989276 179.952696,232.010268 174.981258,232.00002 C170.010073,231.989859 165.989771,227.952135 166.00002,222.980815 C166.010307,218.010002 170.047216,213.989772 175.018401,214.00002 Z M178.591434,217.033788 C177.65815,216.932742 176.493946,217.065968 175.64737,217.333297 C175.425926,217.403666 175.209284,217.468777 175.001729,217.534388 C174.791837,217.599123 174.603363,217.703925 174.409048,217.787067 C173.251074,218.27527 172.204732,218.948412 171.316359,219.704194 C170.027804,220.797299 168.941481,222.085234 168.00002,223.509025 C168.047008,225.2034 168.658251,226.748772 169.647481,228.00002 C170.082321,226.67139 170.608413,225.406244 171.304807,224.206834 C171.930328,223.129506 172.715507,222.080726 173.564809,221.24869 C174.407231,220.421161 175.474991,219.60177 176.717207,219.105804 C177.305345,218.869278 177.987071,218.648027 178.810152,218.552365 C179.390761,218.486002 179.939699,218.547857 180.540038,218.561005 C180.715921,218.564511 180.92815,218.551864 180.986172,218.417887 C181.032901,218.307575 180.951125,218.121384 180.892843,218.040497 C180.792375,217.900885 180.604031,217.773168 180.44658,217.65647 C179.983832,217.307879 179.289255,217.112923 178.591434,217.033788 Z M179.436118,219.019535 C179.190484,218.888132 177.11413,219.446686 176.340003,219.904207 C176.808464,219.999729 177.212043,220.181341 177.604874,220.362831 C177.99102,220.538443 178.375069,220.72422 178.72032,220.963635 C178.938559,221.114999 179.15457,221.320369 179.354328,221.512391 C179.937348,222.070578 180.470953,222.903448 180.481308,223.923075 C180.49127,224.886736 179.950456,225.57804 179.304519,226.05883 C178.638529,226.556274 177.700296,226.882026 176.689579,226.931746 C174.693705,227.035717 173.188574,226.387398 172.036952,225.63572 C171.870487,225.527953 171.496399,225.25388 171.285762,225.048632 C171.159669,225.314744 171.122968,225.413572 171.00002,225.684093 C172.07208,226.668205 173.665948,227.718081 175.441355,227.939861 C176.384044,228.05865 177.373658,227.9995 178.254742,227.780292 C179.041977,227.584596 179.773112,227.20643 180.328082,226.764951 C181.411152,225.906731 182.257108,224.501468 181.928111,222.579166 C181.792842,221.800669 181.419672,221.108386 180.976771,220.509787 C180.667303,220.095127 180.306192,219.64777 179.88269,219.329978 C179.755154,219.232375 179.589607,219.101463 179.436118,219.019535 Z" id="Fill-3" fill="#E5E9ED"></path>
<path d="M335.153237,0 L14.7757256,0 C6.60645423,0 0,6.61534714 0,14.7956151 L0,205.787089 L350,205.787089 L350,14.8667479 C350,6.6864799 343.322509,0 335.153237,0 Z" id="Path" fill="#57576D" fill-rule="nonzero"></path>
<g id="Group" transform="translate(18.000000, 9.000000)">
<g id="Ventana-1">
<rect id="Rectangle" stroke="#222222" stroke-width="1.4" fill="#FFFFFF" stroke-linejoin="round" x="0" y="0" width="315" height="188" rx="4"></rect>
<line x1="0" y1="14.043869" x2="315" y2="14.043869" id="Path-10" stroke="#222222" stroke-linecap="round" stroke-linejoin="round"></line>
<g id="Content-2" transform="translate(156.500000, 101.000000) scale(-1, 1) translate(-156.500000, -101.000000) translate(12.000000, 27.000000)">
<line x1="3" y1="1" x2="15" y2="1" id="Path" stroke="#8A96A6" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></line>
<line x1="3" y1="9" x2="15" y2="9" id="Path" stroke="#8A96A6" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></line>
<line x1="8" y1="16" x2="15" y2="16" id="Path" stroke="#8A96A6" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></line>
<line x1="26" y1="1" x2="38" y2="1" id="Path" stroke="#8A96A6" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></line>
<line x1="26" y1="9" x2="38" y2="9" id="Path" stroke="#8A96A6" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></line>
<line x1="31" y1="16" x2="38" y2="16" id="Path" stroke="#8A96A6" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></line>
<line x1="110" y1="1" x2="122" y2="1" id="Path" stroke="#161628" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></line>
<line x1="110" y1="9" x2="122" y2="9" id="Path" stroke="#161628" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></line>
<line x1="115" y1="16" x2="122" y2="16" id="Path" stroke="#161628" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></line>
<path d="M54.0901195,79 L86,121.356546 C67.5338303,135.222978 42.2046264,135.571717 23.3624732,122.218953 C4.52032006,108.86619 -3.5066561,84.8791143 3.51226651,62.9004251 C10.5311891,40.921736 30.9837328,26 54.0901195,26 C55.7943972,26 57.4986749,26 59.2029526,26.2353142 L54.0901195,79 Z" id="Path" fill="#F6F7FB" fill-rule="nonzero"></path>
<path d="M66,83 L119,83.3785408 C118.889267,99.7302141 111.166256,115.105288 98.0932377,125 L66,83 Z" id="Path" fill="#DFF3FA" fill-rule="nonzero"></path>
<path d="M73,75 L109.177474,36 C119.905365,46.0936464 125.996632,60.2151535 126,75 L126,75 L73,75 Z" id="Path" fill="#DFF3FA" fill-rule="nonzero"></path>
<path d="M62,75 L67.2208186,22 C78.7028189,23.1291945 89.5059639,27.9617332 98,35.7683596 L62,75 Z" id="Path" fill="#DFF3FA" fill-rule="nonzero"></path>
<path d="M53.9060052,80 L58.9869452,27.2353142 C57.2689295,27.0724044 55.5509138,27 53.8328982,27 C52.1148825,27 50.5613577,27 48.9530026,27.2353142 L49.154047,27.2353142 L44,80 L76.1671018,122.356555 C68.2383958,128.25732 58.81042,131.860663 48.9347258,132.764683 C50.5430809,132.909491 52.1879896,133 53.8328982,133 C65.4374759,133.003953 76.7282401,129.268068 86,122.356555 L53.9060052,80 Z" id="Path" fill="#E5E9ED" fill-rule="nonzero"></path>
<path d="M101.034941,121.737339 L71.2455709,83 L65,83 L97.2839567,125 C98.934299,123.759314 100.509064,122.423075 102,120.998283 L101.034941,121.737339 Z" id="Path" fill="#FFFFFF" fill-rule="nonzero"></path>
<path d="M113,39.6431574 C111.854545,38.3498365 110.672727,37.0929472 109.363636,36 L73,75 L80.0545455,75 L113,39.6431574 Z" id="Path" fill="#FFFFFF" fill-rule="nonzero"></path>
<path d="M69,100.909528 L53.4447892,80.0000548 L55.9170211,54.1095294 C55.2132471,54.1095294 54.4914276,54 53.769608,54 C42.5971011,53.9767742 32.6880818,61.2503875 29.249773,71.9985873 C25.8114643,82.7467872 29.6306873,94.50996 38.7004275,101.106519 C47.7701676,107.703078 60.0149095,107.623469 69,100.909528 L69,100.909528 Z" id="Path" fill="#E5E9ED" fill-rule="nonzero"></path>
<path d="M72.2923913,23.3822924 C74.5487465,23.6024237 76.7889623,23.9608175 79,24.4553878 C75.2039142,23.218832 71.2815905,22.395455 67.3032609,22 L62,75 L67.7467391,68.8342485 L72.2923913,23.3822924 Z" id="Path" fill="#FFFFFF" fill-rule="nonzero"></path>
<path d="M54.0901195,80 L86,122.356546 C67.5338303,136.222978 42.2046264,136.571717 23.3624732,123.218953 C4.52032006,109.86619 -3.5066561,85.8791143 3.51226651,63.9004251 C10.5311891,41.921736 30.9837328,27 54.0901195,27 C55.7943972,27 57.4986749,27 59.2029526,27.2353142 L54.0901195,80 Z" id="Path" stroke="#8A96A6" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
<path d="M9.11764706,145.245315 L9.11764706,139.735945 L4.56777996,137 L0,139.735945 L0,145.245315 L4.56777996,148 L9.11764706,145.245315 L9.11764706,145.245315 Z M20.0588235,145.245315 L20.0588235,139.735945 L15.5089564,137 L10.9411765,139.735945 L10.9411765,145.245315 L15.5089564,148 L20.0588235,145.245315 L20.0588235,145.245315 Z M31,145.245315 L31,139.735945 L26.43222,137 L21.8823529,139.735945 L21.8823529,145.245315 L26.43222,148 L31,145.245315 L31,145.245315 Z" id="Path-11" fill="#8A96A6" fill-rule="nonzero"></path>
<g id="Clipped" transform="translate(73.000000, 36.000000)">
<mask id="mask-6" fill="white">
<use xlink:href="#path-5"></use>
</mask>
<g id="Path"></g>
<g id="Group" mask="url(#mask-6)" stroke="#B2DBF7" stroke-linecap="round" stroke-linejoin="round" stroke-width="0.99">
<g transform="translate(-85.975768, -25.556749)" id="Path">
<line x1="104.733788" y1="0" x2="0" y2="77.8542737"></line>
<line x1="109.00273" y1="4.31714152" x2="4.26894198" y2="82.1531994"></line>
<line x1="113.271672" y1="8.61606726" x2="8.53788396" y2="86.4521252"></line>
<line x1="117.540614" y1="12.914993" x2="12.8249147" y2="90.7510509"></line>
<line x1="121.809556" y1="17.2139187" x2="17.0938567" y2="95.0499766"></line>
<line x1="126.096587" y1="21.5128445" x2="21.3627986" y2="99.3489024"></line>
<line x1="130.365529" y1="25.8117702" x2="25.6317406" y2="103.666044"></line>
<line x1="134.634471" y1="30.1106959" x2="29.9006826" y2="107.96497"></line>
<line x1="138.903413" y1="34.4278375" x2="34.1696246" y2="112.263895"></line>
<line x1="143.172355" y1="38.7267632" x2="38.4385666" y2="116.562821"></line>
<line x1="147.441297" y1="43.0256889" x2="42.7255973" y2="120.861747"></line>
<line x1="151.710239" y1="47.3246147" x2="46.9945392" y2="125.160673"></line>
<line x1="155.99727" y1="51.6235404" x2="51.2634812" y2="129.459598"></line>
<line x1="160.266212" y1="55.9224661" x2="55.5324232" y2="133.77674"></line>
<line x1="164.535154" y1="60.2213919" x2="59.8013652" y2="138.075666"></line>
<line x1="168.804096" y1="64.5385334" x2="64.0703072" y2="142.374591"></line>
<line x1="173.073038" y1="68.8374591" x2="68.3392491" y2="146.673517"></line>
</g>
</g>
</g>
<g id="Clipped" transform="translate(66.000000, 83.000000)">
<mask id="mask-8" fill="white">
<use xlink:href="#path-7"></use>
</mask>
<use id="Path" fill="#ED474A" xlink:href="#path-7"></use>
<g id="Group" mask="url(#mask-8)" stroke="#9C1414" stroke-linecap="round" stroke-linejoin="round" stroke-width="0.99">
<g transform="translate(-78.305328, -72.157082)" id="Path">
<line x1="104.805328" y1="0" x2="0" y2="77.0420601"></line>
<line x1="109.077186" y1="4.272103" x2="4.27185792" y2="81.2961373"></line>
<line x1="113.349044" y1="8.52618026" x2="8.54371585" y2="85.5502146"></line>
<line x1="117.620902" y1="12.7802575" x2="12.8336749" y2="89.8042918"></line>
<line x1="121.89276" y1="17.0343348" x2="17.1055328" y2="94.0583691"></line>
<line x1="126.182719" y1="21.288412" x2="21.3773907" y2="98.3124464"></line>
<line x1="130.454577" y1="25.5424893" x2="25.6492486" y2="102.584549"></line>
<line x1="134.726434" y1="29.7965665" x2="29.9211066" y2="106.838627"></line>
<line x1="138.998292" y1="34.0686695" x2="34.1929645" y2="111.092704"></line>
<line x1="143.27015" y1="38.3227468" x2="38.4648224" y2="115.346781"></line>
<line x1="147.542008" y1="42.576824" x2="42.7547814" y2="119.600858"></line>
<line x1="151.813866" y1="46.8309013" x2="47.0266393" y2="123.854936"></line>
<line x1="156.103825" y1="51.0849785" x2="51.2984973" y2="128.109013"></line>
<line x1="160.375683" y1="55.3390558" x2="55.5703552" y2="132.381116"></line>
<line x1="164.647541" y1="59.593133" x2="59.8422131" y2="136.635193"></line>
<line x1="168.919399" y1="63.8652361" x2="64.114071" y2="140.88927"></line>
<line x1="173.191257" y1="68.1193133" x2="68.385929" y2="145.143348"></line>
</g>
</g>
</g>
<g id="Clipped" transform="translate(62.000000, 22.000000)">
<mask id="mask-10" fill="white">
<use xlink:href="#path-9"></use>
</mask>
<use id="Path" fill="#1D7873" xlink:href="#path-9"></use>
<g id="Group" mask="url(#mask-10)" stroke="#2AD0CF" stroke-linecap="round" stroke-linejoin="round" stroke-width="0.99">
<g transform="translate(-75.092471, -11.513040)" id="Path">
<line x1="105.325922" y1="0" x2="0" y2="77.7357584"></line>
<line x1="109.618999" y1="4.31056966" x2="4.29307731" y2="82.02814"></line>
<line x1="113.912077" y1="8.60295127" x2="8.58615462" y2="86.3205216"></line>
<line x1="118.205154" y1="12.8953329" x2="12.8974229" y2="90.6129032"></line>
<line x1="122.498231" y1="17.1877145" x2="17.1905003" y2="94.9052848"></line>
<line x1="126.8095" y1="21.4800961" x2="21.4835776" y2="99.1976664"></line>
<line x1="131.102577" y1="25.7724777" x2="25.7766549" y2="103.508236"></line>
<line x1="135.395654" y1="30.0648593" x2="30.0697322" y2="107.800618"></line>
<line x1="139.688732" y1="34.375429" x2="34.3628095" y2="112.092999"></line>
<line x1="143.981809" y1="38.6678106" x2="38.6558868" y2="116.385381"></line>
<line x1="148.274886" y1="42.9601922" x2="42.9671551" y2="120.677763"></line>
<line x1="152.567964" y1="47.2525738" x2="47.2602324" y2="124.970144"></line>
<line x1="156.879232" y1="51.5449554" x2="51.5533098" y2="129.262526"></line>
<line x1="161.172309" y1="55.837337" x2="55.8463871" y2="133.573095"></line>
<line x1="165.465387" y1="60.1297186" x2="60.1394644" y2="137.865477"></line>
<line x1="169.758464" y1="64.4402883" x2="64.4325417" y2="142.157859"></line>
<line x1="174.051541" y1="68.7326699" x2="68.725619" y2="146.45024"></line>
</g>
</g>
</g>
<path d="M66,83 L119,83.3785408 C118.889267,99.7302141 111.166256,115.105288 98.0932377,125 L66,83 Z" id="Path" stroke="#9C1414" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
<path d="M73,75 L109.177474,36 C119.905365,46.0936464 125.996632,60.2151535 126,75 L126,75 L73,75 Z" id="Path" stroke="#B2DBF7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
<path d="M62,75 L67.2208186,22 C78.7028189,23.1291945 89.5059639,27.9617332 98,35.7683596 L62,75 Z" id="Path" stroke="#14524F" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
</g>
<g id="Group-5" transform="translate(23.000000, 91.000000)">
<g id="1">
<line x1="0.118553327" y1="46.1425683" x2="53.158873" y2="46.1425683" id="Path" stroke="#8A96A6" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="1,4"></line>
<line x1="0.118553327" y1="55.2692624" x2="53.158873" y2="55.2692624" id="Path" stroke="#8A96A6" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></line>
<line x1="0.118553327" y1="64.4672589" x2="53.158873" y2="64.4672589" id="Path" stroke="#8A96A6" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="4,4"></line>
<line x1="0.118553327" y1="73.5939531" x2="53.158873" y2="73.5939531" id="Path" stroke="#8A96A6" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="2,4"></line>
<line x1="0.118553327" y1="82.7206472" x2="26.6031156" y2="82.7206472" id="Path" stroke="#8A96A6" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></line>
<path d="M50,0 C52.209139,-4.33003142e-15 54,1.790861 54,4 L54,30 C54,32.209139 52.209139,34 50,34 L47,34 L47,29 L39,29 L39,34 L36,34 L36,22 L28,22 L28,34 L25,34 L25,8 L17,8 L17,34 L14,34 L14,17 L6,17 L6,34 L4,34 C1.790861,34 2.705415e-16,32.209139 0,30 L0,4 C-2.705415e-16,1.790861 1.790861,4.05812251e-16 4,0 L50,0 Z" id="Rectangle-3" fill="#C0CCDC" fill-rule="nonzero"></path>
</g>
<g id="3" transform="translate(74.000000, 1.079516)">
<line x1="53.0403197" y1="0.356511491" x2="0" y2="0.356511491" id="Path" stroke="#8A96A6" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></line>
<line x1="53.0403197" y1="9.55450796" x2="0" y2="9.55450796" id="Path" stroke="#8A96A6" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></line>
<line x1="53.0403197" y1="18.6812021" x2="0" y2="18.6812021" id="Path" stroke="#8A96A6" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></line>
<line x1="53.0403197" y1="27.3565115" x2="0" y2="27.3565115" id="Path" stroke="#8A96A6" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></line>
<line x1="26.4845623" y1="37.3565115" x2="0" y2="37.3565115" id="Path" stroke="#8A96A6" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></line>
<g id="Group-4" transform="translate(0.000000, 54.688863)" fill-rule="nonzero">
<g id="User">
<path d="M4,0 L19.3519797,0 C21.5611187,-4.05812251e-16 23.3519797,1.790861 23.3519797,4 L23.3519797,27.9505009 L23.3519797,27.9505009 L0,27.9505009 L0,4 C-2.705415e-16,1.790861 1.790861,4.05812251e-16 4,0 Z" id="Rectangle" stroke="#E5E9ED"></path>
<path d="M17.86996,19.6794343 L16.9444243,19.6794343 C15.5917181,19.6794343 14.5237922,18.6098998 14.5237922,17.2551562 L14.5237922,16.8986447 C15.5205231,16.3282263 16.2324737,15.3299941 16.2324737,14.117855 L16.2324737,10.1962286 C16.2324737,8.41367118 14.8085725,6.98762522 13.028696,6.98762522 L10.4656738,6.98762522 C8.68579731,6.98762522 7.26189611,8.41367118 7.26189611,10.1962286 L7.26189611,14.117855 C7.26189611,15.3299941 7.90265165,16.3995286 8.89938249,16.8986447 L8.89938249,17.2551562 C8.89938249,18.6098998 7.83145659,19.6794343 6.47875045,19.6794343 L5.55321467,19.6794343 C3.34616782,19.6794343 1.56629132,21.4619918 1.56629132,23.672363 L1.56629132,26.4531526 L21.7856883,26.4531526 L21.7856883,23.672363 C21.7856883,21.4619918 20.0770069,19.6794343 17.86996,19.6794343 Z" id="Path" fill="#8A96A6"></path>
</g>
<g id="User" transform="translate(29.688340, 0.000000)">
<path d="M4,0 L19.3519797,0 C21.5611187,-4.05812251e-16 23.3519797,1.790861 23.3519797,4 L23.3519797,27.9505009 L23.3519797,27.9505009 L0,27.9505009 L0,4 C-2.705415e-16,1.790861 1.790861,4.05812251e-16 4,0 Z" id="Rectangle" stroke="#E5E9ED"></path>
<path d="M17.86996,19.6794343 L16.9444243,19.6794343 C15.5917181,19.6794343 14.5237922,18.6098998 14.5237922,17.2551562 L14.5237922,16.8986447 C15.5205231,16.3282263 16.2324737,15.3299941 16.2324737,14.117855 L16.2324737,10.1962286 C16.2324737,8.41367118 14.8085725,6.98762522 13.028696,6.98762522 L10.4656738,6.98762522 C8.68579731,6.98762522 7.26189611,8.41367118 7.26189611,10.1962286 L7.26189611,14.117855 C7.26189611,15.3299941 7.90265165,16.3995286 8.89938249,16.8986447 L8.89938249,17.2551562 C8.89938249,18.6098998 7.83145659,19.6794343 6.47875045,19.6794343 L5.55321467,19.6794343 C3.34616782,19.6794343 1.56629132,21.4619918 1.56629132,23.672363 L1.56629132,26.4531526 L21.7856883,26.4531526 L21.7856883,23.672363 C21.7856883,21.4619918 20.0058118,19.6794343 17.86996,19.6794343 Z" id="Path" fill="#8A96A6"></path>
</g>
</g>
</g>
</g>
</g>
<g transform="translate(0.000000, 0.071133)"></g>
</g>
</g>
<g id="statistics" transform="translate(-0.000000, 0.000000)">
<g id="Path">
<use fill="#D0E7FD" xlink:href="#path-12"></use>
<path stroke="#222222" stroke-width="1.4" d="M191.91,-0.7 C193.207869,-0.7 194.382869,-0.173934581 195.233402,0.676598128 C196.083935,1.52713084 196.61,2.70213084 196.61,4 L196.61,166.68 C196.61,167.977869 196.083935,169.152869 195.233402,170.003402 C194.382869,170.853935 193.207869,171.38 191.91,171.38 L4,171.38 C2.70213084,171.38 1.52713084,170.853935 0.676598128,170.003402 C-0.173934581,169.152869 -0.7,167.977869 -0.7,166.68 L-0.7,4 C-0.7,2.70213084 -0.173934581,1.52713084 0.676598128,0.676598128 C1.52713084,-0.173934581 2.70213084,-0.7 4,-0.7 L191.91,-0.7 Z" fill="url(#linearGradient-11)"></path>
</g>
<path d="M4,0 L191.9,0 C194.109139,-4.05812251e-16 195.9,1.790861 195.9,4 L195.9,26.48 L195.9,26.48 L0,26.48 L0,4 C-2.705415e-16,1.790861 1.790861,4.05812251e-16 4,0 Z" id="Rectangle" fill="#161628" fill-rule="nonzero"></path>
<circle id="Oval" stroke="#FFFFFF" fill-rule="nonzero" cx="40.75" cy="13.24" r="4.3"></circle>
<circle id="Oval" stroke="#FFFFFF" fill-rule="nonzero" cx="29.74" cy="13.24" r="4.3"></circle>
<circle id="Oval" stroke="#FFFFFF" fill-rule="nonzero" cx="18.73" cy="13.24" r="4.3"></circle>
<line x1="59.67" y1="13.89" x2="181.48" y2="13.89" id="Path" stroke="#FFFFFF" stroke-linecap="round" stroke-linejoin="round"></line>
<rect id="Rectangle" fill="#C0CCDC" fill-rule="nonzero" x="18.87" y="136.87" width="157.34" height="25.58" rx="4"></rect>
<polygon id="Path" stroke="#FFFFFF" stroke-width="0.99" stroke-linecap="round" stroke-linejoin="round" points="38.2 151.95 38.2 145.35 32.48 142.05 26.77 145.35 26.77 151.95 32.48 155.26"></polygon>
<line x1="54.85" y1="144.48" x2="42.46" y2="144.48" id="Path" stroke="#FFFFFF" stroke-width="0.99" stroke-linecap="round" stroke-linejoin="round"></line>
<line x1="54.85" y1="148.65" x2="42.46" y2="148.65" id="Path" stroke="#FFFFFF" stroke-width="0.99" stroke-linecap="round" stroke-linejoin="round"></line>
<line x1="49.92" y1="152.82" x2="42.46" y2="152.82" id="Path" stroke="#FFFFFF" stroke-width="0.99" stroke-linecap="round" stroke-linejoin="round"></line>
<polygon id="Path" stroke="#FFFFFF" stroke-width="0.99" stroke-linecap="round" stroke-linejoin="round" points="76.3 151.95 76.3 145.35 70.58 142.05 64.87 145.35 64.87 151.95 70.58 155.26"></polygon>
<line x1="92.95" y1="144.48" x2="80.55" y2="144.48" id="Path" stroke="#FFFFFF" stroke-width="0.99" stroke-linecap="round" stroke-linejoin="round"></line>
<line x1="92.95" y1="148.65" x2="80.55" y2="148.65" id="Path" stroke="#FFFFFF" stroke-width="0.99" stroke-linecap="round" stroke-linejoin="round"></line>
<line x1="88.02" y1="152.82" x2="80.55" y2="152.82" id="Path" stroke="#FFFFFF" stroke-width="0.99" stroke-linecap="round" stroke-linejoin="round"></line>
<polygon id="Path" stroke="#FFFFFF" stroke-width="0.99" stroke-linecap="round" stroke-linejoin="round" points="114.4 151.95 114.4 145.35 108.68 142.05 102.97 145.35 102.97 151.95 108.68 155.26"></polygon>
<line x1="131.04" y1="144.48" x2="118.65" y2="144.48" id="Path" stroke="#FFFFFF" stroke-width="0.99" stroke-linecap="round" stroke-linejoin="round"></line>
<line x1="131.04" y1="148.65" x2="118.65" y2="148.65" id="Path" stroke="#FFFFFF" stroke-width="0.99" stroke-linecap="round" stroke-linejoin="round"></line>
<line x1="126.12" y1="152.82" x2="118.65" y2="152.82" id="Path" stroke="#FFFFFF" stroke-width="0.99" stroke-linecap="round" stroke-linejoin="round"></line>
<polygon id="Path" stroke="#FFFFFF" stroke-width="0.99" stroke-linecap="round" stroke-linejoin="round" points="152.5 151.95 152.5 145.35 146.78 142.05 141.06 145.35 141.06 151.95 146.78 155.26"></polygon>
<line x1="169.14" y1="144.48" x2="156.75" y2="144.48" id="Path" stroke="#FFFFFF" stroke-width="0.99" stroke-linecap="round" stroke-linejoin="round"></line>
<line x1="169.14" y1="148.65" x2="156.75" y2="148.65" id="Path" stroke="#FFFFFF" stroke-width="0.99" stroke-linecap="round" stroke-linejoin="round"></line>
<line x1="164.22" y1="152.82" x2="156.75" y2="152.82" id="Path" stroke="#FFFFFF" stroke-width="0.99" stroke-linecap="round" stroke-linejoin="round"></line>
<g id="Group-2" transform="translate(181.750000, 149.380000)">
<path d="M2.50310812,-1.58525677 L32.0668922,28.4854583 L18.7987954,29.2918067 L22.8374745,40.3785687 L13.9015261,43.6269384 L9.86308336,32.5310228 L-0.819024498,40.4483498 L2.50310812,-1.58525677 Z" id="Path" stroke="#222222" stroke-width="1.4" fill="#FFFFFF" stroke-linejoin="round"></path>
<polygon id="Path" fill-opacity="0.1" fill="#000000" fill-rule="nonzero" points="23.3 28.31 30.49 27.88 3.08 0"></polygon>
</g>
<circle id="Oval" fill-opacity="0.05" fill="#000000" fill-rule="nonzero" cx="97.96" cy="85.15" r="41.57"></circle>
<path d="M116.44,81.5 L122.03,81.5 C123.686854,81.5 125.03,82.8431458 125.03,84.5 L125.03,128.98 C125.03,130.636854 123.686854,131.98 122.03,131.98 L116.44,131.98 C114.783146,131.98 113.44,130.636854 113.44,128.98 L113.44,84.5 C113.44,82.8431458 114.783146,81.5 116.44,81.5 Z M55.62,107.8 L61.21,107.8 C62.8668542,107.8 64.21,109.143146 64.21,110.8 L64.21,128.98 C64.21,130.636854 62.8668542,131.98 61.21,131.98 L55.62,131.98 C53.9631458,131.98 52.62,130.636854 52.62,128.98 L52.62,110.8 C52.62,109.143146 53.9631458,107.8 55.62,107.8 Z M75.89,97.2 L81.48,97.2 C83.1368542,97.2 84.48,98.5431458 84.48,100.2 L84.48,128.98 C84.48,130.636854 83.1368542,131.98 81.48,131.98 L75.89,131.98 C74.2331458,131.98 72.89,130.636854 72.89,128.98 L72.89,100.2 C72.89,98.5431458 74.2331458,97.2 75.89,97.2 Z M96.16,88.34 L101.75,88.34 C103.406854,88.34 104.75,89.6831458 104.75,91.34 L104.75,128.98 C104.75,130.636854 103.406854,131.98 101.75,131.98 L96.16,131.98 C94.5031458,131.98 93.16,130.636854 93.16,128.98 L93.16,91.34 C93.16,89.6831458 94.5031458,88.34 96.16,88.34 Z" id="Rectangle-4" fill="url(#linearGradient-13)" fill-rule="nonzero"></path>
<rect id="Rectangle" fill="#91C0DB" fill-rule="nonzero" x="133.71" y="50.75" width="11.59" height="81.23"></rect>
<rect id="Rectangle" fill="#7AB2CE" fill-rule="nonzero" x="142.41" y="50.75" width="2.88" height="81.23"></rect>
<g id="Clipped" transform="translate(133.710000, 50.750000)">
<mask id="mask-15" fill="white">
<use xlink:href="#path-14"></use>
</mask>
<rect stroke="#222222" stroke-width="1.4" x="-0.7" y="-0.7" width="12.99" height="82.63" rx="3"></rect>
<g id="Group" mask="url(#mask-15)" stroke="#A5D956" stroke-linecap="round" stroke-linejoin="round" stroke-width="0.99">
<g transform="translate(-43.280000, -5.280000)" id="Path">
<line x1="67.3" y1="0" x2="0" y2="25.47"></line>
<line x1="68.93" y1="2.91" x2="1.63" y2="28.39"></line>
<line x1="70.57" y1="5.82" x2="3.27" y2="31.3"></line>
<line x1="72.2" y1="8.74" x2="4.9" y2="34.21"></line>
<line x1="73.83" y1="11.65" x2="6.54" y2="37.12"></line>
<line x1="75.47" y1="14.56" x2="8.17" y2="40.03"></line>
<line x1="77.1" y1="17.47" x2="9.8" y2="42.95"></line>
<line x1="78.74" y1="20.38" x2="11.44" y2="45.86"></line>
<line x1="80.37" y1="23.3" x2="13.07" y2="48.77"></line>
<line x1="82.01" y1="26.21" x2="14.71" y2="51.68"></line>
<line x1="83.64" y1="29.12" x2="16.34" y2="54.6"></line>
<line x1="85.28" y1="32.03" x2="17.98" y2="57.51"></line>
<line x1="86.91" y1="34.95" x2="19.61" y2="60.42"></line>
<line x1="88.54" y1="37.86" x2="21.25" y2="63.33"></line>
<line x1="90.18" y1="40.77" x2="22.88" y2="66.25"></line>
<line x1="91.81" y1="43.68" x2="24.51" y2="69.16"></line>
<line x1="93.45" y1="46.59" x2="26.15" y2="72.07"></line>
<line x1="82.68" y1="50.47" x2="15.38" y2="75.95"></line>
<line x1="84.31" y1="53.39" x2="17.01" y2="78.86"></line>
<line x1="85.95" y1="56.3" x2="18.65" y2="81.77"></line>
<line x1="87.58" y1="59.21" x2="20.28" y2="84.69"></line>
<line x1="89.22" y1="62.12" x2="21.92" y2="87.6"></line>
<line x1="90.85" y1="65.04" x2="23.55" y2="90.51"></line>
<line x1="92.49" y1="67.95" x2="25.19" y2="93.42"></line>
<line x1="94.12" y1="70.86" x2="26.82" y2="96.34"></line>
<line x1="95.75" y1="73.77" x2="28.46" y2="99.25"></line>
<line x1="97.39" y1="76.69" x2="30.09" y2="102.16"></line>
<line x1="99.02" y1="79.6" x2="31.72" y2="105.07"></line>
<line x1="100.66" y1="82.51" x2="33.36" y2="107.98"></line>
<line x1="102.29" y1="85.42" x2="34.99" y2="110.9"></line>
<line x1="103.93" y1="88.33" x2="36.63" y2="113.81"></line>
<line x1="105.56" y1="91.25" x2="38.26" y2="116.72"></line>
<line x1="107.2" y1="94.16" x2="39.9" y2="119.63"></line>
<line x1="108.83" y1="97.07" x2="41.53" y2="122.55"></line>
</g>
</g>
</g>
<path d="M118.908504,42.5973796 L125.359095,46.9384196 C105.950359,76.2027853 80.5320959,90.784865 49.89,90.3118276 L49.89,82.5334907 C63.1815485,82.9086095 76.3169975,79.6374119 87.8718471,73.0827196 C99.4129083,66.4662473 109.855027,56.2071021 118.908504,42.5973796 Z" id="Path" stroke="#222222" stroke-width="1.4" fill="#95A3BF" stroke-linejoin="round"></path>
<path d="M119.17,43.57 L118.41,44.67 L121.34,46.67 C102.88,74.1 79.1,88.37 50.62,89.13 L50.62,89.64 C80.49,89.88 105.33,75.58 124.46,47.15 L119.17,43.57 Z" id="Path" fill-opacity="0.2" fill="#FFFFFF" fill-rule="nonzero"></path>
<path d="M129.354784,34.163995 L128.062473,54.6936046 L110.922346,43.3121976 L129.354784,34.163995 Z" id="Path" stroke="#222222" stroke-width="1.4" fill="#95A3BF" stroke-linejoin="round"></path>
<polygon id="Path" fill-opacity="0.2" fill="#FFFFFF" fill-rule="nonzero" points="123.28 50.74 127.41 53.48 128.55 35.37 124.11 37.57"></polygon>
<line x1="23.08" y1="43.24" x2="29.81" y2="43.24" id="Path" stroke="#91C0DB" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></line>
<line x1="23.08" y1="47.42" x2="29.81" y2="47.42" id="Path" stroke="#91C0DB" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></line>
<line x1="23.08" y1="51.59" x2="26.78" y2="51.59" id="Path" stroke="#91C0DB" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></line>
<line x1="23.08" y1="60.33" x2="29.81" y2="60.33" id="Path" stroke="#91C0DB" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></line>
<line x1="23.08" y1="64.5" x2="29.81" y2="64.5" id="Path" stroke="#91C0DB" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></line>
<line x1="23.08" y1="68.68" x2="26.78" y2="68.68" id="Path" stroke="#91C0DB" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></line>
<line x1="35.49" y1="43.24" x2="42.22" y2="43.24" id="Path" stroke="#91C0DB" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></line>
<line x1="35.49" y1="47.42" x2="42.22" y2="47.42" id="Path" stroke="#91C0DB" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></line>
<line x1="35.49" y1="51.59" x2="39.19" y2="51.59" id="Path" stroke="#91C0DB" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></line>
<line x1="165.78" y1="43.24" x2="172.51" y2="43.24" id="Path" stroke="#4194D8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></line>
<line x1="165.78" y1="47.42" x2="172.51" y2="47.42" id="Path" stroke="#4194D8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></line>
<line x1="165.78" y1="51.59" x2="169.48" y2="51.59" id="Path" stroke="#4194D8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></line>
<polygon id="Path" fill="#B2DBF7" fill-rule="nonzero" points="27.87 129.58 27.87 126.64 25.32 125.17 22.78 126.64 22.78 129.58 25.32 131.05"></polygon>
<polygon id="Path" fill="#B2DBF7" fill-rule="nonzero" points="34.08 129.58 34.08 126.64 31.53 125.17 28.99 126.64 28.99 129.58 31.53 131.05"></polygon>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 42 KiB

View File

@ -364,26 +364,26 @@ if (is_ajax() === true) {
break;
case AGENT_MODULE_STATUS_CRITICAL_BAD:
$status = ui_print_status_image('module_critical.png', $data_module, false);
$status = ui_print_status_image('module_critical.png', $data_module, true);
break;
case AGENT_MODULE_STATUS_WARNING:
$status = ui_print_status_image('module_warning.png', $data_module, false);
$status = ui_print_status_image('module_warning.png', $data_module, true);
break;
case AGENT_MODULE_STATUS_NORMAL_ALERT:
case AGENT_MODULE_STATUS_WARNING_ALERT:
case AGENT_MODULE_STATUS_CRITICAL_ALERT:
$status = ui_print_status_image('module_alertsfired.png', $data_module, false);
$status = ui_print_status_image('module_alertsfired.png', $data_module, true);
break;
case 4:
$status = ui_print_status_image('module_no_data.png', $data_module, false);
case AGENT_MODULE_STATUS_NO_DATA:
$status = ui_print_status_image('module_no_data.png', $data_module, true);
break;
default:
case AGENT_MODULE_STATUS_UNKNOWN:
$status = ui_print_status_image('module_unknown.png', $data_module, false);
$status = ui_print_status_image('module_unknown.png', $data_module, true);
break;
}

View File

@ -38,6 +38,7 @@ if (check_login()) {
enterprise_include_once('include/functions_metaconsole.php');
$get_plugin_macros = get_parameter('get_plugin_macros');
$get_module_macros = get_parameter('get_module_macros');
$search_modules = get_parameter('search_modules');
$get_module_detail = get_parameter('get_module_detail', 0);
$get_module_autocomplete_input = (bool) get_parameter(
@ -118,6 +119,28 @@ if (check_login()) {
return;
}
if ($get_module_macros && $get_module_macros > 0) {
if (https_is_running()) {
header('Content-type: application/json');
}
$module_id = $get_module_macros;
$module_macros = db_get_value(
'macros',
'tagente_modulo',
'id_agente_modulo',
$module_id
);
$macros = [];
$macros['base64'] = base64_encode($module_macros);
$macros['array'] = json_decode($module_macros, true);
echo json_encode($macros);
return;
}
if ($search_modules) {
if (https_is_running()) {
header('Content-type: application/json');
@ -1058,8 +1081,8 @@ if (check_login()) {
$policyInfo = policies_info_module_policy($module['id_policy_module']);
$adopt = policies_is_module_adopt($module['id_agente_modulo']);
if ($linked === true) {
if ($adopt === true) {
if ((bool) $linked === true) {
if ((bool) $adopt === true) {
$img = 'images/policies_brick.png';
$title = '('.__('Adopted').') '.$name_policy;
} else {
@ -1067,7 +1090,7 @@ if (check_login()) {
$title = $name_policy;
}
} else {
if ($adopt === true) {
if ((bool) $adopt === true) {
$img = 'images/policies_not_brick.png';
$title = '('.__('Unlinked').') ('.__('Adopted').') '.$name_policy;
} else {
@ -1152,6 +1175,10 @@ if (check_login()) {
$title
);
if (strlen($module['ip_target']) !== 0) {
$title .= '<br/>IP: '.$module['ip_target'];
}
$last_status_change_text = __('Time elapsed since last status change: ');
$last_status_change_text .= (empty($module['last_status_change']) === false) ? human_time_comparation($module['last_status_change']) : __('N/A');

View File

@ -526,12 +526,14 @@ class AgentDeployWizard
true
);
$mac_installer_link = 'http://firefly.pandorafms.com/pandorafms/latest/macOS/Pandora_FMS_MacOS_agent-7.0NG.dmg';
$mac_content_link = '<a class="green-link" style="font-size: 15px;" href="'.$mac_installer_link.'" target="_blank">'.__('Click to Download the agent').'</a>';
html_print_div(
[
'id' => 'mac_installer',
'class' => 'white_table_flex agent_details_col',
'style' => 'margin-bottom: 20px',
'content' => $content.$mac_warn_box,
'content' => $content.$mac_warn_box.$mac_content_link,
]
);

View File

@ -318,17 +318,29 @@ class AuditLog extends HTML
$count = (int) db_get_value_sql(sprintf('SELECT COUNT(*) as "total" FROM tsesion WHERE %s', $filter));
$sql = sprintf(
'SELECT *
FROM tsesion
WHERE %s
ORDER BY %s
LIMIT %d, %d',
$filter,
$order,
$start,
$length
);
if ($length !== '-1') {
$sql = sprintf(
'SELECT *
FROM tsesion
WHERE %s
ORDER BY %s
LIMIT %d, %d',
$filter,
$order,
$start,
$length
);
} else {
$sql = sprintf(
'SELECT *
FROM tsesion
WHERE %s
ORDER BY %s',
$filter,
$order
);
}
$data = db_get_all_rows_sql($sql);
if (empty($data) === false) {

View File

@ -102,12 +102,26 @@ class Heatmap
protected $group = null;
/**
* Heatmap group.
* Heatmap dashboard.
*
* @var boolean
*/
protected $dashboard = null;
/**
* Public hash.
*
* @var boolean
*/
protected $hash = null;
/**
* Public user.
*
* @var boolean
*/
protected $publicUser = null;
/**
* Constructor function
@ -131,7 +145,9 @@ class Heatmap
int $height=0,
string $search=null,
int $group=1,
bool $dashboard=false
bool $dashboard=false,
string $hash='',
string $publicUser=''
) {
$this->type = $type;
$this->filter = $filter;
@ -142,6 +158,8 @@ class Heatmap
$this->search = $search;
$this->group = $group;
$this->dashboard = $dashboard;
$this->hash = $hash;
$this->publicUser = $publicUser;
}
@ -164,15 +182,18 @@ class Heatmap
false
),
'data' => [
'page' => 'operation/heatmap',
'method' => 'showHeatmap',
'randomId' => $this->randomId,
'type' => $this->type,
'filter' => $this->filter,
'refresh' => $this->refresh,
'search' => $this->search,
'group' => $this->group,
'dashboard' => (int) $this->dashboard,
'page' => 'operation/heatmap',
'method' => 'showHeatmap',
'randomId' => $this->randomId,
'type' => $this->type,
'filter' => $this->filter,
'refresh' => $this->refresh,
'search' => $this->search,
'group' => $this->group,
'dashboard' => (int) $this->dashboard,
'auth_hash' => $this->hash,
'auth_class' => 'PandoraFMS\Dashboard\Manager',
'id_user' => $this->publicUser,
],
];
@ -1090,6 +1111,7 @@ class Heatmap
case 3:
$status = 'unknown';
break;
case AGENT_MODULE_STATUS_NO_DATA:
case AGENT_MODULE_STATUS_NOT_INIT:
case 5:
$status = 'notinit';

View File

@ -568,7 +568,7 @@ class TipsWindow
}
$sql = sprintf(
'SELECT id, name AS language, title, text, url, enable
'SELECT id, id_language AS language, title, text, url, enable
FROM twelcome_tip t
LEFT JOIN tlanguage l ON t.id_lang COLLATE utf8mb4_unicode_ci = CONVERT(l.id_language USING utf8mb4) COLLATE utf8mb4_unicode_ci
%s %s %s',

View File

@ -162,7 +162,7 @@ class WebServerModuleDebug extends Wizard
results.setReadOnly(true);
results.setShowPrintMargin(false);
$("#submit-execute_query").click(function() {
$("#button-execute_query").click(function() {
// Show the spinner.
showSpinner(true);
// Empty the results container.

View File

@ -20,8 +20,8 @@
/**
* Pandora build version and version
*/
$build_version = 'PC230508';
$pandora_version = 'v7.0NG.770';
$build_version = 'PC230519';
$pandora_version = 'v7.0NG.771';
// Do not overwrite default timezone set if defined.
$script_tz = @date_default_timezone_get();
@ -220,7 +220,7 @@ if (!isset($config['inventory_changes_blacklist'])) {
if (!isset($config['url_update_manager'])) {
config_update_value(
'url_update_manager',
'https://licensing.artica.es/pandoraupdate7/server.php'
'https://licensing.pandorafms.com/pandoraupdate7/server.php'
);
}

View File

@ -2149,8 +2149,9 @@ function get_group_alerts(
break;
}
// WHEN SELECT ALL TAGS TO FILTER ALERTS
$modules_tags = count(db_process_sql('select * from ttag'));
// WHEN SELECT ALL TAGS TO FILTER ALERTS.
$modules_tag_query = db_process_sql('select * from ttag');
$modules_tags = ($modules_tag_query !== false) ? (count($modules_tag_query)) : false;
$modules_user_tags = count(explode(',', $tag));

View File

@ -9612,6 +9612,7 @@ function api_set_new_user($id, $thrash2, $other, $thrash3)
$values['section'] = $other['data'][11];
$values['session_time'] = $other['data'][12];
$values['metaconsole_access_node'] = $other['data'][13];
$values['api_token'] = api_token_generate();
if (empty($password) === true) {
returnError('Password cannot be empty.');
@ -9708,6 +9709,8 @@ function api_set_update_user($id, $thrash2, $other, $thrash3)
if (!update_user_password($id, $other['data'][4])) {
returnError('The user could not be updated. Password info incorrect.');
return;
} else {
$values['api_token'] = api_token_generate();
}
}

View File

@ -3813,7 +3813,7 @@ function get_um_url()
$url = $config['url_update_manager'];
$url = substr($url, 0, (strlen($url) - strpos(strrev($url), '/')));
} else {
$url = 'https://licensing.artica.es/pandoraupdate7/';
$url = 'https://licensing.pandorafms.com/pandoraupdate7/';
config_update_value(
'url_update_manager',
$url.'/server.php'

View File

@ -2665,7 +2665,7 @@ function events_print_type_img(
$urlImage = ui_get_full_url(false);
$icon = '';
$style = 'invert_filter main_menu_icon';
$style = 'main_menu_icon';
switch ($type) {
case 'alert_recovered':
@ -2702,23 +2702,28 @@ function events_print_type_img(
break;
case 'system':
$style .= ' invert_filter';
$icon = 'images/configuration@svg.svg';
break;
case 'recon_host_detected':
$style .= ' invert_filter';
$icon = 'images/recon.png';
break;
case 'new_agent':
$style .= ' invert_filter';
$icon = 'images/agents@svg.svg';
break;
case 'configuration_change':
$style .= ' invert_filter';
$icon = 'images/configuration@svg.svg';
break;
case 'unknown':
default:
$style .= ' invert_filter';
$icon = 'images/event.svg';
break;
}

View File

@ -601,7 +601,7 @@ function filemanager_file_explorer(
}
}).show();
$("#submit-submit").on("click", copyToClipboard);
$("#button-submit").on("click", copyToClipboard);
}
function copyToClipboard() {

View File

@ -4273,22 +4273,22 @@ function html_print_checkbox_extended(
if (is_array($attributes) === true) {
$tmpAttributes = [];
foreach ($attributes as $key => $value) {
foreach ($attributes as $key => $val) {
switch ($key) {
case 'input_class':
$inputClass .= ' '.$value;
$inputClass .= ' '.$val;
break;
case 'label_class':
$labelClass .= ' '.$value;
$labelClass .= ' '.$val;
break;
case 'label_style':
$labelStyle .= 'style="'.$value.'"';
$labelStyle .= 'style="'.$val.'"';
break;
default:
$tmpAttributes[] = $key.'="'.$value.'"';
$tmpAttributes[] = $key.'="'.$val.'"';
break;
}
}
@ -4622,6 +4622,14 @@ function html_print_image(
$output .= 'data-use_title_for_force_title="1" ';
}
if (isset($options['main_menu_icon']) && $options['main_menu_icon'] != '') {
if (isset($options['class'])) {
$options['class'] .= ' main_menu_icon';
} else {
$options['class'] = 'main_menu_icon';
}
}
// Valid attributes (invalid attributes get skipped).
$attrs = [
'height',

View File

@ -834,12 +834,80 @@ function get_data_basic_info_sql($params, $count=false)
);
}
if ($params['order'] > 0) {
$str_split = explode(' ', $params['order']);
switch ($str_split[0]) {
case 'alias':
$params['order'] = 'alias '.$str_split[1];
break;
case 'ip':
$params['order'] = 'direccion '.$str_split[1];
break;
case 'secondoaryIp':
$params['order'] = 'fixed_ip '.$str_split[1];
break;
case 'group':
$params['order'] = 'id_grupo '.$str_split[1];
break;
case 'secondaryGroups':
$params['order'] = 'tagent_secondary_group.id_group '.$str_split[1];
break;
case 'description':
$params['order'] = 'comentarios '.$str_split[1];
break;
case 'os':
$params['order'] = 'id_os '.$str_split[1];
break;
case 'interval':
$params['order'] = 'intervalo '.$str_split[1];
break;
case 'lastContact':
$params['order'] = 'ultimo_contacto '.$str_split[1];
break;
case 'lastStatusChange':
$params['order'] = 'tagente_estado.last_status_change '.$str_split[1];
break;
case 'customFields':
$params['order'] = 'tagent_custom_data.id_field '.$str_split[1];
break;
case 'valuesCustomFields':
$params['order'] = 'tagent_custom_data.description '.$str_split[1];
break;
default:
$params['order'] = 'alias '.$str_split[1];
break;
}
}
$limit_condition = '';
$order_condition = '';
$fields = 'count(*)';
$innerjoin = '';
$groupby = '';
$table = 'tagente';
if (is_metaconsole() === true) {
$table = 'tmetaconsole_agent';
}
if ($count !== true) {
$fields = '*';
$innerjoin = 'LEFT JOIN tagente_estado ON '.$table.'.id_agente = tagente_estado.id_agente ';
$innerjoin .= 'LEFT JOIN tagent_secondary_group ON '.$table.'.id_agente = tagent_secondary_group.id_agent ';
$innerjoin .= 'LEFT JOIN tagent_custom_data ON '.$table.'.id_agente = tagent_custom_data.id_agent ';
$groupby = 'GROUP BY '.$table.'.id_agente';
$limit_condition = sprintf(
'LIMIT %d, %d',
$params['start'],
@ -849,20 +917,19 @@ function get_data_basic_info_sql($params, $count=false)
$order_condition = sprintf('ORDER BY %s', $params['order']);
}
$table = 'tagente';
if (is_metaconsole() === true) {
$table = 'tmetaconsole_agent';
}
$sql = sprintf(
'SELECT %s
FROM %s
%s
%s
%s
%s
%s',
$fields,
$table,
$innerjoin,
$where,
$groupby,
$order_condition,
$limit_condition
);

View File

@ -868,6 +868,7 @@ if (is_ajax()) {
global $pandora_version;
global $build_version;
$product_name = io_safe_output(get_product_name());
$license_expiry_date = substr($config['license_expiry_date'], 0, 4).'/'.substr($config['license_expiry_date'], 4, 2).'/'.substr($config['license_expiry_date'], 6, 2);
include_once $config['homedir'].'/include/class/Diagnostics.class.php';
$d = new Diagnostics;
@ -957,7 +958,7 @@ if (is_ajax()) {
<p><span>'.__('Version').' '.$pandora_version.' - '.(enterprise_installed() ? 'Enterprise' : 'Community').'</span></p>
<p><span>'.__('MR version').'</span> MR'.$config['MR'].'</p>
<p><span>'.__('Build').'</span> '.$build_version.'</p>
<p style="margin-bottom: 20px!important;"><span>'.__('Support expires').'</span> 2023/04/26</p>';
<p style="margin-bottom: 20px!important;"><span>'.__('Support expires').'</span>'.$license_expiry_date.'</p>';
if (((bool) check_acl($config['id_user'], 0, 'PM') === true) && (is_metaconsole() === false)) {
$dialogButtons = [];

View File

@ -1122,10 +1122,18 @@ function snmp_browser_print_container(
if ($toggle === false) {
// This extra div that can be handled by jquery's dialog.
$output .= '<div id="snmp_browser_container" style="display:none">';
$output .= '<div id="snmp_browser_container" style="'.$display.'">';
$output .= '<div style="text-align: left; width: '.$width.'; height: '.$height.';">';
$output .= '<div class="w100p">';
$output .= '<form onsubmit="snmpBrowse(); return false;">';
$output .= html_print_input_hidden(
'id_agent_module',
0,
true,
false,
false,
'id_agent_module'
);
$output .= html_print_table($table, true);
$output .= html_print_div(
[

View File

@ -988,7 +988,10 @@ function ui_print_type_agent_icon(
$output = html_print_image(
'images/satellite@os.svg',
true,
['class' => 'main_menu_icon invert_filter'],
[
'class' => 'main_menu_icon invert_filter',
'style' => 'padding-right: 10px;',
],
false,
false,
false,
@ -1000,7 +1003,10 @@ function ui_print_type_agent_icon(
$output = html_print_image(
'images/network-server@os.svg',
true,
['class' => 'main_menu_icon invert_filter'],
[
'class' => 'main_menu_icon invert_filter',
'style' => 'padding-right: 10px;',
],
false,
false,
false,
@ -1012,7 +1018,10 @@ function ui_print_type_agent_icon(
$output = html_print_image(
'images/data-server@svg.svg',
true,
['class' => 'main_menu_icon invert_filter'],
[
'class' => 'main_menu_icon invert_filter',
'style' => 'padding-right: 10px;',
],
false,
false,
false,
@ -2439,7 +2448,7 @@ function ui_pagination(
$script_modified
);
$anchorHref = 'javascript: ".$script_modified.";';
$anchorHref = 'javascript: '.$script_modified.';';
} else {
$anchorHref = $url.'&amp;'.$offset_name.'='.$offset_page;
}
@ -2484,7 +2493,7 @@ function ui_pagination(
$script_modified
);
$nextHref = 'javascript: ".$script_modified.";';
$nextHref = 'javascript: '.$script_modified.';';
} else {
$nextHref = $url.'&amp;'.$offset_name.'='.$offset_next_page;
}
@ -2516,7 +2525,7 @@ function ui_pagination(
$script_modified
);
$lastHref = 'javascript: ".$script_modified.";';
$lastHref = 'javascript: '.$script_modified.';';
} else {
$lastHref = $url.'&amp;'.$offset_name.'='.$offset_lastpage;
}
@ -4010,7 +4019,7 @@ function ui_print_datatable(array $parameters)
$(".datatable-msg-info-'.$table_id.'").hide();
$("table#'.$table_id.'").show();
$("div.dataTables_paginate").show();
$("div.dataTables_info").show();
$("div.dataTables_info").hide();
$("div.dataTables_length").show();
$("div.dt-buttons").show();
@ -7232,10 +7241,8 @@ function ui_query_result_editor($name='default')
]
);
$buttons = html_print_submit_button(__('Execute query'), 'execute_query', false, ['icon' => 'update'], true);
html_print_action_buttons(
$buttons
);
html_print_submit_button(__('Execute query'), 'execute_query', false, ['icon' => 'update']);
}

View File

@ -2846,8 +2846,11 @@ function get_donut_module_data($id_module)
$values_to_return = [];
foreach ($values as $val) {
$data = explode(',', $val);
if (empty($val) === true) {
continue;
}
$data = explode(',', $val);
if ($data[0] === $val) {
continue;
}
@ -3173,7 +3176,12 @@ function visual_map_get_image_status_element($layoutData, $status=false)
if ($layoutData['type'] == 5) {
// ICON ELEMENT.
$img .= '.png';
$url = parse_url($layoutData['image']);
if (isset($url['scheme']) === false) {
$img .= '.png';
} else {
$img = $layoutData['image'];
}
} else {
if ($status === false) {
$status = visual_map_get_status_element($layoutData);

View File

@ -344,7 +344,11 @@ function drawRating($rating, $width, $height, $font, $out_of_lim_str, $mode, $fo
$image = imagecreate($width, $height);
// colors
$back = imagecolorallocate($image, 241, 241, 241);
if ($config['style'] === 'pandora_black') {
$back = imagecolorallocate($image, 34, 34, 34);
} else {
$back = imagecolorallocate($image, 241, 241, 241);
}
$bordercolor = imagecolorallocate($image, 241, 241, 241);
$text = imagecolorallocate($image, 74, 74, 74);

View File

@ -826,7 +826,7 @@ function sunburst(recipient, data, width, height, tooltip = true) {
height = width;
}
var radius = Math.min(width, height) / 2;
var radius = Math.min(width, height) / 2 - 40;
var x = d3.scale.linear().range([0, 2 * Math.PI]);

View File

@ -1395,6 +1395,76 @@
duration = +_;
return zoom;
};
zoom.setTranslate = function(v) {
translate = v;
};
zoom.convertLevelsToScale = function(i) {
min = Math.pow(2, (-360 * i) * .002) * 1;
max = Math.pow(2, (360 * i) * .002) * 1;
return [min, max];
};
zoom.getZoomLevel = function(x, y) {
if (typeof(x) == 'undefined') {
x = 0;
//Get center
}
if (typeof(y) == 'undefined') {
y = 0;
//Get center
}
var zoom_levels = [];
if (!translate0)
translate0 = location([x, y]);
var old_scale = scale;
var old_translate = [translate[0], translate[1]];
var count = 0;
scale = 1;
high_levels = [];
high_levels.push({'scale': scale, 'translate': [translate[0], translate[1]]});
do {
scaleTo(Math.pow(2, 360 * .002) * scale);
translateTo([x, y], translate0);
high_levels.push({'scale': scale, 'translate': [translate[0], translate[1]]});
if (count > 30) {
break;
}
count++;
}
while (scale < scaleExtent[1]);
scale = 1;
count = 0;
do {
scaleTo(Math.pow(2, -360 * .002) * scale);
translateTo([x, y], translate0);
zoom_levels.push({'scale': scale, 'translate': [translate[0], translate[1]]});
if (count > 30) {
break;
}
count++;
}
while (scale > scaleExtent[0]);
zoom_levels.reverse();
high_levels.forEach(function(v, i) {
zoom_levels.push(v);
});
scale = old_scale;
translate = old_translate;
return zoom_levels;
};
zoom.x = function(z) {
if (!arguments.length) return x1;
x1 = z;
@ -9550,4 +9620,4 @@
return request.responseXML;
});
if (typeof define === "function" && define.amd) this.d3 = d3, define(d3); else if (typeof module === "object" && module.exports) module.exports = d3; else this.d3 = d3;
}();
}();

View File

@ -1436,7 +1436,7 @@ function openURLTagWindow(url) {
function defineTinyMCE(selector) {
tinymce.init({
selector: selector,
plugins: "preview, searchreplace, table, nonbreaking",
plugins: "preview, searchreplace, table, nonbreaking, link, image",
promotion: false,
branding: false
});

View File

@ -21,7 +21,10 @@ function parse_alert_command(command, classs) {
"[RECOVER]" + $($(".fields")[nfield - 1]).val()
);
}
} else if ($(this).css("-webkit-text-security") == "disc") {
} else if (
$(this).css("-webkit-text-security") == "disc" ||
$(this).css("font-family") == "text-security-disc"
) {
var hidden_character = "*";
var hidden_string = hidden_character.repeat($(this).val().length);

Some files were not shown because too many files have changed in this diff Show More