diff --git a/extras/deploy-scripts/pandora_agent_deploy.sh b/extras/deploy-scripts/pandora_agent_deploy.sh
index a16f5afc47..88bfe4dd83 100644
--- a/extras/deploy-scripts/pandora_agent_deploy.sh
+++ b/extras/deploy-scripts/pandora_agent_deploy.sh
@@ -78,16 +78,16 @@ cd unix && ./pandora_agent_installer --install
}
-install_autodiscover () {
- local arch=$1
- wget http://firefly.pandorafms.com/projects/autodiscover-linux.zip
- unzip autodiscover-linux.zip
- chmod +x $arch/autodiscover
- mv -f $arch/autodiscover /etc/pandora/plugins/autodiscover
-}
+# install_autodiscover () {
+# local arch=$1
+# wget http://firefly.pandorafms.com/projects/autodiscover-linux.zip
+# unzip autodiscover-linux.zip
+# chmod +x $arch/autodiscover
+# mv -f $arch/autodiscover /etc/pandora/plugins/autodiscover
+# }
## Main
-echo "Starting PandoraFMS Agent deployment ver. $S_VERSION"
+echo "Starting PandoraFMS Agent binary deployment ver. $S_VERSION"
execute_cmd "[ $PANDORA_SERVER_IP ]" 'Check Server IP Address' 'Please define env variable PANDORA_SERVER_IP'
@@ -104,8 +104,6 @@ OS=$([[ $(grep '^ID_LIKE=' /etc/os-release) ]] && grep ^ID_LIKE= /etc/os-release
[[ $OS =~ 'rhel' ]] && OS_RELEASE=$OS
[[ $OS =~ 'fedora' ]] && OS_RELEASE=$OS
[[ $OS =~ 'debian' ]] && OS_RELEASE=$OS
-#[[ $OS == 'rhel fedora' ]] && OS_RELEASE=$OS
-#[[ $OS == 'centos rhel fedora' ]] && OS_RELEASE=$OS
# initialice logfile
execute_cmd "echo 'Starting community deployment' > $LOGFILE" "All installer activity is logged on $LOGFILE"
@@ -126,6 +124,30 @@ check_repo_connection
execute_cmd "grep --version" 'Checking needed tools: grep'
execute_cmd "sed --version" 'Checking needed tools: sed'
+# Arch check
+arch=$(uname -m)
+case $arch in
+
+ x86_64)
+ echo -e "${cyan}Arch: $arch ${reset} "
+ ;;
+
+ x86)
+ echo -e "${yellow}Skiping installation arch: $arch not suported by binary agent please consider to install source agent${reset}"
+ exit -1
+ ;;
+
+ armv7l)
+ echo -e "${yellow}Skiping installation arch: $arch not suported by binary agent please consider to install source agent${reset}"
+ exit -1
+ ;;
+
+ *)
+ echo -e "${yellow}Skiping installation arch: $arch not suported by binary agent please consider to install source agent${reset}"
+ exit -1
+ ;;
+esac
+
# Creating working directory
rm -rf $HOME/pandora_deploy_tmp/ &>> $LOGFILE
mkdir $HOME/pandora_deploy_tmp &>> $LOGFILE
@@ -148,6 +170,10 @@ if [[ $OS_RELEASE =~ 'rhel' ]] || [[ $OS_RELEASE =~ 'fedora' ]]; then
# Check rh version
if [ $(sed -nr 's/VERSION_ID+=\s*"([0-9]).*"$/\1/p' /etc/os-release) -eq '8' ] ; then
package_manager_cmd=dnf
+ execute_cmd "$package_manager_cmd install -y libnsl" "Installing dependencies"
+ elif [ $(sed -nr 's/VERSION_ID+=\s*"([0-9]).*"$/\1/p' /etc/os-release) -eq '9' ] ; then
+ package_manager_cmd=dnf
+ execute_cmd "$package_manager_cmd install -y libnsl libxcrypt-compat" "Installing dependencies"
elif [ $(sed -nr 's/VERSION_ID+=\s*"([0-9]).*"$/\1/p' /etc/os-release) -eq '7' ] ; then
package_manager_cmd=yum
@@ -158,24 +184,23 @@ if [[ $OS_RELEASE =~ 'rhel' ]] || [[ $OS_RELEASE =~ 'fedora' ]]; then
echo -e "${cyan}Installing agent dependencies...${reset}" ${green}OK${reset}
# Insatall pandora agent
- $package_manager_cmd install -y http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm &>> $LOGFILE
- echo -en "${cyan}Installing Pandora FMS agent...${reset}"
- check_cmd_status 'Error installing Pandora FMS agent'
- [[ $PANDORA_AGENT_SSL ]] && execute_cmd "$package_manager_cmd install -y perl-IO-Socket-SSL" "Installing SSL libraries for encrypted connection"
+ [ "$PANDORA_AGENT_PACKAGE_EL" ] || PANDORA_AGENT_PACKAGE_EL="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux_bin-7.0NG.x86_64.rpm "
+ execute_cmd "$package_manager_cmd install -y ${PANDORA_AGENT_PACKAGE_EL}" 'Installing Pandora FMS agent package'
+ #[[ $PANDORA_AGENT_SSL ]] && execute_cmd "$package_manager_cmd install -y perl-IO-Socket-SSL" "Installing SSL libraries for encrypted connection"
fi
if [[ $OS_RELEASE == 'debian' ]]; then
+ [ "$PANDORA_AGENT_PACKAGE_UBUNTU" ] || PANDORA_AGENT_PACKAGE_UBUNTU='https://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG_x86_64.tar.gz'
execute_cmd "apt update" 'Updating repos'
- execute_cmd "apt install -y perl wget curl unzip procps python3 python3-pip" 'Installing agent dependencies'
- execute_cmd 'wget http://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.tar.gz' 'Downloading Pandora FMS agent package'
+ execute_cmd "apt install -y perl wget curl unzip procps python3 python3-pip" 'Installing agent dependencies'
+ execute_cmd "curl --output pandorafms_agent_linux-7.0NG.tar.gz ${PANDORA_AGENT_PACKAGE_UBUNTU}" 'Downloading Pandora FMS agent package'
execute_cmd 'install_tarball pandorafms_agent_linux-7.0NG.tar.gz' 'Installing Pandora FMS agent'
- [[ $PANDORA_AGENT_SSL ]] && execute_cmd 'apt install -y libio-socket-ssl-perl' "Installing SSL libraries for encrypted connection"
+ #[[ $PANDORA_AGENT_SSL ]] && execute_cmd 'apt install -y libio-socket-ssl-perl' "Installing SSL libraries for encrypted connection"
cd $HOME/pandora_deploy_tmp
fi
# Configuring Agente
-
[[ $PANDORA_SERVER_IP ]] && sed -i "s/^server_ip.*$/server_ip $PANDORA_SERVER_IP/g" $PANDORA_AGENT_CONF
[[ $PANDORA_REMOTE_CONFIG ]] && sed -i "s/^remote_config.*$/remote_config $PANDORA_REMOTE_CONFIG/g" $PANDORA_AGENT_CONF
[[ $PANDORA_GROUP ]] && sed -i "s/^group.*$/group $PANDORA_GROUP/g" $PANDORA_AGENT_CONF
@@ -187,27 +212,6 @@ fi
[[ $PANDORA_AGENT_SSL ]] && sed -i "s/^#server_ssl.*$/server_ssl $PANDORA_AGENT_SSL/g" $PANDORA_AGENT_CONF
-#installing autodiscover
-
-arch=$(uname -m)
-case $arch in
-
- x86_64)
- execute_cmd 'install_autodiscover x86_64' "installing service autodiscover on $arch" 'Error unable to install autodiscovery'
- ;;
-
- x86)
- execute_cmd 'install_autodiscover x84' "installing service autodiscover on $arch" 'Error unable to install autodiscovery'
- ;;
-
- armv7l)
- echo -e "${cyan}Skiping autodiscover installation arch $arch not suported${reset}"
- ;;
-
- *)
- echo -e "${yellow}Skiping autodiscover installation arch $arch not suported${reset}"
- ;;
-esac
#Starting pandora agent daemon.
execute_cmd '/etc/init.d/pandora_agent_daemon restart' 'Starting Pandora Agent'
diff --git a/extras/pandora_update_version.sh b/extras/pandora_update_version.sh
index 6554a81c84..29dee8f0ce 100755
--- a/extras/pandora_update_version.sh
+++ b/extras/pandora_update_version.sh
@@ -28,7 +28,7 @@ $PANDHOME_ENT/pandora_server/PandoraFMS-Enterprise/pandora_server_enterprise.spe
$CODEHOME/pandora_console/pandora_console.redhat.spec \
$CODEHOME/pandora_console/pandora_console.rhel7.spec \
$CODEHOME/pandora_agents/unix/pandora_agent.redhat.spec \
-$CODEHOME/pandora_agents/unix/pandora_agent.redhat_bin.spec\
+$CODEHOME/pandora_agents/unix/pandora_agent.redhat_bin.spec \
$CODEHOME/pandora_server/pandora_server.redhat.spec \
$PANDHOME_ENT/pandora_agents/pandora_agent.spec \
$PANDHOME_ENT/pandora_server/pandora_server_enterprise.redhat.spec \
diff --git a/pandora_agents/pc/AIX/pandora_agent.conf b/pandora_agents/pc/AIX/pandora_agent.conf
index 8e2d047bd5..5c5ec2d3b6 100644
--- a/pandora_agents/pc/AIX/pandora_agent.conf
+++ b/pandora_agents/pc/AIX/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.773, AIX version
+# Version 7.0NG.773.3, AIX version
# Licensed under GPL license v2,
# Copyright (c) 2003-2023 Pandora FMS
# http://www.pandorafms.com
diff --git a/pandora_agents/pc/FreeBSD/pandora_agent.conf b/pandora_agents/pc/FreeBSD/pandora_agent.conf
index f63eda7230..ed33c06e4d 100644
--- a/pandora_agents/pc/FreeBSD/pandora_agent.conf
+++ b/pandora_agents/pc/FreeBSD/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.773, FreeBSD Version
+# Version 7.0NG.773.3, FreeBSD Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2023 Pandora FMS
# http://www.pandorafms.com
diff --git a/pandora_agents/pc/HP-UX/pandora_agent.conf b/pandora_agents/pc/HP-UX/pandora_agent.conf
index e22c6de293..784c729f73 100644
--- a/pandora_agents/pc/HP-UX/pandora_agent.conf
+++ b/pandora_agents/pc/HP-UX/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.773, HP-UX Version
+# Version 7.0NG.773.3, HP-UX Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2023 Pandora FMS
# http://www.pandorafms.com
diff --git a/pandora_agents/pc/Linux/pandora_agent.conf b/pandora_agents/pc/Linux/pandora_agent.conf
index 2461c8e348..0a3a48950c 100644
--- a/pandora_agents/pc/Linux/pandora_agent.conf
+++ b/pandora_agents/pc/Linux/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.773, GNU/Linux
+# Version 7.0NG.773.3, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2023 Pandora FMS
# http://www.pandorafms.com
@@ -166,7 +166,7 @@ module_description User CPU Usage (%)
module_min_warning 70
module_max_warning 90
module_min_critical 91
-module_max_critical 100
+module_max_critical 0
module_unit %
module_end
diff --git a/pandora_agents/pc/NT4/pandora_agent.conf b/pandora_agents/pc/NT4/pandora_agent.conf
index a0121ee37b..28ee6bd21f 100644
--- a/pandora_agents/pc/NT4/pandora_agent.conf
+++ b/pandora_agents/pc/NT4/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.773, GNU/Linux
+# Version 7.0NG.773.3, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2023 Pandora FMS
# http://www.pandorafms.com
diff --git a/pandora_agents/pc/SunOS/pandora_agent.conf b/pandora_agents/pc/SunOS/pandora_agent.conf
index 8196680c70..3d17139780 100644
--- a/pandora_agents/pc/SunOS/pandora_agent.conf
+++ b/pandora_agents/pc/SunOS/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.773, Solaris Version
+# Version 7.0NG.773.3, Solaris Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2023 Pandora FMS
# http://www.pandorafms.com
diff --git a/pandora_agents/pc/Win32/pandora_agent.conf b/pandora_agents/pc/Win32/pandora_agent.conf
index bf98ff3da8..edf5a7847a 100644
--- a/pandora_agents/pc/Win32/pandora_agent.conf
+++ b/pandora_agents/pc/Win32/pandora_agent.conf
@@ -1,6 +1,6 @@
# Base config file for Pandora FMS Windows Agent
# (c) 2006-2023 Pandora FMS
-# Version 7.0NG.773
+# Version 7.0NG.773.3
# 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
@@ -119,7 +119,7 @@ module_description CPU Load (%)
module_min_warning 80
module_max_warning 90
module_min_critical 91
-module_max_critical 100
+module_max_critical 0
module_end
# Number processes
diff --git a/pandora_agents/shellscript/aix/pandora_agent.conf b/pandora_agents/shellscript/aix/pandora_agent.conf
index 2f974a3a1a..d2c1806dc0 100644
--- a/pandora_agents/shellscript/aix/pandora_agent.conf
+++ b/pandora_agents/shellscript/aix/pandora_agent.conf
@@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
-# Version 7.0NG.773, AIX version
+# Version 7.0NG.773.3, AIX version
# General Parameters
# ==================
diff --git a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf
index 2c188857a1..69b39f6a25 100644
--- a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf
+++ b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf
@@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
-# Version 7.0NG.773
+# Version 7.0NG.773.3
# FreeBSD/IPSO version
# Licenced under GPL licence, 2003-2007 Sancho Lerena
diff --git a/pandora_agents/shellscript/hp-ux/pandora_agent.conf b/pandora_agents/shellscript/hp-ux/pandora_agent.conf
index 60664042dc..b27bfe9167 100644
--- a/pandora_agents/shellscript/hp-ux/pandora_agent.conf
+++ b/pandora_agents/shellscript/hp-ux/pandora_agent.conf
@@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
-# Version 7.0NG.773, HPUX Version
+# Version 7.0NG.773.3, HPUX Version
# General Parameters
# ==================
diff --git a/pandora_agents/shellscript/linux/pandora_agent.conf b/pandora_agents/shellscript/linux/pandora_agent.conf
index b15e1107d2..23dff46fb5 100644
--- a/pandora_agents/shellscript/linux/pandora_agent.conf
+++ b/pandora_agents/shellscript/linux/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.773
+# Version 7.0NG.773.3
# Licensed under GPL license v2,
# (c) 2003-2023 Pandora FMS
# please visit http://pandora.sourceforge.net
diff --git a/pandora_agents/shellscript/mac_osx/pandora_agent.conf b/pandora_agents/shellscript/mac_osx/pandora_agent.conf
index f4d4d6bb62..3250232611 100644
--- a/pandora_agents/shellscript/mac_osx/pandora_agent.conf
+++ b/pandora_agents/shellscript/mac_osx/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.773
+# Version 7.0NG.773.3
# Licensed under GPL license v2,
# (c) 2003-2023 Pandora FMS
# please visit http://pandora.sourceforge.net
diff --git a/pandora_agents/shellscript/openWRT/pandora_agent.conf b/pandora_agents/shellscript/openWRT/pandora_agent.conf
index 9cac504e38..29fd1d64da 100644
--- a/pandora_agents/shellscript/openWRT/pandora_agent.conf
+++ b/pandora_agents/shellscript/openWRT/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.773
+# Version 7.0NG.773.3
# Licensed under GPL license v2,
# please visit http://pandora.sourceforge.net
diff --git a/pandora_agents/shellscript/solaris/pandora_agent.conf b/pandora_agents/shellscript/solaris/pandora_agent.conf
index 40ddbc04b6..a4b43f1944 100644
--- a/pandora_agents/shellscript/solaris/pandora_agent.conf
+++ b/pandora_agents/shellscript/solaris/pandora_agent.conf
@@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
-# Version 7.0NG.773, Solaris version
+# Version 7.0NG.773.3, Solaris version
# General Parameters
# ==================
diff --git a/pandora_agents/unix/AIX/pandora_agent.conf b/pandora_agents/unix/AIX/pandora_agent.conf
index 1854b87b6c..29fb0051d5 100644
--- a/pandora_agents/unix/AIX/pandora_agent.conf
+++ b/pandora_agents/unix/AIX/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.773, AIX version
+# Version 7.0NG.773.3, AIX version
# Licensed under GPL license v2,
# Copyright (c) 2003-2023 Pandora FMS
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index f17d570a6c..18154e77d1 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-agent-unix
-Version: 7.0NG.773-230818
+Version: 7.0NG.773.3-230911
Architecture: all
Priority: optional
Section: admin
diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh
index 16aaa10b94..dbab591923 100644
--- a/pandora_agents/unix/DEBIAN/make_deb_package.sh
+++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-pandora_version="7.0NG.773-230818"
+pandora_version="7.0NG.773.3-230911"
echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
diff --git a/pandora_agents/unix/Darwin/dmg/build_darwin_dmg.sh b/pandora_agents/unix/Darwin/dmg/build_darwin_dmg.sh
index 6a9f7a5504..91907dbd82 100644
--- a/pandora_agents/unix/Darwin/dmg/build_darwin_dmg.sh
+++ b/pandora_agents/unix/Darwin/dmg/build_darwin_dmg.sh
@@ -31,7 +31,7 @@ fi
if [ "$#" -ge 2 ]; then
VERSION="$2"
else
- VERSION="7.0NG.773"
+ VERSION="7.0NG.773.3"
fi
# Path for the generated DMG file
diff --git a/pandora_agents/unix/Darwin/dmg/extras/distribution.xml b/pandora_agents/unix/Darwin/dmg/extras/distribution.xml
index e8bdaca067..94266e09e4 100644
--- a/pandora_agents/unix/Darwin/dmg/extras/distribution.xml
+++ b/pandora_agents/unix/Darwin/dmg/extras/distribution.xml
@@ -19,11 +19,11 @@
0?d[i-1]:l,v.x1=i
0)for(i=0;i=n)&&(e=n);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(e=i)&&(e=i)}return e}function tt(t,n){let e,r=-1,i=-1;if(void 0===n)for(const n of t)++i,null!=n&&(e =0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=un);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o >1)+h+t+M+S.slice(A);break;default:t=S+h+t+M}return u(t)}return y=void 0===y?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),M.toString=function(){return t+""},M}return{format:l,formatPrefix:function(t,n){var e=l(((t=Jc(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Zc(n)/3))),i=Math.pow(10,-r),o=uf[8+r/3];return function(t){return e(i*t)+o}}}}function ff(n){return of=cf(n),t.format=of.format,t.formatPrefix=of.formatPrefix,of}function sf(t){return Math.max(0,-Zc(Math.abs(t)))}function lf(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Zc(n)/3)))-Zc(Math.abs(t)))}function hf(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,Zc(n)-Zc(t))+1}t.format=void 0,t.formatPrefix=void 0,ff({thousands:",",grouping:[3],currency:["$",""]});var df=1e-6,pf=1e-12,gf=Math.PI,yf=gf/2,vf=gf/4,_f=2*gf,bf=180/gf,mf=gf/180,xf=Math.abs,wf=Math.atan,Mf=Math.atan2,Tf=Math.cos,Af=Math.ceil,Sf=Math.exp,Ef=Math.hypot,Nf=Math.log,kf=Math.pow,Cf=Math.sin,Pf=Math.sign||function(t){return t>0?1:t<0?-1:0},zf=Math.sqrt,$f=Math.tan;function Df(t){return t>1?0:t<-1?gf:Math.acos(t)}function Rf(t){return t>1?yf:t<-1?-yf:Math.asin(t)}function Ff(t){return(t=Cf(t/2))*t}function qf(){}function Uf(t,n){t&&Of.hasOwnProperty(t.type)&&Of[t.type](t,n)}var If={Feature:function(t,n){Uf(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r=0?1:-1,i=r*e,o=Tf(n=(n*=mf)/2+vf),a=Cf(n),u=Vf*a,c=Gf*o+u*Tf(i),f=u*r*Cf(i);as.add(Mf(f,c)),Xf=t,Gf=o,Vf=a}function ds(t){return[Mf(t[1],t[0]),Rf(t[2])]}function ps(t){var n=t[0],e=t[1],r=Tf(e);return[r*Tf(n),r*Cf(n),Cf(e)]}function gs(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function ys(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function vs(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function _s(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function bs(t){var n=zf(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}var ms,xs,ws,Ms,Ts,As,Ss,Es,Ns,ks,Cs,Ps,zs,$s,Ds,Rs,Fs={point:qs,lineStart:Is,lineEnd:Os,polygonStart:function(){Fs.point=Bs,Fs.lineStart=Ys,Fs.lineEnd=Ls,rs=new T,cs.polygonStart()},polygonEnd:function(){cs.polygonEnd(),Fs.point=qs,Fs.lineStart=Is,Fs.lineEnd=Os,as<0?(Wf=-(Kf=180),Zf=-(Qf=90)):rs>df?Qf=90:rs<-df&&(Zf=-90),os[0]=Wf,os[1]=Kf},sphere:function(){Wf=-(Kf=180),Zf=-(Qf=90)}};function qs(t,n){is.push(os=[Wf=t,Kf=t]),n t.r&&(t.r=t[n].r)}function c(){if(n){var r,i,o=n.length;for(e=new Array(o),r=0;r >>1;f[g]1;)i-=2;for(let t=2;t0){if(n>=this.ymax)return null;(i=(this.ymax-n)/r)0){if(t>=this.xmax)return null;(i=(this.xmax-t)/e)this.xmax?2:0)|(n9999?"+"+Ku(n,6):Ku(n,4))+"-"+Ku(t.getUTCMonth()+1,2)+"-"+Ku(t.getUTCDate(),2)+(o?"T"+Ku(e,2)+":"+Ku(r,2)+":"+Ku(i,2)+"."+Ku(o,3)+"Z":i?"T"+Ku(e,2)+":"+Ku(r,2)+":"+Ku(i,2)+"Z":r||e?"T"+Ku(e,2)+":"+Ku(r,2)+"Z":"")}function Ju(t){var n=new RegExp('["'+t+"\n\r]"),e=t.charCodeAt(0);function r(t,n){var r,i=[],o=t.length,a=0,u=0,c=o<=0,f=!1;function s(){if(c)return Hu;if(f)return f=!1,ju;var n,r,i=a;if(t.charCodeAt(i)===Xu){for(;a++=v)<<1|t>=y)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-f],p[p.length-1-f]=c)}else{var _=t-+this._x.call(null,g.data),b=n-+this._y.call(null,g.data),m=_*_+b*b;if(m=u)){(t.data!==n||t.next)&&(0===l&&(p+=(l=Uc(e))*l),0===h&&(p+=(h=Uc(e))*h),p(t=(Lc*t+jc)%Hc)/Hc}();function l(){h(),f.call("tick",n),e1?(f.on(t,e),n):f.on(t)}}},t.forceX=function(t){var n,e,r,i=qc(.1);function o(t){for(var i,o=0,a=n.length;o=.12&&i<.234&&r>=-.425&&r<-.214?u:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:a).invert(t)},s.stream=function(e){return t&&n===e?t:(r=[a.stream(n=e),u.stream(e),c.stream(e)],i=r.length,t={point:function(t,n){for(var e=-1;++ejs(r[0],r[1])&&(r[1]=i[1]),js(i[0],r[1])>js(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,n=0,r=o[e=o.length-1];n<=e;r=i,++n)i=o[n],(u=js(r[1],i[0]))>a&&(a=u,Wf=i[0],Kf=r[1])}return is=os=null,Wf===1/0||Zf===1/0?[[NaN,NaN],[NaN,NaN]]:[[Wf,Zf],[Kf,Qf]]},t.geoCentroid=function(t){ms=xs=ws=Ms=Ts=As=Ss=Es=0,Ns=new T,ks=new T,Cs=new T,Lf(t,Gs);var n=+Ns,e=+ks,r=+Cs,i=Ef(n,e,r);return i 1) {
@@ -335,7 +340,25 @@ $(document).ready(function() {
}
$.extend(settings_datatable, ajaxOrData);
- var dt_table = $(`#${dt.table_id}`).DataTable(settings_datatable);
+
+ var dt_table;
+
+ if (startDisabled === true) {
+ $(`.datatable-msg-info-filter-${dt.id}`)
+ .removeClass("invisible_important")
+ .show();
+
+ $(`div#${dt.id}-spinner`).hide();
+ $(`#${dt.table_id}`).hide();
+
+ $(`#button-form_${dt.table_id}_search_bt`).click(function() {
+ $(`.datatable-msg-info-filter-${dt.id}`).hide();
+ $(`#${dt.table_id}`).show();
+ dt_table = $(`#${dt.table_id}`).DataTable(settings_datatable);
+ });
+ } else {
+ dt_table = $(`#${dt.table_id}`).DataTable(settings_datatable);
+ }
$(`#button-${dt.form_id}_search_bt`).click(function() {
dt_table.draw().page(0);
diff --git a/pandora_console/include/javascript/graph_analytics.js b/pandora_console/include/javascript/graph_analytics.js
new file mode 100644
index 0000000000..e63540ae08
--- /dev/null
+++ b/pandora_console/include/javascript/graph_analytics.js
@@ -0,0 +1,713 @@
+// Droppable options.
+var droppableOptions = {
+ accept: ".draggable",
+ hoverClass: "drops-hover",
+ activeClass: "droppable-zone",
+ drop: function(event, ui) {
+ // Add new module.
+ $(this)
+ .data("modules")
+ .push(ui.draggable.data("id-module"));
+
+ // Create elements.
+ createDroppableZones(droppableOptions, getModulesByGraphs());
+ }
+};
+
+// Doc ready.
+$(document).ready(function() {
+ // Hide toggles.
+ $("#agents-toggle").hide();
+ $("#groups-toggle").hide();
+ $("#modules-toggle").hide();
+ $("[data-button=pause-realtime]")
+ .parent()
+ .hide();
+
+ // Set droppable zones.
+ $(".droppable").droppable(droppableOptions);
+});
+
+// Interval change.
+$("#interval").change(function(e) {
+ createDroppableZones(droppableOptions, getModulesByGraphs());
+});
+
+// Collapse filters.
+$("div.filters-div-main > .filters-div-header > img").click(function(e) {
+ if ($(".filters-div-main").hasClass("filters-div-main-collapsed") === true) {
+ $(".filters-div-header > img").attr("src", "images/menu/contraer.svg");
+ $(".filters-div-main").removeClass("filters-div-main-collapsed");
+ $("#droppable-graphs").removeClass("droppable-graphs-collapsed");
+ } else {
+ $(".filters-div-header > img").attr("src", "images/menu/expandir.svg");
+ $(".filters-div-main").addClass("filters-div-main-collapsed");
+ $("#droppable-graphs").addClass("droppable-graphs-collapsed");
+ }
+});
+
+// Search left.
+$("#search-left").keyup(function(e) {
+ if ($(this).val() !== "") {
+ $.ajax({
+ method: "POST",
+ url: "ajax.php",
+ dataType: "json",
+ data: {
+ page: "operation/reporting/graph_analytics",
+ search_left: e.target.value
+ },
+ success: function(data) {
+ if (data.agents || data.groups || data.modules) {
+ var agentsToggle = $(
+ "#agents-toggle > div[id^=tgl_div_] > div.white-box-content"
+ );
+ var groupsToggle = $(
+ "#groups-toggle > div[id^=tgl_div_] > div.white-box-content"
+ );
+ var modulesToggle = $(
+ "#modules-toggle > div[id^=tgl_div_] > div.white-box-content"
+ );
+ agentsToggle.empty();
+ groupsToggle.empty();
+ modulesToggle.empty();
+
+ if (data.agents) {
+ $("#agents-toggle").show();
+ data.agents.forEach(agent => {
+ agentsToggle.append(
+ `
+
+
'
+ )
+ );
+ } else {
+ graphDiv
+ .children()
+ .append(
+ $(
+ '
'
+ )
+ );
+ }
+ }
+ }
+ });
+
+ // Create next droppable zone.
+ graphDiv.after(
+ $(
+ `