erge remote-tracking branch 'origin/develop' into ent-7839-revision-acl-enterprise-parte-2-introduccion-opciones
This commit is contained in:
commit
b6e34a2697
|
@ -4,7 +4,7 @@
|
|||
|
||||
# define variables
|
||||
PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
|
||||
S_VERSION='2021012801'
|
||||
S_VERSION='2021100601'
|
||||
LOGFILE="/tmp/pandora-agent-deploy-$(date +%F).log"
|
||||
|
||||
# Ansi color code variables
|
||||
|
@ -83,6 +83,7 @@ execute_cmd "[ $PANDORA_SERVER_IP ]" 'Check Server IP Address' 'Please define e
|
|||
OS=$([[ $(grep '^ID_LIKE=' /etc/os-release) ]] && grep ^ID_LIKE= /etc/os-release | cut -d '=' -f2 | tr -d '"' || grep ^ID= /etc/os-release | cut -d '=' -f2 | tr -d '"')
|
||||
|
||||
[[ $OS == 'rhel fedora' ]] && OS_RELEASE=$OS
|
||||
[[ $OS == 'fedora' ]] && OS_RELEASE=$OS
|
||||
[[ $OS == 'centos rhel fedora' ]] && OS_RELEASE=$OS
|
||||
[[ $OS == 'debian' ]] && OS_RELEASE=$OS
|
||||
|
||||
|
|
|
@ -151,7 +151,7 @@ execute_cmd "yum install -y $extra_repos" "Installing extra repositories"
|
|||
execute_cmd "yum-config-manager --enable remi-php73" "Configuring PHP"
|
||||
|
||||
# Install percona Database
|
||||
[ -f /etc/resolv.conf ] && rm -rf /etc/my.cnf
|
||||
[ -f /etc/my.cnf ] && rm -rf /etc/my.cnf
|
||||
execute_cmd "yum install -y Percona-Server-server-57" "Installing Percona Server"
|
||||
|
||||
# Console dependencies
|
||||
|
@ -429,6 +429,7 @@ sed -i -e "s/^max_input_time.*/max_input_time = -1/g" /etc/php.ini
|
|||
sed -i -e "s/^max_execution_time.*/max_execution_time = 0/g" /etc/php.ini
|
||||
sed -i -e "s/^upload_max_filesize.*/upload_max_filesize = 800M/g" /etc/php.ini
|
||||
sed -i -e "s/^memory_limit.*/memory_limit = 800M/g" /etc/php.ini
|
||||
sed -i -e "s/.*post_max_size =.*/post_max_size = 800M/" /etc/php.ini
|
||||
|
||||
cat > /var/www/html/index.html << EOF_INDEX
|
||||
<meta HTTP-EQUIV="REFRESH" content="0; url=/pandora_console/">
|
||||
|
|
|
@ -149,6 +149,7 @@ EOF_INDEX
|
|||
sed -i -e "s/^max_execution_time.*/max_execution_time = 0/g" /etc/php.ini
|
||||
sed -i -e "s/^upload_max_filesize.*/upload_max_filesize = 800M/g" /etc/php.ini
|
||||
sed -i -e "s/^memory_limit.*/memory_limit = 800M/g" /etc/php.ini
|
||||
sed -i -e "s/.*post_max_size =.*/post_max_size = 800M/" /etc/php.ini
|
||||
|
||||
echo "- Setting Public URL: $PUBLICURL"
|
||||
q=$(mysql -u$DBUSER -p$DBPASS $DBNAME -h$DBHOST -sNe "select token from tconfig;" | grep public_url)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.756, AIX version
|
||||
# Version 7.0NG.758, AIX version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.756, FreeBSD Version
|
||||
# Version 7.0NG.758, FreeBSD Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.756, HP-UX Version
|
||||
# Version 7.0NG.758, HP-UX Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.756, GNU/Linux
|
||||
# Version 7.0NG.758, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.756, GNU/Linux
|
||||
# Version 7.0NG.758, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.756, Solaris Version
|
||||
# Version 7.0NG.758, Solaris Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Base config file for Pandora FMS Windows Agent
|
||||
# (c) 2006-2021 Artica Soluciones Tecnologicas
|
||||
# Version 7.0NG.756
|
||||
# Version 7.0NG.758
|
||||
# This program is Free Software, you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public Licence as published by the Free Software
|
||||
# Foundation; either version 2 of the Licence or any later version
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.756, AIX version
|
||||
# Version 7.0NG.758, AIX version
|
||||
|
||||
# General Parameters
|
||||
# ==================
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.756
|
||||
# Version 7.0NG.758
|
||||
# FreeBSD/IPSO version
|
||||
# Licenced under GPL licence, 2003-2007 Sancho Lerena
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.756, HPUX Version
|
||||
# Version 7.0NG.758, HPUX Version
|
||||
|
||||
# General Parameters
|
||||
# ==================
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.756
|
||||
# Version 7.0NG.758
|
||||
# Licensed under GPL license v2,
|
||||
# (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# please visit http://pandora.sourceforge.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.756
|
||||
# Version 7.0NG.758
|
||||
# Licensed under GPL license v2,
|
||||
# (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# please visit http://pandora.sourceforge.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.756
|
||||
# Version 7.0NG.758
|
||||
# Licensed under GPL license v2,
|
||||
# please visit http://pandora.sourceforge.net
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.756, Solaris version
|
||||
# Version 7.0NG.758, Solaris version
|
||||
|
||||
# General Parameters
|
||||
# ==================
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.756, AIX version
|
||||
# Version 7.0NG.758, AIX version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.756-210805
|
||||
Version: 7.0NG.758-211115
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.756-210805"
|
||||
pandora_version="7.0NG.758-211115"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
|
|
@ -31,7 +31,7 @@ fi
|
|||
if [ "$#" -ge 2 ]; then
|
||||
VERSION="$2"
|
||||
else
|
||||
VERSION="7.0NG.756"
|
||||
VERSION="7.0NG.758"
|
||||
fi
|
||||
|
||||
# Path for the generated DMG file
|
||||
|
|
|
@ -19,11 +19,11 @@
|
|||
<choice id="com.pandorafms.pandorafms_src" visible="false">
|
||||
<pkg-ref id="com.pandorafms.pandorafms_src"/>
|
||||
</choice>
|
||||
<pkg-ref id="com.pandorafms.pandorafms_src" version="7.0NG.756" onConclusion="none">pandorafms_src.pdk</pkg-ref>
|
||||
<pkg-ref id="com.pandorafms.pandorafms_src" version="7.0NG.758" onConclusion="none">pandorafms_src.pdk</pkg-ref>
|
||||
<choice id="com.pandorafms.pandorafms_uninstall" visible="true" customLocation="/Applications">
|
||||
<pkg-ref id="com.pandorafms.pandorafms_uninstall"/>
|
||||
</choice>
|
||||
<pkg-ref id="com.pandorafms.pandorafms_uninstall" version="7.0NG.756" onConclusion="none">pandorafms_uninstall.pdk</pkg-ref>
|
||||
<pkg-ref id="com.pandorafms.pandorafms_uninstall" version="7.0NG.758" onConclusion="none">pandorafms_uninstall.pdk</pkg-ref>
|
||||
<!-- <installation-check script="check()" />
|
||||
<script>
|
||||
<![CDATA[
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
<key>CFBundleIconFile</key> <string>pandorafms.icns</string>
|
||||
<key>CFBundleIdentifier</key> <string>com.pandorafms.pandorafms_uninstall</string>
|
||||
|
||||
<key>CFBundleVersion</key> <string>7.0NG.756</string>
|
||||
<key>CFBundleGetInfoString</key> <string>7.0NG.756 Pandora FMS Agent uninstaller for MacOS by Artica ST on Aug 2020</string>
|
||||
<key>CFBundleShortVersionString</key> <string>7.0NG.756</string>
|
||||
<key>CFBundleVersion</key> <string>7.0NG.758</string>
|
||||
<key>CFBundleGetInfoString</key> <string>7.0NG.758 Pandora FMS Agent uninstaller for MacOS by Artica ST on Aug 2020</string>
|
||||
<key>CFBundleShortVersionString</key> <string>7.0NG.758</string>
|
||||
|
||||
<key>NSPrincipalClass</key><string>NSApplication</string>
|
||||
<key>NSMainNibFile</key><string>MainMenu</string>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.756, GNU/Linux
|
||||
# Version 7.0NG.758, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.756, FreeBSD Version
|
||||
# Version 7.0NG.758, FreeBSD Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.756, HP-UX Version
|
||||
# Version 7.0NG.758, HP-UX Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.756, GNU/Linux
|
||||
# Version 7.0NG.758, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.756, GNU/Linux
|
||||
# Version 7.0NG.758, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.756, NetBSD Version
|
||||
# Version 7.0NG.758, NetBSD Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.756, Solaris Version
|
||||
# Version 7.0NG.758, Solaris Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1014,8 +1014,8 @@ my $Sem = undef;
|
|||
# Semaphore used to control the number of threads
|
||||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '7.0NG.756';
|
||||
use constant AGENT_BUILD => '210805';
|
||||
use constant AGENT_VERSION => '7.0NG.758';
|
||||
use constant AGENT_BUILD => '211115';
|
||||
|
||||
# Agent log default file size maximum and instances
|
||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
#Pandora FMS Linux Agent
|
||||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.756
|
||||
%define release 210805
|
||||
%define version 7.0NG.758
|
||||
%define release 211115
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
#Pandora FMS Linux Agent
|
||||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.756
|
||||
%define release 210805
|
||||
%define version 7.0NG.758
|
||||
%define release 211115
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
# Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license.
|
||||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.756"
|
||||
PI_BUILD="210805"
|
||||
PI_VERSION="7.0NG.758"
|
||||
PI_BUILD="211115"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
use strict;
|
||||
use constant TSTAMP_FILE => '/tmp/pandora_inventory.tstamp';
|
||||
use Scalar::Util qw(looks_like_number);
|
||||
use Data::Dumper;
|
||||
|
||||
# Set environment language to English
|
||||
$ENV{"LANG"} = "en_US";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Base config file for Pandora FMS Windows Agent
|
||||
# (c) 2006-2021 Artica Soluciones Tecnologicas
|
||||
# Version 7.0NG.756
|
||||
# Version 7.0NG.758
|
||||
# This program is Free Software, you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public Licence as published by the Free Software
|
||||
# Foundation; either version 2 of the Licence or any later version
|
||||
|
|
|
@ -3,7 +3,7 @@ AllowLanguageSelection
|
|||
{Yes}
|
||||
|
||||
AppName
|
||||
{Pandora FMS Windows Agent v7.0NG.756}
|
||||
{Pandora FMS Windows Agent v7.0NG.758}
|
||||
|
||||
ApplicationID
|
||||
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
|
||||
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{210805}
|
||||
{211115}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora_Modules;
|
|||
* @param host Host to be pinged.
|
||||
*/
|
||||
Pandora_Module_Ping::Pandora_Module_Ping (string name, string host, string count, string timeout, string advanced_options)
|
||||
: Pandora_Module_Exec (name, "ping -n " + count + " -w " + timeout + " " + advanced_options + " " + host) {
|
||||
: Pandora_Module_Exec (name, "ping -n " + count + " -w " + timeout + " " + advanced_options + " " + host + " | find \"TTL=\"") {
|
||||
this->proc = 1;
|
||||
this->setKind (module_ping_str);
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("7.0NG.756 Build 210805")
|
||||
#define PANDORA_VERSION ("7.0NG.758 Build 211115")
|
||||
|
||||
string pandora_path;
|
||||
string pandora_dir;
|
||||
|
|
|
@ -2047,16 +2047,15 @@ Pandora_Windows_Service::pandora_run (int forced_run) {
|
|||
this->pandora_init ();
|
||||
}
|
||||
this->checkCollections ();
|
||||
}
|
||||
|
||||
|
||||
/* Execute omnishell commands */
|
||||
omnishell_path = '"'+Pandora::getPandoraInstallDir ();
|
||||
omnishell_path += "util\\omnishell_client.exe\" \"" + conf_file+"\"";
|
||||
if (getPandoraDebug () != false) {
|
||||
pandoraLog ("Omnishell: Running");
|
||||
/* Execute omnishell commands */
|
||||
omnishell_path = '"'+Pandora::getPandoraInstallDir ();
|
||||
omnishell_path += "util\\omnishell_client.exe\" \"" + conf_file+"\"";
|
||||
if (getPandoraDebug () != false) {
|
||||
pandoraLog ("Omnishell: Running");
|
||||
}
|
||||
omnishell_output = getValueFromCmdExec(omnishell_path.c_str(), 6000000);
|
||||
}
|
||||
omnishell_output = getValueFromCmdExec(omnishell_path.c_str(), 6000000);
|
||||
|
||||
server_addr = conf->getValue ("server_ip");
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ BEGIN
|
|||
VALUE "LegalCopyright", "Artica ST"
|
||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||
VALUE "ProductVersion", "(7.0NG.756(Build 210805))"
|
||||
VALUE "ProductVersion", "(7.0NG.758(Build 211115))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
# pandora disable listing
|
||||
Options -Indexes
|
||||
|
||||
# Avoid clickjacking
|
||||
Header always append X-Frame-Options SAMEORIGIN
|
||||
|
||||
<Files ~ "\.log$">
|
||||
Order Allow,Deny
|
||||
Deny from All
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 7.0NG.756-210805
|
||||
Version: 7.0NG.758-211115
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.756-210805"
|
||||
pandora_version="7.0NG.758-211115"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -31,7 +31,7 @@ global $config;
|
|||
// Require needed class.
|
||||
require_once $config['homedir'].'/include/class/AgentsAlerts.class.php';
|
||||
// Get the parameter.
|
||||
$sec2 = get_parameter_get('sec2');
|
||||
$sec2 = get_parameter_get('sec2');
|
||||
// Add operation menu option.
|
||||
extensions_add_operation_menu_option(
|
||||
__('Agents/Alerts view'),
|
||||
|
|
|
@ -331,6 +331,10 @@ function mainAgentsModules()
|
|||
$offset = (int) get_parameter('offset', 0);
|
||||
$hor_offset = (int) get_parameter('hor_offset', 0);
|
||||
$block = $config['block_size'];
|
||||
if (intval($block) > 15) {
|
||||
$block = '15';
|
||||
}
|
||||
|
||||
if (get_parameter('modulegroup') != null) {
|
||||
$agents_id = (array) get_parameter('id_agents2', null);
|
||||
}
|
||||
|
@ -543,7 +547,7 @@ function mainAgentsModules()
|
|||
|
||||
if ($config['pure'] != 1) {
|
||||
$show_filters = '<form method="post" action="'.ui_get_url_refresh(['offset' => $offset, 'hor_offset' => $offset, 'group_id' => $group_id, 'modulegroup' => $modulegroup]).'" class="w100p">';
|
||||
$show_filters .= '<table class="white_table w100p no-border" cellpadding="0" cellspacing="0" border="0">';
|
||||
$show_filters .= '<table class="w100p no-border" cellpadding="0" cellspacing="0" border="0">';
|
||||
$show_filters .= '<tr>';
|
||||
$show_filters .= '<td>'.$filter_groups_label.'</td>';
|
||||
$show_filters .= '<td>'.$filter_groups.' '.$filter_recursion_label.$filter_recursion.'</td>';
|
||||
|
@ -561,7 +565,7 @@ function mainAgentsModules()
|
|||
$show_filters .= '<td>'.$filter_modules.'</td>';
|
||||
$show_filters .= '</tr>';
|
||||
$show_filters .= '<tr>';
|
||||
$show_filters .= "<td colspan=6 ><span class='right pdd_r_20px'>".$filter_update.'</span></td>';
|
||||
$show_filters .= "<td colspan=6 ><span class='right pdd_r_35px mrgn_top_25px'>".$filter_update.'</span></td>';
|
||||
$show_filters .= '</tr>';
|
||||
$show_filters .= '</table>';
|
||||
$show_filters .= '</form>';
|
||||
|
@ -660,7 +664,7 @@ function mainAgentsModules()
|
|||
$name = $module;
|
||||
$modules_by_name[$cont]['name'] = $name;
|
||||
$modules_by_name[$cont]['id'][] = $key;
|
||||
$cont ++;
|
||||
$cont++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1081,12 +1081,18 @@ function resource_registration_extension_main()
|
|||
}
|
||||
|
||||
if (is_management_allowed() === false) {
|
||||
if (is_metaconsole() === false) {
|
||||
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=advanced/policymanager'
|
||||
).'">'.__('metaconsole').'</a>';
|
||||
} else {
|
||||
$url = __('any node');
|
||||
}
|
||||
|
||||
ui_print_warning_message(
|
||||
__(
|
||||
'This node is configured with centralized mode. Go to %s to create a policy.',
|
||||
'<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=advanced/policymanager'
|
||||
).'">'.__('metaconsole').'</a>'
|
||||
$url
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -1094,7 +1100,7 @@ function resource_registration_extension_main()
|
|||
}
|
||||
|
||||
echo '<div class=notify>';
|
||||
echo __('This extension makes registering resource templates easier.').' '.__('Here you can upload a resource template in .ptr format.').' '.__('Please refer to our documentation for more information on how to obtain and use %s resources.', get_product_name()).' '.'<br> <br>'.__("You can get more resurces in our <a href='http://pandorafms.com/Library/Library/'>Public Resource Library</a>");
|
||||
echo __('This extension makes registering resource templates easier.').' '.__('Here you can upload a resource template in .ptr format.').' '.__('Please refer to our documentation for more information on how to obtain and use %s resources.', get_product_name()).' '.'<br> <br>'.__('You can get more resurces in our <a href="http://pandorafms.com/Library/Library/">Public Resource Library</a>');
|
||||
echo '</div>';
|
||||
|
||||
echo '<br /><br />';
|
||||
|
|
|
@ -206,7 +206,7 @@ function users_extension_main_god($god=true)
|
|||
}
|
||||
|
||||
|
||||
extensions_add_operation_menu_option(__('Users connected'), 'workspace', 'users/icon.png', 'v1r1', '', 'UM');
|
||||
extensions_add_operation_menu_option(__('Users connected'), 'workspace', 'users/icon.png', 'v1r1', null, 'UM');
|
||||
|
||||
extensions_add_godmode_function('users_extension_main_god');
|
||||
extensions_add_main_function('users_extension_main');
|
||||
|
|
|
@ -106,3 +106,11 @@ enterprise/godmode/alerts/alert_events.php
|
|||
enterprise/godmode/alerts/alert_events_list.php
|
||||
enterprise/godmode/alerts/alert_events_rules.php
|
||||
enterprise/godmode/alerts/configure_alert_rule.php
|
||||
enterprise/include/functions_networkmap.php
|
||||
enterprise/operation/agentes/pandora_networkmap.view.php
|
||||
enterprise/include/ajax/map_enterprise.ajax.php
|
||||
enterprise/include/javascript/SimpleMapController.js
|
||||
enterprise/include/javascript/tooltipster.bundle.min.js
|
||||
enterprise/include/styles/tooltipster.bundle.min.css
|
||||
mobile/include/javascript/jquery.mobile-1.3.1.js
|
||||
mobile/include/style/jquery.mobile-1.3.1.css
|
|
@ -27,14 +27,15 @@ CREATE TABLE IF NOT EXISTS `tsync_queue` (
|
|||
|
||||
UPDATE `tlink` SET `link` = 'https://pandorafms.com/manual/' WHERE `id_link` = 0000000001;
|
||||
|
||||
UPDATE `tuser_task`
|
||||
SET parameters='a:7:{i:0;a:7:{s:11:"description";s:30:"Template pending to be created";s:5:"table";s:16:"treport_template";s:8:"field_id";s:9:"id_report";s:10:"field_name";s:4:"name";s:8:"required";b:1;s:4:"type";s:3:"int";s:9:"acl_group";s:8:"id_group";}i:1;a:7:{s:11:"description";s:6:"Agents";s:5:"table";s:7:"tagente";s:8:"field_id";s:9:"id_agente";s:10:"field_name";s:6:"nombre";s:8:"multiple";b:1;s:4:"type";s:3:"int";s:9:"acl_group";s:8:"id_grupo";}i:2;a:2:{s:11:"description";s:16:"Report per agent";s:10:"select_two";b:1;}i:3;a:2:{s:11:"description";s:11:"Report name";s:4:"type";s:6:"string";}i:4;a:2:{s:11:"description";s:47:"Send to e-mail addresses (separated by a comma)";s:4:"type";s:4:"text";}i:5;a:2:{s:11:"description";s:7:"Subject";s:8:"optional";i:1;}i:6;a:3:{s:11:"description";s:7:"Message";s:4:"type";s:4:"text";s:8:"optional";i:1;}}i:7;a:2:{s:11:"description";s:11:"Report Type";s:4:"type";s:11:"report_type";}}'
|
||||
WHERE id=2;
|
||||
|
||||
UPDATE `tuser_task_scheduled` SET
|
||||
`args` = REPLACE (`args`, 'a:8', 'a:9'),
|
||||
`args`= REPLACE(`args`, 's:15:"first_execution"', 'i:2;s:0:"";i:7;s:3:"PDF";s:15:"first_execution"')
|
||||
WHERE `id_user_task` = 2;
|
||||
UPDATE `tuser_task_scheduled` SET
|
||||
`args`= REPLACE(`args`, 's:15:"first_execution"', 'i:8;s:3:"PDF";s:15:"first_execution"'),
|
||||
`args` = REPLACE (`args`, 'a:8', 'a:10'),
|
||||
`args` = REPLACE (`args`, 'i:6', 'i:7'),
|
||||
`args` = REPLACE (`args`, 'i:5', 'i:6'),
|
||||
`args` = REPLACE (`args`, 'i:4', 'i:5'),
|
||||
`args` = REPLACE (`args`, 'i:3', 'i:4'),
|
||||
`args` = REPLACE (`args`, 'i:2', 'i:2;s:0:"";i:3')
|
||||
WHERE `id_user_task` IN (SELECT id from tuser_task WHERE function_name = 'cron_task_generate_report_by_template');
|
||||
|
||||
UPDATE `tconfig` SET `value` = 0 WHERE `token` = 'centralized_management';
|
||||
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
START TRANSACTION;
|
||||
|
||||
ALTER TABLE `tevento` MODIFY `data` TINYTEXT default NULL;
|
||||
ALTER TABLE `tmetaconsole_event` MODIFY `data` TINYTEXT default NULL;
|
||||
UPDATE `tconfig` set value = 'Lato-Regular.ttf' WHERE token LIKE 'custom_report_front_font';
|
||||
UPDATE `tconfig` set value = 'Lato-Regular.ttf' WHERE token LIKE 'fontpath';
|
||||
UPDATE `tlanguage` SET `name` = 'Deutsch' WHERE `id_language` = 'de';
|
||||
|
||||
COMMIT;
|
|
@ -0,0 +1,130 @@
|
|||
START TRANSACTION;
|
||||
|
||||
ALTER TABLE `treport_content` ADD COLUMN `ipam_network_filter` int(10) UNSIGNED DEFAULT 0;
|
||||
ALTER TABLE `treport_content` ADD COLUMN `ipam_alive_ips` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0;
|
||||
ALTER TABLE `treport_content` ADD COLUMN `ipam_ip_not_assigned_to_agent` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0;
|
||||
ALTER TABLE `treport_content_template` ADD COLUMN `ipam_network_filter` int(10) UNSIGNED DEFAULT 0;
|
||||
ALTER TABLE `treport_content_template` ADD COLUMN `ipam_alive_ips` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0;
|
||||
ALTER TABLE `treport_content_template` ADD COLUMN `ipam_ip_not_assigned_to_agent` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0;
|
||||
ALTER TABLE `tevent_alert` ADD COLUMN `id_template_conditions` int(10) unsigned NOT NULL default 0;
|
||||
ALTER TABLE `tevent_alert` ADD COLUMN `id_template_fields` int(10) unsigned NOT NULL default 0;
|
||||
ALTER TABLE `tevent_filter` ADD COLUMN `time_from` TIME NULL;
|
||||
ALTER TABLE `tevent_filter` ADD COLUMN `time_to` TIME NULL;
|
||||
ALTER TABLE `treport_content_template` ADD COLUMN `time_in_warning_status` TINYINT(1) DEFAULT '0';
|
||||
ALTER TABLE `treport_content_template` ADD COLUMN `checks_in_warning_status` TINYINT(1) DEFAULT '0';
|
||||
ALTER TABLE `treport_content` ADD COLUMN `time_in_warning_status` TINYINT(1) DEFAULT '0';
|
||||
ALTER TABLE `treport_content` ADD COLUMN `checks_in_warning_status` TINYINT(1) DEFAULT '0';
|
||||
ALTER TABLE `tlayout_template` ADD COLUMN `auto_adjust` INTEGER UNSIGNED NOT NULL default 0;
|
||||
|
||||
INSERT INTO `treport_content` (id_report, id_gs, id_agent_module, type, period, `order`, name, description, id_agent, `text`, external_source, treport_custom_sql_id, header_definition, column_separator, line_separator, time_from, time_to, style, server_name, time_in_warning_status, checks_in_warning_status, failover_mode) SELECT id_report, 0, id_agent_module, 'availability', period, `order`, name, description, id_agent, NULL, NULL, treport_custom_sql_id, header_definition, column_separator, line_separator, time_from, time_to, '{"show_in_same_row":0,"hide_notinit_agents":0,"priority_mode":1,"dyn_height":"230"}', server_name, 1, 1, 0 FROM treport_content WHERE type = 'histogram_data';
|
||||
INSERT INTO `treport_content_item` (id_report_content, id_agent_module, id_agent_module_failover, operation, server_name) SELECT id_rc, id_agent_module, 0, '', server_name FROM treport_content WHERE type = 'availability' AND id_agent <> 0 AND id_agent_module <> 0;
|
||||
DELETE FROM `treport_content` WHERE type = 'histogram_data';
|
||||
|
||||
ALTER TABLE `tperfil` ADD COLUMN `network_config_view`tinyint(1) NOT NULL DEFAULT 0;
|
||||
ALTER TABLE `tperfil` ADD COLUMN `network_config_edit`tinyint(1) NOT NULL DEFAULT 0;
|
||||
ALTER TABLE `tperfil` ADD COLUMN `network_config_management`tinyint(1) NOT NULL DEFAULT 0;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `tncm_vendor` (
|
||||
`id` serial,
|
||||
`name` varchar(255) UNIQUE,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `tncm_model` (
|
||||
`id` serial,
|
||||
`id_vendor` bigint(20) unsigned NOT NULL,
|
||||
`name` varchar(255) UNIQUE,
|
||||
PRIMARY KEY (`id`),
|
||||
FOREIGN KEY (`id_vendor`) REFERENCES `tncm_vendor`(`id`) ON UPDATE CASCADE ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `tncm_template` (
|
||||
`id` serial,
|
||||
`name` text,
|
||||
`vendors` text,
|
||||
`models` text,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `tncm_script` (
|
||||
`id` serial,
|
||||
`type` int unsigned not null default 0,
|
||||
`content` text,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `tncm_template_scripts` (
|
||||
`id` serial,
|
||||
`id_template` bigint(20) unsigned NOT NULL,
|
||||
`id_script` bigint(20) unsigned NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
FOREIGN KEY (`id_template`) REFERENCES `tncm_template`(`id`) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
FOREIGN KEY (`id_script`) REFERENCES `tncm_script`(`id`) ON UPDATE CASCADE ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `tncm_agent` (
|
||||
`id_agent` int(10) unsigned NOT NULL,
|
||||
`id_vendor` bigint(20) unsigned,
|
||||
`id_model` bigint(20) unsigned,
|
||||
`protocol` int unsigned not null default 0,
|
||||
`cred_key` varchar(100),
|
||||
`adv_key` varchar(100),
|
||||
`port` int(4) unsigned default 22,
|
||||
`status` int(4) NOT NULL default 5,
|
||||
`updated_at` bigint(20) NOT NULL default 0,
|
||||
`config_backup_id` bigint(20) UNSIGNED DEFAULT NULL,
|
||||
`id_template` bigint(20) unsigned,
|
||||
`execute_type` int(2) UNSIGNED NOT NULL default 0,
|
||||
`execute` int(2) UNSIGNED NOT NULL default 0,
|
||||
`last_error` text,
|
||||
PRIMARY KEY (`id_agent`),
|
||||
FOREIGN KEY (`id_agent`) REFERENCES `tagente`(`id_agente`) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
FOREIGN KEY (`cred_key`) REFERENCES `tcredential_store`(`identifier`) ON UPDATE CASCADE ON DELETE SET NULL,
|
||||
FOREIGN KEY (`id_template`) REFERENCES `tncm_template`(`id`) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
FOREIGN KEY (`id_vendor`) REFERENCES `tncm_vendor`(`id`) ON UPDATE CASCADE ON DELETE SET NULL,
|
||||
FOREIGN KEY (`id_model`) REFERENCES `tncm_model`(`id`) ON UPDATE CASCADE ON DELETE SET NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `tncm_agent_data` (
|
||||
`id` serial,
|
||||
`id_agent` int(10) unsigned NOT NULL,
|
||||
`script_type` int unsigned not null,
|
||||
`data` LONGBLOB,
|
||||
`status` int(4) NOT NULL default 5,
|
||||
`updated_at` bigint(20) NOT NULL default 0,
|
||||
FOREIGN KEY (`id_agent`) REFERENCES `tagente`(`id_agente`) ON UPDATE CASCADE ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT IGNORE INTO `tncm_vendor` VALUES
|
||||
(1,'Cisco'),
|
||||
(2, 'D-Link Systems, Inc.'),
|
||||
(3, 'MikroTik'),
|
||||
(4, 'Alcatel-Lucent Enterprise'),
|
||||
(5, 'Ubiquiti Networks, Inc.'),
|
||||
(6, 'Allied Telesis, Inc.'),
|
||||
(7, 'Frogfoot Networks'),
|
||||
(8, 'IBM'),
|
||||
(9, 'Dell Inc.'),
|
||||
(10, 'Hitachi Communication Technologies, Ltd.'),
|
||||
(11, 'Netlink'),
|
||||
(12, 'Ascom'),
|
||||
(13, 'Synology Inc.'),
|
||||
(14, 'Fujitsu Network Communications, Inc.');
|
||||
|
||||
INSERT IGNORE INTO `tncm_model` VALUES (1,1,'7200');
|
||||
|
||||
INSERT IGNORE INTO `tncm_template` VALUES (1,'cisco-base','[\"1\"]','[\"1\"]');
|
||||
|
||||
INSERT IGNORE INTO `tncm_script` VALUES
|
||||
(1,0,'enable
expect:Password:\s*
_enablepass_
exit'),
|
||||
(2,1,'enable
expect:Password:\s*
_enablepass_
term length 0
capture:show running-config
exit
'),
|
||||
(3,2,'enable
expect:Password:\s*
_enablepass_
term length 0
config terminal
_applyconfigbackup_
exit
'),
|
||||
(4,3,'enable
expect:Password:\s*
_enablepass_
term length 0
capture:show version | i IOS Software
exit
'),
|
||||
(5,5,'enable
expect:Password:\s*
_enablepass_
term length 0
config term
end
end
exit
');
|
||||
|
||||
INSERT INTO `tncm_template_scripts`(`id_template`, `id_script`) VALUES (1,1),(1,2),(1,3),(1,4),(1,5);
|
||||
|
||||
ALTER TABLE `tevent_alert` ADD COLUMN `last_evaluation` bigint(20) NOT NULL default 0;
|
||||
ALTER TABLE `tevent_alert` ADD COLUMN `pool_occurrences` int unsigned not null default 0;
|
||||
|
||||
COMMIT;
|
|
@ -1,35 +0,0 @@
|
|||
CREATE PROCEDURE updateSnmpAlerts()
|
||||
BEGIN
|
||||
DECLARE tokenId INT DEFAULT 0;
|
||||
DECLARE procedureRun INT DEFAULT 0;
|
||||
DECLARE done BOOLEAN DEFAULT FALSE;
|
||||
DECLARE a, b INT DEFAULT 0;
|
||||
DECLARE alertsCur CURSOR FOR SELECT id, id_alert_command FROM talert_actions;
|
||||
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
|
||||
|
||||
SELECT id_config, value INTO tokenId, procedureRun FROM tconfig WHERE token = 'update_snmp_alerts_procedure_already_run' LIMIT 1;
|
||||
|
||||
IF procedureRun < 1 THEN
|
||||
SET done = FALSE;
|
||||
|
||||
OPEN alertsCur;
|
||||
|
||||
read_loop: LOOP
|
||||
FETCH alertsCur INTO a, b;
|
||||
IF done THEN
|
||||
LEAVE read_loop;
|
||||
END IF;
|
||||
|
||||
UPDATE talert_snmp SET id_alert = b WHERE id_alert = a;
|
||||
UPDATE talert_snmp_action SET alert_type = b WHERE alert_type = a;
|
||||
END LOOP;
|
||||
|
||||
CLOSE alertsCur;
|
||||
|
||||
IF tokenId < 1 THEN
|
||||
INSERT INTO tconfig (id_config, token, value) VALUES ('', 'update_snmp_alerts_procedure_already_run', '1');
|
||||
ELSE
|
||||
UPDATE tconfig SET value = 1 WHERE token = 'update_snmp_alerts_procedure_already_run';
|
||||
END IF;
|
||||
END IF;
|
||||
END
|
|
@ -710,6 +710,10 @@ CREATE TABLE IF NOT EXISTS `tevent_alert` (
|
|||
ALTER TABLE `tevent_alert` ADD COLUMN `special_days` tinyint(1) default 0;
|
||||
ALTER TABLE `tevent_alert` MODIFY COLUMN `time_threshold` int(10) NOT NULL default 86400;
|
||||
ALTER TABLE `tevent_alert` ADD COLUMN `disable_event` tinyint(1) DEFAULT 0;
|
||||
ALTER TABLE `tevent_alert` ADD COLUMN `id_template_conditions` int(10) unsigned NOT NULL default 0;
|
||||
ALTER TABLE `tevent_alert` ADD COLUMN `id_template_fields` int(10) unsigned NOT NULL default 0;
|
||||
ALTER TABLE `tevent_alert` ADD COLUMN `last_evaluation` bigint(20) NOT NULL default 0;
|
||||
ALTER TABLE `tevent_alert` ADD COLUMN `pool_occurrences` int unsigned not null default 0;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `tevent_alert_action`
|
||||
|
@ -896,6 +900,11 @@ ALTER TABLE `treport_content_template` ADD COLUMN `landscape` tinyint(1) UNSIGNE
|
|||
ALTER TABLE `treport_content_template` ADD COLUMN `pagebreak` tinyint(1) UNSIGNED NOT NULL default 0;
|
||||
ALTER TABLE `treport_content_template` ADD COLUMN `compare_work_time` tinyint(1) UNSIGNED NOT NULL default 0;
|
||||
ALTER TABLE `treport_content_template` ADD COLUMN `graph_render` tinyint(1) UNSIGNED NOT NULL default 0;
|
||||
ALTER TABLE `treport_content_template` ADD COLUMN `time_in_warning_status` TINYINT(1) DEFAULT '0';
|
||||
ALTER TABLE `treport_content_template` ADD COLUMN `checks_in_warning_status` TINYINT(1) DEFAULT '0';
|
||||
ALTER TABLE `treport_content_template` ADD COLUMN `ipam_network_filter` int(10) UNSIGNED DEFAULT 0;
|
||||
ALTER TABLE `treport_content_template` ADD COLUMN `ipam_alive_ips` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0;
|
||||
ALTER TABLE `treport_content_template` ADD COLUMN `ipam_ip_not_assigned_to_agent` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0;
|
||||
|
||||
-- ----------------------------------------------------------------------
|
||||
-- Table `tnews`
|
||||
|
@ -1028,6 +1037,7 @@ ALTER TABLE `tmetaconsole_event` ADD INDEX `tme_timestamp_idx` (`timestamp`);
|
|||
ALTER TABLE `tmetaconsole_event` ADD INDEX `tme_module_status_idx` (`module_status`);
|
||||
ALTER TABLE `tmetaconsole_event` ADD INDEX `tme_criticity_idx` (`criticity`);
|
||||
ALTER TABLE `tmetaconsole_event` ADD INDEX `tme_agent_name_idx` (`agent_name`);
|
||||
ALTER TABLE `tmetaconsole_event` MODIFY `data` TINYTEXT default NULL;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table `tmetaconsole_event_history`
|
||||
|
@ -1440,13 +1450,13 @@ ALTER TABLE `ttag` MODIFY COLUMN `name` text NOT NULL default '';
|
|||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('big_operation_step_datos_purge', '100');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '30');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 48);
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 50);
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_docs_logo', 'default_docs.png');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_support_logo', 'default_support.png');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png');
|
||||
UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.php' WHERE token='url_update_manager';
|
||||
DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise';
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package', 756);
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package', 758);
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('status_monitor_fields', 'policy,agent,data_type,module_name,server_type,interval,status,graph,warn,data,timestamp');
|
||||
UPDATE `tconfig` SET `value` = 'mini_severity,evento,id_agente,estado,timestamp' WHERE `token` LIKE 'event_fields';
|
||||
DELETE FROM `tconfig` WHERE `token` LIKE 'integria_api_password';
|
||||
|
@ -1514,6 +1524,8 @@ ALTER TABLE tevent_filter ADD COLUMN `id_source_event` int(10);
|
|||
ALTER TABLE `tevent_filter` MODIFY COLUMN `user_comment` text NOT NULL;
|
||||
ALTER TABLE `tevent_filter` MODIFY COLUMN `severity` text NOT NULL;
|
||||
ALTER TABLE tevent_filter ADD COLUMN `server_id` int(10) NOT NULL default 0;
|
||||
ALTER TABLE `tevent_filter` ADD COLUMN `time_from` TIME NULL;
|
||||
ALTER TABLE `tevent_filter` ADD COLUMN `time_to` TIME NULL;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table `tusuario`
|
||||
|
@ -1773,6 +1785,11 @@ ALTER TABLE `treport_content` ADD COLUMN `pagebreak` tinyint(1) UNSIGNED NOT NUL
|
|||
ALTER TABLE `treport_content` ADD COLUMN `compare_work_time` tinyint(1) UNSIGNED NOT NULL default 0;
|
||||
ALTER TABLE `treport_content` ADD COLUMN `graph_render` tinyint(1) UNSIGNED NOT NULL default 0;
|
||||
ALTER TABLE `treport_content` MODIFY `external_source` MEDIUMTEXT;
|
||||
ALTER TABLE `treport_content` ADD COLUMN `time_in_warning_status` TINYINT(1) DEFAULT '0';
|
||||
ALTER TABLE `treport_content` ADD COLUMN `checks_in_warning_status` TINYINT(1) DEFAULT '0';
|
||||
ALTER TABLE `treport_content` ADD COLUMN `ipam_network_filter` int(10) UNSIGNED DEFAULT 0;
|
||||
ALTER TABLE `treport_content` ADD COLUMN `ipam_alive_ips` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0;
|
||||
ALTER TABLE `treport_content` ADD COLUMN `ipam_ip_not_assigned_to_agent` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table `tmodule_relationship`
|
||||
|
@ -2216,6 +2233,7 @@ CREATE TABLE IF NOT EXISTS `tlayout_template` (
|
|||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
ALTER TABLE tlayout_template MODIFY `name` varchar(600) NOT NULL;
|
||||
ALTER TABLE `tlayout` ADD COLUMN `auto_adjust` INTEGER UNSIGNED NOT NULL default 0;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table `tlayout_template_data`
|
||||
|
@ -2350,6 +2368,8 @@ ALTER TABLE `tevento` ADD COLUMN `data` double(50,5) default NULL;
|
|||
|
||||
ALTER TABLE `tevento` ADD COLUMN `module_status` int(4) NOT NULL default '0';
|
||||
|
||||
ALTER TABLE `tevento` MODIFY `data` TINYTEXT default NULL;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table `tevent_extended`
|
||||
-- ---------------------------------------------------------------------
|
||||
|
@ -4063,6 +4083,10 @@ ALTER TABLE `tperfil` DROP COLUMN `incident_view`;
|
|||
ALTER TABLE `tperfil` DROP COLUMN `incident_edit`;
|
||||
ALTER TABLE `tperfil` DROP COLUMN `incident_management`;
|
||||
|
||||
ALTER TABLE `tperfil` ADD COLUMN `network_config_view`tinyint(1) NOT NULL DEFAULT 0;
|
||||
ALTER TABLE `tperfil` ADD COLUMN `network_config_edit`tinyint(1) NOT NULL DEFAULT 0;
|
||||
ALTER TABLE `tperfil` ADD COLUMN `network_config_management`tinyint(1) NOT NULL DEFAULT 0;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `talert_execution_queue`
|
||||
-- -----------------------------------------------------
|
||||
|
@ -4075,3 +4099,127 @@ CREATE TABLE IF NOT EXISTS `talert_execution_queue` (
|
|||
`utimestamp` bigint(20) NOT NULL default '0',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
UPDATE `tlanguage` SET `name` = 'Deutsch' WHERE `id_language` = 'de';
|
||||
|
||||
-- ----------------------------------------------------------------------
|
||||
-- Table `tncm_vendor`
|
||||
-- ----------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tncm_vendor` (
|
||||
`id` serial,
|
||||
`name` varchar(255) UNIQUE,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ----------------------------------------------------------------------
|
||||
-- Table `tncm_model`
|
||||
-- ----------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tncm_model` (
|
||||
`id` serial,
|
||||
`id_vendor` bigint(20) unsigned NOT NULL,
|
||||
`name` varchar(255) UNIQUE,
|
||||
PRIMARY KEY (`id`),
|
||||
FOREIGN KEY (`id_vendor`) REFERENCES `tncm_vendor`(`id`) ON UPDATE CASCADE ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ----------------------------------------------------------------------
|
||||
-- Table `tncm_template`
|
||||
-- ----------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tncm_template` (
|
||||
`id` serial,
|
||||
`name` text,
|
||||
`vendors` text,
|
||||
`models` text,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ----------------------------------------------------------------------
|
||||
-- Table `tncm_script`
|
||||
-- ----------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tncm_script` (
|
||||
`id` serial,
|
||||
`type` int unsigned not null default 0,
|
||||
`content` text,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ----------------------------------------------------------------------
|
||||
-- Table `tncm_template_scripts`
|
||||
-- ----------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tncm_template_scripts` (
|
||||
`id` serial,
|
||||
`id_template` bigint(20) unsigned NOT NULL,
|
||||
`id_script` bigint(20) unsigned NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
FOREIGN KEY (`id_template`) REFERENCES `tncm_template`(`id`) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
FOREIGN KEY (`id_script`) REFERENCES `tncm_script`(`id`) ON UPDATE CASCADE ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ----------------------------------------------------------------------
|
||||
-- Table `tncm_agent`
|
||||
-- ----------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tncm_agent` (
|
||||
`id_agent` int(10) unsigned NOT NULL,
|
||||
`id_vendor` bigint(20) unsigned,
|
||||
`id_model` bigint(20) unsigned,
|
||||
`protocol` int unsigned not null default 0,
|
||||
`cred_key` varchar(100),
|
||||
`adv_key` varchar(100),
|
||||
`port` int(4) unsigned default 22,
|
||||
`status` int(4) NOT NULL default 5,
|
||||
`updated_at` bigint(20) NOT NULL default 0,
|
||||
`config_backup_id` bigint(20) UNSIGNED DEFAULT NULL,
|
||||
`id_template` bigint(20) unsigned,
|
||||
`execute_type` int(2) UNSIGNED NOT NULL default 0,
|
||||
`execute` int(2) UNSIGNED NOT NULL default 0,
|
||||
`last_error` text,
|
||||
PRIMARY KEY (`id_agent`),
|
||||
FOREIGN KEY (`id_agent`) REFERENCES `tagente`(`id_agente`) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
FOREIGN KEY (`cred_key`) REFERENCES `tcredential_store`(`identifier`) ON UPDATE CASCADE ON DELETE SET NULL,
|
||||
FOREIGN KEY (`id_template`) REFERENCES `tncm_template`(`id`) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
FOREIGN KEY (`id_vendor`) REFERENCES `tncm_vendor`(`id`) ON UPDATE CASCADE ON DELETE SET NULL,
|
||||
FOREIGN KEY (`id_model`) REFERENCES `tncm_model`(`id`) ON UPDATE CASCADE ON DELETE SET NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ----------------------------------------------------------------------
|
||||
-- Table `tncm_agent_data`
|
||||
-- ----------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tncm_agent_data` (
|
||||
`id` serial,
|
||||
`id_agent` int(10) unsigned NOT NULL,
|
||||
`script_type` int unsigned not null,
|
||||
`data` LONGBLOB,
|
||||
`status` int(4) NOT NULL default 5,
|
||||
`updated_at` bigint(20) NOT NULL default 0,
|
||||
FOREIGN KEY (`id_agent`) REFERENCES `tagente`(`id_agente`) ON UPDATE CASCADE ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
INSERT INTO `tncm_vendor` VALUES
|
||||
(1,'Cisco'),
|
||||
(2, 'D-Link Systems, Inc.'),
|
||||
(3, 'MikroTik'),
|
||||
(4, 'Alcatel-Lucent Enterprise'),
|
||||
(5, 'Ubiquiti Networks, Inc.'),
|
||||
(6, 'Allied Telesis, Inc.'),
|
||||
(7, 'Frogfoot Networks'),
|
||||
(8, 'IBM'),
|
||||
(9, 'Dell Inc.'),
|
||||
(10, 'Hitachi Communication Technologies, Ltd.'),
|
||||
(11, 'Netlink'),
|
||||
(12, 'Ascom'),
|
||||
(13, 'Synology Inc.'),
|
||||
(14, 'Fujitsu Network Communications, Inc.');
|
||||
|
||||
INSERT INTO `tncm_model` VALUES (1,1,'7200');
|
||||
|
||||
INSERT INTO `tncm_template` VALUES (1,'cisco-base','[\"1\"]','[\"1\"]');
|
||||
|
||||
INSERT INTO `tncm_script` VALUES
|
||||
(1,0,'enable
expect:Password:\s*
_enablepass_
exit'),
|
||||
(2,1,'enable
expect:Password:\s*
_enablepass_
term length 0
capture:show running-config
exit
'),
|
||||
(3,2,'enable
expect:Password:\s*
_enablepass_
term length 0
config terminal
_applyconfigbackup_
exit
'),
|
||||
(4,3,'enable
expect:Password:\s*
_enablepass_
term length 0
capture:show version | i IOS Software
exit
'),
|
||||
(5,5,'enable
expect:Password:\s*
_enablepass_
term length 0
config term
end
end
exit
');
|
||||
|
||||
INSERT INTO `tncm_template_scripts`(`id_template`, `id_script`) VALUES (1,1),(1,2),(1,3),(1,4),(1,5);
|
||||
|
|
|
@ -46,11 +46,11 @@ ui_require_css_file('first_task');
|
|||
ui_print_info_message(['no_close' => true, 'message' => __('There are no clusters defined yet.') ]);
|
||||
?>
|
||||
|
||||
<div class="new_task_cluster">
|
||||
<div class="image_task_cluster">
|
||||
<div class="new_task">
|
||||
<div class="image_task">
|
||||
<?php echo html_print_image('images/first_task/icono-cluster-activo.png', true, ['title' => __('Clusters')]); ?>
|
||||
</div>
|
||||
<div class="text_task_cluster">
|
||||
<div class="text_task">
|
||||
<h3> <?php echo __('Create Cluster'); ?></h3>
|
||||
<p id="description_task">
|
||||
<?php
|
||||
|
|
|
@ -23,13 +23,8 @@ ui_require_css_file('order_interpreter');
|
|||
// Global errors/warnings checking.
|
||||
config_check();
|
||||
|
||||
echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
|
||||
|
||||
|
||||
if ($config['menu_type'] == 'classic') {
|
||||
echo '<div id="header_table" class="header_table_classic">';
|
||||
} else {
|
||||
echo '<div id="header_table" class="header_table_collapsed">';
|
||||
}
|
||||
?>
|
||||
<div id="header_table_inner">
|
||||
<?php
|
||||
|
|
|
@ -64,6 +64,8 @@ $data['monitor_critical'] = (int) $all_data['_monitors_critical_'];
|
|||
$data['monitor_not_normal'] = (int) $all_data['_monitor_not_normal_'];
|
||||
$data['monitor_alerts'] = (int) $all_data['_monitors_alerts_'];
|
||||
$data['monitor_alerts_fired'] = (int) $all_data['_monitors_alerts_fired_'];
|
||||
$data['monitor_total'] = (int) $all_data['_monitor_total_'];
|
||||
|
||||
|
||||
$data['total_agents'] = (int) $all_data['_total_agents_'];
|
||||
|
||||
|
|
|
@ -1,17 +1,33 @@
|
|||
<?php
|
||||
/**
|
||||
* Lateral Main Menu.
|
||||
*
|
||||
* @category Main Menu.
|
||||
* @package Pandora FMS.
|
||||
* @subpackage OpenSource.
|
||||
* @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.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// 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; 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.
|
||||
if (! isset($config['id_user'])) {
|
||||
// Begin.
|
||||
if (isset($config['id_user']) === false) {
|
||||
include 'general/login_page.php';
|
||||
exit();
|
||||
}
|
||||
|
@ -20,9 +36,9 @@ if (! isset($config['id_user'])) {
|
|||
<script type="text/javascript" language="javascript">
|
||||
|
||||
$(document).ready(function(){
|
||||
var menuType_value = "<?php echo $config['menu_type']; ?>";
|
||||
var menuType_value = "<?php echo $_SESSION['menu_type']; ?>";
|
||||
|
||||
if (menuType_value == 'classic') {
|
||||
if (menuType_value === '' || menuType_value === 'classic') {
|
||||
$('ul.submenu').css('left', '214px');
|
||||
}
|
||||
else{
|
||||
|
@ -34,26 +50,22 @@ $(document).ready(function(){
|
|||
<?php
|
||||
$autohidden_menu = 0;
|
||||
|
||||
if (isset($config['autohidden_menu']) && $config['autohidden_menu']) {
|
||||
if (isset($config['autohidden_menu']) === true && (bool) $config['autohidden_menu'] === true) {
|
||||
$autohidden_menu = 1;
|
||||
}
|
||||
|
||||
// Menu container prepared to autohide menu
|
||||
if ($config['menu_type'] == 'classic') {
|
||||
echo '<div id="menu_full" class="menu_full_classic">';
|
||||
} else {
|
||||
echo '<div id="menu_full" class="menu_full_collapsed">';
|
||||
}
|
||||
// Start of full lateral menu.
|
||||
echo sprintf('<div id="menu_full" class="menu_full_%s">', $menuTypeClass);
|
||||
|
||||
$custom_logo = 'images/custom_logo/'.$config['custom_logo'];
|
||||
$custom_logo_collapsed = 'images/custom_logo/'.$config['custom_logo_collapsed'];
|
||||
|
||||
if (!defined('PANDORA_ENTERPRISE')) {
|
||||
if (defined('PANDORA_ENTERPRISE') === false) {
|
||||
$logo_title = get_product_name().' Opensource';
|
||||
$custom_logo = 'images/custom_logo/pandora_logo_head_3.png';
|
||||
$custom_logo_collapsed = 'images/custom_logo/pandora_logo_green_collapsed.png';
|
||||
} else {
|
||||
if (file_exists(ENTERPRISE_DIR.'/'.$custom_logo)) {
|
||||
if (file_exists(ENTERPRISE_DIR.'/'.$custom_logo) === true) {
|
||||
$custom_logo = ENTERPRISE_DIR.'/'.$custom_logo;
|
||||
}
|
||||
|
||||
|
@ -61,54 +73,48 @@ if (!defined('PANDORA_ENTERPRISE')) {
|
|||
}
|
||||
|
||||
echo '<div class="logo_green"><a href="index.php?sec=main">';
|
||||
if (isset($config['custom_logo'])) {
|
||||
if ($config['menu_type'] == 'classic') {
|
||||
echo html_print_image($custom_logo, true, ['border' => '0', 'width' => '215', 'alt' => $logo_title, 'class' => 'logo_full', 'style' => 'display:block']);
|
||||
} else {
|
||||
echo html_print_image($custom_logo, true, ['border' => '0', 'width' => '215', 'alt' => $logo_title, 'class' => 'logo_full', 'style' => 'display:none']);
|
||||
}
|
||||
|
||||
if (isset($config['custom_logo']) === true) {
|
||||
echo html_print_image(
|
||||
$custom_logo,
|
||||
true,
|
||||
[
|
||||
'border' => '0',
|
||||
'width' => '215',
|
||||
'alt' => $logo_title,
|
||||
'class' => 'logo_full',
|
||||
'style' => ($menuCollapsed === true) ? 'display:none' : 'display:block',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
if (isset($config['custom_logo_collapsed'])) {
|
||||
if ($config['menu_type'] == 'classic') {
|
||||
echo html_print_image($custom_logo_collapsed, true, ['border' => '0', 'width' => '60', 'alt' => $logo_title, 'class' => 'logo_icon', 'style' => 'display:none']);
|
||||
} else {
|
||||
echo html_print_image($custom_logo_collapsed, true, ['border' => '0', 'width' => '60', 'alt' => $logo_title, 'class' => 'logo_icon', 'style' => 'display:block']);
|
||||
}
|
||||
if (isset($config['custom_logo_collapsed']) === true) {
|
||||
echo html_print_image(
|
||||
$custom_logo_collapsed,
|
||||
true,
|
||||
[
|
||||
'border' => '0',
|
||||
'width' => '60',
|
||||
'alt' => $logo_title,
|
||||
'class' => 'logo_icon',
|
||||
'style' => ($menuCollapsed === true) ? 'display:block' : 'display:none',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
echo '</a></div>';
|
||||
|
||||
// echo '<div class="tit bg titop">:: '.__('Operation').' ::</div>';
|
||||
require 'operation/menu.php';
|
||||
|
||||
// Check all enterprise ACL used in godmenu items to print menu headers
|
||||
if (check_acl($config['id_user'], 0, 'AW')
|
||||
|| check_acl($config['id_user'], 0, 'PM')
|
||||
|| check_acl($config['id_user'], 0, 'LM')
|
||||
|| check_acl($config['id_user'], 0, 'UM')
|
||||
|| check_acl($config['id_user'], 0, 'LW')
|
||||
|| check_acl($config['id_user'], 0, 'EW')
|
||||
|| check_acl($config['id_user'], 0, 'DW')
|
||||
) {
|
||||
// echo '<div class="tit bg3">:: '.__('Administration').' ::</div>';
|
||||
}
|
||||
|
||||
require 'godmode/menu.php';
|
||||
|
||||
if ($config['menu_type'] == 'classic') {
|
||||
echo '<div id="button_collapse" class="button_classic button_collapse"></div>';
|
||||
} else {
|
||||
echo '<div id="button_collapse" class="button_collapsed button_collapse"></div>';
|
||||
}
|
||||
echo sprintf('<div id="button_collapse" class="button_%s button_collapse"></div>', $menuTypeClass);
|
||||
|
||||
// require ("links_menu.php");
|
||||
echo '</div>';
|
||||
// menu_container
|
||||
// Menu_container.
|
||||
ui_require_jquery_file('cookie');
|
||||
|
||||
$config_fixed_header = false;
|
||||
if (isset($config['fixed_header'])) {
|
||||
if (isset($config['fixed_header']) === true) {
|
||||
$config_fixed_header = $config['fixed_header'];
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -349,7 +349,14 @@ if (isset($groups[$grupo]) || $new_agent) {
|
|||
}
|
||||
|
||||
$table_primary_group .= '<div class="label_select_child_icons"><span id="group_preview">';
|
||||
$table_primary_group .= ui_print_group_icon($grupo, true);
|
||||
if ($id_agente === 0) {
|
||||
$hidden = 'display: none;';
|
||||
} else {
|
||||
$hidden = '';
|
||||
}
|
||||
|
||||
$table_primary_group .= ui_print_group_icon($grupo, true, 'groups_small', $hidden);
|
||||
|
||||
$table_primary_group .= '</span></div></div></div>';
|
||||
|
||||
$table_interval = '<div class="label_select"><p class="input_label">'.__('Interval').'</p>';
|
||||
|
@ -1246,6 +1253,9 @@ ui_require_jquery_file('bgiframe');
|
|||
});
|
||||
|
||||
$("select#id_os").pandoraSelectOS ();
|
||||
$('select#grupo').pandoraSelectGroupIcon ();
|
||||
|
||||
|
||||
|
||||
var checked = $("#checkbox-cascade_protection").is(":checked");
|
||||
if (checked) {
|
||||
|
|
|
@ -485,6 +485,13 @@ if ($id_agente) {
|
|||
$collectiontab = '';
|
||||
}
|
||||
|
||||
// NetworkConfigManager tab.
|
||||
$ncm_tab = enterprise_hook('networkconfigmanager_tab');
|
||||
|
||||
if ($ncm_tab === ENTERPRISE_NOT_HOOK) {
|
||||
$ncm_tab = '';
|
||||
}
|
||||
|
||||
// Group tab.
|
||||
$grouptab['text'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&ag_group='.$group.'">'.html_print_image(
|
||||
'images/group.png',
|
||||
|
@ -616,6 +623,7 @@ if ($id_agente) {
|
|||
'main' => $maintab,
|
||||
'remote_configuration' => $remote_configuration_tab,
|
||||
'module' => $moduletab,
|
||||
'ncm' => $ncm_tab,
|
||||
'alert' => $alerttab,
|
||||
'template' => $templatetab,
|
||||
'inventory' => $inventorytab,
|
||||
|
@ -631,6 +639,7 @@ if ($id_agente) {
|
|||
'separator' => '',
|
||||
'main' => $maintab,
|
||||
'module' => $moduletab,
|
||||
'ncm' => $ncm_tab,
|
||||
'alert' => $alerttab,
|
||||
'template' => $templatetab,
|
||||
'inventory' => $inventorytab,
|
||||
|
@ -699,6 +708,11 @@ if ($id_agente) {
|
|||
$tab_name = 'Collection';
|
||||
break;
|
||||
|
||||
case 'ncm':
|
||||
$tab_description = '- '.__('Network config manager');
|
||||
$tab_name = 'Network config manager';
|
||||
break;
|
||||
|
||||
case 'inventory':
|
||||
$tab_description = '- '.__('Inventory');
|
||||
$help_header = 'inventory_tab';
|
||||
|
@ -976,6 +990,8 @@ if ($update_agent) {
|
|||
$cps = get_parameter_switch('cps', -1);
|
||||
$old_values = db_get_row('tagente', 'id_agente', $id_agente);
|
||||
$fields = db_get_all_fields_in_table('tagent_custom_fields');
|
||||
$secondary_groups = (string) get_parameter('secondary_hidden', '');
|
||||
|
||||
|
||||
if ($fields === false) {
|
||||
$fields = [];
|
||||
|
@ -1205,7 +1221,16 @@ if ($update_agent) {
|
|||
"Quiet":"'.(int) $quiet.'",
|
||||
"Cps":"'.(int) $cps.'"}';
|
||||
|
||||
enterprise_hook('update_agent', [$id_agente]);
|
||||
// Create the secondary groups.
|
||||
enterprise_hook(
|
||||
'agents_update_secondary_groups',
|
||||
[
|
||||
$id_agente,
|
||||
explode(',', $secondary_groups),
|
||||
[],
|
||||
]
|
||||
);
|
||||
|
||||
ui_print_success_message(__('Successfully updated'));
|
||||
db_pandora_audit(
|
||||
'Agent management',
|
||||
|
@ -2095,7 +2120,7 @@ if ($delete_module) {
|
|||
exit;
|
||||
}
|
||||
|
||||
// Also call base function to delete modules madafakas de los cojones.
|
||||
// Also call base function to delete modules.
|
||||
modules_delete_agent_module($id_borrar_modulo);
|
||||
|
||||
// Check for errors.
|
||||
|
@ -2313,6 +2338,10 @@ switch ($tab) {
|
|||
include 'agent_incidents.php';
|
||||
break;
|
||||
|
||||
case 'ncm':
|
||||
enterprise_hook('ncm_agent_tab', [$id_agente]);
|
||||
break;
|
||||
|
||||
case 'remote_configuration':
|
||||
enterprise_include('godmode/agentes/agent_disk_conf_editor.php');
|
||||
break;
|
||||
|
@ -2368,7 +2397,7 @@ switch ($tab) {
|
|||
|
||||
var aget_id_os = '<?php echo agents_get_os(modules_get_agentmodule_agent(get_parameter('id_agent_module'))); ?>';
|
||||
|
||||
if('<?php echo html_entity_decode(modules_get_agentmodule_name(get_parameter('id_agent_module'))); ?>' != $('#text-name').val() &&
|
||||
if('<?php echo modules_get_agentmodule_name(get_parameter('id_agent_module')); ?>' != $('#text-name').val() &&
|
||||
'<?php echo agents_get_os(modules_get_agentmodule_agent(get_parameter('id_agent_module'))); ?>' == 19){
|
||||
|
||||
event.preventDefault();
|
||||
|
@ -2402,7 +2431,7 @@ switch ($tab) {
|
|||
|
||||
var module_type_snmp = '<?php echo modules_get_agentmodule_type(get_parameter('id_agent_module')); ?>';
|
||||
|
||||
if('<?php echo html_entity_decode(modules_get_agentmodule_name(get_parameter('id_agent_module'))); ?>' != $('#text-name').val() && (
|
||||
if('<?php echo modules_get_agentmodule_name(get_parameter('id_agent_module')); ?>' != $('#text-name').val() && (
|
||||
module_type_snmp == 15 || module_type_snmp == 16 || module_type_snmp == 17 || module_type_snmp == 18)){
|
||||
|
||||
event.preventDefault();
|
||||
|
|
|
@ -111,12 +111,18 @@ ui_print_standard_header(
|
|||
);
|
||||
|
||||
if (is_management_allowed() === false) {
|
||||
if (is_metaconsole() === false) {
|
||||
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=monitoring&sec2=monitoring/wizard/wizard'
|
||||
).'">'.__('metaconsole').'</a>';
|
||||
} else {
|
||||
$url = __('any node');
|
||||
}
|
||||
|
||||
ui_print_warning_message(
|
||||
__(
|
||||
'This node is configured with centralized mode. Go to %s to delete an agent',
|
||||
'<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=monitoring&sec2=monitoring/wizard/wizard'
|
||||
).'">'.__('metaconsole').'</a>'
|
||||
$url
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -904,7 +910,7 @@ if ($agents !== false) {
|
|||
echo ' onClick="if (!confirm(\' '.__('You are going to enable a cluster agent. Are you sure?').'\')) return false;">';
|
||||
}
|
||||
|
||||
echo html_print_image('images/lightbulb_off.png', true, ['alt' => __('Enable agent'), 'title' => __('Enable agent')]).'</a>';
|
||||
echo html_print_image('images/lightbulb_off.png', true, ['alt' => __('Enable agent'), 'title' => __('Enable agent'), 'class' => 'filter_none']).'</a>';
|
||||
} else {
|
||||
echo "<a href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&
|
||||
disable_agent=".$agent['id_agente']."&group_id=$ag_group&recursion=$recursion&search=$search&offset=$offsetArg&sort_field=$sortField&sort=$sort&disabled=$disabled'";
|
||||
|
|
|
@ -1130,6 +1130,7 @@ foreach ($modules as $module) {
|
|||
[
|
||||
'alt' => __('Enable module'),
|
||||
'title' => __('Enable module'),
|
||||
'class' => 'filter_none',
|
||||
]
|
||||
).'</a>';
|
||||
} else {
|
||||
|
@ -1139,7 +1140,6 @@ foreach ($modules as $module) {
|
|||
[
|
||||
'alt' => __('Disable module'),
|
||||
'title' => __('Disable module'),
|
||||
'class' => 'invert_filter',
|
||||
]
|
||||
).'</a>';
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Begin
|
||||
// Begin.
|
||||
require_once $config['homedir'].'/include/functions_modules.php';
|
||||
require_once $config['homedir'].'/include/functions_categories.php';
|
||||
require_once $config['homedir'].'/include/graphs/functions_d3.php';
|
||||
|
@ -139,7 +139,7 @@ function add_component_selection($id_network_component_type)
|
|||
true,
|
||||
'',
|
||||
false,
|
||||
'width: 460px; '
|
||||
'width: 350px; '
|
||||
);
|
||||
$data[1] .= '</span>';
|
||||
$data[1] .= ' <span id="component_loading" class="invisible">';
|
||||
|
@ -215,7 +215,7 @@ $table_simple->colspan[3][1] = 3;
|
|||
$table_simple->data[0][0] = __('Name');
|
||||
$table_simple->data[0][1] = html_print_input_text_extended(
|
||||
'name',
|
||||
io_safe_input(html_entity_decode($name, ENT_QUOTES, 'UTF-8')),
|
||||
$name,
|
||||
'text-name',
|
||||
'',
|
||||
45,
|
||||
|
@ -273,7 +273,8 @@ $table_simple->data[0][3] .= html_print_select_from_sql(
|
|||
true,
|
||||
false,
|
||||
true,
|
||||
$disabledBecauseInPolicy
|
||||
$disabledBecauseInPolicy,
|
||||
'width: 150px'
|
||||
);
|
||||
|
||||
if ((isset($id_agent_module) && $id_agent_module) || $id_policy_module != 0) {
|
||||
|
@ -358,7 +359,7 @@ if (!$edit) {
|
|||
false,
|
||||
'',
|
||||
false,
|
||||
false,
|
||||
'width:200px',
|
||||
false,
|
||||
100
|
||||
);
|
||||
|
@ -637,7 +638,7 @@ $table_advanced->data[1][4] = html_print_extended_select_for_post_process(
|
|||
'0',
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
'width:10em',
|
||||
false,
|
||||
$disabledBecauseInPolicy
|
||||
);
|
||||
|
|
|
@ -443,6 +443,13 @@ $data[1] = html_print_input_text_extended(
|
|||
$largeClassDisabledBecauseInPolicy,
|
||||
true
|
||||
);
|
||||
$data[1] .= ui_print_help_tip(
|
||||
__(
|
||||
'Please use single quotation marks when necessary. '."\n".'
|
||||
If double quotation marks are needed, please escape them with a backslash (\")'
|
||||
),
|
||||
true
|
||||
);
|
||||
$table_simple->colspan['row-cmd-row-1'][1] = 3;
|
||||
push_table_simple($data, 'row-cmd-row-1');
|
||||
|
||||
|
@ -577,12 +584,7 @@ $(document).ready (function () {
|
|||
$('#text-ip_target').keyup(function() {
|
||||
$('#text-target_ip').val($(this).val());
|
||||
});
|
||||
$('#text-target_ip').keyup(function() {
|
||||
$('#text-ip_target').val($(this).val());
|
||||
});
|
||||
$('#text-community').keyup(function() {
|
||||
$('#text-snmp_community').val($(this).val());
|
||||
});
|
||||
|
||||
$('#text-snmp_community').keyup(function() {
|
||||
$('#text-community').val($(this).val());
|
||||
});
|
||||
|
@ -591,61 +593,25 @@ $(document).ready (function () {
|
|||
// Display or collapse the SNMP browser's v3 options
|
||||
checkSNMPVersion ();
|
||||
});
|
||||
$('#snmp_browser_version').change(function() {
|
||||
$('#snmp_version').val($(this).val());
|
||||
|
||||
// Display or collapse the SNMP v3 options in the main window
|
||||
if ($(this).val() == "3") {
|
||||
$("#simple-field_snmpv3_row1").attr("style", "");
|
||||
$("#simple-field_snmpv3_row2").attr("style", "");
|
||||
$("#simple-field_snmpv3_row3").attr("style", "");
|
||||
$("input[name=active_snmp_v3]").val(1);
|
||||
$("input[name=snmp_community]").attr("disabled", true);
|
||||
}
|
||||
else {
|
||||
$("#simple-field_snmpv3_row1").css("display", "none");
|
||||
$("#simple-field_snmpv3_row2").css("display", "none");
|
||||
$("#simple-field_snmpv3_row3").css("display", "none");
|
||||
$("input[name=active_snmp_v3]").val(0);
|
||||
$("input[name=snmp_community]").removeAttr('disabled');
|
||||
}
|
||||
});
|
||||
$('#snmp3_auth_user').keyup(function() {
|
||||
$('#snmp3_browser_auth_user').val($(this).val());
|
||||
});
|
||||
$('#snmp3_browser_auth_user').keyup(function() {
|
||||
$('#snmp3_auth_user').val($(this).val());
|
||||
});
|
||||
$('#snmp3_security_level').change(function() {
|
||||
$('#snmp3_browser_security_level').val($(this).val());
|
||||
});
|
||||
$('#snmp3_browser_security_level').change(function() {
|
||||
$('#snmp3_security_level').val($(this).val());
|
||||
});
|
||||
$('#snmp3_auth_method').change(function() {
|
||||
$('#snmp3_browser_auth_method').val($(this).val());
|
||||
});
|
||||
$('#snmp3_browser_auth_method').change(function() {
|
||||
$('#snmp3_auth_method').val($(this).val());
|
||||
});
|
||||
$('#snmp3_auth_pass').keyup(function() {
|
||||
$('#snmp3_browser_auth_pass').val($(this).val());
|
||||
});
|
||||
$('#snmp3_browser_auth_pass').keyup(function() {
|
||||
$('#snmp3_auth_pass').val($(this).val());
|
||||
});
|
||||
$('#snmp3_privacy_method').change(function() {
|
||||
$('#snmp3_browser_privacy_method').val($(this).val());
|
||||
});
|
||||
$('#snmp3_browser_privacy_method').change(function() {
|
||||
$('#snmp3_privacy_method').val($(this).val());
|
||||
});
|
||||
$('#snmp3_privacy_pass').keyup(function() {
|
||||
$('#snmp3_browser_privacy_pass').val($(this).val());
|
||||
});
|
||||
$('#snmp3_browser_privacy_pass').keyup(function() {
|
||||
$('#snmp3_privacy_pass').val($(this).val());
|
||||
});
|
||||
|
||||
var custom_ip_target = "<?php echo $custom_ip_target; ?>";
|
||||
if(custom_ip_target == ''){
|
||||
$("#text-custom_ip_target").hide();
|
||||
|
|
|
@ -0,0 +1,195 @@
|
|||
<?php
|
||||
/**
|
||||
* Empty Network map editor.
|
||||
*
|
||||
* @category View
|
||||
* @package Pandora FMS
|
||||
* @subpackage Enterprise
|
||||
* @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.
|
||||
global $config;
|
||||
|
||||
// Check user credentials
|
||||
check_login();
|
||||
|
||||
$id = (int) get_parameter('id_networkmap', 0);
|
||||
|
||||
$new_empty_networkmap = (bool) get_parameter('new_empty_networkmap', false);
|
||||
$edit_networkmap = (bool) get_parameter('edit_networkmap', false);
|
||||
|
||||
$not_found = false;
|
||||
|
||||
if (empty($id)) {
|
||||
$new_empty_networkmap = true;
|
||||
$edit_networkmap = false;
|
||||
}
|
||||
|
||||
if ($new_empty_networkmap) {
|
||||
$name = '';
|
||||
$id_group = 0;
|
||||
$node_radius = 40;
|
||||
$description = '';
|
||||
}
|
||||
|
||||
if ($edit_networkmap) {
|
||||
if (enterprise_installed()) {
|
||||
$disabled_generation_method_select = true;
|
||||
}
|
||||
|
||||
$disabled_source = true;
|
||||
|
||||
$values = db_get_row('tmap', 'id', $id);
|
||||
|
||||
$not_found = false;
|
||||
if ($values === false) {
|
||||
$not_found = true;
|
||||
} else {
|
||||
$id_group = $values['id_group'];
|
||||
|
||||
// ACL for the network map
|
||||
// $networkmap_read = check_acl ($config['id_user'], $id_group, "MR");
|
||||
$networkmap_write = check_acl($config['id_user'], $id_group, 'MW');
|
||||
$networkmap_manage = check_acl($config['id_user'], $id_group, 'MM');
|
||||
|
||||
if (!$networkmap_write && !$networkmap_manage) {
|
||||
db_pandora_audit(
|
||||
'ACL Violation',
|
||||
'Trying to access networkmap'
|
||||
);
|
||||
include 'general/noaccess.php';
|
||||
return;
|
||||
}
|
||||
|
||||
$name = io_safe_output($values['name']);
|
||||
|
||||
$description = $values['description'];
|
||||
|
||||
$filter = json_decode($values['filter'], true);
|
||||
|
||||
$node_radius = $filter['node_radius'];
|
||||
}
|
||||
}
|
||||
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
__('Empty Network maps editor'),
|
||||
'images/bricks.png',
|
||||
false,
|
||||
'network_map_enterprise_edit',
|
||||
false,
|
||||
[],
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Topology maps'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Networkmap'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
if ($not_found) {
|
||||
ui_print_error_message(__('Not found networkmap.'));
|
||||
} else {
|
||||
$table = new StdClass();
|
||||
$table->id = 'form_editor';
|
||||
|
||||
$table->width = '98%';
|
||||
$table->class = 'databox_color';
|
||||
|
||||
$table->head = [];
|
||||
|
||||
$table->size = [];
|
||||
$table->size[0] = '30%';
|
||||
|
||||
$table->style = [];
|
||||
$table->style[0] = 'font-weight: bold; width: 150px;';
|
||||
$table->data = [];
|
||||
|
||||
$table->data[0][0] = __('Name');
|
||||
$table->data[0][1] = html_print_input_text(
|
||||
'name',
|
||||
$name,
|
||||
'',
|
||||
30,
|
||||
100,
|
||||
true
|
||||
);
|
||||
$table->data[1][0] = __('Group');
|
||||
$table->data[1][1] = '<div class="w250px">'.html_print_select_groups(
|
||||
false,
|
||||
'AR',
|
||||
true,
|
||||
'id_group',
|
||||
$id_group,
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true
|
||||
).'</div>';
|
||||
|
||||
$table->data[2][0] = __('Node radius');
|
||||
$table->data[2][1] = html_print_input_text(
|
||||
'node_radius',
|
||||
$node_radius,
|
||||
'',
|
||||
2,
|
||||
10,
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[3][0] = __('Description');
|
||||
$table->data[3][1] = html_print_textarea('description', 7, 25, $description, '', true);
|
||||
|
||||
echo '<form method="post" action="index.php?sec=network&sec2=operation/agentes/pandora_networkmap">';
|
||||
|
||||
html_print_table($table);
|
||||
|
||||
echo "<div style='width: ".$table->width."; text-align: right; margin-top:20px;'>";
|
||||
if ($new_empty_networkmap) {
|
||||
html_print_input_hidden('save_empty_networkmap', 1);
|
||||
html_print_submit_button(
|
||||
__('Save networkmap'),
|
||||
'crt',
|
||||
false,
|
||||
'class="sub next"'
|
||||
);
|
||||
}
|
||||
|
||||
if ($edit_networkmap) {
|
||||
html_print_input_hidden('id_networkmap', $id);
|
||||
html_print_input_hidden('update_empty_networkmap', 1);
|
||||
html_print_submit_button(
|
||||
__('Update networkmap'),
|
||||
'crt',
|
||||
false,
|
||||
'class="sub upd"'
|
||||
);
|
||||
}
|
||||
|
||||
echo '</form>';
|
||||
echo '</div>';
|
||||
}
|
|
@ -215,12 +215,18 @@ if ($delete_action) {
|
|||
|
||||
$is_management_allowed = is_management_allowed();
|
||||
if ($is_management_allowed === false) {
|
||||
if (is_metaconsole() === false) {
|
||||
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=godmode/alerts/alert_actions&tab=action&pure=0'
|
||||
).'">'.__('metaconsole').'</a>';
|
||||
} else {
|
||||
$url = __('any node');
|
||||
}
|
||||
|
||||
ui_print_warning_message(
|
||||
__(
|
||||
'This node is configured with centralized mode. All alert actions information is read only. Go to %s to manage it.',
|
||||
'<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=godmode/alerts/alert_actions&tab=action&pure=0'
|
||||
).'">'.__('metaconsole').'</a>'
|
||||
$url
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -616,12 +616,18 @@ if ($copy_command) {
|
|||
|
||||
$is_management_allowed = is_management_allowed();
|
||||
if ($is_management_allowed === false) {
|
||||
if (is_metaconsole() === false) {
|
||||
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=godmode/alerts/alert_commands&tab=command&pure=0'
|
||||
).'">'.__('metaconsole').'</a>';
|
||||
} else {
|
||||
$url = __('any node');
|
||||
}
|
||||
|
||||
ui_print_warning_message(
|
||||
__(
|
||||
'This node is configured with centralized mode. All alert commands information is read only. Go to %s to manage it.',
|
||||
'<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=godmode/alerts/alert_commands&tab=command&pure=0'
|
||||
).'">'.__('metaconsole').'</a>'
|
||||
$url
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -708,7 +708,7 @@ foreach ($simple_alerts as $alert) {
|
|||
|
||||
$data[3] .= '<div id="add_action-div-'.$alert['id'].'" class="invisible left">';
|
||||
$data[3] .= '<form id="add_action_form-'.$alert['id'].'" method="post">';
|
||||
$data[3] .= '<table class="databox_color w100p">';
|
||||
$data[3] .= '<table class="databox_color w100p bg_color222">';
|
||||
$data[3] .= html_print_input_hidden('add_action', 1, true);
|
||||
$data[3] .= html_print_input_hidden('id_alert_module', $alert['id'], true);
|
||||
|
||||
|
@ -811,7 +811,7 @@ foreach ($simple_alerts as $alert) {
|
|||
1,
|
||||
'padding:0px',
|
||||
true,
|
||||
['class' => 'invert_filter']
|
||||
['class' => 'filter_none']
|
||||
);
|
||||
$data[4] .= html_print_input_hidden('enable_alert', 1, true);
|
||||
} else {
|
||||
|
@ -861,10 +861,16 @@ foreach ($simple_alerts as $alert) {
|
|||
if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW')) {
|
||||
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) {
|
||||
$policyInfo = policies_is_alert_in_policy2($alert['id'], false);
|
||||
if ($policyInfo === false) {
|
||||
$data[1] .= '';
|
||||
$module_linked = policies_is_module_linked($alert['id_agent_module']);
|
||||
if (is_array($policyInfo) === false && $module_linked === false) {
|
||||
$data[$index['policy']] = '';
|
||||
} else {
|
||||
$img = 'images/policies_mc.png';
|
||||
$module_linked = policies_is_module_linked($alert['id_agent_module']);
|
||||
if ($module_linked === '0') {
|
||||
$img = 'images/unlinkpolicy.png';
|
||||
} else {
|
||||
$img = 'images/policies_mc.png';
|
||||
}
|
||||
|
||||
$data[1] .= ' <a href="?sec=gmodules&sec2=enterprise/godmode/policies/policies&pure='.$pure.'&id='.$policyInfo['id'].'">'.html_print_image($img, true, ['title' => $policyInfo['name']]).'</a>';
|
||||
}
|
||||
|
@ -886,7 +892,7 @@ foreach ($simple_alerts as $alert) {
|
|||
]
|
||||
);
|
||||
} else {
|
||||
if ((int) $alert['id_policy_alerts'] === 0) {
|
||||
if ((int) $alert['id_policy_alerts'] === 0 || $module_linked === '0') {
|
||||
$data[4] .= '<a href="javascript:show_add_action(\''.$alert['id'].'\');">';
|
||||
$data[4] .= html_print_image('images/add.png', true, ['title' => __('Add action'), 'class' => 'invert_filter']);
|
||||
$data[4] .= '</a>';
|
||||
|
@ -992,7 +998,7 @@ if (! $id_agente) {
|
|||
echo '"'.html_print_image(
|
||||
'images/lightbulb_off.png',
|
||||
true,
|
||||
false,
|
||||
['class' => 'filter_none'],
|
||||
true
|
||||
).'"';
|
||||
?>
|
||||
|
@ -1031,7 +1037,7 @@ if (! $id_agente) {
|
|||
echo '"'.html_print_image(
|
||||
'images/lightbulb_off.png',
|
||||
true,
|
||||
false,
|
||||
['class' => 'filter_none'],
|
||||
true
|
||||
).'"';
|
||||
?>
|
||||
|
@ -1120,6 +1126,12 @@ function show_add_action(id_alert) {
|
|||
opacity: 0.5,
|
||||
background: "black"
|
||||
},
|
||||
open: function() {
|
||||
$("#action_select, #action_select").select2({
|
||||
tags: true,
|
||||
dropdownParent: $("#add_action-div-" + id_alert)
|
||||
});
|
||||
},
|
||||
width: 500,
|
||||
height: 300
|
||||
})
|
||||
|
@ -1150,6 +1162,12 @@ function show_display_update_action(id_module_action, alert_id, alert_id_agent_m
|
|||
opacity: 0.5,
|
||||
background: "black"
|
||||
},
|
||||
open: function() {
|
||||
$("#action_select_ajax, #action_select_ajax").select2({
|
||||
tags: true,
|
||||
dropdownParent: $("#update_action-div")
|
||||
});
|
||||
},
|
||||
width: 500,
|
||||
height: 300
|
||||
})
|
||||
|
|
|
@ -260,12 +260,18 @@ if ($delete_template) {
|
|||
}
|
||||
|
||||
if (is_management_allowed() === false) {
|
||||
if (is_metaconsole() === false) {
|
||||
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=godmode/alerts/alert_templates&tab=template'
|
||||
).'">'.__('metaconsole').'</a>';
|
||||
} else {
|
||||
$url = __('any node');
|
||||
}
|
||||
|
||||
ui_print_warning_message(
|
||||
__(
|
||||
'This node is configured with centralized mode. All alert templates information is read only. Go to %s to manage it.',
|
||||
'<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=godmode/alerts/alert_templates&tab=template'
|
||||
).'">'.__('metaconsole').'</a>'
|
||||
$url
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -104,12 +104,18 @@ if (!$is_in_group && $al_action['id_group'] != 0) {
|
|||
$is_management_allowed = is_management_allowed();
|
||||
|
||||
if ($is_management_allowed === false) {
|
||||
if (is_metaconsole() === false) {
|
||||
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=godmode/alerts/configure_alert_action&tab=action&pure=0&id='.$id
|
||||
).'">'.__('metaconsole').'</a>';
|
||||
} else {
|
||||
$url = __('any node');
|
||||
}
|
||||
|
||||
ui_print_warning_message(
|
||||
__(
|
||||
'This node is configured with centralized mode. All alert actions information is read only. Go to %s to manage it.',
|
||||
'<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=godmode/alerts/configure_alert_action&tab=action&pure=0&id='.$id
|
||||
).'">'.__('metaconsole').'</a>'
|
||||
$url
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -135,6 +141,10 @@ if ($id) {
|
|||
$create_wu_integria = $action['create_wu_integria'];
|
||||
}
|
||||
|
||||
if (users_can_manage_group_all('LW') === false && !$id) {
|
||||
$group = users_get_first_group(false, 'LW', false);
|
||||
}
|
||||
|
||||
// Hidden div with help hint to fill with javascript.
|
||||
html_print_div(
|
||||
[
|
||||
|
@ -227,7 +237,7 @@ $create_ticket_command_id = db_get_value('id', 'talert_commands', 'name', io_saf
|
|||
|
||||
$sql_exclude_command_id = '';
|
||||
|
||||
if ($config['integria_enabled'] == 0 && $create_ticket_command_id !== false) {
|
||||
if (!is_metaconsole() && $config['integria_enabled'] == 0 && $create_ticket_command_id !== false) {
|
||||
$sql_exclude_command_id = ' AND id <> '.$create_ticket_command_id;
|
||||
}
|
||||
|
||||
|
@ -587,6 +597,7 @@ $(document).ready (function () {
|
|||
|
||||
$("#id_command").change (function () {
|
||||
values = Array ();
|
||||
// No se envia el valor del commando.
|
||||
values.push({
|
||||
name: "page",
|
||||
value: "godmode/alerts/alert_commands"});
|
||||
|
@ -623,9 +634,6 @@ $(document).ready (function () {
|
|||
$("#group option").each(function(index, value) {
|
||||
var current_group = $(value).val();
|
||||
});
|
||||
if (data.id_group != 0 && $("#group").val() != data.id_group) {
|
||||
$("#group").val(0);
|
||||
}
|
||||
|
||||
var integria_custom_fields_values = [];
|
||||
var integria_custom_fields_rvalues = [];
|
||||
|
|
|
@ -159,12 +159,18 @@ if (empty($fields_hidden) === false) {
|
|||
$is_management_allowed = is_management_allowed();
|
||||
|
||||
if ($is_management_allowed === false) {
|
||||
if (is_metaconsole() === false) {
|
||||
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=godmode/alerts/configure_alert_command&pure=0&id='.$id
|
||||
).'">'.__('metaconsole').'</a>';
|
||||
} else {
|
||||
$url = __('any node');
|
||||
}
|
||||
|
||||
ui_print_warning_message(
|
||||
__(
|
||||
'This node is configured with centralized mode. All alert commands information is read only. Go to %s to manage it.',
|
||||
'<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=godmode/alerts/configure_alert_command&pure=0&id='.$id
|
||||
).'">'.__('metaconsole').'</a>'
|
||||
$url
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -373,12 +373,18 @@ function update_template($step)
|
|||
$is_management_allowed = is_management_allowed();
|
||||
|
||||
if ($is_management_allowed === false) {
|
||||
if (is_metaconsole() === false) {
|
||||
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=godmode/alerts/configure_alert_template&pure=0&id='.$id.'&step='.$step
|
||||
).'">'.__('metaconsole').'</a>';
|
||||
} else {
|
||||
$url = __('any node');
|
||||
}
|
||||
|
||||
ui_print_warning_message(
|
||||
__(
|
||||
'This node is configured with centralized mode. All alerts templates information is read only. Go to Go to %s to manage it.',
|
||||
'<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=godmode/alerts/configure_alert_template&pure=0&id='.$id.'&step='.$step
|
||||
).'">'.__('metaconsole').'</a>'
|
||||
$url
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -92,12 +92,18 @@ if (is_metaconsole() === true) {
|
|||
$is_management_allowed = true;
|
||||
if (is_management_allowed() === false) {
|
||||
$is_management_allowed = false;
|
||||
if (is_metaconsole() === false) {
|
||||
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=godmode/category/category&tab=list&pure='.(int) $config['pure']
|
||||
).'">'.__('metaconsole').'</a>';
|
||||
} else {
|
||||
$url = __('any node');
|
||||
}
|
||||
|
||||
ui_print_warning_message(
|
||||
__(
|
||||
'This node is configured with centralized mode. All categories information is read only. Go to %s to manage it.',
|
||||
'<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=godmode/category/category&tab=list&pure='.(int) $config['pure']
|
||||
).'">'.__('metaconsole').'</a>'
|
||||
$url
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -95,6 +95,7 @@ $fields_available['id_evento'] = __('Event Id');
|
|||
$fields_available['evento'] = __('Event Name');
|
||||
$fields_available['id_agente'] = __('Agent ID');
|
||||
$fields_available['agent_name'] = __('Agent Name');
|
||||
$fields_available['direccion'] = __('Agent IP');
|
||||
$fields_available['id_usuario'] = __('User');
|
||||
$fields_available['id_grupo'] = __('Group');
|
||||
$fields_available['estado'] = __('Status');
|
||||
|
|
|
@ -254,7 +254,7 @@ foreach ($extensions as $file => $extension) {
|
|||
if ($file != 'update_manager.php') {
|
||||
$table->cellclass[][10] = 'action_buttons';
|
||||
if (!$extension['enabled']) {
|
||||
$data[] = '<a title="'.__('Delete').'" href="index.php?sec=godmode/extensions&sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&delete='.$file.'" class="mn">'.html_print_image('images/cross.disabled.png', true).'</a>'.' <a title="'.__('Enable').'" href="index.php?sec=godmode/extensions&sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&enabled='.$file.'" class="mn">'.html_print_image('images/lightbulb_off.png', true).'</a>';
|
||||
$data[] = '<a title="'.__('Delete').'" href="index.php?sec=godmode/extensions&sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&delete='.$file.'" class="mn">'.html_print_image('images/cross.disabled.png', true, ['class' => 'filter_none']).'</a>'.' <a title="'.__('Enable').'" href="index.php?sec=godmode/extensions&sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&enabled='.$file.'" class="mn">'.html_print_image('images/lightbulb_off.png', true, ['class' => 'filter_none']).'</a>';
|
||||
} else {
|
||||
$data[] = '<a title="'.__('Delete').'" href="index.php?sec=godmode/extensions&sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&delete='.$file.'" class="mn">'.html_print_image('images/cross.png', true, ['class' => 'invert_filter']).'</a>'.' <a title="'.__('Disable').'" href="index.php?sec=godmode/extensions&sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&disabled='.$file.'" class="mn">'.html_print_image('images/lightbulb.png', true).'</a>';
|
||||
}
|
||||
|
|
|
@ -382,12 +382,18 @@ if (is_metaconsole() === true) {
|
|||
$is_management_allowed = true;
|
||||
if (is_management_allowed() === false) {
|
||||
$is_management_allowed = false;
|
||||
if (is_metaconsole() === false) {
|
||||
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=godmode/groups/group_list&tab=groups'
|
||||
).'">'.__('metaconsole').'</a>';
|
||||
} else {
|
||||
$url = __('any node');
|
||||
}
|
||||
|
||||
ui_print_warning_message(
|
||||
__(
|
||||
'This node is configured with centralized mode. All groups information is read only. Go to %s to manage it.',
|
||||
'<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=godmode/groups/group_list&tab=groups'
|
||||
).'">'.__('metaconsole').'</a>'
|
||||
$url
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -79,12 +79,18 @@ if (is_metaconsole() === false) {
|
|||
$is_management_allowed = true;
|
||||
if (is_management_allowed() === false) {
|
||||
$is_management_allowed = false;
|
||||
if (is_metaconsole() === false) {
|
||||
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=advanced/component_management&tab=module_group'
|
||||
).'">'.__('metaconsole').'</a>';
|
||||
} else {
|
||||
$url = __('any node');
|
||||
}
|
||||
|
||||
ui_print_warning_message(
|
||||
__(
|
||||
'This node is configured with centralized mode. All module groups information is read only. Go to %s to manage it.',
|
||||
'<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=advanced/component_management&tab=module_group'
|
||||
).'">'.__('metaconsole').'</a>'
|
||||
$url
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -39,12 +39,18 @@ if (!check_acl($config['id_user'], 0, 'UM')) {
|
|||
}
|
||||
|
||||
if (is_management_allowed() === false) {
|
||||
if (is_metaconsole() === false) {
|
||||
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=advanced/users_setup&tab=profile&pure='.(int) $config['pure']
|
||||
).'">'.__('metaconsole').'</a>';
|
||||
} else {
|
||||
$url = __('any node');
|
||||
}
|
||||
|
||||
ui_print_warning_message(
|
||||
__(
|
||||
'This node is configured with centralized mode. All profiles user information is read only. Go to %s to manage it.',
|
||||
'<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=advanced/users_setup&tab=profile&pure=0'
|
||||
).'">'.__('metaconsole').'</a>'
|
||||
$url
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -79,7 +85,7 @@ if ($create_profiles) {
|
|||
);
|
||||
$return = profile_create_user_profile($user, $profile, $group);
|
||||
if ($return !== false) {
|
||||
$n_added ++;
|
||||
$n_added++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -404,7 +404,8 @@ $(document).ready (function () {
|
|||
"get_agent_modules_json" : 1,
|
||||
"get_id_and_name" : 1,
|
||||
"disabled" : 0,
|
||||
"id_agent" : id_agent
|
||||
"id_agent" : id_agent,
|
||||
"safe_name": 1,
|
||||
};
|
||||
|
||||
var tags_to_search = $('#tags').val();
|
||||
|
@ -434,7 +435,7 @@ $(document).ready (function () {
|
|||
jQuery.each (data, function (i, val) {
|
||||
option = $("<option></option>")
|
||||
.attr ("value", val["id_agente_modulo"])
|
||||
.append (val["nombre"]);
|
||||
.append (val["safe_name"]);
|
||||
$("#target_modules").append (option);
|
||||
});
|
||||
|
||||
|
|
|
@ -685,7 +685,8 @@ $(document).ready (function () {
|
|||
"get_agent_modules_json" : 1,
|
||||
"get_distinct_name" : 1,
|
||||
"indexed" : 0,
|
||||
"privilege" : "AW"
|
||||
"privilege" : "AW",
|
||||
"safe_name": 1
|
||||
};
|
||||
|
||||
if (this.value != '0')
|
||||
|
@ -712,7 +713,7 @@ $(document).ready (function () {
|
|||
jQuery.each (data, function (id, value) {
|
||||
option = $("<option></option>")
|
||||
.attr("value", value["nombre"])
|
||||
.html(value["nombre"]);
|
||||
.html(value["safe_name"]);
|
||||
$("#module_name").append (option);
|
||||
});
|
||||
hideSpinner();
|
||||
|
|
|
@ -39,12 +39,18 @@ if (! check_acl($config['id_user'], 0, 'UM')) {
|
|||
}
|
||||
|
||||
if (is_management_allowed() === false) {
|
||||
if (is_metaconsole() === false) {
|
||||
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=advanced/users_setup&tab=profile&pure='.(int) $config['pure']
|
||||
).'">'.__('metaconsole').'</a>';
|
||||
} else {
|
||||
$url = __('any node');
|
||||
}
|
||||
|
||||
ui_print_warning_message(
|
||||
__(
|
||||
'This node is configured with centralized mode. All profiles user information is read only. Go to %s to manage it.',
|
||||
'<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=advanced/users_setup&tab=profile&pure=0'
|
||||
).'">'.__('metaconsole').'</a>'
|
||||
$url
|
||||
)
|
||||
);
|
||||
|
||||
|
|
|
@ -1326,12 +1326,13 @@ $(document).ready (function () {
|
|||
"page" : "operation/agentes/ver_agente",
|
||||
"get_agent_modules_json" : 1,
|
||||
"get_distinct_name" : 1,
|
||||
"indexed" : 0
|
||||
"indexed" : 0,
|
||||
"safe_name" : 1
|
||||
};
|
||||
|
||||
|
||||
if (this.value != '0')
|
||||
params['id_tipo_modulo'] = this.value;
|
||||
|
||||
|
||||
var status_module = $('#status_module').val();
|
||||
if (status_module != '-1')
|
||||
params['status_module'] = status_module;
|
||||
|
@ -1342,16 +1343,16 @@ $(document).ready (function () {
|
|||
params['tags'] = tags_to_search;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
showSpinner();
|
||||
$("tr#delete_table-edit1, tr#delete_table-edit0, tr#delete_table-edit2").hide ();
|
||||
$("#module_name").attr ("disabled", "disabled")
|
||||
$("#module_name option[value!=0]").remove ();
|
||||
$("#module_name option[value!=0]").remove();
|
||||
jQuery.post ("ajax.php",
|
||||
params,
|
||||
function (data, status) {
|
||||
jQuery.each (data, function (id, value) {
|
||||
option = $("<option></option>").attr ("value", value["nombre"]).html (value["nombre"]);
|
||||
option = $("<option></option>").attr("value", value["nombre"]).html(value["safe_name"]);
|
||||
$("#module_name").append (option);
|
||||
});
|
||||
hideSpinner();
|
||||
|
|
|
@ -219,7 +219,8 @@ $alertstab = [
|
|||
'title' => __('Alerts operations'),
|
||||
'class' => 'invert_filter',
|
||||
]
|
||||
).'</a>', 'active' => $tab == 'massive_alerts',
|
||||
).'</a>',
|
||||
'active' => $tab == 'massive_alerts',
|
||||
];
|
||||
|
||||
$userstab = [
|
||||
|
@ -230,7 +231,8 @@ $userstab = [
|
|||
'title' => __('Users operations'),
|
||||
'class' => 'invert_filter',
|
||||
]
|
||||
).'</a>', 'active' => $tab == 'massive_users',
|
||||
).'</a>',
|
||||
'active' => $tab == 'massive_users',
|
||||
];
|
||||
|
||||
$agentstab = [
|
||||
|
@ -241,7 +243,8 @@ $agentstab = [
|
|||
'title' => __('Agents operations'),
|
||||
'class' => 'invert_filter',
|
||||
]
|
||||
).'</a>', 'active' => $tab == 'massive_agents',
|
||||
).'</a>',
|
||||
'active' => $tab == 'massive_agents',
|
||||
];
|
||||
|
||||
$modulestab = [
|
||||
|
@ -252,7 +255,8 @@ $agentstab = [
|
|||
'title' => __('Modules operations'),
|
||||
'class' => 'invert_filter',
|
||||
]
|
||||
).'</a>', 'active' => $tab == 'massive_modules',
|
||||
).'</a>',
|
||||
'active' => $tab == 'massive_modules',
|
||||
];
|
||||
|
||||
$pluginstab = [
|
||||
|
@ -263,7 +267,8 @@ $agentstab = [
|
|||
'title' => __('Plugins operations'),
|
||||
'class' => 'invert_filter',
|
||||
]
|
||||
).'</a>', 'active' => $tab == 'massive_plugins',
|
||||
).'</a>',
|
||||
'active' => $tab == 'massive_plugins',
|
||||
];
|
||||
|
||||
$policiestab = enterprise_hook('massive_policies_tab');
|
||||
|
@ -334,12 +339,18 @@ $agentstab = [
|
|||
}
|
||||
|
||||
if ($tab == 'massive_policies' && is_management_allowed() === false) {
|
||||
if (is_metaconsole() === false) {
|
||||
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=advanced/policymanager'
|
||||
).'">'.__('metaconsole').'</a>';
|
||||
} else {
|
||||
$url = __('any node');
|
||||
}
|
||||
|
||||
ui_print_warning_message(
|
||||
__(
|
||||
'This node is configured with centralized mode. All policies information is read only. Go to %s to manage it.',
|
||||
'<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=advanced/policymanager'
|
||||
).'">'.__('metaconsole').'</a>'
|
||||
$url
|
||||
)
|
||||
);
|
||||
return;
|
||||
|
@ -401,12 +412,18 @@ $agentstab = [
|
|||
|
||||
<?php
|
||||
if (is_management_allowed() === false && $option == 'delete_agents') {
|
||||
if (is_metaconsole() === false) {
|
||||
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=monitoring&sec2=monitoring/wizard/wizard'
|
||||
).'">'.__('metaconsole').'</a>';
|
||||
} else {
|
||||
$url = __('any node');
|
||||
}
|
||||
|
||||
ui_print_warning_message(
|
||||
__(
|
||||
'This node is configured with centralized mode. To delete agents go to %s',
|
||||
'<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=monitoring&sec2=monitoring/wizard/wizard'
|
||||
).'">'.__('metaconsole').'</a>'
|
||||
$url
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -175,6 +175,10 @@ if (check_acl($config['id_user'], 0, 'AW')) {
|
|||
enterprise_hook('agents_submenu');
|
||||
}
|
||||
|
||||
if (check_acl($config['id_user'], 0, 'NW')) {
|
||||
enterprise_hook('agents_ncm_submenu');
|
||||
}
|
||||
|
||||
if (check_acl($config['id_user'], 0, 'AW')) {
|
||||
$sub['gmassive']['text'] = __('Bulk operations');
|
||||
$sub['gmassive']['id'] = 'Bulk operations';
|
||||
|
@ -458,9 +462,9 @@ if (is_array($config['extensions'])) {
|
|||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['refr'] = 0;
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['icon'] = $extmenu['icon'];
|
||||
if ($extmenu['name'] == 'Cron jobs') {
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['sec'] = 'extensions';
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['sec'] = $extmenu['fatherId'];
|
||||
} else {
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['sec'] = 'gextensions';
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['sec'] = $extmenu['fatherId'];
|
||||
}
|
||||
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['extension'] = true;
|
||||
|
@ -521,14 +525,12 @@ $menu_godmode['links']['sub'] = $sub;
|
|||
// Update Manager
|
||||
if (check_acl($config['id_user'], 0, 'PM') && $config['enable_update_manager']) {
|
||||
$menu_godmode['messages']['text'] = __('Update manager');
|
||||
$menu_godmode['messages']['sec2'] = '';
|
||||
$menu_godmode['messages']['id'] = 'god-um_messages';
|
||||
$menu_godmode['messages']['sec2'] = 'godmode/update_manager/update_manager';
|
||||
|
||||
$sub = [];
|
||||
if ($config['enterprise_installed']) {
|
||||
$sub['godmode/update_manager/update_manager&tab=offline']['text'] = __('Update Manager offline');
|
||||
$sub['godmode/update_manager/update_manager&tab=offline']['id'] = 'Offline';
|
||||
}
|
||||
$sub['godmode/update_manager/update_manager&tab=offline']['text'] = __('Update Manager offline');
|
||||
$sub['godmode/update_manager/update_manager&tab=offline']['id'] = 'Offline';
|
||||
|
||||
$sub['godmode/update_manager/update_manager&tab=online']['text'] = __('Update Manager online');
|
||||
$sub['godmode/update_manager/update_manager&tab=online']['id'] = 'Online';
|
||||
|
@ -541,7 +543,6 @@ if (check_acl($config['id_user'], 0, 'PM') && $config['enable_update_manager'])
|
|||
// Module library.
|
||||
if (check_acl($config['id_user'], 0, 'AR')) {
|
||||
$menu_godmode['gmodule_library']['text'] = __('Module library');
|
||||
$menu_godmode['gmodule_library']['sec2'] = 'godmode/module_library/module_library_view';
|
||||
$menu_godmode['gmodule_library']['id'] = 'god-module_library';
|
||||
|
||||
$sub = [];
|
||||
|
|
|
@ -271,12 +271,18 @@ foreach ($groups as $group) {
|
|||
}
|
||||
|
||||
if (is_management_allowed() === false && is_metaconsole() === false) {
|
||||
if (is_metaconsole() === false) {
|
||||
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=godmode/modules/manage_nc_groups'
|
||||
).'">'.__('metaconsole').'</a>';
|
||||
} else {
|
||||
$url = __('any node');
|
||||
}
|
||||
|
||||
ui_print_warning_message(
|
||||
__(
|
||||
'This node is configured with centralized mode. Component groups are read only. Go to %s to manage it.',
|
||||
'<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=godmode/modules/manage_nc_groups'
|
||||
).'">'.__('metaconsole').'</a>'
|
||||
$url
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -297,12 +297,18 @@ if (is_metaconsole() === true) {
|
|||
}
|
||||
|
||||
if ($is_management_allowed === false) {
|
||||
if (is_metaconsole() === false) {
|
||||
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=godmode/modules/manage_network_components&tab=network&pure='.(int) $config['pure']
|
||||
).'">'.__('metaconsole').'</a>';
|
||||
} else {
|
||||
$url = __('any node');
|
||||
}
|
||||
|
||||
ui_print_warning_message(
|
||||
__(
|
||||
'This node is configured with centralized mode. All remote components are read only. Go to %s to manage them.',
|
||||
'<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=godmode/modules/manage_network_components&tab=network&pure=0'
|
||||
).'">'.__('metaconsole').'</a>'
|
||||
$url
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -575,7 +581,7 @@ if ($is_management_allowed === true && $multiple_delete) {
|
|||
$id = 0;
|
||||
}
|
||||
|
||||
if ($id || $new_component
|
||||
if ((bool) $id !== false || $new_component
|
||||
|| $create_network_from_module
|
||||
|| $create_network_from_snmp_browser
|
||||
) {
|
||||
|
@ -592,6 +598,7 @@ $url = ui_get_url_refresh(
|
|||
'offset' => false,
|
||||
'search_string' => $search_string,
|
||||
'search_id_group' => $search_id_group,
|
||||
'id' => $id,
|
||||
],
|
||||
true,
|
||||
false
|
||||
|
|
|
@ -331,9 +331,9 @@ echo "<form method='post' action='index.php?sec=reporting&sec2=godmode/reporting
|
|||
|
||||
echo "<table width='100%' cellpadding='4' cellpadding='4' class='databox filters'>";
|
||||
echo '<tr>';
|
||||
echo "<td colspan='3'>".__('Filter group').'</td>';
|
||||
echo "<td colspan='1'>".__('Filter group').'</td>';
|
||||
echo '</tr><tr>';
|
||||
echo "<td colspan='3'>".html_print_select_groups(
|
||||
echo "<td colspan='1'>".html_print_select_groups(
|
||||
$config['id_user'],
|
||||
($report_w == true) ? 'RW' : (($report_m == true) ? 'RM' : 'RW'),
|
||||
true,
|
||||
|
|
|
@ -162,12 +162,14 @@ $filter_exclude = '';
|
|||
$total_time = true;
|
||||
$time_failed = true;
|
||||
$time_in_ok_status = true;
|
||||
$time_in_warning_status = false;
|
||||
$time_in_unknown_status = true;
|
||||
$time_of_not_initialized_module = true;
|
||||
$time_of_downtime = true;
|
||||
$total_checks = true;
|
||||
$checks_failed = true;
|
||||
$checks_in_ok_status = true;
|
||||
$checks_in_warning_status = true;
|
||||
$unknown_checks = true;
|
||||
$agent_max_value = true;
|
||||
$agent_min_value = true;
|
||||
|
@ -358,7 +360,6 @@ switch ($action) {
|
|||
$failover_type = $item['failover_type'];
|
||||
break;
|
||||
|
||||
case 'histogram_data':
|
||||
case 'module_histogram_graph':
|
||||
$description = $item['description'];
|
||||
$period = $item['period'];
|
||||
|
@ -399,6 +400,12 @@ switch ($action) {
|
|||
$sla_sorted_by = $item['top_n'];
|
||||
break;
|
||||
|
||||
case 'IPAM_network':
|
||||
$network_filter = $item['ipam_network_filter'];
|
||||
$alive_ip = $item['ipam_alive_ips'];
|
||||
$agent_not_assigned_to_ip = $item['ipam_ip_not_assigned_to_agent'];
|
||||
break;
|
||||
|
||||
case 'monitor_report':
|
||||
$description = $item['description'];
|
||||
$idAgentModule = $item['id_agent_module'];
|
||||
|
@ -673,12 +680,14 @@ switch ($action) {
|
|||
$total_time = $item['total_time'];
|
||||
$time_failed = $item['time_failed'];
|
||||
$time_in_ok_status = $item['time_in_ok_status'];
|
||||
$time_in_warning_status = $item['time_in_warning_status'];
|
||||
$time_in_unknown_status = $item['time_in_unknown_status'];
|
||||
$time_of_not_initialized_module = $item['time_of_not_initialized_module'];
|
||||
$time_of_downtime = $item['time_of_downtime'];
|
||||
$total_checks = $item['total_checks'];
|
||||
$checks_failed = $item['checks_failed'];
|
||||
$checks_in_ok_status = $item['checks_in_ok_status'];
|
||||
$checks_in_warning_status = $item['checks_in_warning_status'];
|
||||
$unknown_checks = $item['unknown_checks'];
|
||||
$agent_max_value = $item['agent_max_value'];
|
||||
$agent_min_value = $item['agent_min_value'];
|
||||
|
@ -748,6 +757,7 @@ switch ($action) {
|
|||
$selected_agent_group_filter = $es['agent_group_filter'];
|
||||
$selected_agents_inventory_display_options = $es['agents_inventory_display_options'];
|
||||
$selected_agent_os_filter = $es['agent_os_filter'];
|
||||
$selected_agent_custom_fields = $es['agent_custom_fields'];
|
||||
$selected_agent_custom_field_filter = $es['agent_custom_field_filter'];
|
||||
$selected_agent_status_filter = $es['agent_status_filter'];
|
||||
$selected_agent_module_search_filter = $es['agent_module_search_filter'];
|
||||
|
@ -836,7 +846,6 @@ switch ($action) {
|
|||
case 'database_serialized':
|
||||
case 'last_value':
|
||||
case 'monitor_report':
|
||||
case 'histogram_data':
|
||||
case 'min_value':
|
||||
case 'max_value':
|
||||
case 'avg_value':
|
||||
|
@ -1067,6 +1076,51 @@ $class = 'databox filters';
|
|||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="row_network_filter" class="datos">
|
||||
<td class="bolder"><?php echo __('Filter by network'); ?></td>
|
||||
<td>
|
||||
<?php
|
||||
$sql = 'SELECT id, CONCAT(name_network, " (", network, ")")
|
||||
FROM tipam_network';
|
||||
|
||||
html_print_select_from_sql(
|
||||
$sql,
|
||||
'network_filter',
|
||||
$network_filter,
|
||||
'',
|
||||
'',
|
||||
'0'
|
||||
);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="row_alive_ip" class="datos">
|
||||
<td class="bolder"><?php echo __('Show alive IPs only'); ?></td>
|
||||
<td>
|
||||
<?php
|
||||
html_print_checkbox_switch(
|
||||
'alive_ip',
|
||||
1,
|
||||
$alive_ip
|
||||
);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="row_agent_not_assigned_to_ip" class="datos">
|
||||
<td class="bolder"><?php echo __('Show IPs not assigned to an agent'); ?></td>
|
||||
<td>
|
||||
<?php
|
||||
html_print_checkbox_switch(
|
||||
'agent_not_assigned_to_ip',
|
||||
1,
|
||||
$agent_not_assigned_to_ip
|
||||
);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="row_period" class="datos">
|
||||
<td class="bolder">
|
||||
<?php
|
||||
|
@ -2309,6 +2363,14 @@ $class = 'databox filters';
|
|||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p class="mrgn_right_30px">
|
||||
<?php
|
||||
echo __('Time in warning status').'<br>';
|
||||
html_print_checkbox_switch('time_in_warning_status', 1, $time_in_warning_status);
|
||||
?>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p class="mrgn_right_30px">
|
||||
<?php
|
||||
echo __('Time in unknown status').'<br>';
|
||||
|
@ -2421,6 +2483,18 @@ $class = 'databox filters';
|
|||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p class="mrgn_right_30px">
|
||||
<?php
|
||||
echo __('Checks in Warning status');
|
||||
html_print_checkbox(
|
||||
'checks_in_warning_status',
|
||||
1,
|
||||
$checks_in_warning_status
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p class="mrgn_right_30px">
|
||||
<?php
|
||||
echo __('Unknown checks');
|
||||
|
@ -3080,14 +3154,15 @@ $class = 'databox filters';
|
|||
</tr>
|
||||
|
||||
<?php
|
||||
$server_fields = [];
|
||||
if (is_metaconsole()) {
|
||||
$server_fields = [];
|
||||
$server_fields[0] = __('All');
|
||||
|
||||
$servers = metaconsole_get_servers();
|
||||
|
||||
foreach ($servers as $key => $server) {
|
||||
$server_fields[$key] = $server['server_name'];
|
||||
}
|
||||
foreach ($servers as $key => $server) {
|
||||
$server_fields[$key] = $server['server_name'];
|
||||
}
|
||||
|
||||
$server_filter_markup = '
|
||||
<tr id="row_agent_server_filter" class="datos">
|
||||
|
@ -3106,10 +3181,9 @@ $class = 'databox filters';
|
|||
'min-width: 180px'
|
||||
).'</td></tr>';
|
||||
|
||||
if (is_metaconsole()) {
|
||||
echo $server_filter_markup;
|
||||
}
|
||||
?>
|
||||
echo $server_filter_markup;
|
||||
}
|
||||
?>
|
||||
|
||||
<tr id="row_agent_group_filter" class="datos">
|
||||
<td class="bolder">
|
||||
|
@ -3158,6 +3232,28 @@ $class = 'databox filters';
|
|||
</tr>
|
||||
|
||||
<tr id="row_custom_field" class="datos">
|
||||
<td class="bolder">
|
||||
<?php
|
||||
echo __('Agent custom field');
|
||||
?>
|
||||
</td>
|
||||
<td >
|
||||
<?php
|
||||
html_print_select_from_sql(
|
||||
'SELECT id_field, name FROM tagent_custom_fields',
|
||||
'agent_custom_fields[]',
|
||||
$selected_agent_custom_fields,
|
||||
'',
|
||||
__('All'),
|
||||
'0',
|
||||
false,
|
||||
true
|
||||
);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="row_custom_field_filter" class="datos">
|
||||
<td class="bolder">
|
||||
<?php
|
||||
echo __('Agent custom field filter');
|
||||
|
@ -4410,7 +4506,6 @@ $(document).ready (function () {
|
|||
case 'max_value':
|
||||
case 'min_value':
|
||||
case 'monitor_report':
|
||||
case 'histogram_data':
|
||||
case 'database_serialized':
|
||||
case 'last_value':
|
||||
case 'sumatory':
|
||||
|
@ -4464,7 +4559,6 @@ $(document).ready (function () {
|
|||
case 'prediction_date':
|
||||
case 'projection_graph':
|
||||
case 'monitor_report':
|
||||
case 'histogram_data':
|
||||
case 'module_histogram_graph':
|
||||
case 'avg_value':
|
||||
case 'max_value':
|
||||
|
@ -4550,7 +4644,6 @@ $(document).ready (function () {
|
|||
case 'max_value':
|
||||
case 'min_value':
|
||||
case 'monitor_report':
|
||||
case 'histogram_data':
|
||||
case 'database_serialized':
|
||||
case 'last_value':
|
||||
case 'sumatory':
|
||||
|
@ -4599,7 +4692,6 @@ $(document).ready (function () {
|
|||
case 'prediction_date':
|
||||
case 'projection_graph':
|
||||
case 'monitor_report':
|
||||
case 'histogram_data':
|
||||
case 'module_histogram_graph':
|
||||
case 'avg_value':
|
||||
case 'max_value':
|
||||
|
@ -5159,7 +5251,6 @@ function addSLARow() {
|
|||
$("input[name=id_agent_failover]").val('');
|
||||
$("input[name=id_server]").val('');
|
||||
$("input[name=agent_sla]").val('');
|
||||
$("input[name=agent_sla]").css("background","url('<?php echo $autocompleteImage; ?>') right center no-repeat")
|
||||
$("input[name=agent_failover]").val('');
|
||||
$("#id_agent_module_sla").empty();
|
||||
$("#id_agent_module_sla").attr('disabled', 'true');
|
||||
|
@ -5486,12 +5577,15 @@ function chooseType() {
|
|||
$("#row_agent_server_filter").hide();
|
||||
$("#row_agent_group_filter").hide();
|
||||
$("#row_os").hide();
|
||||
$("#row_custom_field_filter").hide();
|
||||
$("#row_custom_field").hide();
|
||||
$("#row_agent_status").hide();
|
||||
$("#row_agent_version").hide();
|
||||
$("#row_agent_remote_conf").hide();
|
||||
$("#row_module_free_search").hide();
|
||||
|
||||
$("#row_network_filter").hide();
|
||||
$("#row_alive_ip").hide();
|
||||
$("#row_agent_not_assigned_to_ip").hide();
|
||||
|
||||
// SLA list default state.
|
||||
$("#sla_list").hide();
|
||||
|
@ -5627,7 +5721,6 @@ function chooseType() {
|
|||
$("#row_summary").show();
|
||||
break;
|
||||
|
||||
case 'histogram_data':
|
||||
case 'module_histogram_graph':
|
||||
$("#row_description").show();
|
||||
$("#row_period").show();
|
||||
|
@ -6039,11 +6132,26 @@ function chooseType() {
|
|||
$("#row_group").show();
|
||||
$("#row_os").show();
|
||||
$("#row_custom_field").show();
|
||||
$("#row_custom_field_filter").show();
|
||||
$("#row_agent_status").show();
|
||||
$("#row_agent_version").show();
|
||||
$("#row_agent_remote_conf").show();
|
||||
$("#row_module_free_search").show();
|
||||
|
||||
if ($('#agent_custom_fields :selected').length > 0) {
|
||||
$('#text-agent_custom_field_filter').removeAttr('disabled');
|
||||
} else {
|
||||
$('#text-agent_custom_field_filter').prop('disabled', true);
|
||||
}
|
||||
|
||||
$("#agent_custom_fields").change(function(e) {
|
||||
if ($('#agent_custom_fields :selected').length > 0) {
|
||||
$('#text-agent_custom_field_filter').removeAttr('disabled');
|
||||
} else {
|
||||
$('#text-agent_custom_field_filter').prop('disabled', true);
|
||||
}
|
||||
});
|
||||
|
||||
break;
|
||||
|
||||
case 'inventory':
|
||||
|
@ -6193,6 +6301,13 @@ function chooseType() {
|
|||
$("#row_historical_db_check").hide();
|
||||
break;
|
||||
|
||||
case 'IPAM_network':
|
||||
$("#row_network_filter").show();
|
||||
$("#row_alive_ip").show();
|
||||
$("#row_agent_not_assigned_to_ip").show();
|
||||
$("#row_historical_db_check").hide();
|
||||
break;
|
||||
|
||||
case 'permissions_report':
|
||||
$("#row_description").show();
|
||||
$("#row_users").show();
|
||||
|
|
|
@ -1251,16 +1251,7 @@ switch ($action) {
|
|||
array_push($table->data, $data);
|
||||
}
|
||||
|
||||
if ($columnview) {
|
||||
$count = 0;
|
||||
foreach ($table->data as $datos) {
|
||||
if (!isset($datos[9])) {
|
||||
$table->data[$count][9] = '';
|
||||
}
|
||||
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
|
||||
html_print_table($table);
|
||||
ui_pagination(
|
||||
|
@ -1759,6 +1750,9 @@ switch ($action) {
|
|||
$values['time_in_ok_status'] = get_parameter(
|
||||
'time_in_ok_status'
|
||||
);
|
||||
$values['time_in_warning_status'] = get_parameter(
|
||||
'time_in_warning_status'
|
||||
);
|
||||
$values['time_in_unknown_status'] = get_parameter(
|
||||
'time_in_unknown_status'
|
||||
);
|
||||
|
@ -1777,6 +1771,9 @@ switch ($action) {
|
|||
$values['checks_in_ok_status'] = get_parameter(
|
||||
'checks_in_ok_status'
|
||||
);
|
||||
$values['checks_in_warning_status'] = get_parameter(
|
||||
'checks_in_warning_status'
|
||||
);
|
||||
$values['unknown_checks'] = get_parameter(
|
||||
'unknown_checks'
|
||||
);
|
||||
|
@ -1832,6 +1829,13 @@ switch ($action) {
|
|||
$good_format = true;
|
||||
break;
|
||||
|
||||
case 'IPAM_network':
|
||||
$values['ipam_network_filter'] = get_parameter('network_filter');
|
||||
$values['ipam_alive_ips'] = get_parameter('alive_ip');
|
||||
$values['ipam_ip_not_assigned_to_agent'] = get_parameter('agent_not_assigned_to_ip');
|
||||
$good_format = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
$values['period'] = get_parameter('period');
|
||||
$values['top_n'] = get_parameter(
|
||||
|
@ -1895,6 +1899,10 @@ switch ($action) {
|
|||
'time_in_ok_status',
|
||||
0
|
||||
);
|
||||
$values['time_in_warning_status'] = get_parameter(
|
||||
'time_in_warning_status',
|
||||
0
|
||||
);
|
||||
$values['time_in_unknown_status'] = get_parameter(
|
||||
'time_in_unknown_status',
|
||||
0
|
||||
|
@ -1919,6 +1927,10 @@ switch ($action) {
|
|||
'checks_in_ok_status',
|
||||
0
|
||||
);
|
||||
$values['checks_in_warning_status'] = get_parameter(
|
||||
'checks_in_warning_status',
|
||||
0
|
||||
);
|
||||
$values['unknown_checks'] = get_parameter(
|
||||
'unknown_checks',
|
||||
0
|
||||
|
@ -2185,7 +2197,6 @@ switch ($action) {
|
|||
break;
|
||||
|
||||
case 'module_histogram_graph':
|
||||
case 'histogram_data':
|
||||
case 'agent_configuration':
|
||||
case 'alert_report_agent':
|
||||
case 'alert_report_module':
|
||||
|
@ -2219,6 +2230,7 @@ switch ($action) {
|
|||
$es['agents_inventory_display_options'] = get_parameter('agents_inventory_display_options');
|
||||
$es['agent_custom_field_filter'] = get_parameter('agent_custom_field_filter');
|
||||
$es['agent_os_filter'] = get_parameter('agent_os_filter');
|
||||
$es['agent_custom_fields'] = get_parameter('agent_custom_fields');
|
||||
$es['agent_status_filter'] = get_parameter('agent_status_filter');
|
||||
$es['agent_version_filter'] = get_parameter('agent_version_filter');
|
||||
$es['agent_module_search_filter'] = get_parameter('agent_module_search_filter');
|
||||
|
@ -2228,6 +2240,14 @@ switch ($action) {
|
|||
$values['external_source'] = json_encode($es);
|
||||
break;
|
||||
|
||||
case 'IPAM_network':
|
||||
$es['network_filter'] = get_parameter('network_filter');
|
||||
$es['alive_ip'] = get_parameter('alive_ip');
|
||||
$es['agent_not_assigned_to_ip'] = get_parameter('agent_not_assigned_to_ip');
|
||||
|
||||
// $values['external_source'] = json_encode($es);
|
||||
break;
|
||||
|
||||
default:
|
||||
// Default.
|
||||
break;
|
||||
|
@ -2535,6 +2555,10 @@ switch ($action) {
|
|||
);
|
||||
}
|
||||
|
||||
$values['ipam_network_filter'] = get_parameter('network_filter', 0);
|
||||
$values['ipam_alive_ips'] = get_parameter('alive_ip', 0);
|
||||
$values['ipam_ip_not_assigned_to_agent'] = get_parameter('agent_not_assigned_to_ip', 0);
|
||||
|
||||
$values['only_display_wrong'] = (int) get_parameter(
|
||||
'checkbox_only_display_wrong',
|
||||
0
|
||||
|
@ -2559,6 +2583,10 @@ switch ($action) {
|
|||
'time_in_ok_status',
|
||||
0
|
||||
);
|
||||
$values['time_in_warning_status'] = get_parameter(
|
||||
'time_in_warning_status',
|
||||
0
|
||||
);
|
||||
$values['time_in_unknown_status'] = get_parameter(
|
||||
'time_in_unknown_status',
|
||||
0
|
||||
|
@ -2583,6 +2611,10 @@ switch ($action) {
|
|||
'checks_in_ok_status',
|
||||
0
|
||||
);
|
||||
$values['checks_in_warning_status'] = get_parameter(
|
||||
'checks_in_warning_status',
|
||||
0
|
||||
);
|
||||
$values['unknown_checks'] = get_parameter(
|
||||
'unknown_checks',
|
||||
0
|
||||
|
@ -2824,7 +2856,6 @@ switch ($action) {
|
|||
break;
|
||||
|
||||
case 'module_histogram_graph':
|
||||
case 'histogram_data':
|
||||
case 'agent_configuration':
|
||||
case 'alert_report_agent':
|
||||
case 'alert_report_module':
|
||||
|
@ -2858,6 +2889,7 @@ switch ($action) {
|
|||
$es['agents_inventory_display_options'] = get_parameter('agents_inventory_display_options');
|
||||
$es['agent_custom_field_filter'] = get_parameter('agent_custom_field_filter');
|
||||
$es['agent_os_filter'] = get_parameter('agent_os_filter');
|
||||
$es['agent_custom_fields'] = get_parameter('agent_custom_fields');
|
||||
$es['agent_status_filter'] = get_parameter('agent_status_filter');
|
||||
$es['agent_version_filter'] = get_parameter('agent_version_filter');
|
||||
$es['agent_module_search_filter'] = get_parameter('agent_module_search_filter');
|
||||
|
@ -2867,6 +2899,12 @@ switch ($action) {
|
|||
$values['external_source'] = json_encode($es);
|
||||
break;
|
||||
|
||||
case 'IPAM_network':
|
||||
$es['network_filter'] = get_parameter('network_filter');
|
||||
$es['alive_ip'] = get_parameter('alive_ip');
|
||||
$es['agent_not_assigned_to_ip'] = get_parameter('agent_not_assigned_to_ip');
|
||||
break;
|
||||
|
||||
default:
|
||||
// Default.
|
||||
break;
|
||||
|
@ -3370,7 +3408,7 @@ $buttons['view'] = [
|
|||
$buttons[$activeTab]['active'] = true;
|
||||
|
||||
if ($idReport != 0) {
|
||||
$textReportName = $reportName;
|
||||
$textReportName = (empty($reportName) === false) ? $reportName : $report['name'];
|
||||
} else {
|
||||
$temp = $buttons['main'];
|
||||
$buttons = null;
|
||||
|
|
|
@ -204,6 +204,15 @@ foreach ($layoutDatas as $layoutData) {
|
|||
);
|
||||
break;
|
||||
|
||||
case CIRCULAR_INTERIOR_PROGRESS_BAR:
|
||||
case CIRCULAR_PROGRESS_BAR:
|
||||
$table->data[($i + 1)]['icon'] = html_print_image(
|
||||
'images/percentile_item.png',
|
||||
true,
|
||||
['title' => __('Percentile')]
|
||||
);
|
||||
break;
|
||||
|
||||
case MODULE_GRAPH:
|
||||
$table->data[($i + 1)]['icon'] = html_print_image(
|
||||
'images/chart_curve.png',
|
||||
|
@ -306,6 +315,16 @@ foreach ($layoutDatas as $layoutData) {
|
|||
break;
|
||||
|
||||
case NETWORK_LINK:
|
||||
$table->data[($i + 1)]['icon'] = html_print_image(
|
||||
'images/network_link_item.png',
|
||||
true,
|
||||
[
|
||||
'title' => __('Network link'),
|
||||
'class' => 'invert_filter',
|
||||
]
|
||||
);
|
||||
break;
|
||||
|
||||
case LINE_ITEM:
|
||||
$table->data[($i + 1)]['icon'] = html_print_image(
|
||||
'images/line_item.png',
|
||||
|
@ -325,6 +344,30 @@ foreach ($layoutDatas as $layoutData) {
|
|||
);
|
||||
break;
|
||||
|
||||
case BASIC_CHART:
|
||||
$table->data[($i + 1)]['icon'] = html_print_image(
|
||||
'images/basic_chart.png',
|
||||
true,
|
||||
['title' => __('Basic chart')]
|
||||
);
|
||||
break;
|
||||
|
||||
case ODOMETER:
|
||||
$table->data[($i + 1)]['icon'] = html_print_image(
|
||||
'images/odometer.png',
|
||||
true,
|
||||
['title' => __('Odometer')]
|
||||
);
|
||||
break;
|
||||
|
||||
case CLOCK:
|
||||
$table->data[($i + 1)]['icon'] = html_print_image(
|
||||
'images/clock-tab.png',
|
||||
true,
|
||||
['title' => __('Clock')]
|
||||
);
|
||||
break;
|
||||
|
||||
default:
|
||||
if (enterprise_installed()) {
|
||||
$table->data[($i + 1)]['icon'] = enterprise_visual_map_print_list_element('icon', $layoutData);
|
||||
|
@ -394,6 +437,13 @@ foreach ($layoutDatas as $layoutData) {
|
|||
$table->data[($i + 1)][2] = html_print_input_text('width_'.$idLayoutData, $layoutData['width'], '', 2, 5, true).' x '.html_print_input_text('height_'.$idLayoutData, $layoutData['width'], '', 2, 5, true);
|
||||
break;
|
||||
|
||||
case CIRCULAR_PROGRESS_BAR:
|
||||
case CIRCULAR_INTERIOR_PROGRESS_BAR:
|
||||
case PERCENTILE_BUBBLE:
|
||||
case PERCENTILE_BAR:
|
||||
$table->data[($i + 1)][2] = html_print_input_text('width_'.$idLayoutData, $layoutData['width'], '', 2, 5, true);
|
||||
break;
|
||||
|
||||
default:
|
||||
$table->data[($i + 1)][2] = html_print_input_text('width_'.$idLayoutData, $layoutData['width'], '', 2, 5, true).' x '.html_print_input_text('height_'.$idLayoutData, $layoutData['height'], '', 2, 5, true);
|
||||
break;
|
||||
|
@ -478,6 +528,7 @@ foreach ($layoutDatas as $layoutData) {
|
|||
case LABEL:
|
||||
case NETWORK_LINK:
|
||||
case LINE_ITEM:
|
||||
case CLOCK:
|
||||
$table->data[($i + 2)][0] = '';
|
||||
break;
|
||||
|
||||
|
@ -520,7 +571,7 @@ foreach ($layoutDatas as $layoutData) {
|
|||
$params['value'] = db_get_value('alias', 'tagente', 'id_agente', $layoutData['id_agent']);
|
||||
}
|
||||
|
||||
if ($layoutData['id_agent'] == 0 and $layoutData['id_custom_graph'] != 0) {
|
||||
if ($layoutData['id_custom_graph'] != 0) {
|
||||
$table->data[($i + 2)][0] = __('Custom graph');
|
||||
} else {
|
||||
$table->data[($i + 2)][0] = ui_print_agent_autocomplete_input($params);
|
||||
|
@ -540,6 +591,7 @@ foreach ($layoutDatas as $layoutData) {
|
|||
case NETWORK_LINK:
|
||||
case LINE_ITEM:
|
||||
case GROUP_ITEM:
|
||||
case CLOCK:
|
||||
$table->data[($i + 2)][1] = '';
|
||||
break;
|
||||
|
||||
|
@ -569,7 +621,7 @@ foreach ($layoutDatas as $layoutData) {
|
|||
|
||||
$modules = io_safe_output($modules);
|
||||
|
||||
if ($layoutData['id_agent'] == 0 and $layoutData['id_custom_graph'] != 0) {
|
||||
if ($layoutData['id_custom_graph'] != 0) {
|
||||
if (is_metaconsole()) {
|
||||
$graphs = [];
|
||||
$graphs = metaconsole_get_custom_graphs(true);
|
||||
|
|
|
@ -433,7 +433,10 @@ switch ($activeTab) {
|
|||
$idsElements = db_get_all_rows_filter(
|
||||
'tlayout_data',
|
||||
['id_layout' => $idVisualConsole],
|
||||
['id']
|
||||
[
|
||||
'id',
|
||||
'type',
|
||||
]
|
||||
);
|
||||
|
||||
if ($idsElements === false) {
|
||||
|
@ -449,18 +452,33 @@ switch ($activeTab) {
|
|||
$values['height'] = get_parameter('height_'.$id, 0);
|
||||
$values['pos_x'] = get_parameter('left_'.$id, 0);
|
||||
$values['pos_y'] = get_parameter('top_'.$id, 0);
|
||||
$type = db_get_value('type', 'tlayout_data', 'id', $id);
|
||||
switch ($type) {
|
||||
case MODULE_GRAPH:
|
||||
switch ($idElement['type']) {
|
||||
case NETWORK_LINK:
|
||||
case LINE_ITEM:
|
||||
continue 2;
|
||||
|
||||
break;
|
||||
|
||||
case SIMPLE_VALUE_MAX:
|
||||
case SIMPLE_VALUE_MIN:
|
||||
case SIMPLE_VALUE_AVG:
|
||||
$values['period'] = get_parameter('period_'.$id, 0);
|
||||
break;
|
||||
|
||||
case MODULE_GRAPH:
|
||||
$values['period'] = get_parameter('period_'.$id, 0);
|
||||
unset($values['image']);
|
||||
break;
|
||||
|
||||
case GROUP_ITEM:
|
||||
$values['id_group'] = get_parameter('group_'.$id, 0);
|
||||
$values['show_statistics'] = get_parameter('show_statistics', 0);
|
||||
break;
|
||||
|
||||
case CIRCULAR_PROGRESS_BAR:
|
||||
case CIRCULAR_INTERIOR_PROGRESS_BAR:
|
||||
case PERCENTILE_BUBBLE:
|
||||
case PERCENTILE_BAR:
|
||||
unset($values['height']);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -231,8 +231,8 @@ if (isset($_GET['server'])) {
|
|||
<script language="javascript" type="text/javascript">
|
||||
|
||||
$(document).ready (function () {
|
||||
var id_server = <?php echo $id_server; ?>;
|
||||
var server_type = <?php echo $row['server_type']; ?>;
|
||||
var id_server = '<?php echo $id_server; ?>';
|
||||
var server_type = '<?php echo $row['server_type']; ?>';
|
||||
$("#check_exec_server img").on("click", function () {
|
||||
$("#check_exec_server img").attr("src", "images/spinner.gif");
|
||||
|
||||
|
|
|
@ -219,34 +219,15 @@ if ($filemanager) {
|
|||
|
||||
$id_plugin = (int) get_parameter('id_plugin', 0);
|
||||
|
||||
// Add custom directories here
|
||||
// Add custom directories here.
|
||||
$fallback_directory = 'attachment/plugin';
|
||||
|
||||
$directory = (string) get_parameter('directory', $fallback_directory);
|
||||
$directory = str_replace('\\', '/', $directory);
|
||||
|
||||
// A miminal security check to avoid directory traversal
|
||||
if (preg_match('/\.\./', $directory)) {
|
||||
$directory = $fallback_directory;
|
||||
}
|
||||
|
||||
if (preg_match('/^\//', $directory)) {
|
||||
$directory = $fallback_directory;
|
||||
}
|
||||
|
||||
if (preg_match('/^manager/', $directory)) {
|
||||
$directory = $fallback_directory;
|
||||
}
|
||||
|
||||
$banned_directories['include'] = true;
|
||||
$banned_directories['godmode'] = true;
|
||||
$banned_directories['operation'] = true;
|
||||
$banned_directories['reporting'] = true;
|
||||
$banned_directories['general'] = true;
|
||||
$banned_directories[ENTERPRISE_DIR] = true;
|
||||
|
||||
if (isset($banned_directories[$directory])) {
|
||||
// Get directory.
|
||||
$directory = (string) get_parameter('directory');
|
||||
if (empty($directory) === true) {
|
||||
$directory = $fallback_directory;
|
||||
} else {
|
||||
$directory = str_replace('\\', '/', $directory);
|
||||
$directory = filemanager_safe_directory($directory, $fallback_directory);
|
||||
}
|
||||
|
||||
$real_directory = realpath($config['homedir'].'/'.$directory);
|
||||
|
@ -263,12 +244,12 @@ if ($filemanager) {
|
|||
|
||||
$default_real_directory = realpath($config['homedir'].'/'.$fallback_directory);
|
||||
|
||||
if ($upload_file_or_zip) {
|
||||
upload_file($upload_file_or_zip, $default_real_directory);
|
||||
if ($upload_file_or_zip === true) {
|
||||
upload_file($upload_file_or_zip, $default_real_directory, $real_directory);
|
||||
}
|
||||
|
||||
if ($create_text_file) {
|
||||
create_text_file($default_real_directory);
|
||||
if ($create_text_file === true) {
|
||||
create_text_file($default_real_directory, $real_directory);
|
||||
}
|
||||
|
||||
filemanager_file_explorer(
|
||||
|
|
|
@ -47,26 +47,15 @@ if (isset($config['filemanager']['message']) === true) {
|
|||
$config['filemanager']['message'] = null;
|
||||
}
|
||||
|
||||
$directory = (string) get_parameter('directory');
|
||||
if (empty($directory) === true) {
|
||||
$directory = 'images';
|
||||
} else {
|
||||
$directory = str_replace('\\', '/', $directory);
|
||||
$directory = filemanager_safe_directory($directory, 'images');
|
||||
}
|
||||
|
||||
// Add custom directories here.
|
||||
$fallback_directory = 'images';
|
||||
// Banned directories.
|
||||
$banned_directories['include'] = true;
|
||||
$banned_directories['godmode'] = true;
|
||||
$banned_directories['operation'] = true;
|
||||
$banned_directories['reporting'] = true;
|
||||
$banned_directories['general'] = true;
|
||||
$banned_directories[ENTERPRISE_DIR] = true;
|
||||
|
||||
if (isset($banned_directories[$directory]) === true) {
|
||||
// Get directory.
|
||||
$directory = (string) get_parameter('directory');
|
||||
if (empty($directory) === true) {
|
||||
$directory = $fallback_directory;
|
||||
} else {
|
||||
$directory = str_replace('\\', '/', $directory);
|
||||
$directory = filemanager_safe_directory($directory, $fallback_directory);
|
||||
}
|
||||
|
||||
$real_directory = realpath($config['homedir'].'/'.$directory);
|
||||
|
@ -76,14 +65,14 @@ echo '<h4>'.__('Index of %s', $directory).'</h4>';
|
|||
$upload_file_or_zip = (bool) get_parameter('upload_file_or_zip');
|
||||
$create_text_file = (bool) get_parameter('create_text_file');
|
||||
|
||||
$default_real_directory = realpath($config['homedir'].'/'.$fallback_directory);
|
||||
$default_real_directory = realpath($config['homedir'].'/');
|
||||
|
||||
if ($upload_file_or_zip === true) {
|
||||
upload_file($upload_file_or_zip, $default_real_directory);
|
||||
upload_file($upload_file_or_zip, $default_real_directory, $real_directory);
|
||||
}
|
||||
|
||||
if ($create_text_file === true) {
|
||||
create_text_file($default_real_directory);
|
||||
create_text_file($default_real_directory, $real_directory);
|
||||
}
|
||||
|
||||
filemanager_file_explorer(
|
||||
|
@ -96,5 +85,6 @@ filemanager_file_explorer(
|
|||
'',
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
false
|
||||
);
|
||||
|
|
|
@ -40,12 +40,18 @@ if (! check_acl($config['id_user'], 0, 'PM') && ! is_user_admin($config['id_user
|
|||
$is_management_allowed = true;
|
||||
if (is_management_allowed() === false) {
|
||||
$is_management_allowed = false;
|
||||
if (is_metaconsole() === false) {
|
||||
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&tab2=list&pure='.(int) $config['pure']
|
||||
).'">'.__('metaconsole').'</a>';
|
||||
} else {
|
||||
$url = __('any node');
|
||||
}
|
||||
|
||||
ui_print_warning_message(
|
||||
__(
|
||||
'This node is configured with centralized mode. All OS definitions are read only. Go to %s to manage them.',
|
||||
'<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&tab2=list&pure=0'
|
||||
).'">'.__('metaconsole').'</a>'
|
||||
$url
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -571,7 +571,7 @@ $table_remote->data['integria_test'] = $row;
|
|||
// Print.
|
||||
echo '<div class="center pdd_b_20px">';
|
||||
echo '<a target="_blank" rel="noopener noreferrer" href="http://integriaims.com">';
|
||||
html_print_image('images/integria_logo.png');
|
||||
html_print_image('images/integria_logo.svg');
|
||||
echo '</a>';
|
||||
echo '<br />';
|
||||
echo '<div clsas="integria_title">';
|
||||
|
|
|
@ -97,7 +97,7 @@ $table->data['editor'] = [
|
|||
'oid' => html_print_input_text('oid_editor', '', '', 40, 255, true),
|
||||
'description' => html_print_input_text('description_editor', '', '', 40, 255, true),
|
||||
'post_process' => html_print_input_text('post_process_editor', '', '', 20, 255, true),
|
||||
'op' => '<img class="loading invisible" src="'.'images/spinner.gif'.'" />'.'<a class="button_save_snmp" href="javascript: save_translation();">'.html_print_image('images/save_mc.png', true, ['title' => __('Save')]).'</a>'.'<a class="button_update_snmp invisible" href="javascript: update_snmp();">'.html_print_image('images/update.png', true, ['title' => __('Update'), 'class' => 'invert_filter']).'</a>'.'<a class="cancel_button_snmp invisible" href="javascript: cancel_snmp();">'.html_print_image('images/cancel.png', true, ['title' => __('Cancel')]).'</a>',
|
||||
'op' => '<img class="loading invisible" src="'.'images/spinner.gif'.'" />'.'<a class="button_save_snmp" href="javascript: save_translation();">'.html_print_image('images/save_mc.png', true, ['title' => __('Save'), 'class' => 'invert_filter']).'</a>'.'<a class="button_update_snmp invisible" href="javascript: update_snmp();">'.html_print_image('images/update.png', true, ['title' => __('Update'), 'class' => 'invert_filter']).'</a>'.'<a class="cancel_button_snmp invisible" href="javascript: cancel_snmp();">'.html_print_image('images/cancel.png', true, ['title' => __('Cancel')]).'</a>',
|
||||
];
|
||||
|
||||
|
||||
|
|
|
@ -986,12 +986,11 @@ if ($create_alert || $update_alert) {
|
|||
echo html_print_select(get_priorities(), 'priority', $priority, '', '', '0', false, false, false);
|
||||
echo '</td></tr>';
|
||||
|
||||
// Alert type (e-mail, event etc.)
|
||||
echo '<tr><td class="datos">'.__('Alert commands').'</td><td class="datos">';
|
||||
|
||||
// Alert type (e-mail, event etc.).
|
||||
echo '<tr><td class="datos">'.__('Alert action').'</td><td class="datos">';
|
||||
html_print_select_from_sql(
|
||||
'SELECT id, name
|
||||
FROM talert_commands
|
||||
FROM talert_actions
|
||||
ORDER BY name',
|
||||
'alert_type',
|
||||
$alert_type,
|
||||
|
@ -1481,7 +1480,7 @@ $(document).ready (function () {
|
|||
value: "1"
|
||||
});
|
||||
values.push ({
|
||||
name: "id",
|
||||
name: "id_action",
|
||||
value: this.value
|
||||
});
|
||||
values.push ({
|
||||
|
|
|
@ -171,12 +171,18 @@ if ($delete !== 0) {
|
|||
|
||||
$is_management_allowed = is_management_allowed();
|
||||
if ($is_management_allowed === false) {
|
||||
if (is_metaconsole() === false) {
|
||||
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=advanced/component_management'
|
||||
).'">'.__('metaconsole').'</a>';
|
||||
} else {
|
||||
$url = __('any node');
|
||||
}
|
||||
|
||||
ui_print_warning_message(
|
||||
__(
|
||||
'This node is configured with centralized mode. All tags information is read only. Go to %s to manage it.',
|
||||
'<a target="_blank" href="'.ui_get_meta_url(
|
||||
'index.php?sec=advanced&sec2=advanced/component_management'
|
||||
).'">'.__('metaconsole').'</a>'
|
||||
$url
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue