mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
Merge branch 'develop' into ent-10639-unificacion-de-controles-de-fecha
This commit is contained in:
commit
d9e897568a
@ -32,6 +32,7 @@ services:
|
|||||||
PUBLICURL: ""
|
PUBLICURL: ""
|
||||||
SLEEP: 5
|
SLEEP: 5
|
||||||
RETRIES: 10
|
RETRIES: 10
|
||||||
|
TZ: 'Europe/Madrid'
|
||||||
networks:
|
networks:
|
||||||
- pandora
|
- pandora
|
||||||
ports:
|
ports:
|
||||||
|
@ -10,6 +10,8 @@ ENV DBPORT=3306
|
|||||||
ENV SLEEP=5
|
ENV SLEEP=5
|
||||||
ENV RETRIES=1
|
ENV RETRIES=1
|
||||||
ENV OPEN=1
|
ENV OPEN=1
|
||||||
|
ENV TZ='Europe/Madrid'
|
||||||
|
|
||||||
|
|
||||||
ENV LC_ALL=C
|
ENV LC_ALL=C
|
||||||
|
|
||||||
|
@ -230,6 +230,10 @@ fi
|
|||||||
echo "" > /opt/pandora/crontasks || touch /opt/pandora/crontasks
|
echo "" > /opt/pandora/crontasks || touch /opt/pandora/crontasks
|
||||||
|
|
||||||
|
|
||||||
|
#set localtime
|
||||||
|
rm -rf /etc/localtime
|
||||||
|
ln -s /usr/share/zoneinfo/$TZ /etc/localtime
|
||||||
|
|
||||||
#install pandora packages
|
#install pandora packages
|
||||||
echo "-> Istalling pandorafms"
|
echo "-> Istalling pandorafms"
|
||||||
cd /opt/pandora
|
cd /opt/pandora
|
||||||
|
@ -28,6 +28,7 @@ $PANDHOME_ENT/pandora_server/PandoraFMS-Enterprise/pandora_server_enterprise.spe
|
|||||||
$CODEHOME/pandora_console/pandora_console.redhat.spec \
|
$CODEHOME/pandora_console/pandora_console.redhat.spec \
|
||||||
$CODEHOME/pandora_console/pandora_console.rhel7.spec \
|
$CODEHOME/pandora_console/pandora_console.rhel7.spec \
|
||||||
$CODEHOME/pandora_agents/unix/pandora_agent.redhat.spec \
|
$CODEHOME/pandora_agents/unix/pandora_agent.redhat.spec \
|
||||||
|
$CODEHOME/pandora_agents/unix/pandora_agent.redhat_bin.spec\
|
||||||
$CODEHOME/pandora_server/pandora_server.redhat.spec \
|
$CODEHOME/pandora_server/pandora_server.redhat.spec \
|
||||||
$PANDHOME_ENT/pandora_agents/pandora_agent.spec \
|
$PANDHOME_ENT/pandora_agents/pandora_agent.spec \
|
||||||
$PANDHOME_ENT/pandora_server/pandora_server_enterprise.redhat.spec \
|
$PANDHOME_ENT/pandora_server/pandora_server_enterprise.redhat.spec \
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.772, AIX version
|
# Version 7.0NG.773.1, AIX version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2023 Pandora FMS
|
# Copyright (c) 2003-2023 Pandora FMS
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.772, FreeBSD Version
|
# Version 7.0NG.773.1, FreeBSD Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2023 Pandora FMS
|
# Copyright (c) 2003-2023 Pandora FMS
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.772, HP-UX Version
|
# Version 7.0NG.773.1, HP-UX Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2023 Pandora FMS
|
# Copyright (c) 2003-2023 Pandora FMS
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.772, GNU/Linux
|
# Version 7.0NG.773.1, GNU/Linux
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2023 Pandora FMS
|
# Copyright (c) 2003-2023 Pandora FMS
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.772, GNU/Linux
|
# Version 7.0NG.773.1, GNU/Linux
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2023 Pandora FMS
|
# Copyright (c) 2003-2023 Pandora FMS
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.772, Solaris Version
|
# Version 7.0NG.773.1, Solaris Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2023 Pandora FMS
|
# Copyright (c) 2003-2023 Pandora FMS
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Base config file for Pandora FMS Windows Agent
|
# Base config file for Pandora FMS Windows Agent
|
||||||
# (c) 2006-2023 Pandora FMS
|
# (c) 2006-2023 Pandora FMS
|
||||||
# Version 7.0NG.772
|
# Version 7.0NG.773.1
|
||||||
# This program is Free Software, you can redistribute it and/or modify it
|
# This program is Free Software, you can redistribute it and/or modify it
|
||||||
# under the terms of the GNU General Public Licence as published by the Free Software
|
# under the terms of the GNU General Public Licence as published by the Free Software
|
||||||
# Foundation; either version 2 of the Licence or any later version
|
# Foundation; either version 2 of the Licence or any later version
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Fichero de configuracion base de agentes de Pandora
|
# Fichero de configuracion base de agentes de Pandora
|
||||||
# Base config file for Pandora agents
|
# Base config file for Pandora agents
|
||||||
# Version 7.0NG.772, AIX version
|
# Version 7.0NG.773.1, AIX version
|
||||||
|
|
||||||
# General Parameters
|
# General Parameters
|
||||||
# ==================
|
# ==================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Fichero de configuracion base de agentes de Pandora
|
# Fichero de configuracion base de agentes de Pandora
|
||||||
# Base config file for Pandora agents
|
# Base config file for Pandora agents
|
||||||
# Version 7.0NG.772
|
# Version 7.0NG.773.1
|
||||||
# FreeBSD/IPSO version
|
# FreeBSD/IPSO version
|
||||||
# Licenced under GPL licence, 2003-2007 Sancho Lerena
|
# Licenced under GPL licence, 2003-2007 Sancho Lerena
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Fichero de configuracion base de agentes de Pandora
|
# Fichero de configuracion base de agentes de Pandora
|
||||||
# Base config file for Pandora agents
|
# Base config file for Pandora agents
|
||||||
# Version 7.0NG.772, HPUX Version
|
# Version 7.0NG.773.1, HPUX Version
|
||||||
|
|
||||||
# General Parameters
|
# General Parameters
|
||||||
# ==================
|
# ==================
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.772
|
# Version 7.0NG.773.1
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# (c) 2003-2023 Pandora FMS
|
# (c) 2003-2023 Pandora FMS
|
||||||
# please visit http://pandora.sourceforge.net
|
# please visit http://pandora.sourceforge.net
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.772
|
# Version 7.0NG.773.1
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# (c) 2003-2023 Pandora FMS
|
# (c) 2003-2023 Pandora FMS
|
||||||
# please visit http://pandora.sourceforge.net
|
# please visit http://pandora.sourceforge.net
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.772
|
# Version 7.0NG.773.1
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# please visit http://pandora.sourceforge.net
|
# please visit http://pandora.sourceforge.net
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Fichero de configuracion base de agentes de Pandora
|
# Fichero de configuracion base de agentes de Pandora
|
||||||
# Base config file for Pandora agents
|
# Base config file for Pandora agents
|
||||||
# Version 7.0NG.772, Solaris version
|
# Version 7.0NG.773.1, Solaris version
|
||||||
|
|
||||||
# General Parameters
|
# General Parameters
|
||||||
# ==================
|
# ==================
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.772, AIX version
|
# Version 7.0NG.773.1, AIX version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2023 Pandora FMS
|
# Copyright (c) 2003-2023 Pandora FMS
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-agent-unix
|
package: pandorafms-agent-unix
|
||||||
Version: 7.0NG.772-230801
|
Version: 7.0NG.773.1-230823
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="7.0NG.772-230801"
|
pandora_version="7.0NG.773.1-230823"
|
||||||
|
|
||||||
echo "Test if you has the tools for to make the packages."
|
echo "Test if you has the tools for to make the packages."
|
||||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||||
@ -42,6 +42,7 @@ mkdir -p temp_package/usr/bin/
|
|||||||
mkdir -p temp_package/usr/sbin/
|
mkdir -p temp_package/usr/sbin/
|
||||||
mkdir -p temp_package/etc/pandora/plugins
|
mkdir -p temp_package/etc/pandora/plugins
|
||||||
mkdir -p temp_package/etc/pandora/collections
|
mkdir -p temp_package/etc/pandora/collections
|
||||||
|
mkdir -p temp_package/etc/pandora/ref
|
||||||
mkdir -p temp_package/etc/pandora/trans
|
mkdir -p temp_package/etc/pandora/trans
|
||||||
mkdir -p temp_package/etc/pandora/commands
|
mkdir -p temp_package/etc/pandora/commands
|
||||||
mkdir -p temp_package/etc/init.d/
|
mkdir -p temp_package/etc/init.d/
|
||||||
|
@ -31,7 +31,7 @@ fi
|
|||||||
if [ "$#" -ge 2 ]; then
|
if [ "$#" -ge 2 ]; then
|
||||||
VERSION="$2"
|
VERSION="$2"
|
||||||
else
|
else
|
||||||
VERSION="7.0NG.772"
|
VERSION="7.0NG.773.1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Path for the generated DMG file
|
# Path for the generated DMG file
|
||||||
|
@ -19,11 +19,11 @@
|
|||||||
<choice id="com.pandorafms.pandorafms_src" visible="false">
|
<choice id="com.pandorafms.pandorafms_src" visible="false">
|
||||||
<pkg-ref id="com.pandorafms.pandorafms_src"/>
|
<pkg-ref id="com.pandorafms.pandorafms_src"/>
|
||||||
</choice>
|
</choice>
|
||||||
<pkg-ref id="com.pandorafms.pandorafms_src" version="7.0NG.772" onConclusion="none">pandorafms_src.pdk</pkg-ref>
|
<pkg-ref id="com.pandorafms.pandorafms_src" version="7.0NG.773.1" onConclusion="none">pandorafms_src.pdk</pkg-ref>
|
||||||
<choice id="com.pandorafms.pandorafms_uninstall" visible="true" customLocation="/Applications">
|
<choice id="com.pandorafms.pandorafms_uninstall" visible="true" customLocation="/Applications">
|
||||||
<pkg-ref id="com.pandorafms.pandorafms_uninstall"/>
|
<pkg-ref id="com.pandorafms.pandorafms_uninstall"/>
|
||||||
</choice>
|
</choice>
|
||||||
<pkg-ref id="com.pandorafms.pandorafms_uninstall" version="7.0NG.772" onConclusion="none">pandorafms_uninstall.pdk</pkg-ref>
|
<pkg-ref id="com.pandorafms.pandorafms_uninstall" version="7.0NG.773.1" onConclusion="none">pandorafms_uninstall.pdk</pkg-ref>
|
||||||
<!-- <installation-check script="check()" />
|
<!-- <installation-check script="check()" />
|
||||||
<script>
|
<script>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
<key>CFBundleIconFile</key> <string>pandorafms.icns</string>
|
<key>CFBundleIconFile</key> <string>pandorafms.icns</string>
|
||||||
<key>CFBundleIdentifier</key> <string>com.pandorafms.pandorafms_uninstall</string>
|
<key>CFBundleIdentifier</key> <string>com.pandorafms.pandorafms_uninstall</string>
|
||||||
|
|
||||||
<key>CFBundleVersion</key> <string>7.0NG.772</string>
|
<key>CFBundleVersion</key> <string>7.0NG.773.1</string>
|
||||||
<key>CFBundleGetInfoString</key> <string>7.0NG.772 Pandora FMS on Aug 2020</string>
|
<key>CFBundleGetInfoString</key> <string>7.0NG.773.1 Pandora FMS on Aug 2020</string>
|
||||||
<key>CFBundleShortVersionString</key> <string>7.0NG.772</string>
|
<key>CFBundleShortVersionString</key> <string>7.0NG.773.1</string>
|
||||||
|
|
||||||
<key>NSPrincipalClass</key><string>NSApplication</string>
|
<key>NSPrincipalClass</key><string>NSApplication</string>
|
||||||
<key>NSMainNibFile</key><string>MainMenu</string>
|
<key>NSMainNibFile</key><string>MainMenu</string>
|
||||||
|
@ -30,6 +30,7 @@ else
|
|||||||
mkdir -p /usr/local/share/man/man1/
|
mkdir -p /usr/local/share/man/man1/
|
||||||
mkdir -p /usr/local/share/pandora_agent/collections/
|
mkdir -p /usr/local/share/pandora_agent/collections/
|
||||||
mkdir -p /usr/local/share/pandora_agent/commands/
|
mkdir -p /usr/local/share/pandora_agent/commands/
|
||||||
|
mkdir -p /usr/local/share/pandora_agent/ref/
|
||||||
mkdir -p /etc/pandora/
|
mkdir -p /etc/pandora/
|
||||||
mkdir -p /var/spool/pandora/data_out/
|
mkdir -p /var/spool/pandora/data_out/
|
||||||
mkdir -p /var/log/pandora/
|
mkdir -p /var/log/pandora/
|
||||||
@ -39,6 +40,7 @@ else
|
|||||||
# Setting permissions to directories and files
|
# Setting permissions to directories and files
|
||||||
chmod -R 700 /usr/local/share/pandora_agent/collections
|
chmod -R 700 /usr/local/share/pandora_agent/collections
|
||||||
chmod -R 700 /usr/local/share/pandora_agent/commands
|
chmod -R 700 /usr/local/share/pandora_agent/commands
|
||||||
|
chmod -R 700 /usr/local/share/pandora_agent/ref
|
||||||
chmod -R 755 /etc/pandora/
|
chmod -R 755 /etc/pandora/
|
||||||
chmod -R 700 /var/spool/pandora/data_out
|
chmod -R 700 /var/spool/pandora/data_out
|
||||||
chmod -R 711 /var/log/pandora
|
chmod -R 711 /var/log/pandora
|
||||||
@ -69,6 +71,7 @@ chown root:wheel /usr/local/bin/tentacle_client
|
|||||||
ln -s /usr/local/share/pandora_agent/plugins /etc/pandora/plugins
|
ln -s /usr/local/share/pandora_agent/plugins /etc/pandora/plugins
|
||||||
ln -s /usr/local/share/pandora_agent/commands /etc/pandora/commands
|
ln -s /usr/local/share/pandora_agent/commands /etc/pandora/commands
|
||||||
ln -s /usr/local/share/pandora_agent/collections /etc/pandora/collections
|
ln -s /usr/local/share/pandora_agent/collections /etc/pandora/collections
|
||||||
|
ln -s /usr/local/share/pandora_agent/ref /etc/pandora/ref
|
||||||
|
|
||||||
|
|
||||||
# Copy manuals
|
# Copy manuals
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.772, GNU/Linux
|
# Version 7.0NG.773.1, GNU/Linux
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2023 Pandora FMS
|
# Copyright (c) 2003-2023 Pandora FMS
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.772, FreeBSD Version
|
# Version 7.0NG.773.1, FreeBSD Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2023 Pandora FMS
|
# Copyright (c) 2003-2023 Pandora FMS
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.772, HP-UX Version
|
# Version 7.0NG.773.1, HP-UX Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2023 Pandora FMS
|
# Copyright (c) 2003-2023 Pandora FMS
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.772
|
# Version 7.0NG.773.1
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2004-2023 Pandora FMS
|
# Copyright (c) 2004-2023 Pandora FMS
|
||||||
# https://pandorafms.com
|
# https://pandorafms.com
|
||||||
@ -310,3 +310,9 @@ module_plugin autodiscover --default
|
|||||||
#module_description Zombies process on system
|
#module_description Zombies process on system
|
||||||
#module_group System
|
#module_group System
|
||||||
#module_end
|
#module_end
|
||||||
|
|
||||||
|
#Hardening plugin for security compliance analysis. Enable to use it.
|
||||||
|
#module_begin
|
||||||
|
#module_plugin /usr/share/pandora_agent/plugins/pandora_sca
|
||||||
|
#module_absoluteinterval 7d
|
||||||
|
#module_end
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.772, GNU/Linux
|
# Version 7.0NG.773.1, GNU/Linux
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2023 Pandora FMS
|
# Copyright (c) 2003-2023 Pandora FMS
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.772, NetBSD Version
|
# Version 7.0NG.773.1, NetBSD Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2023 Pandora FMS
|
# Copyright (c) 2003-2023 Pandora FMS
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.772, Solaris Version
|
# Version 7.0NG.773.1, Solaris Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2023 Pandora FMS
|
# Copyright (c) 2003-2023 Pandora FMS
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
@ -1003,7 +1003,7 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
use Scalar::Util qw(looks_like_number);
|
use Scalar::Util qw(looks_like_number);
|
||||||
use POSIX qw(strftime floor);
|
use POSIX qw(ceil floor strftime);
|
||||||
use Sys::Hostname;
|
use Sys::Hostname;
|
||||||
use File::Basename;
|
use File::Basename;
|
||||||
use File::Copy;
|
use File::Copy;
|
||||||
@ -1030,8 +1030,8 @@ my $Sem = undef;
|
|||||||
# Semaphore used to control the number of threads
|
# Semaphore used to control the number of threads
|
||||||
my $ThreadSem = undef;
|
my $ThreadSem = undef;
|
||||||
|
|
||||||
use constant AGENT_VERSION => '7.0NG.772';
|
use constant AGENT_VERSION => '7.0NG.773.1';
|
||||||
use constant AGENT_BUILD => '230801';
|
use constant AGENT_BUILD => '230823';
|
||||||
|
|
||||||
# Agent log default file size maximum and instances
|
# Agent log default file size maximum and instances
|
||||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||||
@ -1121,6 +1121,7 @@ my %DefaultConf = (
|
|||||||
'server_path_md5' => 'md5', #undocumented
|
'server_path_md5' => 'md5', #undocumented
|
||||||
'server_path_conf' => 'conf', #undocumented
|
'server_path_conf' => 'conf', #undocumented
|
||||||
'server_path_zip' => 'collections', #undocumented
|
'server_path_zip' => 'collections', #undocumented
|
||||||
|
'server_path_ref' => 'ref', #undocumented
|
||||||
'logfile' =>'/var/log/pandora/pandora_agent.log',
|
'logfile' =>'/var/log/pandora/pandora_agent.log',
|
||||||
'logsize' => DEFAULT_MAX_LOG_SIZE,
|
'logsize' => DEFAULT_MAX_LOG_SIZE,
|
||||||
'logrotate' => DEFAULT_LOG_ROTATE,
|
'logrotate' => DEFAULT_LOG_ROTATE,
|
||||||
@ -1569,6 +1570,34 @@ sub parse_conf_modules($) {
|
|||||||
$module->{'post_process'} = $1;
|
$module->{'post_process'} = $1;
|
||||||
} elsif ($line =~ /^\s*module_interval\s+(\d+)\s*$/) {
|
} elsif ($line =~ /^\s*module_interval\s+(\d+)\s*$/) {
|
||||||
$module->{'interval'} = $1;
|
$module->{'interval'} = $1;
|
||||||
|
} elsif ($line =~ /^\s*module_absoluteinterval\s+(.*)$/) {
|
||||||
|
my $absolute_interval = $1;
|
||||||
|
if ($absolute_interval eq 'once') {
|
||||||
|
$module->{'absoluteinterval'} = 0;
|
||||||
|
} elsif ($absolute_interval =~ /^(\d+)([smhd])?\s*$/) {
|
||||||
|
if (defined($2)) {
|
||||||
|
# Seconds.
|
||||||
|
if ($2 eq 's') {
|
||||||
|
$module->{'absoluteinterval'} = int($1);
|
||||||
|
}
|
||||||
|
# Minutes (convert to seconds).
|
||||||
|
elsif ($2 eq 'm') {
|
||||||
|
$module->{'absoluteinterval'} = int($1) * 60;
|
||||||
|
}
|
||||||
|
# Hours (convert to seconds).
|
||||||
|
elsif ($2 eq 'h') {
|
||||||
|
$module->{'absoluteinterval'} = int($1) * 3600;
|
||||||
|
}
|
||||||
|
# Days (convert to seconds).
|
||||||
|
elsif ($2 eq 'd') {
|
||||||
|
$module->{'absoluteinterval'} = int($1) * 86400;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$module->{'absoluteinterval'} = int($1) * $Conf{'interval'};
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
log_message ('setup', "Invalid value for module_absoluteinterval: $absolute_interval");
|
||||||
|
}
|
||||||
} elsif ($line =~ /^\s*module_timeout\s+(\d+)\s*$/) {
|
} elsif ($line =~ /^\s*module_timeout\s+(\d+)\s*$/) {
|
||||||
$module->{'timeout'} = $1;
|
$module->{'timeout'} = $1;
|
||||||
} elsif ($line =~ /^\s*module_save\s+(\w+)$/) {
|
} elsif ($line =~ /^\s*module_save\s+(\w+)$/) {
|
||||||
@ -1636,6 +1665,27 @@ sub parse_conf_modules($) {
|
|||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Configure modules with an absolute interval.
|
||||||
|
if (defined($module->{'absoluteinterval'})) {
|
||||||
|
|
||||||
|
# Convert from seconds to actual agent intervals.
|
||||||
|
$module->{'interval'} = ceil($module->{'absoluteinterval'} / $Conf{'interval'});
|
||||||
|
|
||||||
|
# Make sure modules that run once are asynchronous.
|
||||||
|
if ($module->{'interval'} == 0) {
|
||||||
|
if ($module->{'type'} eq 'generic_data') {
|
||||||
|
$module->{'type'} = 'async_data';
|
||||||
|
} elsif ($module->{'type'} eq 'generic_proc') {
|
||||||
|
$module->{'type'} = 'async_proc';
|
||||||
|
} elsif ($module->{'type'} eq 'generic_data_string') {
|
||||||
|
$module->{'type'} = 'async_string';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# This file will be used for persistence.
|
||||||
|
$module->{'timestamp_file'} = $ConfDir . '/' . $Conf{'server_path_ref'} . '/' . md5($module->{'name'}) . '.ref';
|
||||||
|
}
|
||||||
|
|
||||||
# Set the intensive interval
|
# Set the intensive interval
|
||||||
if ($module->{'is_intensive'} == 1) {
|
if ($module->{'is_intensive'} == 1) {
|
||||||
$module->{'intensive_interval'} = $module->{'interval'};
|
$module->{'intensive_interval'} = $module->{'interval'};
|
||||||
@ -1643,8 +1693,8 @@ sub parse_conf_modules($) {
|
|||||||
$module->{'intensive_interval'} = $module->{'interval'} * ($Conf{'interval'} / $Conf{'intensive_interval'});
|
$module->{'intensive_interval'} = $module->{'interval'} * ($Conf{'interval'} / $Conf{'intensive_interval'});
|
||||||
}
|
}
|
||||||
|
|
||||||
# Make the module run the first time
|
# Initialize the module's execution counter.
|
||||||
$module->{'counter'} = $module->{'intensive_interval'};
|
init_counter($module);
|
||||||
|
|
||||||
# Replace macros
|
# Replace macros
|
||||||
replace_macros ($module);
|
replace_macros ($module);
|
||||||
@ -2805,7 +2855,15 @@ sub exec_module {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (++($module->{'counter'}) < $module->{'intensive_interval'}) {
|
# Modules that will run once.
|
||||||
|
if ($module->{'interval'} == 0) {
|
||||||
|
if ($module->{'counter'} == 0) {
|
||||||
|
$ThreadSem->up () if (defined ($ThreadSem) && $Conf{'agent_threads'} > 1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
# Modules that will run periodically.
|
||||||
|
elsif (++($module->{'counter'}) < $module->{'intensive_interval'}) {
|
||||||
$ThreadSem->up () if (defined ($ThreadSem) && $Conf{'agent_threads'} > 1);
|
$ThreadSem->up () if (defined ($ThreadSem) && $Conf{'agent_threads'} > 1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -2862,6 +2920,9 @@ sub exec_module {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Save the module's timestamp to disk.
|
||||||
|
save_module_timestamp($module);
|
||||||
|
|
||||||
$ThreadSem->up () if (defined ($ThreadSem) && $Conf{'agent_threads'} > 1);
|
$ThreadSem->up () if (defined ($ThreadSem) && $Conf{'agent_threads'} > 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3547,6 +3608,44 @@ sub check_module_cron {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Initialize a module's internal execution counter.
|
||||||
|
################################################################################
|
||||||
|
sub init_counter($) {
|
||||||
|
my ($module) = @_;
|
||||||
|
|
||||||
|
# Open the timestamp file if available.
|
||||||
|
my $fh;
|
||||||
|
if (!defined($module->{'timestamp_file'}) ||
|
||||||
|
!open($fh, '<', $module->{'timestamp_file'})) {
|
||||||
|
# If intensive_interval is 0, setting counter to any value != 0 will make the module run.
|
||||||
|
$module->{'counter'} = $module->{'intensive_interval'} == 0 ? 1 : $module->{'intensive_interval'};
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Read the timestamp from disk.
|
||||||
|
my $timestamp = int(<$fh>);
|
||||||
|
close($fh);
|
||||||
|
|
||||||
|
# Update the module's execution counter.
|
||||||
|
# If intensive_interval is 0, setting counter to 0 will prevent the module from running again.
|
||||||
|
$module->{'counter'} = $module->{'intensive_interval'} == 0 ? 0 : floor((time() - $timestamp) / $Conf{'interval'});
|
||||||
|
}
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Save a module's execution timestamp to disk for persistence.
|
||||||
|
################################################################################
|
||||||
|
sub save_module_timestamp($) {
|
||||||
|
my ($module) = @_;
|
||||||
|
|
||||||
|
return if (!defined($module->{'timestamp_file'}));
|
||||||
|
|
||||||
|
# Update the time reference.
|
||||||
|
open(my $fh, '>', $module->{'timestamp_file'}) or return;
|
||||||
|
print $fh time();
|
||||||
|
close($fh);
|
||||||
|
}
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Write module data in XML format.
|
# Write module data in XML format.
|
||||||
################################################################################
|
################################################################################
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
#
|
#
|
||||||
%global __os_install_post %{nil}
|
%global __os_install_post %{nil}
|
||||||
%define name pandorafms_agent_linux
|
%define name pandorafms_agent_linux
|
||||||
%define version 7.0NG.772
|
%define version 7.0NG.773.1
|
||||||
%define release 230801
|
%define release 230823
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, PERL version
|
Summary: Pandora FMS Linux agent, PERL version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
@ -25,7 +25,7 @@ Requires(preun): chkconfig /bin/rm /usr/sbin/userdel
|
|||||||
Requires: coreutils unzip
|
Requires: coreutils unzip
|
||||||
Requires: util-linux procps grep
|
Requires: util-linux procps grep
|
||||||
Requires: /sbin/ip /bin/awk
|
Requires: /sbin/ip /bin/awk
|
||||||
Requires: perl(Sys::Syslog) perl(IO::Compress::Zip)
|
Requires: perl(Sys::Syslog) perl(IO::Compress::Zip) perl(File::Copy) perl(Sys::Hostname)
|
||||||
# Required by plugins
|
# Required by plugins
|
||||||
#Requires: sh-utils sed passwd net-tools rpm
|
#Requires: sh-utils sed passwd net-tools rpm
|
||||||
AutoReq: 0
|
AutoReq: 0
|
||||||
@ -100,6 +100,11 @@ if [ ! -e /etc/pandora/collections ]; then
|
|||||||
ln -s /usr/share/pandora_agent/collections /etc/pandora
|
ln -s /usr/share/pandora_agent/collections /etc/pandora
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -e /etc/pandora/ref ]; then
|
||||||
|
mkdir -p /usr/share/pandora_agent/ref
|
||||||
|
ln -s /usr/share/pandora_agent/ref /etc/pandora
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -e /etc/pandora/commands ]; then
|
if [ ! -e /etc/pandora/commands ]; then
|
||||||
mkdir -p /usr/share/pandora_agent/commands
|
mkdir -p /usr/share/pandora_agent/commands
|
||||||
ln -s /usr/share/pandora_agent/commands /etc/pandora
|
ln -s /usr/share/pandora_agent/commands /etc/pandora
|
||||||
@ -143,7 +148,7 @@ fi
|
|||||||
|
|
||||||
# Remove symbolic links
|
# Remove symbolic links
|
||||||
pushd /etc/pandora
|
pushd /etc/pandora
|
||||||
for f in pandora_agent.conf plugins collections
|
for f in pandora_agent.conf plugins collections ref
|
||||||
do
|
do
|
||||||
[ -L $f ] && rm -f $f
|
[ -L $f ] && rm -f $f
|
||||||
done
|
done
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
%global __os_install_post %{nil}
|
%global __os_install_post %{nil}
|
||||||
%define name pandorafms_agent_linux_bin
|
%define name pandorafms_agent_linux_bin
|
||||||
%define source_name pandorafms_agent_linux
|
%define source_name pandorafms_agent_linux
|
||||||
%define version 7.0NG.772
|
%define version 7.0NG.773
|
||||||
%define release 230725
|
%define release 230725
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, binary version
|
Summary: Pandora FMS Linux agent, binary version
|
||||||
@ -19,16 +19,14 @@ Group: System/Monitoring
|
|||||||
Packager: Sancho Lerena <slerena@artica.es>
|
Packager: Sancho Lerena <slerena@artica.es>
|
||||||
Prefix: /usr/share
|
Prefix: /usr/share
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
|
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
|
||||||
BuildArch: noarch
|
BuildArch: x86_64
|
||||||
Requires(pre): shadow-utils
|
Requires(pre): shadow-utils
|
||||||
Requires(post): chkconfig /bin/ln
|
Requires(post): chkconfig /bin/ln
|
||||||
Requires(preun): chkconfig /bin/rm /usr/sbin/userdel
|
Requires(preun): chkconfig /bin/rm /usr/sbin/userdel
|
||||||
Requires: coreutils unzip
|
Requires: coreutils unzip
|
||||||
Requires: util-linux procps grep
|
Requires: util-linux procps grep
|
||||||
Requires: /sbin/ip /bin/awk
|
Requires: /sbin/ip /bin/awk
|
||||||
Requires: perl(Sys::Syslog) perl(IO::Compress::Zip)
|
#Requires: libnsl
|
||||||
# Required by plugins
|
|
||||||
#Requires: sh-utils sed passwd net-tools rpm
|
|
||||||
AutoReq: 0
|
AutoReq: 0
|
||||||
Provides: %{name}-%{version}
|
Provides: %{name}-%{version}
|
||||||
|
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
#
|
#
|
||||||
%global __os_install_post %{nil}
|
%global __os_install_post %{nil}
|
||||||
%define name pandorafms_agent_linux
|
%define name pandorafms_agent_linux
|
||||||
%define version 7.0NG.772
|
%define version 7.0NG.773.1
|
||||||
%define release 230801
|
%define release 230823
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, PERL version
|
Summary: Pandora FMS Linux agent, PERL version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
@ -94,6 +94,10 @@ if [ ! -e /etc/pandora/collections ]; then
|
|||||||
mkdir /etc/pandora/collections
|
mkdir /etc/pandora/collections
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -e /etc/pandora/ref ]; then
|
||||||
|
mkdir /etc/pandora/ref
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -e /etc/pandora/commands ]; then
|
if [ ! -e /etc/pandora/commands ]; then
|
||||||
mkdir /etc/pandora/commands
|
mkdir /etc/pandora/commands
|
||||||
fi
|
fi
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
# Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license.
|
# Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license.
|
||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
PI_VERSION="7.0NG.772"
|
PI_VERSION="7.0NG.773.1"
|
||||||
PI_BUILD="230801"
|
PI_BUILD="230823"
|
||||||
OS_NAME=`uname -s`
|
OS_NAME=`uname -s`
|
||||||
|
|
||||||
FORCE=0
|
FORCE=0
|
||||||
@ -408,6 +408,11 @@ install () {
|
|||||||
chmod -R 700 $PANDORA_BASE$PANDORA_HOME/commands
|
chmod -R 700 $PANDORA_BASE$PANDORA_HOME/commands
|
||||||
ln -s $PANDORA_BASE_REAL$PANDORA_HOME/commands $PANDORA_BASE$PANDORA_CFG
|
ln -s $PANDORA_BASE_REAL$PANDORA_HOME/commands $PANDORA_BASE$PANDORA_CFG
|
||||||
|
|
||||||
|
echo "Creating the ref directory in to $PANDORA_BASE$PANDORA_HOME/ref..."
|
||||||
|
mkdir -p $PANDORA_BASE$PANDORA_HOME/ref
|
||||||
|
chmod -R 700 $PANDORA_BASE$PANDORA_HOME/ref
|
||||||
|
ln -s $PANDORA_BASE_REAL$PANDORA_HOME/ref $PANDORA_BASE$PANDORA_CFG
|
||||||
|
|
||||||
if [ $WITHOUT_TENTACLE_SERVER -eq 0 ]
|
if [ $WITHOUT_TENTACLE_SERVER -eq 0 ]
|
||||||
then
|
then
|
||||||
echo "Copying tentacle server to $PANDORA_BASE$TENTACLE_SERVER"
|
echo "Copying tentacle server to $PANDORA_BASE$TENTACLE_SERVER"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Base config file for Pandora FMS Windows Agent
|
# Base config file for Pandora FMS Windows Agent
|
||||||
# (c) 2006-2023 Pandora FMS
|
# (c) 2006-2023 Pandora FMS
|
||||||
# Version 7.0NG.772
|
# Version 7.0NG.773.1
|
||||||
# This program is Free Software, you can redistribute it and/or modify it
|
# This program is Free Software, you can redistribute it and/or modify it
|
||||||
# under the terms of the GNU General Public Licence as published by the Free Software
|
# under the terms of the GNU General Public Licence as published by the Free Software
|
||||||
# Foundation; either version 2 of the Licence or any later version
|
# Foundation; either version 2 of the Licence or any later version
|
||||||
@ -523,4 +523,3 @@ module_plugin "%PROGRAMFILES%\Pandora_Agent\util\autodiscover.exe" --default
|
|||||||
#module_exec echo Bordón
|
#module_exec echo Bordón
|
||||||
#module_native_encoding OEM
|
#module_native_encoding OEM
|
||||||
#module_end
|
#module_end
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ AllowLanguageSelection
|
|||||||
{Yes}
|
{Yes}
|
||||||
|
|
||||||
AppName
|
AppName
|
||||||
{Pandora FMS Windows Agent v7.0NG.772}
|
{Pandora FMS Windows Agent v7.0NG.773.1}
|
||||||
|
|
||||||
ApplicationID
|
ApplicationID
|
||||||
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
|
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
|
||||||
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
Version
|
Version
|
||||||
{230801}
|
{230823}
|
||||||
|
|
||||||
ViewReadme
|
ViewReadme
|
||||||
{Yes}
|
{Yes}
|
||||||
|
@ -31,6 +31,10 @@ using namespace std;
|
|||||||
* File operations.
|
* File operations.
|
||||||
*/
|
*/
|
||||||
namespace Pandora_File {
|
namespace Pandora_File {
|
||||||
|
|
||||||
|
/* Size of a buffer that will be passed to Pandora_File::md5. */
|
||||||
|
const int MD5_BUF_SIZE = 33;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* File super-class exception.
|
* File super-class exception.
|
||||||
*/
|
*/
|
||||||
|
@ -19,11 +19,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pandora_module.h"
|
#include "pandora_module.h"
|
||||||
|
#include "pandora_windows_service.h"
|
||||||
|
#include "../misc/pandora_file.h"
|
||||||
#include "../pandora_strutils.h"
|
#include "../pandora_strutils.h"
|
||||||
#include "../pandora.h"
|
#include "../pandora.h"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
#define BUFSIZE 4096
|
#define BUFSIZE 4096
|
||||||
|
|
||||||
@ -472,18 +475,27 @@ Pandora_Module::setNoOutput () {
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
Pandora_Module::run () {
|
Pandora_Module::run () {
|
||||||
/* Check the interval */
|
|
||||||
if (this->executions % this->intensive_interval != 0) {
|
// Run once.
|
||||||
|
if (this->intensive_interval == 0) {
|
||||||
|
if (this->executions == 0) {
|
||||||
|
has_output = false;
|
||||||
|
throw Interval_Not_Fulfilled ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Run periodically.
|
||||||
|
else if (++this->executions < this->intensive_interval) {
|
||||||
pandoraDebug ("%s: Interval is not fulfilled", this->module_name.c_str ());
|
pandoraDebug ("%s: Interval is not fulfilled", this->module_name.c_str ());
|
||||||
this->executions++;
|
|
||||||
has_output = false;
|
has_output = false;
|
||||||
throw Interval_Not_Fulfilled ();
|
throw Interval_Not_Fulfilled ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Increment the executions after check. This is done to execute the
|
// Reset the execution counter.
|
||||||
first time */
|
this->executions = 0;
|
||||||
this->executions++;
|
|
||||||
has_output = true;
|
has_output = true;
|
||||||
|
|
||||||
|
// Update the execution timestamp.
|
||||||
|
this->updateTimestampFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1663,6 +1675,63 @@ Pandora_Module::getTimestamp () {
|
|||||||
return this->timestamp;
|
return this->timestamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the module timestamp file.
|
||||||
|
*
|
||||||
|
* @param file_name The name of the timestamp file.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
Pandora_Module::setTimestampFile (string file_name) {
|
||||||
|
this->timestamp_file = file_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the module timestamp file.
|
||||||
|
*
|
||||||
|
* @return The name of the timestamp file.
|
||||||
|
*/
|
||||||
|
string
|
||||||
|
Pandora_Module::getTimestampFile () {
|
||||||
|
return this->timestamp_file;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the timestamp file with the current time.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
Pandora_Module::updateTimestampFile () {
|
||||||
|
try {
|
||||||
|
Pandora_File::writeFile(this->timestamp_file, std::to_string(std::time(NULL)));
|
||||||
|
} catch (...) {
|
||||||
|
/* Ignore errors. */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize the module's internal execution counter.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
Pandora_Module::initExecutions () {
|
||||||
|
string timestamp;
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (this->timestamp_file != "" && Pandora_File::readFile(this->timestamp_file, timestamp) != FILE_NOT_FOUND) {
|
||||||
|
// If the interval is 0, setting executions to 0 will prevent the module from running.
|
||||||
|
this->executions = this->intensive_interval == 0 ?
|
||||||
|
0 :
|
||||||
|
floor((1000.0 * (std::time(NULL) - strtoint(timestamp))) / Pandora_Windows_Service::getInstance()->getInterval());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} catch (...) {
|
||||||
|
// Ignore errors.
|
||||||
|
}
|
||||||
|
|
||||||
|
// If the interval is 0, setting executions to any value != 0 will make the module run.
|
||||||
|
this->executions = this->intensive_interval == 0 ? 1 : this->intensive_interval;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the value of intensive_match.
|
* Sets the value of intensive_match.
|
||||||
*
|
*
|
||||||
|
@ -171,6 +171,7 @@ namespace Pandora_Modules {
|
|||||||
Cron *cron;
|
Cron *cron;
|
||||||
list<Condition *> *intensive_condition_list;
|
list<Condition *> *intensive_condition_list;
|
||||||
time_t timestamp;
|
time_t timestamp;
|
||||||
|
string timestamp_file;
|
||||||
unsigned char intensive_match;
|
unsigned char intensive_match;
|
||||||
int intensive_interval;
|
int intensive_interval;
|
||||||
string unit, custom_id, str_warning, str_critical;
|
string unit, custom_id, str_warning, str_critical;
|
||||||
@ -238,6 +239,7 @@ namespace Pandora_Modules {
|
|||||||
bool getAsync ();
|
bool getAsync ();
|
||||||
void setExecutions(long executions=0);
|
void setExecutions(long executions=0);
|
||||||
long getExecutions();
|
long getExecutions();
|
||||||
|
void initExecutions ();
|
||||||
|
|
||||||
virtual string getXml ();
|
virtual string getXml ();
|
||||||
|
|
||||||
@ -303,6 +305,9 @@ namespace Pandora_Modules {
|
|||||||
int hasOutput ();
|
int hasOutput ();
|
||||||
void setTimestamp (time_t timestamp);
|
void setTimestamp (time_t timestamp);
|
||||||
time_t getTimestamp ();
|
time_t getTimestamp ();
|
||||||
|
void setTimestampFile (string file_name);
|
||||||
|
string getTimestampFile ();
|
||||||
|
void updateTimestampFile ();
|
||||||
void setIntensiveMatch (unsigned char intensive_match);
|
void setIntensiveMatch (unsigned char intensive_match);
|
||||||
unsigned char getIntensiveMatch ();
|
unsigned char getIntensiveMatch ();
|
||||||
bool isIntensive ();
|
bool isIntensive ();
|
||||||
|
@ -41,7 +41,10 @@
|
|||||||
#include "pandora_module_snmpget.h"
|
#include "pandora_module_snmpget.h"
|
||||||
#include "../windows/pandora_wmi.h"
|
#include "../windows/pandora_wmi.h"
|
||||||
#include "../pandora_strutils.h"
|
#include "../pandora_strutils.h"
|
||||||
|
#include "../misc/pandora_file.h"
|
||||||
|
#include "../pandora.h"
|
||||||
#include <list>
|
#include <list>
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
using namespace Pandora;
|
using namespace Pandora;
|
||||||
using namespace Pandora_Modules;
|
using namespace Pandora_Modules;
|
||||||
@ -50,6 +53,7 @@ using namespace Pandora_Strutils;
|
|||||||
#define TOKEN_NAME ("module_name ")
|
#define TOKEN_NAME ("module_name ")
|
||||||
#define TOKEN_TYPE ("module_type ")
|
#define TOKEN_TYPE ("module_type ")
|
||||||
#define TOKEN_INTERVAL ("module_interval ")
|
#define TOKEN_INTERVAL ("module_interval ")
|
||||||
|
#define TOKEN_ABSOLUTEINTERVAL ("module_absoluteinterval ")
|
||||||
#define TOKEN_EXEC ("module_exec ")
|
#define TOKEN_EXEC ("module_exec ")
|
||||||
#define TOKEN_PROC ("module_proc ")
|
#define TOKEN_PROC ("module_proc ")
|
||||||
#define TOKEN_SERVICE ("module_service ")
|
#define TOKEN_SERVICE ("module_service ")
|
||||||
@ -156,7 +160,8 @@ Pandora_Module_Factory::getModuleFromDefinition (string definition) {
|
|||||||
list<string>::iterator iter;
|
list<string>::iterator iter;
|
||||||
string module_name, module_type, module_exec;
|
string module_name, module_type, module_exec;
|
||||||
string module_min, module_max, module_description;
|
string module_min, module_max, module_description;
|
||||||
string module_interval, module_proc, module_service;
|
string module_interval, module_absoluteinterval;
|
||||||
|
string module_proc, module_service;
|
||||||
string module_freedisk, module_cpuusage, module_inventory;
|
string module_freedisk, module_cpuusage, module_inventory;
|
||||||
string module_freedisk_percent, module_freememory_percent;
|
string module_freedisk_percent, module_freememory_percent;
|
||||||
string module_dsn, module_freememory;
|
string module_dsn, module_freememory;
|
||||||
@ -196,6 +201,7 @@ Pandora_Module_Factory::getModuleFromDefinition (string definition) {
|
|||||||
module_max = "";
|
module_max = "";
|
||||||
module_description = "";
|
module_description = "";
|
||||||
module_interval = "";
|
module_interval = "";
|
||||||
|
module_absoluteinterval = "";
|
||||||
module_exec = "";
|
module_exec = "";
|
||||||
module_proc = "";
|
module_proc = "";
|
||||||
module_service = "";
|
module_service = "";
|
||||||
@ -290,6 +296,9 @@ Pandora_Module_Factory::getModuleFromDefinition (string definition) {
|
|||||||
if (module_interval == "") {
|
if (module_interval == "") {
|
||||||
module_interval = parseLine (line, TOKEN_INTERVAL);
|
module_interval = parseLine (line, TOKEN_INTERVAL);
|
||||||
}
|
}
|
||||||
|
if (module_absoluteinterval == "") {
|
||||||
|
module_absoluteinterval = parseLine (line, TOKEN_ABSOLUTEINTERVAL);
|
||||||
|
}
|
||||||
if (module_exec == "") {
|
if (module_exec == "") {
|
||||||
module_exec = parseLine (line, TOKEN_EXEC);
|
module_exec = parseLine (line, TOKEN_EXEC);
|
||||||
}
|
}
|
||||||
@ -603,6 +612,13 @@ Pandora_Module_Factory::getModuleFromDefinition (string definition) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (module_absoluteinterval != "") {
|
||||||
|
pos_macro = module_absoluteinterval.find(macro_name);
|
||||||
|
if (pos_macro != string::npos){
|
||||||
|
module_absoluteinterval.replace(pos_macro, macro_name.size(), macro_value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (module_exec != "") {
|
if (module_exec != "") {
|
||||||
pos_macro = module_exec.find(macro_name);
|
pos_macro = module_exec.find(macro_name);
|
||||||
if (pos_macro != string::npos){
|
if (pos_macro != string::npos){
|
||||||
@ -1323,6 +1339,61 @@ Pandora_Module_Factory::getModuleFromDefinition (string definition) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Set the module absolute interval */
|
||||||
|
if (module_absoluteinterval != "") {
|
||||||
|
int interval;
|
||||||
|
|
||||||
|
try {
|
||||||
|
service = Pandora_Windows_Service::getInstance();
|
||||||
|
|
||||||
|
// Run once.
|
||||||
|
if (module_absoluteinterval == "once") {
|
||||||
|
interval = 0;
|
||||||
|
}
|
||||||
|
// Seconds.
|
||||||
|
else if (module_absoluteinterval.back() == 's') {
|
||||||
|
interval = strtoint (module_absoluteinterval.substr(0, module_absoluteinterval.size() - 1));
|
||||||
|
}
|
||||||
|
// Minutes.
|
||||||
|
else if (module_absoluteinterval.back() == 'm') {
|
||||||
|
interval = strtoint (module_absoluteinterval.substr(0, module_absoluteinterval.size() - 1)) * 60;
|
||||||
|
}
|
||||||
|
// Hours.
|
||||||
|
else if (module_absoluteinterval.back() == 'h') {
|
||||||
|
interval = strtoint (module_absoluteinterval.substr(0, module_absoluteinterval.size() - 1)) * 3600;
|
||||||
|
}
|
||||||
|
// Days.
|
||||||
|
else if (module_absoluteinterval.back() == 'd') {
|
||||||
|
interval = strtoint (module_absoluteinterval.substr(0, module_absoluteinterval.size() - 1)) * 86400;
|
||||||
|
}
|
||||||
|
// Number of agent intervals.
|
||||||
|
else {
|
||||||
|
interval = strtoint(module_absoluteinterval) * (service->getIntervalSec());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert from seconds to agent executions.
|
||||||
|
interval = ceil(interval / double(service->getIntervalSec()));
|
||||||
|
|
||||||
|
// Set the module interval.
|
||||||
|
module->setInterval (interval);
|
||||||
|
module->setIntensiveInterval (interval);
|
||||||
|
|
||||||
|
// Compute the MD5 hash of the module's name.
|
||||||
|
char module_name_md5[Pandora_File::MD5_BUF_SIZE];
|
||||||
|
Pandora_File::md5(module_name.c_str(), module_name.size(), module_name_md5);
|
||||||
|
|
||||||
|
// Set the timestamp file.
|
||||||
|
module->setTimestampFile(Pandora::getPandoraInstallDir().append("/ref/").append(module_name_md5).append(".ref"));
|
||||||
|
} catch (Invalid_Conversion e) {
|
||||||
|
pandoraLog ("Invalid absolute interval value \"%s\" for module %s",
|
||||||
|
module_absoluteinterval.c_str (),
|
||||||
|
module_name.c_str ());
|
||||||
|
}
|
||||||
|
catch (...) {
|
||||||
|
// Should not happen. Ignore errors.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Module intensive condition */
|
/* Module intensive condition */
|
||||||
if (intensive_condition_list.size () > 0) {
|
if (intensive_condition_list.size () > 0) {
|
||||||
intensive_condition_iter = intensive_condition_list.begin ();
|
intensive_condition_iter = intensive_condition_list.begin ();
|
||||||
@ -1337,6 +1408,9 @@ Pandora_Module_Factory::getModuleFromDefinition (string definition) {
|
|||||||
module->setIntensiveInterval (module->getInterval () * (service->getInterval () / service->getIntensiveInterval ()));
|
module->setIntensiveInterval (module->getInterval () * (service->getInterval () / service->getIntensiveInterval ()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Initialize the module's execution counter. */
|
||||||
|
module->initExecutions ();
|
||||||
|
|
||||||
/* Module cron */
|
/* Module cron */
|
||||||
module->setCron (module_crontab);
|
module->setCron (module_crontab);
|
||||||
|
|
||||||
@ -1374,6 +1448,18 @@ Pandora_Module_Factory::getModuleFromDefinition (string definition) {
|
|||||||
numeric = false;
|
numeric = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Make sure modules that run once are asynchronous.
|
||||||
|
if (module->getInterval() == 0) {
|
||||||
|
type = module->getTypeInt();
|
||||||
|
if (type == TYPE_GENERIC_DATA) {
|
||||||
|
module->setType("async_data");
|
||||||
|
} else if (type == TYPE_GENERIC_PROC) {
|
||||||
|
module->setType("async_proc");
|
||||||
|
} else if (type == TYPE_GENERIC_DATA_STRING) {
|
||||||
|
module->setType("async_string");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (numeric) {
|
if (numeric) {
|
||||||
if (module_max != "") {
|
if (module_max != "") {
|
||||||
try {
|
try {
|
||||||
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||||||
using namespace Pandora_Strutils;
|
using namespace Pandora_Strutils;
|
||||||
|
|
||||||
#define PATH_SIZE _MAX_PATH+1
|
#define PATH_SIZE _MAX_PATH+1
|
||||||
#define PANDORA_VERSION ("7.0NG.772 Build 230801")
|
#define PANDORA_VERSION ("7.0NG.773.1 Build 230823")
|
||||||
|
|
||||||
string pandora_path;
|
string pandora_path;
|
||||||
string pandora_dir;
|
string pandora_dir;
|
||||||
|
@ -2197,6 +2197,11 @@ Pandora_Windows_Service::getInterval () {
|
|||||||
return this->interval;
|
return this->interval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long
|
||||||
|
Pandora_Windows_Service::getIntervalSec () {
|
||||||
|
return this->interval_sec;
|
||||||
|
}
|
||||||
|
|
||||||
long
|
long
|
||||||
Pandora_Windows_Service::getIntensiveInterval () {
|
Pandora_Windows_Service::getIntensiveInterval () {
|
||||||
return this->intensive_interval;
|
return this->intensive_interval;
|
||||||
|
@ -122,6 +122,7 @@ namespace Pandora {
|
|||||||
Pandora_Agent_Conf *getConf ();
|
Pandora_Agent_Conf *getConf ();
|
||||||
string getEHKey (string ehorus_conf);
|
string getEHKey (string ehorus_conf);
|
||||||
long getInterval ();
|
long getInterval ();
|
||||||
|
long getIntervalSec ();
|
||||||
long getIntensiveInterval ();
|
long getIntensiveInterval ();
|
||||||
string generateAgentName ();
|
string generateAgentName ();
|
||||||
bool writeToBuffer (string temporal);
|
bool writeToBuffer (string temporal);
|
||||||
|
@ -11,7 +11,7 @@ BEGIN
|
|||||||
VALUE "LegalCopyright", "Pandora FMS"
|
VALUE "LegalCopyright", "Pandora FMS"
|
||||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||||
VALUE "ProductVersion", "(7.0NG.772(Build 230801))"
|
VALUE "ProductVersion", "(7.0NG.773.1(Build 230823))"
|
||||||
VALUE "FileVersion", "1.0.0.0"
|
VALUE "FileVersion", "1.0.0.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-console
|
package: pandorafms-console
|
||||||
Version: 7.0NG.772-230801
|
Version: 7.0NG.773.1-230823
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="7.0NG.772-230801"
|
pandora_version="7.0NG.773.1-230823"
|
||||||
|
|
||||||
package_pear=0
|
package_pear=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
@ -261,12 +261,27 @@ function agents_modules_load_js()
|
|||||||
}
|
}
|
||||||
|
|
||||||
function select_selected () {
|
function select_selected () {
|
||||||
// $('#id_agents2 option').each(function(){
|
var f = document.forms.filter_form;
|
||||||
// if($(this).attr('selected') === 'selected'){
|
f.action = "index.php?sec=view&sec2=extensions/agents_modules";
|
||||||
// $(this).prop('selected', true);
|
$('#filter_form').submit();
|
||||||
// }
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
/* <![CDATA[ */
|
||||||
|
function export_csv() {
|
||||||
|
let group_id = $('#group_id option:selected').val();
|
||||||
|
let module_group_id = $('#modulegroup option:selected').val();
|
||||||
|
let agent_id = $('#id_agents2 option:selected').map((_, e) => e.value).get();
|
||||||
|
let module_id = $('#module option:selected').map((_, e) => e.value).get();
|
||||||
|
|
||||||
|
let filters_array = {group_id: group_id, module_group_id:module_group_id, agent_id:agent_id, module_id:module_id}
|
||||||
|
let jsonFilters = JSON.stringify(filters_array)
|
||||||
|
let filters = window.btoa(jsonFilters)
|
||||||
|
var f = document.forms.filter_form;
|
||||||
|
|
||||||
|
blockResubmit($(this));
|
||||||
|
f.action = "extensions/agents_modules_csv.php?get_agents_module_csv=1&filters="+filters;
|
||||||
|
$("#filter_form").submit();
|
||||||
|
}
|
||||||
|
/* ]]> */
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
@ -653,7 +668,7 @@ function mainAgentsModules()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($config['pure'] != 1) {
|
if ($config['pure'] != 1) {
|
||||||
$show_filters = '<form method="post" action="index.php?sec=view&sec2=extensions/agents_modules" class="w100p">';
|
$show_filters = '<form id="filter_form" method="post" action="index.php?sec=view&sec2=extensions/agents_modules" class="w100p">';
|
||||||
$show_filters .= '<table class="filter-table-adv w100p no-border" cellpadding="4" cellspacing="4">';
|
$show_filters .= '<table class="filter-table-adv w100p no-border" cellpadding="4" cellspacing="4">';
|
||||||
$show_filters .= '<tr>';
|
$show_filters .= '<tr>';
|
||||||
$show_filters .= '<td width="33%">'.$filter_type.'</td>';
|
$show_filters .= '<td width="33%">'.$filter_type.'</td>';
|
||||||
@ -679,6 +694,13 @@ function mainAgentsModules()
|
|||||||
'onclick' => 'select_selected()',
|
'onclick' => 'select_selected()',
|
||||||
],
|
],
|
||||||
true
|
true
|
||||||
|
).html_print_button(
|
||||||
|
__('Export to CSV'),
|
||||||
|
'srcbutton_csv',
|
||||||
|
false,
|
||||||
|
'export_csv()',
|
||||||
|
['class' => 'secondary mini'],
|
||||||
|
true,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
true
|
true
|
||||||
|
118
pandora_console/extensions/agents_modules_csv.php
Normal file
118
pandora_console/extensions/agents_modules_csv.php
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Export data.
|
||||||
|
*
|
||||||
|
* @category Tools
|
||||||
|
* @package Pandora FMS
|
||||||
|
* @subpackage Operation
|
||||||
|
* @version 1.0.0
|
||||||
|
* @license See below
|
||||||
|
*
|
||||||
|
* ______ ___ _______ _______ ________
|
||||||
|
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||||
|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||||
|
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||||
|
*
|
||||||
|
* ============================================================================
|
||||||
|
* Copyright (c) 2005-2023 Pandora FMS
|
||||||
|
* Please see https://pandorafms.com/community/ 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.
|
||||||
|
* ============================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
|
global $config;
|
||||||
|
if (true) {
|
||||||
|
include_once '../include/config.php';
|
||||||
|
include_once '../include/functions_agents.php';
|
||||||
|
include_once '../include/functions_reporting.php';
|
||||||
|
include_once '../include/functions_modules.php';
|
||||||
|
include_once '../include/functions_users.php';
|
||||||
|
include_once $config['homedir'].'/include/config.php';
|
||||||
|
include_once $config['homedir'].'/include/functions_agents.php';
|
||||||
|
include_once $config['homedir'].'/include/functions_reporting.php';
|
||||||
|
include_once $config['homedir'].'/include/functions_modules.php';
|
||||||
|
include_once $config['homedir'].'/include/functions_users.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
check_login();
|
||||||
|
|
||||||
|
// ACL Check.
|
||||||
|
if (! check_acl($config['id_user'], 0, 'AR')) {
|
||||||
|
db_pandora_audit(
|
||||||
|
AUDIT_LOG_ACL_VIOLATION,
|
||||||
|
'Trying to access Agent view (Grouped)'
|
||||||
|
);
|
||||||
|
include 'general/noaccess.php';
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$get_agents_module_csv = get_parameter('get_agents_module_csv', 0);
|
||||||
|
|
||||||
|
|
||||||
|
if ($get_agents_module_csv === '1') {
|
||||||
|
// ***************************************************
|
||||||
|
// Header output
|
||||||
|
// ***************************************************
|
||||||
|
$config['ignore_callback'] = true;
|
||||||
|
while (@ob_end_clean()) {
|
||||||
|
}
|
||||||
|
|
||||||
|
$filename = 'agents_module_view_'.date('Ymd').'-'.date('His');
|
||||||
|
|
||||||
|
// Set cookie for download control.
|
||||||
|
setDownloadCookieToken();
|
||||||
|
|
||||||
|
header('Content-Type: text/csv');
|
||||||
|
header('Content-Disposition: attachment; filename="'.$filename.'.csv"');
|
||||||
|
// ***************************************************
|
||||||
|
// Data processing
|
||||||
|
// ***************************************************
|
||||||
|
echo pack('C*', 0xEF, 0xBB, 0xBF);
|
||||||
|
|
||||||
|
$json_filters = get_parameter('filters', '');
|
||||||
|
|
||||||
|
$filters = json_decode(
|
||||||
|
base64_decode(
|
||||||
|
get_parameter('filters', '')
|
||||||
|
),
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
|
$results = export_agents_module_csv($filters);
|
||||||
|
|
||||||
|
$divider = $config['csv_divider'];
|
||||||
|
$dataend = PHP_EOL;
|
||||||
|
|
||||||
|
$header_fields = [
|
||||||
|
__('Agent'),
|
||||||
|
__('Module'),
|
||||||
|
__('Data'),
|
||||||
|
];
|
||||||
|
|
||||||
|
$out_csv = '';
|
||||||
|
foreach ($header_fields as $key => $value) {
|
||||||
|
$out_csv .= $value.$divider;
|
||||||
|
}
|
||||||
|
|
||||||
|
$out_csv .= "\n";
|
||||||
|
|
||||||
|
foreach ($results as $result) {
|
||||||
|
foreach ($result as $key => $value) {
|
||||||
|
$out_csv .= io_safe_output($value).$divider;
|
||||||
|
}
|
||||||
|
|
||||||
|
$out_csv .= "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
echo io_safe_output($out_csv);
|
||||||
|
|
||||||
|
exit;
|
||||||
|
}
|
@ -157,7 +157,6 @@ function extension_api_checker()
|
|||||||
}
|
}
|
||||||
|
|
||||||
$url = io_safe_output(get_parameter('url', ''));
|
$url = io_safe_output(get_parameter('url', ''));
|
||||||
|
|
||||||
$ip = io_safe_output(get_parameter('ip', '127.0.0.1'));
|
$ip = io_safe_output(get_parameter('ip', '127.0.0.1'));
|
||||||
$pandora_url = io_safe_output(get_parameter('pandora_url', $config['homeurl_static']));
|
$pandora_url = io_safe_output(get_parameter('pandora_url', $config['homeurl_static']));
|
||||||
$apipass = io_safe_output(get_parameter('apipass', ''));
|
$apipass = io_safe_output(get_parameter('apipass', ''));
|
||||||
@ -175,6 +174,17 @@ function extension_api_checker()
|
|||||||
|
|
||||||
$api_execute = (bool) get_parameter('api_execute', false);
|
$api_execute = (bool) get_parameter('api_execute', false);
|
||||||
|
|
||||||
|
if ($url !== '') {
|
||||||
|
$validate_url = parse_url($url);
|
||||||
|
if ($validate_url['scheme'] === 'http' || $validate_url['scheme'] === 'https') {
|
||||||
|
ui_print_success_message(__('Request successfully processed'));
|
||||||
|
} else {
|
||||||
|
ui_print_error_message(__('Incorrect URL'));
|
||||||
|
$url = '';
|
||||||
|
$api_execute = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$return_call_api = '';
|
$return_call_api = '';
|
||||||
if ($api_execute === true) {
|
if ($api_execute === true) {
|
||||||
$return_call_api = api_execute(
|
$return_call_api = api_execute(
|
||||||
|
@ -453,7 +453,7 @@ function resource_exportation_extension_main()
|
|||||||
true
|
true
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$table->data[0][] = html_print_button(__('Export'), '', false, 'export_to_ptr("report");', ['mode' => 'link'], true);
|
$table->data[0][] = html_print_button(__('Export'), '', false, 'export_to_ptr("report");', '', true);
|
||||||
|
|
||||||
$table->data[1][] = html_print_label_input_block(
|
$table->data[1][] = html_print_label_input_block(
|
||||||
__('Visual console'),
|
__('Visual console'),
|
||||||
@ -465,7 +465,7 @@ function resource_exportation_extension_main()
|
|||||||
true
|
true
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$table->data[1][] = html_print_button(__('Export'), '', false, 'export_to_ptr("visual_console");', ['mode' => 'link'], true);
|
$table->data[1][] = html_print_button(__('Export'), '', false, 'export_to_ptr("visual_console");', '', true);
|
||||||
|
|
||||||
if ($hook_enterprise === true) {
|
if ($hook_enterprise === true) {
|
||||||
add_rows_for_enterprise($table->data);
|
add_rows_for_enterprise($table->data);
|
||||||
|
@ -1703,3 +1703,8 @@ enterprise/meta/monitoring/wizard/wizard.module.web.php
|
|||||||
enterprise/meta/monitoring/wizard/wizard.php
|
enterprise/meta/monitoring/wizard/wizard.php
|
||||||
enterprise/meta/monitoring/wizard/wizard.update_agent.php
|
enterprise/meta/monitoring/wizard/wizard.update_agent.php
|
||||||
enterprise/meta/monitoring/wizard/wizard.update_module.php
|
enterprise/meta/monitoring/wizard/wizard.update_module.php
|
||||||
|
enterprise/godmode/wizards/Applications.class.php
|
||||||
|
enterprise/godmode/wizards/Cloud.class.php
|
||||||
|
enterprise/images/wizard/applications.png
|
||||||
|
enterprise/images/wizard/cloud.png
|
||||||
|
enterprise/images/wizard/consoletasks.png
|
File diff suppressed because one or more lines are too long
13
pandora_console/extras/mr/66.sql
Normal file
13
pandora_console/extras/mr/66.sql
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
START TRANSACTION;
|
||||||
|
|
||||||
|
|
||||||
|
UPDATE `twelcome_tip`
|
||||||
|
SET title = 'Scheduled downtimes',
|
||||||
|
url = 'https://pandorafms.com/manual/en/documentation/04_using/11_managing_and_administration#scheduled_downtimes'
|
||||||
|
WHERE title = 'planned stops';
|
||||||
|
|
||||||
|
UPDATE tagente_modulo SET `tcp_send` = '2c' WHERE `tcp_send` = '2';
|
||||||
|
UPDATE tpolicy_modules SET `tcp_send` = '2c' WHERE `tcp_send` = '2';
|
||||||
|
UPDATE tnetwork_component SET `tcp_send` = '2c' WHERE `tcp_send` = '2';
|
||||||
|
|
||||||
|
COMMIT;
|
81
pandora_console/general/admin_maintenance_mode.php
Normal file
81
pandora_console/general/admin_maintenance_mode.php
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Static page to lock access to console
|
||||||
|
*
|
||||||
|
* @category Wizard
|
||||||
|
* @package Pandora FMS
|
||||||
|
* @subpackage Applications.VMware
|
||||||
|
* @version 1.0.0
|
||||||
|
* @license See below
|
||||||
|
*
|
||||||
|
* ______ ___ _______ _______ ________
|
||||||
|
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||||
|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||||
|
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||||
|
*
|
||||||
|
* ============================================================================
|
||||||
|
* Copyright (c) 2005-2021 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.
|
||||||
|
ui_require_css_file('maintenance');
|
||||||
|
?>
|
||||||
|
<html>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="responsive center padding-6">
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
if (is_metaconsole() === true) {
|
||||||
|
echo __('You cannot use this metaconsole until merging process is finished');
|
||||||
|
} else {
|
||||||
|
echo __('You cannot use this console until merging process is finished');
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</p>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
html_print_image(
|
||||||
|
'images/pandora_tinylogo.png',
|
||||||
|
false,
|
||||||
|
['class' => 'responsive flex margn']
|
||||||
|
);
|
||||||
|
html_print_image(
|
||||||
|
'images/maintenance.png',
|
||||||
|
false,
|
||||||
|
[
|
||||||
|
'class' => 'responsive',
|
||||||
|
'width' => 800,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<p><?php echo __('You will be automatically redirected when all tasks finish'); ?></p>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() {
|
||||||
|
setTimeout(
|
||||||
|
function() {
|
||||||
|
location.reload();
|
||||||
|
},
|
||||||
|
10000
|
||||||
|
);
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</html>
|
@ -228,7 +228,9 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
|
|||||||
);
|
);
|
||||||
|
|
||||||
$autorefresh_list = json_decode(
|
$autorefresh_list = json_decode(
|
||||||
$select[0]['autorefresh_white_list']
|
(empty($select[0]['autorefresh_white_list']) === false)
|
||||||
|
? $select[0]['autorefresh_white_list']
|
||||||
|
: ''
|
||||||
);
|
);
|
||||||
|
|
||||||
$header_autorefresh = '';
|
$header_autorefresh = '';
|
||||||
@ -364,59 +366,37 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
|
|||||||
$header_autorefresh_counter .= '</div>';
|
$header_autorefresh_counter .= '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Button for feedback pandora.
|
$modal_box = '<div id="modal_help" class="invisible">
|
||||||
if (enterprise_installed() && $config['activate_feedback']) {
|
<div id="modal-feedback-form" class="invisible"></div>
|
||||||
$header_feedback = '<div id="feedback-icon-header">';
|
<div id="msg-header" class="invisible"></div>
|
||||||
$header_feedback .= '<div id="modal-feedback-form" class="invisible"></div>';
|
<a href="https://pandorafms.com/manual" target="_blank">'.__('Pandora documentation').'</a>';
|
||||||
$header_feedback .= '<div id="msg-header" class="invisible"></div>';
|
if (enterprise_installed() === true) {
|
||||||
$header_feedback .= html_print_image(
|
$modal_box .= '<a href="https://support.pandorafms.com/" target="_blank">'.__('Enterprise support ').'</a>';
|
||||||
'images/send_feedback@header.svg',
|
$modal_box .= '<a href="#" id="feedback-header">'.__('Give us feedback').'</a>';
|
||||||
true,
|
|
||||||
[
|
|
||||||
'class' => 'main_menu_icon invert_filter',
|
|
||||||
'title' => __('Feedback'),
|
|
||||||
'id' => 'feedback-header',
|
|
||||||
'alt' => __('Feedback'),
|
|
||||||
'style' => 'cursor: pointer;',
|
|
||||||
]
|
|
||||||
);
|
|
||||||
$header_feedback .= '</div>';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Support.
|
|
||||||
if (enterprise_installed()) {
|
|
||||||
$header_support_link = $config['custom_support_url'];
|
|
||||||
} else {
|
} else {
|
||||||
$header_support_link = 'https://pandorafms.com/forums/';
|
$modal_box .= '<a href="https://pandorafms.com/community/forums/" target="_blank">'.__('Community Support').'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$header_support = '<div id="header_support">';
|
$modal_box .= '<hr class="separator" />';
|
||||||
$header_support .= '<a href="'.ui_get_full_external_url($header_support_link).'" target="_blank">';
|
$modal_box .= '<a href="https://github.com/pandorafms/pandorafms/issues" target="_blank">'.__('Open an issue in Github').'</a>';
|
||||||
$header_support .= html_print_image(
|
$modal_box .= '<a href="https://discord.com/invite/xVt2ruSxmr" target="_blank">'.__('Join discord community').'</a>';
|
||||||
'images/support@header.svg',
|
$modal_box .= '</div>';
|
||||||
true,
|
|
||||||
[
|
|
||||||
'title' => __('Go to support'),
|
|
||||||
'class' => 'main_menu_icon bot invert_filter',
|
|
||||||
'alt' => 'user',
|
|
||||||
]
|
|
||||||
);
|
|
||||||
$header_support .= '</a></div>';
|
|
||||||
|
|
||||||
// Documentation.
|
$modal_help = html_print_div(
|
||||||
$header_docu = '<div id="header_docu">';
|
[
|
||||||
$header_docu .= '<a href="'.ui_get_full_external_url($config['custom_docs_url']).'" target="_blank">';
|
'id' => 'modal-help-content',
|
||||||
$header_docu .= html_print_image(
|
'content' => html_print_image(
|
||||||
'images/documentation@header.svg',
|
'images/help@header.svg',
|
||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
'title' => __('Go to documentation'),
|
'title' => __('Help'),
|
||||||
'class' => 'main_menu_icon bot invert_filter',
|
'class' => 'main_menu_icon bot invert_filter',
|
||||||
'alt' => 'user',
|
'alt' => 'user',
|
||||||
]
|
]
|
||||||
|
).$modal_box,
|
||||||
|
],
|
||||||
|
true,
|
||||||
);
|
);
|
||||||
$header_docu .= '</a></div>';
|
|
||||||
|
|
||||||
|
|
||||||
// User.
|
// User.
|
||||||
@ -470,11 +450,11 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
|
|||||||
echo '</span>';
|
echo '</span>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
echo '<div class="header_center"></div>';
|
echo '<div class="header_center"></div>';
|
||||||
echo '<div class="header_right">'.$header_support, $header_docu, $header_user, $header_logout.'</div>';
|
echo '<div class="header_right">'.$modal_help, $header_user, $header_logout.'</div>';
|
||||||
} else {
|
} else {
|
||||||
echo '<div class="header_left"><span class="header_title">'.$config['custom_title_header'].'</span><span class="header_subtitle">'.$config['custom_subtitle_header'].'</span></div>
|
echo '<div class="header_left"><span class="header_title">'.$config['custom_title_header'].'</span><span class="header_subtitle">'.$config['custom_subtitle_header'].'</span></div>
|
||||||
<div class="header_center">'.$header_searchbar.'</div>
|
<div class="header_center">'.$header_searchbar.'</div>
|
||||||
<div class="header_right">'.$header_autorefresh, $header_autorefresh_counter, $header_discovery, $header_welcome, $servers_list, $header_feedback, $header_support, $header_docu, $header_user, $header_logout.'</div>';
|
<div class="header_right">'.$header_autorefresh, $header_autorefresh_counter, $header_discovery, $header_welcome, $servers_list, $modal_help, $header_user, $header_logout.'</div>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div> <!-- Closes #table_header_inner -->
|
</div> <!-- Closes #table_header_inner -->
|
||||||
@ -552,6 +532,54 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
|
|||||||
element.style.display = "none"
|
element.style.display = "none"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function notifications_clean_all() {
|
||||||
|
let wrapper_inner = document.getElementById('notification-wrapper-inner');
|
||||||
|
while (wrapper_inner.firstChild) {
|
||||||
|
wrapper_inner.removeChild(wrapper_inner.firstChild);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function mark_all_notification_as_read() {
|
||||||
|
jQuery.post ("ajax.php",
|
||||||
|
{
|
||||||
|
"page" : "godmode/setup/setup_notifications",
|
||||||
|
"mark_all_notification_as_read" : 1
|
||||||
|
},
|
||||||
|
function (data, status) {
|
||||||
|
notifications_clean_all();
|
||||||
|
location.reload();
|
||||||
|
},
|
||||||
|
"json"
|
||||||
|
)
|
||||||
|
.fail(function(xhr, textStatus, errorThrown){
|
||||||
|
console.error(
|
||||||
|
"Failed to mark al notification as read. Error: ",
|
||||||
|
xhr.responseText
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function filter_notification() {
|
||||||
|
let notification_type = '';
|
||||||
|
$('.notification-item').hide();
|
||||||
|
$(".checkbox_filter_notifications:checkbox:checked").each(function() {
|
||||||
|
notification_type = $(this).val();
|
||||||
|
console.log(notification_type);
|
||||||
|
$('.notification-item[value='+notification_type+']').show();
|
||||||
|
if (notification_type == 'All'){
|
||||||
|
$('.notification-item').show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (notification_type == 'All'){
|
||||||
|
$('.notification-item').show();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (notification_type == ''){
|
||||||
|
$('.notification-item').hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function click_on_notification_toast(event) {
|
function click_on_notification_toast(event) {
|
||||||
var match = /notification-(.*)-id-([0-9]+)/.exec(event.target.id);
|
var match = /notification-(.*)-id-([0-9]+)/.exec(event.target.id);
|
||||||
if (!match) {
|
if (!match) {
|
||||||
@ -958,8 +986,6 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
|
|||||||
<?php if (enterprise_installed()) { ?>
|
<?php if (enterprise_installed()) { ?>
|
||||||
// Feedback.
|
// Feedback.
|
||||||
$("#feedback-header").click(function () {
|
$("#feedback-header").click(function () {
|
||||||
// Clean DOM.
|
|
||||||
$("#feedback-header").empty();
|
|
||||||
// Function charge Modal.
|
// Function charge Modal.
|
||||||
show_feedback();
|
show_feedback();
|
||||||
});
|
});
|
||||||
@ -1065,6 +1091,22 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$(document).click(function(event) {
|
||||||
|
if (!$(event.target).closest('#modal-help-content').length &&
|
||||||
|
$('#modal_help').hasClass('invisible') === false) {
|
||||||
|
$('#modal_help').addClass('invisible');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#modal-help-content').on('click', (e) => {
|
||||||
|
if($(e.target).prop('tagName') === 'A') {
|
||||||
|
$('#modal_help').addClass('invisible');
|
||||||
|
} else {
|
||||||
|
$('#modal_help').removeClass('invisible');
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
/* ]]> */
|
/* ]]> */
|
||||||
</script>
|
</script>
|
||||||
|
@ -30,7 +30,7 @@ require_once __DIR__.'/../include/functions_html.php';
|
|||||||
echo '<style>
|
echo '<style>
|
||||||
:root {';
|
:root {';
|
||||||
if ($config['style'] === 'pandora') {
|
if ($config['style'] === 'pandora') {
|
||||||
echo '--login-background-color: rgba(255, 255, 255, 0.4);';
|
echo '--login-background-color: rgba(255, 255, 255, 0.50);';
|
||||||
echo '--login-label-color: #545454;';
|
echo '--login-label-color: #545454;';
|
||||||
echo '--login-text-color: #000;';
|
echo '--login-text-color: #000;';
|
||||||
$style_theme = 'white-theme';
|
$style_theme = 'white-theme';
|
||||||
@ -237,16 +237,18 @@ if (is_metaconsole() === true) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
|
} else if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
|
||||||
|
$theme_logo = ($config['style'] === 'pandora') ? 'images/custom_logo_login/Pandora FMS alt black.png' : 'enterprise/images/custom_logo_login/'.$config['custom_logo_login'];
|
||||||
if (!isset($config['custom_logo_login'])) {
|
if (!isset($config['custom_logo_login'])) {
|
||||||
html_print_image(ui_get_full_url('enterprise/images/custom_logo_login/Pandora-FMS-1.png'), false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
|
html_print_image(ui_get_full_url($theme_logo), false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
|
||||||
} else {
|
} else {
|
||||||
html_print_image(ui_get_full_url('enterprise/images/custom_logo_login/'.$config['custom_logo_login']), false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
|
html_print_image(ui_get_full_url($theme_logo), false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
$theme_logo = ($config['style'] === 'pandora') ? 'images/custom_logo_login/Pandora FMS alt black.png' : 'images/custom_logo_login/'.$config['custom_logo_login'];
|
||||||
if (empty($config['custom_logo_login']) === true) {
|
if (empty($config['custom_logo_login']) === true) {
|
||||||
html_print_image(ui_get_full_url('images/custom_logo_login/Pandora-FMS-1.png'), false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
|
html_print_image(ui_get_full_url($theme_logo), false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
|
||||||
} else {
|
} else {
|
||||||
html_print_image(ui_get_full_url('images/custom_logo_login/').$config['custom_logo_login'], false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
|
html_print_image(ui_get_full_url($theme_logo), false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -259,6 +259,8 @@ if (!empty($news)) {
|
|||||||
|
|
||||||
$output_news .= '</div></div>';
|
$output_news .= '</div></div>';
|
||||||
} else {
|
} else {
|
||||||
|
$text = str_replace('<script', '<script', $text);
|
||||||
|
$text = str_replace('</script', '</script', $text);
|
||||||
$output_news .= nl2br($text);
|
$output_news .= nl2br($text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,6 +185,10 @@ echo '</div>';
|
|||||||
$(`#sub${this.id}`).hide();
|
$(`#sub${this.id}`).hide();
|
||||||
})
|
})
|
||||||
} else if ($('#menu_full').hasClass('menu_full_collapsed')) {
|
} else if ($('#menu_full').hasClass('menu_full_collapsed')) {
|
||||||
|
$(".arrow_menu_right").each(function() {
|
||||||
|
$(this).removeClass('arrow_menu_right');
|
||||||
|
$(this).addClass('arrow_menu_down');
|
||||||
|
});
|
||||||
localStorage.setItem("menuType", "classic");
|
localStorage.setItem("menuType", "classic");
|
||||||
$('ul.submenu').css('left', '280px');
|
$('ul.submenu').css('left', '280px');
|
||||||
var menuType_val = localStorage.getItem("menuType");
|
var menuType_val = localStorage.getItem("menuType");
|
||||||
@ -273,6 +277,14 @@ echo '</div>';
|
|||||||
$('.menu_icon').mouseenter(function() {
|
$('.menu_icon').mouseenter(function() {
|
||||||
var menuType_val = localStorage.getItem("menuType");
|
var menuType_val = localStorage.getItem("menuType");
|
||||||
if (!click_display && menuType_val === 'collapsed') {
|
if (!click_display && menuType_val === 'collapsed') {
|
||||||
|
$(".arrow_menu_down").each(function() {
|
||||||
|
$(this).removeClass('arrow_menu_down');
|
||||||
|
$(this).addClass('arrow_menu_right');
|
||||||
|
});
|
||||||
|
$(".arrow_menu_up").each(function() {
|
||||||
|
$(this).removeClass('arrow_menu_up');
|
||||||
|
$(this).addClass('arrow_menu_right');
|
||||||
|
});
|
||||||
table_hover = $(this);
|
table_hover = $(this);
|
||||||
handsIn = 1;
|
handsIn = 1;
|
||||||
openTime = new Date().getTime();
|
openTime = new Date().getTime();
|
||||||
@ -305,6 +317,7 @@ echo '</div>';
|
|||||||
table_hover2 = $(this);
|
table_hover2 = $(this);
|
||||||
handsIn2 = 1;
|
handsIn2 = 1;
|
||||||
openTime2 = new Date().getTime();
|
openTime2 = new Date().getTime();
|
||||||
|
$("#sub" + table_hover2[0].id).attr('style', 'display: none; position: fixed; left: 340px;');
|
||||||
$("#sub" + table_hover2[0].id).show();
|
$("#sub" + table_hover2[0].id).show();
|
||||||
if (typeof(table_noHover2) != 'undefined') {
|
if (typeof(table_noHover2) != 'undefined') {
|
||||||
if ("ul#sub" + table_hover2[0].id != "ul#sub" + table_noHover2[0].id) {
|
if ("ul#sub" + table_hover2[0].id != "ul#sub" + table_noHover2[0].id) {
|
||||||
@ -315,6 +328,7 @@ echo '</div>';
|
|||||||
}).mouseleave(function() {
|
}).mouseleave(function() {
|
||||||
var menuType_val = localStorage.getItem("menuType");
|
var menuType_val = localStorage.getItem("menuType");
|
||||||
if (!click_display && menuType_val === 'collapsed') {
|
if (!click_display && menuType_val === 'collapsed') {
|
||||||
|
$("#sub" + $(this)[0].id).attr('style', 'display: none;');
|
||||||
table_noHover2 = table_hover2;
|
table_noHover2 = table_hover2;
|
||||||
handsIn2 = 0;
|
handsIn2 = 0;
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
@ -474,4 +488,10 @@ echo '</div>';
|
|||||||
return height_logo + height_tabs + padding_menu + height_position;
|
return height_logo + height_tabs + padding_menu + height_position;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if (get_user_language($config['id_user']) == 'es') {
|
||||||
|
?>
|
||||||
|
$('#icon_god-extensions').find('span').attr('style', 'white-space: nowrap;');
|
||||||
|
<?php } ?>
|
||||||
</script>
|
</script>
|
@ -931,7 +931,7 @@ foreach ($fields as $field) {
|
|||||||
// Filling the data.
|
// Filling the data.
|
||||||
$combo = [];
|
$combo = [];
|
||||||
$combo = $field['combo_values'];
|
$combo = $field['combo_values'];
|
||||||
$combo = explode(',', $combo);
|
$combo = explode(',', (empty($combo) === true) ? '' : $combo);
|
||||||
$combo_values = [];
|
$combo_values = [];
|
||||||
foreach ($combo as $value) {
|
foreach ($combo as $value) {
|
||||||
$combo_values[$value] = $value;
|
$combo_values[$value] = $value;
|
||||||
|
@ -1758,7 +1758,10 @@ if ($update_module) {
|
|||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
if ($id_module_type == 30 || $id_module_type == 31 || $id_module_type == 32 || $id_module_type == 33) {
|
if ($id_module_type === 30 || $id_module_type === 31
|
||||||
|
|| $id_module_type === 32 || $id_module_type === 33
|
||||||
|
|| $id_module_type === 38
|
||||||
|
) {
|
||||||
$plugin_parameter_split = explode('
', $values['plugin_parameter']);
|
$plugin_parameter_split = explode('
', $values['plugin_parameter']);
|
||||||
|
|
||||||
$values['plugin_parameter'] = '';
|
$values['plugin_parameter'] = '';
|
||||||
@ -1954,7 +1957,10 @@ if ($create_module) {
|
|||||||
'warning_time' => $warning_time,
|
'warning_time' => $warning_time,
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($id_module_type === 30 || $id_module_type === 31 || $id_module_type === 32 || $id_module_type === 33) {
|
if ($id_module_type === 30 || $id_module_type === 31
|
||||||
|
|| $id_module_type === 32 || $id_module_type === 33
|
||||||
|
|| $id_module_type === 38
|
||||||
|
) {
|
||||||
$plugin_parameter_split = explode('
', $values['plugin_parameter']);
|
$plugin_parameter_split = explode('
', $values['plugin_parameter']);
|
||||||
|
|
||||||
$values['plugin_parameter'] = '';
|
$values['plugin_parameter'] = '';
|
||||||
|
@ -996,6 +996,8 @@ if ($agents !== false) {
|
|||||||
$tableAgents->data[$key][6] = $actionButtonsColumn;
|
$tableAgents->data[$key][6] = $actionButtonsColumn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$total_items = '<div class="total_pages">'.sprintf(__('Total items: %s'), $total_agents).'</div>';
|
||||||
|
echo $total_items;
|
||||||
html_print_table($tableAgents);
|
html_print_table($tableAgents);
|
||||||
|
|
||||||
$tablePagination = ui_pagination(
|
$tablePagination = ui_pagination(
|
||||||
|
@ -407,8 +407,7 @@ if ($edit_module === true) {
|
|||||||
$help_header = 'local_module';
|
$help_header = 'local_module';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($id_module_type === 6 || $id_module_type === 7
|
if ($id_module_type === 6 || $id_module_type === 7) {
|
||||||
) {
|
|
||||||
$help_header = 'icmp_module_tab';
|
$help_header = 'icmp_module_tab';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -420,7 +419,7 @@ if ($edit_module === true) {
|
|||||||
$help_header = 'tcp_module_tab';
|
$help_header = 'tcp_module_tab';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($id_module_type >= 30 && $id_module_type <= 33) {
|
if (($id_module_type >= 30 && $id_module_type <= 33) || $id_module_type === 38) {
|
||||||
$help_header = 'webserver_module_tab';
|
$help_header = 'webserver_module_tab';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1847,6 +1846,22 @@ $(document).ready (function () {
|
|||||||
setModuleType(type_name_selected);
|
setModuleType(type_name_selected);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#checkbox-warning_inverse_string').change( function () {
|
||||||
|
if ($(this).prop('checked') === true) {
|
||||||
|
$('input[name="warning_thresholds_checks"]').val('warning_inverse');
|
||||||
|
} else {
|
||||||
|
$('input[name="warning_thresholds_checks"]').val('normal_warning');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#checkbox-critical_inverse_string').change( function () {
|
||||||
|
if ($(this).prop('checked') === true) {
|
||||||
|
$('input[name="critical_thresholds_checks"]').val('critical_inverse');
|
||||||
|
} else {
|
||||||
|
$('input[name="critical_thresholds_checks"]').val('normal_critical');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
function setModuleType(type_name_selected) {
|
function setModuleType(type_name_selected) {
|
||||||
if (type_name_selected.match(/_string$/) == null) {
|
if (type_name_selected.match(/_string$/) == null) {
|
||||||
// Hide string fields.
|
// Hide string fields.
|
||||||
|
@ -233,7 +233,6 @@ if ($adopt === false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$snmp_versions['1'] = 'v. 1';
|
$snmp_versions['1'] = 'v. 1';
|
||||||
$snmp_versions['2'] = 'v. 2';
|
|
||||||
$snmp_versions['2c'] = 'v. 2c';
|
$snmp_versions['2c'] = 'v. 2c';
|
||||||
$snmp_versions['3'] = 'v. 3';
|
$snmp_versions['3'] = 'v. 3';
|
||||||
|
|
||||||
|
@ -171,6 +171,8 @@ foreach ($password_fields as $k => $p) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
if ($("#id_plugin").val() === 0) {
|
||||||
changePluginSelect();
|
changePluginSelect();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -725,17 +725,17 @@ if ($copy_command) {
|
|||||||
$is_management_allowed = is_management_allowed();
|
$is_management_allowed = is_management_allowed();
|
||||||
if ($is_management_allowed === false) {
|
if ($is_management_allowed === false) {
|
||||||
if (is_metaconsole() === false) {
|
if (is_metaconsole() === false) {
|
||||||
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
$url_redirect = '<a target="_blank" href="'.ui_get_meta_url(
|
||||||
'index.php?sec=advanced&sec2=godmode/alerts/alert_commands&tab=command&pure=0'
|
'index.php?sec=advanced&sec2=godmode/alerts/alert_commands&tab=command&pure=0'
|
||||||
).'">'.__('metaconsole').'</a>';
|
).'">'.__('metaconsole').'</a>';
|
||||||
} else {
|
} else {
|
||||||
$url = __('any node');
|
$url_redirect = __('any node');
|
||||||
}
|
}
|
||||||
|
|
||||||
ui_print_warning_message(
|
ui_print_warning_message(
|
||||||
__(
|
__(
|
||||||
'This node is configured with centralized mode. All alert commands information is read only. Go to %s to manage it.',
|
'This node is configured with centralized mode. All alert commands information is read only. Go to %s to manage it.',
|
||||||
$url
|
$url_redirect
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -809,10 +809,10 @@ foreach ($commands as $command) {
|
|||||||
if (is_user_admin($config['id_user']) === true) {
|
if (is_user_admin($config['id_user']) === true) {
|
||||||
$data['action'] = '<span class="inline_flex">';
|
$data['action'] = '<span class="inline_flex">';
|
||||||
$data['action'] .= '<a href="index.php?sec='.$sec.'&sec2=godmode/alerts/alert_commands&copy_command=1&id='.$command['id'].'&pure='.$pure.'&offset='.$offset.'"
|
$data['action'] .= '<a href="index.php?sec='.$sec.'&sec2=godmode/alerts/alert_commands&copy_command=1&id='.$command['id'].'&pure='.$pure.'&offset='.$offset.'"
|
||||||
onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/copy.svg', true, ['class' => 'main_menu_icon invert_filter']).'</a>';
|
onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/copy.svg', true, ['class' => 'main_menu_icon invert_filter ', 'title' => 'Duplicate']).'</a>';
|
||||||
|
|
||||||
$data['action'] .= '<a href="index.php?sec='.$sec.'&sec2=godmode/alerts/alert_commands&delete_command=1&id='.$command['id'].'&pure='.$pure.'&offset='.$offset_delete.'"
|
$data['action'] .= '<a href="index.php?sec='.$sec.'&sec2=godmode/alerts/alert_commands&delete_command=1&id='.$command['id'].'&pure='.$pure.'&offset='.$offset_delete.'"
|
||||||
onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/delete.svg', true, ['class' => 'main_menu_icon invert_filter']).'</a>';
|
onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/delete.svg', true, ['class' => 'main_menu_icon invert_filter', 'title' => 'Delete']).'</a>';
|
||||||
$data['action'] .= '</span>';
|
$data['action'] .= '</span>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -912,7 +912,10 @@ foreach ($simple_alerts as $alert) {
|
|||||||
1,
|
1,
|
||||||
'padding:0px; width: 22px; height: 22px;',
|
'padding:0px; width: 22px; height: 22px;',
|
||||||
true,
|
true,
|
||||||
['class' => 'invert_filter main_menu_icon']
|
[
|
||||||
|
'class' => 'invert_filter main_menu_icon',
|
||||||
|
'title' => __('Enable'),
|
||||||
|
]
|
||||||
);
|
);
|
||||||
$data[4] .= html_print_input_hidden('enable_alert', 1, true);
|
$data[4] .= html_print_input_hidden('enable_alert', 1, true);
|
||||||
} else {
|
} else {
|
||||||
@ -922,7 +925,10 @@ foreach ($simple_alerts as $alert) {
|
|||||||
1,
|
1,
|
||||||
'padding:0px; width: 22px; height: 22px;',
|
'padding:0px; width: 22px; height: 22px;',
|
||||||
true,
|
true,
|
||||||
['class' => 'main_menu_icon']
|
[
|
||||||
|
'class' => 'invert filter main_menu_icon',
|
||||||
|
'title' => __('Disable'),
|
||||||
|
]
|
||||||
);
|
);
|
||||||
$data[4] .= html_print_input_hidden('disable_alert', 1, true);
|
$data[4] .= html_print_input_hidden('disable_alert', 1, true);
|
||||||
}
|
}
|
||||||
@ -940,7 +946,10 @@ foreach ($simple_alerts as $alert) {
|
|||||||
1,
|
1,
|
||||||
'padding:0px; width: 22px; height: 22px;',
|
'padding:0px; width: 22px; height: 22px;',
|
||||||
true,
|
true,
|
||||||
['class' => 'invert_filter main_menu_icon']
|
[
|
||||||
|
'class' => 'invert_filter main_menu_icon',
|
||||||
|
'title' => __('Standby off'),
|
||||||
|
]
|
||||||
);
|
);
|
||||||
$data[4] .= html_print_input_hidden('standbyon_alert', 1, true);
|
$data[4] .= html_print_input_hidden('standbyon_alert', 1, true);
|
||||||
} else {
|
} else {
|
||||||
@ -950,7 +959,10 @@ foreach ($simple_alerts as $alert) {
|
|||||||
1,
|
1,
|
||||||
'padding:0px; width: 22px; height: 22px;',
|
'padding:0px; width: 22px; height: 22px;',
|
||||||
true,
|
true,
|
||||||
['class' => 'invert_filter main_menu_icon']
|
[
|
||||||
|
'class' => 'invert_filter main_menu_icon',
|
||||||
|
'title' => __('Standby on'),
|
||||||
|
]
|
||||||
);
|
);
|
||||||
$data[4] .= html_print_input_hidden('standbyoff_alert', 1, true);
|
$data[4] .= html_print_input_hidden('standbyoff_alert', 1, true);
|
||||||
}
|
}
|
||||||
@ -1139,8 +1151,7 @@ if (! $id_agente) {
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$("input[name=disable]").attr ("title", "<?php echo __('Disable'); ?>")
|
$("input[name=disable]").hover (function () {
|
||||||
.hover (function () {
|
|
||||||
$(this).attr ("src",
|
$(this).attr ("src",
|
||||||
<?php
|
<?php
|
||||||
echo '"'.html_print_image(
|
echo '"'.html_print_image(
|
||||||
@ -1166,8 +1177,7 @@ if (! $id_agente) {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
$("input[name=enable]").attr ("title", "<?php echo __('Enable'); ?>")
|
$("input[name=enable]").hover (function () {
|
||||||
.hover (function () {
|
|
||||||
$(this).attr ("src",
|
$(this).attr ("src",
|
||||||
<?php
|
<?php
|
||||||
echo '"'.html_print_image(
|
echo '"'.html_print_image(
|
||||||
@ -1193,8 +1203,7 @@ if (! $id_agente) {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
$("input[name=standby_on]").attr ("title", "<?php echo __('Set off standby'); ?>")
|
$("input[name=standby_on]").hover (function () {
|
||||||
.hover (function () {
|
|
||||||
$(this).attr ("src",
|
$(this).attr ("src",
|
||||||
<?php
|
<?php
|
||||||
echo '"'.html_print_image(
|
echo '"'.html_print_image(
|
||||||
@ -1220,8 +1229,7 @@ if (! $id_agente) {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
$("input[name=standby_off]").attr ("title", "<?php echo __('Set standby'); ?>")
|
$("input[name=standby_off]").hover (function () {
|
||||||
.hover (function () {
|
|
||||||
$(this).attr ("src",
|
$(this).attr ("src",
|
||||||
<?php
|
<?php
|
||||||
echo '"'.html_print_image(
|
echo '"'.html_print_image(
|
||||||
|
@ -262,7 +262,7 @@ $data[1] = '';
|
|||||||
$table_conditions->data[] = $data;
|
$table_conditions->data[] = $data;
|
||||||
|
|
||||||
$data[0] = __('Use special days list');
|
$data[0] = __('Use special days list');
|
||||||
$data[1] = (isset($alert['special_day']) && $alert['special_day'] == 1) ? __('Yes') : __('No');
|
$data[1] = (isset($template['special_day']) && (int) $template['special_day'] !== 0) ? __('Yes') : __('No');
|
||||||
$table_conditions->data[] = $data;
|
$table_conditions->data[] = $data;
|
||||||
|
|
||||||
$data[0] = __('Time threshold');
|
$data[0] = __('Time threshold');
|
||||||
@ -678,6 +678,23 @@ ui_require_javascript_file('pandora_fullcalendar');
|
|||||||
|
|
||||||
<script language="javascript" type="text/javascript">
|
<script language="javascript" type="text/javascript">
|
||||||
$(document).ready (function () {
|
$(document).ready (function () {
|
||||||
|
$('li#icon_oper-agents').addClass('selected');
|
||||||
|
$('ul#subicon_oper-agents').show();
|
||||||
|
$('#title_menu').children().last().removeClass('arrow_menu_down');
|
||||||
|
$('#title_menu').children().last().addClass('arrow_menu_up');
|
||||||
|
$('#title_menu').children().first().next().addClass('span_selected');
|
||||||
|
$('li#Views').show();
|
||||||
|
$('li#Views').children().first().children().last().removeClass('arrow_menu_down');
|
||||||
|
$('li#Views').children().first().children().last().addClass('arrow_menu_up');
|
||||||
|
$('li#Views').children().first().children().first().addClass('span_selected');
|
||||||
|
$('li#Views').addClass('submenu_selected');
|
||||||
|
$('li#Views').removeClass('submenu_not_selected');
|
||||||
|
$('ul#subViews').show();
|
||||||
|
var parent = $('div[title="Alert details"]').parent().parent();
|
||||||
|
parent.addClass('selected');
|
||||||
|
$('.sub_subMenu.selected').prepend(`<div class="element_submenu_selected left_3"></div>`);
|
||||||
|
|
||||||
|
|
||||||
var calendarEl = document.getElementById('calendar_map');
|
var calendarEl = document.getElementById('calendar_map');
|
||||||
if(calendarEl){
|
if(calendarEl){
|
||||||
var eventsBBDD = $("#hidden-schedule").val();
|
var eventsBBDD = $("#hidden-schedule").val();
|
||||||
|
@ -103,6 +103,7 @@ if ($create_profiles) {
|
|||||||
$groups_id = get_parameter('groups_id', -1);
|
$groups_id = get_parameter('groups_id', -1);
|
||||||
$users_id = get_parameter('users_id', -1);
|
$users_id = get_parameter('users_id', -1);
|
||||||
$n_added = 0;
|
$n_added = 0;
|
||||||
|
$msg_error = __('Profiles cannot be added');
|
||||||
|
|
||||||
if ($profiles_id == -1 || $groups_id == -1 || $users_id == -1) {
|
if ($profiles_id == -1 || $groups_id == -1 || $users_id == -1) {
|
||||||
$result = false;
|
$result = false;
|
||||||
@ -155,6 +156,8 @@ if ($create_profiles) {
|
|||||||
if ($return !== false) {
|
if ($return !== false) {
|
||||||
$n_added++;
|
$n_added++;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$msg_error = __('The profile already exist on the user');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -182,7 +185,7 @@ if ($create_profiles) {
|
|||||||
ui_print_result_message(
|
ui_print_result_message(
|
||||||
$n_added > 0,
|
$n_added > 0,
|
||||||
__('Profiles added successfully').'('.$n_added.')',
|
__('Profiles added successfully').'('.$n_added.')',
|
||||||
__('Profiles cannot be added')
|
$msg_error
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,8 +67,27 @@ if (is_ajax()) {
|
|||||||
if ($get_users) {
|
if ($get_users) {
|
||||||
$id_group = get_parameter('id_group');
|
$id_group = get_parameter('id_group');
|
||||||
$id_profile = get_parameter('id_profile');
|
$id_profile = get_parameter('id_profile');
|
||||||
|
$get_all_groups = get_parameter('get_all_groups', '0');
|
||||||
|
|
||||||
|
if ($get_all_groups !== '0') {
|
||||||
|
$profile_data = db_get_all_rows_sql(
|
||||||
|
'SELECT *
|
||||||
|
FROM tusuario_perfil
|
||||||
|
WHERE `id_perfil` = "'.$id_profile[0].'"
|
||||||
|
GROUP BY id_usuario'
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
if (strlen($id_profile[0]) > 0 && strlen($id_group[0]) > 0) {
|
||||||
|
$profile_data = db_get_all_rows_filter(
|
||||||
|
'tusuario_perfil',
|
||||||
|
[
|
||||||
|
'id_perfil' => $id_profile[0],
|
||||||
|
'id_grupo' => $id_group[0],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$profile_data = db_get_all_rows_filter('tusuario_perfil', ['id_perfil' => $id_profile[0], 'id_grupo' => $id_group[0]]);
|
|
||||||
if (!users_is_admin()) {
|
if (!users_is_admin()) {
|
||||||
foreach ($profile_data as $user => $values) {
|
foreach ($profile_data as $user => $values) {
|
||||||
if (users_is_admin($values['id_usuario'])) {
|
if (users_is_admin($values['id_usuario'])) {
|
||||||
@ -243,6 +262,21 @@ $data[2] .= html_print_select(
|
|||||||
);
|
);
|
||||||
|
|
||||||
array_push($table->data, $data);
|
array_push($table->data, $data);
|
||||||
|
$table->data[1][0] = '';
|
||||||
|
$table->data[1][1] = html_print_label_input_block(
|
||||||
|
__('Show all groups'),
|
||||||
|
html_print_checkbox_switch(
|
||||||
|
'get_all_groups',
|
||||||
|
1,
|
||||||
|
$get_all_groups,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
' float-right'
|
||||||
|
),
|
||||||
|
['div_class' => 'center_align']
|
||||||
|
);
|
||||||
|
|
||||||
html_print_table($table);
|
html_print_table($table);
|
||||||
|
|
||||||
@ -273,7 +307,8 @@ $(document).ready (function () {
|
|||||||
{"page" : "godmode/massive/massive_delete_profiles",
|
{"page" : "godmode/massive/massive_delete_profiles",
|
||||||
"get_users" : 1,
|
"get_users" : 1,
|
||||||
"id_group[]" : $("#groups_id").val(),
|
"id_group[]" : $("#groups_id").val(),
|
||||||
"id_profile[]" : $("#profiles_id").val()
|
"id_profile[]" : $("#profiles_id").val(),
|
||||||
|
"get_all_groups" : $('#checkbox-get_all_groups').is(':checked') ? 1 : 0
|
||||||
},
|
},
|
||||||
function (data, status) {
|
function (data, status) {
|
||||||
options = "";
|
options = "";
|
||||||
@ -295,6 +330,10 @@ $(document).ready (function () {
|
|||||||
$("#profiles_id").change (function () {
|
$("#profiles_id").change (function () {
|
||||||
update_users();
|
update_users();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#checkbox-get_all_groups").change (function () {
|
||||||
|
update_users();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
/* ]]> */
|
/* ]]> */
|
||||||
</script>
|
</script>
|
||||||
|
@ -965,7 +965,6 @@ $table->data[19][0] = html_print_label_input_block(
|
|||||||
);
|
);
|
||||||
|
|
||||||
$snmp_versions['1'] = 'v. 1';
|
$snmp_versions['1'] = 'v. 1';
|
||||||
$snmp_versions['2'] = 'v. 2';
|
|
||||||
$snmp_versions['2c'] = 'v. 2c';
|
$snmp_versions['2c'] = 'v. 2c';
|
||||||
$snmp_versions['3'] = 'v. 3';
|
$snmp_versions['3'] = 'v. 3';
|
||||||
|
|
||||||
|
@ -82,12 +82,12 @@ if ((bool) check_acl($config['id_user'], 0, 'AR') === true
|
|||||||
// Applications.
|
// Applications.
|
||||||
$sub2 = [];
|
$sub2 = [];
|
||||||
if (enterprise_installed() === true) {
|
if (enterprise_installed() === true) {
|
||||||
$sub2['godmode/servers/discovery&wiz=app&mode=MicrosoftSQLServer']['text'] = __('Microsoft SQL Server');
|
$sub2['godmode/servers/discovery&wiz=app&mode=MicrosoftSQLServer']['text'] = __('Microsoft SQL Server (legacy)');
|
||||||
$sub2['godmode/servers/discovery&wiz=app&mode=mysql']['text'] = __('Mysql');
|
$sub2['godmode/servers/discovery&wiz=app&mode=mysql']['text'] = __('Mysql (legacy)');
|
||||||
$sub2['godmode/servers/discovery&wiz=app&mode=oracle']['text'] = __('Oracle');
|
$sub2['godmode/servers/discovery&wiz=app&mode=oracle']['text'] = __('Oracle (legacy)');
|
||||||
$sub2['godmode/servers/discovery&wiz=app&mode=vmware']['text'] = __('VMware');
|
$sub2['godmode/servers/discovery&wiz=app&mode=vmware']['text'] = __('VMware (legacy)');
|
||||||
$sub2['godmode/servers/discovery&wiz=app&mode=SAP']['text'] = __('SAP');
|
$sub2['godmode/servers/discovery&wiz=app&mode=SAP']['text'] = __('SAP (legacy)');
|
||||||
$sub2['godmode/servers/discovery&wiz=app&mode=DB2']['text'] = __('DB2');
|
$sub2['godmode/servers/discovery&wiz=app&mode=DB2']['text'] = __('DB2 (legacy)');
|
||||||
}
|
}
|
||||||
|
|
||||||
$extensions = ManageExtensions::getExtensionBySection('app');
|
$extensions = ManageExtensions::getExtensionBySection('app');
|
||||||
@ -112,9 +112,9 @@ if ((bool) check_acl($config['id_user'], 0, 'AR') === true
|
|||||||
// Cloud.
|
// Cloud.
|
||||||
$sub2 = [];
|
$sub2 = [];
|
||||||
if (enterprise_installed() === true) {
|
if (enterprise_installed() === true) {
|
||||||
$sub2['godmode/servers/discovery&wiz=cloud&mode=amazonws']['text'] = __('Amazon Web Services');
|
$sub2['godmode/servers/discovery&wiz=cloud&mode=amazonws']['text'] = __('Amazon Web Services (legacy)');
|
||||||
$sub2['godmode/servers/discovery&wiz=cloud&mode=azure']['text'] = __('Microsoft Azure');
|
$sub2['godmode/servers/discovery&wiz=cloud&mode=azure']['text'] = __('Microsoft Azure (legacy)');
|
||||||
$sub2['godmode/servers/discovery&wiz=cloud&mode=gcp']['text'] = __('Google Compute Platform');
|
$sub2['godmode/servers/discovery&wiz=cloud&mode=gcp']['text'] = __('Google Compute Platform (legacy)');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -45,7 +45,6 @@ if (!$id && !isset($snmp_community)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$snmp_versions['1'] = 'v. 1';
|
$snmp_versions['1'] = 'v. 1';
|
||||||
$snmp_versions['2'] = 'v. 2';
|
|
||||||
$snmp_versions['2c'] = 'v. 2c';
|
$snmp_versions['2c'] = 'v. 2c';
|
||||||
$snmp_versions['3'] = 'v. 3';
|
$snmp_versions['3'] = 'v. 3';
|
||||||
|
|
||||||
|
@ -261,8 +261,8 @@ $table->data['first_line'][] = html_print_label_input_block(
|
|||||||
'assign_group',
|
'assign_group',
|
||||||
$assign_group,
|
$assign_group,
|
||||||
'',
|
'',
|
||||||
'',
|
__('All'),
|
||||||
-1,
|
0,
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
|
@ -190,14 +190,21 @@ $output .= html_print_label_input_block(
|
|||||||
html_print_extended_select_for_time(
|
html_print_extended_select_for_time(
|
||||||
'period',
|
'period',
|
||||||
$period,
|
$period,
|
||||||
'',
|
'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||||
'',
|
'',
|
||||||
'0',
|
'0',
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
'w100p'
|
'w100p',
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
0,
|
||||||
|
null,
|
||||||
|
'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$output .= "</td><td class='datos2' width='50%'>";
|
$output .= "</td><td class='datos2' width='50%'>";
|
||||||
|
@ -1421,10 +1421,21 @@ $class = 'databox filters';
|
|||||||
html_print_extended_select_for_time(
|
html_print_extended_select_for_time(
|
||||||
'period',
|
'period',
|
||||||
$period,
|
$period,
|
||||||
'',
|
'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||||
'',
|
'',
|
||||||
'0',
|
'0',
|
||||||
10
|
10,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
0,
|
||||||
|
null,
|
||||||
|
'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')'
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
@ -1444,10 +1455,21 @@ $class = 'databox filters';
|
|||||||
html_print_extended_select_for_time(
|
html_print_extended_select_for_time(
|
||||||
'period_range',
|
'period_range',
|
||||||
$period_range,
|
$period_range,
|
||||||
'',
|
'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||||
'',
|
'',
|
||||||
'0',
|
'0',
|
||||||
10
|
10,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
0,
|
||||||
|
null,
|
||||||
|
'check_period_warning_manual(\'period_range\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')'
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
@ -1487,10 +1509,21 @@ $class = 'databox filters';
|
|||||||
html_print_extended_select_for_time(
|
html_print_extended_select_for_time(
|
||||||
'period1',
|
'period1',
|
||||||
$period_pg,
|
$period_pg,
|
||||||
'',
|
'check_period_warning(this)',
|
||||||
'',
|
'',
|
||||||
'0',
|
'0',
|
||||||
10
|
10,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
0,
|
||||||
|
null,
|
||||||
|
'check_period_warning_manual(\'period\')'
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
@ -1506,10 +1539,21 @@ $class = 'databox filters';
|
|||||||
html_print_extended_select_for_time(
|
html_print_extended_select_for_time(
|
||||||
'period2',
|
'period2',
|
||||||
$projection_period,
|
$projection_period,
|
||||||
'',
|
'check_period_warning(this)',
|
||||||
'',
|
'',
|
||||||
'0',
|
'0',
|
||||||
10
|
10,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
0,
|
||||||
|
null,
|
||||||
|
'check_period_warning_manual(\'period\')'
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
@ -3440,7 +3484,7 @@ $class = 'databox filters';
|
|||||||
html_print_extended_select_for_time(
|
html_print_extended_select_for_time(
|
||||||
'lapse',
|
'lapse',
|
||||||
$lapse,
|
$lapse,
|
||||||
'',
|
'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||||
__('None'),
|
__('None'),
|
||||||
'0',
|
'0',
|
||||||
10,
|
10,
|
||||||
@ -3448,7 +3492,13 @@ $class = 'databox filters';
|
|||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
!$lapse_calc
|
!$lapse_calc,
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
0,
|
||||||
|
null,
|
||||||
|
'check_period_warning_manual(\'lapse\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')'
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
|
@ -1280,8 +1280,7 @@ switch ($action) {
|
|||||||
|
|
||||||
$discovery_tasklist = new DiscoveryTaskList();
|
$discovery_tasklist = new DiscoveryTaskList();
|
||||||
$report_task_data = $discovery_tasklist->showListConsoleTask(true);
|
$report_task_data = $discovery_tasklist->showListConsoleTask(true);
|
||||||
|
if (is_array($report_task_data) === true || (strpos($report_task_data, 'class="nf"') === false && $report_task_data !== -1)) {
|
||||||
if (is_array($report_task_data) === true || strpos($report_task_data, 'class="nf"') === false) {
|
|
||||||
$task_table = '<div class="mrgn_top_15px white_box">';
|
$task_table = '<div class="mrgn_top_15px white_box">';
|
||||||
$task_table .= '<span class="white_table_graph_header">'.__('Report tasks');
|
$task_table .= '<span class="white_table_graph_header">'.__('Report tasks');
|
||||||
$task_table .= ui_print_help_tip(__('To schedule a report, do it from the editing view of each report.'), true);
|
$task_table .= ui_print_help_tip(__('To schedule a report, do it from the editing view of each report.'), true);
|
||||||
@ -1290,6 +1289,10 @@ switch ($action) {
|
|||||||
$task_table .= '</div></div>';
|
$task_table .= '</div></div>';
|
||||||
echo $task_table;
|
echo $task_table;
|
||||||
} else {
|
} else {
|
||||||
|
if ($report_task_data === -1) {
|
||||||
|
$report_task_data = '';
|
||||||
|
}
|
||||||
|
|
||||||
ui_print_info_message($report_task_data.__('To schedule a report, do it from the editing view of each report.'));
|
ui_print_info_message($report_task_data.__('To schedule a report, do it from the editing view of each report.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3883,7 +3886,7 @@ if ($resultOperationDB !== null) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'SLA':
|
case 'SLA':
|
||||||
$err .= 'You must enter some character in SLA limit field';
|
$err .= 'No changes found.';
|
||||||
default:
|
default:
|
||||||
$err .= '';
|
$err .= '';
|
||||||
break;
|
break;
|
||||||
@ -3892,7 +3895,7 @@ if ($resultOperationDB !== null) {
|
|||||||
ui_print_result_message(
|
ui_print_result_message(
|
||||||
$resultOperationDB,
|
$resultOperationDB,
|
||||||
__('Successfull action'),
|
__('Successfull action'),
|
||||||
__('Unsuccessful action<br><br>'.$err)
|
__($err)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ if ($layoutDatas === false) {
|
|||||||
$alternativeStyle = true;
|
$alternativeStyle = true;
|
||||||
|
|
||||||
$parents = visual_map_get_items_parents($idVisualConsole);
|
$parents = visual_map_get_items_parents($idVisualConsole);
|
||||||
|
$x = 0;
|
||||||
foreach ($layoutDatas as $layoutData) {
|
foreach ($layoutDatas as $layoutData) {
|
||||||
$idLayoutData = $layoutData['id'];
|
$idLayoutData = $layoutData['id'];
|
||||||
|
|
||||||
@ -537,7 +537,8 @@ foreach ($layoutDatas as $layoutData) {
|
|||||||
|
|
||||||
$table->data[($i + 1)][5] = '';
|
$table->data[($i + 1)][5] = '';
|
||||||
$table->data[($i + 1)][5] .= html_print_checkbox('multiple_delete_items', $idLayoutData, false, true);
|
$table->data[($i + 1)][5] .= html_print_checkbox('multiple_delete_items', $idLayoutData, false, true);
|
||||||
$table->data[($i + 1)][5] .= '<a href="'.$url_delete.'" '.'onclick="javascript: if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/delete.svg', true, ['class' => 'main_menu_icon invert_filter']).'</a>';
|
$table->data[($i + 1)][5] .= '<a href="'.$url_delete.'"onclick="javascript: if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/delete.svg', true, ['class' => 'main_menu_icon invert_filter']).'</a>';
|
||||||
|
$table->data[($i + 1)][5] .= html_print_input_hidden('updated_'.$idLayoutData, '0', true);
|
||||||
|
|
||||||
// Second row
|
// Second row
|
||||||
$table->data[($i + 2)]['icon'] = '';
|
$table->data[($i + 2)]['icon'] = '';
|
||||||
@ -778,6 +779,12 @@ foreach ($layoutDatas as $layoutData) {
|
|||||||
$alternativeStyle = !$alternativeStyle;
|
$alternativeStyle = !$alternativeStyle;
|
||||||
|
|
||||||
$i = ($i + 3);
|
$i = ($i + 3);
|
||||||
|
$x++;
|
||||||
|
}
|
||||||
|
|
||||||
|
$x = (($x * 13) + 14);
|
||||||
|
if ($x > ini_get('max_input_vars')) {
|
||||||
|
ui_print_warning_message(__('You have to change the <b>"max_input_vars"</b> and set bigger value on <b>php.ini</b> for update, there is too much elements to update'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$pure = get_parameter('pure', 0);
|
$pure = get_parameter('pure', 0);
|
||||||
@ -888,6 +895,16 @@ ui_require_javascript_file('tinymce', 'vendor/tinymce/tinymce/');
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('select[id^="image_"], input[name^="width_"], input[name^="height"], input[name^="left_"], input[name^="top_"], select[id^="parent_"], input[id^="agent_"], select[id^="module_"]').change(function(){
|
||||||
|
var id = $(this).attr('id').split('_')[1];
|
||||||
|
$('#hidden-updated_'+id).val('1');
|
||||||
|
});
|
||||||
|
|
||||||
|
$('select[id^="map_linked"]').change(function(){
|
||||||
|
var id = $(this).attr('id').split('_')[2];
|
||||||
|
$('#hidden-updated_'+id).val('1');
|
||||||
|
});
|
||||||
|
|
||||||
defineTinyMCE('#tinyMCE_editor');
|
defineTinyMCE('#tinyMCE_editor');
|
||||||
|
|
||||||
$("#dialog_label_editor").hide ()
|
$("#dialog_label_editor").hide ()
|
||||||
|
@ -418,7 +418,6 @@ switch ($activeTab) {
|
|||||||
case 'update':
|
case 'update':
|
||||||
// Update background
|
// Update background
|
||||||
$background = get_parameter('background');
|
$background = get_parameter('background');
|
||||||
$background_color = get_parameter('background_color');
|
|
||||||
$width = get_parameter('width');
|
$width = get_parameter('width');
|
||||||
$height = get_parameter('height');
|
$height = get_parameter('height');
|
||||||
|
|
||||||
@ -434,7 +433,6 @@ switch ($activeTab) {
|
|||||||
'tlayout',
|
'tlayout',
|
||||||
[
|
[
|
||||||
'background' => $background,
|
'background' => $background,
|
||||||
'background_color' => $background_color,
|
|
||||||
'width' => $width,
|
'width' => $width,
|
||||||
'height' => $height,
|
'height' => $height,
|
||||||
],
|
],
|
||||||
@ -463,6 +461,8 @@ switch ($activeTab) {
|
|||||||
|
|
||||||
foreach ($idsElements as $idElement) {
|
foreach ($idsElements as $idElement) {
|
||||||
$id = $idElement['id'];
|
$id = $idElement['id'];
|
||||||
|
$update = get_parameter('updated_'.$id, 0);
|
||||||
|
if ($update === '1') {
|
||||||
$values = [];
|
$values = [];
|
||||||
$values['label'] = get_parameter('label_'.$id, '');
|
$values['label'] = get_parameter('label_'.$id, '');
|
||||||
$values['image'] = get_parameter('image_'.$id, '');
|
$values['image'] = get_parameter('image_'.$id, '');
|
||||||
@ -520,6 +520,7 @@ switch ($activeTab) {
|
|||||||
|
|
||||||
db_process_sql_update('tlayout_data', $values, ['id' => $id]);
|
db_process_sql_update('tlayout_data', $values, ['id' => $id]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'delete':
|
case 'delete':
|
||||||
@ -554,6 +555,7 @@ switch ($activeTab) {
|
|||||||
$type = (int) get_parameter('type', STATIC_GRAPH);
|
$type = (int) get_parameter('type', STATIC_GRAPH);
|
||||||
$image = get_parameter('image');
|
$image = get_parameter('image');
|
||||||
$range = (int) get_parameter('range', 50);
|
$range = (int) get_parameter('range', 50);
|
||||||
|
$range_vertical = (int) get_parameter('range_vertical', 50);
|
||||||
$width = (int) get_parameter('width', 0);
|
$width = (int) get_parameter('width', 0);
|
||||||
$height = (int) get_parameter('height', 0);
|
$height = (int) get_parameter('height', 0);
|
||||||
$period = (int) get_parameter('period', 0);
|
$period = (int) get_parameter('period', 0);
|
||||||
@ -566,6 +568,9 @@ switch ($activeTab) {
|
|||||||
$label_type = get_parameter('label_type', 'agent_module');
|
$label_type = get_parameter('label_type', 'agent_module');
|
||||||
$enable_link = get_parameter('enable_link', 'enable_link');
|
$enable_link = get_parameter('enable_link', 'enable_link');
|
||||||
$show_on_top = get_parameter('show_on_top', 0);
|
$show_on_top = get_parameter('show_on_top', 0);
|
||||||
|
$pos_x = get_parameter('pos_x', 0);
|
||||||
|
$pos_y = get_parameter('pos_y', 0);
|
||||||
|
$max_elements_row = (int) get_parameter('max_elements_row', 0);
|
||||||
|
|
||||||
// This var switch between creation of items, item_per_agent = 0 => item per module; item_per_agent <> 0 => item per agent
|
// This var switch between creation of items, item_per_agent = 0 => item per module; item_per_agent <> 0 => item per agent
|
||||||
$item_per_agent = get_parameter('item_per_agent', 0);
|
$item_per_agent = get_parameter('item_per_agent', 0);
|
||||||
@ -610,6 +615,7 @@ switch ($activeTab) {
|
|||||||
$image,
|
$image,
|
||||||
$idVisualConsole,
|
$idVisualConsole,
|
||||||
$range,
|
$range,
|
||||||
|
$range_vertical,
|
||||||
$width,
|
$width,
|
||||||
$height,
|
$height,
|
||||||
$period,
|
$period,
|
||||||
@ -625,7 +631,10 @@ switch ($activeTab) {
|
|||||||
$kind_relationship,
|
$kind_relationship,
|
||||||
$item_in_the_map,
|
$item_in_the_map,
|
||||||
$fontf,
|
$fontf,
|
||||||
$fonts
|
$fonts,
|
||||||
|
$pos_x,
|
||||||
|
$pos_y,
|
||||||
|
$max_elements_row
|
||||||
);
|
);
|
||||||
|
|
||||||
$statusProcessInDB = [
|
$statusProcessInDB = [
|
||||||
@ -667,6 +676,7 @@ switch ($activeTab) {
|
|||||||
$image,
|
$image,
|
||||||
$idVisualConsole,
|
$idVisualConsole,
|
||||||
$range,
|
$range,
|
||||||
|
$range_vertical,
|
||||||
$width,
|
$width,
|
||||||
$height,
|
$height,
|
||||||
$period,
|
$period,
|
||||||
@ -682,7 +692,10 @@ switch ($activeTab) {
|
|||||||
$kind_relationship,
|
$kind_relationship,
|
||||||
$item_in_the_map,
|
$item_in_the_map,
|
||||||
$fontf,
|
$fontf,
|
||||||
$fonts
|
$fonts,
|
||||||
|
$pos_x,
|
||||||
|
$pos_y,
|
||||||
|
$max_elements_row
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$id_modules = [];
|
$id_modules = [];
|
||||||
@ -721,6 +734,7 @@ switch ($activeTab) {
|
|||||||
$image,
|
$image,
|
||||||
$idVisualConsole,
|
$idVisualConsole,
|
||||||
$range,
|
$range,
|
||||||
|
$range_vertical,
|
||||||
$width,
|
$width,
|
||||||
$height,
|
$height,
|
||||||
$period,
|
$period,
|
||||||
@ -736,7 +750,10 @@ switch ($activeTab) {
|
|||||||
$kind_relationship,
|
$kind_relationship,
|
||||||
$item_in_the_map,
|
$item_in_the_map,
|
||||||
$fontf,
|
$fontf,
|
||||||
$fonts
|
$fonts,
|
||||||
|
$pos_x,
|
||||||
|
$pos_y,
|
||||||
|
$max_elements_row
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -144,22 +144,28 @@ $table->data['all_0'][0] = html_print_label_input_block(
|
|||||||
|
|
||||||
|
|
||||||
$table->rowstyle['staticgraph'] = 'display: none;';
|
$table->rowstyle['staticgraph'] = 'display: none;';
|
||||||
|
$table->colspan['staticgraph'][0] = 2;
|
||||||
$table->data['staticgraph'][0] = html_print_label_input_block(
|
$table->data['staticgraph'][0] = html_print_label_input_block(
|
||||||
__('Image'),
|
__('Image'),
|
||||||
html_print_select(
|
'<div class="flex">'.html_print_select(
|
||||||
$images_list,
|
$images_list,
|
||||||
'image',
|
'image',
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
true
|
true,
|
||||||
)
|
false,
|
||||||
|
true,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
'width: 49%'
|
||||||
|
).'<span id="image_prev" class="mrgn_lft_10px mrgn_top-10px"><img src="'.$config['homeurl'].'/images/console/icons/appliance_ok.png"></span></div>'
|
||||||
);
|
);
|
||||||
|
|
||||||
$table->rowstyle['all_1'] = 'display: none;';
|
$table->rowstyle['all_1'] = 'display: none;';
|
||||||
$table->data['all_1'][0] = html_print_label_input_block(
|
$table->data['all_1'][0] = html_print_label_input_block(
|
||||||
__('Range between elements (px)'),
|
__('Horizontal range between elements (px)'),
|
||||||
html_print_input_text(
|
html_print_input_text(
|
||||||
'range',
|
'range',
|
||||||
50,
|
50,
|
||||||
@ -170,6 +176,18 @@ $table->data['all_1'][0] = html_print_label_input_block(
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$table->data['all_1'][1] = html_print_label_input_block(
|
||||||
|
__('Vertical range between elements (px)'),
|
||||||
|
html_print_input_text(
|
||||||
|
'range_vertical',
|
||||||
|
50,
|
||||||
|
'',
|
||||||
|
5,
|
||||||
|
5,
|
||||||
|
true
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
$input_size = __('Width').': ';
|
$input_size = __('Width').': ';
|
||||||
$input_size .= html_print_input_text('width', 0, '', 5, 5, true);
|
$input_size .= html_print_input_text('width', 0, '', 5, 5, true);
|
||||||
$input_size .= __('Height').': ';
|
$input_size .= __('Height').': ';
|
||||||
@ -425,6 +443,16 @@ if (is_metaconsole() === false) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$table->data['all_4_01'][0] = html_print_label_input_block(
|
||||||
|
__('Filter agents'),
|
||||||
|
html_print_input_text('filter_agents', '', '', false, 255, true)
|
||||||
|
);
|
||||||
|
|
||||||
|
$table->data['all_4_01'][1] = html_print_label_input_block(
|
||||||
|
__('Filter modules'),
|
||||||
|
html_print_input_text('filter_modules', '', '', false, 255, true)
|
||||||
|
);
|
||||||
|
|
||||||
$table->rowstyle['all_4'] = 'display: none;';
|
$table->rowstyle['all_4'] = 'display: none;';
|
||||||
$table->data['all_4'][0] = html_print_label_input_block(
|
$table->data['all_4'][0] = html_print_label_input_block(
|
||||||
__('Agents').ui_print_help_tip(
|
__('Agents').ui_print_help_tip(
|
||||||
@ -549,6 +577,16 @@ $table->data['all_8'][1] = html_print_label_input_block(
|
|||||||
).'</span>'
|
).'</span>'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$table->data['all_10'][0] = html_print_label_input_block(
|
||||||
|
__('Max. elements for row'),
|
||||||
|
html_print_input_text('max_elements_row', 0, '', false, 255, true)
|
||||||
|
);
|
||||||
|
|
||||||
|
$table->data['all_10'][1] = html_print_label_input_block(
|
||||||
|
__('Position'),
|
||||||
|
'<div class="flex_center"><span class="mrgn_right_10px">X</span>'.html_print_input_text('pos_x', 0, '', false, 255, true, false, false, '', 'w50p').'<span class="margin-lr-10">Y</span>'.html_print_input_text('pos_y', 0, '', false, 255, true, false, false, '', 'w50p').'</div>'
|
||||||
|
);
|
||||||
|
|
||||||
if (is_metaconsole() === true) {
|
if (is_metaconsole() === true) {
|
||||||
$pure = get_parameter('pure', 0);
|
$pure = get_parameter('pure', 0);
|
||||||
|
|
||||||
@ -831,6 +869,44 @@ function item_per_agent_change(itemPerAgent) {
|
|||||||
function metaconsole_init() {
|
function metaconsole_init() {
|
||||||
$("#groups").change();
|
$("#groups").change();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$('#text-filter_agents').on('keyup',function(){
|
||||||
|
if ($(this).val() !== ''){
|
||||||
|
findInSelect('id_agents',$(this).val());
|
||||||
|
} else {
|
||||||
|
$('#id_agents option').each(function(){
|
||||||
|
$(this).removeClass('invisible');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#text-filter_modules').on('keyup',function(){
|
||||||
|
if ($(this).val() !== ''){
|
||||||
|
findInSelect('module',$(this).val());
|
||||||
|
} else {
|
||||||
|
$('#module option').each(function(){
|
||||||
|
$(this).removeClass('invisible');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function findInSelect(selectid, find){
|
||||||
|
var select = $('#'+selectid+' option');
|
||||||
|
select.each(function(){
|
||||||
|
var regex = new RegExp(find, "gi");
|
||||||
|
if ($(this).html().match(regex) === null) {
|
||||||
|
$(this).addClass('invisible');
|
||||||
|
} else {
|
||||||
|
$(this).removeClass('invisible');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#image').on('change', function(){
|
||||||
|
var img = $(this).val();
|
||||||
|
$('#image_prev').html('<img src="<?php echo $config['homeurl']; ?>/images/console/icons/'+img+'.png">');
|
||||||
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
select[name='kind_relationship'] option[disabled='disabled'] {
|
select[name='kind_relationship'] option[disabled='disabled'] {
|
||||||
|
@ -24,6 +24,14 @@ if (! check_acl($config['id_user'], 0, 'AR')
|
|||||||
|
|
||||||
ui_require_css_file('discovery');
|
ui_require_css_file('discovery');
|
||||||
|
|
||||||
|
ui_require_javascript_file('pandora_alerts');
|
||||||
|
ui_include_time_picker();
|
||||||
|
ui_require_jquery_file('ui.datepicker-'.get_user_language(), 'include/javascript/i18n/');
|
||||||
|
ui_require_javascript_file('tinymce', 'vendor/tinymce/tinymce/');
|
||||||
|
ui_require_css_file('main.min', 'include/javascript/fullcalendar/');
|
||||||
|
ui_require_javascript_file('main.min', 'include/javascript/fullcalendar/');
|
||||||
|
ui_require_javascript_file('pandora_fullcalendar');
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mask class names.
|
* Mask class names.
|
||||||
@ -204,3 +212,115 @@ if ($classname_selected === null) {
|
|||||||
|
|
||||||
Wizard::printBigButtonsList($wiz_data);
|
Wizard::printBigButtonsList($wiz_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$is_management_allowed = is_management_allowed();
|
||||||
|
$task_id = get_parameter('task', '');
|
||||||
|
if ($task_id !== '') {
|
||||||
|
$task = db_get_row_filter(
|
||||||
|
'tuser_task_scheduled',
|
||||||
|
['id' => $task_id]
|
||||||
|
);
|
||||||
|
$args = unserialize($task['args']);
|
||||||
|
$event_calendar = io_safe_output($args['weekly_schedule']);
|
||||||
|
} else {
|
||||||
|
$event_calendar = '{"monday":[{"start":"00:00:00","end":"00:00:00"}],"tuesday":[{"start":"00:00:00","end":"00:00:00"}],"wednesday":[{"start":"00:00:00","end":"00:00:00"}],"thursday":[{"start":"00:00:00","end":"00:00:00"}],"friday":[{"start":"00:00:00","end":"00:00:00"}],"saturday":[{"start":"00:00:00","end":"00:00:00"}],"sunday":[{"start":"00:00:00","end":"00:00:00"}]}';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready (function () {
|
||||||
|
$("#table-new-job-3").hide();
|
||||||
|
var edit = '<?php echo $task_id; ?>';
|
||||||
|
if (edit != '') {
|
||||||
|
exec_calendar();
|
||||||
|
}
|
||||||
|
|
||||||
|
$("#scheduled").change(exec_calendar);
|
||||||
|
|
||||||
|
function exec_calendar() {
|
||||||
|
if ($("#scheduled").val() == "weekly") {
|
||||||
|
var is_management_allowed = parseInt('<?php echo (int) $is_management_allowed; ?>');
|
||||||
|
var eventsBBDD = '<?php echo $event_calendar; ?>';
|
||||||
|
var events = loadEventBBDD(eventsBBDD);
|
||||||
|
var calendarEl = document.getElementById('calendar_map');
|
||||||
|
|
||||||
|
var options = {
|
||||||
|
contentHeight: "auto",
|
||||||
|
headerToolbar: {
|
||||||
|
left: "",
|
||||||
|
center: "",
|
||||||
|
right: is_management_allowed === 0 ? '' : "timeGridWeek,dayGridWeek"
|
||||||
|
},
|
||||||
|
buttonText: {
|
||||||
|
dayGridWeek: '<?php echo __('Simple'); ?>',
|
||||||
|
timeGridWeek: '<?php echo __('Detailed'); ?>'
|
||||||
|
},
|
||||||
|
dayHeaderFormat: { weekday: "short" },
|
||||||
|
initialView: "dayGridWeek",
|
||||||
|
navLinks: false,
|
||||||
|
selectable: true,
|
||||||
|
selectMirror: true,
|
||||||
|
slotDuration: "01:00:00",
|
||||||
|
slotLabelInterval: "02:00:00",
|
||||||
|
snapDuration: "01:00:00",
|
||||||
|
slotMinTime: "00:00:00",
|
||||||
|
slotMaxTime: "24:00:00",
|
||||||
|
scrollTime: "01:00:00",
|
||||||
|
locale: "en-GB",
|
||||||
|
firstDay: 1,
|
||||||
|
eventTimeFormat: {
|
||||||
|
hour: "numeric",
|
||||||
|
minute: "2-digit",
|
||||||
|
hour12: false
|
||||||
|
},
|
||||||
|
eventColor: "#82b92e",
|
||||||
|
editable: is_management_allowed === 0 ? false : true,
|
||||||
|
dayMaxEvents: 3,
|
||||||
|
dayPopoverFormat: { weekday: "long" },
|
||||||
|
defaultAllDay: false,
|
||||||
|
displayEventTime: true,
|
||||||
|
displayEventEnd: true,
|
||||||
|
selectOverlap: false,
|
||||||
|
eventOverlap: false,
|
||||||
|
allDaySlot: true,
|
||||||
|
droppable: false,
|
||||||
|
select: is_management_allowed === 0 ? false : select_alert_template,
|
||||||
|
selectAllow: is_management_allowed === 0 ? false : selectAllow_alert_template,
|
||||||
|
eventAllow: is_management_allowed === 0 ? false : eventAllow_alert_template,
|
||||||
|
eventDrop: is_management_allowed === 0 ? false : eventDrop_alert_template,
|
||||||
|
eventDragStop: is_management_allowed === 0 ? false : eventDragStop_alert_template,
|
||||||
|
eventResize: is_management_allowed === 0 ? false : eventResize_alert_template,
|
||||||
|
eventMouseEnter: is_management_allowed === 0 ? false : eventMouseEnter_alert_template,
|
||||||
|
eventMouseLeave: is_management_allowed === 0 ? false : eventMouseLeave_alert_template,
|
||||||
|
eventClick: is_management_allowed === 0 ? false : eventClick_alert_template,
|
||||||
|
};
|
||||||
|
|
||||||
|
var settings = {
|
||||||
|
timeFormat: '<?php echo TIME_FORMAT_JS; ?>',
|
||||||
|
timeOnlyTitle: '<?php echo __('Choose time'); ?>',
|
||||||
|
timeText: '<?php echo __('Time'); ?>',
|
||||||
|
hourText: '<?php echo __('Hour'); ?>',
|
||||||
|
minuteText: '<?php echo __('Minute'); ?>',
|
||||||
|
secondText: '<?php echo __('Second'); ?>',
|
||||||
|
currentText: '<?php echo __('Now'); ?>',
|
||||||
|
closeText: '<?php echo __('Close'); ?>',
|
||||||
|
url: '<?php echo ui_get_full_url('ajax.php', false, false, false); ?>',
|
||||||
|
removeText: '<?php echo __('Remove'); ?>',
|
||||||
|
userLanguage: '<?php echo get_user_language(); ?>',
|
||||||
|
loadingText: '<?php echo __('Loading, this operation might take several minutes...'); ?>',
|
||||||
|
tooltipText: '<?php echo __('Drag out to remove'); ?>',
|
||||||
|
alert: '<?php echo __('Alert'); ?>'
|
||||||
|
}
|
||||||
|
|
||||||
|
var calendar = fullCalendarPandora(calendarEl, options, settings, events);
|
||||||
|
calendar.render();
|
||||||
|
|
||||||
|
$("#table-new-job-3").show();
|
||||||
|
$('.fc-event-title').hide();
|
||||||
|
$(".fc-button-active" ).trigger( "click" );
|
||||||
|
} else {
|
||||||
|
$("#calendar_map").html();
|
||||||
|
$("#table-new-job-3").hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
@ -45,9 +45,120 @@ if (! check_acl($config['id_user'], 0, 'AW')) {
|
|||||||
|
|
||||||
if (isset($_GET['server']) === true) {
|
if (isset($_GET['server']) === true) {
|
||||||
$id_server = get_parameter_get('server');
|
$id_server = get_parameter_get('server');
|
||||||
|
$title = __('Update').' ';
|
||||||
|
$sql = sprintf('SELECT name, ip_address, description, server_type, exec_proxy, port FROM tserver WHERE id_server = %d', $id_server);
|
||||||
|
$row = db_get_row_sql($sql);
|
||||||
|
|
||||||
|
switch ($row['server_type']) {
|
||||||
|
case SERVER_TYPE_DATA:
|
||||||
|
$title .= __('Data server').' ID: '.$id_server;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SERVER_TYPE_NETWORK:
|
||||||
|
$title .= __('Network server').' ID: '.$id_server;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SERVER_TYPE_SNMP:
|
||||||
|
$title .= __('SNMP Trap server').' ID: '.$id_server;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SERVER_TYPE_DISCOVERY:
|
||||||
|
$title .= __('Discovery server').' ID: '.$id_server;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SERVER_TYPE_PLUGIN:
|
||||||
|
$title .= __('Plugin server').' ID: '.$id_server;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SERVER_TYPE_PREDICTION:
|
||||||
|
$title .= __('Prediction server').' ID: '.$id_server;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SERVER_TYPE_WMI:
|
||||||
|
$title .= __('WMI server').' ID: '.$id_server;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SERVER_TYPE_EXPORT:
|
||||||
|
$title .= __('Export server').' ID: '.$id_server;
|
||||||
|
$id_modulo = 0;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SERVER_TYPE_INVENTORY:
|
||||||
|
$title .= __('Inventory server').' ID: '.$id_server;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SERVER_TYPE_WEB:
|
||||||
|
$title .= __('Web server').' ID: '.$id_server;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SERVER_TYPE_EVENT:
|
||||||
|
$title .= __('Event server').' ID: '.$id_server;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SERVER_TYPE_CORRELATION:
|
||||||
|
$title .= __('Correlation server').' ID: '.$id_server;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SERVER_TYPE_ENTERPRISE_ICMP:
|
||||||
|
$title .= __('Enterprise ICMP server').' ID: '.$id_server;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SERVER_TYPE_ENTERPRISE_SNMP:
|
||||||
|
$title .= __('Enterprise SNMP server').' ID: '.$id_server;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SERVER_TYPE_ENTERPRISE_SATELLITE:
|
||||||
|
$title .= __('Enterprise Satellite server').' ID: '.$id_server;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SERVER_TYPE_ENTERPRISE_TRANSACTIONAL:
|
||||||
|
$title .= __('Enterprise Transactional server').' ID: '.$id_server;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SERVER_TYPE_MAINFRAME:
|
||||||
|
$title .= __('Mainframe server').' ID: '.$id_server;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SERVER_TYPE_SYNC:
|
||||||
|
$title .= __('Sync server').' ID: '.$id_server;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SERVER_TYPE_WUX:
|
||||||
|
$title .= __('Wux server').' ID: '.$id_server;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SERVER_TYPE_SYSLOG:
|
||||||
|
$title .= __('Log server').' ID: '.$id_server;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SERVER_TYPE_NCM:
|
||||||
|
$title .= __('NCM server').' ID: '.$id_server;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SERVER_TYPE_AUTOPROVISION:
|
||||||
|
$title .= __('Autoprovision server').' ID: '.$id_server;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SERVER_TYPE_MIGRATION:
|
||||||
|
$title .= __('Migration server').' ID: '.$id_server;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SERVER_TYPE_ALERT:
|
||||||
|
$title .= __('Alert server').' ID: '.$id_server;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SERVER_TYPE_NETFLOW:
|
||||||
|
$title .= __('Netflow server').' ID: '.$id_server;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
$title = __('Update server').' ID: '.$id_server;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
// Headers.
|
// Headers.
|
||||||
ui_print_standard_header(
|
ui_print_standard_header(
|
||||||
__('Update Server'),
|
$title,
|
||||||
'images/gm_servers.png',
|
'images/gm_servers.png',
|
||||||
false,
|
false,
|
||||||
'',
|
'',
|
||||||
@ -65,8 +176,6 @@ if (isset($_GET['server']) === true) {
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
$sql = sprintf('SELECT name, ip_address, description, server_type, exec_proxy, port FROM tserver WHERE id_server = %d', $id_server);
|
|
||||||
$row = db_get_row_sql($sql);
|
|
||||||
echo '<form name="servers" method="POST" action="index.php?sec=gservers&sec2=godmode/servers/modificar_server&update=1">';
|
echo '<form name="servers" method="POST" action="index.php?sec=gservers&sec2=godmode/servers/modificar_server&update=1">';
|
||||||
html_print_input_hidden('server', $id_server);
|
html_print_input_hidden('server', $id_server);
|
||||||
|
|
||||||
|
71
pandora_console/godmode/servers/pending_alerts_list.php
Normal file
71
pandora_console/godmode/servers/pending_alerts_list.php
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Pending alerts list view.
|
||||||
|
*
|
||||||
|
* @category Pending alerts list
|
||||||
|
* @package Pandora FMS
|
||||||
|
* @subpackage Opensource
|
||||||
|
* @version 1.0.0
|
||||||
|
* @license See below
|
||||||
|
*
|
||||||
|
* ______ ___ _______ _______ ________
|
||||||
|
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||||
|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||||
|
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||||
|
*
|
||||||
|
* ============================================================================
|
||||||
|
* Copyright (c) 2005-2023 Pandora FMS
|
||||||
|
* Please see https://pandorafms.com/community/ 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;
|
||||||
|
|
||||||
|
require_once $config['homedir'].'/include/class/AlertsList.class.php';
|
||||||
|
|
||||||
|
$ajaxPage = 'godmode/servers/pending_alerts_list';
|
||||||
|
|
||||||
|
// Control call flow.
|
||||||
|
try {
|
||||||
|
// User access and validation is being processed on class constructor.
|
||||||
|
$adw = new AlertsList($ajaxPage);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
if (is_ajax()) {
|
||||||
|
echo json_encode(['error' => '[PendingAlertsList]'.$e->getMessage() ]);
|
||||||
|
exit;
|
||||||
|
} else {
|
||||||
|
echo '[PendingAlertsList]'.$e->getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Stop this execution, but continue 'globally'.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// AJAX controller.
|
||||||
|
if (is_ajax()) {
|
||||||
|
$method = get_parameter('method');
|
||||||
|
|
||||||
|
if (method_exists($adw, $method) === true) {
|
||||||
|
if ($adw->ajaxMethod($method) === true) {
|
||||||
|
$adw->{$method}();
|
||||||
|
} else {
|
||||||
|
$adw->error('Unavailable method.');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$adw->error('Method not found. ['.$method.']');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Stop any execution.
|
||||||
|
exit;
|
||||||
|
} else {
|
||||||
|
// Run.
|
||||||
|
$adw->run();
|
||||||
|
}
|
@ -28,6 +28,7 @@
|
|||||||
|
|
||||||
// Begin.
|
// Begin.
|
||||||
require_once 'include/functions_clippy.php';
|
require_once 'include/functions_clippy.php';
|
||||||
|
require_once 'pending_alerts_list.php';
|
||||||
|
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
@ -247,6 +248,19 @@ foreach ($servers as $server) {
|
|||||||
$data[8] .= '</a>';
|
$data[8] .= '</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($server['type'] === 'event' && (bool) check_acl($config['id_user'], 0, 'LM') === true) {
|
||||||
|
$data[8] .= '<a class="open-alerts-list-modal" href="">';
|
||||||
|
$data[8] .= html_print_image(
|
||||||
|
'images/alert@svg.svg',
|
||||||
|
true,
|
||||||
|
[
|
||||||
|
'title' => __('Pending alerts list'),
|
||||||
|
'class' => 'main_menu_icon invert_filter',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
$data[8] .= '</a>';
|
||||||
|
}
|
||||||
|
|
||||||
$data[8] .= '<a href="'.ui_get_full_url('index.php?sec=gservers&sec2=godmode/servers/modificar_server&server='.$server['id_server']).'">';
|
$data[8] .= '<a href="'.ui_get_full_url('index.php?sec=gservers&sec2=godmode/servers/modificar_server&server='.$server['id_server']).'">';
|
||||||
$data[8] .= html_print_image(
|
$data[8] .= html_print_image(
|
||||||
'images/edit.svg',
|
'images/edit.svg',
|
||||||
|
@ -189,7 +189,8 @@ $table->data[1][1] = html_print_label_input_block(
|
|||||||
255,
|
255,
|
||||||
true,
|
true,
|
||||||
true
|
true
|
||||||
).' '.($license['limit_mode'] == 0 ? __('agents') : __('modules'))
|
)
|
||||||
|
// .' '.($license['limit_mode'] == 0 ? __('agents') : __('modules'))
|
||||||
);
|
);
|
||||||
|
|
||||||
$table->data[2][0] = html_print_label_input_block(
|
$table->data[2][0] = html_print_label_input_block(
|
||||||
@ -202,7 +203,8 @@ $table->data[2][0] = html_print_label_input_block(
|
|||||||
255,
|
255,
|
||||||
true,
|
true,
|
||||||
true
|
true
|
||||||
).' '.($license['limit_mode'] == 0 ? __('agents') : __('modules'))
|
)
|
||||||
|
// .' '.($license['limit_mode'] == 0 ? __('agents') : __('modules'))
|
||||||
);
|
);
|
||||||
|
|
||||||
$table->data[2][1] = html_print_label_input_block(
|
$table->data[2][1] = html_print_label_input_block(
|
||||||
@ -215,7 +217,8 @@ $table->data[2][1] = html_print_label_input_block(
|
|||||||
255,
|
255,
|
||||||
true,
|
true,
|
||||||
true
|
true
|
||||||
).' '.($license['limit_mode'] == 0 ? __('agents') : __('modules'))
|
)
|
||||||
|
// .' '.($license['limit_mode'] == 0 ? __('agents') : __('modules'))
|
||||||
);
|
);
|
||||||
|
|
||||||
$table->data[3][0] = html_print_label_input_block(
|
$table->data[3][0] = html_print_label_input_block(
|
||||||
@ -228,7 +231,8 @@ $table->data[3][0] = html_print_label_input_block(
|
|||||||
255,
|
255,
|
||||||
true,
|
true,
|
||||||
true
|
true
|
||||||
).' '.($license['limit_mode'] == 0 ? __('agents') : __('modules'))
|
)
|
||||||
|
// .' '.($license['limit_mode'] == 0 ? __('agents') : __('modules'))
|
||||||
);
|
);
|
||||||
|
|
||||||
$table->data[3][1] = html_print_label_input_block(
|
$table->data[3][1] = html_print_label_input_block(
|
||||||
@ -325,6 +329,18 @@ if (enterprise_installed() || defined('DESTDIR')) {
|
|||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
$buttons .= html_print_button(
|
||||||
|
__('Show agent usage details'),
|
||||||
|
'agents_details',
|
||||||
|
false,
|
||||||
|
'show_agents_details_dialog()',
|
||||||
|
[
|
||||||
|
'fixed_id' => 'button-agents_details',
|
||||||
|
'icon' => 'next',
|
||||||
|
'mode' => 'secondary',
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
html_print_action_buttons(
|
html_print_action_buttons(
|
||||||
$buttons
|
$buttons
|
||||||
@ -369,3 +385,80 @@ if (enterprise_hook('print_activate_licence_dialog') == ENTERPRISE_NOT_HOOK) {
|
|||||||
echo '</ul>';
|
echo '</ul>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$table = new stdClass();
|
||||||
|
$table->width = '100%';
|
||||||
|
$table->class = 'databox filter-table-adv';
|
||||||
|
$table->size = [];
|
||||||
|
$table->size[0] = '50%';
|
||||||
|
$table->size[1] = '50%';
|
||||||
|
$table->data = [];
|
||||||
|
$table->colspan = [];
|
||||||
|
|
||||||
|
$table->data[0][0] = html_print_label_input_block(
|
||||||
|
__('Total Agents'),
|
||||||
|
html_print_input_text(
|
||||||
|
'total_agents',
|
||||||
|
$total_agents,
|
||||||
|
'',
|
||||||
|
30,
|
||||||
|
255,
|
||||||
|
true,
|
||||||
|
true
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$table->data[0][1] = html_print_label_input_block(
|
||||||
|
__('Network & other devices'),
|
||||||
|
html_print_input_text(
|
||||||
|
'type_network',
|
||||||
|
$network_others,
|
||||||
|
'',
|
||||||
|
30,
|
||||||
|
255,
|
||||||
|
true,
|
||||||
|
true
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$table->data[1][0] = html_print_label_input_block(
|
||||||
|
__('Workstations'),
|
||||||
|
html_print_input_text(
|
||||||
|
'type_workstation',
|
||||||
|
$workstations,
|
||||||
|
'',
|
||||||
|
30,
|
||||||
|
255,
|
||||||
|
true,
|
||||||
|
true
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$table->data[1][1] = html_print_label_input_block(
|
||||||
|
__('Servers'),
|
||||||
|
html_print_input_text(
|
||||||
|
'type_server',
|
||||||
|
$servers,
|
||||||
|
'',
|
||||||
|
30,
|
||||||
|
255,
|
||||||
|
true,
|
||||||
|
true
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$table->data[2][0] = html_print_label_input_block(
|
||||||
|
__('Show disabled agents'),
|
||||||
|
html_print_checkbox_switch(
|
||||||
|
'show_disabled_agents',
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
'show_disabled_agents()'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
echo '<div id="agents_details_dialog" class="invisible left" title="'.__('Agents usage details').'">';
|
||||||
|
html_print_table($table);
|
||||||
|
echo '</div>';
|
@ -210,7 +210,10 @@ if ((isset($_GET['form_add'])) or (isset($_GET['form_edit']))) {
|
|||||||
echo '<td class="'.$tdcolor.' table_action_buttons"><a href="index.php?sec=gsetup&sec2=godmode/setup/links&id_link='.$row['id_link'].'&borrar='.$row['id_link'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image(
|
echo '<td class="'.$tdcolor.' table_action_buttons"><a href="index.php?sec=gsetup&sec2=godmode/setup/links&id_link='.$row['id_link'].'&borrar='.$row['id_link'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image(
|
||||||
'images/delete.svg',
|
'images/delete.svg',
|
||||||
true,
|
true,
|
||||||
['class' => 'invert_filter']
|
[
|
||||||
|
'class' => 'invert_filter main_menu_icon',
|
||||||
|
'title' => __('Delete'),
|
||||||
|
]
|
||||||
).'</a></td></tr>';
|
).'</a></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -419,6 +419,9 @@ ui_require_jquery_file('ui.datepicker-'.get_user_language(), 'include/javascript
|
|||||||
// Include tiny for wysiwyg editor.
|
// Include tiny for wysiwyg editor.
|
||||||
ui_require_javascript_file('tinymce', 'vendor/tinymce/tinymce/');
|
ui_require_javascript_file('tinymce', 'vendor/tinymce/tinymce/');
|
||||||
ui_require_javascript_file('pandora');
|
ui_require_javascript_file('pandora');
|
||||||
|
if ($config['style'] === 'pandora_black') {
|
||||||
|
html_print_input_hidden('selected_style_theme', 'pandora_black');
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<script language="javascript" type="text/javascript">
|
<script language="javascript" type="text/javascript">
|
||||||
@ -443,8 +446,12 @@ ui_require_javascript_file('pandora');
|
|||||||
changeYear: true,
|
changeYear: true,
|
||||||
showAnim: "slideDown"}
|
showAnim: "slideDown"}
|
||||||
);
|
);
|
||||||
|
var consoleStyle = $("#hidden-selected_style_theme").val();
|
||||||
|
if (consoleStyle == "pandora_black") {
|
||||||
|
defineTinyMCEDark('#textarea_text');
|
||||||
|
} else {
|
||||||
defineTinyMCE('#textarea_text');
|
defineTinyMCE('#textarea_text');
|
||||||
|
}
|
||||||
|
|
||||||
$("#checkbox-expire").click(function() {
|
$("#checkbox-expire").click(function() {
|
||||||
check_expire();
|
check_expire();
|
||||||
@ -462,5 +469,4 @@ ui_require_javascript_file('pandora');
|
|||||||
$('#news-0-4').css('visibility', 'hidden');
|
$('#news-0-4').css('visibility', 'hidden');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -132,7 +132,15 @@ foreach ($osList as $os) {
|
|||||||
$data[] = html_print_anchor(
|
$data[] = html_print_anchor(
|
||||||
[
|
[
|
||||||
'href' => $hrefDelete,
|
'href' => $hrefDelete,
|
||||||
'content' => html_print_image('images/delete.svg', true, ['class' => 'main_menu_icon invert_filter']),
|
'content' => html_print_image(
|
||||||
|
'images/delete.svg',
|
||||||
|
true,
|
||||||
|
[
|
||||||
|
'alt' => __('Delete'),
|
||||||
|
'title' => __('Delete'),
|
||||||
|
'class' => 'main_menu_icon invert_filter',
|
||||||
|
]
|
||||||
|
),
|
||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
@ -187,6 +187,27 @@ if (get_parameter('mark_notification_as_read', 0)) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (get_parameter('mark_all_notification_as_read', 0)) {
|
||||||
|
$unread_messages = db_get_all_rows_sql('SELECT id_mensaje FROM tnotification_user WHERE utimestamp_read is NULL');
|
||||||
|
|
||||||
|
if ($unread_messages !== false) {
|
||||||
|
foreach ($unread_messages as $messages) {
|
||||||
|
messages_process_read($messages['id_mensaje']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = true;
|
||||||
|
} else {
|
||||||
|
$result = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If there is new messages, get the info.
|
||||||
|
echo json_encode(
|
||||||
|
['result' => $result]
|
||||||
|
);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (get_parameter('get_notifications_dropdown', 0)) {
|
if (get_parameter('get_notifications_dropdown', 0)) {
|
||||||
echo notifications_print_dropdown();
|
echo notifications_print_dropdown();
|
||||||
return;
|
return;
|
||||||
|
@ -1797,7 +1797,9 @@ $table_other->data[$row][] = html_print_label_input_block(
|
|||||||
100,
|
100,
|
||||||
true
|
true
|
||||||
).ui_print_input_placeholder(
|
).ui_print_input_placeholder(
|
||||||
__('Example').': '.date($config['date_format']),
|
__('Example').': '.date(
|
||||||
|
str_replace(' ', ' ', $config['date_format'])
|
||||||
|
),
|
||||||
true
|
true
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -1950,7 +1952,7 @@ $table_other->data[$row][] = html_print_label_input_block(
|
|||||||
).html_print_div(
|
).html_print_div(
|
||||||
[
|
[
|
||||||
'class' => '',
|
'class' => '',
|
||||||
'content' => __('Interval').html_print_select($units, 'interval_unit', 1, '', '', '', true, false, false, '', false, 'width: 100%'),
|
'content' => __('Interval').html_print_select($units, 'interval_unit', '', '', '', '', true, false, false, '', false, 'width: 100%'),
|
||||||
],
|
],
|
||||||
true
|
true
|
||||||
).html_print_button(
|
).html_print_button(
|
||||||
@ -1998,7 +2000,7 @@ $table_other->data[$row][] = html_print_label_input_block(
|
|||||||
).html_print_button(
|
).html_print_button(
|
||||||
__('Delete'),
|
__('Delete'),
|
||||||
'interval_del_btn',
|
'interval_del_btn',
|
||||||
empty($config['interval_values']),
|
false,
|
||||||
'',
|
'',
|
||||||
[
|
[
|
||||||
'mode' => 'link',
|
'mode' => 'link',
|
||||||
@ -2032,7 +2034,7 @@ $table_other->data[$row][] = html_print_label_input_block(
|
|||||||
).html_print_div(
|
).html_print_div(
|
||||||
[
|
[
|
||||||
'class' => '',
|
'class' => '',
|
||||||
'content' => __('Interval').html_print_select($units, 'interval_unit', 1, '', '', '', true, false, false, '', false, 'width: 100%'),
|
'content' => __('Interval').html_print_select($units, 'module_interval_unit', 1, '', '', '', true, false, false, '', false, 'width: 100%'),
|
||||||
],
|
],
|
||||||
true
|
true
|
||||||
).html_print_button(
|
).html_print_button(
|
||||||
@ -2339,9 +2341,15 @@ $(document).ready (function () {
|
|||||||
// CUSTOM INTERVAL VALUES
|
// CUSTOM INTERVAL VALUES
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
$("#button-interval_del_btn").click( function() {
|
$("#button-interval_del_btn").click( function() {
|
||||||
|
confirmDialog({
|
||||||
|
title: "<?php echo __('Delete interval'); ?>",
|
||||||
|
message: "<?php echo __('This action is not reversible. Are you sure'); ?>",
|
||||||
|
onAccept: function() {
|
||||||
var interval_selected = $('#intervals option:selected').val();
|
var interval_selected = $('#intervals option:selected').val();
|
||||||
$('#hidden-interval_to_delete').val(interval_selected);
|
$('#hidden-interval_to_delete').val(interval_selected);
|
||||||
$('#submit-update_button').trigger('click');
|
$('#button-update_button').trigger('click');
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#button-interval_add_btn").click( function() {
|
$("#button-interval_add_btn").click( function() {
|
||||||
|
@ -2006,6 +2006,7 @@ if ($create_alert || $update_alert) {
|
|||||||
'alt' => __('Update'),
|
'alt' => __('Update'),
|
||||||
'border' => 0,
|
'border' => 0,
|
||||||
'class' => 'main_menu_icon',
|
'class' => 'main_menu_icon',
|
||||||
|
'title' => __('Edit'),
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -2174,19 +2175,6 @@ if ($create_alert || $update_alert) {
|
|||||||
echo '</form>';
|
echo '</form>';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<div class="right">';
|
|
||||||
echo '<form name="agente" method="post" action="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_alert">';
|
|
||||||
html_print_input_hidden('create_alert', 1);
|
|
||||||
$submitButton = html_print_submit_button(
|
|
||||||
__('Create'),
|
|
||||||
'alert',
|
|
||||||
false,
|
|
||||||
['icon' => 'wand'],
|
|
||||||
true
|
|
||||||
);
|
|
||||||
html_print_action_buttons($submitButton.$deleteButton, ['right_content' => $pagination]);
|
|
||||||
echo '</form></div>';
|
|
||||||
|
|
||||||
$legend = '<table id="legend_snmp_alerts"class="w100p"><td><div class="snmp_view_div w100p legend_white">';
|
$legend = '<table id="legend_snmp_alerts"class="w100p"><td><div class="snmp_view_div w100p legend_white">';
|
||||||
$legend .= '<div class="display-flex"><div class="flex-50">';
|
$legend .= '<div class="display-flex"><div class="flex-50">';
|
||||||
$priorities = get_priorities();
|
$priorities = get_priorities();
|
||||||
@ -2202,11 +2190,24 @@ if ($create_alert || $update_alert) {
|
|||||||
$count++;
|
$count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
$legend .= '</div></div></div></td>';
|
$legend .= '</div></div></div></td></tr></table>';
|
||||||
|
|
||||||
ui_toggle($legend, __('Legend'));
|
ui_toggle($legend, __('Legend'));
|
||||||
|
|
||||||
unset($table);
|
unset($table);
|
||||||
|
|
||||||
|
echo '<div class="right">';
|
||||||
|
echo '<form name="agente" method="post" action="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_alert">';
|
||||||
|
html_print_input_hidden('create_alert', 1);
|
||||||
|
$submitButton = html_print_submit_button(
|
||||||
|
__('Create'),
|
||||||
|
'alert',
|
||||||
|
false,
|
||||||
|
['icon' => 'wand'],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
html_print_action_buttons($submitButton.$deleteButton, ['right_content' => $pagination]);
|
||||||
|
echo '</form></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
ui_require_javascript_file('pandora', 'include/javascript/', true);
|
ui_require_javascript_file('pandora', 'include/javascript/', true);
|
||||||
|
@ -592,6 +592,9 @@ $userManagementTable->data['line2_looknfeel'][0] = html_print_select_from_sql(
|
|||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Hidden hint to change theme.
|
||||||
|
$hin_change_theme = ui_print_help_tip(__('When changing the theme, the login screen logo will be restricted to the default for that color scheme, if you have a custom logo, adjust it after changing the theme.'), true, '', '', 'display: none;');
|
||||||
|
|
||||||
if (is_metaconsole() === true) {
|
if (is_metaconsole() === true) {
|
||||||
if (users_is_admin() === true) {
|
if (users_is_admin() === true) {
|
||||||
$userManagementTable->data['line1_looknfeel'][1] = $outputMetaAccess[0];
|
$userManagementTable->data['line1_looknfeel'][1] = $outputMetaAccess[0];
|
||||||
@ -599,7 +602,7 @@ if (is_metaconsole() === true) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (function_exists('skins_print_select')) {
|
if (function_exists('skins_print_select')) {
|
||||||
$userManagementTable->data['line1_looknfeel'][1] = __('User color scheme');
|
$userManagementTable->data['line1_looknfeel'][1] = __('User color scheme').$hin_change_theme;
|
||||||
$userManagementTable->data['line2_looknfeel'][1] = skins_print_select($id_usr, 'skin', $user_info['id_skin'], '', __('None'), 0, true);
|
$userManagementTable->data['line2_looknfeel'][1] = skins_print_select($id_usr, 'skin', $user_info['id_skin'], '', __('None'), 0, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -784,10 +787,12 @@ $userManagementTable->data['fields_addSettings'][1] .= html_print_div(
|
|||||||
|
|
||||||
if (isset($CodeQRTable) === true || isset($apiTokenContent) === true) {
|
if (isset($CodeQRTable) === true || isset($apiTokenContent) === true) {
|
||||||
// QR Code and API Token advice.
|
// QR Code and API Token advice.
|
||||||
|
$titleQr = '<span class="font-title-font">'.__('Contact details (QR)').'</span>';
|
||||||
|
$titleApi = '<span class="font-title-font margin-top-10">'.__('API Token credentials').'</span>';
|
||||||
html_print_div(
|
html_print_div(
|
||||||
[
|
[
|
||||||
'id' => 'api_qrcode_display',
|
'id' => 'api_qrcode_display',
|
||||||
'content' => $CodeQRTable.$apiTokenContent,
|
'content' => $titleQr.$CodeQRTable.$titleApi.$apiTokenContent,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -815,5 +820,10 @@ $(document).ready(function () {
|
|||||||
128,
|
128,
|
||||||
128
|
128
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//Hint to change theme.
|
||||||
|
$('#skin1').on("change", () => {
|
||||||
|
$('#advanced-line1_looknfeel-1 > a').css('display', 'block');
|
||||||
|
})
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
@ -67,6 +67,9 @@ class Applications extends Wizard
|
|||||||
'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=app'
|
'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=app'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Print Warning Message.
|
||||||
|
$this->printWarningMessage();
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -220,6 +220,9 @@ class Cloud extends Wizard
|
|||||||
echo '<div class="app_mssg"><i>*'.__('All company names used here are for identification purposes only. Use of these names, logos, and brands does not imply endorsement.').'</i></div>';
|
echo '<div class="app_mssg"><i>*'.__('All company names used here are for identification purposes only. Use of these names, logos, and brands does not imply endorsement.').'</i></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Print Warning Message.
|
||||||
|
$this->printWarningMessage();
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,6 +32,8 @@ require_once $config['homedir'].'/include/class/HTML.class.php';
|
|||||||
require_once $config['homedir'].'/include/functions_users.php';
|
require_once $config['homedir'].'/include/functions_users.php';
|
||||||
require_once $config['homedir'].'/include/functions_reports.php';
|
require_once $config['homedir'].'/include/functions_reports.php';
|
||||||
require_once $config['homedir'].'/include/functions_cron.php';
|
require_once $config['homedir'].'/include/functions_cron.php';
|
||||||
|
require_once $config['homedir'].'/godmode/wizards/Wizard.main.php';
|
||||||
|
|
||||||
enterprise_include_once('include/functions_tasklist.php');
|
enterprise_include_once('include/functions_tasklist.php');
|
||||||
enterprise_include_once('include/functions_cron.php');
|
enterprise_include_once('include/functions_cron.php');
|
||||||
|
|
||||||
@ -214,6 +216,10 @@ class DiscoveryTaskList extends HTML
|
|||||||
html_print_action_buttons($this->printForm($form, true));
|
html_print_action_buttons($this->printForm($form, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Warning Message.
|
||||||
|
$wizar_main = new Wizard();
|
||||||
|
$wizar_main->printWarningMessage();
|
||||||
|
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -569,7 +575,7 @@ class DiscoveryTaskList extends HTML
|
|||||||
$recon_tasks = db_get_all_rows_sql(
|
$recon_tasks = db_get_all_rows_sql(
|
||||||
sprintf(
|
sprintf(
|
||||||
'SELECT tasks.*, apps.section AS section, apps.short_name AS short_name
|
'SELECT tasks.*, apps.section AS section, apps.short_name AS short_name
|
||||||
FROM trecon_task
|
FROM trecon_task tasks
|
||||||
LEFT JOIN tdiscovery_apps apps ON tasks.id_app = apps.id_app
|
LEFT JOIN tdiscovery_apps apps ON tasks.id_app = apps.id_app
|
||||||
WHERE id_group IN (%s) AND
|
WHERE id_group IN (%s) AND
|
||||||
(type IN (%s) OR section = "%s")',
|
(type IN (%s) OR section = "%s")',
|
||||||
@ -776,7 +782,7 @@ class DiscoveryTaskList extends HTML
|
|||||||
'class' => 'main_menu_icon invert_filter',
|
'class' => 'main_menu_icon invert_filter',
|
||||||
]
|
]
|
||||||
).' ';
|
).' ';
|
||||||
$data[6] .= __('Cloud.Azure.Compute');
|
$data[6] .= __('Cloud.Azure.Compute (legacy)');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DISCOVERY_CLOUD_AWS_EC2:
|
case DISCOVERY_CLOUD_AWS_EC2:
|
||||||
@ -789,7 +795,7 @@ class DiscoveryTaskList extends HTML
|
|||||||
'class' => 'main_menu_icon invert_filter',
|
'class' => 'main_menu_icon invert_filter',
|
||||||
]
|
]
|
||||||
).' ';
|
).' ';
|
||||||
$data[6] .= __('Cloud.AWS.EC2');
|
$data[6] .= __('Cloud.AWS.EC2 (legacy)');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DISCOVERY_CLOUD_AWS_RDS:
|
case DISCOVERY_CLOUD_AWS_RDS:
|
||||||
@ -802,7 +808,7 @@ class DiscoveryTaskList extends HTML
|
|||||||
'class' => 'main_menu_icon invert_filter',
|
'class' => 'main_menu_icon invert_filter',
|
||||||
]
|
]
|
||||||
).' ';
|
).' ';
|
||||||
$data[6] .= __('Discovery.Cloud.Aws.RDS');
|
$data[6] .= __('Discovery.Cloud.Aws.RDS (legacy)');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DISCOVERY_CLOUD_AWS_S3:
|
case DISCOVERY_CLOUD_AWS_S3:
|
||||||
@ -815,7 +821,7 @@ class DiscoveryTaskList extends HTML
|
|||||||
'class' => 'main_menu_icon invert_filter',
|
'class' => 'main_menu_icon invert_filter',
|
||||||
]
|
]
|
||||||
).' ';
|
).' ';
|
||||||
$data[6] .= __('Discovery.Cloud.Aws.S3');
|
$data[6] .= __('Discovery.Cloud.Aws.S3 (legacy)');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DISCOVERY_APP_MYSQL:
|
case DISCOVERY_APP_MYSQL:
|
||||||
@ -828,7 +834,7 @@ class DiscoveryTaskList extends HTML
|
|||||||
'class' => 'main_menu_icon invert_filter',
|
'class' => 'main_menu_icon invert_filter',
|
||||||
]
|
]
|
||||||
).' ';
|
).' ';
|
||||||
$data[6] .= __('Discovery.App.MySQL');
|
$data[6] .= __('Discovery.App.MySQL (legacy)');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DISCOVERY_APP_ORACLE:
|
case DISCOVERY_APP_ORACLE:
|
||||||
@ -841,7 +847,7 @@ class DiscoveryTaskList extends HTML
|
|||||||
'class' => 'main_menu_icon invert_filter',
|
'class' => 'main_menu_icon invert_filter',
|
||||||
]
|
]
|
||||||
).' ';
|
).' ';
|
||||||
$data[6] .= __('Discovery.App.Oracle');
|
$data[6] .= __('Discovery.App.Oracle (legacy)');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DISCOVERY_APP_DB2:
|
case DISCOVERY_APP_DB2:
|
||||||
@ -854,7 +860,7 @@ class DiscoveryTaskList extends HTML
|
|||||||
'class' => 'main_menu_icon invert_filter',
|
'class' => 'main_menu_icon invert_filter',
|
||||||
]
|
]
|
||||||
).' ';
|
).' ';
|
||||||
$data[6] .= __('Discovery.App.DB2');
|
$data[6] .= __('Discovery.App.DB2 (legacy)');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DISCOVERY_DEPLOY_AGENTS:
|
case DISCOVERY_DEPLOY_AGENTS:
|
||||||
@ -865,7 +871,7 @@ class DiscoveryTaskList extends HTML
|
|||||||
true,
|
true,
|
||||||
['title' => __('Agent deployment')]
|
['title' => __('Agent deployment')]
|
||||||
).' ';
|
).' ';
|
||||||
$data[6] .= __('Discovery.Agent.Deployment');
|
$data[6] .= __('Discovery.Agent.Deployment (legacy)');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DISCOVERY_APP_MICROSOFT_SQL_SERVER:
|
case DISCOVERY_APP_MICROSOFT_SQL_SERVER:
|
||||||
@ -878,7 +884,7 @@ class DiscoveryTaskList extends HTML
|
|||||||
'class' => 'main_menu_icon invert_filter',
|
'class' => 'main_menu_icon invert_filter',
|
||||||
]
|
]
|
||||||
).' ';
|
).' ';
|
||||||
$data[6] .= __('Discovery.App.Microsoft SQL Server');
|
$data[6] .= __('Discovery.App.Microsoft SQL Server (legacy)');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DISCOVERY_EXTENSION:
|
case DISCOVERY_EXTENSION:
|
||||||
@ -906,7 +912,7 @@ class DiscoveryTaskList extends HTML
|
|||||||
'class' => 'main_menu_icon invert_filter',
|
'class' => 'main_menu_icon invert_filter',
|
||||||
]
|
]
|
||||||
).' ';
|
).' ';
|
||||||
$data[6] .= __('Discovery.NetScan');
|
$data[6] .= __('Discovery.NetScan (legacy)');
|
||||||
} else {
|
} else {
|
||||||
// APP or external script recon task.
|
// APP or external script recon task.
|
||||||
$data[6] = html_print_image(
|
$data[6] = html_print_image(
|
||||||
@ -914,7 +920,7 @@ class DiscoveryTaskList extends HTML
|
|||||||
true,
|
true,
|
||||||
['class' => 'main_menu_icon invert_filter']
|
['class' => 'main_menu_icon invert_filter']
|
||||||
).' ';
|
).' ';
|
||||||
$data[6] .= $recon_script_name;
|
$data[6] .= $recon_script_name.' (legacy)';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2022,4 +2028,28 @@ class DiscoveryTaskList extends HTML
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Generates warning message.
|
||||||
|
*
|
||||||
|
* @return void Warning message.
|
||||||
|
|
||||||
|
public function getWarningMessage()
|
||||||
|
{
|
||||||
|
return ui_print_warning_message(
|
||||||
|
__(
|
||||||
|
'Starting with version 773, the new modular system of discovery 2.0 has been implemented. The current
|
||||||
|
discovery (1.0) and its defined tasks will continue to function normally until the next LTS version,
|
||||||
|
in which migration to the new system will be mandatory.
|
||||||
|
The tasks of the current discovery (1.0) will be marked as legacy although it will not affect their
|
||||||
|
operation, it will only be a visual indicator to identify and differentiate the tasks of discovery 1.0
|
||||||
|
from those of the new version 2.0.
|
||||||
|
In the intermediate versions between the 773 and the next LTS version, more applications of the new
|
||||||
|
discovery 2.0 will be added. Both new and those that will come to replace the applications of the
|
||||||
|
current discovery 1.0. In addition, an automatic migration tool for legacy (1.0) tasks to the new 2.0
|
||||||
|
model will be included.'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -682,6 +682,7 @@ class ManageExtensions extends HTML
|
|||||||
[
|
[
|
||||||
'onclick' => 'if (!confirm(\''.__('Deleting this application will also delete all the discovery tasks using it. Do you want to delete it?').'\')) return false;',
|
'onclick' => 'if (!confirm(\''.__('Deleting this application will also delete all the discovery tasks using it. Do you want to delete it?').'\')) return false;',
|
||||||
'class' => 'main_menu_icon invert_filter action_button_hidden',
|
'class' => 'main_menu_icon invert_filter action_button_hidden',
|
||||||
|
'title' => 'Delete',
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
$data[$key]['actions'] .= html_print_input_hidden('short_name', $row['short_name'], true);
|
$data[$key]['actions'] .= html_print_input_hidden('short_name', $row['short_name'], true);
|
||||||
@ -697,6 +698,7 @@ class ManageExtensions extends HTML
|
|||||||
[
|
[
|
||||||
'onclick' => 'if (!confirm(\''.__('Are you sure you want to reapply?').'\')) return false;',
|
'onclick' => 'if (!confirm(\''.__('Are you sure you want to reapply?').'\')) return false;',
|
||||||
'class' => 'main_menu_icon invert_filter action_button_hidden',
|
'class' => 'main_menu_icon invert_filter action_button_hidden',
|
||||||
|
'title' => 'Refresh',
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
$data[$key]['actions'] .= html_print_input_hidden('sync_action', 'refresh', true);
|
$data[$key]['actions'] .= html_print_input_hidden('sync_action', 'refresh', true);
|
||||||
|
@ -522,4 +522,28 @@ class Wizard
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generates warning message.
|
||||||
|
*
|
||||||
|
* @return void Warning message.
|
||||||
|
*/
|
||||||
|
public function printWarningMessage()
|
||||||
|
{
|
||||||
|
return ui_print_warning_message(
|
||||||
|
__(
|
||||||
|
'Starting with version 773, the new modular system of discovery 2.0 has been implemented. The current
|
||||||
|
discovery (1.0) and its defined tasks will continue to function normally until the next LTS version,
|
||||||
|
in which migration to the new system will be mandatory.
|
||||||
|
The tasks of the current discovery (1.0) will be marked as legacy although it will not affect their
|
||||||
|
operation, it will only be a visual indicator to identify and differentiate the tasks of discovery 1.0
|
||||||
|
from those of the new version 2.0.
|
||||||
|
In the intermediate versions between the 773 and the next LTS version, more applications of the new
|
||||||
|
discovery 2.0 will be added. Both new and those that will come to replace the applications of the
|
||||||
|
current discovery 1.0. In addition, an automatic migration tool for legacy (1.0) tasks to the new 2.0
|
||||||
|
model will be included.'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
7
pandora_console/images/Netflow2@svg.svg
Normal file
7
pandora_console/images/Netflow2@svg.svg
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<title>Netflow@svg</title>
|
||||||
|
<g id="Netflow" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<path d="M10,2.27373675e-13 C15.5228475,2.27373675e-13 20,4.4771525 20,10 C20,15.5228475 15.5228475,20 10,20 C4.4771525,20 2.27373675e-13,15.5228475 2.27373675e-13,10 C2.27373675e-13,4.4771525 4.4771525,2.27373675e-13 10,2.27373675e-13 Z M9.99843461,11.9965254 C9.67625255,11.9965254 9.41507239,12.2577056 9.41507239,12.5798876 L9.41552125,15.4995254 L8.25074832,15.5046308 L8.28675386,15.5766508 C8.29955582,15.6022579 8.31555828,15.6342668 8.33476123,15.6726774 L8.44277783,15.8887373 C8.47158226,15.9463533 8.50358718,16.0103711 8.53879259,16.0807906 L8.86284238,16.7289703 L9.11488111,17.2331101 C9.27703936,17.5574667 9.46195666,17.927347 9.66963302,18.3427511 L9.99821684,19 L11.7485213,15.4998295 L10.5825213,15.4995254 L10.5817968,12.5798876 C10.5817968,12.2577056 10.3206167,11.9965254 9.99843461,11.9965254 Z M15.4966959,8.25147875 L11.9965254,10.0017832 C12.5726852,10.2898274 13.0777141,10.5423107 13.5116122,10.7592329 L14.2675551,11.1371576 C14.3699835,11.1883655 14.4660101,11.2363729 14.555635,11.2811798 L14.9157348,11.4612074 C14.9861544,11.4964128 15.0501721,11.5284177 15.1077881,11.5572222 L15.323848,11.6652388 C15.3622586,11.6844417 15.3942675,11.7004442 15.4198746,11.7132461 L15.4918946,11.7492517 L15.497,10.5844787 L18.4166378,10.5849276 C18.7388198,10.5849276 19,10.3237475 19,10.0015654 C19,9.67938334 18.7388198,9.41820318 18.4166378,9.41820318 L15.497,9.41747875 L15.4966959,8.25147875 Z M4.50330409,8.24834796 L4.503,9.41434796 L1.58336222,9.41507239 C1.26118016,9.41507239 1,9.67625255 1,9.99843461 C1,10.3206167 1.26118016,10.5817968 1.58336222,10.5817968 L4.503,10.581348 L4.50811371,11.7461209 L4.69807376,11.6513162 C4.7221881,11.6392813 4.74854163,11.6261289 4.77713435,11.6118589 L4.97556093,11.5128288 C5.20085777,11.4003884 5.5067654,11.247717 5.89328383,11.0548147 L6.23957636,10.8819881 C6.42234187,10.7907741 6.61953623,10.692359 6.83115944,10.5867427 L7.50931565,10.2482907 C7.66963626,10.1682784 7.8363697,10.0850656 8.00951597,9.99865237 L4.50330409,8.24834796 Z M10.0013476,1 L9.75170927,1.50020032 L9.41325727,2.17835653 C9.30764104,2.38997974 9.20922591,2.5871741 9.1180119,2.76993961 L8.94518534,3.11623214 C8.65583179,3.69600978 8.45699793,4.09441314 8.34868376,4.31144221 L8.25387911,4.50140226 L9.41865204,4.50651597 L9.41820318,7.42615375 C9.41820318,7.74833581 9.67938334,8.00951597 10.0015654,8.00951597 C10.3237475,8.00951597 10.5849276,7.74833581 10.5849276,7.42615375 L10.585652,4.50651597 L11.751652,4.50621188 L10.0013476,1 Z" id="Oval-2" fill="#3F3F3F"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.8 KiB |
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user