Merge branch 'develop' into ent-9270-dos-mejoras-en-el-interface-view
This commit is contained in:
commit
bb95dadb4f
|
@ -285,11 +285,16 @@ server_dependencies=" \
|
|||
java \
|
||||
bind-utils \
|
||||
whois \
|
||||
cpanminus \
|
||||
http://firefly.artica.es/centos7/xprobe2-0.3-12.2.x86_64.rpm \
|
||||
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"
|
||||
execute_cmd "yum install -y $server_dependencies" "Installing Pandora FMS Server dependencies"
|
||||
|
||||
# install cpan dependencies
|
||||
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 \
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#######################################################
|
||||
## Tested versions ##
|
||||
# Centos 8.4, 8.5
|
||||
# Rocky 8.4, 8.5
|
||||
# Rocky 8.4, 8.5, 8.6, 8.7
|
||||
# Almalinuz 8.4, 8.5
|
||||
# RedHat 8.5
|
||||
|
||||
|
@ -14,24 +14,25 @@ PANDORA_SERVER_CONF=/etc/pandora/pandora_server.conf
|
|||
PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
|
||||
|
||||
|
||||
S_VERSION='202209231'
|
||||
S_VERSION='202301251'
|
||||
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
|
||||
|
||||
# define default variables
|
||||
[ "$TZ" ] || TZ="Europe/Madrid"
|
||||
[ "$MYVER" ] || MYVER=57
|
||||
[ "$PHPVER" ] || PHPVER=8
|
||||
[ "$DBHOST" ] || DBHOST=127.0.0.1
|
||||
[ "$DBNAME" ] || DBNAME=pandora
|
||||
[ "$DBUSER" ] || DBUSER=pandora
|
||||
[ "$DBPASS" ] || DBPASS=pandora
|
||||
[ "$DBPORT" ] || DBPORT=3306
|
||||
[ "$TZ" ] || TZ="Europe/Madrid"
|
||||
[ "$MYVER" ] || MYVER=57
|
||||
[ "$PHPVER" ] || PHPVER=8
|
||||
[ "$DBHOST" ] || DBHOST=127.0.0.1
|
||||
[ "$DBNAME" ] || DBNAME=pandora
|
||||
[ "$DBUSER" ] || DBUSER=pandora
|
||||
[ "$DBPASS" ] || DBPASS=pandora
|
||||
[ "$DBPORT" ] || DBPORT=3306
|
||||
[ "$DBROOTUSER" ] || DBROOTUSER=root
|
||||
[ "$DBROOTPASS" ] || DBROOTPASS=pandora
|
||||
[ "$SKIP_PRECHECK" ] || SKIP_PRECHECK=0
|
||||
[ "$SKIP_DATABASE_INSTALL" ] || SKIP_DATABASE_INSTALL=0
|
||||
[ "$SKIP_DATABASE_INSTALL" ] || SKIP_DATABASE_INSTALL=0
|
||||
[ "$SKIP_KERNEL_OPTIMIZATIONS" ] || SKIP_KERNEL_OPTIMIZATIONS=0
|
||||
[ "$POOL_SIZE" ] || POOL_SIZE=$(grep -i total /proc/meminfo | head -1 | awk '{printf "%.2f \n", $(NF-1)*0.4/1024}' | sed "s/\\..*$/M/g")
|
||||
[ "$POOL_SIZE" ] || POOL_SIZE=$(grep -i total /proc/meminfo | head -1 | awk '{printf "%.2f \n", $(NF-1)*0.4/1024}' | sed "s/\\..*$/M/g")
|
||||
[ "$PANDORA_LTS" ] || PANDORA_LTS=1
|
||||
[ "$PANDORA_BETA" ] || PANDORA_BETA=0
|
||||
|
||||
# Ansi color code variables
|
||||
|
@ -41,7 +42,6 @@ cyan="\e[0;36m"
|
|||
reset="\e[0m"
|
||||
|
||||
# Functions
|
||||
|
||||
execute_cmd () {
|
||||
local cmd="$1"
|
||||
local msg="$2"
|
||||
|
@ -76,7 +76,7 @@ check_cmd_status () {
|
|||
check_pre_pandora () {
|
||||
|
||||
echo -en "${cyan}Checking environment ... ${reset}"
|
||||
rpm -qa | grep 'pandorafms_' &>> /dev/null && local fail=true
|
||||
rpm -qa | grep -v "pandorawmic" | grep 'pandorafms_' &>> /dev/null && local fail=true
|
||||
[ -d "$PANDORA_CONSOLE" ] && local fail=true
|
||||
[ -f /usr/bin/pandora_server ] && local fail=true
|
||||
|
||||
|
@ -137,7 +137,10 @@ check_root_permissions
|
|||
[ "$SKIP_PRECHECK" == 1 ] || check_pre_pandora
|
||||
|
||||
#advicing BETA PROGRAM
|
||||
[ "$PANDORA_BETA" -ne '0' ] && echo -e "${red}BETA version enable using nightly PandoraFMS packages${reset}"
|
||||
INSTALLING_VER="${green}RRR version enable using RRR PandoraFMS packages${reset}"
|
||||
[ "$PANDORA_BETA" -ne '0' ] && INSTALLING_VER="${red}BETA version enable using nightly PandoraFMS packages${reset}"
|
||||
[ "$PANDORA_LTS" -ne '0' ] && INSTALLING_VER="${green}LTS version enable using LTS PandoraFMS packages${reset}"
|
||||
echo -e $INSTALLING_VER
|
||||
|
||||
# Connectivity
|
||||
check_repo_connection
|
||||
|
@ -467,6 +470,8 @@ query_cache_size = 64M
|
|||
query_cache_min_res_unit = 2k
|
||||
query_cache_limit = 256K
|
||||
|
||||
#skip-log-bin
|
||||
|
||||
sql_mode=""
|
||||
|
||||
[mysqld_safe]
|
||||
|
@ -477,6 +482,7 @@ EO_CONFIG_F
|
|||
|
||||
if [ "$MYVER" -eq '80' ] ; then
|
||||
sed -i -e "/query_cache.*/ s/^#*/#/g" /etc/my.cnf
|
||||
sed -i -e "s/#skip-log-bin/skip-log-bin/g" /etc/my.cnf
|
||||
fi
|
||||
|
||||
execute_cmd "systemctl restart mysqld" "Configuring database engine"
|
||||
|
@ -485,11 +491,18 @@ fi
|
|||
export MYSQL_PWD=$DBPASS
|
||||
|
||||
#Define packages
|
||||
if [ "$PANDORA_BETA" -eq '0' ] ; then
|
||||
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"
|
||||
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"
|
||||
elif [ "$PANDORA_BETA" -ne '0' ] ; then
|
||||
fi
|
||||
|
||||
# if beta is enable
|
||||
if [ "$PANDORA_BETA" -eq '1' ] ; then
|
||||
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_server-latest.x86_64.rpm"
|
||||
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="https://pandorafms.com/community/community-console-rpm-beta/"
|
||||
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm"
|
||||
|
|
|
@ -16,7 +16,7 @@ PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
|
|||
WORKDIR=/opt/pandora/deploy
|
||||
|
||||
|
||||
S_VERSION='2022052501'
|
||||
S_VERSION='202301251'
|
||||
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
|
||||
rm -f $LOGFILE &> /dev/null # remove last log before start
|
||||
|
||||
|
@ -34,6 +34,8 @@ rm -f $LOGFILE &> /dev/null # remove last log before start
|
|||
[ "$SKIP_KERNEL_OPTIMIZATIONS" ] || SKIP_KERNEL_OPTIMIZATIONS=0
|
||||
[ "$POOL_SIZE" ] || POOL_SIZE=$(grep -i total /proc/meminfo | head -1 | awk '{printf "%.2f \n", $(NF-1)*0.4/1024}' | sed "s/\\..*$/M/g")
|
||||
[ "$PANDORA_BETA" ] || PANDORA_BETA=0
|
||||
[ "$PANDORA_LTS" ] || PANDORA_LTS=1
|
||||
|
||||
|
||||
# Ansi color code variables
|
||||
red="\e[0;91m"
|
||||
|
@ -134,7 +136,10 @@ check_root_permissions
|
|||
[ "$SKIP_PRECHECK" == 1 ] || check_pre_pandora
|
||||
|
||||
#advicing BETA PROGRAM
|
||||
[ "$PANDORA_BETA" -ne '0' ] && echo -e "${red}BETA version enable using nightly PandoraFMS packages${reset}"
|
||||
INSTALLING_VER="${green}RRR version enable using RRR PandoraFMS packages${reset}"
|
||||
[ "$PANDORA_BETA" -ne '0' ] && INSTALLING_VER="${red}BETA version enable using nightly PandoraFMS packages${reset}"
|
||||
[ "$PANDORA_LTS" -ne '0' ] && INSTALLING_VER="${green}LTS version enable using LTS PandoraFMS packages${reset}"
|
||||
echo -e $INSTALLING_VER
|
||||
|
||||
# Connectivity
|
||||
check_repo_connection
|
||||
|
@ -272,14 +277,19 @@ echo -en "${cyan}Installing phantomjs...${reset}"
|
|||
/usr/bin/phantomjs --version &>> "$LOGFILE"
|
||||
check_cmd_status "Error Installing phanromjs"
|
||||
|
||||
# create symlink for fping
|
||||
rm -f /usr/sbin/fping &>> "$LOGFILE"
|
||||
ln -s /usr/bin/fping /usr/sbin/fping &>> "$LOGFILE"
|
||||
|
||||
# Chrome
|
||||
rm -f /usr/bin/chromium-browser &>> "$LOGFILE"
|
||||
execute_cmd "wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb" "Downloading google chrome"
|
||||
execute_cmd "apt install -y ./google-chrome-stable_current_amd64.deb" "Intalling google chrome"
|
||||
execute_cmd "ln -s /usr/bin/google-chrome /usr/bin/chromium-browser" "Creating /usr/bin/chromium-browser Symlink"
|
||||
|
||||
# SDK VMware perl dependencies
|
||||
vmware_dependencies=" \
|
||||
lib32z1 \
|
||||
vmware_dependencies="\
|
||||
lib32z1 \
|
||||
lib32z1 \
|
||||
build-essential \
|
||||
uuid uuid-dev \
|
||||
|
@ -350,16 +360,22 @@ systemctl stop apparmor &>> "$LOGFILE"
|
|||
systemctl disable apparmor &>> "$LOGFILE"
|
||||
|
||||
#install mysql
|
||||
debconf-set-selections <<< $(echo -n "mysql-server mysql-server/root_password password $DBROOTPASS") &>> "$LOGFILE"
|
||||
debconf-set-selections <<< $(echo -n "mysql-server mysql-server/root_password_again password $DBROOTPASS") &>> "$LOGFILE"
|
||||
echo -en "${cyan}Installing MySql Server...${reset}"
|
||||
env DEBIAN_FRONTEND=noninteractive apt install -y mysql-server &>> "$LOGFILE"
|
||||
execute_cmd "curl -O https://repo.percona.com/apt/percona-release_latest.generic_all.deb" "Downloading Percona repository for MySQL8"
|
||||
execute_cmd "apt install -y gnupg2 lsb-release ./percona-release_latest.generic_all.deb" "Installing Percona repository for MySQL8"
|
||||
execute_cmd "percona-release setup ps80" "Configuring Percona repository for MySQL8"
|
||||
|
||||
echo -en "${cyan}Installing Percona Server for MySQL8...${reset}"
|
||||
env DEBIAN_FRONTEND=noninteractive apt install -y percona-server-server &>> "$LOGFILE"
|
||||
check_cmd_status "Error Installing MySql Server"
|
||||
|
||||
|
||||
#Configuring Database
|
||||
if [ "$SKIP_DATABASE_INSTALL" -eq '0' ] ; then
|
||||
execute_cmd "systemctl start mysql" "Starting database engine"
|
||||
|
||||
echo """
|
||||
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '$DBROOTPASS';
|
||||
""" | mysql -uroot &>> "$LOGFILE"
|
||||
|
||||
export MYSQL_PWD=$DBROOTPASS
|
||||
echo -en "${cyan}Creating Pandora FMS database...${reset}"
|
||||
|
@ -399,11 +415,12 @@ max_connections = 100
|
|||
|
||||
key_buffer_size=4M
|
||||
read_buffer_size=128K
|
||||
|
||||
read_rnd_buffer_size=128K
|
||||
sort_buffer_size=128K
|
||||
join_buffer_size=4M
|
||||
|
||||
skip-log-bin
|
||||
|
||||
sql_mode=""
|
||||
|
||||
log-error=/var/log/mysql/error.log
|
||||
|
@ -417,11 +434,17 @@ execute_cmd "systemctl restart mysql" "Configuring and restarting database engin
|
|||
|
||||
|
||||
#Define packages
|
||||
if [ "$PANDORA_BETA" -eq '0' ] ; then
|
||||
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"
|
||||
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"
|
||||
elif [ "$PANDORA_BETA" -ne '0' ] ; then
|
||||
fi
|
||||
|
||||
if [ "$PANDORA_BETA" -eq '1' ] ; then
|
||||
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_server-latest_x86_64.tar.gz"
|
||||
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_console-latest.tar.gz"
|
||||
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.tar.gz"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.767, AIX version
|
||||
# Version 7.0NG.768, AIX version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.767, FreeBSD Version
|
||||
# Version 7.0NG.768, FreeBSD Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.767, HP-UX Version
|
||||
# Version 7.0NG.768, HP-UX Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.767, GNU/Linux
|
||||
# Version 7.0NG.768, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.767, GNU/Linux
|
||||
# Version 7.0NG.768, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.767, Solaris Version
|
||||
# Version 7.0NG.768, Solaris Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Base config file for Pandora FMS Windows Agent
|
||||
# (c) 2006-2021 Artica Soluciones Tecnologicas
|
||||
# Version 7.0NG.767
|
||||
# Version 7.0NG.768
|
||||
# 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.767, AIX version
|
||||
# Version 7.0NG.768, AIX version
|
||||
|
||||
# General Parameters
|
||||
# ==================
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.767
|
||||
# Version 7.0NG.768
|
||||
# FreeBSD/IPSO version
|
||||
# Licenced under GPL licence, 2003-2007 Sancho Lerena
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.767, HPUX Version
|
||||
# Version 7.0NG.768, HPUX Version
|
||||
|
||||
# General Parameters
|
||||
# ==================
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.767
|
||||
# Version 7.0NG.768
|
||||
# Licensed under GPL license v2,
|
||||
# (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# please visit http://pandora.sourceforge.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.767
|
||||
# Version 7.0NG.768
|
||||
# Licensed under GPL license v2,
|
||||
# (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# please visit http://pandora.sourceforge.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.767
|
||||
# Version 7.0NG.768
|
||||
# Licensed under GPL license v2,
|
||||
# please visit http://pandora.sourceforge.net
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.767, Solaris version
|
||||
# Version 7.0NG.768, Solaris version
|
||||
|
||||
# General Parameters
|
||||
# ==================
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.767, AIX version
|
||||
# Version 7.0NG.768, AIX version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.767-230118
|
||||
Version: 7.0NG.768-230131
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.767-230118"
|
||||
pandora_version="7.0NG.768-230131"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
|
|
@ -31,7 +31,7 @@ fi
|
|||
if [ "$#" -ge 2 ]; then
|
||||
VERSION="$2"
|
||||
else
|
||||
VERSION="7.0NG.767"
|
||||
VERSION="7.0NG.768"
|
||||
fi
|
||||
|
||||
# Path for the generated DMG 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.767" onConclusion="none">pandorafms_src.pdk</pkg-ref>
|
||||
<pkg-ref id="com.pandorafms.pandorafms_src" version="7.0NG.768" 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.767" onConclusion="none">pandorafms_uninstall.pdk</pkg-ref>
|
||||
<pkg-ref id="com.pandorafms.pandorafms_uninstall" version="7.0NG.768" onConclusion="none">pandorafms_uninstall.pdk</pkg-ref>
|
||||
<!-- <installation-check script="check()" />
|
||||
<script>
|
||||
<![CDATA[
|
||||
|
|
|
@ -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.767</string>
|
||||
<key>CFBundleGetInfoString</key> <string>7.0NG.767 Pandora FMS Agent uninstaller for MacOS by Artica ST on Aug 2020</string>
|
||||
<key>CFBundleShortVersionString</key> <string>7.0NG.767</string>
|
||||
<key>CFBundleVersion</key> <string>7.0NG.768</string>
|
||||
<key>CFBundleGetInfoString</key> <string>7.0NG.768 Pandora FMS Agent uninstaller for MacOS by Artica ST on Aug 2020</string>
|
||||
<key>CFBundleShortVersionString</key> <string>7.0NG.768</string>
|
||||
|
||||
<key>NSPrincipalClass</key><string>NSApplication</string>
|
||||
<key>NSMainNibFile</key><string>MainMenu</string>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.767, GNU/Linux
|
||||
# Version 7.0NG.768, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.767, FreeBSD Version
|
||||
# Version 7.0NG.768, FreeBSD Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.767, HP-UX Version
|
||||
# Version 7.0NG.768, HP-UX Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.767, GNU/Linux
|
||||
# Version 7.0NG.768, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.767, GNU/Linux
|
||||
# Version 7.0NG.768, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.767, NetBSD Version
|
||||
# Version 7.0NG.768, NetBSD Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.767, Solaris Version
|
||||
# Version 7.0NG.768, Solaris Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1014,8 +1014,8 @@ my $Sem = undef;
|
|||
# Semaphore used to control the number of threads
|
||||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '7.0NG.767';
|
||||
use constant AGENT_BUILD => '230118';
|
||||
use constant AGENT_VERSION => '7.0NG.768';
|
||||
use constant AGENT_BUILD => '230131';
|
||||
|
||||
# Agent log default file size maximum and instances
|
||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
#Pandora FMS Linux Agent
|
||||
#
|
||||
%define name pandorafms_agent_linux
|
||||
%define version 7.0NG.767
|
||||
%define release 230118
|
||||
%define version 7.0NG.768
|
||||
%define release 230131
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
#Pandora FMS Linux Agent
|
||||
#
|
||||
%define name pandorafms_agent_linux
|
||||
%define version 7.0NG.767
|
||||
%define release 230118
|
||||
%define version 7.0NG.768
|
||||
%define release 230131
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
# Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license.
|
||||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.767"
|
||||
PI_BUILD="230118"
|
||||
PI_VERSION="7.0NG.768"
|
||||
PI_BUILD="230131"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Base config file for Pandora FMS Windows Agent
|
||||
# (c) 2006-2021 Artica Soluciones Tecnologicas
|
||||
# Version 7.0NG.767
|
||||
# Version 7.0NG.768
|
||||
# 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
|
||||
|
|
|
@ -3,7 +3,7 @@ AllowLanguageSelection
|
|||
{Yes}
|
||||
|
||||
AppName
|
||||
{Pandora FMS Windows Agent v7.0NG.767}
|
||||
{Pandora FMS Windows Agent v7.0NG.768}
|
||||
|
||||
ApplicationID
|
||||
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
|
||||
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{230118}
|
||||
{230131}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("7.0NG.767 Build 230118")
|
||||
#define PANDORA_VERSION ("7.0NG.768 Build 230131")
|
||||
|
||||
string pandora_path;
|
||||
string pandora_dir;
|
||||
|
|
|
@ -11,7 +11,7 @@ BEGIN
|
|||
VALUE "LegalCopyright", "Artica ST"
|
||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||
VALUE "ProductVersion", "(7.0NG.767(Build 230118))"
|
||||
VALUE "ProductVersion", "(7.0NG.768(Build 230131))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 7.0NG.767-230118
|
||||
Version: 7.0NG.768-230131
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.767-230118"
|
||||
pandora_version="7.0NG.768-230131"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
START TRANSACTION;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `tsesion_filter` (
|
||||
`id_filter` INT NOT NULL AUTO_INCREMENT,
|
||||
`id_name` TEXT NULL,
|
||||
`text` TEXT NULL,
|
||||
`period` TEXT NULL,
|
||||
`ip` TEXT NULL,
|
||||
`type` TEXT NULL,
|
||||
`user` TEXT NULL,
|
||||
PRIMARY KEY (`id_filter`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
COMMIT;
|
Binary file not shown.
Binary file not shown.
|
@ -1283,9 +1283,13 @@ foreach ($modules as $module) {
|
|||
}
|
||||
|
||||
if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW')) {
|
||||
// Check module relatonships to show warning message.
|
||||
$url = htmlentities('index.php?sec=gagente&tab=module&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&delete_module='.$module['id_agente_modulo']);
|
||||
|
||||
// Delete module.
|
||||
$data[9] = '<a 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;">';
|
||||
$data[9] = '<a href="#"
|
||||
onClick="get_children_modules(false, \''.$module['id_agente_modulo'].'\', \''.$url.'\')">';
|
||||
|
||||
$data[9] .= html_print_image(
|
||||
'images/cross.png',
|
||||
true,
|
||||
|
@ -1309,8 +1313,7 @@ foreach ($modules as $module) {
|
|||
}
|
||||
|
||||
if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW')) {
|
||||
echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module"
|
||||
onsubmit="if (! confirm (\''.__('Are you sure?').'\')) return false">';
|
||||
echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module" id="form_multiple_delete">';
|
||||
}
|
||||
|
||||
html_print_table($table);
|
||||
|
@ -1344,6 +1347,8 @@ if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW')) {
|
|||
false,
|
||||
'class="sub next"'
|
||||
);
|
||||
|
||||
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
}
|
||||
|
@ -1352,7 +1357,18 @@ if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW')) {
|
|||
<script type="text/javascript">
|
||||
|
||||
$(document).ready (function () {
|
||||
|
||||
|
||||
$("input[name=submit_modules_action]").click(function (event) {
|
||||
event.preventDefault();
|
||||
var module_action = $('#module_action').val();
|
||||
if(module_action !== 'delete') {
|
||||
$("#form_multiple_delete").submit();
|
||||
} else {
|
||||
get_children_modules(true);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('[id^=checkbox-id_delete]').change(function(){
|
||||
if($(this).parent().parent().hasClass('checkselected')){
|
||||
$(this).parent().parent().removeClass('checkselected');
|
||||
|
@ -1394,4 +1410,60 @@ if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW')) {
|
|||
window.location = window.location + "&checked=true";
|
||||
}
|
||||
}
|
||||
|
||||
function get_children_modules(multiple, id_module, url) {
|
||||
var selected_modules = [];
|
||||
|
||||
if(typeof(id_module) === 'undefined' && multiple === true) {
|
||||
$("input[id^='checkbox-id_delete']:checked").each(function () {
|
||||
selected_modules.push(this.value);
|
||||
});
|
||||
} else {
|
||||
selected_modules = [id_module];
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "ajax.php",
|
||||
dataType: "json",
|
||||
data: {
|
||||
page: 'include/ajax/module',
|
||||
get_children_modules: true,
|
||||
parent_modulues: JSON.parse(JSON.stringify(selected_modules)),
|
||||
},
|
||||
success: function (data) {
|
||||
delete_module_warning(data, multiple, id_module, url);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function delete_module_warning(children, multiple, id_module, url) {
|
||||
var message = '<?php echo __('Are you sure?'); ?>';
|
||||
var ret = false;
|
||||
|
||||
if(children != false) {
|
||||
message += '<br><strong>' + '<?php echo __('This module has children modules.The following modules will also be deleted: '); ?>' + '</strong><ul>';
|
||||
$.each(children, function (key, value) {
|
||||
message += '<li>' + value['nombre'] + '</li>';
|
||||
});
|
||||
message += '</ul>';
|
||||
}
|
||||
|
||||
confirmDialog({
|
||||
title: "<?php echo __('Delete module'); ?>",
|
||||
message: message,
|
||||
onAccept: function() {
|
||||
if(multiple === true) {
|
||||
$("#form_multiple_delete").submit();
|
||||
return true;
|
||||
} else {
|
||||
window.location.href = url;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return true;
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -393,7 +393,7 @@ $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,
|
||||
|
@ -415,7 +415,7 @@ $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,
|
||||
|
@ -711,6 +711,12 @@ $(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();
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -85,6 +85,8 @@ $table_simple->rowstyle['macro_field'] = 'display:none';
|
|||
|
||||
push_table_simple($data, 'macro_field');
|
||||
|
||||
$password_fields = [];
|
||||
|
||||
// If there are $macros, we create the form fields
|
||||
if (!empty($macros)) {
|
||||
$macros = json_decode($macros, true);
|
||||
|
@ -102,7 +104,8 @@ if (!empty($macros)) {
|
|||
}
|
||||
|
||||
if ($m_hide) {
|
||||
$data[1] = html_print_input_password($m['macro'], io_output_password($m['value']), '', 100, 1024, true);
|
||||
$data[1] = html_print_input_password($m['macro'], '', '', 100, 1024, true);
|
||||
array_push($password_fields, $m);
|
||||
} else {
|
||||
$data[1] = html_print_input_text(
|
||||
$m['macro'],
|
||||
|
@ -125,6 +128,17 @@ if (!empty($macros)) {
|
|||
}
|
||||
}
|
||||
|
||||
// Add input password values with js to hide it in browser inspector.
|
||||
foreach ($password_fields as $k => $p) {
|
||||
echo "
|
||||
<script>
|
||||
$(document).ready(() => {
|
||||
$('input[name=\"".$p['macro']."\"]').val('".$p['value']."');
|
||||
});
|
||||
</script>
|
||||
";
|
||||
}
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
function changePluginSelect() {
|
||||
|
@ -140,4 +154,8 @@ if (!empty($macros)) {
|
|||
|
||||
forced_title_callback();
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
observerInputPassword();
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -116,7 +116,7 @@ $data[1] = html_print_input_text(
|
|||
$data[2] = __('Password');
|
||||
$data[3] = html_print_input_password(
|
||||
'plugin_pass',
|
||||
$plugin_pass,
|
||||
'',
|
||||
'',
|
||||
15,
|
||||
60,
|
||||
|
@ -191,6 +191,11 @@ $(document).ready (function () {
|
|||
$("#text-custom_ip_target").hide();
|
||||
}
|
||||
});
|
||||
|
||||
// Add input password values with js to hide it in browser inspector.
|
||||
$('#password-plugin_pass').val('<?php echo $plugin_pass; ?>');
|
||||
|
||||
observerInputPassword();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
|
@ -290,7 +290,7 @@ $search_text = (string) get_parameter('search_text');
|
|||
$date_from = (string) get_parameter('date_from');
|
||||
$date_to = (string) get_parameter('date_to');
|
||||
$execution_type = (string) get_parameter('execution_type');
|
||||
$show_archived = (bool) get_parameter('archived');
|
||||
$show_archived = (bool) get_parameter_switch('archived', false);
|
||||
$agent_id = (int) get_parameter('agent_id');
|
||||
$agent_name = (string) ((empty($agent_id) === false) ? get_parameter('agent_name') : '');
|
||||
$module_id = (int) get_parameter('module_name_hidden');
|
||||
|
@ -313,12 +313,20 @@ $table_form = new StdClass();
|
|||
$table_form->class = 'databox filters';
|
||||
$table_form->width = '100%';
|
||||
$table_form->rowstyle = [];
|
||||
$table_form->cellstyle[0] = ['width: 100px;'];
|
||||
$table_form->cellstyle[1] = ['width: 100px;'];
|
||||
$table_form->cellstyle[1][2] = 'display: flex; align-items: center;';
|
||||
$table_form->cellstyle[2] = ['width: 100px;'];
|
||||
$table_form->cellstyle[3] = ['text-align: right;'];
|
||||
$table_form->colspan[3][0] = 3;
|
||||
$table_form->data = [];
|
||||
|
||||
$row = [];
|
||||
|
||||
// Search text.
|
||||
$row[] = __('Search').' '.html_print_input_text(
|
||||
$row[] = __('Search');
|
||||
|
||||
$row[] = html_print_input_text(
|
||||
'search_text',
|
||||
$search_text,
|
||||
'',
|
||||
|
@ -356,7 +364,8 @@ $execution_type_fields = [
|
|||
'periodically' => __('Periodically'),
|
||||
'cron' => __('Cron'),
|
||||
];
|
||||
$row[] = __('Execution type').' '.html_print_select(
|
||||
$row[] = __('Execution type');
|
||||
$row[] = html_print_select(
|
||||
$execution_type_fields,
|
||||
'execution_type',
|
||||
$execution_type,
|
||||
|
@ -368,11 +377,11 @@ $row[] = __('Execution type').' '.html_print_select(
|
|||
false
|
||||
);
|
||||
// Show past downtimes.
|
||||
$row[] = __('Show past downtimes').' '.html_print_checkbox(
|
||||
'archived',
|
||||
1,
|
||||
$show_archived,
|
||||
true
|
||||
$row[] = __('Show past downtimes').' '.html_print_switch(
|
||||
[
|
||||
'name' => 'archived',
|
||||
'value' => $show_archived,
|
||||
]
|
||||
);
|
||||
|
||||
$table_form->data[] = $row;
|
||||
|
@ -388,8 +397,8 @@ $params['return'] = true;
|
|||
$params['print_hidden_input_idagent'] = true;
|
||||
$params['hidden_input_idagent_name'] = 'agent_id';
|
||||
$params['hidden_input_idagent_value'] = $agent_id;
|
||||
$agent_input = __('Agent').' '.ui_print_agent_autocomplete_input($params);
|
||||
$row[] = $agent_input;
|
||||
$row[] = __('Agent');
|
||||
$row[] = ui_print_agent_autocomplete_input($params);
|
||||
|
||||
// Module.
|
||||
$row[] = __('Module').' '.html_print_autocomplete_modules(
|
||||
|
@ -402,6 +411,10 @@ $row[] = __('Module').' '.html_print_autocomplete_modules(
|
|||
true
|
||||
);
|
||||
|
||||
$table_form->data[] = $row;
|
||||
|
||||
$row = [];
|
||||
|
||||
$row[] = html_print_submit_button(
|
||||
__('Search'),
|
||||
'search',
|
||||
|
|
|
@ -550,7 +550,22 @@ $table->data['form_agents_3'][3] = html_print_select(
|
|||
|
||||
|
||||
$table->data['edit0'][0] = __('Dynamic Interval');
|
||||
$table->data['edit0'][1] = html_print_extended_select_for_time('dynamic_interval', '', '', 'None', '0', 10, true, 'width:150px', false);
|
||||
$table->data['edit0'][1] = html_print_extended_select_for_time(
|
||||
'dynamic_interval',
|
||||
-2,
|
||||
'',
|
||||
'None',
|
||||
'0',
|
||||
10,
|
||||
true,
|
||||
'width:150px',
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
true
|
||||
);
|
||||
$table->data['edit0'][2] = '<table width="100%"><tr><td><em>'.__('Dynamic Min.').'</em></td>';
|
||||
$table->data['edit0'][2] .= '<td align="right">'.html_print_input_text('dynamic_min', '', '', 10, 255, true).'</td></tr>';
|
||||
$table->data['edit0'][2] .= '<tr><td><em>'.__('Dynamic Max.').'</em></td>';
|
||||
|
|
|
@ -177,7 +177,7 @@ switch ($activeTab) {
|
|||
$background_color = (string) get_parameter('background_color');
|
||||
$width = (int) get_parameter('width');
|
||||
$height = (int) get_parameter('height');
|
||||
$visualConsoleName = (string) get_parameter('name');
|
||||
$visualConsoleName = io_safe_input((string) get_parameter('name'));
|
||||
$is_favourite = (int) get_parameter('is_favourite_sent');
|
||||
$auto_adjust = (int) get_parameter('auto_adjust_sent');
|
||||
|
||||
|
|
|
@ -1353,11 +1353,8 @@ $values = [
|
|||
'Alert detail' => __('Alert detail'),
|
||||
'External link' => __('External link'),
|
||||
'Other' => __('Other'),
|
||||
'Dashboard' => __('Dashboard'),
|
||||
];
|
||||
if (!is_metaconsole()) {
|
||||
$values['Dashboard'] = __('Dashboard');
|
||||
}
|
||||
|
||||
|
||||
$home_screen .= html_print_select(
|
||||
$values,
|
||||
|
@ -1372,7 +1369,14 @@ $home_screen .= html_print_select(
|
|||
).'</div>';
|
||||
|
||||
|
||||
$dashboards = Manager::getDashboards(-1, -1);
|
||||
$dashboards = Manager::getDashboards(
|
||||
-1,
|
||||
-1,
|
||||
false,
|
||||
false,
|
||||
$id_usr
|
||||
);
|
||||
|
||||
$dashboards_aux = [];
|
||||
if ($dashboards === false) {
|
||||
$dashboards = ['None' => 'None'];
|
||||
|
|
|
@ -333,6 +333,7 @@ if ($delete_user === true) {
|
|||
$result = delete_user($id_user);
|
||||
|
||||
if ($result) {
|
||||
delete_session_user($id_user);
|
||||
db_pandora_audit(
|
||||
AUDIT_LOG_USER_MANAGEMENT,
|
||||
__('Deleted user %s', io_safe_output($id_user))
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 100 KiB |
Binary file not shown.
After Width: | Height: | Size: 668 KiB |
|
@ -721,7 +721,7 @@ if ($get_agent_alerts_datatable === true) {
|
|||
}
|
||||
break;
|
||||
|
||||
case 'lastFired':
|
||||
case 'last_fired':
|
||||
switch ($sort) {
|
||||
case 'asc':
|
||||
$selectLastFiredasc = $selected;
|
||||
|
|
|
@ -0,0 +1,457 @@
|
|||
<?php
|
||||
/**
|
||||
* Manage AJAX response for event pages.
|
||||
*
|
||||
* @category Ajax
|
||||
* @package Pandora FMS
|
||||
* @subpackage Events
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2023 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Begin.
|
||||
global $config;
|
||||
enterprise_include_once('include/functions_audit.php');
|
||||
|
||||
// Check access.
|
||||
check_login();
|
||||
|
||||
if (! check_acl($config['id_user'], 0, 'ER')
|
||||
&& ! check_acl($config['id_user'], 0, 'EW')
|
||||
&& ! check_acl($config['id_user'], 0, 'EM')
|
||||
) {
|
||||
db_pandora_audit(
|
||||
AUDIT_LOG_ACL_VIOLATION,
|
||||
'Trying to access event viewer'
|
||||
);
|
||||
include 'general/noaccess.php';
|
||||
return;
|
||||
}
|
||||
|
||||
$save_filter_modal = get_parameter('save_filter_modal', 0);
|
||||
$load_filter_modal = get_parameter('load_filter_modal', 0);
|
||||
$get_filter_values = get_parameter('get_filter_values', 0);
|
||||
$update_log_filter = get_parameter('update_log_filter', 0);
|
||||
$save_log_filter = get_parameter('save_log_filter', 0);
|
||||
$recover_aduit_log_select = get_parameter('recover_aduit_log_select', 0);
|
||||
|
||||
|
||||
// Saves an event filter.
|
||||
if ($save_log_filter) {
|
||||
$values = [];
|
||||
$values['id_name'] = get_parameter('id_name');
|
||||
$values['text'] = get_parameter('text', '');
|
||||
$values['period'] = get_parameter('period', '');
|
||||
$values['ip'] = get_parameter('ip', '');
|
||||
$values['type'] = get_parameter('type', -1);
|
||||
$values['user'] = get_parameter('user', -1);
|
||||
|
||||
$exists = (bool) db_get_value_filter(
|
||||
'id_filter',
|
||||
'tsesion_filter',
|
||||
['id_name' => $values['id_name']]
|
||||
);
|
||||
|
||||
if ($exists) {
|
||||
echo 'duplicate';
|
||||
} else {
|
||||
$result = db_process_sql_insert('tsesion_filter', $values);
|
||||
|
||||
if ($result === false) {
|
||||
echo 'error';
|
||||
} else {
|
||||
echo $result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($recover_aduit_log_select) {
|
||||
echo json_encode(audit_get_audit_filter_select());
|
||||
}
|
||||
|
||||
if ($update_log_filter) {
|
||||
$values = [];
|
||||
$id = get_parameter('id');
|
||||
$values['text'] = get_parameter('text', '');
|
||||
$values['period'] = get_parameter('period', '');
|
||||
$values['ip'] = get_parameter('ip', '');
|
||||
$values['type'] = get_parameter('type', -1);
|
||||
$values['user'] = get_parameter('user', -1);
|
||||
|
||||
$result = db_process_sql_update(
|
||||
'tsesion_filter',
|
||||
$values,
|
||||
['id_filter' => $id]
|
||||
);
|
||||
|
||||
if ($result === false) {
|
||||
echo 'error';
|
||||
} else {
|
||||
echo 'ok';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($get_filter_values) {
|
||||
$id_filter = get_parameter('id');
|
||||
|
||||
$event_filter = audit_get_audit_log_filter($id_filter);
|
||||
echo json_encode($event_filter);
|
||||
}
|
||||
|
||||
|
||||
if ($load_filter_modal) {
|
||||
$filters = audit_get_audit_filter_select();
|
||||
$user_groups_array = users_get_groups_for_select(
|
||||
$config['id_user'],
|
||||
$access,
|
||||
true,
|
||||
true,
|
||||
false
|
||||
);
|
||||
|
||||
echo '<div id="load-filter-select" class="load-filter-modal">';
|
||||
|
||||
$table = new StdClass;
|
||||
$table->id = 'load_filter_form';
|
||||
$table->width = '100%';
|
||||
$table->cellspacing = 4;
|
||||
$table->cellpadding = 4;
|
||||
$table->class = 'databox';
|
||||
if (is_metaconsole()) {
|
||||
$table->cellspacing = 0;
|
||||
$table->cellpadding = 0;
|
||||
$table->class = 'databox filters';
|
||||
}
|
||||
|
||||
$table->styleTable = 'font-weight: bold; color: #555; text-align:left;';
|
||||
$filter_id_width = '200px';
|
||||
if (is_metaconsole()) {
|
||||
$filter_id_width = '150px';
|
||||
}
|
||||
|
||||
$data = [];
|
||||
$table->rowid[3] = 'update_filter_row1';
|
||||
$data[0] = __('Load filter').$jump;
|
||||
$data[0] .= html_print_select(
|
||||
$filters,
|
||||
'filter_id',
|
||||
'',
|
||||
'',
|
||||
__('None'),
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'margin-left:5px; width:'.$filter_id_width.';'
|
||||
);
|
||||
$data[1] = html_print_submit_button(
|
||||
__('Load filter'),
|
||||
'load_filter',
|
||||
false,
|
||||
'class="sub upd" onclick="load_filter_values()"',
|
||||
true
|
||||
);
|
||||
$data[1] .= html_print_input_hidden('load_filter', 1, true);
|
||||
$table->data[] = $data;
|
||||
$table->rowclass[] = '';
|
||||
|
||||
html_print_table($table);
|
||||
echo '</div>';
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
function show_filter() {
|
||||
$("#load-filter-select").dialog({
|
||||
resizable: true,
|
||||
draggable: true,
|
||||
modal: false,
|
||||
closeOnEscape: true,
|
||||
width: 450
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function load_filter_values() {
|
||||
$.ajax({
|
||||
method: 'POST',
|
||||
url: '<?php echo ui_get_full_url('ajax.php'); ?>',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
page: 'include/ajax/audit_log',
|
||||
get_filter_values: 1,
|
||||
"id" : $('#filter_id :selected').val()
|
||||
},
|
||||
success: function(data) {
|
||||
var options = "";
|
||||
$.each(data,function(i,value){
|
||||
if (i == 'text'){
|
||||
$("#text-filter_text").val(value);
|
||||
}
|
||||
if (i == 'period'){
|
||||
$("#text-filter_period").val(value);
|
||||
}
|
||||
if (i == 'ip'){
|
||||
$("#text-filter_ip").val(value);
|
||||
}
|
||||
if (i == 'type'){
|
||||
$("#filter_type").val(value).change();
|
||||
}
|
||||
if (i == 'user'){
|
||||
$("#filter_user").val(value).change();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Close dialog.
|
||||
$("#load-filter-select").dialog('close');
|
||||
}
|
||||
|
||||
$(document).ready (function() {
|
||||
show_filter();
|
||||
})
|
||||
|
||||
</script>
|
||||
<?php
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if ($save_filter_modal) {
|
||||
echo '<div id="save-filter-select" style="width:350px;">';
|
||||
|
||||
if (check_acl($config['id_user'], 0, 'EW') === 1 || check_acl($config['id_user'], 0, 'EM') === 1) {
|
||||
echo '<div id="info_box"></div>';
|
||||
$table = new StdClass;
|
||||
$table->id = 'save_filter_form';
|
||||
$table->width = '100%';
|
||||
$table->cellspacing = 4;
|
||||
$table->cellpadding = 4;
|
||||
$table->class = 'databox';
|
||||
if (is_metaconsole()) {
|
||||
$table->class = 'databox filters';
|
||||
$table->cellspacing = 0;
|
||||
$table->cellpadding = 0;
|
||||
}
|
||||
|
||||
$table->styleTable = 'font-weight: bold; text-align:left;';
|
||||
if (!is_metaconsole()) {
|
||||
$table->style[0] = 'width: 50%; width:50%;';
|
||||
}
|
||||
|
||||
$data = [];
|
||||
$table->rowid[0] = 'update_save_selector';
|
||||
$data[0] = html_print_radio_button(
|
||||
'filter_mode',
|
||||
'new',
|
||||
__('New filter'),
|
||||
true,
|
||||
true
|
||||
);
|
||||
|
||||
$data[1] = html_print_radio_button(
|
||||
'filter_mode',
|
||||
'update',
|
||||
__('Update filter'),
|
||||
false,
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[] = $data;
|
||||
$table->rowclass[] = '';
|
||||
|
||||
$data = [];
|
||||
$table->rowid[1] = 'save_filter_row1';
|
||||
$data[0] = __('Filter name').$jump;
|
||||
$data[0] .= html_print_input_text('id_name', '', '', 15, 255, true);
|
||||
|
||||
$data[1] = html_print_submit_button(
|
||||
__('Save filter'),
|
||||
'save_filter',
|
||||
false,
|
||||
'class="sub wand" onclick="save_new_filter();"',
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[] = $data;
|
||||
$table->rowclass[] = '';
|
||||
|
||||
$data = [];
|
||||
$table->rowid[2] = 'save_filter_row2';
|
||||
|
||||
$table->data[] = $data;
|
||||
$table->rowclass[] = '';
|
||||
|
||||
$data = [];
|
||||
$table->rowid[3] = 'update_filter_row1';
|
||||
$data[0] = __('Overwrite filter').$jump;
|
||||
|
||||
$_filters_update = audit_get_audit_filter_select();
|
||||
|
||||
$data[0] .= html_print_select(
|
||||
$_filters_update,
|
||||
'overwrite_filter',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true
|
||||
);
|
||||
$data[1] = html_print_submit_button(
|
||||
__('Update filter'),
|
||||
'update_filter',
|
||||
false,
|
||||
'class="sub upd" onclick="save_update_filter();"',
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[] = $data;
|
||||
$table->rowclass[] = '';
|
||||
|
||||
html_print_table($table);
|
||||
} else {
|
||||
include 'general/noaccess.php';
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
function show_save_filter() {
|
||||
$('#save_filter_row1').show();
|
||||
$('#save_filter_row2').show();
|
||||
$('#update_filter_row1').hide();
|
||||
// Filter save mode selector
|
||||
$("[name='filter_mode']").click(function() {
|
||||
if ($(this).val() == 'new') {
|
||||
$('#save_filter_row1').show();
|
||||
$('#save_filter_row2').show();
|
||||
$('#submit-save_filter').show();
|
||||
$('#update_filter_row1').hide();
|
||||
}
|
||||
else {
|
||||
$('#save_filter_row1').hide();
|
||||
$('#save_filter_row2').hide();
|
||||
$('#update_filter_row1').show();
|
||||
$('#submit-save_filter').hide();
|
||||
}
|
||||
});
|
||||
$("#save-filter-select").dialog({
|
||||
resizable: true,
|
||||
draggable: true,
|
||||
modal: false,
|
||||
closeOnEscape: true
|
||||
});
|
||||
}
|
||||
|
||||
function save_new_filter() {
|
||||
|
||||
// If the filter name is blank show error
|
||||
if ($('#text-id_name').val() == '') {
|
||||
$('#info_box').html("<h3 class='error'><?php echo __('Filter name cannot be left blank'); ?></h3>");
|
||||
return false;
|
||||
}
|
||||
|
||||
var id_filter_save;
|
||||
|
||||
jQuery.post ("<?php echo ui_get_full_url('ajax.php', false, false, false); ?>",
|
||||
{
|
||||
"page" : "include/ajax/audit_log",
|
||||
"save_log_filter" : 1,
|
||||
"id_name" : $("#text-id_name").val(),
|
||||
"text" : $("#text-filter_text").val(),
|
||||
"period" : $("#text-filter_period").val(),
|
||||
"ip" : $('#text-filter_ip').val(),
|
||||
"type" : $('#filter_type :selected').val(),
|
||||
"user" : $('#filter_user :selected').val(),
|
||||
},
|
||||
function (data) {
|
||||
$("#info_box").hide();
|
||||
if (data == 'error') {
|
||||
$("#info_box").filter(function(i, item) {
|
||||
if ($(item).data('type_info_box') == "error_create_filter") {
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}).show();
|
||||
} else if (data == 'duplicate') {
|
||||
$('#info_box').html("<h3 class='error'><?php echo __('Filter name already on use'); ?></h3>");
|
||||
$('#info_box').show();
|
||||
} else {
|
||||
// Close dialog.
|
||||
$("#save-filter-select").dialog('close');
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
// This updates an event filter
|
||||
function save_update_filter() {
|
||||
var id_filter_update = $("#overwrite_filter").val();
|
||||
var name_filter_update = $("#overwrite_filter option[value='"+id_filter_update+"']").text();
|
||||
|
||||
jQuery.post ("<?php echo ui_get_full_url('ajax.php', false, false, false); ?>",
|
||||
{"page" : "include/ajax/audit_log",
|
||||
"update_log_filter" : 1,
|
||||
"id" : $("#overwrite_filter :selected").val(),
|
||||
"text" : $("#text-filter_text").val(),
|
||||
"period" : $("#text-filter_period").val(),
|
||||
"ip" : $('#text-filter_ip').val(),
|
||||
"type" : $('#filter_type :selected').val(),
|
||||
"user" : $('#filter_user :selected').val(),
|
||||
},
|
||||
function (data) {
|
||||
$(".info_box").hide();
|
||||
if (data == 'ok') {
|
||||
$(".info_box").filter(function(i, item) {
|
||||
if ($(item).data('type_info_box') == "success_update_filter") {
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}).show();
|
||||
}
|
||||
else {
|
||||
$(".info_box").filter(function(i, item) {
|
||||
if ($(item).data('type_info_box') == "error_create_filter") {
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}).show();
|
||||
}
|
||||
});
|
||||
|
||||
// Close dialog
|
||||
$('.ui-dialog-titlebar-close').trigger('click');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
$(document).ready(function (){
|
||||
show_save_filter();
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
return;
|
||||
}
|
|
@ -1515,9 +1515,37 @@ if ($change_status === true) {
|
|||
}
|
||||
|
||||
if ($get_Acknowledged === true) {
|
||||
$event_id = get_parameter('event_id');
|
||||
echo events_page_general_acknowledged($event_id);
|
||||
return;
|
||||
$event_id = (int) get_parameter('event_id', 0);
|
||||
$server_id = (int) get_parameter('server_id', 0);
|
||||
|
||||
$return = '';
|
||||
try {
|
||||
if (is_metaconsole() === true
|
||||
&& $server_id > 0
|
||||
) {
|
||||
$node = new Node($server_id);
|
||||
$node->connect();
|
||||
}
|
||||
|
||||
echo events_page_general_acknowledged($event_id);
|
||||
} catch (\Exception $e) {
|
||||
// Unexistent agent.
|
||||
if (is_metaconsole() === true
|
||||
&& $server_id > 0
|
||||
) {
|
||||
$node->disconnect();
|
||||
}
|
||||
|
||||
$return = false;
|
||||
} finally {
|
||||
if (is_metaconsole() === true
|
||||
&& $server_id > 0
|
||||
) {
|
||||
$node->disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
if ($change_owner === true) {
|
||||
|
|
|
@ -340,7 +340,7 @@ if (is_ajax() === true) {
|
|||
|
||||
// Group.
|
||||
$secondary_groups = '';
|
||||
$secondary = agents_get_secondary_groups($data['id_agente']);
|
||||
$secondary = enterprise_hook('agents_get_secondary_groups', [$data['id_agente']]);
|
||||
if (isset($secondary['for_select']) === true && empty($secondary['for_select']) === false) {
|
||||
$secondary_groups = implode(', ', $secondary['for_select']);
|
||||
$secondary_groups = ', '.$secondary_groups;
|
||||
|
@ -353,19 +353,26 @@ if (is_ajax() === true) {
|
|||
|
||||
|
||||
// Events.
|
||||
echo '<div class="div-dialog">';
|
||||
echo graph_graphic_agentevents(
|
||||
$id,
|
||||
100,
|
||||
40,
|
||||
SECONDS_1DAY,
|
||||
'',
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
1
|
||||
$result_graph_event = enterprise_hook(
|
||||
'graph_graphic_agentevents',
|
||||
[
|
||||
$id,
|
||||
100,
|
||||
40,
|
||||
SECONDS_1DAY,
|
||||
'',
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
1,
|
||||
]
|
||||
);
|
||||
echo '</div>';
|
||||
|
||||
if ($result_graph_event !== -1) {
|
||||
echo '<div class="div-dialog">';
|
||||
echo $result_graph_event;
|
||||
echo '</div>';
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,6 +61,8 @@ if (check_login()) {
|
|||
0
|
||||
);
|
||||
|
||||
$get_children_modules = (bool) get_parameter('get_children_modules', false);
|
||||
|
||||
$get_data_dataMatrix = (bool) get_parameter(
|
||||
'get_data_dataMatrix',
|
||||
0
|
||||
|
@ -1629,4 +1631,36 @@ if (check_login()) {
|
|||
|
||||
return;
|
||||
}
|
||||
|
||||
if ($get_children_modules === true) {
|
||||
$parent_modules = get_parameter('parent_modulues', false);
|
||||
$children_selected = [];
|
||||
|
||||
if ($parent_modules === false) {
|
||||
$children_selected = false;
|
||||
} else {
|
||||
foreach ($parent_modules as $parent) {
|
||||
$child_modules = get_children_module($parent_modules, ['nombre', 'id_agente_modulo'], true);
|
||||
if ((bool) $child_modules === false) {
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach ($child_modules as $child) {
|
||||
$module_exist = in_array($child['id_agente_modulo'], $parent_modules);
|
||||
$child_exist = in_array($child, $children_selected);
|
||||
|
||||
if ($module_exist === false && $child_exist === false) {
|
||||
array_push($children_selected, $child);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($children_selected) === true) {
|
||||
$children_selected = false;
|
||||
}
|
||||
|
||||
echo json_encode($children_selected);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -156,6 +156,26 @@ class AuditLog extends HTML
|
|||
open_meta_frame();
|
||||
}
|
||||
|
||||
$buttons = [];
|
||||
|
||||
$buttons[] = [
|
||||
'id' => 'load-filter',
|
||||
'class' => 'float-left margin-right-2 margin-left-2 sub config',
|
||||
'text' => __('Load filter'),
|
||||
'onclick' => '',
|
||||
];
|
||||
|
||||
$buttons[] = [
|
||||
'id' => 'save-filter',
|
||||
'class' => 'float-left margin-right-2 sub wand',
|
||||
'text' => __('Save filter'),
|
||||
'onclick' => '',
|
||||
];
|
||||
|
||||
// Modal for save/load filters.
|
||||
echo '<div id="save-modal-filter" style="display:none"></div>';
|
||||
echo '<div id="load-modal-filter" style="display:none"></div>';
|
||||
|
||||
// Load datatables user interface.
|
||||
ui_print_datatable(
|
||||
[
|
||||
|
@ -174,9 +194,10 @@ class AuditLog extends HTML
|
|||
],
|
||||
'search_button_class' => 'sub filter float-right',
|
||||
'form' => [
|
||||
'inputs' => [
|
||||
'extra_buttons' => $buttons,
|
||||
'inputs' => [
|
||||
[
|
||||
'label' => __('Search'),
|
||||
'label' => __('Free search').ui_print_help_tip(__('Search filter by User, Action, Date, Source IP or Comments fields content'), true),
|
||||
'type' => 'text',
|
||||
'class' => 'w200px',
|
||||
'id' => 'filter_text',
|
||||
|
@ -211,7 +232,9 @@ class AuditLog extends HTML
|
|||
'type' => 'select_from_sql',
|
||||
'nothing' => __('All'),
|
||||
'nothing_value' => '-1',
|
||||
'sql' => 'SELECT id_user, id_user AS text FROM tusuario',
|
||||
'sql' => 'SELECT id_user, id_user AS text FROM tusuario UNION SELECT "SYSTEM"
|
||||
AS id_user, "SYSTEM" AS text UNION SELECT "N/A"
|
||||
AS id_user, "N/A" AS text',
|
||||
'class' => 'mw250px',
|
||||
'id' => 'filter_user',
|
||||
'name' => 'filter_user',
|
||||
|
@ -269,7 +292,10 @@ class AuditLog extends HTML
|
|||
|
||||
if (empty($this->filterText) === false) {
|
||||
$filter .= sprintf(
|
||||
" AND (accion LIKE '%%%s%%' OR descripcion LIKE '%%%s%%')",
|
||||
" AND (accion LIKE '%%%s%%' OR descripcion LIKE '%%%s%%' OR id_usuario LIKE '%%%s%%' OR fecha LIKE '%%%s%%' OR ip_origen LIKE '%%%s%%')",
|
||||
$this->filterText,
|
||||
$this->filterText,
|
||||
$this->filterText,
|
||||
$this->filterText,
|
||||
$this->filterText
|
||||
);
|
||||
|
@ -366,38 +392,149 @@ class AuditLog extends HTML
|
|||
|
||||
// Javascript content.
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
function format(d) {
|
||||
var output = '';
|
||||
<script type="text/javascript">
|
||||
var loading = 0;
|
||||
|
||||
if (d.extendedInfo === '') {
|
||||
output = "<?php echo __('There is no additional information to display'); ?>";
|
||||
} else {
|
||||
output = d.extendedInfo;
|
||||
function format(d) {
|
||||
var output = '';
|
||||
|
||||
if (d.extendedInfo === '') {
|
||||
output = "<?php echo __('There is no additional information to display'); ?>";
|
||||
} else {
|
||||
output = d.extendedInfo;
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
$(document).ready(function() {
|
||||
// Add event listener for opening and closing details
|
||||
$('#audit_logs tbody').on('click', 'td.show_extended_info', function() {
|
||||
var tr = $(this).closest('tr');
|
||||
var table = $("#<?php echo $this->tableId; ?>").DataTable();
|
||||
var row = table.row(tr);
|
||||
|
||||
$(document).ready(function() {
|
||||
// Add event listener for opening and closing details
|
||||
$('#audit_logs tbody').on('click', 'td.show_extended_info', function() {
|
||||
var tr = $(this).closest('tr');
|
||||
var table = $("#<?php echo $this->tableId; ?>").DataTable();
|
||||
var row = table.row(tr);
|
||||
|
||||
if (row.child.isShown()) {
|
||||
if (row.child.isShown()) {
|
||||
// This row is already open - close it
|
||||
row.child.hide();
|
||||
tr.removeClass('shown');
|
||||
} else {
|
||||
// Open this row
|
||||
row.child(format(row.data())).show();
|
||||
tr.addClass('shown');
|
||||
}
|
||||
row.child.hide();
|
||||
tr.removeClass('shown');
|
||||
} else {
|
||||
// Open this row
|
||||
row.child(format(row.data())).show();
|
||||
tr.addClass('shown');
|
||||
}
|
||||
$('#audit_logs').css('table-layout','fixed');
|
||||
$('#audit_logs').css('width','95% !important');
|
||||
});
|
||||
|
||||
$('#save-filter').click(function() {
|
||||
if ($('#save-filter-select').length) {
|
||||
$('#save-filter-select').dialog({
|
||||
width: "20%",
|
||||
maxWidth: "25%",
|
||||
title: "<?php echo __('Save filter'); ?>"
|
||||
});
|
||||
$('#info_box').html("");
|
||||
$('#text-id_name').val("");
|
||||
$.ajax({
|
||||
method: 'POST',
|
||||
url: '<?php echo ui_get_full_url('ajax.php'); ?>',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
page: 'include/ajax/audit_log',
|
||||
recover_aduit_log_select: 1
|
||||
},
|
||||
success: function(data) {
|
||||
var options = "";
|
||||
$.each(data,function(key,value){
|
||||
options += "<option value='"+key+"'>"+value+"</option>";
|
||||
});
|
||||
$('#overwrite_filter').html(options);
|
||||
$('#overwrite_filter').select2();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (loading == 0) {
|
||||
loading = 1
|
||||
$.ajax({
|
||||
method: 'POST',
|
||||
url: '<?php echo ui_get_full_url('ajax.php'); ?>',
|
||||
data: {
|
||||
page: 'include/ajax/audit_log',
|
||||
save_filter_modal: 1,
|
||||
current_filter: $('#latest_filter_id').val()
|
||||
},
|
||||
success: function(data) {
|
||||
$('#save-modal-filter')
|
||||
.empty()
|
||||
.html(data);
|
||||
loading = 0;
|
||||
$('#save-filter-select').dialog({
|
||||
width: "20%",
|
||||
maxWidth: "25%",
|
||||
title: "<?php echo __('Save filter'); ?>"
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('#save_filter_form-0-1, #radiobtn0002').click(function(){
|
||||
$('#overwrite_filter').select2();
|
||||
});
|
||||
|
||||
/* Filter management */
|
||||
$('#load-filter').click(function (){
|
||||
if($('#load-filter-select').length) {
|
||||
$('#load-filter-select').dialog({width: "20%",
|
||||
maxWidth: "25%",
|
||||
title: "<?php echo __('Load filter'); ?>"
|
||||
});
|
||||
$.ajax({
|
||||
method: 'POST',
|
||||
url: '<?php echo ui_get_full_url('ajax.php'); ?>',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
page: 'include/ajax/audit_log',
|
||||
recover_aduit_log_select: 1
|
||||
},
|
||||
success: function(data) {
|
||||
var options = "";
|
||||
$.each(data,function(key,value){
|
||||
options += "<option value='"+key+"'>"+value+"</option>";
|
||||
});
|
||||
$('#filter_id').html(options);
|
||||
$('#filter_id').select2();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (loading == 0) {
|
||||
loading = 1
|
||||
$.ajax({
|
||||
method: 'POST',
|
||||
url: '<?php echo ui_get_full_url('ajax.php'); ?>',
|
||||
data: {
|
||||
page: 'include/ajax/audit_log',
|
||||
load_filter_modal: 1
|
||||
},
|
||||
success: function (data){
|
||||
$('#load-modal-filter')
|
||||
.empty()
|
||||
.html(data);
|
||||
loading = 0;
|
||||
$('#load-filter-select').dialog({
|
||||
width: "20%",
|
||||
maxWidth: "25%",
|
||||
title: "<?php echo __('Load filter'); ?>"
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
<?php
|
||||
// EOF Javascript content.
|
||||
return ob_get_clean();
|
||||
|
|
|
@ -606,15 +606,13 @@ class CustomNetScan extends Wizard
|
|||
}
|
||||
|
||||
if (isset($this->page) === true && $this->page === 1) {
|
||||
$name_ipam = 'IPAM Recon';
|
||||
// Recon script.
|
||||
$form['inputs'][] = [
|
||||
'label' => __('Recon script'),
|
||||
'arguments' => [
|
||||
'type' => 'select_from_sql',
|
||||
'sql' => sprintf(
|
||||
'SELECT id_recon_script, name FROM trecon_script WHERE name <> "%s" ORDER BY name',
|
||||
$name_ipam
|
||||
'SELECT id_recon_script, name FROM trecon_script ORDER BY name'
|
||||
),
|
||||
'name' => 'id_recon_script',
|
||||
'selected' => $this->task['id_recon_script'],
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC230118';
|
||||
$pandora_version = 'v7.0NG.767';
|
||||
$build_version = 'PC230131';
|
||||
$pandora_version = 'v7.0NG.768';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
$script_tz = @date_default_timezone_get();
|
||||
|
|
|
@ -805,6 +805,7 @@ define('AUDIT_LOG_DASHBOARD_MANAGEMENT', 'Dashboard management');
|
|||
define('AUDIT_LOG_SERVICE_MANAGEMENT', 'Service management');
|
||||
define('AUDIT_LOG_INCIDENT_MANAGEMENT', 'Incident management');
|
||||
define('AUDIT_LOG_UMC', 'Warp Manager');
|
||||
define('AUDIT_LOG_NMS_VIOLATION', 'NMS Violation');
|
||||
|
||||
// MIMEs.
|
||||
define(
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
@font-face {
|
||||
font-family: 'Glyphicons Halflings';
|
||||
src: url('../fonts/glyphicons-halflings-regular.woff') format('woff');
|
||||
src:
|
||||
}
|
||||
|
||||
.terminal-main {
|
||||
font-family: monospace;
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
#ehorus-client-container {
|
||||
font-family: 'lato';
|
||||
font-family: 'Lato', sans-serif;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.glyphicon {
|
||||
|
|
|
@ -226,7 +226,7 @@ function format_numeric($number, $decimals=1)
|
|||
global $config;
|
||||
|
||||
// Translate to float in case there are characters in the string so
|
||||
// fmod doesn't throw a notice
|
||||
// fmod doesn't throw a notice.
|
||||
$number = (float) $number;
|
||||
|
||||
if ($number == 0) {
|
||||
|
@ -234,10 +234,20 @@ function format_numeric($number, $decimals=1)
|
|||
}
|
||||
|
||||
if (fmod($number, 1) > 0) {
|
||||
return number_format($number, $decimals, $config['decimal_separator'], $config['thousand_separator']);
|
||||
return number_format(
|
||||
$number,
|
||||
$decimals,
|
||||
$config['decimal_separator'],
|
||||
($config['thousand_separator'] ?? ',')
|
||||
);
|
||||
}
|
||||
|
||||
return number_format($number, 0, $config['decimal_separator'], $config['thousand_separator']);
|
||||
return number_format(
|
||||
$number,
|
||||
0,
|
||||
$config['decimal_separator'],
|
||||
($config['thousand_separator'] ?? ',')
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1369,12 +1369,14 @@ function agents_get_group_agents(
|
|||
'id_agente',
|
||||
'alias',
|
||||
'ta.id_tmetaconsole_setup AS id_server',
|
||||
'ta.disabled',
|
||||
];
|
||||
} else {
|
||||
$fields = [
|
||||
'ta.id_tagente AS id_agente',
|
||||
'alias',
|
||||
'ta.id_tmetaconsole_setup AS id_server',
|
||||
'ta.disabled',
|
||||
];
|
||||
}
|
||||
} else {
|
||||
|
@ -1383,6 +1385,7 @@ function agents_get_group_agents(
|
|||
$fields = [
|
||||
'id_agente',
|
||||
'alias',
|
||||
'disabled',
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -1427,6 +1430,13 @@ function agents_get_group_agents(
|
|||
$value = mb_strtoupper($row['alias'], 'UTF-8');
|
||||
break;
|
||||
|
||||
case 'disabled':
|
||||
$value = $row['alias'];
|
||||
if ($row['disabled'] == 1) {
|
||||
$value .= ' ('.__('Disabled').')';
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
$value = $row['alias'];
|
||||
break;
|
||||
|
|
|
@ -14430,7 +14430,7 @@ function api_get_module_graph($id_module, $thrash2, $other, $thrash4)
|
|||
$height = (!empty($other) && isset($other['data'][3]) && $other['data'][3]) ? $other['data'][3] : 225;
|
||||
|
||||
// Graph width (optional).
|
||||
$width = (!empty($other) && isset($other['data'][4]) && $other['data'][4]) ? $other['data'][4] : '';
|
||||
$width = (!empty($other) && isset($other['data'][4]) && $other['data'][4]) ? $other['data'][4] : 600;
|
||||
|
||||
// If recive value its from mail call.
|
||||
$graph_font_size = $other['data'][5];
|
||||
|
|
|
@ -496,9 +496,13 @@ function events_update_status($id_evento, $status, $filter=null)
|
|||
// No groups option direct update.
|
||||
$update_sql = sprintf(
|
||||
'UPDATE tevento
|
||||
SET estado = %d
|
||||
SET estado = %d,
|
||||
ack_utimestamp = %d,
|
||||
id_usuario = "%s"
|
||||
WHERE id_evento = %d',
|
||||
$status,
|
||||
time(),
|
||||
$config['id_user'],
|
||||
$id_evento
|
||||
);
|
||||
break;
|
||||
|
@ -4732,7 +4736,7 @@ function events_page_general($event)
|
|||
|
||||
$data = [];
|
||||
$data[0] = __('Owner');
|
||||
if (empty($event['owner_user']) === true) {
|
||||
if ($event['owner_user'] == -1) {
|
||||
$data[1] = '<i>'.__('N/A').'</i>';
|
||||
} else {
|
||||
$user_owner = db_get_value(
|
||||
|
@ -4797,14 +4801,15 @@ function events_page_general($event)
|
|||
|
||||
$data = [];
|
||||
|
||||
$table_general->rowid[7] = 'general_status';
|
||||
$table_general->rowid[count($table_general->data)] = 'general_status';
|
||||
$table_general->cellclass[count($table_general->data)][1] = 'general_status';
|
||||
$data[0] = __('Status');
|
||||
$data[1] = $event_st['title'];
|
||||
$data[2] = html_print_image($event_st['img'], true);
|
||||
$table_general->data[] = $data;
|
||||
|
||||
// If event is validated, show who and when acknowleded it.
|
||||
$table_general->cellclass[8][1] = 'general_acknowleded';
|
||||
$table_general->cellclass[count($table_general->data)][1] = 'general_acknowleded';
|
||||
|
||||
$data = [];
|
||||
$data[0] = __('Acknowledged by');
|
||||
|
@ -4825,7 +4830,17 @@ function events_page_general($event)
|
|||
}
|
||||
}
|
||||
|
||||
$data[1] = $user_ack.' ( '.date($config['date_format'], $event['ack_utimestamp_raw']).' ) ';
|
||||
$data[1] = $user_ack.' ( ';
|
||||
if ($event['ack_utimestamp_raw'] !== false
|
||||
&& $event['ack_utimestamp_raw'] !== 'false'
|
||||
) {
|
||||
$data[1] .= date(
|
||||
$config['date_format'],
|
||||
$event['ack_utimestamp_raw']
|
||||
);
|
||||
}
|
||||
|
||||
$data[1] .= ' ) ';
|
||||
} else {
|
||||
$data[1] = '<i>'.__('N/A').'</i>';
|
||||
}
|
||||
|
@ -4932,9 +4947,9 @@ function events_page_general_acknowledged($event_id)
|
|||
{
|
||||
global $config;
|
||||
$Acknowledged = '';
|
||||
$event = db_get_all_rows_filter('tevento', 'id_evento', $event_id);
|
||||
|
||||
if ($event) {
|
||||
$event = db_get_row('tevento', 'id_evento', $event_id);
|
||||
hd($event['ack_utimestamp'], true);
|
||||
if ($event !== false && $event['estado'] == 1) {
|
||||
$user_ack = db_get_value(
|
||||
'fullname',
|
||||
'tusuario',
|
||||
|
@ -4946,7 +4961,17 @@ function events_page_general_acknowledged($event_id)
|
|||
$user_ack = $config['id_user'];
|
||||
}
|
||||
|
||||
$Acknowledged = $user_ack.' ( '.date($config['date_format'], $event['ack_utimestamp_raw']).' ) ';
|
||||
$Acknowledged = $user_ack.' ( ';
|
||||
if ($event['ack_utimestamp'] !== false
|
||||
&& $event['ack_utimestamp'] !== 'false'
|
||||
) {
|
||||
$Acknowledged .= date(
|
||||
$config['date_format'],
|
||||
$event['ack_utimestamp']
|
||||
);
|
||||
}
|
||||
|
||||
$Acknowledged .= ' ) ';
|
||||
} else {
|
||||
$Acknowledged = 'N/A';
|
||||
}
|
||||
|
|
|
@ -3489,8 +3489,9 @@ function graph_custom_sql_graph(
|
|||
$data_result = [];
|
||||
}
|
||||
|
||||
$data = [];
|
||||
$labels = [];
|
||||
$data_bar = [];
|
||||
$labels_pie = [];
|
||||
$data_pie = [];
|
||||
$count = 0;
|
||||
$other = 0;
|
||||
foreach ($data_result as $data_item) {
|
||||
|
|
|
@ -811,6 +811,27 @@ if (is_ajax()) {
|
|||
);
|
||||
}
|
||||
|
||||
$image_about = ui_get_full_url('/images/custom_logo/logo-default-pandorafms.png', false, false, false);
|
||||
if (enterprise_installed() === false) {
|
||||
if ($config['style'] === 'pandora_black') {
|
||||
$image_about = 'images/custom_logo/'.HEADER_LOGO_BLACK_CLASSIC;
|
||||
} else if ($config['style'] === 'pandora') {
|
||||
$image_about = 'images/custom_logo/'.HEADER_LOGO_DEFAULT_CLASSIC;
|
||||
}
|
||||
} else {
|
||||
if ($config['style'] === 'pandora_black' && $config['custom_logo'] === HEADER_LOGO_DEFAULT_CLASSIC) {
|
||||
$config['custom_logo'] = HEADER_LOGO_BLACK_CLASSIC;
|
||||
} else if ($config['style'] === 'pandora' && $config['custom_logo'] === HEADER_LOGO_BLACK_CLASSIC) {
|
||||
$config['custom_logo'] = HEADER_LOGO_DEFAULT_CLASSIC;
|
||||
}
|
||||
|
||||
$image_about = 'images/custom_logo/'.$config['custom_logo'];
|
||||
|
||||
if (file_exists(ENTERPRISE_DIR.'/'.$image_about) === true) {
|
||||
$image_about = ENTERPRISE_DIR.'/'.$image_about;
|
||||
}
|
||||
}
|
||||
|
||||
$dialog = '
|
||||
<div id="about-tabs" class="invisible overflow-hidden">
|
||||
<ul>
|
||||
|
@ -827,7 +848,7 @@ if (is_ajax()) {
|
|||
<tbody>
|
||||
<tr>
|
||||
<th style="width: 40%;">
|
||||
<img src="'.ui_get_full_url('/images/custom_logo/'.$config['custom_logo'], false, false, false).'" alt="logo" width="70%">
|
||||
<img src="'.$image_about.'" alt="logo" width="70%">
|
||||
</th>
|
||||
<th style="width: 60%; text-align: left;">
|
||||
<h1>'.$product_name.'</h1>
|
||||
|
|
|
@ -3112,7 +3112,7 @@ function modules_get_relations($params=[])
|
|||
}
|
||||
|
||||
$distinct = '';
|
||||
if (empty($params)) {
|
||||
if (empty($params) || isset($params['distinct'])) {
|
||||
$distinct = 'DISTINCT';
|
||||
}
|
||||
|
||||
|
@ -3136,6 +3136,11 @@ function modules_get_relations($params=[])
|
|||
);
|
||||
}
|
||||
|
||||
$id_rt_filter = '';
|
||||
if (isset($params['id_rt'])) {
|
||||
$id_rt_filter = sprintf('AND tmr.id_rt = %d', $params['id_rt']);
|
||||
}
|
||||
|
||||
$sql = sprintf(
|
||||
'SELECT %s tmr.id, tmr.module_a, tmr.module_b,
|
||||
tmr.disable_update, tmr.type
|
||||
|
@ -3153,7 +3158,8 @@ function modules_get_relations($params=[])
|
|||
$module_type,
|
||||
$agent_filter,
|
||||
$disabled_update_filter,
|
||||
$modules_type_filter
|
||||
$modules_type_filter,
|
||||
$id_rt_filter
|
||||
);
|
||||
|
||||
return db_get_all_rows_sql($sql);
|
||||
|
@ -3986,16 +3992,28 @@ function recursive_get_dt_from_modules_tree(&$f_modules, $modules, $deep)
|
|||
* Get the module data from a children
|
||||
*
|
||||
* @param integer $id_module Id module
|
||||
* @param boolean $recursive Recursive children search.
|
||||
* @return array Children module data
|
||||
*/
|
||||
function get_children_module($id_module)
|
||||
function get_children_module($id_module, $fields=false, $recursion=false)
|
||||
{
|
||||
$children_module_data = db_get_all_rows_sql(
|
||||
'SELECT *
|
||||
FROM tagente_modulo
|
||||
WHERE parent_module_id = '.$id_module
|
||||
$children_module_data = db_get_all_rows_filter(
|
||||
'tagente_modulo',
|
||||
['parent_module_id' => $id_module],
|
||||
$fields
|
||||
);
|
||||
|
||||
if ($children_module_data !== false && $recursion === true) {
|
||||
foreach ($children_module_data as $child) {
|
||||
$niece = get_children_module($child['id_agente_modulo'], $fields, false);
|
||||
if ((bool) $niece === false) {
|
||||
continue;
|
||||
} else {
|
||||
$children_module_data = array_merge($children_module_data, $niece);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $children_module_data;
|
||||
}
|
||||
|
||||
|
|
|
@ -4162,6 +4162,148 @@ function networkmap_get_new_nodes_and_links($networkmap, $x, $y)
|
|||
|
||||
if ((int) $networkmap['source'] === SOURCE_TASK) {
|
||||
$agents = enterprise_hook('get_discovery_agents', [$id_recon, true]);
|
||||
|
||||
$relations_discovery = modules_get_relations(['id_rt' => $id_recon, 'distinct' => true]);
|
||||
$array_aux = $relations_discovery;
|
||||
$target_aux = $relations_discovery;
|
||||
|
||||
foreach ($relations_discovery as $key => $rel) {
|
||||
foreach ($array_aux as $key2 => $rel2) {
|
||||
if ($key2 <= $key) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($rel['module_a'] === $rel2['module_a']) {
|
||||
$agent1 = modules_get_agentmodule_agent($rel['module_b']);
|
||||
$agent2 = modules_get_agentmodule_agent($rel2['module_b']);
|
||||
|
||||
if ($agent1 === $agent2) {
|
||||
$name1 = modules_get_agentmodule_name($rel['module_b']);
|
||||
$name2 = modules_get_agentmodule_name($rel2['module_b']);
|
||||
if ($name1 == 'Host Alive') {
|
||||
unset($target_aux[$key]);
|
||||
} else if ($name2 == 'Host Alive') {
|
||||
unset($target_aux[$key2]);
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if ($rel['module_b'] === $rel2['module_b']) {
|
||||
$agent1 = modules_get_agentmodule_agent($rel['module_a']);
|
||||
$agent2 = modules_get_agentmodule_agent($rel2['module_a']);
|
||||
|
||||
if ($agent1 === $agent2) {
|
||||
$name1 = modules_get_agentmodule_name($rel['module_a']);
|
||||
$name2 = modules_get_agentmodule_name($rel2['module_a']);
|
||||
if ($name1 == 'Host Alive') {
|
||||
unset($target_aux[$key]);
|
||||
} else if ($name2 == 'Host Alive') {
|
||||
unset($target_aux[$key2]);
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if ($rel['module_a'] === $rel2['module_b']) {
|
||||
$agent1 = modules_get_agentmodule_agent($rel['module_b']);
|
||||
$agent2 = modules_get_agentmodule_agent($rel2['module_a']);
|
||||
|
||||
if ($agent1 === $agent2) {
|
||||
$name1 = modules_get_agentmodule_name($rel['module_b']);
|
||||
$name2 = modules_get_agentmodule_name($rel2['module_a']);
|
||||
if ($name1 == 'Host Alive') {
|
||||
unset($target_aux[$key]);
|
||||
} else if ($name2 == 'Host Alive') {
|
||||
unset($target_aux[$key2]);
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if ($rel['module_b'] === $rel2['module_a']) {
|
||||
$agent1 = modules_get_agentmodule_agent($rel['module_a']);
|
||||
$agent2 = modules_get_agentmodule_agent($rel2['module_b']);
|
||||
|
||||
if ($agent1 === $agent2) {
|
||||
$name1 = modules_get_agentmodule_name($rel['module_a']);
|
||||
$name2 = modules_get_agentmodule_name($rel2['module_b']);
|
||||
if ($name1 == 'Host Alive') {
|
||||
unset($target_aux[$key]);
|
||||
} else if ($name2 == 'Host Alive') {
|
||||
unset($target_aux[$key2]);
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$relations_discovery = $target_aux;
|
||||
|
||||
db_process_sql_delete('trel_item', ['id_map' => $id_networkmap, 'parent_type' => 1, 'child_type' => 1]);
|
||||
|
||||
$id_recon = $id_networkmap;
|
||||
|
||||
// Relations Module <-> Module.
|
||||
foreach ($relations_discovery as $key => $relation) {
|
||||
$module_a = $relation['module_a'];
|
||||
$agent_a = modules_get_agentmodule_agent($module_a);
|
||||
$module_b = $relation['module_b'];
|
||||
$agent_b = modules_get_agentmodule_agent($module_b);
|
||||
|
||||
$exist = db_get_row_filter(
|
||||
'trel_item',
|
||||
[
|
||||
'id_map' => $id_networkmap,
|
||||
'id_parent_source_data' => $module_a,
|
||||
'id_child_source_data' => $module_b,
|
||||
'deleted' => 0,
|
||||
]
|
||||
);
|
||||
$exist_reverse = db_get_row_filter(
|
||||
'trel_item',
|
||||
[
|
||||
'id_map' => $id_networkmap,
|
||||
'id_parent_source_data' => $module_b,
|
||||
'id_child_source_data' => $module_a,
|
||||
'deleted' => 0,
|
||||
]
|
||||
);
|
||||
|
||||
if (empty($exist) === true && empty($exist_reverse) === true) {
|
||||
$item_a = db_get_value(
|
||||
'id',
|
||||
'titem',
|
||||
'source_data',
|
||||
$agent_a
|
||||
);
|
||||
|
||||
$item_b = db_get_value(
|
||||
'id',
|
||||
'titem',
|
||||
'source_data',
|
||||
$agent_b
|
||||
);
|
||||
|
||||
db_process_sql_insert(
|
||||
'trel_item',
|
||||
[
|
||||
'id_map' => $id_networkmap,
|
||||
'id_parent' => $item_a,
|
||||
'id_child' => $item_b,
|
||||
'id_parent_source_data' => $module_a,
|
||||
'id_child_source_data' => $module_b,
|
||||
'parent_type' => 1,
|
||||
'child_type' => 1,
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
} else if ((int) $networkmap['source'] === SOURCE_NETWORK) {
|
||||
// Network map, based on direct network.
|
||||
$agents = networkmap_get_nodes_from_ip_mask(
|
||||
|
@ -4375,280 +4517,6 @@ function networkmap_get_new_nodes_and_links($networkmap, $x, $y)
|
|||
}
|
||||
}
|
||||
|
||||
// foreach ($interfaces as $interface) {
|
||||
// $relations = modules_get_relations(
|
||||
// ['id_module' => $interface['id_agente_modulo']]
|
||||
// );
|
||||
// if (empty($relations) === true) {
|
||||
// $relations = [];
|
||||
// }
|
||||
// foreach ($relations as $relation) {
|
||||
// Get the links althought they are deleted (for to
|
||||
// avoid to add)
|
||||
// Check if the module is ping.
|
||||
// if (modules_get_agentmodule_type($relation['module_a']) === '6') {
|
||||
// The pings modules are not exist as interface
|
||||
// the link is with the agent.
|
||||
// $node_a = db_get_value_filter(
|
||||
// 'id',
|
||||
// 'titem',
|
||||
// [
|
||||
// 'source_data' => modules_get_agentmodule_agent(
|
||||
// $relation['module_a']
|
||||
// ),
|
||||
// 'id_map' => $id_networkmap,
|
||||
// ]
|
||||
// );
|
||||
// } else {
|
||||
// $node_a = db_get_value_filter(
|
||||
// 'id',
|
||||
// 'titem',
|
||||
// [
|
||||
// 'source_data' => $relation['module_a'],
|
||||
// 'type' => 1,
|
||||
// 'id_map' => $id_networkmap,
|
||||
// ]
|
||||
// );
|
||||
// }
|
||||
// Check if the module is ping.
|
||||
// if (modules_get_agentmodule_type($relation['module_b']) == 6) {
|
||||
// The pings modules are not exist as interface
|
||||
// the link is with the agent.
|
||||
// $node_b = db_get_value_filter(
|
||||
// 'id',
|
||||
// 'titem',
|
||||
// [
|
||||
// 'source_data' => modules_get_agentmodule_agent(
|
||||
// $relation['module_b']
|
||||
// ),
|
||||
// 'id_map' => $id_networkmap,
|
||||
// ]
|
||||
// );
|
||||
// } else {
|
||||
// $node_b = db_get_value_filter(
|
||||
// 'id',
|
||||
// 'titem',
|
||||
// [
|
||||
// 'source_data' => $relation['module_b'],
|
||||
// 'type' => 1,
|
||||
// 'id_map' => $id_networkmap,
|
||||
// ]
|
||||
// );
|
||||
// }
|
||||
// $exist = db_get_row_filter(
|
||||
// 'trel_item',
|
||||
// [
|
||||
// 'id_map' => $id_networkmap,
|
||||
// 'id_parent_source_data' => $relation['module_a'],
|
||||
// 'id_child_source_data' => $relation['module_b'],
|
||||
// 'deleted' => 0,
|
||||
// ]
|
||||
// );
|
||||
// $exist_reverse = db_get_row_filter(
|
||||
// 'trel_item',
|
||||
// [
|
||||
// 'id_map' => $id_networkmap,
|
||||
// 'id_parent_source_data' => $relation['module_b'],
|
||||
// 'id_child_source_data' => $relation['module_a'],
|
||||
// 'deleted' => 0,
|
||||
// ]
|
||||
// );
|
||||
// if (empty($exist) && empty($exist_reverse)) {
|
||||
// Create the nodes for interfaces
|
||||
// Ag1 ----- I1 ------ I2 ----- Ag2
|
||||
// * 2 interfaces nodes
|
||||
// * 3 relations
|
||||
// * I1 between I2
|
||||
// * Ag1 between I1
|
||||
// * Ag2 between I2
|
||||
//
|
||||
// But check if it exists the relations
|
||||
// agent between interface.
|
||||
// if ($interface['id_agente_modulo'] == $relation['module_a']) {
|
||||
// $agent_a = $interface['id_agente'];
|
||||
// $agent_b = modules_get_agentmodule_agent(
|
||||
// $relation['module_b']
|
||||
// );
|
||||
// } else {
|
||||
// $agent_a = modules_get_agentmodule_agent(
|
||||
// $relation['module_a']
|
||||
// );
|
||||
// $agent_b = $interface['id_agente'];
|
||||
// }
|
||||
// $item_a = db_get_value(
|
||||
// 'id',
|
||||
// 'titem',
|
||||
// 'source_data',
|
||||
// $agent_a
|
||||
// );
|
||||
// $item_b = db_get_value(
|
||||
// 'id',
|
||||
// 'titem',
|
||||
// 'source_data',
|
||||
// $agent_b
|
||||
// );
|
||||
// hd('----------------------', true);
|
||||
// hd($agent_a, true);
|
||||
// hd($agent_b, true);
|
||||
// foreach ($interfaces as $interface) {
|
||||
// $relations = modules_get_relations(
|
||||
// ['id_module' => $interface['id_agente_modulo']]
|
||||
// );
|
||||
// if (empty($relations) === true) {
|
||||
// $relations = [];
|
||||
// }
|
||||
// foreach ($relations as $relation) {hd($item_a. '<->'. $item_b, true);
|
||||
// hd('----------------------', true);
|
||||
// continue;
|
||||
// $exist_node_interface1 = db_get_row_filter(
|
||||
// 'titem',
|
||||
// [
|
||||
// 'id_map' => $id_networkmap,
|
||||
// 'type' => 0,
|
||||
// 'source_data' => $relation['module_a'],
|
||||
// ]
|
||||
// );
|
||||
// if (empty($exist_node_interface1) === true) {
|
||||
// Crete the interface node
|
||||
// and create the relation between agent and
|
||||
// interface.
|
||||
// $style = [];
|
||||
// $style['id_agent'] = $agent_a;
|
||||
// $style['shape'] = 'circle';
|
||||
// $style['image'] = 'images/mod_snmp_proc.png';
|
||||
// $style['width'] = 50;
|
||||
// $style['height'] = 16;
|
||||
// $style['label'] = modules_get_agentmodule_name($relation['module_a']);
|
||||
// $id_int1 = db_process_sql_insert(
|
||||
// 'titem',
|
||||
// [
|
||||
// 'id_map' => $id_networkmap,
|
||||
// 'x' => 666,
|
||||
// 'y' => 666,
|
||||
// 'z' => 0,
|
||||
// 'deleted' => 0,
|
||||
// 'type' => 1,
|
||||
// 'refresh' => 0,
|
||||
// 'source' => 0,
|
||||
// 'source_data' => $relation['module_a'],
|
||||
// 'style' => json_encode($style),
|
||||
// ]
|
||||
// );
|
||||
// $node_interface1 = db_get_row_filter(
|
||||
// 'titem',
|
||||
// [
|
||||
// 'id_map' => $id_networkmap,
|
||||
// 'type' => 1,
|
||||
// 'id' => $id_int1,
|
||||
// ]
|
||||
// );
|
||||
// $node_agent1 = db_get_value(
|
||||
// 'id',
|
||||
// 'titem',
|
||||
// 'source_data',
|
||||
// $agent_a
|
||||
// );
|
||||
// db_process_sql_insert(
|
||||
// 'trel_item',
|
||||
// [
|
||||
// 'id_map' => $id_networkmap,
|
||||
// 'id_parent' => $node_agent1,
|
||||
// 'id_child' => $node_interface1,
|
||||
// 'id_parent-source_data' => $agent_a,
|
||||
// 'id_child-source_data' => $relation['module_a'],
|
||||
// 'parent_type' => 0,
|
||||
// 'child_type' => 1,
|
||||
// ]
|
||||
// );
|
||||
// } else {
|
||||
// $node_interface1 = $exist_node_interface1;
|
||||
// }
|
||||
// $exist_node_interface2 = db_get_row_filter(
|
||||
// 'titem',
|
||||
// [
|
||||
// 'id_map' => $id_networkmap,
|
||||
// 'type' => 1,
|
||||
// 'source_data' => $relation['module_b'],
|
||||
// ]
|
||||
// );
|
||||
// if (empty($exist_node_interface2) === true) {
|
||||
// Crete the interface node
|
||||
// and create the relation between agent and
|
||||
// interface.
|
||||
// $style = [];
|
||||
// $style['id_agent'] = $agent_a;
|
||||
// $style['shape'] = 'circle';
|
||||
// $style['image'] = 'images/mod_snmp_proc.png';
|
||||
// $style['width'] = 50;
|
||||
// $style['height'] = 16;
|
||||
// $style['label'] = modules_get_agentmodule_name($relation['module_b']);
|
||||
// $id_int2 = db_process_sql_insert(
|
||||
// 'titem',
|
||||
// [
|
||||
// 'id_map' => $id_networkmap,
|
||||
// 'x' => 666,
|
||||
// 'y' => 666,
|
||||
// 'z' => 0,
|
||||
// 'deleted' => 0,
|
||||
// 'type' => 1,
|
||||
// 'refresh' => 0,
|
||||
// 'source' => 0,
|
||||
// 'source_data' => $relation['module_b'],
|
||||
// 'style' => json_encode($style),
|
||||
// ]
|
||||
// );
|
||||
// $node_interface2 = db_get_row_filter(
|
||||
// 'titem',
|
||||
// [
|
||||
// 'id_map' => $id_networkmap,
|
||||
// 'type' => 1,
|
||||
// 'id' => $id_int1,
|
||||
// ]
|
||||
// );
|
||||
// $node_agent1 = db_get_value(
|
||||
// 'id',
|
||||
// 'titem',
|
||||
// 'source_data',
|
||||
// $agent_a
|
||||
// );
|
||||
// db_process_sql_insert(
|
||||
// 'trel_item',
|
||||
// [
|
||||
// 'id_map' => $id_networkmap,
|
||||
// 'id_parent' => $node_agent1,
|
||||
// 'id_child' => $node_interface1,
|
||||
// 'id_parent-source_data' => $agent_a,
|
||||
// 'id_child-source_data' => $relation['module_b'],
|
||||
// 'parent_type' => 0,
|
||||
// 'child_type' => 1,
|
||||
// ]
|
||||
// );
|
||||
// } else {
|
||||
// $node_interface2 = $exist_node_interface2;
|
||||
// }
|
||||
// if (empty($node_interface1) === false && empty($node_interface2) === false) {
|
||||
// if (is_array($node_interface1) === true) {
|
||||
// $node_interface1 = $node_interface1['id'];
|
||||
// }
|
||||
// if (is_array($node_interface2) === true) {
|
||||
// $node_interface2 = $node_interface2['id'];
|
||||
// }
|
||||
// db_process_sql_insert(
|
||||
// 'trel_item',
|
||||
// [
|
||||
// 'id_map' => $id_networkmap,
|
||||
// 'id_parent' => $node_interface2,
|
||||
// 'id_child' => $node_interface1,
|
||||
// 'id_parent_source_data' => $relation['module_b'],
|
||||
// 'id_child_source_data' => $relation['module_a'],
|
||||
// 'parent_type' => 1,
|
||||
// 'child_type' => 1,
|
||||
// ]
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
$relations = modules_get_relations(
|
||||
[
|
||||
'id_agent' => $node['source_data'],
|
||||
|
@ -4726,18 +4594,6 @@ function networkmap_get_new_nodes_and_links($networkmap, $x, $y)
|
|||
if (empty($interfaces) === true) {
|
||||
$interfaces = [];
|
||||
}
|
||||
|
||||
// hd('interfaces', true);
|
||||
// foreach ($interfaces as $interface) {
|
||||
// $relations = modules_get_relations(
|
||||
// ['id_module' => $interface['id_agente_modulo']]
|
||||
// );
|
||||
// if (empty($relations) === true) {
|
||||
// $relations = [];
|
||||
// }
|
||||
// foreach ($relations as $relation) {
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -257,6 +257,10 @@ function reporting_make_reporting_data(
|
|||
|
||||
$content['style'] = json_decode(io_safe_output($content['style']), true);
|
||||
|
||||
if (!empty($content['style']['event_filter_search'])) {
|
||||
$content['style']['event_filter_search'] = io_safe_input($content['style']['event_filter_search']);
|
||||
}
|
||||
|
||||
$graphs_to_macro = db_get_all_rows_field_filter(
|
||||
'tgraph_source',
|
||||
'id_graph',
|
||||
|
@ -8802,24 +8806,27 @@ function reporting_availability($report, $content, $date=false, $time=false)
|
|||
$data = [];
|
||||
|
||||
$style = io_safe_output($content['style']);
|
||||
if ($style['hide_notinit_agents']) {
|
||||
$aux_id_agents = $agents;
|
||||
$i = 0;
|
||||
foreach ($items as $item) {
|
||||
$utimestamp = db_get_value(
|
||||
'utimestamp',
|
||||
'tagente_datos',
|
||||
'id_agente_modulo',
|
||||
$item['id_agent_module'],
|
||||
true
|
||||
);
|
||||
if (($utimestamp === false)
|
||||
|| (intval($utimestamp) > intval($datetime_to))
|
||||
) {
|
||||
unset($items[$i]);
|
||||
}
|
||||
|
||||
$i++;
|
||||
if (is_array($style)) {
|
||||
if ($style['hide_notinit_agents']) {
|
||||
$aux_id_agents = $agents;
|
||||
$i = 0;
|
||||
foreach ($items as $item) {
|
||||
$utimestamp = db_get_value(
|
||||
'utimestamp',
|
||||
'tagente_datos',
|
||||
'id_agente_modulo',
|
||||
$item['id_agent_module'],
|
||||
true
|
||||
);
|
||||
if (($utimestamp === false)
|
||||
|| (intval($utimestamp) > intval($datetime_to))
|
||||
) {
|
||||
unset($items[$i]);
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -478,8 +478,13 @@ function tactical_get_data(
|
|||
$list['_monitors_alerts_fired_'] = tactical_monitor_fired_alerts(explode(',', $user_groups_ids), $user_strict, explode(',', $user_groups_ids));
|
||||
$list['_monitors_alerts_'] = tactical_monitor_alerts($user_strict);
|
||||
|
||||
$filter_agents = [];
|
||||
if (users_is_admin() === false) {
|
||||
$filter_agents = ['id_grupo' => explode(',', $user_groups_ids)];
|
||||
}
|
||||
|
||||
$total_agentes = agents_get_agents(
|
||||
['id_grupo' => explode(',', $user_groups_ids)],
|
||||
$filter_agents,
|
||||
['count(DISTINCT id_agente) as total_agents'],
|
||||
'AR',
|
||||
false,
|
||||
|
|
|
@ -6597,10 +6597,10 @@ function ui_print_comments($comments)
|
|||
$rest_time = (time() - $last_comment['utimestamp']);
|
||||
$time_last = (($rest_time / 60) / 60);
|
||||
|
||||
$comentario = '<i>'.number_format($time_last, 0, $config['decimal_separator'], $config['thousand_separator']).' Hours ('.$last_comment['id_user'].'): '.$last_comment['comment'].'';
|
||||
$comentario = '<i>'.number_format($time_last, 0, $config['decimal_separator'], ($config['thousand_separator'] ?? ',')).' Hours ('.$last_comment['id_user'].'): '.$last_comment['comment'].'';
|
||||
|
||||
if (strlen($comentario) > '200px') {
|
||||
$comentario = '<i>'.number_format($time_last, 0, $config['decimal_separator'], $config['thousand_separator']).' Hours ('.$last_comment['id_user'].'): '.$short_comment.'...';
|
||||
$comentario = '<i>'.number_format($time_last, 0, $config['decimal_separator'], ($config['thousand_separator'] ?? ',')).' Hours ('.$last_comment['id_user'].'): '.$short_comment.'...';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -142,13 +142,21 @@ function users_get_groups_for_select(
|
|||
null
|
||||
);
|
||||
|
||||
if ($id_groups !== null) {
|
||||
$children = groups_get_children($id_groups);
|
||||
foreach ($children as $child) {
|
||||
unset($user_groups[$child['id_grupo']]);
|
||||
if ($id_groups !== null && empty($id_groups) === false) {
|
||||
$children = [];
|
||||
foreach ($id_groups as $key => $id_group) {
|
||||
$children[] = groups_get_children($id_group);
|
||||
}
|
||||
|
||||
unset($user_groups[$id_groups]);
|
||||
if (empty($children) === false) {
|
||||
foreach ($children as $child) {
|
||||
unset($user_groups[$child['id_grupo']]);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($id_groups as $key => $id_group) {
|
||||
unset($user_groups[$id_group]);
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($user_groups)) {
|
||||
|
@ -811,6 +819,20 @@ function users_get_users_by_group($id_group, $um=false, $disabled=true)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Delete session user if exist
|
||||
*
|
||||
* @param string $id_user User id.
|
||||
*
|
||||
* @return boolean Return .
|
||||
*/
|
||||
function delete_session_user($id_user)
|
||||
{
|
||||
$sql = "DELETE FROM tsessions_php where data like '%\"".$id_user."\"%'";
|
||||
return db_process_sql($sql);
|
||||
}
|
||||
|
||||
|
||||
function users_has_profile_without_UM($id_user, $id_groups)
|
||||
{
|
||||
$sql = sprintf(
|
||||
|
|
|
@ -154,14 +154,14 @@ function progressbar(
|
|||
/**
|
||||
* Draw vertical bars graph.
|
||||
*
|
||||
* @param array $chart_data Data chart.
|
||||
* @param array $params Params draw chart.
|
||||
* @param integer $ttl Pdf option.
|
||||
* @param array|null $chart_data Data chart.
|
||||
* @param array $params Params draw chart.
|
||||
* @param integer $ttl Pdf option.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
function vbar_graph(
|
||||
array $chart_data,
|
||||
array|null $chart_data,
|
||||
array $options
|
||||
) {
|
||||
if (empty($chart_data) === true) {
|
||||
|
|
|
@ -2504,7 +2504,7 @@ function refresh() {
|
|||
if (array_nodes.length === 0 && array_links.length === 0) {
|
||||
update_networkmap();
|
||||
$("#spinner_networkmap").css("display", "none");
|
||||
startCountDown(refresh_time);
|
||||
window.location = location;
|
||||
} else {
|
||||
if (array_nodes.length > 0) {
|
||||
$.ajax({
|
||||
|
@ -2530,6 +2530,7 @@ function refresh() {
|
|||
},
|
||||
error: function(e) {
|
||||
$("#spinner_networkmap").css("display", "none");
|
||||
window.location = location;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -336,19 +336,17 @@ function event_change_status(event_ids, server_id) {
|
|||
}
|
||||
|
||||
if (data.status == "status_ok") {
|
||||
// if (typeof dt_events !== "undefined") {
|
||||
// dt_events.draw(false);
|
||||
// }
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "ajax.php",
|
||||
data: {
|
||||
page: "include/ajax/events",
|
||||
get_Acknowledged: 1,
|
||||
event_id: event_ids
|
||||
event_id: event_ids,
|
||||
server_id: server_id
|
||||
},
|
||||
success: function(response) {
|
||||
$("#table4-9-1").html(response);
|
||||
$(".general_acknowleded").html(response);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -356,15 +354,6 @@ function event_change_status(event_ids, server_id) {
|
|||
.DataTable()
|
||||
.draw(false);
|
||||
$("#notification_status_success").show();
|
||||
if (new_status == 1) {
|
||||
$("#extended_event_general_page table td.general_acknowleded").text(
|
||||
data.user
|
||||
);
|
||||
} else {
|
||||
$("#extended_event_general_page table td.general_acknowleded").text(
|
||||
"N/A"
|
||||
);
|
||||
}
|
||||
|
||||
$("#general_status")
|
||||
.find(".general_status")
|
||||
|
|
|
@ -1685,3 +1685,17 @@ function changePlugin() {
|
|||
|
||||
$("#selected_plugin_description_" + moduleProtocol).html(pluginDescription);
|
||||
}
|
||||
|
||||
// Add observer to clear value when type attribute changes.
|
||||
function observerInputPassword() {
|
||||
const observer = new MutationObserver(function(mutations) {
|
||||
mutations.forEach(function(mutation) {
|
||||
if (mutation.type === "attributes" && mutation.attributeName === "type") {
|
||||
mutation.target.value = "";
|
||||
}
|
||||
});
|
||||
});
|
||||
Array.from($("input[type=password]")).forEach(function(input) {
|
||||
observer.observe(input, { attributes: true });
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1027,6 +1027,7 @@ class ClusterWizard extends \HTML
|
|||
foreach ($aa_modules as $module) {
|
||||
$inputs[] = [
|
||||
'block_id' => 'from-to-threshold',
|
||||
'label' => '<b>'.$module->name().'</b>',
|
||||
'class' => 'flex-row line w100p',
|
||||
'direct' => 1,
|
||||
'block_content' => [
|
||||
|
|
|
@ -675,7 +675,8 @@ class Manager implements PublicLogin
|
|||
int $offset=-1,
|
||||
int $limit=-1,
|
||||
bool $favourite=false,
|
||||
bool $slideshow=false
|
||||
bool $slideshow=false,
|
||||
string $id_user=''
|
||||
):array {
|
||||
global $config;
|
||||
|
||||
|
@ -693,11 +694,15 @@ class Manager implements PublicLogin
|
|||
$sql_where .= 'AND td.cells_slideshow = 1';
|
||||
}
|
||||
|
||||
if (empty($id_user) === true) {
|
||||
$id_user = $config['id_user'];
|
||||
}
|
||||
|
||||
// Check ACl.
|
||||
if (\is_user_admin($config['id_user']) !== true) {
|
||||
if (\is_user_admin($id_user) !== true) {
|
||||
// Non-admin user can see dashboards of his groups and 'AR' profile.
|
||||
$group_list = \users_get_groups(
|
||||
$config['id_user'],
|
||||
$id_user,
|
||||
'RR',
|
||||
true
|
||||
);
|
||||
|
@ -727,7 +732,7 @@ class Manager implements PublicLogin
|
|||
GROUP BY td.id
|
||||
ORDER BY name%s",
|
||||
$string_groups,
|
||||
$config['id_user'],
|
||||
$id_user,
|
||||
$sql_where,
|
||||
$sql_limit
|
||||
);
|
||||
|
@ -746,7 +751,7 @@ class Manager implements PublicLogin
|
|||
WHERE td.id_group = 0 AND td.id_user = '%s' %s
|
||||
GROUP BY td.id
|
||||
ORDER BY name%s",
|
||||
$config['id_user'],
|
||||
$id_user,
|
||||
$sql_where,
|
||||
$sql_limit
|
||||
);
|
||||
|
|
|
@ -357,7 +357,7 @@ final class Container extends Model
|
|||
$config['dbpass'].$row['id'].$config['id_user']
|
||||
);
|
||||
|
||||
return \io_safe_output($row);
|
||||
return $row;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1771,8 +1771,8 @@ class Item extends CachedModel
|
|||
$imageSrc = static::issetInArray(
|
||||
$data,
|
||||
[
|
||||
'image',
|
||||
'imageSrc',
|
||||
'image',
|
||||
'backgroundColor',
|
||||
'backgroundType',
|
||||
'valueType',
|
||||
|
|
|
@ -15,200 +15,383 @@
|
|||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
h1 {
|
||||
font: bold 1em;
|
||||
font-size: 18px;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
}
|
||||
h2 {
|
||||
font: Verdana;
|
||||
font-size: 16px;
|
||||
@font-face {
|
||||
font-family: "Circular Std Book";
|
||||
src: url("../../fonts/CircularStd-Book.woff") format("woff");
|
||||
font-weight: 500;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
div#install_container {
|
||||
@font-face {
|
||||
font-family: "Circular Std";
|
||||
src: url("../../CircularStd-Medium.woff") format("woff");
|
||||
font-weight: 500;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
html {
|
||||
background-image: url("../../images/installer-background.jpg");
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
}
|
||||
#install_container {
|
||||
max-width: 1000px;
|
||||
margin: 0 auto;
|
||||
margin-top: 45px;
|
||||
width: 650px;
|
||||
margin-top: 50px;
|
||||
background-color: #131727;
|
||||
color: white;
|
||||
font-family: "Circular Std Book";
|
||||
border-radius: 10px;
|
||||
}
|
||||
div#logo_img {
|
||||
#wizard {
|
||||
padding: 20px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.title {
|
||||
font-size: 40px;
|
||||
font-weight: 400;
|
||||
}
|
||||
.subtitle {
|
||||
font-size: 30px;
|
||||
font-weight: 400;
|
||||
}
|
||||
.text {
|
||||
font-size: 17px;
|
||||
}
|
||||
.content-footer {
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.title-pandora {
|
||||
margin: 0px;
|
||||
font-size: 18px;
|
||||
}
|
||||
.steps {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.step {
|
||||
font-size: 17px;
|
||||
border: 1px solid #8a96a6;
|
||||
color: #8a96a6;
|
||||
border-radius: 30px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
color: #666;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
div#wizard {
|
||||
text-align: left;
|
||||
margin-top: 1em;
|
||||
|
||||
width: 650px;
|
||||
padding-left: 0px;
|
||||
padding-top: 0px;
|
||||
padding-bottom: 20px;
|
||||
background-color: #ffffff;
|
||||
margin-top: 0px;
|
||||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
position: relative;
|
||||
.step.active {
|
||||
background-color: #82b92e;
|
||||
color: #ffffff;
|
||||
border-color: #82b92e;
|
||||
}
|
||||
|
||||
div#wizard a img {
|
||||
padding-right: 30px;
|
||||
.step-separator {
|
||||
min-width: 15px;
|
||||
margin: 0px 5px;
|
||||
border-color: #8a96a6;
|
||||
}
|
||||
|
||||
div#wizard > input {
|
||||
padding-right: 30px;
|
||||
float: right;
|
||||
.build-banner {
|
||||
color: #8a96a6;
|
||||
font-size: 13px;
|
||||
font-weight: 300;
|
||||
margin-left: 20px;
|
||||
}
|
||||
#foot_install {
|
||||
border-top: 1px solid white;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
div#install_box,
|
||||
div#install_img {
|
||||
padding-right: 20px;
|
||||
margin-top: 0px;
|
||||
width: 80%;
|
||||
margin: 0px auto;
|
||||
.signature {
|
||||
color: #8a96a6;
|
||||
font-size: 13px;
|
||||
font-weight: 300;
|
||||
margin-right: auto;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
div#install_box {
|
||||
background: F3F3F3;
|
||||
border: 1px solid #ccc;
|
||||
padding: 10px 25px;
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
div#install_box h2 {
|
||||
.link {
|
||||
color: #82b92e;
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
div#install_img {
|
||||
margin-bottom: 25px;
|
||||
margin-left: 25px;
|
||||
}
|
||||
div#foot_install {
|
||||
font-size: 7pt;
|
||||
color: #fff;
|
||||
margin-top: #000;
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
div#foot_install a {
|
||||
color: #ccc;
|
||||
}
|
||||
input#step4,
|
||||
input#step4:hover {
|
||||
width: 70px;
|
||||
height: 16px;
|
||||
border: 0px;
|
||||
background-color: #fafafa;
|
||||
}
|
||||
div.warn {
|
||||
min-height: 24px;
|
||||
background: url(../../images/icono_warning_install.png) no-repeat 0% -2px;
|
||||
color: #222;
|
||||
margin-top: 14px;
|
||||
padding: 2px 1px 6px 40px;
|
||||
}
|
||||
div.info {
|
||||
min-height: 24px;
|
||||
background: url(../../images/icono_info_install.png) no-repeat 0% -2px;
|
||||
color: #222;
|
||||
margin-top: 14px;
|
||||
padding: 2px 1px 6px 40px;
|
||||
}
|
||||
div.err {
|
||||
min-height: 24px;
|
||||
background: url(../../images/icono_critical_install.png) no-repeat 0% -2px;
|
||||
color: #cc0000;
|
||||
margin-top: 14px;
|
||||
padding: 2px 1px 6px 40px;
|
||||
}
|
||||
span.arr {
|
||||
background: url(../../images/arrow.png) no-repeat;
|
||||
margin-top: 2px;
|
||||
margin-left: 5px;
|
||||
padding: 2px 1px 6px 15px;
|
||||
display: block;
|
||||
font-size: 8.5pt;
|
||||
}
|
||||
|
||||
body,
|
||||
td {
|
||||
font-size: 9pt;
|
||||
line-height: 15px;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #555555;
|
||||
}
|
||||
|
||||
div.installation_step {
|
||||
position: static;
|
||||
float: right;
|
||||
top: 7px;
|
||||
right: 10px;
|
||||
color: #666;
|
||||
margin-top: 14px;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
.btn_install_next {
|
||||
transition-property: background-color, color;
|
||||
transition-duration: 1s;
|
||||
transition-timing-function: ease-out;
|
||||
-webkit-transition-property: background-color, color;
|
||||
-webkit-transition-duration: 1s;
|
||||
-o-transition-property: background-color, color;
|
||||
-o-transition-duration: 1s;
|
||||
margin: 10px;
|
||||
padding: 8px 20px 8px 20px;
|
||||
background-color: transparent;
|
||||
border: 1px solid #82b92e;
|
||||
font: 1em Verdana;
|
||||
font-size: 11pt;
|
||||
.signature a {
|
||||
color: #82b92e;
|
||||
border-radius: 0%;
|
||||
text-decoration: none;
|
||||
}
|
||||
.btn_install_next:hover {
|
||||
.btn_primary {
|
||||
color: white;
|
||||
background-color: #82b92e;
|
||||
border: 20px;
|
||||
font-size: 15px;
|
||||
border-radius: 6px;
|
||||
padding: 10px 20px;
|
||||
cursor: pointer;
|
||||
transition-property: background-color, color;
|
||||
transition-duration: 1s;
|
||||
transition-timing-function: ease-out;
|
||||
-webkit-transition-property: background-color, color;
|
||||
-webkit-transition-duration: 1s;
|
||||
-o-transition-property: background-color, color;
|
||||
-o-transition-duration: 1s;
|
||||
text-decoration: none;
|
||||
}
|
||||
.btn_primary.outline {
|
||||
background-color: transparent;
|
||||
border: 1px solid white;
|
||||
}
|
||||
.info {
|
||||
background: #d6e2ff;
|
||||
color: #454545;
|
||||
font-size: 15px;
|
||||
border-radius: 5px;
|
||||
padding: 15px;
|
||||
position: relative;
|
||||
margin: 25px 0px;
|
||||
}
|
||||
.info::before {
|
||||
content: "|";
|
||||
color: blue;
|
||||
position: absolute;
|
||||
left: 4px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
height: 77%;
|
||||
background: blue;
|
||||
border-radius: 12px;
|
||||
width: 4px;
|
||||
}
|
||||
.warn {
|
||||
background: #fffbdf;
|
||||
color: #454545;
|
||||
font-size: 15px;
|
||||
border-radius: 5px;
|
||||
padding: 15px;
|
||||
position: relative;
|
||||
margin: 25px 0px;
|
||||
}
|
||||
.warn::before {
|
||||
content: "|";
|
||||
color: #dd9900;
|
||||
position: absolute;
|
||||
left: 4px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
height: 77%;
|
||||
background: #dd9900;
|
||||
border-radius: 12px;
|
||||
width: 4px;
|
||||
}
|
||||
.err {
|
||||
background: #fbdada;
|
||||
color: #454545;
|
||||
font-size: 15px;
|
||||
border-radius: 5px;
|
||||
padding: 15px;
|
||||
position: relative;
|
||||
margin: 25px 0px;
|
||||
}
|
||||
.err::before {
|
||||
content: "|";
|
||||
color: red;
|
||||
position: absolute;
|
||||
left: 4px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
height: 77%;
|
||||
background: red;
|
||||
border-radius: 12px;
|
||||
width: 4px;
|
||||
}
|
||||
.check-table {
|
||||
background-color: #0f111b;
|
||||
color: #c1ccdc;
|
||||
padding: 10px;
|
||||
width: 100%;
|
||||
border-radius: 8px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.check-table td {
|
||||
padding: 5px 0px;
|
||||
}
|
||||
.incomplete {
|
||||
color: red;
|
||||
}
|
||||
.checked {
|
||||
color: #82b92e;
|
||||
}
|
||||
.row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
}
|
||||
.reverse {
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
.col-md-6 {
|
||||
width: 47%;
|
||||
position: relative;
|
||||
padding: 0px 10px;
|
||||
}
|
||||
.content-animation {
|
||||
display: flex;
|
||||
height: 94%;
|
||||
bottom: 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
width: 90%;
|
||||
}
|
||||
.content-animation::before {
|
||||
content: "";
|
||||
width: 120%;
|
||||
position: absolute;
|
||||
height: 103%;
|
||||
background-image: linear-gradient(225deg, #731dd854 0%, #2eb9b83d 100%);
|
||||
top: 0;
|
||||
left: 0;
|
||||
border-top-left-radius: 100px;
|
||||
}
|
||||
.popuphero {
|
||||
margin-top: 48px;
|
||||
margin-left: -26px;
|
||||
}
|
||||
|
||||
.popupgear1 img,
|
||||
.popupgear2 img {
|
||||
height: 176px;
|
||||
position: absolute;
|
||||
}
|
||||
.popupgear1 img {
|
||||
margin: 0px 0px 0px 129px;
|
||||
animation: rotar1 10s infinite linear;
|
||||
}
|
||||
.popupgear2 img {
|
||||
margin: 130px 0px 0px 0px;
|
||||
animation: rotar2 10s infinite linear;
|
||||
}
|
||||
.popuplaptop img {
|
||||
height: 352px;
|
||||
position: absolute;
|
||||
margin: 115px 0px 0px 0px;
|
||||
}
|
||||
.login {
|
||||
font-size: 14px;
|
||||
padding: 8px 10px;
|
||||
border-radius: 5px;
|
||||
border: 0px;
|
||||
width: 100%;
|
||||
}
|
||||
.input-label {
|
||||
color: #8a96a6;
|
||||
font-size: 13px;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.example-message {
|
||||
color: #8a96a6;
|
||||
font-size: 8px;
|
||||
}
|
||||
.login[type="checkbox"] {
|
||||
width: auto;
|
||||
}
|
||||
.table-config-database td {
|
||||
text-align: left;
|
||||
}
|
||||
.table-config-database td.inline {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.table-config-database td.inline .input-label {
|
||||
margin-left: 10px;
|
||||
}
|
||||
@keyframes rotar1 {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
@keyframes rotar2 {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(-360deg);
|
||||
}
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
.col-md-6 {
|
||||
width: 100%;
|
||||
}
|
||||
.hide-phone {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* SWITCH */
|
||||
|
||||
.switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 33px;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
.switch input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: #ccc;
|
||||
-webkit-transition: 0.4s;
|
||||
transition: 0.4s;
|
||||
}
|
||||
|
||||
.slider:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 19px;
|
||||
width: 19px;
|
||||
left: 0px;
|
||||
background-color: white;
|
||||
-webkit-transition: 0.4s;
|
||||
transition: 0.4s;
|
||||
transform: translateY(-50%);
|
||||
top: 50%;
|
||||
}
|
||||
|
||||
input:checked + .slider {
|
||||
background-color: #82b92e;
|
||||
}
|
||||
.btn_install_next_text {
|
||||
transition-property: background-color, color;
|
||||
transition-duration: 1s;
|
||||
transition-timing-function: ease-out;
|
||||
-webkit-transition-property: background-color, color;
|
||||
-webkit-transition-duration: 1s;
|
||||
-o-transition-property: background-color, color;
|
||||
-o-transition-duration: 1s;
|
||||
color: #82b92e;
|
||||
}
|
||||
.btn_install_next:hover .btn_install_next_text {
|
||||
transition-property: background-color, color;
|
||||
transition-duration: 1s;
|
||||
transition-timing-function: ease-out;
|
||||
-webkit-transition-property: background-color, color;
|
||||
-webkit-transition-duration: 1s;
|
||||
-o-transition-property: background-color, color;
|
||||
-o-transition-duration: 1s;
|
||||
color: white;
|
||||
|
||||
input:focus + .slider {
|
||||
box-shadow: 0 0 1px #82b92e;
|
||||
}
|
||||
|
||||
:focus {
|
||||
outline: 0;
|
||||
input:checked + .slider:before {
|
||||
-webkit-transform: translate(15px, -50%);
|
||||
-ms-transform: translate(15px, -50%);
|
||||
transform: translate(15px, -50%);
|
||||
}
|
||||
|
||||
/* Rounded sliders */
|
||||
.slider.round {
|
||||
border-radius: 34px;
|
||||
}
|
||||
|
||||
.slider.round:before {
|
||||
border-radius: 50%;
|
||||
}
|
||||
/* POPUP */
|
||||
.popup-lightbox {
|
||||
position: fixed;
|
||||
|
@ -218,6 +401,7 @@ div.installation_step {
|
|||
background-color: #000;
|
||||
opacity: 0.6;
|
||||
visibility: hidden;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.popup {
|
||||
|
@ -227,17 +411,22 @@ div.installation_step {
|
|||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
-webkit-transform: translate(-50%, -50%);
|
||||
background-color: #fff;
|
||||
z-index: 9999;
|
||||
display: none;
|
||||
font-family: "Circular Std Book";
|
||||
}
|
||||
.popup .btn_primary.outline {
|
||||
color: #82b92e;
|
||||
border-color: #82b92e;
|
||||
margin: 0px 20px;
|
||||
}
|
||||
|
||||
.popup-title {
|
||||
background-color: #82b92e;
|
||||
padding: 10px 20px;
|
||||
color: #fff;
|
||||
font-size: 12pt;
|
||||
text-align: center;
|
||||
border-radius: 10px 10px 0px 0px;
|
||||
}
|
||||
|
||||
.popup-inner {
|
||||
|
@ -246,6 +435,7 @@ div.installation_step {
|
|||
/* overflow-y: scroll;*/
|
||||
padding: 25px 35px;
|
||||
font-size: 11pt;
|
||||
border-radius: 0px 0px 10px 10px;
|
||||
}
|
||||
|
||||
.popup-button-green {
|
||||
|
|
|
@ -1210,3 +1210,92 @@ input[type="image"] {
|
|||
.mono {
|
||||
font-family: source-code, mono, monospace;
|
||||
}
|
||||
|
||||
* table about dialog */ .table-about {
|
||||
background-color: #222 !important;
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
border-color: #222 !important;
|
||||
}
|
||||
|
||||
.table-about th {
|
||||
background-color: #222 !important;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.table-about h1 {
|
||||
text-transform: none !important;
|
||||
font-size: 28px !important;
|
||||
color: white;
|
||||
margin-top: 34px;
|
||||
margin-left: 9px;
|
||||
}
|
||||
|
||||
.table-about h2 {
|
||||
text-transform: none !important;
|
||||
font-size: 15px !important;
|
||||
margin-bottom: 5px;
|
||||
margin-left: 9px;
|
||||
color: #95a3bf;
|
||||
}
|
||||
|
||||
.table-about h2 span {
|
||||
color: #95a3bf;
|
||||
font-size: large;
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.table-about p {
|
||||
color: white;
|
||||
font-size: 15px;
|
||||
font-weight: normal;
|
||||
margin: 7px;
|
||||
margin-left: 9px;
|
||||
}
|
||||
|
||||
.table-about p span {
|
||||
color: white;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
margin: 9px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
.table-about p.about-last-p {
|
||||
padding-bottom: 17px;
|
||||
}
|
||||
|
||||
.table-about .about-last-tr {
|
||||
border-bottom: 1px solid #eaeaea;
|
||||
}
|
||||
|
||||
.about-copyright-div {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
p.trademark-copyright {
|
||||
width: 90%;
|
||||
color: #8a96a6;
|
||||
font-size: 13px;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 0px;
|
||||
text-align: center !important;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
#about-tabs,
|
||||
#tab-general-view {
|
||||
padding-bottom: 0px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
#about-tabs {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#tab-database {
|
||||
height: 80%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1440,6 +1440,16 @@ if ($searchPage) {
|
|||
}
|
||||
}
|
||||
|
||||
if (__PAN_XHPROF__ === 1) {
|
||||
echo "<span style='font-size: 0.8em;'>";
|
||||
echo __('Page generated at').' ';
|
||||
echo date('D F d, Y H:i:s', $time).'</span>';
|
||||
echo ' - ( ';
|
||||
pandora_xhprof_display_result('node_index');
|
||||
echo ' )';
|
||||
echo '</center>';
|
||||
}
|
||||
|
||||
if ($config['pure'] == 0) {
|
||||
echo '<div id="both"></div>';
|
||||
echo '</div>';
|
||||
|
@ -1623,7 +1633,3 @@ require 'include/php_to_js_values.php';
|
|||
);
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
if (__PAN_XHPROF__ === 1) {
|
||||
pandora_xhprof_display_result('node_index');
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1061,7 +1061,7 @@ if (is_ajax() === true) {
|
|||
|
||||
if (preg_match('/(.+)_ifOperStatus$/', (string) $source_text, $matches)) {
|
||||
if ($matches[1]) {
|
||||
$source_text = $matches[1];
|
||||
$source_text = $matches[1];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -1480,7 +1480,7 @@ if (!empty($result)) {
|
|||
'agent_small',
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'[…]',
|
||||
'font-size:7.5pt;'
|
||||
);
|
||||
|
|
|
@ -320,6 +320,7 @@ try {
|
|||
$rss .= xml_entry('link', $url.'index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$row['id_agente']);
|
||||
}
|
||||
|
||||
$rss .= xml_entry('author', $row['agent_name']);
|
||||
$rss .= xml_entry('comments', $row['']);
|
||||
$rss .= xml_entry('pubDate', $row['timestamp']);
|
||||
$rss .= xml_entry('category', $row['source']);
|
||||
|
|
|
@ -31,6 +31,7 @@ global $config;
|
|||
$headerTitle = __('User detail editor');
|
||||
// Load the header.
|
||||
require $config['homedir'].'/operation/users/user_edit_header.php';
|
||||
use PandoraFMS\Dashboard\Manager;
|
||||
|
||||
if (is_metaconsole() === false) {
|
||||
include 'include/javascript/timezonepicker/includes/parser.inc';
|
||||
|
@ -442,7 +443,13 @@ if (!$meta) {
|
|||
|
||||
$home_screen .= html_print_select($values, 'section', io_safe_output($user_info['section']), 'show_data_section();', '', -1, true, false, false).'</div>';
|
||||
|
||||
$dashboards = get_user_dashboards($config['id_user']);
|
||||
$dashboards = Manager::getDashboards(
|
||||
-1,
|
||||
-1,
|
||||
false,
|
||||
false,
|
||||
$config['id_user']
|
||||
);
|
||||
|
||||
$dashboards_aux = [];
|
||||
if ($dashboards === false) {
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
# Pandora FMS Console
|
||||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.767
|
||||
%define release 230118
|
||||
%define version 7.0NG.768
|
||||
%define release 230131
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
# Pandora FMS Console
|
||||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.767
|
||||
%define release 230118
|
||||
%define version 7.0NG.768
|
||||
%define release 230131
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
# Pandora FMS Console
|
||||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.767
|
||||
%define release 230118
|
||||
%define version 7.0NG.768
|
||||
%define release 230131
|
||||
%define httpd_name httpd
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name apache2
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# This code is licensed under GPL 2.0 license.
|
||||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.767"
|
||||
PI_VERSION="7.0NG.768"
|
||||
FORCE=0
|
||||
DESTDIR=""
|
||||
LOG_TIMESTAMP=`date +"%Y/%m/%d %H:%M:%S"`
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue