11423-Graph analytics. Resolve Confict
This commit is contained in:
commit
6757e69a75
|
@ -32,6 +32,7 @@ services:
|
|||
PUBLICURL: ""
|
||||
SLEEP: 5
|
||||
RETRIES: 10
|
||||
TZ: 'Europe/Madrid'
|
||||
networks:
|
||||
- pandora
|
||||
ports:
|
||||
|
|
|
@ -10,6 +10,8 @@ ENV DBPORT=3306
|
|||
ENV SLEEP=5
|
||||
ENV RETRIES=1
|
||||
ENV OPEN=1
|
||||
ENV TZ='Europe/Madrid'
|
||||
|
||||
|
||||
ENV LC_ALL=C
|
||||
|
||||
|
|
|
@ -230,6 +230,10 @@ fi
|
|||
echo "" > /opt/pandora/crontasks || touch /opt/pandora/crontasks
|
||||
|
||||
|
||||
#set localtime
|
||||
rm -rf /etc/localtime
|
||||
ln -s /usr/share/zoneinfo/$TZ /etc/localtime
|
||||
|
||||
#install pandora packages
|
||||
echo "-> Istalling pandorafms"
|
||||
cd /opt/pandora
|
||||
|
|
|
@ -28,6 +28,7 @@ $PANDHOME_ENT/pandora_server/PandoraFMS-Enterprise/pandora_server_enterprise.spe
|
|||
$CODEHOME/pandora_console/pandora_console.redhat.spec \
|
||||
$CODEHOME/pandora_console/pandora_console.rhel7.spec \
|
||||
$CODEHOME/pandora_agents/unix/pandora_agent.redhat.spec \
|
||||
$CODEHOME/pandora_agents/unix/pandora_agent.redhat_bin.spec\
|
||||
$CODEHOME/pandora_server/pandora_server.redhat.spec \
|
||||
$PANDHOME_ENT/pandora_agents/pandora_agent.spec \
|
||||
$PANDHOME_ENT/pandora_server/pandora_server_enterprise.redhat.spec \
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.772, AIX version
|
||||
# Version 7.0NG.773.1, AIX version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2023 Pandora FMS
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.772, FreeBSD Version
|
||||
# Version 7.0NG.773.1, FreeBSD Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2023 Pandora FMS
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.772, HP-UX Version
|
||||
# Version 7.0NG.773.1, HP-UX Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2023 Pandora FMS
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.772, GNU/Linux
|
||||
# Version 7.0NG.773.1, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2023 Pandora FMS
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.772, GNU/Linux
|
||||
# Version 7.0NG.773.1, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2023 Pandora FMS
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.772, Solaris Version
|
||||
# Version 7.0NG.773.1, Solaris Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2023 Pandora FMS
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Base config file for Pandora FMS Windows Agent
|
||||
# (c) 2006-2023 Pandora FMS
|
||||
# Version 7.0NG.772
|
||||
# Version 7.0NG.773.1
|
||||
# This program is Free Software, you can redistribute it and/or modify it
|
||||
# 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.772, AIX version
|
||||
# Version 7.0NG.773.1, 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.772
|
||||
# Version 7.0NG.773.1
|
||||
# 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.772, HPUX Version
|
||||
# Version 7.0NG.773.1, HPUX Version
|
||||
|
||||
# General Parameters
|
||||
# ==================
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.772
|
||||
# Version 7.0NG.773.1
|
||||
# Licensed under GPL license v2,
|
||||
# (c) 2003-2023 Pandora FMS
|
||||
# please visit http://pandora.sourceforge.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.772
|
||||
# Version 7.0NG.773.1
|
||||
# Licensed under GPL license v2,
|
||||
# (c) 2003-2023 Pandora FMS
|
||||
# please visit http://pandora.sourceforge.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.772
|
||||
# Version 7.0NG.773.1
|
||||
# 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.772, Solaris version
|
||||
# Version 7.0NG.773.1, Solaris version
|
||||
|
||||
# General Parameters
|
||||
# ==================
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.772, AIX version
|
||||
# Version 7.0NG.773.1, AIX version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2023 Pandora FMS
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.772-230810
|
||||
Version: 7.0NG.773.1-230823
|
||||
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.772-230810"
|
||||
pandora_version="7.0NG.773.1-230823"
|
||||
|
||||
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.772"
|
||||
VERSION="7.0NG.773.1"
|
||||
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.772" onConclusion="none">pandorafms_src.pdk</pkg-ref>
|
||||
<pkg-ref id="com.pandorafms.pandorafms_src" version="7.0NG.773.1" onConclusion="none">pandorafms_src.pdk</pkg-ref>
|
||||
<choice id="com.pandorafms.pandorafms_uninstall" visible="true" customLocation="/Applications">
|
||||
<pkg-ref id="com.pandorafms.pandorafms_uninstall"/>
|
||||
</choice>
|
||||
<pkg-ref id="com.pandorafms.pandorafms_uninstall" version="7.0NG.772" onConclusion="none">pandorafms_uninstall.pdk</pkg-ref>
|
||||
<pkg-ref id="com.pandorafms.pandorafms_uninstall" version="7.0NG.773.1" onConclusion="none">pandorafms_uninstall.pdk</pkg-ref>
|
||||
<!-- <installation-check script="check()" />
|
||||
<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.772</string>
|
||||
<key>CFBundleGetInfoString</key> <string>7.0NG.772 Pandora FMS on Aug 2020</string>
|
||||
<key>CFBundleShortVersionString</key> <string>7.0NG.772</string>
|
||||
<key>CFBundleVersion</key> <string>7.0NG.773.1</string>
|
||||
<key>CFBundleGetInfoString</key> <string>7.0NG.773.1 Pandora FMS on Aug 2020</string>
|
||||
<key>CFBundleShortVersionString</key> <string>7.0NG.773.1</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.772, GNU/Linux
|
||||
# Version 7.0NG.773.1, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2023 Pandora FMS
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.772, FreeBSD Version
|
||||
# Version 7.0NG.773.1, FreeBSD Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2023 Pandora FMS
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.772, HP-UX Version
|
||||
# Version 7.0NG.773.1, HP-UX Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2023 Pandora FMS
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.772
|
||||
# Version 7.0NG.773.1
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2004-2023 Pandora FMS
|
||||
# https://pandorafms.com
|
||||
|
@ -310,3 +310,9 @@ module_plugin autodiscover --default
|
|||
#module_description Zombies process on system
|
||||
#module_group System
|
||||
#module_end
|
||||
|
||||
#Hardening plugin for security compliance analysis. Enable to use it.
|
||||
#module_begin
|
||||
#module_plugin /usr/share/pandora_agent/plugins/pandora_sca
|
||||
#module_absoluteinterval 7d
|
||||
#module_end
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.772, GNU/Linux
|
||||
# Version 7.0NG.773.1, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2023 Pandora FMS
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.772, NetBSD Version
|
||||
# Version 7.0NG.773.1, NetBSD Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2023 Pandora FMS
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.772, Solaris Version
|
||||
# Version 7.0NG.773.1, Solaris Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2023 Pandora FMS
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1030,8 +1030,8 @@ my $Sem = undef;
|
|||
# Semaphore used to control the number of threads
|
||||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '7.0NG.772';
|
||||
use constant AGENT_BUILD => '230810';
|
||||
use constant AGENT_VERSION => '7.0NG.773.1';
|
||||
use constant AGENT_BUILD => '230823';
|
||||
|
||||
# Agent log default file size maximum and instances
|
||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
#
|
||||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_agent_linux
|
||||
%define version 7.0NG.772
|
||||
%define release 230810
|
||||
%define version 7.0NG.773.1
|
||||
%define release 230823
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
@ -25,7 +25,7 @@ Requires(preun): chkconfig /bin/rm /usr/sbin/userdel
|
|||
Requires: coreutils unzip
|
||||
Requires: util-linux procps grep
|
||||
Requires: /sbin/ip /bin/awk
|
||||
Requires: perl(Sys::Syslog) perl(IO::Compress::Zip)
|
||||
Requires: perl(Sys::Syslog) perl(IO::Compress::Zip) perl(File::Copy) perl(Sys::Hostname)
|
||||
# Required by plugins
|
||||
#Requires: sh-utils sed passwd net-tools rpm
|
||||
AutoReq: 0
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_agent_linux_bin
|
||||
%define source_name pandorafms_agent_linux
|
||||
%define version 7.0NG.772
|
||||
%define version 7.0NG.773
|
||||
%define release 230725
|
||||
|
||||
Summary: Pandora FMS Linux agent, binary version
|
||||
|
@ -19,16 +19,14 @@ Group: System/Monitoring
|
|||
Packager: Sancho Lerena <slerena@artica.es>
|
||||
Prefix: /usr/share
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
|
||||
BuildArch: noarch
|
||||
BuildArch: x86_64
|
||||
Requires(pre): shadow-utils
|
||||
Requires(post): chkconfig /bin/ln
|
||||
Requires(preun): chkconfig /bin/rm /usr/sbin/userdel
|
||||
Requires: coreutils unzip
|
||||
Requires: util-linux procps grep
|
||||
Requires: /sbin/ip /bin/awk
|
||||
Requires: perl(Sys::Syslog) perl(IO::Compress::Zip)
|
||||
# Required by plugins
|
||||
#Requires: sh-utils sed passwd net-tools rpm
|
||||
#Requires: libnsl
|
||||
AutoReq: 0
|
||||
Provides: %{name}-%{version}
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
#
|
||||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_agent_linux
|
||||
%define version 7.0NG.772
|
||||
%define release 230810
|
||||
%define version 7.0NG.773.1
|
||||
%define release 230823
|
||||
|
||||
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.772"
|
||||
PI_BUILD="230810"
|
||||
PI_VERSION="7.0NG.773.1"
|
||||
PI_BUILD="230823"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Base config file for Pandora FMS Windows Agent
|
||||
# (c) 2006-2023 Pandora FMS
|
||||
# Version 7.0NG.772
|
||||
# Version 7.0NG.773.1
|
||||
# This program is Free Software, you can redistribute it and/or modify it
|
||||
# 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
|
||||
|
@ -522,5 +522,4 @@ module_plugin "%PROGRAMFILES%\Pandora_Agent\util\autodiscover.exe" --default
|
|||
#module_type generic_data_string
|
||||
#module_exec echo Bordón
|
||||
#module_native_encoding OEM
|
||||
#module_end
|
||||
|
||||
#module_end
|
|
@ -3,7 +3,7 @@ AllowLanguageSelection
|
|||
{Yes}
|
||||
|
||||
AppName
|
||||
{Pandora FMS Windows Agent v7.0NG.772}
|
||||
{Pandora FMS Windows Agent v7.0NG.773.1}
|
||||
|
||||
ApplicationID
|
||||
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
|
||||
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{230810}
|
||||
{230823}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("7.0NG.772 Build 230810")
|
||||
#define PANDORA_VERSION ("7.0NG.773.1 Build 230823")
|
||||
|
||||
string pandora_path;
|
||||
string pandora_dir;
|
||||
|
|
|
@ -11,7 +11,7 @@ BEGIN
|
|||
VALUE "LegalCopyright", "Pandora FMS"
|
||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||
VALUE "ProductVersion", "(7.0NG.772(Build 230810))"
|
||||
VALUE "ProductVersion", "(7.0NG.773.1(Build 230823))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 7.0NG.772-230810
|
||||
Version: 7.0NG.773.1-230823
|
||||
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.772-230810"
|
||||
pandora_version="7.0NG.773.1-230823"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -261,12 +261,27 @@ function agents_modules_load_js()
|
|||
}
|
||||
|
||||
function select_selected () {
|
||||
// $('#id_agents2 option').each(function(){
|
||||
// if($(this).attr('selected') === 'selected'){
|
||||
// $(this).prop('selected', true);
|
||||
// }
|
||||
// });
|
||||
var f = document.forms.filter_form;
|
||||
f.action = "index.php?sec=view&sec2=extensions/agents_modules";
|
||||
$('#filter_form').submit();
|
||||
}
|
||||
/* <![CDATA[ */
|
||||
function export_csv() {
|
||||
let group_id = $('#group_id option:selected').val();
|
||||
let module_group_id = $('#modulegroup option:selected').val();
|
||||
let agent_id = $('#id_agents2 option:selected').map((_, e) => e.value).get();
|
||||
let module_id = $('#module option:selected').map((_, e) => e.value).get();
|
||||
|
||||
let filters_array = {group_id: group_id, module_group_id:module_group_id, agent_id:agent_id, module_id:module_id}
|
||||
let jsonFilters = JSON.stringify(filters_array)
|
||||
let filters = window.btoa(jsonFilters)
|
||||
var f = document.forms.filter_form;
|
||||
|
||||
blockResubmit($(this));
|
||||
f.action = "extensions/agents_modules_csv.php?get_agents_module_csv=1&filters="+filters;
|
||||
$("#filter_form").submit();
|
||||
}
|
||||
/* ]]> */
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
@ -653,7 +668,7 @@ function mainAgentsModules()
|
|||
}
|
||||
|
||||
if ($config['pure'] != 1) {
|
||||
$show_filters = '<form method="post" action="index.php?sec=view&sec2=extensions/agents_modules" class="w100p">';
|
||||
$show_filters = '<form id="filter_form" method="post" action="index.php?sec=view&sec2=extensions/agents_modules" class="w100p">';
|
||||
$show_filters .= '<table class="filter-table-adv w100p no-border" cellpadding="4" cellspacing="4">';
|
||||
$show_filters .= '<tr>';
|
||||
$show_filters .= '<td width="33%">'.$filter_type.'</td>';
|
||||
|
@ -679,6 +694,13 @@ function mainAgentsModules()
|
|||
'onclick' => 'select_selected()',
|
||||
],
|
||||
true
|
||||
).html_print_button(
|
||||
__('Export to CSV'),
|
||||
'srcbutton_csv',
|
||||
false,
|
||||
'export_csv()',
|
||||
['class' => 'secondary mini'],
|
||||
true,
|
||||
),
|
||||
],
|
||||
true
|
||||
|
|
|
@ -0,0 +1,118 @@
|
|||
<?php
|
||||
/**
|
||||
* Export data.
|
||||
*
|
||||
* @category Tools
|
||||
* @package Pandora FMS
|
||||
* @subpackage Operation
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2023 Pandora FMS
|
||||
* Please see https://pandorafms.com/community/ for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
global $config;
|
||||
if (true) {
|
||||
include_once '../include/config.php';
|
||||
include_once '../include/functions_agents.php';
|
||||
include_once '../include/functions_reporting.php';
|
||||
include_once '../include/functions_modules.php';
|
||||
include_once '../include/functions_users.php';
|
||||
include_once $config['homedir'].'/include/config.php';
|
||||
include_once $config['homedir'].'/include/functions_agents.php';
|
||||
include_once $config['homedir'].'/include/functions_reporting.php';
|
||||
include_once $config['homedir'].'/include/functions_modules.php';
|
||||
include_once $config['homedir'].'/include/functions_users.php';
|
||||
}
|
||||
|
||||
|
||||
check_login();
|
||||
|
||||
// ACL Check.
|
||||
if (! check_acl($config['id_user'], 0, 'AR')) {
|
||||
db_pandora_audit(
|
||||
AUDIT_LOG_ACL_VIOLATION,
|
||||
'Trying to access Agent view (Grouped)'
|
||||
);
|
||||
include 'general/noaccess.php';
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$get_agents_module_csv = get_parameter('get_agents_module_csv', 0);
|
||||
|
||||
|
||||
if ($get_agents_module_csv === '1') {
|
||||
// ***************************************************
|
||||
// Header output
|
||||
// ***************************************************
|
||||
$config['ignore_callback'] = true;
|
||||
while (@ob_end_clean()) {
|
||||
}
|
||||
|
||||
$filename = 'agents_module_view_'.date('Ymd').'-'.date('His');
|
||||
|
||||
// Set cookie for download control.
|
||||
setDownloadCookieToken();
|
||||
|
||||
header('Content-Type: text/csv');
|
||||
header('Content-Disposition: attachment; filename="'.$filename.'.csv"');
|
||||
// ***************************************************
|
||||
// Data processing
|
||||
// ***************************************************
|
||||
echo pack('C*', 0xEF, 0xBB, 0xBF);
|
||||
|
||||
$json_filters = get_parameter('filters', '');
|
||||
|
||||
$filters = json_decode(
|
||||
base64_decode(
|
||||
get_parameter('filters', '')
|
||||
),
|
||||
true
|
||||
);
|
||||
|
||||
$results = export_agents_module_csv($filters);
|
||||
|
||||
$divider = $config['csv_divider'];
|
||||
$dataend = PHP_EOL;
|
||||
|
||||
$header_fields = [
|
||||
__('Agent'),
|
||||
__('Module'),
|
||||
__('Data'),
|
||||
];
|
||||
|
||||
$out_csv = '';
|
||||
foreach ($header_fields as $key => $value) {
|
||||
$out_csv .= $value.$divider;
|
||||
}
|
||||
|
||||
$out_csv .= "\n";
|
||||
|
||||
foreach ($results as $result) {
|
||||
foreach ($result as $key => $value) {
|
||||
$out_csv .= io_safe_output($value).$divider;
|
||||
}
|
||||
|
||||
$out_csv .= "\n";
|
||||
}
|
||||
|
||||
echo io_safe_output($out_csv);
|
||||
|
||||
exit;
|
||||
}
|
File diff suppressed because one or more lines are too long
|
@ -9,4 +9,13 @@ CREATE TABLE IF NOT EXISTS `tgraph_analytics_filter` (
|
|||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
UPDATE `twelcome_tip`
|
||||
SET title = 'Scheduled downtimes',
|
||||
url = 'https://pandorafms.com/manual/en/documentation/04_using/11_managing_and_administration#scheduled_downtimes'
|
||||
WHERE title = 'planned stops';
|
||||
|
||||
UPDATE tagente_modulo SET `tcp_send` = '2c' WHERE `tcp_send` = '2';
|
||||
UPDATE tpolicy_modules SET `tcp_send` = '2c' WHERE `tcp_send` = '2';
|
||||
UPDATE tnetwork_component SET `tcp_send` = '2c' WHERE `tcp_send` = '2';
|
||||
|
||||
COMMIT;
|
||||
|
|
|
@ -0,0 +1,81 @@
|
|||
<?php
|
||||
/**
|
||||
* Static page to lock access to console
|
||||
*
|
||||
* @category Wizard
|
||||
* @package Pandora FMS
|
||||
* @subpackage Applications.VMware
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Begin.
|
||||
ui_require_css_file('maintenance');
|
||||
?>
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<div class="responsive center padding-6">
|
||||
<p>
|
||||
<?php
|
||||
if (is_metaconsole() === true) {
|
||||
echo __('You cannot use this metaconsole until merging process is finished');
|
||||
} else {
|
||||
echo __('You cannot use this console until merging process is finished');
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<?php
|
||||
html_print_image(
|
||||
'images/pandora_tinylogo.png',
|
||||
false,
|
||||
['class' => 'responsive flex margn']
|
||||
);
|
||||
html_print_image(
|
||||
'images/maintenance.png',
|
||||
false,
|
||||
[
|
||||
'class' => 'responsive',
|
||||
'width' => 800,
|
||||
]
|
||||
);
|
||||
?>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<p><?php echo __('You will be automatically redirected when all tasks finish'); ?></p>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
setTimeout(
|
||||
function() {
|
||||
location.reload();
|
||||
},
|
||||
10000
|
||||
);
|
||||
})
|
||||
</script>
|
||||
|
||||
</html>
|
|
@ -366,59 +366,37 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
|
|||
$header_autorefresh_counter .= '</div>';
|
||||
}
|
||||
|
||||
// Button for feedback pandora.
|
||||
if (enterprise_installed() && $config['activate_feedback']) {
|
||||
$header_feedback = '<div id="feedback-icon-header">';
|
||||
$header_feedback .= '<div id="modal-feedback-form" class="invisible"></div>';
|
||||
$header_feedback .= '<div id="msg-header" class="invisible"></div>';
|
||||
$header_feedback .= html_print_image(
|
||||
'images/send_feedback@header.svg',
|
||||
true,
|
||||
[
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
'title' => __('Feedback'),
|
||||
'id' => 'feedback-header',
|
||||
'alt' => __('Feedback'),
|
||||
'style' => 'cursor: pointer;',
|
||||
]
|
||||
);
|
||||
$header_feedback .= '</div>';
|
||||
}
|
||||
|
||||
|
||||
// Support.
|
||||
if (enterprise_installed()) {
|
||||
$header_support_link = $config['custom_support_url'];
|
||||
$modal_box = '<div id="modal_help" class="invisible">
|
||||
<div id="modal-feedback-form" class="invisible"></div>
|
||||
<div id="msg-header" class="invisible"></div>
|
||||
<a href="https://pandorafms.com/manual" target="_blank">'.__('Pandora documentation').'</a>';
|
||||
if (enterprise_installed() === true) {
|
||||
$modal_box .= '<a href="https://support.pandorafms.com/" target="_blank">'.__('Enterprise support ').'</a>';
|
||||
$modal_box .= '<a href="#" id="feedback-header">'.__('Give us feedback').'</a>';
|
||||
} else {
|
||||
$header_support_link = 'https://pandorafms.com/forums/';
|
||||
$modal_box .= '<a href="https://pandorafms.com/community/forums/" target="_blank">'.__('Community Support').'</a>';
|
||||
}
|
||||
|
||||
$header_support = '<div id="header_support">';
|
||||
$header_support .= '<a href="'.ui_get_full_external_url($header_support_link).'" target="_blank">';
|
||||
$header_support .= html_print_image(
|
||||
'images/support@header.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Go to support'),
|
||||
'class' => 'main_menu_icon bot invert_filter',
|
||||
'alt' => 'user',
|
||||
]
|
||||
);
|
||||
$header_support .= '</a></div>';
|
||||
$modal_box .= '<hr class="separator" />';
|
||||
$modal_box .= '<a href="https://github.com/pandorafms/pandorafms/issues" target="_blank">'.__('Open an issue in Github').'</a>';
|
||||
$modal_box .= '<a href="https://discord.com/invite/xVt2ruSxmr" target="_blank">'.__('Join discord community').'</a>';
|
||||
$modal_box .= '</div>';
|
||||
|
||||
// Documentation.
|
||||
$header_docu = '<div id="header_docu">';
|
||||
$header_docu .= '<a href="'.ui_get_full_external_url($config['custom_docs_url']).'" target="_blank">';
|
||||
$header_docu .= html_print_image(
|
||||
'images/documentation@header.svg',
|
||||
true,
|
||||
$modal_help = html_print_div(
|
||||
[
|
||||
'title' => __('Go to documentation'),
|
||||
'class' => 'main_menu_icon bot invert_filter',
|
||||
'alt' => 'user',
|
||||
]
|
||||
'id' => 'modal-help-content',
|
||||
'content' => html_print_image(
|
||||
'images/help@header.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Help'),
|
||||
'class' => 'main_menu_icon bot invert_filter',
|
||||
'alt' => 'user',
|
||||
]
|
||||
).$modal_box,
|
||||
],
|
||||
true,
|
||||
);
|
||||
$header_docu .= '</a></div>';
|
||||
|
||||
|
||||
// User.
|
||||
|
@ -472,11 +450,11 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
|
|||
echo '</span>';
|
||||
echo '</div>';
|
||||
echo '<div class="header_center"></div>';
|
||||
echo '<div class="header_right">'.$header_support, $header_docu, $header_user, $header_logout.'</div>';
|
||||
echo '<div class="header_right">'.$modal_help, $header_user, $header_logout.'</div>';
|
||||
} else {
|
||||
echo '<div class="header_left"><span class="header_title">'.$config['custom_title_header'].'</span><span class="header_subtitle">'.$config['custom_subtitle_header'].'</span></div>
|
||||
<div class="header_center">'.$header_searchbar.'</div>
|
||||
<div class="header_right">'.$header_autorefresh, $header_autorefresh_counter, $header_discovery, $header_welcome, $servers_list, $header_feedback, $header_support, $header_docu, $header_user, $header_logout.'</div>';
|
||||
<div class="header_right">'.$header_autorefresh, $header_autorefresh_counter, $header_discovery, $header_welcome, $servers_list, $modal_help, $header_user, $header_logout.'</div>';
|
||||
}
|
||||
?>
|
||||
</div> <!-- Closes #table_header_inner -->
|
||||
|
@ -554,6 +532,54 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
|
|||
element.style.display = "none"
|
||||
}
|
||||
|
||||
function notifications_clean_all() {
|
||||
let wrapper_inner = document.getElementById('notification-wrapper-inner');
|
||||
while (wrapper_inner.firstChild) {
|
||||
wrapper_inner.removeChild(wrapper_inner.firstChild);
|
||||
}
|
||||
}
|
||||
|
||||
function mark_all_notification_as_read() {
|
||||
jQuery.post ("ajax.php",
|
||||
{
|
||||
"page" : "godmode/setup/setup_notifications",
|
||||
"mark_all_notification_as_read" : 1
|
||||
},
|
||||
function (data, status) {
|
||||
notifications_clean_all();
|
||||
location.reload();
|
||||
},
|
||||
"json"
|
||||
)
|
||||
.fail(function(xhr, textStatus, errorThrown){
|
||||
console.error(
|
||||
"Failed to mark al notification as read. Error: ",
|
||||
xhr.responseText
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
function filter_notification() {
|
||||
let notification_type = '';
|
||||
$('.notification-item').hide();
|
||||
$(".checkbox_filter_notifications:checkbox:checked").each(function() {
|
||||
notification_type = $(this).val();
|
||||
console.log(notification_type);
|
||||
$('.notification-item[value='+notification_type+']').show();
|
||||
if (notification_type == 'All'){
|
||||
$('.notification-item').show();
|
||||
}
|
||||
});
|
||||
|
||||
if (notification_type == 'All'){
|
||||
$('.notification-item').show();
|
||||
}
|
||||
|
||||
if (notification_type == ''){
|
||||
$('.notification-item').hide();
|
||||
}
|
||||
}
|
||||
|
||||
function click_on_notification_toast(event) {
|
||||
var match = /notification-(.*)-id-([0-9]+)/.exec(event.target.id);
|
||||
if (!match) {
|
||||
|
@ -960,8 +986,6 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
|
|||
<?php if (enterprise_installed()) { ?>
|
||||
// Feedback.
|
||||
$("#feedback-header").click(function () {
|
||||
// Clean DOM.
|
||||
$("#feedback-header").empty();
|
||||
// Function charge Modal.
|
||||
show_feedback();
|
||||
});
|
||||
|
@ -1067,6 +1091,22 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
|
|||
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
$(document).click(function(event) {
|
||||
if (!$(event.target).closest('#modal-help-content').length &&
|
||||
$('#modal_help').hasClass('invisible') === false) {
|
||||
$('#modal_help').addClass('invisible');
|
||||
}
|
||||
});
|
||||
|
||||
$('#modal-help-content').on('click', (e) => {
|
||||
if($(e.target).prop('tagName') === 'A') {
|
||||
$('#modal_help').addClass('invisible');
|
||||
} else {
|
||||
$('#modal_help').removeClass('invisible');
|
||||
}
|
||||
});
|
||||
});
|
||||
/* ]]> */
|
||||
</script>
|
||||
|
|
|
@ -30,7 +30,7 @@ require_once __DIR__.'/../include/functions_html.php';
|
|||
echo '<style>
|
||||
:root {';
|
||||
if ($config['style'] === 'pandora') {
|
||||
echo '--login-background-color: rgba(255, 255, 255, 0.4);';
|
||||
echo '--login-background-color: rgba(255, 255, 255, 0.50);';
|
||||
echo '--login-label-color: #545454;';
|
||||
echo '--login-text-color: #000;';
|
||||
$style_theme = 'white-theme';
|
||||
|
@ -237,16 +237,18 @@ if (is_metaconsole() === true) {
|
|||
);
|
||||
}
|
||||
} else if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
|
||||
$theme_logo = ($config['style'] === 'pandora') ? 'images/custom_logo_login/Pandora FMS alt black.png' : 'enterprise/images/custom_logo_login/'.$config['custom_logo_login'];
|
||||
if (!isset($config['custom_logo_login'])) {
|
||||
html_print_image(ui_get_full_url('enterprise/images/custom_logo_login/Pandora-FMS-1.png'), false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
|
||||
html_print_image(ui_get_full_url($theme_logo), false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
|
||||
} else {
|
||||
html_print_image(ui_get_full_url('enterprise/images/custom_logo_login/'.$config['custom_logo_login']), false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
|
||||
html_print_image(ui_get_full_url($theme_logo), false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
|
||||
}
|
||||
} else {
|
||||
$theme_logo = ($config['style'] === 'pandora') ? 'images/custom_logo_login/Pandora FMS alt black.png' : 'images/custom_logo_login/'.$config['custom_logo_login'];
|
||||
if (empty($config['custom_logo_login']) === true) {
|
||||
html_print_image(ui_get_full_url('images/custom_logo_login/Pandora-FMS-1.png'), false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
|
||||
html_print_image(ui_get_full_url($theme_logo), false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
|
||||
} else {
|
||||
html_print_image(ui_get_full_url('images/custom_logo_login/').$config['custom_logo_login'], false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
|
||||
html_print_image(ui_get_full_url($theme_logo), false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -259,6 +259,8 @@ if (!empty($news)) {
|
|||
|
||||
$output_news .= '</div></div>';
|
||||
} else {
|
||||
$text = str_replace('<script', '<script', $text);
|
||||
$text = str_replace('</script', '</script', $text);
|
||||
$output_news .= nl2br($text);
|
||||
}
|
||||
|
||||
|
|
|
@ -1758,7 +1758,10 @@ if ($update_module) {
|
|||
];
|
||||
|
||||
|
||||
if ($id_module_type == 30 || $id_module_type == 31 || $id_module_type == 32 || $id_module_type == 33) {
|
||||
if ($id_module_type === 30 || $id_module_type === 31
|
||||
|| $id_module_type === 32 || $id_module_type === 33
|
||||
|| $id_module_type === 38
|
||||
) {
|
||||
$plugin_parameter_split = explode('
', $values['plugin_parameter']);
|
||||
|
||||
$values['plugin_parameter'] = '';
|
||||
|
@ -1954,7 +1957,10 @@ if ($create_module) {
|
|||
'warning_time' => $warning_time,
|
||||
];
|
||||
|
||||
if ($id_module_type === 30 || $id_module_type === 31 || $id_module_type === 32 || $id_module_type === 33) {
|
||||
if ($id_module_type === 30 || $id_module_type === 31
|
||||
|| $id_module_type === 32 || $id_module_type === 33
|
||||
|| $id_module_type === 38
|
||||
) {
|
||||
$plugin_parameter_split = explode('
', $values['plugin_parameter']);
|
||||
|
||||
$values['plugin_parameter'] = '';
|
||||
|
|
|
@ -407,8 +407,7 @@ if ($edit_module === true) {
|
|||
$help_header = 'local_module';
|
||||
}
|
||||
|
||||
if ($id_module_type === 6 || $id_module_type === 7
|
||||
) {
|
||||
if ($id_module_type === 6 || $id_module_type === 7) {
|
||||
$help_header = 'icmp_module_tab';
|
||||
}
|
||||
|
||||
|
@ -420,7 +419,7 @@ if ($edit_module === true) {
|
|||
$help_header = 'tcp_module_tab';
|
||||
}
|
||||
|
||||
if ($id_module_type >= 30 && $id_module_type <= 33) {
|
||||
if (($id_module_type >= 30 && $id_module_type <= 33) || $id_module_type === 38) {
|
||||
$help_header = 'webserver_module_tab';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -233,7 +233,6 @@ if ($adopt === false) {
|
|||
}
|
||||
|
||||
$snmp_versions['1'] = 'v. 1';
|
||||
$snmp_versions['2'] = 'v. 2';
|
||||
$snmp_versions['2c'] = 'v. 2c';
|
||||
$snmp_versions['3'] = 'v. 3';
|
||||
|
||||
|
|
|
@ -103,6 +103,7 @@ if ($create_profiles) {
|
|||
$groups_id = get_parameter('groups_id', -1);
|
||||
$users_id = get_parameter('users_id', -1);
|
||||
$n_added = 0;
|
||||
$msg_error = __('Profiles cannot be added');
|
||||
|
||||
if ($profiles_id == -1 || $groups_id == -1 || $users_id == -1) {
|
||||
$result = false;
|
||||
|
@ -155,6 +156,8 @@ if ($create_profiles) {
|
|||
if ($return !== false) {
|
||||
$n_added++;
|
||||
}
|
||||
} else {
|
||||
$msg_error = __('The profile already exist on the user');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -182,7 +185,7 @@ if ($create_profiles) {
|
|||
ui_print_result_message(
|
||||
$n_added > 0,
|
||||
__('Profiles added successfully').'('.$n_added.')',
|
||||
__('Profiles cannot be added')
|
||||
$msg_error
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -965,7 +965,6 @@ $table->data[19][0] = html_print_label_input_block(
|
|||
);
|
||||
|
||||
$snmp_versions['1'] = 'v. 1';
|
||||
$snmp_versions['2'] = 'v. 2';
|
||||
$snmp_versions['2c'] = 'v. 2c';
|
||||
$snmp_versions['3'] = 'v. 3';
|
||||
|
||||
|
|
|
@ -82,12 +82,12 @@ if ((bool) check_acl($config['id_user'], 0, 'AR') === true
|
|||
// Applications.
|
||||
$sub2 = [];
|
||||
if (enterprise_installed() === true) {
|
||||
$sub2['godmode/servers/discovery&wiz=app&mode=MicrosoftSQLServer']['text'] = __('Microsoft SQL Server');
|
||||
$sub2['godmode/servers/discovery&wiz=app&mode=mysql']['text'] = __('Mysql');
|
||||
$sub2['godmode/servers/discovery&wiz=app&mode=oracle']['text'] = __('Oracle');
|
||||
$sub2['godmode/servers/discovery&wiz=app&mode=vmware']['text'] = __('VMware');
|
||||
$sub2['godmode/servers/discovery&wiz=app&mode=SAP']['text'] = __('SAP');
|
||||
$sub2['godmode/servers/discovery&wiz=app&mode=DB2']['text'] = __('DB2');
|
||||
$sub2['godmode/servers/discovery&wiz=app&mode=MicrosoftSQLServer']['text'] = __('Microsoft SQL Server (legacy)');
|
||||
$sub2['godmode/servers/discovery&wiz=app&mode=mysql']['text'] = __('Mysql (legacy)');
|
||||
$sub2['godmode/servers/discovery&wiz=app&mode=oracle']['text'] = __('Oracle (legacy)');
|
||||
$sub2['godmode/servers/discovery&wiz=app&mode=vmware']['text'] = __('VMware (legacy)');
|
||||
$sub2['godmode/servers/discovery&wiz=app&mode=SAP']['text'] = __('SAP (legacy)');
|
||||
$sub2['godmode/servers/discovery&wiz=app&mode=DB2']['text'] = __('DB2 (legacy)');
|
||||
}
|
||||
|
||||
$extensions = ManageExtensions::getExtensionBySection('app');
|
||||
|
@ -112,9 +112,9 @@ if ((bool) check_acl($config['id_user'], 0, 'AR') === true
|
|||
// Cloud.
|
||||
$sub2 = [];
|
||||
if (enterprise_installed() === true) {
|
||||
$sub2['godmode/servers/discovery&wiz=cloud&mode=amazonws']['text'] = __('Amazon Web Services');
|
||||
$sub2['godmode/servers/discovery&wiz=cloud&mode=azure']['text'] = __('Microsoft Azure');
|
||||
$sub2['godmode/servers/discovery&wiz=cloud&mode=gcp']['text'] = __('Google Compute Platform');
|
||||
$sub2['godmode/servers/discovery&wiz=cloud&mode=amazonws']['text'] = __('Amazon Web Services (legacy)');
|
||||
$sub2['godmode/servers/discovery&wiz=cloud&mode=azure']['text'] = __('Microsoft Azure (legacy)');
|
||||
$sub2['godmode/servers/discovery&wiz=cloud&mode=gcp']['text'] = __('Google Compute Platform (legacy)');
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -45,7 +45,6 @@ if (!$id && !isset($snmp_community)) {
|
|||
}
|
||||
|
||||
$snmp_versions['1'] = 'v. 1';
|
||||
$snmp_versions['2'] = 'v. 2';
|
||||
$snmp_versions['2c'] = 'v. 2c';
|
||||
$snmp_versions['3'] = 'v. 3';
|
||||
|
||||
|
|
|
@ -190,14 +190,21 @@ $output .= html_print_label_input_block(
|
|||
html_print_extended_select_for_time(
|
||||
'period',
|
||||
$period,
|
||||
'',
|
||||
'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||
'',
|
||||
'0',
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'w100p'
|
||||
'w100p',
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
0,
|
||||
null,
|
||||
'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')'
|
||||
)
|
||||
);
|
||||
$output .= "</td><td class='datos2' width='50%'>";
|
||||
|
|
|
@ -1421,10 +1421,21 @@ $class = 'databox filters';
|
|||
html_print_extended_select_for_time(
|
||||
'period',
|
||||
$period,
|
||||
'',
|
||||
'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||
'',
|
||||
'0',
|
||||
10
|
||||
10,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
0,
|
||||
null,
|
||||
'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')'
|
||||
);
|
||||
?>
|
||||
</td>
|
||||
|
@ -1444,10 +1455,21 @@ $class = 'databox filters';
|
|||
html_print_extended_select_for_time(
|
||||
'period_range',
|
||||
$period_range,
|
||||
'',
|
||||
'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||
'',
|
||||
'0',
|
||||
10
|
||||
10,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
0,
|
||||
null,
|
||||
'check_period_warning_manual(\'period_range\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')'
|
||||
);
|
||||
?>
|
||||
</td>
|
||||
|
@ -1487,10 +1509,21 @@ $class = 'databox filters';
|
|||
html_print_extended_select_for_time(
|
||||
'period1',
|
||||
$period_pg,
|
||||
'',
|
||||
'check_period_warning(this)',
|
||||
'',
|
||||
'0',
|
||||
10
|
||||
10,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
0,
|
||||
null,
|
||||
'check_period_warning_manual(\'period\')'
|
||||
);
|
||||
?>
|
||||
</td>
|
||||
|
@ -1506,10 +1539,21 @@ $class = 'databox filters';
|
|||
html_print_extended_select_for_time(
|
||||
'period2',
|
||||
$projection_period,
|
||||
'',
|
||||
'check_period_warning(this)',
|
||||
'',
|
||||
'0',
|
||||
10
|
||||
10,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
0,
|
||||
null,
|
||||
'check_period_warning_manual(\'period\')'
|
||||
);
|
||||
?>
|
||||
</td>
|
||||
|
@ -3440,7 +3484,7 @@ $class = 'databox filters';
|
|||
html_print_extended_select_for_time(
|
||||
'lapse',
|
||||
$lapse,
|
||||
'',
|
||||
'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||
__('None'),
|
||||
'0',
|
||||
10,
|
||||
|
@ -3448,7 +3492,13 @@ $class = 'databox filters';
|
|||
'',
|
||||
'',
|
||||
'',
|
||||
!$lapse_calc
|
||||
!$lapse_calc,
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
0,
|
||||
null,
|
||||
'check_period_warning_manual(\'lapse\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')'
|
||||
);
|
||||
?>
|
||||
</td>
|
||||
|
|
|
@ -1280,8 +1280,7 @@ switch ($action) {
|
|||
|
||||
$discovery_tasklist = new DiscoveryTaskList();
|
||||
$report_task_data = $discovery_tasklist->showListConsoleTask(true);
|
||||
|
||||
if (is_array($report_task_data) === true || strpos($report_task_data, 'class="nf"') === false) {
|
||||
if (is_array($report_task_data) === true || (strpos($report_task_data, 'class="nf"') === false && $report_task_data !== -1)) {
|
||||
$task_table = '<div class="mrgn_top_15px white_box">';
|
||||
$task_table .= '<span class="white_table_graph_header">'.__('Report tasks');
|
||||
$task_table .= ui_print_help_tip(__('To schedule a report, do it from the editing view of each report.'), true);
|
||||
|
@ -1290,6 +1289,10 @@ switch ($action) {
|
|||
$task_table .= '</div></div>';
|
||||
echo $task_table;
|
||||
} else {
|
||||
if ($report_task_data === -1) {
|
||||
$report_task_data = '';
|
||||
}
|
||||
|
||||
ui_print_info_message($report_task_data.__('To schedule a report, do it from the editing view of each report.'));
|
||||
}
|
||||
|
||||
|
|
|
@ -555,6 +555,7 @@ switch ($activeTab) {
|
|||
$type = (int) get_parameter('type', STATIC_GRAPH);
|
||||
$image = get_parameter('image');
|
||||
$range = (int) get_parameter('range', 50);
|
||||
$range_vertical = (int) get_parameter('range_vertical', 50);
|
||||
$width = (int) get_parameter('width', 0);
|
||||
$height = (int) get_parameter('height', 0);
|
||||
$period = (int) get_parameter('period', 0);
|
||||
|
@ -567,6 +568,9 @@ switch ($activeTab) {
|
|||
$label_type = get_parameter('label_type', 'agent_module');
|
||||
$enable_link = get_parameter('enable_link', 'enable_link');
|
||||
$show_on_top = get_parameter('show_on_top', 0);
|
||||
$pos_x = get_parameter('pos_x', 0);
|
||||
$pos_y = get_parameter('pos_y', 0);
|
||||
$max_elements_row = (int) get_parameter('max_elements_row', 0);
|
||||
|
||||
// This var switch between creation of items, item_per_agent = 0 => item per module; item_per_agent <> 0 => item per agent
|
||||
$item_per_agent = get_parameter('item_per_agent', 0);
|
||||
|
@ -611,6 +615,7 @@ switch ($activeTab) {
|
|||
$image,
|
||||
$idVisualConsole,
|
||||
$range,
|
||||
$range_vertical,
|
||||
$width,
|
||||
$height,
|
||||
$period,
|
||||
|
@ -626,7 +631,10 @@ switch ($activeTab) {
|
|||
$kind_relationship,
|
||||
$item_in_the_map,
|
||||
$fontf,
|
||||
$fonts
|
||||
$fonts,
|
||||
$pos_x,
|
||||
$pos_y,
|
||||
$max_elements_row
|
||||
);
|
||||
|
||||
$statusProcessInDB = [
|
||||
|
@ -668,6 +676,7 @@ switch ($activeTab) {
|
|||
$image,
|
||||
$idVisualConsole,
|
||||
$range,
|
||||
$range_vertical,
|
||||
$width,
|
||||
$height,
|
||||
$period,
|
||||
|
@ -683,7 +692,10 @@ switch ($activeTab) {
|
|||
$kind_relationship,
|
||||
$item_in_the_map,
|
||||
$fontf,
|
||||
$fonts
|
||||
$fonts,
|
||||
$pos_x,
|
||||
$pos_y,
|
||||
$max_elements_row
|
||||
);
|
||||
} else {
|
||||
$id_modules = [];
|
||||
|
@ -722,6 +734,7 @@ switch ($activeTab) {
|
|||
$image,
|
||||
$idVisualConsole,
|
||||
$range,
|
||||
$range_vertical,
|
||||
$width,
|
||||
$height,
|
||||
$period,
|
||||
|
@ -737,7 +750,10 @@ switch ($activeTab) {
|
|||
$kind_relationship,
|
||||
$item_in_the_map,
|
||||
$fontf,
|
||||
$fonts
|
||||
$fonts,
|
||||
$pos_x,
|
||||
$pos_y,
|
||||
$max_elements_row
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -144,22 +144,28 @@ $table->data['all_0'][0] = html_print_label_input_block(
|
|||
|
||||
|
||||
$table->rowstyle['staticgraph'] = 'display: none;';
|
||||
$table->colspan['staticgraph'][0] = 2;
|
||||
$table->data['staticgraph'][0] = html_print_label_input_block(
|
||||
__('Image'),
|
||||
html_print_select(
|
||||
'<div class="flex">'.html_print_select(
|
||||
$images_list,
|
||||
'image',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true
|
||||
)
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'width: 49%'
|
||||
).'<span id="image_prev" class="mrgn_lft_10px mrgn_top-10px"><img src="'.$config['homeurl'].'/images/console/icons/appliance_ok.png"></span></div>'
|
||||
);
|
||||
|
||||
$table->rowstyle['all_1'] = 'display: none;';
|
||||
$table->data['all_1'][0] = html_print_label_input_block(
|
||||
__('Range between elements (px)'),
|
||||
__('Horizontal range between elements (px)'),
|
||||
html_print_input_text(
|
||||
'range',
|
||||
50,
|
||||
|
@ -170,6 +176,18 @@ $table->data['all_1'][0] = html_print_label_input_block(
|
|||
)
|
||||
);
|
||||
|
||||
$table->data['all_1'][1] = html_print_label_input_block(
|
||||
__('Vertical range between elements (px)'),
|
||||
html_print_input_text(
|
||||
'range_vertical',
|
||||
50,
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$input_size = __('Width').': ';
|
||||
$input_size .= html_print_input_text('width', 0, '', 5, 5, true);
|
||||
$input_size .= __('Height').': ';
|
||||
|
@ -425,6 +443,16 @@ if (is_metaconsole() === false) {
|
|||
);
|
||||
}
|
||||
|
||||
$table->data['all_4_01'][0] = html_print_label_input_block(
|
||||
__('Filter agents'),
|
||||
html_print_input_text('filter_agents', '', '', false, 255, true)
|
||||
);
|
||||
|
||||
$table->data['all_4_01'][1] = html_print_label_input_block(
|
||||
__('Filter modules'),
|
||||
html_print_input_text('filter_modules', '', '', false, 255, true)
|
||||
);
|
||||
|
||||
$table->rowstyle['all_4'] = 'display: none;';
|
||||
$table->data['all_4'][0] = html_print_label_input_block(
|
||||
__('Agents').ui_print_help_tip(
|
||||
|
@ -549,6 +577,16 @@ $table->data['all_8'][1] = html_print_label_input_block(
|
|||
).'</span>'
|
||||
);
|
||||
|
||||
$table->data['all_10'][0] = html_print_label_input_block(
|
||||
__('Max. elements for row'),
|
||||
html_print_input_text('max_elements_row', 0, '', false, 255, true)
|
||||
);
|
||||
|
||||
$table->data['all_10'][1] = html_print_label_input_block(
|
||||
__('Position'),
|
||||
'<div class="flex_center"><span class="mrgn_right_10px">X</span>'.html_print_input_text('pos_x', 0, '', false, 255, true, false, false, '', 'w50p').'<span class="margin-lr-10">Y</span>'.html_print_input_text('pos_y', 0, '', false, 255, true, false, false, '', 'w50p').'</div>'
|
||||
);
|
||||
|
||||
if (is_metaconsole() === true) {
|
||||
$pure = get_parameter('pure', 0);
|
||||
|
||||
|
@ -831,6 +869,44 @@ function item_per_agent_change(itemPerAgent) {
|
|||
function metaconsole_init() {
|
||||
$("#groups").change();
|
||||
}
|
||||
|
||||
$('#text-filter_agents').on('keyup',function(){
|
||||
if ($(this).val() !== ''){
|
||||
findInSelect('id_agents',$(this).val());
|
||||
} else {
|
||||
$('#id_agents option').each(function(){
|
||||
$(this).removeClass('invisible');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$('#text-filter_modules').on('keyup',function(){
|
||||
if ($(this).val() !== ''){
|
||||
findInSelect('module',$(this).val());
|
||||
} else {
|
||||
$('#module option').each(function(){
|
||||
$(this).removeClass('invisible');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function findInSelect(selectid, find){
|
||||
var select = $('#'+selectid+' option');
|
||||
select.each(function(){
|
||||
var regex = new RegExp(find, "gi");
|
||||
if ($(this).html().match(regex) === null) {
|
||||
$(this).addClass('invisible');
|
||||
} else {
|
||||
$(this).removeClass('invisible');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
$('#image').on('change', function(){
|
||||
var img = $(this).val();
|
||||
$('#image_prev').html('<img src="<?php echo $config['homeurl']; ?>/images/console/icons/'+img+'.png">');
|
||||
})
|
||||
|
||||
</script>
|
||||
<style type="text/css">
|
||||
select[name='kind_relationship'] option[disabled='disabled'] {
|
||||
|
|
|
@ -24,6 +24,14 @@ if (! check_acl($config['id_user'], 0, 'AR')
|
|||
|
||||
ui_require_css_file('discovery');
|
||||
|
||||
ui_require_javascript_file('pandora_alerts');
|
||||
ui_include_time_picker();
|
||||
ui_require_jquery_file('ui.datepicker-'.get_user_language(), 'include/javascript/i18n/');
|
||||
ui_require_javascript_file('tinymce', 'vendor/tinymce/tinymce/');
|
||||
ui_require_css_file('main.min', 'include/javascript/fullcalendar/');
|
||||
ui_require_javascript_file('main.min', 'include/javascript/fullcalendar/');
|
||||
ui_require_javascript_file('pandora_fullcalendar');
|
||||
|
||||
|
||||
/**
|
||||
* Mask class names.
|
||||
|
@ -204,3 +212,115 @@ if ($classname_selected === null) {
|
|||
|
||||
Wizard::printBigButtonsList($wiz_data);
|
||||
}
|
||||
|
||||
$is_management_allowed = is_management_allowed();
|
||||
$task_id = get_parameter('task', '');
|
||||
if ($task_id !== '') {
|
||||
$task = db_get_row_filter(
|
||||
'tuser_task_scheduled',
|
||||
['id' => $task_id]
|
||||
);
|
||||
$args = unserialize($task['args']);
|
||||
$event_calendar = io_safe_output($args['weekly_schedule']);
|
||||
} else {
|
||||
$event_calendar = '{"monday":[{"start":"00:00:00","end":"00:00:00"}],"tuesday":[{"start":"00:00:00","end":"00:00:00"}],"wednesday":[{"start":"00:00:00","end":"00:00:00"}],"thursday":[{"start":"00:00:00","end":"00:00:00"}],"friday":[{"start":"00:00:00","end":"00:00:00"}],"saturday":[{"start":"00:00:00","end":"00:00:00"}],"sunday":[{"start":"00:00:00","end":"00:00:00"}]}';
|
||||
}
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$(document).ready (function () {
|
||||
$("#table-new-job-3").hide();
|
||||
var edit = '<?php echo $task_id; ?>';
|
||||
if (edit != '') {
|
||||
exec_calendar();
|
||||
}
|
||||
|
||||
$("#scheduled").change(exec_calendar);
|
||||
|
||||
function exec_calendar() {
|
||||
if ($("#scheduled").val() == "weekly") {
|
||||
var is_management_allowed = parseInt('<?php echo (int) $is_management_allowed; ?>');
|
||||
var eventsBBDD = '<?php echo $event_calendar; ?>';
|
||||
var events = loadEventBBDD(eventsBBDD);
|
||||
var calendarEl = document.getElementById('calendar_map');
|
||||
|
||||
var options = {
|
||||
contentHeight: "auto",
|
||||
headerToolbar: {
|
||||
left: "",
|
||||
center: "",
|
||||
right: is_management_allowed === 0 ? '' : "timeGridWeek,dayGridWeek"
|
||||
},
|
||||
buttonText: {
|
||||
dayGridWeek: '<?php echo __('Simple'); ?>',
|
||||
timeGridWeek: '<?php echo __('Detailed'); ?>'
|
||||
},
|
||||
dayHeaderFormat: { weekday: "short" },
|
||||
initialView: "dayGridWeek",
|
||||
navLinks: false,
|
||||
selectable: true,
|
||||
selectMirror: true,
|
||||
slotDuration: "01:00:00",
|
||||
slotLabelInterval: "02:00:00",
|
||||
snapDuration: "01:00:00",
|
||||
slotMinTime: "00:00:00",
|
||||
slotMaxTime: "24:00:00",
|
||||
scrollTime: "01:00:00",
|
||||
locale: "en-GB",
|
||||
firstDay: 1,
|
||||
eventTimeFormat: {
|
||||
hour: "numeric",
|
||||
minute: "2-digit",
|
||||
hour12: false
|
||||
},
|
||||
eventColor: "#82b92e",
|
||||
editable: is_management_allowed === 0 ? false : true,
|
||||
dayMaxEvents: 3,
|
||||
dayPopoverFormat: { weekday: "long" },
|
||||
defaultAllDay: false,
|
||||
displayEventTime: true,
|
||||
displayEventEnd: true,
|
||||
selectOverlap: false,
|
||||
eventOverlap: false,
|
||||
allDaySlot: true,
|
||||
droppable: false,
|
||||
select: is_management_allowed === 0 ? false : select_alert_template,
|
||||
selectAllow: is_management_allowed === 0 ? false : selectAllow_alert_template,
|
||||
eventAllow: is_management_allowed === 0 ? false : eventAllow_alert_template,
|
||||
eventDrop: is_management_allowed === 0 ? false : eventDrop_alert_template,
|
||||
eventDragStop: is_management_allowed === 0 ? false : eventDragStop_alert_template,
|
||||
eventResize: is_management_allowed === 0 ? false : eventResize_alert_template,
|
||||
eventMouseEnter: is_management_allowed === 0 ? false : eventMouseEnter_alert_template,
|
||||
eventMouseLeave: is_management_allowed === 0 ? false : eventMouseLeave_alert_template,
|
||||
eventClick: is_management_allowed === 0 ? false : eventClick_alert_template,
|
||||
};
|
||||
|
||||
var settings = {
|
||||
timeFormat: '<?php echo TIME_FORMAT_JS; ?>',
|
||||
timeOnlyTitle: '<?php echo __('Choose time'); ?>',
|
||||
timeText: '<?php echo __('Time'); ?>',
|
||||
hourText: '<?php echo __('Hour'); ?>',
|
||||
minuteText: '<?php echo __('Minute'); ?>',
|
||||
secondText: '<?php echo __('Second'); ?>',
|
||||
currentText: '<?php echo __('Now'); ?>',
|
||||
closeText: '<?php echo __('Close'); ?>',
|
||||
url: '<?php echo ui_get_full_url('ajax.php', false, false, false); ?>',
|
||||
removeText: '<?php echo __('Remove'); ?>',
|
||||
userLanguage: '<?php echo get_user_language(); ?>',
|
||||
loadingText: '<?php echo __('Loading, this operation might take several minutes...'); ?>',
|
||||
tooltipText: '<?php echo __('Drag out to remove'); ?>',
|
||||
alert: '<?php echo __('Alert'); ?>'
|
||||
}
|
||||
|
||||
var calendar = fullCalendarPandora(calendarEl, options, settings, events);
|
||||
calendar.render();
|
||||
|
||||
$("#table-new-job-3").show();
|
||||
$('.fc-event-title').hide();
|
||||
$(".fc-button-active" ).trigger( "click" );
|
||||
} else {
|
||||
$("#calendar_map").html();
|
||||
$("#table-new-job-3").hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
|
@ -189,7 +189,8 @@ $table->data[1][1] = html_print_label_input_block(
|
|||
255,
|
||||
true,
|
||||
true
|
||||
).' '.($license['limit_mode'] == 0 ? __('agents') : __('modules'))
|
||||
)
|
||||
// .' '.($license['limit_mode'] == 0 ? __('agents') : __('modules'))
|
||||
);
|
||||
|
||||
$table->data[2][0] = html_print_label_input_block(
|
||||
|
@ -202,7 +203,8 @@ $table->data[2][0] = html_print_label_input_block(
|
|||
255,
|
||||
true,
|
||||
true
|
||||
).' '.($license['limit_mode'] == 0 ? __('agents') : __('modules'))
|
||||
)
|
||||
// .' '.($license['limit_mode'] == 0 ? __('agents') : __('modules'))
|
||||
);
|
||||
|
||||
$table->data[2][1] = html_print_label_input_block(
|
||||
|
@ -215,7 +217,8 @@ $table->data[2][1] = html_print_label_input_block(
|
|||
255,
|
||||
true,
|
||||
true
|
||||
).' '.($license['limit_mode'] == 0 ? __('agents') : __('modules'))
|
||||
)
|
||||
// .' '.($license['limit_mode'] == 0 ? __('agents') : __('modules'))
|
||||
);
|
||||
|
||||
$table->data[3][0] = html_print_label_input_block(
|
||||
|
@ -228,7 +231,8 @@ $table->data[3][0] = html_print_label_input_block(
|
|||
255,
|
||||
true,
|
||||
true
|
||||
).' '.($license['limit_mode'] == 0 ? __('agents') : __('modules'))
|
||||
)
|
||||
// .' '.($license['limit_mode'] == 0 ? __('agents') : __('modules'))
|
||||
);
|
||||
|
||||
$table->data[3][1] = html_print_label_input_block(
|
||||
|
@ -325,6 +329,18 @@ if (enterprise_installed() || defined('DESTDIR')) {
|
|||
],
|
||||
true
|
||||
);
|
||||
$buttons .= html_print_button(
|
||||
__('Show agent usage details'),
|
||||
'agents_details',
|
||||
false,
|
||||
'show_agents_details_dialog()',
|
||||
[
|
||||
'fixed_id' => 'button-agents_details',
|
||||
'icon' => 'next',
|
||||
'mode' => 'secondary',
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
html_print_action_buttons(
|
||||
$buttons
|
||||
|
@ -369,3 +385,80 @@ if (enterprise_hook('print_activate_licence_dialog') == ENTERPRISE_NOT_HOOK) {
|
|||
echo '</ul>';
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox filter-table-adv';
|
||||
$table->size = [];
|
||||
$table->size[0] = '50%';
|
||||
$table->size[1] = '50%';
|
||||
$table->data = [];
|
||||
$table->colspan = [];
|
||||
|
||||
$table->data[0][0] = html_print_label_input_block(
|
||||
__('Total Agents'),
|
||||
html_print_input_text(
|
||||
'total_agents',
|
||||
$total_agents,
|
||||
'',
|
||||
30,
|
||||
255,
|
||||
true,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[0][1] = html_print_label_input_block(
|
||||
__('Network & other devices'),
|
||||
html_print_input_text(
|
||||
'type_network',
|
||||
$network_others,
|
||||
'',
|
||||
30,
|
||||
255,
|
||||
true,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[1][0] = html_print_label_input_block(
|
||||
__('Workstations'),
|
||||
html_print_input_text(
|
||||
'type_workstation',
|
||||
$workstations,
|
||||
'',
|
||||
30,
|
||||
255,
|
||||
true,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[1][1] = html_print_label_input_block(
|
||||
__('Servers'),
|
||||
html_print_input_text(
|
||||
'type_server',
|
||||
$servers,
|
||||
'',
|
||||
30,
|
||||
255,
|
||||
true,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[2][0] = html_print_label_input_block(
|
||||
__('Show disabled agents'),
|
||||
html_print_checkbox_switch(
|
||||
'show_disabled_agents',
|
||||
1,
|
||||
1,
|
||||
true,
|
||||
false,
|
||||
'show_disabled_agents()'
|
||||
)
|
||||
);
|
||||
|
||||
echo '<div id="agents_details_dialog" class="invisible left" title="'.__('Agents usage details').'">';
|
||||
html_print_table($table);
|
||||
echo '</div>';
|
|
@ -187,6 +187,27 @@ if (get_parameter('mark_notification_as_read', 0)) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (get_parameter('mark_all_notification_as_read', 0)) {
|
||||
$unread_messages = db_get_all_rows_sql('SELECT id_mensaje FROM tnotification_user WHERE utimestamp_read is NULL');
|
||||
|
||||
if ($unread_messages !== false) {
|
||||
foreach ($unread_messages as $messages) {
|
||||
messages_process_read($messages['id_mensaje']);
|
||||
}
|
||||
|
||||
$result = true;
|
||||
} else {
|
||||
$result = false;
|
||||
}
|
||||
|
||||
// If there is new messages, get the info.
|
||||
echo json_encode(
|
||||
['result' => $result]
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (get_parameter('get_notifications_dropdown', 0)) {
|
||||
echo notifications_print_dropdown();
|
||||
return;
|
||||
|
|
|
@ -1927,7 +1927,7 @@ $table_other->data[$row][] = html_print_label_input_block(
|
|||
).html_print_div(
|
||||
[
|
||||
'class' => '',
|
||||
'content' => __('Interval').html_print_select($units, 'interval_unit', 1, '', '', '', true, false, false, '', false, 'width: 100%'),
|
||||
'content' => __('Interval').html_print_select($units, 'interval_unit', '', '', '', '', true, false, false, '', false, 'width: 100%'),
|
||||
],
|
||||
true
|
||||
).html_print_button(
|
||||
|
@ -1975,7 +1975,7 @@ $table_other->data[$row][] = html_print_label_input_block(
|
|||
).html_print_button(
|
||||
__('Delete'),
|
||||
'interval_del_btn',
|
||||
empty($config['interval_values']),
|
||||
false,
|
||||
'',
|
||||
[
|
||||
'mode' => 'link',
|
||||
|
@ -2009,7 +2009,7 @@ $table_other->data[$row][] = html_print_label_input_block(
|
|||
).html_print_div(
|
||||
[
|
||||
'class' => '',
|
||||
'content' => __('Interval').html_print_select($units, 'interval_unit', 1, '', '', '', true, false, false, '', false, 'width: 100%'),
|
||||
'content' => __('Interval').html_print_select($units, 'module_interval_unit', 1, '', '', '', true, false, false, '', false, 'width: 100%'),
|
||||
],
|
||||
true
|
||||
).html_print_button(
|
||||
|
@ -2316,9 +2316,15 @@ $(document).ready (function () {
|
|||
// CUSTOM INTERVAL VALUES
|
||||
//------------------------------------------------------------------
|
||||
$("#button-interval_del_btn").click( function() {
|
||||
var interval_selected = $('#intervals option:selected').val();
|
||||
$('#hidden-interval_to_delete').val(interval_selected);
|
||||
$('#submit-update_button').trigger('click');
|
||||
confirmDialog({
|
||||
title: "<?php echo __('Delete interval'); ?>",
|
||||
message: "<?php echo __('This action is not reversible. Are you sure'); ?>",
|
||||
onAccept: function() {
|
||||
var interval_selected = $('#intervals option:selected').val();
|
||||
$('#hidden-interval_to_delete').val(interval_selected);
|
||||
$('#button-update_button').trigger('click');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#button-interval_add_btn").click( function() {
|
||||
|
|
|
@ -592,6 +592,9 @@ $userManagementTable->data['line2_looknfeel'][0] = html_print_select_from_sql(
|
|||
true
|
||||
);
|
||||
|
||||
// Hidden hint to change theme.
|
||||
$hin_change_theme = ui_print_help_tip(__('When changing the theme, the login screen logo will be restricted to the default for that color scheme, if you have a custom logo, adjust it after changing the theme.'), true, '', '', 'display: none;');
|
||||
|
||||
if (is_metaconsole() === true) {
|
||||
if (users_is_admin() === true) {
|
||||
$userManagementTable->data['line1_looknfeel'][1] = $outputMetaAccess[0];
|
||||
|
@ -599,7 +602,7 @@ if (is_metaconsole() === true) {
|
|||
}
|
||||
} else {
|
||||
if (function_exists('skins_print_select')) {
|
||||
$userManagementTable->data['line1_looknfeel'][1] = __('User color scheme');
|
||||
$userManagementTable->data['line1_looknfeel'][1] = __('User color scheme').$hin_change_theme;
|
||||
$userManagementTable->data['line2_looknfeel'][1] = skins_print_select($id_usr, 'skin', $user_info['id_skin'], '', __('None'), 0, true);
|
||||
}
|
||||
}
|
||||
|
@ -817,5 +820,10 @@ $(document).ready(function () {
|
|||
128,
|
||||
128
|
||||
);
|
||||
|
||||
//Hint to change theme.
|
||||
$('#skin1').on("change", () => {
|
||||
$('#advanced-line1_looknfeel-1 > a').css('display', 'block');
|
||||
})
|
||||
});
|
||||
</script>
|
|
@ -67,6 +67,9 @@ class Applications extends Wizard
|
|||
'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=app'
|
||||
);
|
||||
|
||||
// Print Warning Message.
|
||||
$this->printWarningMessage();
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
|
|
@ -220,6 +220,9 @@ class Cloud extends Wizard
|
|||
echo '<div class="app_mssg"><i>*'.__('All company names used here are for identification purposes only. Use of these names, logos, and brands does not imply endorsement.').'</i></div>';
|
||||
}
|
||||
|
||||
// Print Warning Message.
|
||||
$this->printWarningMessage();
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,6 +32,8 @@ require_once $config['homedir'].'/include/class/HTML.class.php';
|
|||
require_once $config['homedir'].'/include/functions_users.php';
|
||||
require_once $config['homedir'].'/include/functions_reports.php';
|
||||
require_once $config['homedir'].'/include/functions_cron.php';
|
||||
require_once $config['homedir'].'/godmode/wizards/Wizard.main.php';
|
||||
|
||||
enterprise_include_once('include/functions_tasklist.php');
|
||||
enterprise_include_once('include/functions_cron.php');
|
||||
|
||||
|
@ -214,6 +216,10 @@ class DiscoveryTaskList extends HTML
|
|||
html_print_action_buttons($this->printForm($form, true));
|
||||
}
|
||||
|
||||
// Warning Message.
|
||||
$wizar_main = new Wizard();
|
||||
$wizar_main->printWarningMessage();
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
@ -569,7 +575,7 @@ class DiscoveryTaskList extends HTML
|
|||
$recon_tasks = db_get_all_rows_sql(
|
||||
sprintf(
|
||||
'SELECT tasks.*, apps.section AS section, apps.short_name AS short_name
|
||||
FROM trecon_task
|
||||
FROM trecon_task tasks
|
||||
LEFT JOIN tdiscovery_apps apps ON tasks.id_app = apps.id_app
|
||||
WHERE id_group IN (%s) AND
|
||||
(type IN (%s) OR section = "%s")',
|
||||
|
@ -776,7 +782,7 @@ class DiscoveryTaskList extends HTML
|
|||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
).' ';
|
||||
$data[6] .= __('Cloud.Azure.Compute');
|
||||
$data[6] .= __('Cloud.Azure.Compute (legacy)');
|
||||
break;
|
||||
|
||||
case DISCOVERY_CLOUD_AWS_EC2:
|
||||
|
@ -789,7 +795,7 @@ class DiscoveryTaskList extends HTML
|
|||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
).' ';
|
||||
$data[6] .= __('Cloud.AWS.EC2');
|
||||
$data[6] .= __('Cloud.AWS.EC2 (legacy)');
|
||||
break;
|
||||
|
||||
case DISCOVERY_CLOUD_AWS_RDS:
|
||||
|
@ -802,7 +808,7 @@ class DiscoveryTaskList extends HTML
|
|||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
).' ';
|
||||
$data[6] .= __('Discovery.Cloud.Aws.RDS');
|
||||
$data[6] .= __('Discovery.Cloud.Aws.RDS (legacy)');
|
||||
break;
|
||||
|
||||
case DISCOVERY_CLOUD_AWS_S3:
|
||||
|
@ -815,7 +821,7 @@ class DiscoveryTaskList extends HTML
|
|||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
).' ';
|
||||
$data[6] .= __('Discovery.Cloud.Aws.S3');
|
||||
$data[6] .= __('Discovery.Cloud.Aws.S3 (legacy)');
|
||||
break;
|
||||
|
||||
case DISCOVERY_APP_MYSQL:
|
||||
|
@ -828,7 +834,7 @@ class DiscoveryTaskList extends HTML
|
|||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
).' ';
|
||||
$data[6] .= __('Discovery.App.MySQL');
|
||||
$data[6] .= __('Discovery.App.MySQL (legacy)');
|
||||
break;
|
||||
|
||||
case DISCOVERY_APP_ORACLE:
|
||||
|
@ -841,7 +847,7 @@ class DiscoveryTaskList extends HTML
|
|||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
).' ';
|
||||
$data[6] .= __('Discovery.App.Oracle');
|
||||
$data[6] .= __('Discovery.App.Oracle (legacy)');
|
||||
break;
|
||||
|
||||
case DISCOVERY_APP_DB2:
|
||||
|
@ -854,7 +860,7 @@ class DiscoveryTaskList extends HTML
|
|||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
).' ';
|
||||
$data[6] .= __('Discovery.App.DB2');
|
||||
$data[6] .= __('Discovery.App.DB2 (legacy)');
|
||||
break;
|
||||
|
||||
case DISCOVERY_DEPLOY_AGENTS:
|
||||
|
@ -865,7 +871,7 @@ class DiscoveryTaskList extends HTML
|
|||
true,
|
||||
['title' => __('Agent deployment')]
|
||||
).' ';
|
||||
$data[6] .= __('Discovery.Agent.Deployment');
|
||||
$data[6] .= __('Discovery.Agent.Deployment (legacy)');
|
||||
break;
|
||||
|
||||
case DISCOVERY_APP_MICROSOFT_SQL_SERVER:
|
||||
|
@ -878,7 +884,7 @@ class DiscoveryTaskList extends HTML
|
|||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
).' ';
|
||||
$data[6] .= __('Discovery.App.Microsoft SQL Server');
|
||||
$data[6] .= __('Discovery.App.Microsoft SQL Server (legacy)');
|
||||
break;
|
||||
|
||||
case DISCOVERY_EXTENSION:
|
||||
|
@ -906,7 +912,7 @@ class DiscoveryTaskList extends HTML
|
|||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
).' ';
|
||||
$data[6] .= __('Discovery.NetScan');
|
||||
$data[6] .= __('Discovery.NetScan (legacy)');
|
||||
} else {
|
||||
// APP or external script recon task.
|
||||
$data[6] = html_print_image(
|
||||
|
@ -914,7 +920,7 @@ class DiscoveryTaskList extends HTML
|
|||
true,
|
||||
['class' => 'main_menu_icon invert_filter']
|
||||
).' ';
|
||||
$data[6] .= $recon_script_name;
|
||||
$data[6] .= $recon_script_name.' (legacy)';
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -2022,4 +2028,28 @@ class DiscoveryTaskList extends HTML
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* Generates warning message.
|
||||
*
|
||||
* @return void Warning message.
|
||||
|
||||
public function getWarningMessage()
|
||||
{
|
||||
return ui_print_warning_message(
|
||||
__(
|
||||
'Starting with version 773, the new modular system of discovery 2.0 has been implemented. The current
|
||||
discovery (1.0) and its defined tasks will continue to function normally until the next LTS version,
|
||||
in which migration to the new system will be mandatory.
|
||||
The tasks of the current discovery (1.0) will be marked as legacy although it will not affect their
|
||||
operation, it will only be a visual indicator to identify and differentiate the tasks of discovery 1.0
|
||||
from those of the new version 2.0.
|
||||
In the intermediate versions between the 773 and the next LTS version, more applications of the new
|
||||
discovery 2.0 will be added. Both new and those that will come to replace the applications of the
|
||||
current discovery 1.0. In addition, an automatic migration tool for legacy (1.0) tasks to the new 2.0
|
||||
model will be included.'
|
||||
)
|
||||
);
|
||||
}*/
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -522,4 +522,28 @@ class Wizard
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Generates warning message.
|
||||
*
|
||||
* @return void Warning message.
|
||||
*/
|
||||
public function printWarningMessage()
|
||||
{
|
||||
return ui_print_warning_message(
|
||||
__(
|
||||
'Starting with version 773, the new modular system of discovery 2.0 has been implemented. The current
|
||||
discovery (1.0) and its defined tasks will continue to function normally until the next LTS version,
|
||||
in which migration to the new system will be mandatory.
|
||||
The tasks of the current discovery (1.0) will be marked as legacy although it will not affect their
|
||||
operation, it will only be a visual indicator to identify and differentiate the tasks of discovery 1.0
|
||||
from those of the new version 2.0.
|
||||
In the intermediate versions between the 773 and the next LTS version, more applications of the new
|
||||
discovery 2.0 will be added. Both new and those that will come to replace the applications of the
|
||||
current discovery 1.0. In addition, an automatic migration tool for legacy (1.0) tasks to the new 2.0
|
||||
model will be included.'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Icons/Dark/20/checkbox-on@svg</title>
|
||||
<g id="Icons/Dark/20/checkbox-on" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<rect id="Rectangle-2" stroke="#82b92e" stroke-width="2" x="1" y="1" width="18" height="18" rx="4"></rect>
|
||||
<path d="M14.3713994,6.22237132 C14.8008905,5.87515972 15.4305323,5.94186038 15.7777439,6.37135141 C16.098247,6.76780467 16.0660673,7.33480068 15.7214138,7.69277628 L15.6287639,7.77769594 L8.20693177,13.7776959 C7.78987666,14.114854 7.18888164,14.0598005 6.83812914,13.672688 L6.76182606,13.5774872 L4.18365814,9.93238606 C3.86473931,9.48148781 3.97172977,8.85742777 4.42262802,8.53850895 C4.83884178,8.24412234 5.40260169,8.31264068 5.73770948,8.67956758 L5.81650513,8.77747883 L7.77861597,11.5510307 L14.3713994,6.22237132 Z" id="Path-10" fill="#82b92e" fill-rule="nonzero"></path>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 93 KiB |
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 12 KiB |
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 61.2 (89653) - https://sketch.com -->
|
||||
<title>Dark / 20 / delete-v2@svg</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<g id="Dark-/-20-/-delete-v2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Group" transform="translate(10.000000, 10.000000) rotate(45.000000) translate(-10.000000, -10.000000) translate(4.000000, 4.000000)" fill="#e63c52">
|
||||
<path d="M6,0 C6.51283584,0 6.93550716,0.38604019 6.99327227,0.883378875 L7,1 L7,5 L11,5 C11.5522847,5 12,5.44771525 12,6 C12,6.51283584 11.6139598,6.93550716 11.1166211,6.99327227 L11,7 L7,7 L7,11 C7,11.5522847 6.55228475,12 6,12 C5.48716416,12 5.06449284,11.6139598 5.00672773,11.1166211 L5,11 L5,7 L1,7 C0.44771525,7 0,6.55228475 0,6 C0,5.48716416 0.38604019,5.06449284 0.883378875,5.00672773 L1,5 L5,5 L5,1 C5,0.44771525 5.44771525,0 6,0 Z" id="Path-7"></path>
|
||||
</g>
|
||||
<path d="M10,0 C4.4771525,0 0,4.4771525 0,10 C0,15.5228475 4.4771525,20 10,20 C15.5228475,20 20,15.5228475 20,10 C20,4.4771525 15.5228475,0 10,0 Z M10,2 C14.418278,2 18,5.581722 18,10 C18,14.418278 14.418278,18 10,18 C5.581722,18 2,14.418278 2,10 C2,5.581722 5.581722,2 10,2 Z" id="Oval" fill="#e63c52"></path>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>help_pandora</title>
|
||||
<g id="help_pandora" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<path d="M10,0 C15.4050388,0 20,1.5951272 20,5.39448104 L20,14.605519 C20,18.4048728 15.4050388,20 10,20 C4.59496118,20 0,18.4048728 0,14.605519 L0,5.39448104 C0,1.5951272 4.59496118,0 10,0 Z M9.79831933,13.1716621 C8.99159664,13.1716621 8.35294118,13.8092643 8.35294118,14.5940054 C8.35294118,15.3623978 8.99159664,16 9.79831933,16 C10.605042,16 11.2605042,15.3623978 11.2605042,14.5940054 C11.2605042,13.8092643 10.605042,13.1716621 9.79831933,13.1716621 Z M9.91596639,4 C7.46218487,4 6,5.61852861 6,7.53133515 C6,7.74386921 6.01680672,7.98910082 6.06722689,8.21798365 L8.42016807,8.29972752 C8.40336134,8.23433243 8.3697479,8.07084469 8.3697479,7.69482289 C8.3697479,6.92643052 8.94117647,6.15803815 9.91596639,6.15803815 C10.9243697,6.15803815 11.4117647,6.77929155 11.4117647,7.41689373 C11.4117647,7.84196185 11.2605042,8.23433243 10.8067227,8.5613079 L9.94957983,9.18256131 C8.99159664,9.88555858 8.67226891,10.719346 8.67226891,11.4877384 C8.67226891,11.7493188 8.68907563,11.9782016 8.7394958,12.2070845 L10.7394958,12.2070845 C10.7394958,11.4713896 11.1428571,11.0463215 11.7310924,10.6212534 L12.3697479,10.1634877 C13.3781513,9.42779292 14,8.52861035 14,7.22070845 C14,5.58583106 12.6386555,4 9.91596639,4 Z" id="Mask" fill="#3F3F3F"></path>
|
||||
<g id="?" transform="translate(6, 4)"></g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.6 KiB |
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Security scan@svg</title>
|
||||
<g id="Security-scan" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<path d="M12,3 C13.6568542,3 15,4.34314575 15,6 L15,8 L13,8 L13,6 C13,5.44771525 12.5522847,5 12,5 L8,5 C7.44771525,5 7,5.44771525 7,6 L7,8 L5,8 L5,6 C5,4.34314575 6.34314575,3 8,3 L12,3 Z M4,0 C4.55228475,0 5,0.44771525 5,1 C5,1.51283584 4.61395981,1.93550716 4.11662113,1.99327227 L4,2 L2,2 L2,4.00298691 C2,4.51582275 1.61395981,4.93849407 1.11662113,4.99625918 L1,5.00298691 C0.487164161,5.00298691 0.0644928393,4.61694672 0.00672773133,4.11960803 L0,4.00298691 L0,1 C0,0.487164161 0.38604019,0.0644928393 0.883378875,0.00672773133 L1,0 L4,0 Z M19,0 L19.1166211,0.00672773133 C19.6139598,0.0644928393 20,0.487164161 20,1 L20,4.00298691 L19.9932723,4.11960803 C19.9355072,4.61694672 19.5128358,5.00298691 19,5.00298691 L18.8833789,4.99625918 C18.3860402,4.93849407 18,4.51582275 18,4.00298691 L18,2 L16,2 L15.8833789,1.99327227 C15.3860402,1.93550716 15,1.51283584 15,1 C15,0.44771525 15.4477153,0 16,0 L19,0 Z M1,15 L1.11662113,15.0067277 C1.61395981,15.0644928 2,15.4871642 2,16 L2,18.0029869 L4,18.0029869 L4.11662113,18.0097146 C4.61395981,18.0674797 5,18.4901511 5,19.0029869 C5,19.5552717 4.55228475,20.0029869 4,20.0029869 L1,20.0029869 L0.883378875,19.9962592 C0.38604019,19.9384941 0,19.5158227 0,19.0029869 L0,16 L0.00672773133,15.8833789 C0.0644928393,15.3860402 0.487164161,15 1,15 Z M19,15 C19.5128358,15 19.9355072,15.3860402 19.9932723,15.8833789 L20,16 L20,19.0029869 C20,19.5158227 19.6139598,19.9384941 19.1166211,19.9962592 L19,20.0029869 L16,20.0029869 C15.4477153,20.0029869 15,19.5552717 15,19.0029869 C15,18.4901511 15.3860402,18.0674797 15.8833789,18.0097146 L16,18.0029869 L18,18.0029869 L18,16 C18,15.4871642 18.3860402,15.0644928 18.8833789,15.0067277 L19,15 Z M15,12 L15,14 C15,15.1045695 14.1045695,16 13,16 L7,16 C5.8954305,16 5,15.1045695 5,14 L5,12 L15,12 Z M1,9 L19,9 C19.5522847,9 20,9.44771525 20,10 C20,10.5522847 19.5522847,11 19,11 L1,11 C0.44771525,11 6.76353751e-17,10.5522847 0,10 C-6.76353751e-17,9.44771525 0.44771525,9 1,9 Z" id="Path-54" fill="#3F3F3F"></path>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.3 KiB |
|
@ -1444,6 +1444,7 @@ if ($add_comment === true) {
|
|||
if ($change_status === true) {
|
||||
$event_ids = get_parameter('event_ids');
|
||||
$new_status = get_parameter('new_status');
|
||||
$group_rep = (int) get_parameter('group_rep', 0);
|
||||
$server_id = 0;
|
||||
if (is_metaconsole() === true) {
|
||||
$server_id = (int) get_parameter('server_id');
|
||||
|
@ -1457,10 +1458,19 @@ if ($change_status === true) {
|
|||
$node->connect();
|
||||
}
|
||||
|
||||
$return = events_change_status(
|
||||
explode(',', $event_ids),
|
||||
$new_status
|
||||
);
|
||||
if ($group_rep !== 3) {
|
||||
$return = events_change_status(
|
||||
explode(',', $event_ids),
|
||||
$new_status
|
||||
);
|
||||
} else {
|
||||
// Update all elements with same extraid.
|
||||
$return = events_update_status(
|
||||
$event_ids,
|
||||
(int) $new_status,
|
||||
['group_rep' => $group_rep]
|
||||
);
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
// Unexistent agent.
|
||||
if (is_metaconsole() === true
|
||||
|
|
|
@ -809,7 +809,6 @@ class AgentWizard extends HTML
|
|||
// Fill with SNMP versions allowed.
|
||||
$fieldsVersions = [
|
||||
'1' => '1',
|
||||
'2' => '2',
|
||||
'2c' => '2c',
|
||||
'3' => '3',
|
||||
];
|
||||
|
|
|
@ -53,7 +53,10 @@ class AlertsList
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
public $AJAXMethods = ['loadModal', 'drawTable'];
|
||||
public $AJAXMethods = [
|
||||
'loadModal',
|
||||
'drawTable',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -169,6 +169,7 @@ class ConsoleSupervisor
|
|||
* NOTIF.PHP.DISABLE_FUNCTIONS
|
||||
* NOTIF.PHP.CHROMIUM
|
||||
* NOTIF.PHP.VERSION
|
||||
* NOTIF.PHP.VERSION.SUPPORT
|
||||
*/
|
||||
|
||||
$this->checkPHPSettings();
|
||||
|
@ -210,6 +211,12 @@ class ConsoleSupervisor
|
|||
|
||||
$this->checkUpdateManagerRegistration();
|
||||
|
||||
/*
|
||||
* Check if has API access.
|
||||
* NOTIF.API.ACCESS
|
||||
*/
|
||||
$this->checkApiAccess();
|
||||
|
||||
/*
|
||||
* Check if there're new messages in UM.
|
||||
* NOTIF.UPDATEMANAGER.MESSAGES
|
||||
|
@ -377,6 +384,7 @@ class ConsoleSupervisor
|
|||
* NOTIF.PHP.DISABLE_FUNCTIONS
|
||||
* NOTIF.PHP.CHROMIUM
|
||||
* NOTIF.PHP.VERSION
|
||||
* NOTIF.PHP.VERSION.SUPPORT
|
||||
*/
|
||||
|
||||
$this->checkPHPSettings();
|
||||
|
@ -434,6 +442,12 @@ class ConsoleSupervisor
|
|||
|
||||
$this->checkUpdateManagerRegistration();
|
||||
|
||||
/*
|
||||
* Check if has API access.
|
||||
* NOTIF.API.ACCESS
|
||||
*/
|
||||
$this->checkApiAccess();
|
||||
|
||||
/*
|
||||
* Check if event storm protection is activated.
|
||||
* NOTIF.MISC.EVENTSTORMPROTECTION
|
||||
|
@ -498,6 +512,12 @@ class ConsoleSupervisor
|
|||
|
||||
$this->checkUpdateManagerRegistration();
|
||||
|
||||
/*
|
||||
* Check if has API access.
|
||||
* NOTIF.API.ACCESS
|
||||
*/
|
||||
$this->checkApiAccess();
|
||||
|
||||
/*
|
||||
* Check if there're new messages in UM.
|
||||
* NOTIF.UPDATEMANAGER.MESSAGES
|
||||
|
@ -856,6 +876,7 @@ class ConsoleSupervisor
|
|||
case 'NOTIF.PHP.DISABLE_FUNCTIONS':
|
||||
case 'NOTIF.PHP.CHROMIUM':
|
||||
case 'NOTIF.PHP.VERSION':
|
||||
case 'NOTIF.PHP.VERSION.SUPPORT':
|
||||
case 'NOTIF.HISTORYDB':
|
||||
case 'NOTIF.PANDORADB':
|
||||
case 'NOTIF.PANDORADB.HISTORICAL':
|
||||
|
@ -864,6 +885,7 @@ class ConsoleSupervisor
|
|||
case 'NOTIF.METACONSOLE.DB_CONNECTION':
|
||||
case 'NOTIF.DOWNTIME':
|
||||
case 'NOTIF.UPDATEMANAGER.REGISTRATION':
|
||||
case 'NOTIF.API.ACCESS':
|
||||
case 'NOTIF.MISC.EVENTSTORMPROTECTION':
|
||||
case 'NOTIF.MISC.DEVELOPBYPASS':
|
||||
case 'NOTIF.MISC.FONTPATH':
|
||||
|
@ -1811,14 +1833,14 @@ class ConsoleSupervisor
|
|||
$url = 'https://www.php.net/supported-versions.php';
|
||||
$this->notify(
|
||||
[
|
||||
'type' => 'NOTIF.PHP.VERSION',
|
||||
'type' => 'NOTIF.PHP.VERSION.SUPPORT',
|
||||
'title' => __('PHP UPDATE REQUIRED'),
|
||||
'message' => __('You should update your PHP version because it will be out of official support').'<br>'.__('Current PHP version: ').PHP_VERSION,
|
||||
'url' => $url,
|
||||
]
|
||||
);
|
||||
} else {
|
||||
$this->cleanNotifications('NOTIF.PHP.VERSION');
|
||||
$this->cleanNotifications('NOTIF.PHP.VERSION.SUPPORT');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2366,6 +2388,30 @@ class ConsoleSupervisor
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if has access to the API
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function checkApiAccess()
|
||||
{
|
||||
global $config;
|
||||
include_once $config['homedir'].'/include/functions_update_manager.php';
|
||||
|
||||
if (update_manager_verify_api() === false) {
|
||||
$this->notify(
|
||||
[
|
||||
'type' => 'NOTIF.API.ACCESS',
|
||||
'title' => __('Cannot access the Pandora FMS API '),
|
||||
'message' => __('Please check the configuration, some components may fail due to this misconfiguration.'),
|
||||
]
|
||||
);
|
||||
} else {
|
||||
$this->cleanNotifications('NOTIF.API.ACCESS');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if user 'admin' is enabled and using default password.
|
||||
*
|
||||
|
|
|
@ -1112,7 +1112,6 @@ class CredentialStore extends Wizard
|
|||
'script' => 'showVersion()',
|
||||
'fields' => [
|
||||
'1' => __('1'),
|
||||
'2' => __('2'),
|
||||
'2c' => __('2c'),
|
||||
'3' => __('3'),
|
||||
],
|
||||
|
|
|
@ -542,13 +542,21 @@ class CustomNetScan extends Wizard
|
|||
'extra' => '<span id="interval_manual_container">'.html_print_extended_select_for_time(
|
||||
'interval',
|
||||
$this->task['interval_sweep'],
|
||||
'',
|
||||
'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||
'',
|
||||
'0',
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
false
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
0,
|
||||
null,
|
||||
'check_period_warning_manual(\'interval\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')'
|
||||
).'</span>',
|
||||
];
|
||||
|
||||
|
|
|
@ -122,10 +122,11 @@ class Tree
|
|||
public function setFilter($filter)
|
||||
{
|
||||
// There is not module filter in metaconsole.
|
||||
if (is_metaconsole()) {
|
||||
/*
|
||||
if (is_metaconsole()) {
|
||||
$filter['searchModule'] = '';
|
||||
$filter['statusModule'] = self::TV_DEFAULT_AGENT_STATUS;
|
||||
}
|
||||
}*/
|
||||
|
||||
$this->filter = $filter;
|
||||
}
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC230810';
|
||||
$pandora_version = 'v7.0NG.772';
|
||||
$build_version = 'PC230823';
|
||||
$pandora_version = 'v7.0NG.773.1';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
$script_tz = @date_default_timezone_get();
|
||||
|
|
|
@ -1489,6 +1489,15 @@ function config_update_config()
|
|||
$interval_values_array = explode(',', $interval_values);
|
||||
if (in_array($new_interval, $interval_values_array) === false) {
|
||||
$interval_values_array[] = $new_interval;
|
||||
// Get current periods.
|
||||
$current_period = get_periods(false, false, true);
|
||||
if (!isset($current_period[-1])) {
|
||||
$new_current_period = array_keys($current_period);
|
||||
$new_current_period = implode(',', $new_current_period);
|
||||
// Add new periods to current.
|
||||
array_push($interval_values_array, $new_current_period);
|
||||
}
|
||||
|
||||
$interval_values = implode(',', $interval_values_array);
|
||||
}
|
||||
}
|
||||
|
@ -4079,7 +4088,11 @@ function config_prepare_session()
|
|||
}
|
||||
|
||||
if ($update_cookie === true) {
|
||||
if ((int) $user['session_max_time_expire'] > 0 && time() < $user['session_max_time_expire']) {
|
||||
if (isset($user) === true
|
||||
&& isset($user['session_max_time_expire']) === true
|
||||
&& (int) $user['session_max_time_expire'] > 0
|
||||
&& time() < $user['session_max_time_expire']
|
||||
) {
|
||||
$sessionMaxTimeout = $user['session_max_time_expire'];
|
||||
} else {
|
||||
$sessionMaxTimeout = (time() + $sessionCookieExpireTime);
|
||||
|
|
|
@ -477,7 +477,7 @@ function events_update_status($id_evento, $status, $filter=null)
|
|||
{
|
||||
global $config;
|
||||
|
||||
if (!$status) {
|
||||
if (!$status && $status !== 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1762,11 +1762,9 @@ function events_get_all(
|
|||
}
|
||||
}
|
||||
|
||||
$string_metaconsole_connections = implode(',', $metaconsole_connections);
|
||||
$explode_metaconsole_connections = explode(',', $string_metaconsole_connections);
|
||||
$result_meta = Promise\wait(
|
||||
parallelMap(
|
||||
$explode_metaconsole_connections,
|
||||
$metaconsole_connections,
|
||||
function ($node_int) use ($sql, $history) {
|
||||
try {
|
||||
if (is_metaconsole() === true
|
||||
|
@ -2608,22 +2606,27 @@ function events_print_type_img(
|
|||
case 'going_down_critical':
|
||||
case 'going_up_critical':
|
||||
// This is to be backwards compatible.
|
||||
$style .= ' event_module_background_state icon_background_critical';
|
||||
$icon = 'images/module_critical.png';
|
||||
break;
|
||||
|
||||
case 'going_up_normal':
|
||||
case 'going_down_normal':
|
||||
// This is to be backwards compatible.
|
||||
$style .= ' event_module_background_state icon_background_normal';
|
||||
// $style .= ' event_module_background_state icon_background_normal';
|
||||
$icon = 'images/module_ok.png';
|
||||
break;
|
||||
|
||||
case 'going_up_warning':
|
||||
$icon = 'images/module_warning.png';
|
||||
// $style .= ' event_module_background_state icon_background_warning';
|
||||
case 'going_down_warning':
|
||||
$style .= ' event_module_background_state icon_background_warning';
|
||||
$icon = 'images/module_warning.png';
|
||||
// $style .= ' event_module_background_state icon_background_warning';
|
||||
break;
|
||||
|
||||
case 'going_unknown':
|
||||
$style .= ' event_module_background_state icon_background_unknown';
|
||||
// $style .= ' event_module_background_state icon_background_unknown';
|
||||
$icon = 'images/module_unknown.png';
|
||||
break;
|
||||
|
||||
case 'alert_fired':
|
||||
|
@ -2660,23 +2663,24 @@ function events_print_type_img(
|
|||
if ($only_url) {
|
||||
$output = $urlImage.'/'.$icon;
|
||||
} else {
|
||||
$output .= html_print_div(
|
||||
[
|
||||
'title' => events_print_type_description($type, true),
|
||||
'class' => $style,
|
||||
'style' => ((empty($icon) === false) ? 'background-image: url('.$icon.'); background-repeat: no-repeat;' : ''),
|
||||
],
|
||||
true
|
||||
);
|
||||
/*
|
||||
$output .= html_print_image(
|
||||
$output .= html_print_div(
|
||||
[
|
||||
'title' => events_print_type_description($type, true),
|
||||
'class' => $style,
|
||||
'style' => ((empty($icon) === false) ? 'background-image: url('.$icon.'); background-repeat: no-repeat;' : ''),
|
||||
],
|
||||
true
|
||||
);
|
||||
*/
|
||||
$output .= html_print_image(
|
||||
$icon,
|
||||
true,
|
||||
[
|
||||
'title' => events_print_type_description($type, true),
|
||||
'class' => $style,
|
||||
]
|
||||
);*/
|
||||
);
|
||||
}
|
||||
|
||||
if ($return) {
|
||||
|
@ -2779,16 +2783,14 @@ function events_print_type_img_pdf(
|
|||
break;
|
||||
|
||||
case 'new_agent':
|
||||
$svg = '<svg viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Dark / 20 / agents@svg</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<g id="Dark-/-20-/-agents" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Group" transform="translate(0.000000, 1.000000)">
|
||||
<rect id="Rectangle" fill="#3F3F3F" x="0" y="6" width="10" height="6" rx="1"></rect>
|
||||
<polyline id="Path-43" stroke="#3F3F3F" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" points="3 4 6.9967103 -2.30926389e-14 15 -2.30926389e-14 19 4 19 14 15 18 6.9967103 18 3 14.0223656"></polyline>
|
||||
</g>
|
||||
</g>
|
||||
</svg>';
|
||||
$svg = html_print_image(
|
||||
'/images/agent_mc.png',
|
||||
true,
|
||||
[
|
||||
'class' => 'image_status invert_filter',
|
||||
'title' => 'agents',
|
||||
]
|
||||
);
|
||||
break;
|
||||
|
||||
case 'configuration_change':
|
||||
|
@ -2803,6 +2805,18 @@ function events_print_type_img_pdf(
|
|||
break;
|
||||
|
||||
case 'unknown':
|
||||
break;
|
||||
|
||||
case 'alert_fired':
|
||||
$svg = '<svg viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Dark / 20 / alert@svg</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<g id="Dark-/-20-/-alert" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<path d="M10,20 C11.4190985,20 12.5702076,18.8808594 12.5702076,17.5 L7.42979244,17.5 C7.42979244,18.8808594 8.5809015,20 10,20 Z M18.6540098,14.1519531 C17.8777645,13.3410156 16.425318,12.1210937 16.425318,8.125 C16.425318,5.08984375 14.2364028,2.66015625 11.2849029,2.0640625 L11.2849029,1.25 C11.2849029,0.559765625 10.7095493,0 10,0 C9.29045075,0 8.71509711,0.559765625 8.71509711,1.25 L8.71509711,2.0640625 C5.76359722,2.66015625 3.57468198,5.08984375 3.57468198,8.125 C3.57468198,12.1210938 2.12223547,13.3410156 1.3459902,14.1519531 C1.10492023,14.4039062 0.998045886,14.7050781 1.00002702,15 C1.00447442,15.640625 1.52156948,16.25 2.28977909,16.25 L17.7102209,16.25 C18.4784305,16.25 18.9959274,15.640625 18.999973,15 C19.0019541,14.7050781 18.8950798,14.4035156 18.6540098,14.1519531 L18.6540098,14.1519531 Z" id="Shape" fill="#e63c52"></path>
|
||||
</g>
|
||||
</svg>';
|
||||
break;
|
||||
|
||||
default:
|
||||
$svg = '<svg viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Dark / 20 / event@svg</title>
|
||||
|
@ -3524,11 +3538,15 @@ function events_page_responses($event)
|
|||
);
|
||||
|
||||
if ($status_blocked === false) {
|
||||
if (isset($event['server_id']) === false) {
|
||||
$event['server_id'] = '0';
|
||||
}
|
||||
|
||||
$data[2] = html_print_button(
|
||||
__('Update'),
|
||||
'status_button',
|
||||
false,
|
||||
'event_change_status("'.$event['similar_ids'].'",'.$event['server_id'].');',
|
||||
'event_change_status("'.$event['similar_ids'].'",'.$event['server_id'].', '.$event['group_rep'].');',
|
||||
[
|
||||
'icon' => 'next',
|
||||
'mode' => 'link',
|
||||
|
|
|
@ -1744,8 +1744,8 @@ function html_print_select_multiple_modules_filtered(array $data):string
|
|||
[
|
||||
'label' => __('Agents'),
|
||||
'label_class' => 'font-title-font',
|
||||
'type' => 'select',
|
||||
'fields' => $agents,
|
||||
'type' => 'select_from_sql',
|
||||
'sql' => 'SELECT `id_agente`,`nombre` FROM tagente',
|
||||
'name' => 'filtered-module-agents-'.$uniqId,
|
||||
'selected' => explode(',', $data['mAgents']),
|
||||
'return' => true,
|
||||
|
@ -1925,8 +1925,7 @@ function html_print_extended_select_for_unit(
|
|||
$select_style=false,
|
||||
$unique_name=true,
|
||||
$disabled=false,
|
||||
$no_change=0,
|
||||
$class='w100p'
|
||||
$no_change=0
|
||||
) {
|
||||
global $config;
|
||||
|
||||
|
@ -1958,7 +1957,7 @@ function html_print_extended_select_for_unit(
|
|||
|
||||
ob_start();
|
||||
|
||||
echo '<div id="'.$uniq_name.'_default" class="'.$class.' inline_line">';
|
||||
echo '<div id="'.$uniq_name.'_default" class="w100p inline_line">';
|
||||
html_print_select(
|
||||
$fields,
|
||||
$uniq_name.'_select',
|
||||
|
@ -2167,7 +2166,8 @@ function html_print_extended_select_for_time(
|
|||
$style_icon='',
|
||||
$no_change=false,
|
||||
$allow_zero=0,
|
||||
$units=null
|
||||
$units=null,
|
||||
$script_input=''
|
||||
) {
|
||||
global $config;
|
||||
$admin = is_user_admin($config['id_user']);
|
||||
|
@ -2227,7 +2227,7 @@ function html_print_extended_select_for_time(
|
|||
$nothing_value,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
$class,
|
||||
$readonly,
|
||||
'font-size: xx-small;'.$select_style
|
||||
|
@ -2257,7 +2257,7 @@ function html_print_extended_select_for_time(
|
|||
echo '</div>';
|
||||
|
||||
echo '<div id="'.$uniq_name.'_manual" class="w100p inline_flex">';
|
||||
html_print_input_text($uniq_name.'_text', $selected, '', $size, 255, false, $readonly, false, '', $class);
|
||||
html_print_input_text($uniq_name.'_text', $selected, '', $size, 255, false, $readonly, false, '', $class, $script_input);
|
||||
|
||||
html_print_input_hidden($name, $selected, false, $uniq_name);
|
||||
html_print_select(
|
||||
|
@ -2905,6 +2905,8 @@ function html_print_anchor(
|
|||
|
||||
$output .= '>';
|
||||
|
||||
$output .= (isset($options['text']) === true) ? $options['text'] : '';
|
||||
|
||||
$output .= (isset($options['content']) === true) ? io_safe_input_html($options['content']) : '';
|
||||
|
||||
$output .= '</a>';
|
||||
|
@ -3964,14 +3966,6 @@ function html_print_table(&$table, $return=false)
|
|||
}
|
||||
}
|
||||
|
||||
if (isset($table->tdid)) {
|
||||
foreach ($table->tdid as $keyrow => $tid) {
|
||||
foreach ($tid as $key => $id) {
|
||||
$tdid[$keyrow][$key] = $id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($table->cellstyle)) {
|
||||
foreach ($table->cellstyle as $keyrow => $cstyle) {
|
||||
foreach ($cstyle as $key => $cst) {
|
||||
|
@ -4155,10 +4149,6 @@ function html_print_table(&$table, $return=false)
|
|||
$colspan[$keyrow][$key] = '';
|
||||
}
|
||||
|
||||
if (!isset($tdid[$keyrow][$key])) {
|
||||
$tdid[$keyrow][$key] = '';
|
||||
}
|
||||
|
||||
if (!isset($rowspan[$keyrow][$key])) {
|
||||
$rowspan[$keyrow][$key] = '';
|
||||
}
|
||||
|
@ -4179,16 +4169,10 @@ function html_print_table(&$table, $return=false)
|
|||
$style[$key] = '';
|
||||
}
|
||||
|
||||
if ($tdid[$keyrow][$key] !== '') {
|
||||
$tid = $tdid[$keyrow][$key];
|
||||
} else {
|
||||
$tid = $tableid.'-'.$keyrow.'-'.$key;
|
||||
}
|
||||
|
||||
if ($class === 'datos5' && $key === 1) {
|
||||
$output .= '<td id="'.$tid.'" style="'.$cellstyle[$keyrow][$key].$style[$key].$valign[$key].$align[$key].$size[$key].$wrap[$key].$colspan[$keyrow][$key].' '.$rowspan[$keyrow][$key].' class="'.$class.' '.$cellclass[$keyrow][$key].'">'.$item.'</td>'."\n";
|
||||
$output .= '<td id="'.$tableid.'-'.$keyrow.'-'.$key.'" style="'.$cellstyle[$keyrow][$key].$style[$key].$valign[$key].$align[$key].$size[$key].$wrap[$key].$colspan[$keyrow][$key].' '.$rowspan[$keyrow][$key].' class="'.$class.' '.$cellclass[$keyrow][$key].'">'.$item.'</td>'."\n";
|
||||
} else {
|
||||
$output .= '<td id="'.$tid.'" style="'.$cellstyle[$keyrow][$key].$style[$key].$valign[$key].$align[$key].$size[$key].$wrap[$key].'" '.$colspan[$keyrow][$key].' '.$rowspan[$keyrow][$key].' class="'.$class.' '.$cellclass[$keyrow][$key].'">'.$item.'</td>'."\n";
|
||||
$output .= '<td id="'.$tableid.'-'.$keyrow.'-'.$key.'" style="'.$cellstyle[$keyrow][$key].$style[$key].$valign[$key].$align[$key].$size[$key].$wrap[$key].'" '.$colspan[$keyrow][$key].' '.$rowspan[$keyrow][$key].' class="'.$class.' '.$cellclass[$keyrow][$key].'">'.$item.'</td>'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5790,7 +5774,11 @@ function html_print_input($data, $wrapper='div', $input_only=false)
|
|||
((isset($data['class']) === true) ? $data['class'] : ''),
|
||||
((isset($data['readonly']) === true) ? $data['readonly'] : false),
|
||||
((isset($data['custom_fields']) === true) ? $data['custom_fields'] : false),
|
||||
((isset($data['style_icon']) === true) ? $data['style_icon'] : '')
|
||||
((isset($data['style_icon']) === true) ? $data['style_icon'] : ''),
|
||||
((isset($data['no_change']) === true) ? $data['no_change'] : ''),
|
||||
((isset($data['allow_zero']) === true) ? $data['allow_zero'] : ''),
|
||||
((isset($data['units']) === true) ? $data['units'] : null),
|
||||
((isset($data['script_input']) === true) ? $data['script_input'] : '')
|
||||
);
|
||||
break;
|
||||
|
||||
|
@ -6241,6 +6229,57 @@ function html_print_input($data, $wrapper='div', $input_only=false)
|
|||
<?php
|
||||
break;
|
||||
|
||||
case 'datetime':
|
||||
$date = (empty($data['value']) === true) ? '' : date('Y-m-d', $data['value']);
|
||||
$time = (empty($data['value']) === true) ? '' : date('H:i:s', $data['value']);
|
||||
ui_require_css_file('datepicker');
|
||||
ui_include_time_picker();
|
||||
ui_require_jquery_file(
|
||||
'ui.datepicker-'.get_user_language(),
|
||||
'include/javascript/i18n/'
|
||||
);
|
||||
|
||||
$inputDate = html_print_input_text(
|
||||
$data['name'].'_date',
|
||||
$date,
|
||||
'',
|
||||
false,
|
||||
10,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'off'
|
||||
);
|
||||
|
||||
$inputTime = html_print_input_text(
|
||||
$data['name'].'_time',
|
||||
$time,
|
||||
'',
|
||||
false,
|
||||
10,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'off'
|
||||
);
|
||||
$output .= html_print_div(
|
||||
[
|
||||
'content' => sprintf(
|
||||
'<div class="datetime-adv-opt">%s<span>:</span>%s</div>',
|
||||
$inputDate,
|
||||
$inputTime
|
||||
),
|
||||
],
|
||||
true
|
||||
);
|
||||
break;
|
||||
|
||||
default:
|
||||
// Ignore.
|
||||
break;
|
||||
|
@ -7086,6 +7125,7 @@ function html_print_menu_button(array $options, bool $return=false)
|
|||
'class' => ($options['class'] ?? ''),
|
||||
'style' => ($options['style'] ?? ''),
|
||||
'onClick' => ($options['onClick'] ?? ''),
|
||||
'text' => ($options['text'] ?? ''),
|
||||
'content' => $content,
|
||||
],
|
||||
$return
|
||||
|
|
|
@ -793,7 +793,7 @@ function modules_create_agent_module(
|
|||
// Encrypt passwords.
|
||||
if (isset($values['plugin_pass']) === true) {
|
||||
// Avoid two times encryption.
|
||||
$plugin_pass = io_safe_output($values['plugin_pass']);
|
||||
$plugin_pass = io_output_password($values['plugin_pass']);
|
||||
|
||||
$values['plugin_pass'] = io_input_password($plugin_pass);
|
||||
}
|
||||
|
@ -4687,3 +4687,75 @@ function get_agent_module_childs(
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function for export a csv file from Agents/Module view
|
||||
*
|
||||
* @param array $filters Data from agents/module filter.
|
||||
*
|
||||
* @return array Returns the data that will be saved in the csv file
|
||||
*/
|
||||
function export_agents_module_csv($filters)
|
||||
{
|
||||
$query_filter = '';
|
||||
foreach ($filters as $key => $filter) {
|
||||
switch ($key) {
|
||||
case 'group_id':
|
||||
if ($filter != 0) {
|
||||
$query_filter .= ' AND ta.id_grupo = '.$filter.' ';
|
||||
}
|
||||
break;
|
||||
|
||||
case 'module_group_id':
|
||||
if ($filter != 0) {
|
||||
$query_filter .= ' AND tam.id_module_group = '.$filter.' ';
|
||||
;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'agent_id':
|
||||
if (count($filter) > 0) {
|
||||
$agent_filter = '('.implode(', ', $filter).')';
|
||||
$query_filter .= ' AND ta.id_agente IN '.$agent_filter.' ';
|
||||
}
|
||||
break;
|
||||
|
||||
case 'module_id':
|
||||
if (count($filter) > 0) {
|
||||
if (is_numeric($filter[0]) === false) {
|
||||
foreach ($filter as $key => $module) {
|
||||
$filter[$key] = io_safe_input($module);
|
||||
}
|
||||
|
||||
$module_filter = '(\''.implode("', '", $filter).'\')';
|
||||
$query_filter .= ' AND tam.nombre IN '.$module_filter.' ';
|
||||
} else {
|
||||
$module_filter = '('.implode(', ', $filter).')';
|
||||
$query_filter .= ' AND tam.id_tipo_modulo IN '.$module_filter.' ';
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
// Nothing to do
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Query fields result.
|
||||
$query = sprintf(
|
||||
'SELECT ta.alias as agent, tam.nombre as module, tae.datos as data
|
||||
FROM tagente_modulo as tam
|
||||
INNER JOIN tagente as ta ON tam.id_agente = ta.id_agente
|
||||
INNER JOIN tagente_estado as tae ON tam.id_agente_modulo = tae.id_agente_modulo
|
||||
WHERE ta.disabled = 0
|
||||
%s
|
||||
',
|
||||
$query_filter
|
||||
);
|
||||
|
||||
$result = db_get_all_rows_sql($query);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
|
|
@ -136,6 +136,7 @@ function notifications_get_subtypes(?string $source=null)
|
|||
'NOTIF.PHP.DISABLE_FUNCTIONS',
|
||||
'NOTIF.PHP.CHROMIUM',
|
||||
'NOTIF.PHP.VERSION',
|
||||
'NOTIF.PHP.VERSION.SUPPORT',
|
||||
'NOTIF.HISTORYDB',
|
||||
'NOTIF.PANDORADB',
|
||||
'NOTIF.PANDORADB.HISTORICAL',
|
||||
|
@ -145,6 +146,7 @@ function notifications_get_subtypes(?string $source=null)
|
|||
'NOTIF.METACONSOLE.DB_CONNECTION',
|
||||
'NOTIF.DOWNTIME',
|
||||
'NOTIF.UPDATEMANAGER.REGISTRATION',
|
||||
'NOTIF.API.ACCESS',
|
||||
'NOTIF.MISC.EVENTSTORMPROTECTION',
|
||||
'NOTIF.MISC.DEVELOPBYPASS',
|
||||
'NOTIF.MISC.FONTPATH',
|
||||
|
@ -1009,6 +1011,106 @@ function notifications_print_user_switch($source, $user, $label)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Generates an HTML of notification filter types.
|
||||
*
|
||||
* @return string HTML filter notification.
|
||||
*/
|
||||
function notification_filter()
|
||||
{
|
||||
$types_list[] = 'All';
|
||||
$notification_types = db_get_all_rows_sql('SELECT DISTINCT tm.subtype FROM tmensajes as tm INNER JOIN tnotification_user as tnu ON tm.id_mensaje = tnu.id_mensaje WHERE tnu.utimestamp_read IS NULL');
|
||||
if ($notification_types !== false) {
|
||||
foreach ($notification_types as $notification_type) {
|
||||
$type = explode('.', $notification_type['subtype'])[1];
|
||||
$types_list[] = $type;
|
||||
}
|
||||
}
|
||||
|
||||
$types_list = array_unique($types_list);
|
||||
$notification_filter = "<ul id='menu-filter_notification'>";
|
||||
|
||||
$notification_filter .= "<li>
|
||||
<input type='checkbox' name='filter_menu' id='filter_menu'>
|
||||
<label for='filter_menu' id='filter_menu_label'>".__('Filter').'</label>';
|
||||
|
||||
$notification_filter .= "<ul class='sublevel-filter_notification'>";
|
||||
foreach ($types_list as $type) {
|
||||
if ($type === 'All') {
|
||||
$checked = 'checked';
|
||||
} else {
|
||||
$checked = '';
|
||||
}
|
||||
|
||||
switch ($type) {
|
||||
case 'HISTORYDB':
|
||||
$type_name = 'HISTORY DB';
|
||||
break;
|
||||
|
||||
case 'PANDORADB':
|
||||
$type_name = 'PANDORA DB';
|
||||
break;
|
||||
|
||||
case 'UPDATEMANAGER':
|
||||
$type_name = 'UPDATE MANAGER';
|
||||
break;
|
||||
|
||||
case 'ALLOWOVERRIDE':
|
||||
$type_name = 'ALLOW OVERRIDE';
|
||||
break;
|
||||
|
||||
case 'DISCOVERYTASK':
|
||||
$type_name = 'DISCOVERY TASK';
|
||||
break;
|
||||
|
||||
default:
|
||||
$type_name = $type;
|
||||
break;
|
||||
}
|
||||
|
||||
$notification_filter .= "<li><div class='item-filter'>
|
||||
<input type='checkbox'
|
||||
class='checkbox_filter_notifications'
|
||||
value=".$type."
|
||||
name='filter_".$type."'
|
||||
".$checked."
|
||||
id='filter_".$type."'>
|
||||
<label for='filter_".$type."'>".$type_name.'</label>
|
||||
</div>
|
||||
</li>';
|
||||
}
|
||||
|
||||
$notification_filter .= "<li><div class='item-filter'>";
|
||||
$notification_filter .= html_print_div(
|
||||
[
|
||||
'class' => 'action-buttons w100p',
|
||||
'content' => html_print_submit_button(
|
||||
__('Filter'),
|
||||
'btn_submit',
|
||||
false,
|
||||
[
|
||||
'class' => 'mini sub filter',
|
||||
'icon' => 'search mini',
|
||||
'onClick' => 'filter_notification()',
|
||||
],
|
||||
true
|
||||
),
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
$notification_filter .= '</div>
|
||||
</li>';
|
||||
|
||||
$notification_filter .= '</ul>';
|
||||
|
||||
$notification_filter .= '</li>';
|
||||
|
||||
$notification_filter .= '</ul>';
|
||||
return $notification_filter;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Generates the dropdown notifications menu.
|
||||
*
|
||||
|
@ -1021,9 +1123,24 @@ function notifications_print_dropdown()
|
|||
$mess = [];
|
||||
}
|
||||
|
||||
$notification_menu = html_print_menu_button(
|
||||
[
|
||||
'href' => 'javascript:',
|
||||
'class' => 'notification_menu_actions',
|
||||
'text' => __('Mark all as read'),
|
||||
'onClick' => 'mark_all_notification_as_read()',
|
||||
],
|
||||
true
|
||||
);
|
||||
$notification_filter = notification_filter();
|
||||
|
||||
return sprintf(
|
||||
"<div id='notification-wrapper'>
|
||||
<div id='notification-wrapper-inner'>
|
||||
<div class='notificaion_menu_container'>
|
||||
<div class='menu_tab filter_notification'>%s</div>
|
||||
<div class='menu_tab notification_menu'>%s</div>
|
||||
</div>
|
||||
%s
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1033,6 +1150,8 @@ function notifications_print_dropdown()
|
|||
>
|
||||
</div>
|
||||
",
|
||||
$notification_filter,
|
||||
$notification_menu,
|
||||
array_reduce(
|
||||
$mess,
|
||||
function ($carry, $message) {
|
||||
|
@ -1092,6 +1211,8 @@ function notifications_print_dropdown_element($message_info)
|
|||
$message_info['subject'] = io_safe_input($img);
|
||||
}
|
||||
|
||||
$type = explode('.', $message_info['subtype'])[1];
|
||||
|
||||
if (strlen($body_preview) >= 170) {
|
||||
$body_preview = substr($body_preview, 0, 150);
|
||||
$body_preview .= __('. Read More...');
|
||||
|
@ -1102,6 +1223,7 @@ function notifications_print_dropdown_element($message_info)
|
|||
class='notification-item'
|
||||
onclick='%s'
|
||||
id='notification-item-id-%s'
|
||||
value='%s'
|
||||
href='%s'
|
||||
target='%s'
|
||||
>
|
||||
|
@ -1115,8 +1237,9 @@ function notifications_print_dropdown_element($message_info)
|
|||
</p>
|
||||
</div>
|
||||
</a>",
|
||||
$action.';click_on_notification_toast(event)',
|
||||
$action.'; click_on_notification_toast(event)',
|
||||
$message_info['id_mensaje'],
|
||||
$type,
|
||||
messages_get_url($message_info['id_mensaje']),
|
||||
$target,
|
||||
html_print_image('images/info.svg', true, ['style' => 'height: 40px;margin-left: -20px;margin-top: -40px;']),
|
||||
|
|
|
@ -676,9 +676,7 @@ function planned_downtimes_stop($downtime)
|
|||
foreach ($agents as $agent) {
|
||||
$result = db_process_sql_update(
|
||||
'tagente',
|
||||
[
|
||||
'update_module_count' => 1,
|
||||
],
|
||||
['update_module_count' => 1],
|
||||
['id_agente' => $agent['id_agent']]
|
||||
);
|
||||
|
||||
|
|
|
@ -782,7 +782,6 @@ function snmp_browser_print_container(
|
|||
html_print_select(
|
||||
[
|
||||
'1' => 'v. 1',
|
||||
'2' => 'v. 2',
|
||||
'2c' => 'v. 2c',
|
||||
'3' => 'v. 3',
|
||||
],
|
||||
|
|
|
@ -4066,7 +4066,7 @@ function ui_print_datatable(array $parameters)
|
|||
'',
|
||||
'',
|
||||
$parameters['toggle_collapsed'],
|
||||
false,
|
||||
(isset($parameters['form']['return_filter']) === false) ? false : $parameters['form']['return_filter'],
|
||||
'',
|
||||
'no-border filter-datatable-submain',
|
||||
'filter-datatable-main '.$parameters['filter_main_class']
|
||||
|
@ -4193,6 +4193,7 @@ function ui_print_datatable(array $parameters)
|
|||
|
||||
$spinner = '<div id="'.$table_id.'-spinner" class="spinner-fixed"><span></span><span></span><span></span><span></span></div>';
|
||||
|
||||
// TODO This widget should take a return: ui_print_info_message($info_msg_arr, '', true)
|
||||
$info_msg = '<div>'.ui_print_info_message($info_msg_arr).'</div>';
|
||||
|
||||
$err_msg = '<div id="error-'.$table_id.'"></div>';
|
||||
|
|
|
@ -55,6 +55,18 @@ function update_manager_verify_registration()
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Verifies api state.
|
||||
*
|
||||
* @return boolean Status.
|
||||
*/
|
||||
function update_manager_verify_api()
|
||||
{
|
||||
global $config;
|
||||
return (isset($config['has_api_access']) === true && $config['has_api_access'] == '1');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves current update from DB.
|
||||
*
|
||||
|
|
|
@ -2554,6 +2554,7 @@ function visual_map_process_wizard_add(
|
|||
$image,
|
||||
$id_layout,
|
||||
$range,
|
||||
$range_vertical,
|
||||
$width=0,
|
||||
$height=0,
|
||||
$period='',
|
||||
|
@ -2562,7 +2563,10 @@ function visual_map_process_wizard_add(
|
|||
$max_value=0,
|
||||
$type_percentile='',
|
||||
$value_show='',
|
||||
$type=''
|
||||
$type='',
|
||||
$pos_x=10,
|
||||
$pos_y=10,
|
||||
$max_elements_row=0
|
||||
) {
|
||||
if (empty($id_agents)) {
|
||||
print_error_message(__('No agents selected'));
|
||||
|
@ -2572,14 +2576,9 @@ function visual_map_process_wizard_add(
|
|||
$id_agents = (array) $id_agents;
|
||||
|
||||
$error = false;
|
||||
$pos_y = 10;
|
||||
$pos_x = 10;
|
||||
$elements_row = 1;
|
||||
$initial_x = $pos_x;
|
||||
foreach ($id_agents as $id_agent) {
|
||||
if ($pos_x > 600) {
|
||||
$pos_x = 10;
|
||||
$pos_y = ($pos_y + $range);
|
||||
}
|
||||
|
||||
$value_height = $height;
|
||||
$value_image = $image;
|
||||
$value_type = $type;
|
||||
|
@ -2628,7 +2627,14 @@ function visual_map_process_wizard_add(
|
|||
|
||||
db_process_sql_insert('tlayout_data', $values);
|
||||
|
||||
$pos_x = ($pos_x + $range);
|
||||
if (($max_elements_row === $elements_row) && $max_elements_row !== 0) {
|
||||
$elements_row = 1;
|
||||
$pos_x = $initial_x;
|
||||
$pos_y = ($range_vertical + $pos_y);
|
||||
} else {
|
||||
$pos_x = ($pos_x + $range);
|
||||
$elements_row++;
|
||||
}
|
||||
}
|
||||
|
||||
$return = ui_print_success_message(__('Agent successfully added to layout'), '', true);
|
||||
|
@ -2654,6 +2660,7 @@ function visual_map_process_wizard_add_modules(
|
|||
$image,
|
||||
$id_layout,
|
||||
$range,
|
||||
$range_vertical,
|
||||
$width,
|
||||
$height,
|
||||
$period,
|
||||
|
@ -2669,7 +2676,10 @@ function visual_map_process_wizard_add_modules(
|
|||
$kind_relationship=VISUAL_MAP_WIZARD_PARENTS_NONE,
|
||||
$item_in_the_map=0,
|
||||
$fontf='lato',
|
||||
$fonts='12pt'
|
||||
$fonts='12pt',
|
||||
$pos_x=10,
|
||||
$pos_y=10,
|
||||
$max_elements_row=0
|
||||
) {
|
||||
if (empty($width) === true) {
|
||||
$width = 0;
|
||||
|
@ -2691,15 +2701,9 @@ function visual_map_process_wizard_add_modules(
|
|||
$id_modules = (array) $id_modules;
|
||||
|
||||
$error = false;
|
||||
$pos_y = 10;
|
||||
$pos_x = 10;
|
||||
|
||||
$elements_row = 1;
|
||||
$initial_x = $pos_x;
|
||||
foreach ($id_modules as $id_module) {
|
||||
if ($pos_x > 600) {
|
||||
$pos_x = 10;
|
||||
$pos_y = ($pos_y + $range);
|
||||
}
|
||||
|
||||
if ($id_server != 0) {
|
||||
$connection = db_get_row_filter(
|
||||
'tmetaconsole_setup',
|
||||
|
@ -2820,7 +2824,14 @@ function visual_map_process_wizard_add_modules(
|
|||
|
||||
db_process_sql_insert('tlayout_data', $values);
|
||||
|
||||
$pos_x = ($pos_x + $range);
|
||||
if (($max_elements_row === $elements_row) && $max_elements_row !== 0) {
|
||||
$elements_row = 1;
|
||||
$pos_x = $initial_x;
|
||||
$pos_y = ($range_vertical + $pos_y);
|
||||
} else {
|
||||
$pos_x = ($pos_x + $range);
|
||||
$elements_row++;
|
||||
}
|
||||
}
|
||||
|
||||
$return = ui_print_success_message(__('Modules successfully added to layout'), '', true);
|
||||
|
@ -2885,6 +2896,7 @@ function visual_map_process_wizard_add_agents(
|
|||
$image,
|
||||
$id_layout,
|
||||
$range,
|
||||
$range_vertical,
|
||||
$width,
|
||||
$height,
|
||||
$period,
|
||||
|
@ -2900,7 +2912,10 @@ function visual_map_process_wizard_add_agents(
|
|||
$kind_relationship=VISUAL_MAP_WIZARD_PARENTS_NONE,
|
||||
$item_in_the_map=0,
|
||||
$fontf='lato',
|
||||
$fonts='12pt'
|
||||
$fonts='12pt',
|
||||
$pos_x=10,
|
||||
$pos_y=10,
|
||||
$max_elements_row=0
|
||||
) {
|
||||
global $config;
|
||||
|
||||
|
@ -2925,9 +2940,8 @@ function visual_map_process_wizard_add_agents(
|
|||
$id_agents = (array) $id_agents;
|
||||
|
||||
$error = false;
|
||||
$pos_y = 10;
|
||||
$pos_x = 10;
|
||||
|
||||
$elements_row = 1;
|
||||
$initial_x = $pos_x;
|
||||
$relationship = true;
|
||||
$relationships_agents = [];
|
||||
// Check if the set a none relationship
|
||||
|
@ -2945,11 +2959,6 @@ function visual_map_process_wizard_add_agents(
|
|||
$id_agent = $id_a;
|
||||
}
|
||||
|
||||
if ($pos_x > 600) {
|
||||
$pos_x = 10;
|
||||
$pos_y = ($pos_y + $range);
|
||||
}
|
||||
|
||||
$value_height = $height;
|
||||
$value_image = $image;
|
||||
$value_type = $type;
|
||||
|
@ -3061,6 +3070,15 @@ function visual_map_process_wizard_add_agents(
|
|||
|
||||
$id_item = db_process_sql_insert('tlayout_data', $values);
|
||||
|
||||
if (($max_elements_row === $elements_row) && $max_elements_row !== 0) {
|
||||
$elements_row = 1;
|
||||
$pos_x = $initial_x;
|
||||
$pos_y = ($range_vertical + $pos_y);
|
||||
} else {
|
||||
$pos_x = ($pos_x + $range);
|
||||
$elements_row++;
|
||||
}
|
||||
|
||||
if ($relationship) {
|
||||
switch ($kind_relationship) {
|
||||
case VISUAL_MAP_WIZARD_PARENTS_AGENT_RELANTIONSHIP:
|
||||
|
@ -3093,8 +3111,6 @@ function visual_map_process_wizard_add_agents(
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$pos_x = ($pos_x + $range);
|
||||
}
|
||||
|
||||
foreach ($relationships_agents as $relationship_item) {
|
||||
|
|
|
@ -486,6 +486,40 @@ function ring_graph(
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Radar graph RADAR.
|
||||
*
|
||||
* @param array $chart_data Data.
|
||||
* @param array $options Options.
|
||||
*
|
||||
* @return string Output html charts
|
||||
*/
|
||||
function radar_graph(
|
||||
$chart_data,
|
||||
$options
|
||||
) {
|
||||
$chart = get_build_setup_charts('RADAR', $options, $chart_data);
|
||||
return $chart->render(true, true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Line graph LINE.
|
||||
*
|
||||
* @param array $chart_data Data.
|
||||
* @param array $options Options.
|
||||
*
|
||||
* @return string Output html charts
|
||||
*/
|
||||
function line_graph(
|
||||
$chart_data,
|
||||
$options
|
||||
) {
|
||||
$chart = get_build_setup_charts('LINE', $options, $chart_data);
|
||||
return $chart->render(true, true);
|
||||
}
|
||||
|
||||
|
||||
function get_build_setup_charts($type, $options, $data)
|
||||
{
|
||||
global $config;
|
||||
|
@ -505,6 +539,14 @@ function get_build_setup_charts($type, $options, $data)
|
|||
$chart = $factory->create($factory::BAR);
|
||||
break;
|
||||
|
||||
case 'RADAR':
|
||||
$chart = $factory->create($factory::RADAR);
|
||||
break;
|
||||
|
||||
case 'LINE':
|
||||
$chart = $factory->create($factory::LINE);
|
||||
break;
|
||||
|
||||
default:
|
||||
// code...
|
||||
break;
|
||||
|
@ -649,6 +691,17 @@ function get_build_setup_charts($type, $options, $data)
|
|||
}
|
||||
|
||||
$chart->options()->setMaintainAspectRatio($maintainAspectRatio);
|
||||
if (isset($options['elements']) === true) {
|
||||
if (isset($options['elements']['center']) === true) {
|
||||
if (isset($options['elements']['center']['text']) === true) {
|
||||
$chart->options()->getElements()->center()->setText($options['elements']['center']['text']);
|
||||
}
|
||||
|
||||
if (isset($options['elements']['center']['color']) === true) {
|
||||
$chart->options()->getElements()->center()->setColor($options['elements']['center']['color']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Set Responsive for responsive charts.
|
||||
$responsive = true;
|
||||
|
@ -942,19 +995,31 @@ function get_build_setup_charts($type, $options, $data)
|
|||
) {
|
||||
$scales = $chart->options()->getScales();
|
||||
|
||||
// Defaults scalesFont X.
|
||||
$scalesXFonts = $scales->getX()->ticks()->getFonts();
|
||||
$scalesXFonts->setFamily((empty($config['fontpath']) === true) ? 'lato' : $config['fontpath']);
|
||||
$scalesXFonts->setStyle('normal');
|
||||
$scalesXFonts->setWeight(600);
|
||||
$scalesXFonts->setSize(((int) $config['font_size'] + 2));
|
||||
if ($options['scales']['x'] !== false) {
|
||||
// Defaults scalesFont X.
|
||||
$scalesXFonts = $scales->getX()->ticks()->getFonts();
|
||||
$scalesXFonts->setFamily((empty($config['fontpath']) === true) ? 'lato' : $config['fontpath']);
|
||||
$scalesXFonts->setStyle('normal');
|
||||
$scalesXFonts->setWeight(600);
|
||||
$scalesXFonts->setSize(((int) $config['font_size'] + 2));
|
||||
}
|
||||
|
||||
// Defaults scalesFont Y.
|
||||
$scalesYFonts = $scales->getY()->ticks()->getFonts();
|
||||
$scalesYFonts->setFamily((empty($config['fontpath']) === true) ? 'lato' : $config['fontpath']);
|
||||
$scalesYFonts->setStyle('normal');
|
||||
$scalesYFonts->setWeight(600);
|
||||
$scalesYFonts->setSize(((int) $config['font_size'] + 2));
|
||||
if ($options['scales']['y'] !== false) {
|
||||
// Defaults scalesFont Y.
|
||||
$scalesYFonts = $scales->getY()->ticks()->getFonts();
|
||||
$scalesYFonts->setFamily((empty($config['fontpath']) === true) ? 'lato' : $config['fontpath']);
|
||||
$scalesYFonts->setStyle('normal');
|
||||
$scalesYFonts->setWeight(600);
|
||||
$scalesYFonts->setSize(((int) $config['font_size'] + 2));
|
||||
}
|
||||
|
||||
if ($options['scales']['r'] !== false) {
|
||||
// Defaults scalesFont R.
|
||||
$scalesRFonts = $scales->getR()->pointLabels()->getFonts();
|
||||
$scalesRFonts->setStyle('normal');
|
||||
$scalesRFonts->setWeight(600);
|
||||
$scalesRFonts->setSize(((int) $config['font_size'] + 2));
|
||||
}
|
||||
|
||||
if (isset($options['scales']['x']) === true
|
||||
&& empty($options['scales']['x']) === false
|
||||
|
@ -1045,6 +1110,50 @@ function get_build_setup_charts($type, $options, $data)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($options['scales']['r']) === true
|
||||
&& empty($options['scales']['r']) === false
|
||||
&& is_array($options['scales']['r']) === true
|
||||
) {
|
||||
if (isset($options['scales']['r']['pointLabels']) === true
|
||||
&& empty($options['scales']['r']['pointLabels']) === false
|
||||
&& is_array($options['scales']['r']['pointLabels']) === true
|
||||
) {
|
||||
if (isset($options['scales']['r']['pointLabels']['color']) === true) {
|
||||
$scales->getR()->pointLabels()->setColor($options['scales']['r']['pointLabels']['color']);
|
||||
}
|
||||
|
||||
if (isset($options['scales']['r']['grid']['display']) === true) {
|
||||
$scales->getR()->grid()->setDrawOnChartArea($options['scales']['r']['grid']['display']);
|
||||
}
|
||||
|
||||
if (isset($options['scales']['r']['grid']['color']) === true) {
|
||||
$scales->getR()->grid()->setColor($options['scales']['r']['grid']['color']);
|
||||
}
|
||||
|
||||
if (isset($options['scales']['r']['angleLines']['color']) === true) {
|
||||
$scales->getR()->angleLines()->setColor($options['scales']['r']['angleLines']['color']);
|
||||
}
|
||||
|
||||
if (isset($options['scales']['r']['pointLabels']['fonts']) === true
|
||||
&& empty($options['scales']['r']['pointLabels']['fonts']) === false
|
||||
&& is_array($options['scales']['r']['pointLabels']['fonts']) === true
|
||||
) {
|
||||
$scaleRpointLabelsFonts = $scales->getR()->pointLabels()->getFonts();
|
||||
if (isset($options['scales']['r']['pointLabels']['fonts']['size']) === true) {
|
||||
$scaleRpointLabelsFonts->setSize($options['scales']['r']['pointLabels']['fonts']['size']);
|
||||
}
|
||||
|
||||
if (isset($options['scales']['r']['pointLabels']['fonts']['style']) === true) {
|
||||
$scaleRpointLabelsFonts->setStyle($options['scales']['r']['pointLabels']['fonts']['style']);
|
||||
}
|
||||
|
||||
if (isset($options['scales']['r']['pointLabels']['fonts']['weight']) === true) {
|
||||
$scaleRpointLabelsFonts->setWeight($options['scales']['r']['pointLabels']['fonts']['weight']);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Color.
|
||||
|
@ -1102,12 +1211,45 @@ function get_build_setup_charts($type, $options, $data)
|
|||
}
|
||||
break;
|
||||
|
||||
case 'RADAR':
|
||||
foreach ($data as $key => $dataset) {
|
||||
$dataSet1 = $chart->createDataSet();
|
||||
$dataSet1->setBackgroundColor($dataset['backgroundColor']);
|
||||
$dataSet1->setBorderColor($dataset['borderColor']);
|
||||
$dataSet1->setPointBackgroundColor($dataset['pointBackgroundColor']);
|
||||
$dataSet1->setPointBorderColor($dataset['pointBorderColor']);
|
||||
$dataSet1->setPointHoverBackgroundColor($dataset['pointHoverBackgroundColor']);
|
||||
$dataSet1->setPointHoverBorderColor($dataset['pointHoverBorderColor']);
|
||||
$dataSet1->data()->exchangeArray($dataset['data']);
|
||||
$chart->addDataSet($dataSet1);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'LINE':
|
||||
$chart->labels()->exchangeArray($options['labels']);
|
||||
|
||||
foreach ($data as $key => $dataset) {
|
||||
$dataSet1 = $chart->createDataSet();
|
||||
$dataSet1->setLabel($dataset['label']);
|
||||
$dataSet1->setBackgroundColor($dataset['backgroundColor']);
|
||||
$dataSet1->setBorderColor($dataset['borderColor']);
|
||||
$dataSet1->setPointBackgroundColor($dataset['pointBackgroundColor']);
|
||||
$dataSet1->setPointBorderColor($dataset['pointBorderColor']);
|
||||
$dataSet1->setPointHoverBackgroundColor($dataset['pointHoverBackgroundColor']);
|
||||
$dataSet1->setPointHoverBorderColor($dataset['pointHoverBorderColor']);
|
||||
$dataSet1->data()->exchangeArray($dataset['data']);
|
||||
$chart->addDataSet($dataSet1);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
// Not possible.
|
||||
break;
|
||||
}
|
||||
|
||||
$chart->addDataSet($setData);
|
||||
if ($type !== 'RADAR' && $type !== 'LINE') {
|
||||
$chart->addDataSet($setData);
|
||||
}
|
||||
|
||||
return $chart;
|
||||
}
|
||||
|
|
|
@ -86,8 +86,8 @@ function showConnectionMessage(conn = true, msg = "") {
|
|||
.closest(".ui-dialog-content")
|
||||
.dialog("close");
|
||||
} else {
|
||||
data.title = "Connection with server has been lost";
|
||||
data.text = "Connection status: " + msg;
|
||||
data.title = get_php_value("title_conexion_interval");
|
||||
data.text = get_php_value("status_conexion_interval") + msg;
|
||||
|
||||
infoMessage(data, "message_dialog_connection");
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -2487,3 +2487,39 @@ function menuActionButtonResizing() {
|
|||
"width: calc(100% - " + $("#menu_full").width() + "px);"
|
||||
);
|
||||
}
|
||||
|
||||
function check_period_warning(time, title, message) {
|
||||
var period = time.value;
|
||||
var times = 0;
|
||||
if (period >= 2592000 && period < 7776000) {
|
||||
WarningPeriodicityModal(title, message);
|
||||
} else if (period >= 7776000 && period < 15552000) {
|
||||
do {
|
||||
WarningPeriodicityModal(title, message);
|
||||
times = times + 1;
|
||||
} while (times < 2);
|
||||
} else if (period >= 15552000) {
|
||||
do {
|
||||
WarningPeriodicityModal(title, message);
|
||||
times = times + 1;
|
||||
} while (times < 3);
|
||||
}
|
||||
}
|
||||
|
||||
function check_period_warning_manual(input_name, title, message) {
|
||||
var period = {
|
||||
value:
|
||||
$("#text-" + input_name + "_text").val() *
|
||||
$("#" + input_name + "_units option:selected").val()
|
||||
};
|
||||
check_period_warning(period, title, message);
|
||||
}
|
||||
|
||||
function WarningPeriodicityModal(title, message) {
|
||||
confirmDialog({
|
||||
title: title,
|
||||
message: message,
|
||||
strCancelButton: "Ok",
|
||||
hideOkButton: 1
|
||||
});
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue