mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 07:44:35 +02:00
Merge branch 'develop' into ent-12137-propuesta-de-refactoring-visual-de-vista-ppal-de-agente
This commit is contained in:
commit
8b9d52646c
@ -1,6 +1,6 @@
|
|||||||
Source: pandora_gotty
|
Source: pandora_gotty
|
||||||
Section: utils
|
Section: utils
|
||||||
Version: 1.0.0
|
Version: 1.1.0
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: PandoraFMS
|
Maintainer: PandoraFMS
|
||||||
Build-Depends: debhelper (>= 12)
|
Build-Depends: debhelper (>= 12)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
%define name pandora_gotty
|
%define name pandora_gotty
|
||||||
%define version 1.0
|
%define version 1.1
|
||||||
%define release 1%{?dist}
|
%define release 1%{?dist}
|
||||||
Summary: pandora_gptty for Pandora FMS
|
Summary: pandora_gptty for Pandora FMS
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -74,7 +74,7 @@ def exec_ssh (user:str, add:str, port:int):
|
|||||||
try:
|
try:
|
||||||
print("> Starting SSH connection...")
|
print("> Starting SSH connection...")
|
||||||
ssh_command = f"ssh {user}@{add} -p {port}"
|
ssh_command = f"ssh {user}@{add} -p {port}"
|
||||||
subprocess.run(ssh_command, shell=True)
|
subprocess.run(ssh_command, shell=True, encoding='utf-8', text=True)
|
||||||
|
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
raise SystemExit(e)
|
raise SystemExit(e)
|
||||||
@ -88,7 +88,7 @@ def exec_telnet (add:str, port:int):
|
|||||||
try:
|
try:
|
||||||
print("> Starting Telnet connection...")
|
print("> Starting Telnet connection...")
|
||||||
ssh_command = f"telnet -E {add} {port}"
|
ssh_command = f"telnet -E {add} {port}"
|
||||||
subprocess.run(ssh_command, shell=True)
|
subprocess.run(ssh_command, shell=True, encoding='utf-8', text=True)
|
||||||
|
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
raise SystemExit(e)
|
raise SystemExit(e)
|
||||||
|
@ -22,13 +22,16 @@ else
|
|||||||
fi
|
fi
|
||||||
SPEC_FILES="$CODEHOME/pandora_console/pandora_console.spec \
|
SPEC_FILES="$CODEHOME/pandora_console/pandora_console.spec \
|
||||||
$CODEHOME/pandora_agents/unix/pandora_agent.spec \
|
$CODEHOME/pandora_agents/unix/pandora_agent.spec \
|
||||||
|
$CODEHOME/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec \
|
||||||
|
$CODEHOME/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec \
|
||||||
|
$CODEHOME/pandora_agents/unix/pandora_agent.redhat_bin.spec \
|
||||||
|
$CODEHOME/pandora_agents/unix/pandora_agent.redhat.spec \
|
||||||
$CODEHOME/pandora_server/pandora_server.spec \
|
$CODEHOME/pandora_server/pandora_server.spec \
|
||||||
$PANDHOME_ENT/pandora_console/enterprise/pandora_console_enterprise.spec \
|
$PANDHOME_ENT/pandora_console/enterprise/pandora_console_enterprise.spec \
|
||||||
$PANDHOME_ENT/pandora_server/PandoraFMS-Enterprise/pandora_server_enterprise.spec \
|
$PANDHOME_ENT/pandora_server/PandoraFMS-Enterprise/pandora_server_enterprise.spec \
|
||||||
$CODEHOME/pandora_console/pandora_console.redhat.spec \
|
$CODEHOME/pandora_console/pandora_console.redhat.spec \
|
||||||
$CODEHOME/pandora_console/pandora_console.rhel7.spec \
|
$CODEHOME/pandora_console/pandora_console.rhel7.spec \
|
||||||
$CODEHOME/pandora_agents/unix/pandora_agent.redhat.spec \
|
$CODEHOME/pandora_agents/unix/pandora_agent.redhat.spec \
|
||||||
$CODEHOME/pandora_agents/unix/pandora_agent.redhat_bin.spec \
|
|
||||||
$CODEHOME/pandora_server/pandora_server.redhat.spec \
|
$CODEHOME/pandora_server/pandora_server.redhat.spec \
|
||||||
$PANDHOME_ENT/pandora_agents/pandora_agent.spec \
|
$PANDHOME_ENT/pandora_agents/pandora_agent.spec \
|
||||||
$PANDHOME_ENT/pandora_server/pandora_server_enterprise.redhat.spec \
|
$PANDHOME_ENT/pandora_server/pandora_server_enterprise.redhat.spec \
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-agent-unix
|
package: pandorafms-agent-unix
|
||||||
Version: 7.0NG.774
|
Version: 7.0NG.774-231116
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="7.0NG.774"
|
pandora_version="7.0NG.774-231116"
|
||||||
|
|
||||||
echo "Test if you has the tools for to make the packages."
|
echo "Test if you has the tools for to make the packages."
|
||||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||||
|
@ -313,7 +313,7 @@ module_plugin autodiscover --default
|
|||||||
|
|
||||||
#Hardening plugin for security compliance analysis. Enable to use it.
|
#Hardening plugin for security compliance analysis. Enable to use it.
|
||||||
#module_begin
|
#module_begin
|
||||||
#module_plugin /usr/share/pandora_agent/plugins/pandora_sca -t 150
|
#module_plugin /usr/share/pandora_agent/plugins/pandora_hardening -t 150
|
||||||
#module_absoluteinterval 7d
|
#module_absoluteinterval 7d
|
||||||
#module_end
|
#module_end
|
||||||
|
|
||||||
|
@ -1039,7 +1039,7 @@ my $Sem = undef;
|
|||||||
my $ThreadSem = undef;
|
my $ThreadSem = undef;
|
||||||
|
|
||||||
use constant AGENT_VERSION => '7.0NG.774';
|
use constant AGENT_VERSION => '7.0NG.774';
|
||||||
use constant AGENT_BUILD => '231102';
|
use constant AGENT_BUILD => '231116';
|
||||||
|
|
||||||
# Agent log default file size maximum and instances
|
# Agent log default file size maximum and instances
|
||||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
%global __os_install_post %{nil}
|
%global __os_install_post %{nil}
|
||||||
%define name pandorafms_agent_linux
|
%define name pandorafms_agent_linux
|
||||||
%define version 7.0NG.774
|
%define version 7.0NG.774
|
||||||
%define release 1
|
%define release 231116
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, PERL version
|
Summary: Pandora FMS Linux agent, PERL version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
%global __os_install_post %{nil}
|
%global __os_install_post %{nil}
|
||||||
%define name pandorafms_agent_linux_bin
|
%define name pandorafms_agent_linux_bin
|
||||||
%define source_name pandorafms_agent_linux
|
%define source_name pandorafms_agent_linux
|
||||||
%define version 7.0NG.773.3
|
%define version 7.0NG.774
|
||||||
%define release 230919
|
%define release 231116
|
||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, binary version
|
Summary: Pandora FMS Linux agent, binary version
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
%global __os_install_post %{nil}
|
%global __os_install_post %{nil}
|
||||||
%define name pandorafms_agent_linux_bin
|
%define name pandorafms_agent_linux_bin
|
||||||
%define source_name pandorafms_agent_linux
|
%define source_name pandorafms_agent_linux
|
||||||
%define version 7.0NG.773.3
|
%define version 7.0NG.774
|
||||||
%define release 230919
|
%define release 231116
|
||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, binary version
|
Summary: Pandora FMS Linux agent, binary version
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
%define name pandorafms_agent_linux_bin
|
%define name pandorafms_agent_linux_bin
|
||||||
%define source_name pandorafms_agent_linux
|
%define source_name pandorafms_agent_linux
|
||||||
%define version 7.0NG.774
|
%define version 7.0NG.774
|
||||||
%define release 1
|
%define release 231116
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, binary version
|
Summary: Pandora FMS Linux agent, binary version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
%global __os_install_post %{nil}
|
%global __os_install_post %{nil}
|
||||||
%define name pandorafms_agent_linux
|
%define name pandorafms_agent_linux
|
||||||
%define version 7.0NG.774
|
%define version 7.0NG.774
|
||||||
%define release 1
|
%define release 231116
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, PERL version
|
Summary: Pandora FMS Linux agent, PERL version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
PI_VERSION="7.0NG.774"
|
PI_VERSION="7.0NG.774"
|
||||||
PI_BUILD="231102"
|
PI_BUILD="231116"
|
||||||
OS_NAME=`uname -s`
|
OS_NAME=`uname -s`
|
||||||
|
|
||||||
FORCE=0
|
FORCE=0
|
||||||
|
@ -526,7 +526,7 @@ module_plugin "%PROGRAMFILES%\Pandora_Agent\util\autodiscover.exe" --default
|
|||||||
|
|
||||||
# Hardening plugin for security compliance analysis.
|
# Hardening plugin for security compliance analysis.
|
||||||
#module_begin
|
#module_begin
|
||||||
#module_plugin "%PROGRAMFILES%\Pandora_Agent\util\pandora_sca.exe -t 150"
|
#module_plugin "%PROGRAMFILES%\Pandora_Agent\util\pandora_hardening.exe -t 150"
|
||||||
#module_absoluteinterval 7d
|
#module_absoluteinterval 7d
|
||||||
#module_end
|
#module_end
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
Version
|
Version
|
||||||
{231102}
|
{231116}
|
||||||
|
|
||||||
ViewReadme
|
ViewReadme
|
||||||
{Yes}
|
{Yes}
|
||||||
@ -2387,7 +2387,7 @@ Windows,BuildSeparateArchives
|
|||||||
{No}
|
{No}
|
||||||
|
|
||||||
Windows,Executable
|
Windows,Executable
|
||||||
{<%AppName%>-Setup<%Ext%>}
|
{<%AppName%>-<%Version%>-Setup<%Ext%>}
|
||||||
|
|
||||||
Windows,FileDescription
|
Windows,FileDescription
|
||||||
{<%AppName%> <%Version%> Setup}
|
{<%AppName%> <%Version%> Setup}
|
||||||
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||||||
using namespace Pandora_Strutils;
|
using namespace Pandora_Strutils;
|
||||||
|
|
||||||
#define PATH_SIZE _MAX_PATH+1
|
#define PATH_SIZE _MAX_PATH+1
|
||||||
#define PANDORA_VERSION ("7.0NG.774 Build 231102")
|
#define PANDORA_VERSION ("7.0NG.774 Build 231116")
|
||||||
|
|
||||||
string pandora_path;
|
string pandora_path;
|
||||||
string pandora_dir;
|
string pandora_dir;
|
||||||
|
@ -11,7 +11,7 @@ BEGIN
|
|||||||
VALUE "LegalCopyright", "Pandora FMS"
|
VALUE "LegalCopyright", "Pandora FMS"
|
||||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||||
VALUE "ProductVersion", "(7.0NG.774(Build 231102))"
|
VALUE "ProductVersion", "(7.0NG.774(Build 231116))"
|
||||||
VALUE "FileVersion", "1.0.0.0"
|
VALUE "FileVersion", "1.0.0.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-console
|
package: pandorafms-console
|
||||||
Version: 7.0NG.774
|
Version: 7.0NG.774-231116
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="7.0NG.774"
|
pandora_version="7.0NG.774-231116"
|
||||||
|
|
||||||
package_pear=0
|
package_pear=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
@ -223,6 +223,8 @@ function quickShell()
|
|||||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 2);
|
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 2);
|
||||||
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
|
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
|
||||||
curl_setopt($ch, CURLOPT_MAXREDIRS, 10);
|
curl_setopt($ch, CURLOPT_MAXREDIRS, 10);
|
||||||
|
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
||||||
|
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
|
||||||
|
|
||||||
$response = curl_exec($ch);
|
$response = curl_exec($ch);
|
||||||
$responseCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
$responseCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||||
@ -541,6 +543,9 @@ if (is_ajax() === true) {
|
|||||||
// Maximum time to establish a connection.
|
// Maximum time to establish a connection.
|
||||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1);
|
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
||||||
|
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
|
||||||
|
|
||||||
curl_exec($ch);
|
curl_exec($ch);
|
||||||
$response_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
$response_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||||
curl_close($ch);
|
curl_close($ch);
|
||||||
|
@ -1718,3 +1718,5 @@ operation/incidents/list_integriaims_incidents.php
|
|||||||
include/functions_incidents.php
|
include/functions_incidents.php
|
||||||
include/functions_integriaims.php
|
include/functions_integriaims.php
|
||||||
include/ajax/integria_incidents.ajax.php
|
include/ajax/integria_incidents.ajax.php
|
||||||
|
enterprise/operation/log/log_source.php
|
||||||
|
enterprise/include/class/LogSource.class.php
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -922,6 +922,23 @@ $tableAdvancedAgent->data['safe_operation'][] = html_print_label_input_block(
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$tableAdvancedAgent->data['vul_scan_enabled'][] = html_print_label_input_block(
|
||||||
|
__('Vulnerability scanning'),
|
||||||
|
html_print_select(
|
||||||
|
[
|
||||||
|
0 => __('Disabled'),
|
||||||
|
1 => __('Enabled'),
|
||||||
|
2 => __('Use global settings'),
|
||||||
|
],
|
||||||
|
'vul_scan_enabled',
|
||||||
|
$vul_scan_enabled,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
0,
|
||||||
|
true
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
ui_toggle(
|
ui_toggle(
|
||||||
html_print_table($tableAdvancedAgent, true),
|
html_print_table($tableAdvancedAgent, true),
|
||||||
'<span class="subsection_header_title">'.__('Advanced options').'</span>',
|
'<span class="subsection_header_title">'.__('Advanced options').'</span>',
|
||||||
|
@ -231,6 +231,7 @@ if ($create_agent) {
|
|||||||
$quiet = (int) get_parameter('quiet', 0);
|
$quiet = (int) get_parameter('quiet', 0);
|
||||||
$cps = (int) get_parameter_switch('cps', -1);
|
$cps = (int) get_parameter_switch('cps', -1);
|
||||||
$fixed_ip = (int) get_parameter_switch('fixed_ip', 0);
|
$fixed_ip = (int) get_parameter_switch('fixed_ip', 0);
|
||||||
|
$vul_scan_enabled = (int) get_parameter_switch('vul_scan_enabled', 2);
|
||||||
|
|
||||||
$secondary_groups = (array) get_parameter('secondary_groups_selected', '');
|
$secondary_groups = (array) get_parameter('secondary_groups_selected', '');
|
||||||
$fields = db_get_all_fields_in_table('tagent_custom_fields');
|
$fields = db_get_all_fields_in_table('tagent_custom_fields');
|
||||||
@ -298,6 +299,7 @@ if ($create_agent) {
|
|||||||
'quiet' => $quiet,
|
'quiet' => $quiet,
|
||||||
'cps' => $cps,
|
'cps' => $cps,
|
||||||
'fixed_ip' => $fixed_ip,
|
'fixed_ip' => $fixed_ip,
|
||||||
|
'vul_scan_enabled' => $vul_scan_enabled,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -610,6 +612,7 @@ if ($id_agente) {
|
|||||||
$agent_wizard['active'] = false;
|
$agent_wizard['active'] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW') === true) {
|
if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW') === true) {
|
||||||
if ($has_remote_conf !== false) {
|
if ($has_remote_conf !== false) {
|
||||||
$agent_name = agents_get_name($id_agente);
|
$agent_name = agents_get_name($id_agente);
|
||||||
@ -642,24 +645,26 @@ if ($id_agente) {
|
|||||||
'collection' => $collectiontab,
|
'collection' => $collectiontab,
|
||||||
'group' => $grouptab,
|
'group' => $grouptab,
|
||||||
'gis' => $gistab,
|
'gis' => $gistab,
|
||||||
|
'vulnerabilities' => $vulnerabilities,
|
||||||
'agent_wizard' => $agent_wizard,
|
'agent_wizard' => $agent_wizard,
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
$onheader = [
|
$onheader = [
|
||||||
'view' => $viewtab,
|
'view' => $viewtab,
|
||||||
'separator' => '',
|
'separator' => '',
|
||||||
'main' => $maintab,
|
'main' => $maintab,
|
||||||
'module' => $moduletab,
|
'module' => $moduletab,
|
||||||
'ncm' => $ncm_tab,
|
'ncm' => $ncm_tab,
|
||||||
'alert' => $alerttab,
|
'alert' => $alerttab,
|
||||||
'template' => $templatetab,
|
'template' => $templatetab,
|
||||||
'inventory' => $inventorytab,
|
'inventory' => $inventorytab,
|
||||||
'pluginstab' => $pluginstab,
|
'pluginstab' => $pluginstab,
|
||||||
'policy' => (enterprise_installed() === true) ? $policyTab : '',
|
'policy' => (enterprise_installed() === true) ? $policyTab : '',
|
||||||
'collection' => $collectiontab,
|
'collection' => $collectiontab,
|
||||||
'group' => $grouptab,
|
'group' => $grouptab,
|
||||||
'gis' => $gistab,
|
'gis' => $gistab,
|
||||||
'agent_wizard' => $agent_wizard,
|
'vulnerabilities' => $vulnerabilities,
|
||||||
|
'agent_wizard' => $agent_wizard,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -760,6 +765,11 @@ if ($id_agente) {
|
|||||||
$help_header = 'gis_tab';
|
$help_header = 'gis_tab';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'vulnerabilities':
|
||||||
|
$tab_name = __('Vulnerabilities');
|
||||||
|
$help_header = 'vulnerabilities_tab';
|
||||||
|
break;
|
||||||
|
|
||||||
case 'incident':
|
case 'incident':
|
||||||
$tab_name = __('Incidents');
|
$tab_name = __('Incidents');
|
||||||
break;
|
break;
|
||||||
@ -1004,6 +1014,7 @@ if ($update_agent) {
|
|||||||
$secondary_groups = (array) get_parameter('secondary_groups_selected', '');
|
$secondary_groups = (array) get_parameter('secondary_groups_selected', '');
|
||||||
$satellite_server = (int) get_parameter('satellite_server', 0);
|
$satellite_server = (int) get_parameter('satellite_server', 0);
|
||||||
$fixed_ip = (int) get_parameter_switch('fixed_ip', 0);
|
$fixed_ip = (int) get_parameter_switch('fixed_ip', 0);
|
||||||
|
$vul_scan_enabled = (int) get_parameter_switch('vul_scan_enabled', 2);
|
||||||
|
|
||||||
if ($fields === false) {
|
if ($fields === false) {
|
||||||
$fields = [];
|
$fields = [];
|
||||||
@ -1130,6 +1141,7 @@ if ($update_agent) {
|
|||||||
'safe_mode_module' => $safe_mode_module,
|
'safe_mode_module' => $safe_mode_module,
|
||||||
'satellite_server' => $satellite_server,
|
'satellite_server' => $satellite_server,
|
||||||
'fixed_ip' => $fixed_ip,
|
'fixed_ip' => $fixed_ip,
|
||||||
|
'vul_scan_enabled' => $vul_scan_enabled,
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($config['metaconsole_agent_cache'] == 1) {
|
if ($config['metaconsole_agent_cache'] == 1) {
|
||||||
@ -1287,6 +1299,7 @@ if ($id_agente) {
|
|||||||
$safe_mode = ($safe_mode_module) ? 1 : 0;
|
$safe_mode = ($safe_mode_module) ? 1 : 0;
|
||||||
$satellite_server = (int) $agent['satellite_server'];
|
$satellite_server = (int) $agent['satellite_server'];
|
||||||
$fixed_ip = (int) $agent['fixed_ip'];
|
$fixed_ip = (int) $agent['fixed_ip'];
|
||||||
|
$vul_scan_enabled = (int) $agent['vul_scan_enabled'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$update_module = (bool) get_parameter('update_module');
|
$update_module = (bool) get_parameter('update_module');
|
||||||
@ -2425,6 +2438,10 @@ switch ($tab) {
|
|||||||
include 'agent_conf_gis.php';
|
include 'agent_conf_gis.php';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'vulnerabilities':
|
||||||
|
include enterprise_include('godmode/agentes/vulnerabilities_editor.php');
|
||||||
|
break;
|
||||||
|
|
||||||
case 'incident':
|
case 'incident':
|
||||||
include 'agent_incidents.php';
|
include 'agent_incidents.php';
|
||||||
break;
|
break;
|
||||||
|
@ -1387,7 +1387,7 @@ $table_advanced->data['made_enabled'][0] = html_print_checkbox_switch(
|
|||||||
'made_enabled',
|
'made_enabled',
|
||||||
1,
|
1,
|
||||||
(bool) $made_enabled,
|
(bool) $made_enabled,
|
||||||
false,
|
true,
|
||||||
false,
|
false,
|
||||||
'',
|
'',
|
||||||
false,
|
false,
|
||||||
|
@ -484,6 +484,7 @@ echo '</form>';
|
|||||||
|
|
||||||
ui_require_javascript_file('pandora_alerts');
|
ui_require_javascript_file('pandora_alerts');
|
||||||
ui_require_javascript_file('tinymce', 'vendor/tinymce/tinymce/');
|
ui_require_javascript_file('tinymce', 'vendor/tinymce/tinymce/');
|
||||||
|
ui_require_javascript_file('alert');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
@ -500,194 +501,6 @@ $(document).ready (function () {
|
|||||||
render_command_description(command_description);
|
render_command_description(command_description);
|
||||||
}
|
}
|
||||||
|
|
||||||
function ajax_get_integria_custom_fields(ticket_type_id, values, recovery_values) {
|
|
||||||
var values = values || [];
|
|
||||||
var recovery_values = recovery_values || [];
|
|
||||||
var max_macro_fields = <?php echo $config['max_macro_fields']; ?>;
|
|
||||||
|
|
||||||
if (ticket_type_id === null || ticket_type_id === '' || (Array.isArray(values) && values.length === 0 && Array.isArray(recovery_values) && recovery_values.length === 0)) {
|
|
||||||
for (var i=8; i <= max_macro_fields; i++) {
|
|
||||||
$('[name=field'+i+'_value\\[\\]').val('');
|
|
||||||
$('[name=field'+i+'_recovery_value\\[\\]').val('');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// On ticket type change, hide all table rows and inputs corresponding to custom fields, regardless of what its type is.
|
|
||||||
for (var i=8; i <= max_macro_fields; i++) {
|
|
||||||
$('[name=field'+i+'_value\\[\\]').hide();
|
|
||||||
$('[name=field'+i+'_recovery_value\\[\\]').hide();
|
|
||||||
$('#table_macros-field'+i).hide();
|
|
||||||
$('[name=field'+i+'_value_container').hide();
|
|
||||||
$('[name=field'+i+'_recovery_value_container').hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
jQuery.post(
|
|
||||||
"ajax.php",
|
|
||||||
{
|
|
||||||
page: "godmode/alerts/configure_alert_action",
|
|
||||||
get_integria_ticket_custom_types: 1,
|
|
||||||
ticket_type_id: ticket_type_id
|
|
||||||
},
|
|
||||||
function(data) {
|
|
||||||
var max_macro_fields = <?php echo $config['max_macro_fields']; ?>;
|
|
||||||
data.forEach(function(custom_field, key) {
|
|
||||||
var custom_field_key = key+8; // Custom fields start from field 8.
|
|
||||||
|
|
||||||
if (custom_field_key > max_macro_fields) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Display field row for current input.
|
|
||||||
var custom_field_row = $('#table_macros-field'+custom_field_key);
|
|
||||||
custom_field_row.show();
|
|
||||||
|
|
||||||
// Replace label text of field row for current input.
|
|
||||||
var label_html = $('#table_macros-field'+custom_field_key+' td').first().html();
|
|
||||||
var label_name = label_html.split('<br>')[0];
|
|
||||||
var new_html_content = custom_field_row.html().replace(label_name, custom_field.label);
|
|
||||||
custom_field_row.html(new_html_content);
|
|
||||||
|
|
||||||
switch (custom_field.type) {
|
|
||||||
case 'CHECKBOX':
|
|
||||||
var checkbox_selector = $('input[type="checkbox"][name=field'+custom_field_key+'_value\\[\\]]');
|
|
||||||
var checkbox_recovery_selector = $('input[type="checkbox"][name=field'+custom_field_key+'_recovery_value\\[\\]]');
|
|
||||||
|
|
||||||
checkbox_selector.on('change', function() {
|
|
||||||
if (checkbox_selector.prop('checked')) {
|
|
||||||
checkbox_selector.attr('value', "1");
|
|
||||||
} else {
|
|
||||||
checkbox_selector.attr('value', "0");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
checkbox_recovery_selector.on('change', function() {
|
|
||||||
if (checkbox_recovery_selector.prop('checked')) {
|
|
||||||
checkbox_recovery_selector.attr('value', "1");
|
|
||||||
} else {
|
|
||||||
checkbox_recovery_selector.attr('value', "0");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (typeof values[key] !== "undefined") {
|
|
||||||
if (values[key] == 1) {
|
|
||||||
checkbox_selector.prop('checked', true);
|
|
||||||
checkbox_selector.attr('value', "1");
|
|
||||||
} else {
|
|
||||||
checkbox_selector.prop('checked', false);
|
|
||||||
checkbox_selector.attr('value', "0");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof recovery_values[key] !== "undefined") {
|
|
||||||
if (recovery_values[key] == 1) {
|
|
||||||
checkbox_recovery_selector.prop('checked', true);
|
|
||||||
checkbox_recovery_selector.attr('value', "1");
|
|
||||||
} else {
|
|
||||||
checkbox_recovery_selector.prop('checked', false);
|
|
||||||
checkbox_recovery_selector.attr('value', "0");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$('[name=field'+custom_field_key+'_value_container]').show();
|
|
||||||
$('[name=field'+custom_field_key+'_recovery_value_container]').show();
|
|
||||||
$('input[type="checkbox"][name=field'+custom_field_key+'_value\\[\\]]').show();
|
|
||||||
$('input[type="checkbox"][name=field'+custom_field_key+'_recovery_value\\[\\]]').show();
|
|
||||||
break;
|
|
||||||
case 'COMBO':
|
|
||||||
var combo_input = $('select[name=field'+custom_field_key+'_value\\[\\]]');
|
|
||||||
var combo_input_recovery = $('select[name=field'+custom_field_key+'_recovery_value\\[\\]]');
|
|
||||||
|
|
||||||
combo_input.find('option').remove();
|
|
||||||
combo_input_recovery.find('option').remove();
|
|
||||||
|
|
||||||
var combo_values_array = custom_field.comboValue.split(',');
|
|
||||||
|
|
||||||
combo_values_array.forEach(function(value) {
|
|
||||||
combo_input.append($('<option>', {
|
|
||||||
value: value,
|
|
||||||
text: value
|
|
||||||
}));
|
|
||||||
|
|
||||||
combo_input_recovery.append($('<option>', {
|
|
||||||
value: value,
|
|
||||||
text: value
|
|
||||||
}));
|
|
||||||
});
|
|
||||||
|
|
||||||
if (typeof values[key] !== "undefined") {
|
|
||||||
combo_input.val(values[key]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof recovery_values[key] !== "undefined") {
|
|
||||||
combo_input_recovery.val(recovery_values[key]);
|
|
||||||
}
|
|
||||||
|
|
||||||
combo_input.show();
|
|
||||||
combo_input_recovery.show();
|
|
||||||
break;
|
|
||||||
case 'DATE':
|
|
||||||
$('input.datepicker[type="text"][name=field'+custom_field_key+'_value\\[\\]]').removeClass("hasDatepicker");
|
|
||||||
$('input.datepicker[type="text"][name=field'+custom_field_key+'_recovery_value\\[\\]]').removeClass("hasDatepicker");
|
|
||||||
$('input.datepicker[type="text"][name=field'+custom_field_key+'_value\\[\\]]').datepicker("destroy");
|
|
||||||
$('input.datepicker[type="text"][name=field'+custom_field_key+'_recovery_value\\[\\]]').datepicker("destroy");
|
|
||||||
$('input.datepicker[type="text"][name=field'+custom_field_key+'_value\\[\\]]').show();
|
|
||||||
$('input.datepicker[type="text"][name=field'+custom_field_key+'_recovery_value\\[\\]]').show();
|
|
||||||
$('input.datepicker[type="text"][name=field'+custom_field_key+'_value\\[\\]]').datepicker({dateFormat: "<?php echo 'yy-mm-dd 00:00:00'; ?>"});
|
|
||||||
$('input.datepicker[type="text"][name=field'+custom_field_key+'_recovery_value\\[\\]]').datepicker({dateFormat: "<?php echo 'yy-mm-dd 00:00:00'; ?>"});
|
|
||||||
$.datepicker.setDefaults($.datepicker.regional[ "<?php echo get_user_language(); ?>"]);
|
|
||||||
|
|
||||||
if (typeof values[key] !== "undefined") {
|
|
||||||
$('input.datepicker[type="text"][name=field'+custom_field_key+'_value\\[\\]]').val(values[key]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof recovery_values[key] !== "undefined") {
|
|
||||||
$('input.datepicker[type="text"][name=field'+custom_field_key+'_recovery_value\\[\\]]').val(recovery_values[key]);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'NUMERIC':
|
|
||||||
if (typeof values[key] !== "undefined") {
|
|
||||||
$('input[type="number"][name=field'+custom_field_key+'_value\\[\\]]').val(values[key]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof recovery_values[key] !== "undefined") {
|
|
||||||
$('input[type="number"][name=field'+custom_field_key+'_recovery_value\\[\\]]').val(recovery_values[key]);
|
|
||||||
}
|
|
||||||
|
|
||||||
$('input[type="number"][name=field'+custom_field_key+'_value\\[\\]]').show();
|
|
||||||
$('input[type="number"][name=field'+custom_field_key+'_recovery_value\\[\\]]').show();
|
|
||||||
break;
|
|
||||||
case 'TEXT':
|
|
||||||
if (typeof values[key] !== "undefined") {
|
|
||||||
$('input.normal[type="text"][name=field'+custom_field_key+'_value\\[\\]]').val(values[key]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof recovery_values[key] !== "undefined") {
|
|
||||||
$('input.normal[type="text"][name=field'+custom_field_key+'_recovery_value\\[\\]]').val(recovery_values[key]);
|
|
||||||
}
|
|
||||||
|
|
||||||
$('input.normal[type="text"][name=field'+custom_field_key+'_value\\[\\]]').show();
|
|
||||||
$('input.normal[type="text"][name=field'+custom_field_key+'_recovery_value\\[\\]]').show();
|
|
||||||
break;
|
|
||||||
case 'TEXTAREA':
|
|
||||||
default:
|
|
||||||
if (typeof values[key] !== "undefined") {
|
|
||||||
$('textarea[name=field'+custom_field_key+'_value\\[\\]]').val(values[key]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof recovery_values[key] !== "undefined") {
|
|
||||||
$('textarea[name=field'+custom_field_key+'_recovery_value\\[\\]]').val(recovery_values[key]);
|
|
||||||
}
|
|
||||||
|
|
||||||
$('textarea[name=field'+custom_field_key+'_value\\[\\]]').show();
|
|
||||||
$('textarea[name=field'+custom_field_key+'_recovery_value\\[\\]]').show();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
"json"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
$("#id_command").change (function () {
|
$("#id_command").change (function () {
|
||||||
values = Array ();
|
values = Array ();
|
||||||
// No se envia el valor del commando.
|
// No se envia el valor del commando.
|
||||||
@ -914,12 +727,22 @@ $(document).ready (function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($('#field5_value').val() !== '') {
|
if ($('#field5_value').val() !== '') {
|
||||||
ajax_get_integria_custom_fields($('#field5_value').val(), integria_custom_fields_values, integria_custom_fields_rvalues);
|
ajax_get_integria_custom_fields(
|
||||||
|
$('#field5_value').val(),
|
||||||
|
integria_custom_fields_values,
|
||||||
|
integria_custom_fields_rvalues,
|
||||||
|
max_macro_fields
|
||||||
|
);
|
||||||
$('#field5_value').trigger('change');
|
$('#field5_value').trigger('change');
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#field5_value').on('change', function() {
|
$('#field5_value').on('change', function() {
|
||||||
ajax_get_integria_custom_fields($(this).val());
|
ajax_get_integria_custom_fields(
|
||||||
|
$(this).val(),
|
||||||
|
[],
|
||||||
|
[],
|
||||||
|
max_macro_fields
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -571,6 +571,7 @@ if (!$maps && is_metaconsole() === false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($maps || is_metaconsole() === true) {
|
if ($maps || is_metaconsole() === true) {
|
||||||
|
$buttons = '';
|
||||||
if ($vconsoles_write || $vconsoles_manage) {
|
if ($vconsoles_write || $vconsoles_manage) {
|
||||||
if (is_metaconsole() === false) {
|
if (is_metaconsole() === false) {
|
||||||
$actionUrl = 'index.php?sec=network&sec2=godmode/reporting/visual_console_builder';
|
$actionUrl = 'index.php?sec=network&sec2=godmode/reporting/visual_console_builder';
|
||||||
@ -578,20 +579,22 @@ if ($maps || is_metaconsole() === true) {
|
|||||||
$actionUrl = 'index.php?sec=screen&sec2=screens/screens&action=visualmap&action2=new&operation=new_visualmap&tab=data&pure='.$pure;
|
$actionUrl = 'index.php?sec=screen&sec2=screens/screens&action=visualmap&action2=new&operation=new_visualmap&tab=data&pure='.$pure;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<form action="'.$actionUrl.'" method="post">';
|
$buttons .= '<form action="'.$actionUrl.'" method="post">';
|
||||||
html_print_input_hidden('edit_layout', 1);
|
$buttons .= html_print_input_hidden('edit_layout', 1, true);
|
||||||
|
|
||||||
html_print_action_buttons(
|
$buttons .= html_print_submit_button(
|
||||||
html_print_submit_button(
|
__('Create'),
|
||||||
__('Create'),
|
'',
|
||||||
'',
|
false,
|
||||||
false,
|
[ 'icon' => 'next'],
|
||||||
[ 'icon' => 'next'],
|
true
|
||||||
true
|
|
||||||
),
|
|
||||||
[ 'right_content' => $tablePagination ]
|
|
||||||
);
|
);
|
||||||
|
|
||||||
echo '</form>';
|
$buttons .= '</form>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
html_print_action_buttons(
|
||||||
|
$buttons,
|
||||||
|
[ 'right_content' => $tablePagination ]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
@ -24,14 +24,6 @@ if (! check_acl($config['id_user'], 0, 'AR')
|
|||||||
|
|
||||||
ui_require_css_file('discovery');
|
ui_require_css_file('discovery');
|
||||||
|
|
||||||
ui_require_javascript_file('pandora_alerts');
|
|
||||||
ui_include_time_picker();
|
|
||||||
ui_require_jquery_file('ui.datepicker-'.get_user_language(), 'include/javascript/i18n/');
|
|
||||||
ui_require_javascript_file('tinymce', 'vendor/tinymce/tinymce/');
|
|
||||||
ui_require_css_file('main.min', 'include/javascript/fullcalendar/');
|
|
||||||
ui_require_javascript_file('main.min', 'include/javascript/fullcalendar/');
|
|
||||||
ui_require_javascript_file('pandora_fullcalendar');
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mask class names.
|
* Mask class names.
|
||||||
@ -212,115 +204,3 @@ if ($classname_selected === null) {
|
|||||||
|
|
||||||
Wizard::printBigButtonsList($wiz_data);
|
Wizard::printBigButtonsList($wiz_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
$is_management_allowed = is_management_allowed();
|
|
||||||
$task_id = get_parameter('task', '');
|
|
||||||
if ($task_id !== '') {
|
|
||||||
$task = db_get_row_filter(
|
|
||||||
'tuser_task_scheduled',
|
|
||||||
['id' => $task_id]
|
|
||||||
);
|
|
||||||
$args = unserialize($task['args']);
|
|
||||||
$event_calendar = io_safe_output($args['weekly_schedule']);
|
|
||||||
} else {
|
|
||||||
$event_calendar = '{"monday":[{"start":"00:00:00","end":"00:00:00"}],"tuesday":[{"start":"00:00:00","end":"00:00:00"}],"wednesday":[{"start":"00:00:00","end":"00:00:00"}],"thursday":[{"start":"00:00:00","end":"00:00:00"}],"friday":[{"start":"00:00:00","end":"00:00:00"}],"saturday":[{"start":"00:00:00","end":"00:00:00"}],"sunday":[{"start":"00:00:00","end":"00:00:00"}]}';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(document).ready (function () {
|
|
||||||
$("#table-new-job-3").hide();
|
|
||||||
var edit = '<?php echo $task_id; ?>';
|
|
||||||
if (edit != '') {
|
|
||||||
exec_calendar();
|
|
||||||
}
|
|
||||||
|
|
||||||
$("#scheduled").change(exec_calendar);
|
|
||||||
|
|
||||||
function exec_calendar() {
|
|
||||||
if ($("#scheduled").val() == "weekly") {
|
|
||||||
var is_management_allowed = parseInt('<?php echo (int) $is_management_allowed; ?>');
|
|
||||||
var eventsBBDD = '<?php echo $event_calendar; ?>';
|
|
||||||
var events = loadEventBBDD(eventsBBDD);
|
|
||||||
var calendarEl = document.getElementById('calendar_map');
|
|
||||||
|
|
||||||
var options = {
|
|
||||||
contentHeight: "auto",
|
|
||||||
headerToolbar: {
|
|
||||||
left: "",
|
|
||||||
center: "",
|
|
||||||
right: is_management_allowed === 0 ? '' : "timeGridWeek,dayGridWeek"
|
|
||||||
},
|
|
||||||
buttonText: {
|
|
||||||
dayGridWeek: '<?php echo __('Simple'); ?>',
|
|
||||||
timeGridWeek: '<?php echo __('Detailed'); ?>'
|
|
||||||
},
|
|
||||||
dayHeaderFormat: { weekday: "short" },
|
|
||||||
initialView: "dayGridWeek",
|
|
||||||
navLinks: false,
|
|
||||||
selectable: true,
|
|
||||||
selectMirror: true,
|
|
||||||
slotDuration: "01:00:00",
|
|
||||||
slotLabelInterval: "02:00:00",
|
|
||||||
snapDuration: "01:00:00",
|
|
||||||
slotMinTime: "00:00:00",
|
|
||||||
slotMaxTime: "24:00:00",
|
|
||||||
scrollTime: "01:00:00",
|
|
||||||
locale: "en-GB",
|
|
||||||
firstDay: 1,
|
|
||||||
eventTimeFormat: {
|
|
||||||
hour: "numeric",
|
|
||||||
minute: "2-digit",
|
|
||||||
hour12: false
|
|
||||||
},
|
|
||||||
eventColor: "#82b92e",
|
|
||||||
editable: is_management_allowed === 0 ? false : true,
|
|
||||||
dayMaxEvents: 3,
|
|
||||||
dayPopoverFormat: { weekday: "long" },
|
|
||||||
defaultAllDay: false,
|
|
||||||
displayEventTime: true,
|
|
||||||
displayEventEnd: true,
|
|
||||||
selectOverlap: false,
|
|
||||||
eventOverlap: false,
|
|
||||||
allDaySlot: true,
|
|
||||||
droppable: false,
|
|
||||||
select: is_management_allowed === 0 ? false : select_alert_template,
|
|
||||||
selectAllow: is_management_allowed === 0 ? false : selectAllow_alert_template,
|
|
||||||
eventAllow: is_management_allowed === 0 ? false : eventAllow_alert_template,
|
|
||||||
eventDrop: is_management_allowed === 0 ? false : eventDrop_alert_template,
|
|
||||||
eventDragStop: is_management_allowed === 0 ? false : eventDragStop_alert_template,
|
|
||||||
eventResize: is_management_allowed === 0 ? false : eventResize_alert_template,
|
|
||||||
eventMouseEnter: is_management_allowed === 0 ? false : eventMouseEnter_alert_template,
|
|
||||||
eventMouseLeave: is_management_allowed === 0 ? false : eventMouseLeave_alert_template,
|
|
||||||
eventClick: is_management_allowed === 0 ? false : eventClick_alert_template,
|
|
||||||
};
|
|
||||||
|
|
||||||
var settings = {
|
|
||||||
timeFormat: '<?php echo TIME_FORMAT_JS; ?>',
|
|
||||||
timeOnlyTitle: '<?php echo __('Choose time'); ?>',
|
|
||||||
timeText: '<?php echo __('Time'); ?>',
|
|
||||||
hourText: '<?php echo __('Hour'); ?>',
|
|
||||||
minuteText: '<?php echo __('Minute'); ?>',
|
|
||||||
secondText: '<?php echo __('Second'); ?>',
|
|
||||||
currentText: '<?php echo __('Now'); ?>',
|
|
||||||
closeText: '<?php echo __('Close'); ?>',
|
|
||||||
url: '<?php echo ui_get_full_url('ajax.php', false, false, false); ?>',
|
|
||||||
removeText: '<?php echo __('Remove'); ?>',
|
|
||||||
userLanguage: '<?php echo get_user_language(); ?>',
|
|
||||||
loadingText: '<?php echo __('Loading, this operation might take several minutes...'); ?>',
|
|
||||||
tooltipText: '<?php echo __('Drag out to remove'); ?>',
|
|
||||||
alert: '<?php echo __('Alert'); ?>'
|
|
||||||
}
|
|
||||||
|
|
||||||
var calendar = fullCalendarPandora(calendarEl, options, settings, events);
|
|
||||||
calendar.render();
|
|
||||||
|
|
||||||
$("#table-new-job-3").show();
|
|
||||||
$('.fc-event-title').hide();
|
|
||||||
$(".fc-button-active" ).trigger( "click" );
|
|
||||||
} else {
|
|
||||||
$("#calendar_map").html();
|
|
||||||
$("#table-new-job-3").hide();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
@ -97,6 +97,24 @@ try {
|
|||||||
'column_names' => $column_names,
|
'column_names' => $column_names,
|
||||||
'ajax_url' => 'include/ajax/os',
|
'ajax_url' => 'include/ajax/os',
|
||||||
'ajax_data' => ['method' => 'drawOSTable'],
|
'ajax_data' => ['method' => 'drawOSTable'],
|
||||||
|
'pagination_options' => [
|
||||||
|
[
|
||||||
|
$config['block_size'],
|
||||||
|
10,
|
||||||
|
25,
|
||||||
|
100,
|
||||||
|
200,
|
||||||
|
500,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
$config['block_size'],
|
||||||
|
10,
|
||||||
|
25,
|
||||||
|
100,
|
||||||
|
200,
|
||||||
|
500,
|
||||||
|
],
|
||||||
|
],
|
||||||
'ajax_postprocess' => 'process_datatables_item(item)',
|
'ajax_postprocess' => 'process_datatables_item(item)',
|
||||||
'no_sortable_columns' => [
|
'no_sortable_columns' => [
|
||||||
-1,
|
-1,
|
||||||
@ -137,6 +155,10 @@ if (is_metaconsole() === true) {
|
|||||||
true
|
true
|
||||||
);
|
);
|
||||||
$buttons .= '</form>';
|
$buttons .= '</form>';
|
||||||
|
} else {
|
||||||
|
$buttons .= '<form method="post" action="index.php?sec=gagente&sec2=godmode/setup/os&tab=manage_os&action=edit">';
|
||||||
|
$buttons .= html_print_submit_button(__('Create OS'), 'update_button', false, ['icon' => 'next'], true);
|
||||||
|
$buttons .= '</form>';
|
||||||
}
|
}
|
||||||
|
|
||||||
html_print_action_buttons(
|
html_print_action_buttons(
|
||||||
@ -150,15 +172,6 @@ html_print_action_buttons(
|
|||||||
|
|
||||||
echo '<div id="aux" class="invisible"></div>';
|
echo '<div id="aux" class="invisible"></div>';
|
||||||
|
|
||||||
echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/setup/os&tab=manage_os&action=edit">';
|
|
||||||
|
|
||||||
html_print_action_buttons(
|
|
||||||
html_print_submit_button(__('Create OS'), 'update_button', false, ['icon' => 'next'], true),
|
|
||||||
['type' => 'form_action']
|
|
||||||
);
|
|
||||||
|
|
||||||
echo '</form>';
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<script language="javascript" type="text/javascript">
|
<script language="javascript" type="text/javascript">
|
||||||
function process_datatables_item(item) {
|
function process_datatables_item(item) {
|
||||||
|
@ -767,6 +767,7 @@ $table->data[$i][] = html_print_label_input_block(
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
echo '<form class="max_floating_element_size" id="form_setup" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/setup&section=general&pure='.$config['pure'].'">';
|
echo '<form class="max_floating_element_size" id="form_setup" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/setup&section=general&pure='.$config['pure'].'">';
|
||||||
|
|
||||||
echo '<fieldset class="margin-bottom-10">';
|
echo '<fieldset class="margin-bottom-10">';
|
||||||
|
@ -2129,6 +2129,15 @@ $table_other->data[$row][] = html_print_label_input_block(
|
|||||||
__('Data multiplier to use in graphs/data'),
|
__('Data multiplier to use in graphs/data'),
|
||||||
html_print_select($options_data_multiplier, 'use_data_multiplier', $config['use_data_multiplier'], '', '', 1, true, false, false)
|
html_print_select($options_data_multiplier, 'use_data_multiplier', $config['use_data_multiplier'], '', '', 1, true, false, false)
|
||||||
);
|
);
|
||||||
|
$table_other->data[$row][] = html_print_label_input_block(
|
||||||
|
__('Hide general stats for non admin users in tactical view'),
|
||||||
|
html_print_checkbox_switch(
|
||||||
|
'disable_general_statistics',
|
||||||
|
1,
|
||||||
|
$config['disable_general_statistics'],
|
||||||
|
true
|
||||||
|
)
|
||||||
|
);
|
||||||
$row++;
|
$row++;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -2063,7 +2063,7 @@ if ($create_alert || $update_alert) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// DIALOG ADD MORE ACTIONS.
|
// DIALOG ADD MORE ACTIONS.
|
||||||
echo '<div id="add_action_snmp-div" class="invisible left">';
|
echo '<div id="add_action_snmp-div" class="invisible">';
|
||||||
|
|
||||||
echo '<form id="add_action_form" method="post">';
|
echo '<form id="add_action_form" method="post">';
|
||||||
echo '<table class="w100p">';
|
echo '<table class="w100p">';
|
||||||
@ -2212,6 +2212,7 @@ if ($create_alert || $update_alert) {
|
|||||||
|
|
||||||
ui_require_javascript_file('pandora', 'include/javascript/', true);
|
ui_require_javascript_file('pandora', 'include/javascript/', true);
|
||||||
ui_require_javascript_file('tinymce', 'vendor/tinymce/tinymce/');
|
ui_require_javascript_file('tinymce', 'vendor/tinymce/tinymce/');
|
||||||
|
ui_require_javascript_file('alert');
|
||||||
?>
|
?>
|
||||||
<script language="javascript" type="text/javascript">
|
<script language="javascript" type="text/javascript">
|
||||||
|
|
||||||
@ -2287,6 +2288,7 @@ $(document).ready (function () {
|
|||||||
name: "content_type",
|
name: "content_type",
|
||||||
value: "<?php echo $al_field4; ?>"
|
value: "<?php echo $al_field4; ?>"
|
||||||
})
|
})
|
||||||
|
|
||||||
jQuery.post (<?php echo "'".ui_get_full_url('ajax.php', false, false, false)."'"; ?>,
|
jQuery.post (<?php echo "'".ui_get_full_url('ajax.php', false, false, false)."'"; ?>,
|
||||||
values,
|
values,
|
||||||
function (data, status) {
|
function (data, status) {
|
||||||
@ -2317,6 +2319,26 @@ $(document).ready (function () {
|
|||||||
}
|
}
|
||||||
$('#table_macros-field').show();
|
$('#table_macros-field').show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($("#alert_type option:selected").text() === "Create Pandora ITSM ticket") {
|
||||||
|
// At start hide all rows and inputs corresponding to custom fields, regardless of what its type is.
|
||||||
|
if (i>=8) {
|
||||||
|
$('[name=field'+i+'_value\\[\\]').hide();
|
||||||
|
$('[name=field'+i+'_recovery_value\\[\\]').hide();
|
||||||
|
$('#table_macros-field'+i).hide();
|
||||||
|
$('[name=field'+i+'_value_container').hide();
|
||||||
|
$('[name=field'+i+'_recovery_value_container').hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($('#field5_value').val() !== '') {
|
||||||
|
ajax_get_integria_custom_fields($('#field5_value').val(), [], [], max_fields);
|
||||||
|
$('#field5_value').trigger('change');
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#field5_value').on('change', function() {
|
||||||
|
ajax_get_integria_custom_fields($(this).val(), [], [], max_fields);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"json"
|
"json"
|
||||||
@ -2341,7 +2363,8 @@ $(document).ready (function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function show_add_action_snmp(id_alert_snmp) {
|
function show_add_action_snmp(id_alert_snmp) {
|
||||||
$("#add_action_snmp-div").hide()
|
$("#add_action_snmp-div")
|
||||||
|
.hide()
|
||||||
.dialog ({
|
.dialog ({
|
||||||
resizable: true,
|
resizable: true,
|
||||||
draggable: true,
|
draggable: true,
|
||||||
|
@ -33,8 +33,6 @@ check_login();
|
|||||||
|
|
||||||
require_once $config['homedir'].'/vendor/autoload.php';
|
require_once $config['homedir'].'/vendor/autoload.php';
|
||||||
|
|
||||||
use PandoraFMS\Dashboard\Manager;
|
|
||||||
|
|
||||||
require_once $config['homedir'].'/include/functions_profile.php';
|
require_once $config['homedir'].'/include/functions_profile.php';
|
||||||
require_once $config['homedir'].'/include/functions_users.php';
|
require_once $config['homedir'].'/include/functions_users.php';
|
||||||
require_once $config['homedir'].'/include/functions_groups.php';
|
require_once $config['homedir'].'/include/functions_groups.php';
|
||||||
@ -1376,72 +1374,6 @@ if (is_metaconsole() === true) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$values = [
|
|
||||||
-1 => __('Use global conf'),
|
|
||||||
1 => __('Yes'),
|
|
||||||
0 => __('No'),
|
|
||||||
];
|
|
||||||
|
|
||||||
$home_screen = '<div class="label_select"><p class="edit_user_labels">'.__('Home screen').ui_print_help_tip(
|
|
||||||
__('User can customize the home page. By default, will display \'Agent Detail\'. Example: Select \'Other\' and type index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=1 to show agent detail view'),
|
|
||||||
true
|
|
||||||
).'</p>';
|
|
||||||
|
|
||||||
$dashboards = Manager::getDashboards(
|
|
||||||
-1,
|
|
||||||
-1,
|
|
||||||
false,
|
|
||||||
false,
|
|
||||||
$id_usr
|
|
||||||
);
|
|
||||||
|
|
||||||
$dashboards_aux = [];
|
|
||||||
if ($dashboards === false) {
|
|
||||||
$dashboards = ['None' => 'None'];
|
|
||||||
} else {
|
|
||||||
foreach ($dashboards as $key => $dashboard) {
|
|
||||||
$dashboards_aux[$dashboard['id']] = $dashboard['name'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$home_screen .= '<div id="show_db" style="display: none; width: 100%;">';
|
|
||||||
$home_screen .= html_print_select($dashboards_aux, 'dashboard', $user_info['data_section'], '', '', '', true);
|
|
||||||
$home_screen .= '</div>';
|
|
||||||
|
|
||||||
$layouts = visual_map_get_user_layouts($config['id_user'], true);
|
|
||||||
$layouts_aux = [];
|
|
||||||
if ($layouts === false) {
|
|
||||||
$layouts_aux = ['None' => 'None'];
|
|
||||||
} else {
|
|
||||||
foreach ($layouts as $layout) {
|
|
||||||
$layouts_aux[$layout] = $layout;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$home_screen .= '<div id="show_vc" style="display: none; width: 100%;">';
|
|
||||||
$home_screen .= html_print_select(
|
|
||||||
$layouts_aux,
|
|
||||||
'visual_console',
|
|
||||||
$user_info['data_section'],
|
|
||||||
'',
|
|
||||||
'',
|
|
||||||
'',
|
|
||||||
true
|
|
||||||
);
|
|
||||||
$home_screen .= '</div>';
|
|
||||||
|
|
||||||
$home_screen .= html_print_input_text(
|
|
||||||
'data_section',
|
|
||||||
$user_info['data_section'],
|
|
||||||
'',
|
|
||||||
60,
|
|
||||||
255,
|
|
||||||
true,
|
|
||||||
false
|
|
||||||
);
|
|
||||||
|
|
||||||
$home_screen = '';
|
|
||||||
|
|
||||||
$size_pagination = '<div class="label_select_simple"><p class="edit_user_labels">'.__('Block size for pagination').'</p>';
|
$size_pagination = '<div class="label_select_simple"><p class="edit_user_labels">'.__('Block size for pagination').'</p>';
|
||||||
$size_pagination .= html_print_input_text(
|
$size_pagination .= html_print_input_text(
|
||||||
'block_size',
|
'block_size',
|
||||||
@ -2078,17 +2010,20 @@ if (is_metaconsole() === false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function show_data_section() {
|
function show_data_section() {
|
||||||
var $section = $("#section").val();
|
var section = $("#section").val();
|
||||||
var $allElements = $('div[id^="custom_home_screen_"]');
|
if(section === 'other'){
|
||||||
var $elementSelected = $('div[id="custom_home_screen_' + $section + '"]');
|
section = 'external_link';
|
||||||
|
}
|
||||||
|
var allElements = $('div[id^="custom_home_screen_"]');
|
||||||
|
var elementSelected = $('div[id="custom_home_screen_' + section + '"]');
|
||||||
// Hide all elements.
|
// Hide all elements.
|
||||||
$allElements.each(function() {
|
allElements.each(function() {
|
||||||
$(this).addClass('invisible');
|
$(this).addClass('invisible');
|
||||||
$(this).children().addClass('invisible');
|
$(this).children().addClass('invisible');
|
||||||
})
|
})
|
||||||
// Show only the selected.
|
// Show only the selected.
|
||||||
$elementSelected.removeClass('invisible');
|
elementSelected.removeClass('invisible');
|
||||||
$elementSelected.children().removeClass('invisible');
|
elementSelected.children().removeClass('invisible');
|
||||||
}
|
}
|
||||||
|
|
||||||
function switch_ehorus_conf() {
|
function switch_ehorus_conf() {
|
||||||
|
@ -26,6 +26,8 @@
|
|||||||
* ============================================================================
|
* ============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use PandoraFMS\Dashboard\Manager;
|
||||||
|
|
||||||
// Load global vars.
|
// Load global vars.
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
@ -45,16 +47,75 @@ $homeScreenValues = [
|
|||||||
HOME_SCREEN_DASHBOARD => __('Dashboard'),
|
HOME_SCREEN_DASHBOARD => __('Dashboard'),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
$dashboards = Manager::getDashboards(
|
||||||
|
-1,
|
||||||
|
-1,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
$id_usr
|
||||||
|
);
|
||||||
|
|
||||||
|
$dashboards_aux = [];
|
||||||
|
if ($dashboards === false) {
|
||||||
|
$dashboards = ['None' => 'None'];
|
||||||
|
} else {
|
||||||
|
foreach ($dashboards as $key => $dashboard) {
|
||||||
|
$dashboards_aux[$dashboard['id']] = $dashboard['name'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Custom Home Screen controls.
|
// Custom Home Screen controls.
|
||||||
$customHomeScreenAddition = [];
|
$customHomeScreenAddition = [];
|
||||||
// Home screen. Dashboard.
|
// Home screen. Dashboard.
|
||||||
$customHomeScreenAddition[HOME_SCREEN_DASHBOARD] = html_print_select($dashboards_aux, 'dashboard', $user_info['data_section'], '', '', '', true, false, true, 'w100p', false, 'width: 100%');
|
$customHomeScreenAddition[HOME_SCREEN_DASHBOARD] = html_print_select(
|
||||||
// Home screen. Visual consoles.
|
$dashboards_aux,
|
||||||
$customHomeScreenAddition[HOME_SCREEN_VISUAL_CONSOLE] = html_print_select($layouts_aux, 'visual_console', $user_info['data_section'], '', '', '', true, false, true, 'w100p', false, 'width: 100%');
|
'dashboard',
|
||||||
// Home screen. External link and Other.
|
$user_info['data_section'],
|
||||||
$customHomeScreenAddition[HOME_SCREEN_EXTERNAL_LINK] = html_print_input_text('data_section', $user_info['data_section'], '', 60, 255, true);
|
'',
|
||||||
$customHomeScreenAddition[HOME_SCREEN_OTHER] = html_print_input_text('data_section', $user_info['data_section'], '', 60, 255, true);
|
'',
|
||||||
|
'',
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
'w100p',
|
||||||
|
false,
|
||||||
|
'width: 100%'
|
||||||
|
);
|
||||||
|
|
||||||
|
$layouts = visual_map_get_user_layouts($config['id_user'], true);
|
||||||
|
$layouts_aux = [];
|
||||||
|
if ($layouts === false) {
|
||||||
|
$layouts_aux = ['None' => 'None'];
|
||||||
|
} else {
|
||||||
|
foreach ($layouts as $layout) {
|
||||||
|
$layouts_aux[$layout] = $layout;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Home screen. Visual consoles.
|
||||||
|
$customHomeScreenAddition[HOME_SCREEN_VISUAL_CONSOLE] = html_print_select(
|
||||||
|
$layouts_aux,
|
||||||
|
'visual_console',
|
||||||
|
$user_info['data_section'],
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
'w100p',
|
||||||
|
false,
|
||||||
|
'width: 100%'
|
||||||
|
);
|
||||||
|
// Home screen. External link and Other.
|
||||||
|
$customHomeScreenAddition[HOME_SCREEN_EXTERNAL_LINK] = html_print_input_text(
|
||||||
|
'data_section',
|
||||||
|
$user_info['data_section'],
|
||||||
|
'',
|
||||||
|
60,
|
||||||
|
255,
|
||||||
|
true
|
||||||
|
);
|
||||||
$customHomeScreenDataField = '';
|
$customHomeScreenDataField = '';
|
||||||
foreach ($customHomeScreenAddition as $key => $customField) {
|
foreach ($customHomeScreenAddition as $key => $customField) {
|
||||||
$customHomeScreenDataField .= html_print_div(
|
$customHomeScreenDataField .= html_print_div(
|
||||||
@ -576,7 +637,7 @@ $userManagementTable->data['fields_autorefreshTime'][0] .= ui_print_input_placeh
|
|||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
// eHorus conf
|
// EHorus conf.
|
||||||
if (isset($config['ehorus_user_level_conf']) === true && (bool) $config['ehorus_user_level_conf'] === true) {
|
if (isset($config['ehorus_user_level_conf']) === true && (bool) $config['ehorus_user_level_conf'] === true) {
|
||||||
$userManagementTable->data['captions_ehorus_user_level_enabled'][1] = __('Pandora RC user access enabled');
|
$userManagementTable->data['captions_ehorus_user_level_enabled'][1] = __('Pandora RC user access enabled');
|
||||||
$userManagementTable->data['fields_ehorus_user_level_enabled'][1] = html_print_checkbox_switch(
|
$userManagementTable->data['fields_ehorus_user_level_enabled'][1] = html_print_checkbox_switch(
|
||||||
@ -791,7 +852,7 @@ $userManagementTable->data['fields_addSettings'][0] = html_print_textarea(
|
|||||||
5,
|
5,
|
||||||
65,
|
65,
|
||||||
$user_info['comments'],
|
$user_info['comments'],
|
||||||
($view_mode ? 'readonly="readonly"' : ''),
|
($view_mode) ? 'readonly="readonly"' : '',
|
||||||
true,
|
true,
|
||||||
''
|
''
|
||||||
);
|
);
|
||||||
@ -945,15 +1006,7 @@ $(document).ready(function () {
|
|||||||
$('#advanced-line1_looknfeel-1 > a').css('display', 'block');
|
$('#advanced-line1_looknfeel-1 > a').css('display', 'block');
|
||||||
})
|
})
|
||||||
|
|
||||||
var ehorus_user_level_enabled =
|
var ehorus_user_level_enabled = '<?php echo (isset($user_info['ehorus_user_level_enabled']) === true) ? $user_info['ehorus_user_level_enabled'] : 0; ?>';
|
||||||
<?php
|
|
||||||
if (isset($user_info['ehorus_user_level_enabled']) === true) {
|
|
||||||
echo $user_info['ehorus_user_level_enabled'];
|
|
||||||
} else {
|
|
||||||
echo 0;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
;
|
|
||||||
var chk_ehorus_user_level_enabled = ehorus_user_level_enabled;
|
var chk_ehorus_user_level_enabled = ehorus_user_level_enabled;
|
||||||
|
|
||||||
if (ehorus_user_level_enabled == 0) {
|
if (ehorus_user_level_enabled == 0) {
|
||||||
|
9
pandora_console/images/alert_recovered@svg.svg
Normal file
9
pandora_console/images/alert_recovered@svg.svg
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?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 / 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="#82b92e"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.2 KiB |
7
pandora_console/images/vulnerability_scan@svg.svg
Normal file
7
pandora_console/images/vulnerability_scan@svg.svg
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<title>Vulnerability scanner@svg</title>
|
||||||
|
<g id="Vulnerability-scanner" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<path d="M1,15 C1.55228475,15 2,15.4477153 2,16 L2,18 L4,18 C4.55228475,18 5,18.4477153 5,19 C5,19.5522847 4.55228475,20 4,20 L1,20 C0.44771525,20 0,19.5522847 0,19 L2.22044605e-16,16 C2.22044605e-16,15.4477153 0.44771525,15 1,15 Z M19,15 C19.5522847,15 20,15.4477153 20,16 L20,19 C20,19.5522847 19.5522847,20 19,20 L16,20 C15.4477153,20 15,19.5522847 15,19 C15,18.4477153 15.4477153,18 16,18 L18,18 L18,16 C18,15.4477153 18.4477153,15 19,15 Z M10,3.054 L10.2249383,3.05813847 C13.4344251,3.17642824 16,5.81560306 16,9.054 L16,14.0937431 L13.104,16.031 L12.0698805,13.7307161 L14.2125487,13.4284958 C14.556044,13.3800462 14.7107272,12.9297411 14.4915053,12.6217094 L10.3337249,6.72755475 C10.2297804,6.58020088 10.0683722,6.50924823 9.91239579,6.53116927 C9.62831588,6.5712384 9.45479699,6.90055719 9.56613598,7.20888317 L10.9914706,11.1541491 L8.78753031,11.4650118 C8.51830424,11.5029857 8.34782116,11.7998997 8.42525378,12.0959539 L9.92,18.054 L4,14.0937431 L4,9.054 C4,5.81560306 6.56557489,3.17642824 9.77506174,3.05813847 L10,3.054 Z M4,0 C4.55228475,-1.01453063e-16 5,0.44771525 5,1 C5,1.55228475 4.55228475,2 4,2 L2,2 L2,4 C2,4.55228475 1.55228475,5 1,5 C0.44771525,5 2.22044605e-16,4.55228475 2.22044605e-16,4 L0,1 C0,0.44771525 0.44771525,1.01453063e-16 1,0 L4,0 Z M19,0 C19.5522847,1.01453063e-16 20,0.44771525 20,1 L20,4 C20,4.55228475 19.5522847,5 19,5 C18.4477153,5 18,4.55228475 18,4 L18,2 L16,2 C15.4477153,2 15,1.55228475 15,1 C15,0.44771525 15.4477153,-1.01453063e-16 16,0 Z" id="Scan" fill="#3F3F3F" transform="translate(10, 10) scale(1, -1) translate(-10, -10)"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.9 KiB |
@ -2065,14 +2065,6 @@ if ($table_events) {
|
|||||||
// (propagate ACL funct!).
|
// (propagate ACL funct!).
|
||||||
$groups = users_get_groups($config['id_user']);
|
$groups = users_get_groups($config['id_user']);
|
||||||
|
|
||||||
$tags_condition = tags_get_acl_tags(
|
|
||||||
$config['id_user'],
|
|
||||||
array_keys($groups),
|
|
||||||
'ER',
|
|
||||||
'event_condition',
|
|
||||||
'AND'
|
|
||||||
);
|
|
||||||
|
|
||||||
$tableEvents24h = new stdClass();
|
$tableEvents24h = new stdClass();
|
||||||
$tableEvents24h->class = 'filter_table';
|
$tableEvents24h->class = 'filter_table';
|
||||||
$tableEvents24h->styleTable = 'border: 0;padding: 0;margin: 0 0 10px;';
|
$tableEvents24h->styleTable = 'border: 0;padding: 0;margin: 0 0 10px;';
|
||||||
@ -2107,7 +2099,7 @@ if ($table_events) {
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
events_print_event_table(
|
events_print_event_table(
|
||||||
'estado <> 1 '.$tags_condition,
|
'estado <> 1',
|
||||||
200,
|
200,
|
||||||
'100%',
|
'100%',
|
||||||
false,
|
false,
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
/**
|
/**
|
||||||
* Pandora build version and version
|
* Pandora build version and version
|
||||||
*/
|
*/
|
||||||
$build_version = 'PC231102';
|
$build_version = 'PC231116';
|
||||||
$pandora_version = 'v7.0NG.774';
|
$pandora_version = 'v7.0NG.774';
|
||||||
|
|
||||||
// Do not overwrite default timezone set if defined.
|
// Do not overwrite default timezone set if defined.
|
||||||
|
@ -22,7 +22,7 @@ require_once $config['homedir'].'/include/functions_modules.php';
|
|||||||
require_once $config['homedir'].'/include/functions_users.php';
|
require_once $config['homedir'].'/include/functions_users.php';
|
||||||
|
|
||||||
|
|
||||||
function alerts_get_alerts($id_group=0, $free_search='', $status='all', $standby=-1, $acl=false, $total=false, $id_agent=0)
|
function alerts_get_alerts($id_group=0, $free_search='', $status='all', $standby=-1, $acl=false, $total=false, $id_agent=0, $only_enabled=false)
|
||||||
{
|
{
|
||||||
$sql = '';
|
$sql = '';
|
||||||
$alerts = [];
|
$alerts = [];
|
||||||
@ -121,6 +121,10 @@ function alerts_get_alerts($id_group=0, $free_search='', $status='all', $standby
|
|||||||
// Only enabled agent.
|
// Only enabled agent.
|
||||||
$sql .= ' AND t3.disabled = 0';
|
$sql .= ' AND t3.disabled = 0';
|
||||||
|
|
||||||
|
if ($only_enabled === true) {
|
||||||
|
$sql .= ' AND t0.disabled = 0';
|
||||||
|
}
|
||||||
|
|
||||||
$row_alerts = db_get_all_rows_sql($sql);
|
$row_alerts = db_get_all_rows_sql($sql);
|
||||||
|
|
||||||
if ($total) {
|
if ($total) {
|
||||||
|
@ -487,6 +487,10 @@ function config_update_config()
|
|||||||
$error_update[] = __('Legacy database HA');
|
$error_update[] = __('Legacy database HA');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config_update_value('agent_vulnerabilities', get_parameter('agent_vulnerabilities'), true) === false) {
|
||||||
|
$error_update[] = __('agent_vulnerabilities');
|
||||||
|
}
|
||||||
|
|
||||||
if (config_update_value('ipam_ocuppied_critical_treshold', get_parameter('ipam_ocuppied_critical_treshold'), true) === false) {
|
if (config_update_value('ipam_ocuppied_critical_treshold', get_parameter('ipam_ocuppied_critical_treshold'), true) === false) {
|
||||||
$error_update[] = __('Ipam Ocuppied Manager Critical');
|
$error_update[] = __('Ipam Ocuppied Manager Critical');
|
||||||
}
|
}
|
||||||
@ -1568,6 +1572,10 @@ function config_update_config()
|
|||||||
$error_update[] = __('Use data multiplier');
|
$error_update[] = __('Use data multiplier');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config_update_value('disable_general_statistics', get_parameter('disable_general_statistics', 0), true) === false) {
|
||||||
|
$error_update[] = __('Hide general stats for non admin users in tactical view');
|
||||||
|
}
|
||||||
|
|
||||||
if (config_update_value('decimal_separator', (string) get_parameter('decimal_separator', '.'), true) === false) {
|
if (config_update_value('decimal_separator', (string) get_parameter('decimal_separator', '.'), true) === false) {
|
||||||
$error_update[] = __('Decimal separator');
|
$error_update[] = __('Decimal separator');
|
||||||
} else {
|
} else {
|
||||||
@ -2441,6 +2449,10 @@ function config_process_config()
|
|||||||
config_update_value('show_experimental_features', 0);
|
config_update_value('show_experimental_features', 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isset($config['agent_vulnerabilities'])) {
|
||||||
|
config_update_value('agent_vulnerabilities', 1);
|
||||||
|
}
|
||||||
|
|
||||||
if (!isset($config['console_log_enabled'])) {
|
if (!isset($config['console_log_enabled'])) {
|
||||||
config_update_value('console_log_enabled', 0);
|
config_update_value('console_log_enabled', 0);
|
||||||
}
|
}
|
||||||
@ -3703,6 +3715,10 @@ function config_process_config()
|
|||||||
config_update_value('use_data_multiplier', '1');
|
config_update_value('use_data_multiplier', '1');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isset($config['disable_general_statistics'])) {
|
||||||
|
config_update_value('disable_general_statistics', 0);
|
||||||
|
}
|
||||||
|
|
||||||
if (!isset($config['command_snapshot'])) {
|
if (!isset($config['command_snapshot'])) {
|
||||||
config_update_value('command_snapshot', 1);
|
config_update_value('command_snapshot', 1);
|
||||||
}
|
}
|
||||||
|
@ -2593,7 +2593,7 @@ function events_print_type_img(
|
|||||||
|
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 'alert_recovered':
|
case 'alert_recovered':
|
||||||
$style .= ' alert_module_background_state icon_background_normal ';
|
$icon = 'images/alert_recovered@svg.svg';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'alert_manual_validation':
|
case 'alert_manual_validation':
|
||||||
@ -2609,20 +2609,16 @@ function events_print_type_img(
|
|||||||
case 'going_up_normal':
|
case 'going_up_normal':
|
||||||
case 'going_down_normal':
|
case 'going_down_normal':
|
||||||
// This is to be backwards compatible.
|
// This is to be backwards compatible.
|
||||||
// $style .= ' event_module_background_state icon_background_normal';
|
|
||||||
$icon = 'images/module_ok.png';
|
$icon = 'images/module_ok.png';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'going_up_warning':
|
case 'going_up_warning':
|
||||||
$icon = 'images/module_warning.png';
|
$icon = 'images/module_warning.png';
|
||||||
// $style .= ' event_module_background_state icon_background_warning';
|
|
||||||
case 'going_down_warning':
|
case 'going_down_warning':
|
||||||
$icon = 'images/module_warning.png';
|
$icon = 'images/module_warning.png';
|
||||||
// $style .= ' event_module_background_state icon_background_warning';
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'going_unknown':
|
case 'going_unknown':
|
||||||
// $style .= ' event_module_background_state icon_background_unknown';
|
|
||||||
$icon = 'images/module_unknown.png';
|
$icon = 'images/module_unknown.png';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -27,6 +27,8 @@
|
|||||||
* ============================================================================
|
* ============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use Models\VisualConsole\Items\Percentile;
|
||||||
|
|
||||||
require_once $config['homedir'].'/include/graphs/fgraph.php';
|
require_once $config['homedir'].'/include/graphs/fgraph.php';
|
||||||
require_once $config['homedir'].'/include/functions_reporting.php';
|
require_once $config['homedir'].'/include/functions_reporting.php';
|
||||||
require_once $config['homedir'].'/include/functions_agents.php';
|
require_once $config['homedir'].'/include/functions_agents.php';
|
||||||
@ -2686,7 +2688,9 @@ function graph_agent_status(
|
|||||||
$return=false,
|
$return=false,
|
||||||
$show_not_init=false,
|
$show_not_init=false,
|
||||||
$data_agents=false,
|
$data_agents=false,
|
||||||
$donut_narrow_graph=false
|
$donut_narrow_graph=false,
|
||||||
|
$onClick='',
|
||||||
|
$data_in_percentage=false,
|
||||||
) {
|
) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
@ -2766,6 +2770,25 @@ function graph_agent_status(
|
|||||||
'labels' => array_keys($data),
|
'labels' => array_keys($data),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if (empty($onClick) === false) {
|
||||||
|
$options['onClick'] = $onClick;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($data_in_percentage === true) {
|
||||||
|
$percentages = [];
|
||||||
|
$total = array_sum($data);
|
||||||
|
foreach ($data as $key => $value) {
|
||||||
|
$percentage = (($value / $total) * 100);
|
||||||
|
if ($percentage < 1 && $percentage > 0) {
|
||||||
|
$percentage = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$percentages[$key] = format_numeric($percentage, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = $percentages;
|
||||||
|
}
|
||||||
|
|
||||||
if ($donut_narrow_graph == true) {
|
if ($donut_narrow_graph == true) {
|
||||||
$out = ring_graph(
|
$out = ring_graph(
|
||||||
$data,
|
$data,
|
||||||
@ -4625,9 +4648,15 @@ function graph_nodata_image($options)
|
|||||||
return base64_encode($dataImg);
|
return base64_encode($dataImg);
|
||||||
}
|
}
|
||||||
|
|
||||||
$widthImage = '200px';
|
$style = '';
|
||||||
if (isset($options['nodata_image']['width']) === true) {
|
if (isset($options['nodata_image']['width']) === true) {
|
||||||
$widthImage = $options['nodata_image']['width'];
|
$style .= 'width: '.$options['nodata_image']['width'].'; ';
|
||||||
|
} else {
|
||||||
|
$style .= 'width: 200px; ';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($options['nodata_image']['height']) === true) {
|
||||||
|
$style .= 'height: '.$options['nodata_image']['height'].'; ';
|
||||||
}
|
}
|
||||||
|
|
||||||
return html_print_image(
|
return html_print_image(
|
||||||
@ -4635,7 +4664,7 @@ function graph_nodata_image($options)
|
|||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
'title' => __('No data'),
|
'title' => __('No data'),
|
||||||
'style' => 'width: '.$widthImage.';',
|
'style' => $style,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -669,6 +669,12 @@ function get_build_setup_charts($type, $options, $data)
|
|||||||
|
|
||||||
$chart->setId($id);
|
$chart->setId($id);
|
||||||
|
|
||||||
|
if (isset($options['onClick']) === true
|
||||||
|
&& empty($options['onClick']) === false
|
||||||
|
) {
|
||||||
|
$chart->options()->setOnClick($options['onClick']);
|
||||||
|
}
|
||||||
|
|
||||||
// Height is null maximum possible.
|
// Height is null maximum possible.
|
||||||
if (isset($options['height']) === true
|
if (isset($options['height']) === true
|
||||||
&& empty($options['height']) === false
|
&& empty($options['height']) === false
|
||||||
@ -1019,6 +1025,7 @@ function get_build_setup_charts($type, $options, $data)
|
|||||||
$chart->setCircumference($options['circumference']);
|
$chart->setCircumference($options['circumference']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$stacked = false;
|
||||||
if (isset($options['scales']) === true
|
if (isset($options['scales']) === true
|
||||||
&& empty($options['scales']) === false
|
&& empty($options['scales']) === false
|
||||||
&& is_array($options['scales']) === true
|
&& is_array($options['scales']) === true
|
||||||
@ -1082,6 +1089,13 @@ function get_build_setup_charts($type, $options, $data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($options['scales']['x']['stacked']) === true
|
||||||
|
&& empty($options['scales']['x']['stacked']) === false
|
||||||
|
) {
|
||||||
|
$scales->getX()->setStacked($options['scales']['x']['stacked']);
|
||||||
|
$stacked = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($options['scales']['x']['ticks']) === true
|
if (isset($options['scales']['x']['ticks']) === true
|
||||||
&& empty($options['scales']['x']['ticks']) === false
|
&& empty($options['scales']['x']['ticks']) === false
|
||||||
&& is_array($options['scales']['x']['ticks']) === true
|
&& is_array($options['scales']['x']['ticks']) === true
|
||||||
@ -1131,6 +1145,13 @@ function get_build_setup_charts($type, $options, $data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($options['scales']['y']['stacked']) === true
|
||||||
|
&& empty($options['scales']['y']['stacked']) === false
|
||||||
|
) {
|
||||||
|
$scales->getY()->setStacked($options['scales']['y']['stacked']);
|
||||||
|
$stacked = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($options['scales']['y']['ticks']) === true
|
if (isset($options['scales']['y']['ticks']) === true
|
||||||
&& empty($options['scales']['y']['ticks']) === false
|
&& empty($options['scales']['y']['ticks']) === false
|
||||||
&& is_array($options['scales']['y']['ticks']) === true
|
&& is_array($options['scales']['y']['ticks']) === true
|
||||||
@ -1247,11 +1268,37 @@ function get_build_setup_charts($type, $options, $data)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'BAR':
|
case 'BAR':
|
||||||
$setData->setLabel('data')->setBackgroundColor($colors);
|
if (isset($options['multiple']) === true && empty($options['multiple']) === false) {
|
||||||
$setData->setLabel('data')->setBorderColor($borders);
|
$i = 0;
|
||||||
$setData->setLabel('data')->setBorderWidth(2);
|
foreach ($options['multiple'] as $key_label => $label) {
|
||||||
|
$dataSet = $chart->createDataSet();
|
||||||
$setData->setLabel('data')->data()->exchangeArray(array_values($data));
|
$dataSet->setLabel($label);
|
||||||
|
$dataSet->setBackgroundColor($colors[$i]);
|
||||||
|
$dataSet->setBorderColor($borders[$i]);
|
||||||
|
$dataSet->setBorderWidth(2);
|
||||||
|
$dataSet->data()->exchangeArray(array_values($data[$key_label]));
|
||||||
|
$chart->addDataSet($dataSet);
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
} else if ($chart->options()->getScales()->getX()->isStacked() === true) {
|
||||||
|
$i = 0;
|
||||||
|
foreach ($data as $key => $dataset) {
|
||||||
|
$dataSet1 = $chart->createDataSet();
|
||||||
|
$dataSet1->setBackgroundColor($colors[$i]);
|
||||||
|
$dataSet1->setBorderColor($borders[$i]);
|
||||||
|
$dataSet1->setLabel($dataset['label']);
|
||||||
|
$dataSet1->setBorderWidth(2);
|
||||||
|
$dataSet1->data()->exchangeArray($dataset['data']);
|
||||||
|
$dataSet1->setStack($dataset['stack']);
|
||||||
|
$chart->addDataSet($dataSet1);
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$setData->setLabel('data')->setBackgroundColor($colors);
|
||||||
|
$setData->setLabel('data')->setBorderColor($borders);
|
||||||
|
$setData->setLabel('data')->setBorderWidth(2);
|
||||||
|
$setData->setLabel('data')->data()->exchangeArray(array_values($data));
|
||||||
|
}
|
||||||
|
|
||||||
// Para las horizontales.
|
// Para las horizontales.
|
||||||
if (isset($options['axis']) === true
|
if (isset($options['axis']) === true
|
||||||
@ -1266,6 +1313,7 @@ function get_build_setup_charts($type, $options, $data)
|
|||||||
foreach ($data as $key => $dataset) {
|
foreach ($data as $key => $dataset) {
|
||||||
$dataSet1 = $chart->createDataSet();
|
$dataSet1 = $chart->createDataSet();
|
||||||
$dataSet1->setBackgroundColor($dataset['backgroundColor']);
|
$dataSet1->setBackgroundColor($dataset['backgroundColor']);
|
||||||
|
$dataSet1->setLabel($dataset['label']);
|
||||||
$dataSet1->setBorderColor($dataset['borderColor']);
|
$dataSet1->setBorderColor($dataset['borderColor']);
|
||||||
$dataSet1->setPointBackgroundColor($dataset['pointBackgroundColor']);
|
$dataSet1->setPointBackgroundColor($dataset['pointBackgroundColor']);
|
||||||
$dataSet1->setPointBorderColor($dataset['pointBorderColor']);
|
$dataSet1->setPointBorderColor($dataset['pointBorderColor']);
|
||||||
@ -1298,7 +1346,11 @@ function get_build_setup_charts($type, $options, $data)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($type !== 'RADAR' && $type !== 'LINE') {
|
if ($type !== 'RADAR'
|
||||||
|
&& $type !== 'LINE'
|
||||||
|
&& $stacked === false
|
||||||
|
&& (isset($options['multiple']) === false || empty($options['multiple']) === true)
|
||||||
|
) {
|
||||||
$chart->addDataSet($setData);
|
$chart->addDataSet($setData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* eslint-disable no-unused-vars */
|
/* eslint-disable no-unused-vars */
|
||||||
/* global $, load_modal, generalShowMsg, confirmDialog */
|
/* global $, load_modal, generalShowMsg, confirmDialog, jQuery */
|
||||||
|
|
||||||
function allowDrop(ev) {
|
function allowDrop(ev) {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
@ -172,3 +172,317 @@ function disabled_alert(settings) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function ajax_get_integria_custom_fields(
|
||||||
|
ticket_type_id,
|
||||||
|
values,
|
||||||
|
recovery_values,
|
||||||
|
max_macro_fields
|
||||||
|
) {
|
||||||
|
values = values || [];
|
||||||
|
recovery_values = recovery_values || [];
|
||||||
|
|
||||||
|
if (
|
||||||
|
ticket_type_id === null ||
|
||||||
|
ticket_type_id === "" ||
|
||||||
|
(Array.isArray(values) &&
|
||||||
|
values.length === 0 &&
|
||||||
|
Array.isArray(recovery_values) &&
|
||||||
|
recovery_values.length === 0)
|
||||||
|
) {
|
||||||
|
for (let i = 8; i <= max_macro_fields; i++) {
|
||||||
|
$("[name=field" + i + "_value\\[\\]").val("");
|
||||||
|
$("[name=field" + i + "_recovery_value\\[\\]").val("");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// On ticket type change, hide all table rows and inputs corresponding to custom fields, regardless of what its type is.
|
||||||
|
for (let i = 8; i <= max_macro_fields; i++) {
|
||||||
|
$("[name=field" + i + "_value\\[\\]").hide();
|
||||||
|
$("[name=field" + i + "_recovery_value\\[\\]").hide();
|
||||||
|
$("#table_macros-field" + i).hide();
|
||||||
|
$("[name=field" + i + "_value_container").hide();
|
||||||
|
$("[name=field" + i + "_recovery_value_container").hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
jQuery.post(
|
||||||
|
"ajax.php",
|
||||||
|
{
|
||||||
|
page: "godmode/alerts/configure_alert_action",
|
||||||
|
get_integria_ticket_custom_types: 1,
|
||||||
|
ticket_type_id: ticket_type_id
|
||||||
|
},
|
||||||
|
function(data) {
|
||||||
|
data.forEach(function(custom_field, key) {
|
||||||
|
var custom_field_key = key + 8; // Custom fields start from field 8.
|
||||||
|
|
||||||
|
if (custom_field_key > max_macro_fields) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Display field row for current input.
|
||||||
|
var custom_field_row = $("#table_macros-field" + custom_field_key);
|
||||||
|
custom_field_row.show();
|
||||||
|
|
||||||
|
// Replace label text of field row for current input.
|
||||||
|
var label_html = $("#table_macros-field" + custom_field_key + " td")
|
||||||
|
.first()
|
||||||
|
.html();
|
||||||
|
var label_name = label_html.split("<br>")[0];
|
||||||
|
var new_html_content = custom_field_row
|
||||||
|
.html()
|
||||||
|
.replace(label_name, custom_field.label);
|
||||||
|
custom_field_row.html(new_html_content);
|
||||||
|
|
||||||
|
switch (custom_field.type) {
|
||||||
|
case "CHECKBOX":
|
||||||
|
var checkbox_selector = $(
|
||||||
|
'input[type="checkbox"][name=field' +
|
||||||
|
custom_field_key +
|
||||||
|
"_value\\[\\]]"
|
||||||
|
);
|
||||||
|
var checkbox_recovery_selector = $(
|
||||||
|
'input[type="checkbox"][name=field' +
|
||||||
|
custom_field_key +
|
||||||
|
"_recovery_value\\[\\]]"
|
||||||
|
);
|
||||||
|
|
||||||
|
checkbox_selector.on("change", function() {
|
||||||
|
if (checkbox_selector.prop("checked")) {
|
||||||
|
checkbox_selector.attr("value", "1");
|
||||||
|
} else {
|
||||||
|
checkbox_selector.attr("value", "0");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
checkbox_recovery_selector.on("change", function() {
|
||||||
|
if (checkbox_recovery_selector.prop("checked")) {
|
||||||
|
checkbox_recovery_selector.attr("value", "1");
|
||||||
|
} else {
|
||||||
|
checkbox_recovery_selector.attr("value", "0");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (typeof values[key] !== "undefined") {
|
||||||
|
if (values[key] == 1) {
|
||||||
|
checkbox_selector.prop("checked", true);
|
||||||
|
checkbox_selector.attr("value", "1");
|
||||||
|
} else {
|
||||||
|
checkbox_selector.prop("checked", false);
|
||||||
|
checkbox_selector.attr("value", "0");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof recovery_values[key] !== "undefined") {
|
||||||
|
if (recovery_values[key] == 1) {
|
||||||
|
checkbox_recovery_selector.prop("checked", true);
|
||||||
|
checkbox_recovery_selector.attr("value", "1");
|
||||||
|
} else {
|
||||||
|
checkbox_recovery_selector.prop("checked", false);
|
||||||
|
checkbox_recovery_selector.attr("value", "0");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$("[name=field" + custom_field_key + "_value_container]").show();
|
||||||
|
$(
|
||||||
|
"[name=field" + custom_field_key + "_recovery_value_container]"
|
||||||
|
).show();
|
||||||
|
$(
|
||||||
|
'input[type="checkbox"][name=field' +
|
||||||
|
custom_field_key +
|
||||||
|
"_value\\[\\]]"
|
||||||
|
).show();
|
||||||
|
$(
|
||||||
|
'input[type="checkbox"][name=field' +
|
||||||
|
custom_field_key +
|
||||||
|
"_recovery_value\\[\\]]"
|
||||||
|
).show();
|
||||||
|
break;
|
||||||
|
case "COMBO":
|
||||||
|
var combo_input = $(
|
||||||
|
"select[name=field" + custom_field_key + "_value\\[\\]]"
|
||||||
|
);
|
||||||
|
var combo_input_recovery = $(
|
||||||
|
"select[name=field" + custom_field_key + "_recovery_value\\[\\]]"
|
||||||
|
);
|
||||||
|
|
||||||
|
combo_input.find("option").remove();
|
||||||
|
combo_input_recovery.find("option").remove();
|
||||||
|
|
||||||
|
var combo_values_array = custom_field.comboValue.split(",");
|
||||||
|
|
||||||
|
combo_values_array.forEach(function(value) {
|
||||||
|
combo_input.append(
|
||||||
|
$("<option>", {
|
||||||
|
value: value,
|
||||||
|
text: value
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
combo_input_recovery.append(
|
||||||
|
$("<option>", {
|
||||||
|
value: value,
|
||||||
|
text: value
|
||||||
|
})
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
if (typeof values[key] !== "undefined") {
|
||||||
|
combo_input.val(values[key]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof recovery_values[key] !== "undefined") {
|
||||||
|
combo_input_recovery.val(recovery_values[key]);
|
||||||
|
}
|
||||||
|
|
||||||
|
combo_input.show();
|
||||||
|
combo_input_recovery.show();
|
||||||
|
break;
|
||||||
|
case "DATE":
|
||||||
|
$(
|
||||||
|
'input.datepicker[type="text"][name=field' +
|
||||||
|
custom_field_key +
|
||||||
|
"_value\\[\\]]"
|
||||||
|
).removeClass("hasDatepicker");
|
||||||
|
$(
|
||||||
|
'input.datepicker[type="text"][name=field' +
|
||||||
|
custom_field_key +
|
||||||
|
"_recovery_value\\[\\]]"
|
||||||
|
).removeClass("hasDatepicker");
|
||||||
|
$(
|
||||||
|
'input.datepicker[type="text"][name=field' +
|
||||||
|
custom_field_key +
|
||||||
|
"_value\\[\\]]"
|
||||||
|
).datepicker("destroy");
|
||||||
|
$(
|
||||||
|
'input.datepicker[type="text"][name=field' +
|
||||||
|
custom_field_key +
|
||||||
|
"_recovery_value\\[\\]]"
|
||||||
|
).datepicker("destroy");
|
||||||
|
$(
|
||||||
|
'input.datepicker[type="text"][name=field' +
|
||||||
|
custom_field_key +
|
||||||
|
"_value\\[\\]]"
|
||||||
|
).show();
|
||||||
|
$(
|
||||||
|
'input.datepicker[type="text"][name=field' +
|
||||||
|
custom_field_key +
|
||||||
|
"_recovery_value\\[\\]]"
|
||||||
|
).show();
|
||||||
|
$(
|
||||||
|
'input.datepicker[type="text"][name=field' +
|
||||||
|
custom_field_key +
|
||||||
|
"_value\\[\\]]"
|
||||||
|
).datepicker({ dateFormat: "<?php echo 'yy-mm-dd 00:00:00'; ?>" });
|
||||||
|
$(
|
||||||
|
'input.datepicker[type="text"][name=field' +
|
||||||
|
custom_field_key +
|
||||||
|
"_recovery_value\\[\\]]"
|
||||||
|
).datepicker({ dateFormat: "<?php echo 'yy-mm-dd 00:00:00'; ?>" });
|
||||||
|
$.datepicker.setDefaults(
|
||||||
|
$.datepicker.regional["<?php echo get_user_language(); ?>"]
|
||||||
|
);
|
||||||
|
|
||||||
|
if (typeof values[key] !== "undefined") {
|
||||||
|
$(
|
||||||
|
'input.datepicker[type="text"][name=field' +
|
||||||
|
custom_field_key +
|
||||||
|
"_value\\[\\]]"
|
||||||
|
).val(values[key]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof recovery_values[key] !== "undefined") {
|
||||||
|
$(
|
||||||
|
'input.datepicker[type="text"][name=field' +
|
||||||
|
custom_field_key +
|
||||||
|
"_recovery_value\\[\\]]"
|
||||||
|
).val(recovery_values[key]);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "NUMERIC":
|
||||||
|
if (typeof values[key] !== "undefined") {
|
||||||
|
$(
|
||||||
|
'input[type="number"][name=field' +
|
||||||
|
custom_field_key +
|
||||||
|
"_value\\[\\]]"
|
||||||
|
).val(values[key]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof recovery_values[key] !== "undefined") {
|
||||||
|
$(
|
||||||
|
'input[type="number"][name=field' +
|
||||||
|
custom_field_key +
|
||||||
|
"_recovery_value\\[\\]]"
|
||||||
|
).val(recovery_values[key]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$(
|
||||||
|
'input[type="number"][name=field' +
|
||||||
|
custom_field_key +
|
||||||
|
"_value\\[\\]]"
|
||||||
|
).show();
|
||||||
|
$(
|
||||||
|
'input[type="number"][name=field' +
|
||||||
|
custom_field_key +
|
||||||
|
"_recovery_value\\[\\]]"
|
||||||
|
).show();
|
||||||
|
break;
|
||||||
|
case "TEXT":
|
||||||
|
if (typeof values[key] !== "undefined") {
|
||||||
|
$(
|
||||||
|
'input.normal[type="text"][name=field' +
|
||||||
|
custom_field_key +
|
||||||
|
"_value\\[\\]]"
|
||||||
|
).val(values[key]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof recovery_values[key] !== "undefined") {
|
||||||
|
$(
|
||||||
|
'input.normal[type="text"][name=field' +
|
||||||
|
custom_field_key +
|
||||||
|
"_recovery_value\\[\\]]"
|
||||||
|
).val(recovery_values[key]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$(
|
||||||
|
'input.normal[type="text"][name=field' +
|
||||||
|
custom_field_key +
|
||||||
|
"_value\\[\\]]"
|
||||||
|
).show();
|
||||||
|
$(
|
||||||
|
'input.normal[type="text"][name=field' +
|
||||||
|
custom_field_key +
|
||||||
|
"_recovery_value\\[\\]]"
|
||||||
|
).show();
|
||||||
|
break;
|
||||||
|
case "TEXTAREA":
|
||||||
|
default:
|
||||||
|
if (typeof values[key] !== "undefined") {
|
||||||
|
$("textarea[name=field" + custom_field_key + "_value\\[\\]]").val(
|
||||||
|
values[key]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof recovery_values[key] !== "undefined") {
|
||||||
|
$(
|
||||||
|
"textarea[name=field" +
|
||||||
|
custom_field_key +
|
||||||
|
"_recovery_value\\[\\]]"
|
||||||
|
).val(recovery_values[key]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$(
|
||||||
|
"textarea[name=field" + custom_field_key + "_value\\[\\]]"
|
||||||
|
).show();
|
||||||
|
$(
|
||||||
|
"textarea[name=field" +
|
||||||
|
custom_field_key +
|
||||||
|
"_recovery_value\\[\\]]"
|
||||||
|
).show();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
"json"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
@ -73,8 +73,40 @@ $(document).ready(function() {
|
|||||||
$("#heatmap-title").html($(title).html());
|
$("#heatmap-title").html($(title).html());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
rescaling();
|
||||||
|
|
||||||
|
$(window).on("resize", function() {
|
||||||
|
rescaling();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function showLabel(element, event, label) {
|
||||||
|
$(".label_heatmap").remove();
|
||||||
|
const tooltip = $(document.createElement("div"));
|
||||||
|
tooltip.html(label);
|
||||||
|
tooltip.attr("class", "label_heatmap");
|
||||||
|
$("#heatmap-group").append(tooltip);
|
||||||
|
var x = event.clientX;
|
||||||
|
var y = event.clientY;
|
||||||
|
tooltip.attr(
|
||||||
|
"style",
|
||||||
|
"position: fixed; top:" + (y + 15) + "px; left:" + (x + 20) + "px;"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function hideLabel() {
|
||||||
|
$(".label_heatmap").remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
function rescaling() {
|
||||||
|
if (window.innerWidth < 1300) {
|
||||||
|
$(".trigger-100").attr("style", "width: 100%;");
|
||||||
|
$(".trigger-100").addClass("br-b");
|
||||||
|
} else {
|
||||||
|
$(".trigger-100").removeAttr("style");
|
||||||
|
$(".trigger-100").removeClass("br-b");
|
||||||
|
}
|
||||||
|
}
|
||||||
function autoRefresh(interval, id, method, php_class) {
|
function autoRefresh(interval, id, method, php_class) {
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@ -92,3 +124,114 @@ function autoRefresh(interval, id, method, php_class) {
|
|||||||
});
|
});
|
||||||
}, interval);
|
}, interval);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function redirectStatus(e, element) {
|
||||||
|
if (element.length > 0) {
|
||||||
|
switch (e.chart.legend.legendItems[element[0].index].text) {
|
||||||
|
case "Critical":
|
||||||
|
window.location.assign(
|
||||||
|
`index.php?sec=view&sec2=operation/agentes/status_monitor&refr=0&ag_group=0&ag_freestring=&module_option=1&ag_modulename=&moduletype=&datatype=&status=1&sort_field=&sort=none&pure=`
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "Warning":
|
||||||
|
window.location.assign(
|
||||||
|
`index.php?sec=view&sec2=operation/agentes/status_monitor&refr=0&ag_group=0&ag_freestring=&module_option=1&ag_modulename=&moduletype=&datatype=&status=2&sort_field=&sort=none&pure=`
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "Unknown":
|
||||||
|
window.location.assign(
|
||||||
|
`index.php?sec=view&sec2=operation/agentes/status_monitor&refr=0&ag_group=0&ag_freestring=&module_option=1&ag_modulename=&moduletype=&datatype=&status=3&sort_field=&sort=none&pure=`
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "Not init":
|
||||||
|
window.location.assign(
|
||||||
|
`index.php?sec=view&sec2=operation/agentes/status_monitor&refr=0&ag_group=0&ag_freestring=&module_option=1&ag_modulename=&moduletype=&datatype=&status=5&sort_field=&sort=none&pure=`
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "Normal":
|
||||||
|
window.location.assign(
|
||||||
|
`index.php?sec=view&sec2=operation/agentes/status_monitor&refr=0&ag_group=0&ag_freestring=&module_option=1&ag_modulename=&moduletype=&datatype=&status=0&sort_field=&sort=none&pure=`
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
window.location.assign(
|
||||||
|
`index.php?sec=view&sec2=operation/agentes/status_monitor&refr=0&ag_group=0&ag_freestring=&module_option=1&ag_modulename=&moduletype=&datatype=&status=-1&sort_field=&sort=none&pure=`
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function redirectHeatmap(view, id, id_agente = 0) {
|
||||||
|
switch (view) {
|
||||||
|
case "group":
|
||||||
|
window.location.assign(
|
||||||
|
`index.php?sec=view&sec2=godmode/groups/tactical&id_group=${id}`
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "agent":
|
||||||
|
window.location.assign(
|
||||||
|
`index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=${id}`
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "module":
|
||||||
|
if (id_agente > 0) {
|
||||||
|
window.location.assign(
|
||||||
|
`index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente=${id_agente}&tab=module&id_agent_module=${id}&edit_module=1`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function redirectAgentStatus(e, element) {
|
||||||
|
if (element.length > 0) {
|
||||||
|
switch (e.chart.legend.legendItems[element[0].index].text) {
|
||||||
|
case "No monitors":
|
||||||
|
window.location.assign(
|
||||||
|
`index.php?sec=view&sec2=operation/agentes/estado_agente`
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "CRITICAL":
|
||||||
|
window.location.assign(
|
||||||
|
`index.php?sec=view&sec2=operation/agentes/estado_agente&status=1`
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "WARNING":
|
||||||
|
window.location.assign(
|
||||||
|
`index.php?sec=view&sec2=operation/agentes/estado_agente&status=2`
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "UKNOWN":
|
||||||
|
window.location.assign(
|
||||||
|
`index.php?sec=view&sec2=operation/agentes/estado_agente&status=3`
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "NORMAL":
|
||||||
|
window.location.assign(
|
||||||
|
`index.php?sec=view&sec2=operation/agentes/estado_agente&status=0`
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
window.location.assign(
|
||||||
|
`index.php?sec=view&sec2=operation/agentes/estado_agente`
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -134,6 +134,9 @@ class SecurityHardening extends Widget
|
|||||||
|
|
||||||
// Includes.
|
// Includes.
|
||||||
include_once ENTERPRISE_DIR.'/include/functions_security_hardening.php';
|
include_once ENTERPRISE_DIR.'/include/functions_security_hardening.php';
|
||||||
|
include_once $config['homedir'].'/include/graphs/fgraph.php';
|
||||||
|
include_once $config['homedir'].'/include/functions_graph.php';
|
||||||
|
|
||||||
// WARNING: Do not edit. This chunk must be in the constructor.
|
// WARNING: Do not edit. This chunk must be in the constructor.
|
||||||
parent::__construct(
|
parent::__construct(
|
||||||
$cellId,
|
$cellId,
|
||||||
@ -1092,7 +1095,6 @@ class SecurityHardening extends Widget
|
|||||||
function selectData(e){
|
function selectData(e){
|
||||||
$(".row_input").hide();
|
$(".row_input").hide();
|
||||||
dataTypes_'.$id.'[e.value].forEach(element => {
|
dataTypes_'.$id.'[e.value].forEach(element => {
|
||||||
console.log(element);
|
|
||||||
$(element).show();
|
$(element).show();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -79,11 +79,17 @@ class Element
|
|||||||
public function __construct(
|
public function __construct(
|
||||||
$ajax_controller='include/ajax/general_tactical_view.ajax'
|
$ajax_controller='include/ajax/general_tactical_view.ajax'
|
||||||
) {
|
) {
|
||||||
|
global $config;
|
||||||
$this->interval = 0;
|
$this->interval = 0;
|
||||||
$this->title = __('Default element');
|
$this->title = __('Default element');
|
||||||
$this->ajaxController = $ajax_controller;
|
$this->ajaxController = $ajax_controller;
|
||||||
// Without ACL.
|
// Without ACL.
|
||||||
$agent = db_get_row('tagente', 'nombre', 'pandora.internals', '*');
|
$agent_name = $config['self_monitoring_agent_name'];
|
||||||
|
if (empty($agent_name) === true) {
|
||||||
|
$agent_name = 'pandora.internals';
|
||||||
|
}
|
||||||
|
|
||||||
|
$agent = db_get_row('tagente', 'nombre', $agent_name, '*');
|
||||||
if (is_array($agent) === true) {
|
if (is_array($agent) === true) {
|
||||||
$this->monitoringAgent = $agent;
|
$this->monitoringAgent = $agent;
|
||||||
}
|
}
|
||||||
|
@ -50,6 +50,22 @@ class GeneralTacticalView
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether general statistics are disabled.
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public function disableGeneralStatistics():bool
|
||||||
|
{
|
||||||
|
global $config;
|
||||||
|
if (users_is_admin($config['id_user']) === true) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return (bool) $config['disable_general_statistics'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiate all the elements that will build the dashboard
|
* Instantiate all the elements that will build the dashboard
|
||||||
*
|
*
|
||||||
@ -109,6 +125,7 @@ class GeneralTacticalView
|
|||||||
{
|
{
|
||||||
$data = [];
|
$data = [];
|
||||||
$data['javascript'] = $this->javascript();
|
$data['javascript'] = $this->javascript();
|
||||||
|
$data['disableGeneralStatistics'] = $this->disableGeneralStatistics();
|
||||||
$data = array_merge($data, $this->elements);
|
$data = array_merge($data, $this->elements);
|
||||||
View::render(
|
View::render(
|
||||||
'tacticalView/view',
|
'tacticalView/view',
|
||||||
|
@ -429,12 +429,29 @@ class Agents extends Element
|
|||||||
'cutout' => 80,
|
'cutout' => 80,
|
||||||
'nodata_image' => ['width' => '80%'],
|
'nodata_image' => ['width' => '80%'],
|
||||||
'colors' => $colors,
|
'colors' => $colors,
|
||||||
|
'onClick' => 'redirectAgentStatus',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// To avoid that if a value is too small it is not seen.
|
||||||
|
$percentages = [];
|
||||||
|
$total = array_sum($data);
|
||||||
|
foreach ($data as $key => $value) {
|
||||||
|
$percentage = (($value / $total) * 100);
|
||||||
|
if ($percentage < 1 && $percentage > 0) {
|
||||||
|
$percentage = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$percentages[$key] = format_numeric($percentage, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = $percentages;
|
||||||
|
|
||||||
$pie = ring_graph($data, $options);
|
$pie = ring_graph($data, $options);
|
||||||
$output = html_print_div(
|
$output = html_print_div(
|
||||||
[
|
[
|
||||||
'content' => $pie,
|
'content' => $pie,
|
||||||
'style' => 'margin: 0 auto; max-width: 80%; max-height: 220px;',
|
'style' => 'margin: 0 auto; max-width: 80%; max-height: 220px;',
|
||||||
|
'class' => 'clickable',
|
||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
@ -83,7 +83,7 @@ class Alerts extends Element
|
|||||||
*/
|
*/
|
||||||
public function getActiveAlerts():string
|
public function getActiveAlerts():string
|
||||||
{
|
{
|
||||||
$total = alerts_get_alerts(0, '', 'all', -1, 'AR', true);
|
$total = alerts_get_alerts(0, '', 'all', -1, 'AR', true, 0, true);
|
||||||
return html_print_div(
|
return html_print_div(
|
||||||
[
|
[
|
||||||
'content' => format_numeric($total, 0),
|
'content' => format_numeric($total, 0),
|
||||||
|
@ -34,7 +34,9 @@ class Database extends Element
|
|||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
global $config;
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
include_once $config['homedir'].'/include/graphs/fgraph.php';
|
||||||
$this->title = __('Database');
|
$this->title = __('Database');
|
||||||
$this->ajaxMethods = [
|
$this->ajaxMethods = [
|
||||||
'getStatus',
|
'getStatus',
|
||||||
|
@ -57,23 +57,13 @@ class Events extends Element
|
|||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
$id_groups = array_keys(users_get_groups($config['id_user'], 'AR', false));
|
$id_groups = array_keys(users_get_groups($config['id_user'], 'AR', false));
|
||||||
if (in_array(0, $id_groups) === false) {
|
|
||||||
foreach ($id_groups as $key => $id_group) {
|
|
||||||
if ((bool) check_acl_restricted_all($config['id_user'], $id_group, 'AR') === false) {
|
|
||||||
unset($id_groups[$key]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (users_can_manage_group_all() === true) {
|
|
||||||
$id_groups[] = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
$id_groups = implode(',', $id_groups);
|
$id_groups = implode(',', $id_groups);
|
||||||
$event_view_h = (int) ($config['event_view_hr'] > 24) ? 24 : $config['event_view_hr'];
|
$event_view_h = (int) ($config['event_view_hr'] > 24) ? 24 : $config['event_view_hr'];
|
||||||
$time_events = ($event_view_h * 3600);
|
$time_events = ($event_view_h * 3600);
|
||||||
$intervalh = (time() - $time_events);
|
$intervalh = (time() - $time_events);
|
||||||
$sql = 'SELECT utimestamp from tevento WHERE utimestamp >= '.$intervalh.' ORDER BY utimestamp DESC;';
|
$sql = 'SELECT utimestamp
|
||||||
|
FROM tevento
|
||||||
|
WHERE utimestamp >= '.$intervalh.' AND id_grupo IN ('.$id_groups.') ORDER BY utimestamp DESC;';
|
||||||
$rows = db_process_sql($sql);
|
$rows = db_process_sql($sql);
|
||||||
$cut_seconds = ($time_events / 24);
|
$cut_seconds = ($time_events / 24);
|
||||||
$now = (time() - 300);
|
$now = (time() - 300);
|
||||||
@ -377,6 +367,13 @@ class Events extends Element
|
|||||||
$data = [];
|
$data = [];
|
||||||
$colors = [];
|
$colors = [];
|
||||||
foreach ($rows as $key => $row) {
|
foreach ($rows as $key => $row) {
|
||||||
|
if ($row['criticity'] != EVENT_CRIT_CRITICAL
|
||||||
|
&& $row['criticity'] != EVENT_CRIT_NORMAL
|
||||||
|
&& $row['criticity'] != EVENT_CRIT_WARNING
|
||||||
|
) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
switch ($row['criticity']) {
|
switch ($row['criticity']) {
|
||||||
case EVENT_CRIT_CRITICAL:
|
case EVENT_CRIT_CRITICAL:
|
||||||
$label = __('CRITICAL');
|
$label = __('CRITICAL');
|
||||||
@ -394,9 +391,7 @@ class Events extends Element
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$colors[] = COL_UNKNOWN;
|
continue;
|
||||||
$label = __('UNKNOWN');
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$labels[] = $this->controlSizeText($label);
|
$labels[] = $this->controlSizeText($label);
|
||||||
@ -410,6 +405,21 @@ class Events extends Element
|
|||||||
'nodata_image' => ['width' => '100%'],
|
'nodata_image' => ['width' => '100%'],
|
||||||
'colors' => $colors,
|
'colors' => $colors,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// To avoid that if a value is too small it is not seen.
|
||||||
|
$percentages = [];
|
||||||
|
$total = array_sum($data);
|
||||||
|
foreach ($data as $key => $value) {
|
||||||
|
$percentage = (($value / $total) * 100);
|
||||||
|
if ($percentage < 1 && $percentage > 0) {
|
||||||
|
$percentage = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$percentages[$key] = format_numeric($percentage, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = $percentages;
|
||||||
|
|
||||||
$pie = ring_graph($data, $options);
|
$pie = ring_graph($data, $options);
|
||||||
$output = html_print_div(
|
$output = html_print_div(
|
||||||
[
|
[
|
||||||
@ -448,9 +458,10 @@ class Events extends Element
|
|||||||
'style' => 'width: 90%;',
|
'style' => 'width: 90%;',
|
||||||
'ajax_url' => 'operation/events/events',
|
'ajax_url' => 'operation/events/events',
|
||||||
'ajax_data' => [
|
'ajax_data' => [
|
||||||
'get_events' => 1,
|
'get_events' => 1,
|
||||||
'compact_date' => 1,
|
'compact_date' => 1,
|
||||||
'external_url' => 1,
|
'external_url' => 1,
|
||||||
|
'compact_name_event' => 1,
|
||||||
],
|
],
|
||||||
'order' => [
|
'order' => [
|
||||||
'field' => 'timestamp',
|
'field' => 'timestamp',
|
||||||
|
@ -118,7 +118,6 @@ class Groups extends Element
|
|||||||
return graph_nodata_image(['width' => '400']);
|
return graph_nodata_image(['width' => '400']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$groups = $modules;
|
|
||||||
// Best square.
|
// Best square.
|
||||||
$high = (float) max($width, $height);
|
$high = (float) max($width, $height);
|
||||||
$low = 0.0;
|
$low = 0.0;
|
||||||
@ -147,13 +146,18 @@ class Groups extends Element
|
|||||||
$x = 0;
|
$x = 0;
|
||||||
$y = 0;
|
$y = 0;
|
||||||
$cont = 1;
|
$cont = 1;
|
||||||
foreach ($groups as $key => $value) {
|
foreach ($modules as $key => $value) {
|
||||||
$module_id = $value['id_agente_modulo'];
|
$module_id = $value['id_agente_modulo'];
|
||||||
$db_status = modules_get_agentmodule_status($module_id);
|
$module_status = db_get_row(
|
||||||
|
'tagente_estado',
|
||||||
|
'id_agente_modulo',
|
||||||
|
$module_id,
|
||||||
|
);
|
||||||
|
|
||||||
$module_value = modules_get_last_value($module_id);
|
$module_value = modules_get_last_value($module_id);
|
||||||
$status = '';
|
$status = '';
|
||||||
$title = '';
|
$title = '';
|
||||||
modules_get_status($module_id, $db_status, $module_value, $status, $title);
|
modules_get_status($module_id, $module_status['estado'], $module_value, $status, $title);
|
||||||
switch ($status) {
|
switch ($status) {
|
||||||
case STATUS_MODULE_NO_DATA:
|
case STATUS_MODULE_NO_DATA:
|
||||||
// Not init status.
|
// Not init status.
|
||||||
@ -183,10 +187,16 @@ class Groups extends Element
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$redirect = '';
|
||||||
|
if (check_acl($config['id_user'], 0, 'AW')) {
|
||||||
|
$redirect = 'onclick="redirectHeatmap(\'module\', '.$module_id.', '.$value['id_agente'].')"';
|
||||||
|
}
|
||||||
|
|
||||||
$heatmap .= sprintf(
|
$heatmap .= sprintf(
|
||||||
'<rect id="%s" x="%s" style="stroke-width:1;stroke:#ffffff" y="%s" row="%s" rx="3" ry="3" col="%s" width="%s" height="%s" class="scuare-status %s_%s"></rect>',
|
'<rect id="%s" x="%s" onmousemove="showLabel(this, event, \'%s\')" onmouseleave="hideLabel()" '.$redirect.' style="stroke-width:1;stroke:#ffffff" y="%s" row="%s" rx="3" ry="3" col="%s" width="%s" height="%s" class="scuare-status %s_%s"></rect>',
|
||||||
'rect_'.$cont,
|
'rect_'.$cont,
|
||||||
$x,
|
$x,
|
||||||
|
$value['nombre'],
|
||||||
$y,
|
$y,
|
||||||
$row,
|
$row,
|
||||||
$column,
|
$column,
|
||||||
@ -350,9 +360,10 @@ class Groups extends Element
|
|||||||
}
|
}
|
||||||
|
|
||||||
$heatmap .= sprintf(
|
$heatmap .= sprintf(
|
||||||
'<rect id="%s" x="%s" style="stroke-width:1;stroke:#ffffff" y="%s" row="%s" rx="3" ry="3" col="%s" width="%s" height="%s" class="scuare-status %s_%s"></rect>',
|
'<rect id="%s" x="%s" onmousemove="showLabel(this, event, \'%s\')" onmouseleave="hideLabel()" onclick="redirectHeatmap(\'agent\', '.$value['id_agente'].')" style="stroke-width:1;stroke:#ffffff" y="%s" row="%s" rx="3" ry="3" col="%s" width="%s" height="%s" class="scuare-status %s_%s"></rect>',
|
||||||
'rect_'.$cont,
|
'rect_'.$cont,
|
||||||
$x,
|
$x,
|
||||||
|
$value['alias'],
|
||||||
$y,
|
$y,
|
||||||
$row,
|
$row,
|
||||||
$column,
|
$column,
|
||||||
@ -490,9 +501,10 @@ class Groups extends Element
|
|||||||
}
|
}
|
||||||
|
|
||||||
$heatmap .= sprintf(
|
$heatmap .= sprintf(
|
||||||
'<rect id="%s" x="%s" style="stroke-width:1;stroke:#ffffff" y="%s" row="%s" rx="3" ry="3" col="%s" width="%s" height="%s" class="scuare-status %s_%s"></rect>',
|
'<rect id="%s" x="%s" onmousemove="showLabel(this, event, \'%s\')" onmouseleave="hideLabel()" onclick="redirectHeatmap(\'group\', '.$value['_id_'].')" style="stroke-width:1;stroke:#ffffff" y="%s" row="%s" rx="3" ry="3" col="%s" width="%s" height="%s" class="scuare-status %s_%s"></rect>',
|
||||||
'rect_'.$cont,
|
'rect_'.$cont,
|
||||||
$x,
|
$x,
|
||||||
|
$value['_name_'],
|
||||||
$y,
|
$y,
|
||||||
$row,
|
$row,
|
||||||
$column,
|
$column,
|
||||||
|
@ -75,7 +75,10 @@ class MonitoringElements extends Element
|
|||||||
'display' => false,
|
'display' => false,
|
||||||
],
|
],
|
||||||
'cutout' => 80,
|
'cutout' => 80,
|
||||||
'nodata_image' => ['width' => '100%'],
|
'nodata_image' => [
|
||||||
|
'width' => '100%',
|
||||||
|
'height' => '90%',
|
||||||
|
],
|
||||||
];
|
];
|
||||||
$pie = ring_graph($data, $options);
|
$pie = ring_graph($data, $options);
|
||||||
$output = html_print_div(
|
$output = html_print_div(
|
||||||
@ -139,7 +142,10 @@ class MonitoringElements extends Element
|
|||||||
'display' => false,
|
'display' => false,
|
||||||
],
|
],
|
||||||
'cutout' => 80,
|
'cutout' => 80,
|
||||||
'nodata_image' => ['width' => '100%'],
|
'nodata_image' => [
|
||||||
|
'width' => '100%',
|
||||||
|
'height' => '90%',
|
||||||
|
],
|
||||||
];
|
];
|
||||||
$pie = ring_graph($data, $options);
|
$pie = ring_graph($data, $options);
|
||||||
$output = html_print_div(
|
$output = html_print_div(
|
||||||
@ -208,7 +214,10 @@ class MonitoringElements extends Element
|
|||||||
'display' => false,
|
'display' => false,
|
||||||
],
|
],
|
||||||
'cutout' => 80,
|
'cutout' => 80,
|
||||||
'nodata_image' => ['width' => '100%'],
|
'nodata_image' => [
|
||||||
|
'width' => '100%',
|
||||||
|
'height' => '90%',
|
||||||
|
],
|
||||||
];
|
];
|
||||||
$pie = ring_graph($data, $options);
|
$pie = ring_graph($data, $options);
|
||||||
$output = html_print_div(
|
$output = html_print_div(
|
||||||
@ -230,11 +239,12 @@ class MonitoringElements extends Element
|
|||||||
*/
|
*/
|
||||||
public function getMonitoringStatusGraph():string
|
public function getMonitoringStatusGraph():string
|
||||||
{
|
{
|
||||||
$pie = graph_agent_status(false, '', '', true, true, false, true);
|
$pie = graph_agent_status(false, '', '', true, true, false, true, 'redirectStatus', true);
|
||||||
$output = html_print_div(
|
$output = html_print_div(
|
||||||
[
|
[
|
||||||
'content' => $pie,
|
'content' => $pie,
|
||||||
'style' => 'margin: 0 auto; max-width: 80%; max-height: 220px;',
|
'style' => 'margin: 0 auto; max-width: 80%; max-height: 220px;',
|
||||||
|
'class' => 'clickable',
|
||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
@ -36,6 +36,7 @@ class Overview extends Element
|
|||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
include_once $config['homedir'].'/include/graphs/fgraph.php';
|
||||||
if (is_ajax() === true) {
|
if (is_ajax() === true) {
|
||||||
include_once $config['homedir'].'/include/functions_servers.php';
|
include_once $config['homedir'].'/include/functions_servers.php';
|
||||||
}
|
}
|
||||||
@ -163,6 +164,9 @@ class Overview extends Element
|
|||||||
if ($info['limit'] > $info['count']) {
|
if ($info['limit'] > $info['count']) {
|
||||||
$used = round(($info['count'] / $info['limit']) * 100);
|
$used = round(($info['count'] / $info['limit']) * 100);
|
||||||
$free = (100 - $used);
|
$free = (100 - $used);
|
||||||
|
} else if ($info['limit'] <= $info['count']) {
|
||||||
|
$free = 0;
|
||||||
|
$used = 100;
|
||||||
} else {
|
} else {
|
||||||
$free = 100;
|
$free = 100;
|
||||||
$used = 0;
|
$used = 0;
|
||||||
|
@ -470,37 +470,6 @@ div.multi-response-buttons {
|
|||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
.main_menu_icon_event {
|
|
||||||
height: 20px;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
.event_module_background_state {
|
|
||||||
mask: url(../../images/modules@svg.svg) no-repeat center / contain;
|
|
||||||
-webkit-mask: url(../../images/modules@svg.svg) no-repeat center / contain;
|
|
||||||
}
|
|
||||||
|
|
||||||
.alert_module_background_state {
|
|
||||||
mask: url(../../images/alert@svg.svg) no-repeat center / contain;
|
|
||||||
-webkit-mask: url(../../images/alert@svg.svg) no-repeat center / contain;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon_background_critical {
|
|
||||||
background-color: #e63c52;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon_background_warning {
|
|
||||||
background-color: #fcab10;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon_background_normal {
|
|
||||||
background-color: #82b92e;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon_background_unknown {
|
|
||||||
background-color: gray;
|
|
||||||
}
|
|
||||||
|
|
||||||
.events-refr {
|
.events-refr {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -23,11 +23,12 @@
|
|||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
}
|
}
|
||||||
.col-12 {
|
.col-12 {
|
||||||
width: 100%;
|
width: 99%;
|
||||||
}
|
}
|
||||||
.col-6,
|
.col-6,
|
||||||
.col-xl-6 {
|
.col-xl-6 {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@ -58,6 +59,9 @@
|
|||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: flex-start;
|
||||||
}
|
}
|
||||||
.br-l {
|
.br-l {
|
||||||
border-left: 1px solid #e5e9ed;
|
border-left: 1px solid #e5e9ed;
|
||||||
@ -325,6 +329,22 @@ table.dataTable thead th {
|
|||||||
background-color: #ec7176;
|
background-color: #ec7176;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#svg rect {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.trigger-100 {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.label_heatmap {
|
||||||
|
position: absolute;
|
||||||
|
background-color: #757575;
|
||||||
|
color: white;
|
||||||
|
padding: 2px 5px;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 1636px) {
|
@media (max-width: 1636px) {
|
||||||
.col-xl-6 {
|
.col-xl-6 {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -344,9 +364,7 @@ table.dataTable thead th {
|
|||||||
.col-7 {
|
.col-7 {
|
||||||
width: 56%;
|
width: 56%;
|
||||||
}
|
}
|
||||||
.col-5 {
|
|
||||||
width: 41%;
|
|
||||||
}
|
|
||||||
.flex-nowrap {
|
.flex-nowrap {
|
||||||
flex-wrap: nowrap !important;
|
flex-wrap: nowrap !important;
|
||||||
}
|
}
|
||||||
|
@ -10356,7 +10356,7 @@ select:focus {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.dataTables_length > label {
|
.dataTables_length > label {
|
||||||
color: #fff;
|
color: #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="button"],
|
input[type="button"],
|
||||||
@ -12769,12 +12769,6 @@ div.agents_custom_fields #datatables_wrapper div.bottom {
|
|||||||
justify-content: flex-start !important;
|
justify-content: flex-start !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dt-buttons {
|
|
||||||
width: auto;
|
|
||||||
position: absolute;
|
|
||||||
margin-left: 90px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title_tactical {
|
.title_tactical {
|
||||||
padding: 10px 0px 10px 0px;
|
padding: 10px 0px 10px 0px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -369,8 +369,6 @@ a.pandora_pagination.current:hover {
|
|||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
height: 38px;
|
height: 38px;
|
||||||
width: 80px;
|
width: 80px;
|
||||||
margin-left: 90px;
|
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
160
pandora_console/include/styles/vulnerabilities.css
Normal file
160
pandora_console/include/styles/vulnerabilities.css
Normal file
@ -0,0 +1,160 @@
|
|||||||
|
.details_table b {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
.details_table {
|
||||||
|
width: 99% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_length {
|
||||||
|
margin: 10px 0px 20px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-filter {
|
||||||
|
width: 95%;
|
||||||
|
margin: 21px auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-filter label {
|
||||||
|
font-size: 13px !important;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_paginate.paging_simple_numbers {
|
||||||
|
margin: 10px 20px 20px 0px;
|
||||||
|
margin-right: 20px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.row-graphs {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
max-width: 90%;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-md-3 {
|
||||||
|
width: 30%;
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-md-6 {
|
||||||
|
width: 35%;
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-md-1 {
|
||||||
|
width: 15%;
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-md-2 {
|
||||||
|
width: 30%;
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-md-7 {
|
||||||
|
width: 40%;
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-md-9 {
|
||||||
|
width: 63%;
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pdd_b_40px {
|
||||||
|
padding-bottom: 40px !important;
|
||||||
|
}
|
||||||
|
#reach-metrics {
|
||||||
|
margin-bottom: 45px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#reach-metrics .row-graphs {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#score-bar {
|
||||||
|
max-width: 85%;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
#bar {
|
||||||
|
height: 100%;
|
||||||
|
animation: load 2s;
|
||||||
|
}
|
||||||
|
.marks {
|
||||||
|
color: #9f9f9f;
|
||||||
|
}
|
||||||
|
.title {
|
||||||
|
font-size: 19px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #3f3f3f;
|
||||||
|
}
|
||||||
|
.score {
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 24px;
|
||||||
|
color: #3f3f3f;
|
||||||
|
}
|
||||||
|
.message {
|
||||||
|
color: #0000008c;
|
||||||
|
}
|
||||||
|
.status {
|
||||||
|
font-size: 15px;
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
.marks {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.labels-bar {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 0px 8px;
|
||||||
|
}
|
||||||
|
.date {
|
||||||
|
font-weight: 400;
|
||||||
|
color: #0000008c;
|
||||||
|
margin-left: 13px;
|
||||||
|
}
|
||||||
|
.dt-buttons {
|
||||||
|
display: flex;
|
||||||
|
margin: 10px;
|
||||||
|
margin-left: 0px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.dt-buttons button {
|
||||||
|
margin-left: 0px !important;
|
||||||
|
}
|
||||||
|
#content-bar {
|
||||||
|
border: 1px solid #d7d7d7;
|
||||||
|
width: 100%;
|
||||||
|
height: 30px;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1500px) {
|
||||||
|
.col-md-3 {
|
||||||
|
width: 40%;
|
||||||
|
}
|
||||||
|
.col-md-1 {
|
||||||
|
width: 20%;
|
||||||
|
}
|
||||||
|
.col-md-2 {
|
||||||
|
width: 45%;
|
||||||
|
}
|
||||||
|
.col-md-6 {
|
||||||
|
width: 88%;
|
||||||
|
}
|
||||||
|
.col-md-7 {
|
||||||
|
width: 80%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes load {
|
||||||
|
from {
|
||||||
|
width: 0%;
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
@ -131,7 +131,7 @@
|
|||||||
<div style='padding-bottom: 50px'>
|
<div style='padding-bottom: 50px'>
|
||||||
<?php
|
<?php
|
||||||
$version = '7.0NG.774';
|
$version = '7.0NG.774';
|
||||||
$build = '231102';
|
$build = '231116';
|
||||||
$banner = "v$version Build $build";
|
$banner = "v$version Build $build";
|
||||||
error_reporting(0);
|
error_reporting(0);
|
||||||
|
|
||||||
|
@ -56,8 +56,18 @@ function validateAlert($ids)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function printFormFilterAlert($id_group, $filter, $free_search, $url, $filter_standby=false, $tag_filter=false, $action_filter=false, $return=false, $strict_user=false, $access='AR')
|
function printFormFilterAlert(
|
||||||
{
|
$id_group,
|
||||||
|
$filter,
|
||||||
|
$free_search,
|
||||||
|
$alert_agent_view,
|
||||||
|
$filter_standby=false,
|
||||||
|
$tag_filter=false,
|
||||||
|
$action_filter=false,
|
||||||
|
$return=false,
|
||||||
|
$strict_user=false,
|
||||||
|
$access='AR'
|
||||||
|
) {
|
||||||
global $config;
|
global $config;
|
||||||
include_once $config['homedir'].'/include/functions_tags.php';
|
include_once $config['homedir'].'/include/functions_tags.php';
|
||||||
|
|
||||||
@ -69,29 +79,32 @@ function printFormFilterAlert($id_group, $filter, $free_search, $url, $filter_st
|
|||||||
$table->size[1] = '33%';
|
$table->size[1] = '33%';
|
||||||
$table->size[2] = '33%';
|
$table->size[2] = '33%';
|
||||||
$table->data = [];
|
$table->data = [];
|
||||||
$table->data[0][0] = html_print_label_input_block(
|
|
||||||
__('Group'),
|
if ($alert_agent_view === false) {
|
||||||
html_print_select_groups(
|
$table->data[0][0] = html_print_label_input_block(
|
||||||
$config['id_user'],
|
__('Group'),
|
||||||
$access,
|
html_print_select_groups(
|
||||||
true,
|
$config['id_user'],
|
||||||
'ag_group',
|
$access,
|
||||||
$id_group,
|
true,
|
||||||
'',
|
'ag_group',
|
||||||
'',
|
$id_group,
|
||||||
'',
|
'',
|
||||||
true,
|
'',
|
||||||
false,
|
'',
|
||||||
false,
|
true,
|
||||||
'',
|
false,
|
||||||
false,
|
false,
|
||||||
'',
|
'',
|
||||||
false,
|
false,
|
||||||
false,
|
'',
|
||||||
'id_grupo',
|
false,
|
||||||
$strict_user
|
false,
|
||||||
)
|
'id_grupo',
|
||||||
);
|
$strict_user
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$alert_status_filter = [];
|
$alert_status_filter = [];
|
||||||
$alert_status_filter['all_enabled'] = __('All (Enabled)');
|
$alert_status_filter['all_enabled'] = __('All (Enabled)');
|
||||||
@ -200,45 +213,3 @@ function printFormFilterAlert($id_group, $filter, $free_search, $url, $filter_st
|
|||||||
echo $data;
|
echo $data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function printFormFilterAlertAgent($agent_view_page, $free_search, $id_agent, $return=false)
|
|
||||||
{
|
|
||||||
$table_filter = new stdClass();
|
|
||||||
$table_filter->width = '100%';
|
|
||||||
|
|
||||||
if ($agent_view_page === true) {
|
|
||||||
$table_filter->class = 'info_table';
|
|
||||||
$table_filter->styleTable = 'border-radius: 0;padding: 0;margin: 0;';
|
|
||||||
$free_search_name = 'free_search_alert';
|
|
||||||
} else {
|
|
||||||
$table_filter->class = 'databox filters';
|
|
||||||
$free_search_name = 'free_search';
|
|
||||||
}
|
|
||||||
|
|
||||||
$table_filter->style = [];
|
|
||||||
$table_filter->style[0] = 'font-weight: bold';
|
|
||||||
$table_filter->data = [];
|
|
||||||
|
|
||||||
$table_filter->data[0][0] = __('Free text for search (*):').ui_print_help_tip(
|
|
||||||
__('Filter by module name, template name or action name'),
|
|
||||||
true
|
|
||||||
);
|
|
||||||
|
|
||||||
$table_filter->data[0][0] .= '<span class="mrgn_lft_10px">'.html_print_input_text(
|
|
||||||
$free_search_name,
|
|
||||||
$free_search,
|
|
||||||
'',
|
|
||||||
20,
|
|
||||||
100,
|
|
||||||
true
|
|
||||||
).'</span>';
|
|
||||||
|
|
||||||
$form = html_print_table($table_filter, true);
|
|
||||||
|
|
||||||
if ($return === true) {
|
|
||||||
return $form;
|
|
||||||
} else {
|
|
||||||
echo $form;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -405,6 +405,12 @@ if ($agent_view_page === true) {
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
$tab = get_parameter('tab', 'main');
|
||||||
|
$alert_agent_view = false;
|
||||||
|
if ($tab == 'alert') {
|
||||||
|
$alert_agent_view = true;
|
||||||
|
}
|
||||||
|
|
||||||
ui_print_datatable(
|
ui_print_datatable(
|
||||||
[
|
[
|
||||||
'id' => 'alerts_status_datatable',
|
'id' => 'alerts_status_datatable',
|
||||||
@ -433,7 +439,7 @@ if ($agent_view_page === true) {
|
|||||||
$id_group,
|
$id_group,
|
||||||
$disabled,
|
$disabled,
|
||||||
$free_search,
|
$free_search,
|
||||||
$url,
|
$alert_agent_view,
|
||||||
$filter_standby,
|
$filter_standby,
|
||||||
$tag_filter,
|
$tag_filter,
|
||||||
true,
|
true,
|
||||||
@ -441,7 +447,7 @@ if ($agent_view_page === true) {
|
|||||||
$strict_user
|
$strict_user
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
'start_disabled' => true,
|
'start_disabled' => !$alert_agent_view,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,8 @@ global $config;
|
|||||||
// Login check.
|
// Login check.
|
||||||
check_login();
|
check_login();
|
||||||
|
|
||||||
|
enterprise_include('include/functions_elasticsearch.php');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
@ -62,30 +64,26 @@ $table->style['source'] = 'width: 80%;';
|
|||||||
|
|
||||||
$table->data = [];
|
$table->data = [];
|
||||||
|
|
||||||
|
$sources = get_sources_by_agent($agent_id);
|
||||||
|
|
||||||
$row = [];
|
$row = [];
|
||||||
|
if (empty($sources) === false) {
|
||||||
|
foreach ($sources as $key => $source) {
|
||||||
// Get most recent sources for active agent.
|
$row['source'] = $source;
|
||||||
$sql = "select source, MAX(utimestamp) AS last_contact from tagent_module_log where id_agent=$agent_id GROUP BY source";
|
$row['review'] = '<a href="javascript:void(0)">'.html_print_image('images/zoom.png', true, ['title' => __('Review in log viewer'), 'alt' => '', 'onclick' => "send_form('".$source."')"]).'</a>';
|
||||||
|
$row['last_contact'] = html_print_image(
|
||||||
$logs = mysql_db_get_all_rows_sql($sql);
|
'images/spinner.gif',
|
||||||
|
true,
|
||||||
foreach ($logs as $log) {
|
[
|
||||||
$row['source'] = $log['source'];
|
'id' => 'img-'.$source,
|
||||||
$row['review'] = '<a href="javascript:void(0)">'.html_print_image('images/zoom.png', true, ['title' => __('Review in log viewer'), 'alt' => '', 'onclick' => "send_form('".$log['source'].'-'.$agent_id."')"]).'</a>';
|
'border' => '0',
|
||||||
$row['last_contact'] = html_print_image(
|
'width' => '20px',
|
||||||
'images/spinner.gif',
|
'heigth' => '20px',
|
||||||
true,
|
'onload' => "get_last_contact('".$source."', '".$agent_id."')",
|
||||||
[
|
]
|
||||||
'id' => 'img-'.$log['source'],
|
);
|
||||||
'border' => '0',
|
$table->data[$source] = $row;
|
||||||
'width' => '20px',
|
}
|
||||||
'heigth' => '20px',
|
|
||||||
'onload' => "get_last_contact('".$log['source']."', '".$agent_id."')",
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
$table->data[$log['source']] = $row;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
@ -45,6 +45,7 @@ ui_require_css_file('agent_view');
|
|||||||
|
|
||||||
enterprise_include_once('operation/agentes/ver_agente.php');
|
enterprise_include_once('operation/agentes/ver_agente.php');
|
||||||
enterprise_include_once('include/functions_security_hardening.php');
|
enterprise_include_once('include/functions_security_hardening.php');
|
||||||
|
enterprise_include_once('include/functions_vulnerabilities.php');
|
||||||
|
|
||||||
check_login();
|
check_login();
|
||||||
if (is_ajax()) {
|
if (is_ajax()) {
|
||||||
@ -1858,7 +1859,6 @@ $external_tools['text'] = html_print_menu_button(
|
|||||||
$external_tools['active'] = ($tab === 'external_tools');
|
$external_tools['active'] = ($tab === 'external_tools');
|
||||||
|
|
||||||
if (enterprise_installed() === true && security_hardening_installed() === true) {
|
if (enterprise_installed() === true && security_hardening_installed() === true) {
|
||||||
// External Tools tab.
|
|
||||||
$security_hardening['text'] = html_print_menu_button(
|
$security_hardening['text'] = html_print_menu_button(
|
||||||
[
|
[
|
||||||
'href' => 'index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=security_hardening&id_agente='.$id_agente,
|
'href' => 'index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=security_hardening&id_agente='.$id_agente,
|
||||||
@ -1871,6 +1871,26 @@ if (enterprise_installed() === true && security_hardening_installed() === true)
|
|||||||
$security_hardening['active'] = ($tab === 'security_hardening');
|
$security_hardening['active'] = ($tab === 'security_hardening');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (function_exists('vulnerabilities_last_scan_agent') === true) {
|
||||||
|
if (enterprise_installed() === true
|
||||||
|
&& (int) $agent['vul_scan_enabled'] !== 0
|
||||||
|
&& ((int) $agent['vul_scan_enabled'] === 1 || (int) $config['agent_vulnerabilities'] === 1)
|
||||||
|
&& vulnerabilities_last_scan_agent($id_agente) !== 0
|
||||||
|
) {
|
||||||
|
$vulnerabilities['text'] = html_print_menu_button(
|
||||||
|
[
|
||||||
|
'href' => 'index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=vulnerabilities&id_agente='.$id_agente,
|
||||||
|
'image' => 'images/vulnerability_scan@svg.svg',
|
||||||
|
'title' => __('Vulnerabilities'),
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
|
$vulnerabilities['active'] = ($tab === 'vulnerabilities');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$onheader = [
|
$onheader = [
|
||||||
'manage' => ($managetab ?? null),
|
'manage' => ($managetab ?? null),
|
||||||
'main' => ($maintab ?? null),
|
'main' => ($maintab ?? null),
|
||||||
@ -1889,6 +1909,7 @@ $onheader = [
|
|||||||
'ncm_view' => ($ncm_tab ?? null),
|
'ncm_view' => ($ncm_tab ?? null),
|
||||||
'external_tools' => ($external_tools ?? null),
|
'external_tools' => ($external_tools ?? null),
|
||||||
'security_hardening' => ($security_hardening ?? null),
|
'security_hardening' => ($security_hardening ?? null),
|
||||||
|
'vulnerabilities' => ($vulnerabilities ?? null),
|
||||||
'incident' => ($incidenttab ?? null),
|
'incident' => ($incidenttab ?? null),
|
||||||
'omnishell' => ($omnishellTab ?? null),
|
'omnishell' => ($omnishellTab ?? null),
|
||||||
];
|
];
|
||||||
@ -2073,6 +2094,10 @@ switch ($tab) {
|
|||||||
$tab_name = __('Security hardening');
|
$tab_name = __('Security hardening');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'vulnerabilities':
|
||||||
|
$tab_name = __('Vulnerabilities');
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$tab_name = '';
|
$tab_name = '';
|
||||||
$help_header = '';
|
$help_header = '';
|
||||||
@ -2222,6 +2247,10 @@ switch ($tab) {
|
|||||||
enterprise_include('operation/agentes/security_hardening.php');
|
enterprise_include('operation/agentes/security_hardening.php');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'vulnerabilities':
|
||||||
|
enterprise_include('operation/agentes/vulnerabilities.php');
|
||||||
|
break;
|
||||||
|
|
||||||
case 'extension':
|
case 'extension':
|
||||||
$found = false;
|
$found = false;
|
||||||
foreach ($config['extensions'] as $extension) {
|
foreach ($config['extensions'] as $extension) {
|
||||||
|
@ -342,6 +342,7 @@ if (is_ajax() === true) {
|
|||||||
$table_id = get_parameter('table_id', '');
|
$table_id = get_parameter('table_id', '');
|
||||||
$groupRecursion = (bool) get_parameter('groupRecursion', false);
|
$groupRecursion = (bool) get_parameter('groupRecursion', false);
|
||||||
$compact_date = (int) get_parameter('compact_date', 0);
|
$compact_date = (int) get_parameter('compact_date', 0);
|
||||||
|
$compact_name_event = (int) get_parameter('compact_name_event', 0);
|
||||||
|
|
||||||
// Datatables offset, limit.
|
// Datatables offset, limit.
|
||||||
$start = (int) get_parameter('start', 0);
|
$start = (int) get_parameter('start', 0);
|
||||||
@ -471,7 +472,7 @@ if (is_ajax() === true) {
|
|||||||
|
|
||||||
$data = array_reduce(
|
$data = array_reduce(
|
||||||
$events,
|
$events,
|
||||||
function ($carry, $item) use ($table_id, &$redirection_form_id, $filter, $compact_date, $external_url) {
|
function ($carry, $item) use ($table_id, &$redirection_form_id, $filter, $compact_date, $external_url, $compact_name_event) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
$tmp = (object) $item;
|
$tmp = (object) $item;
|
||||||
@ -518,7 +519,7 @@ if (is_ajax() === true) {
|
|||||||
|
|
||||||
$tmp->evento = ui_print_truncate_text(
|
$tmp->evento = ui_print_truncate_text(
|
||||||
$tmp->evento,
|
$tmp->evento,
|
||||||
'description',
|
(empty($compact_name_event) === true) ? 'description' : GENERIC_SIZE_TEXT,
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.774
|
%define version 7.0NG.774
|
||||||
%define release 1
|
%define release 231116
|
||||||
|
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.774
|
%define version 7.0NG.774
|
||||||
%define release 1
|
%define release 231116
|
||||||
|
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.774
|
%define version 7.0NG.774
|
||||||
%define release 1
|
%define release 231116
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name apache2
|
%define httpd_name apache2
|
||||||
|
@ -91,6 +91,7 @@ CREATE TABLE IF NOT EXISTS `tagente` (
|
|||||||
`satellite_server` INT NOT NULL DEFAULT 0,
|
`satellite_server` INT NOT NULL DEFAULT 0,
|
||||||
`fixed_ip` TINYINT NOT NULL DEFAULT 0,
|
`fixed_ip` TINYINT NOT NULL DEFAULT 0,
|
||||||
`disabled_by_downtime` TINYINT NOT NULL DEFAULT 0,
|
`disabled_by_downtime` TINYINT NOT NULL DEFAULT 0,
|
||||||
|
`vul_scan_enabled` TINYINT NOT NULL DEFAULT 2,
|
||||||
PRIMARY KEY (`id_agente`),
|
PRIMARY KEY (`id_agente`),
|
||||||
KEY `nombre` (`nombre`(255)),
|
KEY `nombre` (`nombre`(255)),
|
||||||
KEY `direccion` (`direccion`),
|
KEY `direccion` (`direccion`),
|
||||||
@ -3552,6 +3553,7 @@ CREATE TABLE IF NOT EXISTS `tmetaconsole_agent` (
|
|||||||
`satellite_server` INT NOT NULL DEFAULT 0,
|
`satellite_server` INT NOT NULL DEFAULT 0,
|
||||||
`fixed_ip` TINYINT NOT NULL DEFAULT 0,
|
`fixed_ip` TINYINT NOT NULL DEFAULT 0,
|
||||||
`disabled_by_downtime` TINYINT NOT NULL DEFAULT 0,
|
`disabled_by_downtime` TINYINT NOT NULL DEFAULT 0,
|
||||||
|
`vul_scan_enabled` TINYINT NOT NULL DEFAULT 2,
|
||||||
PRIMARY KEY (`id_agente`),
|
PRIMARY KEY (`id_agente`),
|
||||||
KEY `nombre` (`nombre`(255)),
|
KEY `nombre` (`nombre`(255)),
|
||||||
KEY `direccion` (`direccion`),
|
KEY `direccion` (`direccion`),
|
||||||
@ -4520,3 +4522,13 @@ CREATE TABLE IF NOT EXISTS `tgraph_analytics_filter` (
|
|||||||
`interval` INT NULL,
|
`interval` INT NULL,
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||||
|
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
-- Table `tpandora_cve`
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
CREATE TABLE IF NOT EXISTS `tpandora_cve` (
|
||||||
|
`cve_id` VARCHAR(20),
|
||||||
|
`cvss_score` DOUBLE DEFAULT NULL,
|
||||||
|
`cvss_vector` VARCHAR(255) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`cve_id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
File diff suppressed because it is too large
Load Diff
@ -87,6 +87,10 @@ class DataSet implements ChartOwnedInterface, ArraySerializableInterface, JsonSe
|
|||||||
*/
|
*/
|
||||||
protected $axis;
|
protected $axis;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string|null
|
||||||
|
*/
|
||||||
|
protected $stack;
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@ -404,4 +408,28 @@ class DataSet implements ChartOwnedInterface, ArraySerializableInterface, JsonSe
|
|||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of stack
|
||||||
|
*
|
||||||
|
* @return string|null
|
||||||
|
*/
|
||||||
|
public function getStack()
|
||||||
|
{
|
||||||
|
return $this->stack;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of stack
|
||||||
|
*
|
||||||
|
* @param string|null $stack
|
||||||
|
*
|
||||||
|
* @return self
|
||||||
|
*/
|
||||||
|
public function setStack($stack)
|
||||||
|
{
|
||||||
|
$this->stack = $stack;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,12 @@ class JavaScript extends Renderer
|
|||||||
var elementWidth = (innerRadius * 2) - sidePaddingCalculated;
|
var elementWidth = (innerRadius * 2) - sidePaddingCalculated;
|
||||||
|
|
||||||
var widthRatio = elementWidth / stringWidth;
|
var widthRatio = elementWidth / stringWidth;
|
||||||
var newFontSize = Math.floor(30 * widthRatio);
|
var aspectRatio = 30;
|
||||||
|
if(window.innerWidth < 1300) {
|
||||||
|
aspectRatio = 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
var newFontSize = Math.floor(aspectRatio * widthRatio);
|
||||||
var elementHeight = (innerRadius * 2);
|
var elementHeight = (innerRadius * 2);
|
||||||
|
|
||||||
var fontSizeToUse = Math.min(newFontSize, elementHeight);
|
var fontSizeToUse = Math.min(newFontSize, elementHeight);
|
||||||
|
@ -120,6 +120,7 @@ try {
|
|||||||
echo $e->getMessage();
|
echo $e->getMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$buttons = [];
|
||||||
if (check_acl($config['id_user'], 0, 'AW')) {
|
if (check_acl($config['id_user'], 0, 'AW')) {
|
||||||
$buttons[] = html_print_submit_button(
|
$buttons[] = html_print_submit_button(
|
||||||
__('New cluster'),
|
__('New cluster'),
|
||||||
@ -131,10 +132,11 @@ if (check_acl($config['id_user'], 0, 'AW')) {
|
|||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
echo '<form action="'.ui_get_full_url($model->url.'&op=new').'" method="POST">';
|
|
||||||
html_print_action_buttons(
|
|
||||||
implode('', $buttons),
|
|
||||||
['type' => 'form_action']
|
|
||||||
);
|
|
||||||
echo '</form>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo '<form action="'.ui_get_full_url($model->url.'&op=new').'" method="POST">';
|
||||||
|
html_print_action_buttons(
|
||||||
|
implode('', $buttons),
|
||||||
|
['type' => 'form_action']
|
||||||
|
);
|
||||||
|
echo '</form>';
|
||||||
|
@ -41,32 +41,34 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="br-t">
|
<?php if ($disableGeneralStatistics === false) : ?>
|
||||||
<div class="padding10">
|
<div class="br-t">
|
||||||
<span class="subtitle">
|
<div class="padding10">
|
||||||
<?php echo __('License usage'); ?>
|
<span class="subtitle">
|
||||||
</span>
|
<?php echo __('License usage'); ?>
|
||||||
<?php echo $Overview->getLicenseUsageGraph(); ?>
|
</span>
|
||||||
|
<?php echo $Overview->getLicenseUsageGraph(); ?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row flex-nowrap">
|
<div class="row flex-nowrap height_100p">
|
||||||
<div class="col-7 pdd_5px">
|
<div class="col-7 pdd_5px">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<?php echo $MonitoringElements->title; ?>
|
<?php echo $MonitoringElements->title; ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="content br-t">
|
<div class="content br-t height_100p">
|
||||||
<div class="row">
|
<div class="row height_50p">
|
||||||
<div class="col-6 br-r br-b">
|
<div class="col-6 br-r br-b">
|
||||||
<div class="subtitle link padding10 padding2">
|
<div class="subtitle link padding10 padding2">
|
||||||
<?php echo __('Top-10 Tags'); ?> <a href="index.php?sec=gusuarios&sec2=godmode/tag/tag"><?php echo __('Info'); ?></a>
|
<?php echo __('Status (%)'); ?> <a href="index.php?sec=view&sec2=operation/agentes/estado_agente"><?php echo __('Info'); ?></a>
|
||||||
</div>
|
</div>
|
||||||
<?php echo $MonitoringElements->getTagsGraph(); ?>
|
<?php echo $MonitoringElements->getMonitoringStatusGraph(); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6 br-b">
|
<div class="col-6 br-b">
|
||||||
<div class="subtitle link padding10 padding2">
|
<div class="subtitle link padding10 padding2">
|
||||||
@ -75,12 +77,12 @@
|
|||||||
<?php echo $MonitoringElements->getModuleGroupGraph(); ?>
|
<?php echo $MonitoringElements->getModuleGroupGraph(); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row height_50p">
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<div class="subtitle link padding10 padding2">
|
<div class="subtitle link padding10 padding2">
|
||||||
<?php echo __('Status'); ?> <a href="index.php?sec=view&sec2=operation/agentes/estado_agente"><?php echo __('Info'); ?></a>
|
<?php echo __('Top-10 Tags'); ?> <a href="index.php?sec=gusuarios&sec2=godmode/tag/tag"><?php echo __('Info'); ?></a>
|
||||||
</div>
|
</div>
|
||||||
<?php echo $MonitoringElements->getMonitoringStatusGraph(); ?>
|
<?php echo $MonitoringElements->getTagsGraph(); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6 br-l">
|
<div class="col-6 br-l">
|
||||||
<div class="subtitle link padding10 padding2">
|
<div class="subtitle link padding10 padding2">
|
||||||
@ -165,6 +167,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<?php if ($disableGeneralStatistics === false) : ?>
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<div class="container mrgn_5px" id="logStorage">
|
<div class="container mrgn_5px" id="logStorage">
|
||||||
<div class="title br-b">
|
<div class="title br-b">
|
||||||
@ -184,7 +187,7 @@
|
|||||||
<?php echo $LogStorage->getTotalSources(); ?>
|
<?php echo $LogStorage->getTotalSources(); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row height_100p">
|
||||||
<div class="col-6 br-r">
|
<div class="col-6 br-r">
|
||||||
<div class="subtitle">
|
<div class="subtitle">
|
||||||
<?php echo __('Stored data'); ?>
|
<?php echo __('Stored data'); ?>
|
||||||
@ -221,6 +224,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -236,13 +240,13 @@
|
|||||||
<div class="subtitle">
|
<div class="subtitle">
|
||||||
<?php echo __('Currently triggered'); ?>
|
<?php echo __('Currently triggered'); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php echo $Alerts->getCurrentlyTriggered(); ?>
|
<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_list&status_alert=fired"><?php echo $Alerts->getCurrentlyTriggered(); ?></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6 br-l">
|
<div class="col-6 br-l">
|
||||||
<div class="subtitle">
|
<div class="subtitle">
|
||||||
<?php echo __('Active alerts'); ?>
|
<?php echo __('Active alerts'); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php echo $Alerts->getActiveAlerts(); ?>
|
<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_list&status_alert=all_enabled"><?php echo $Alerts->getActiveAlerts(); ?></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php if ($Alerts->checkAclUserList() === true) : ?>
|
<?php if ($Alerts->checkAclUserList() === true) : ?>
|
||||||
@ -261,13 +265,13 @@
|
|||||||
<div class="title br-b">
|
<div class="title br-b">
|
||||||
<?php echo $Events->title; ?>
|
<?php echo $Events->title; ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row" id="auto-rescaling">
|
||||||
<div class="col-8 br-r">
|
<div class="col-8 br-r trigger-100">
|
||||||
<div class="subtitle link padding10 padding2">
|
<div class="subtitle link padding10 padding2">
|
||||||
<?php echo __('Number of events per hour ('.$config['event_view_hr'].' hrs)'); ?></b> <a href="index.php?sec=eventos&sec2=operation/events/events&filter[event_view_hr]=24&filter[tag_with]=WyIwIl0=&filter[tag_without]=WyIwIl0="><?php echo __('Info'); ?></a>
|
<?php echo __('Number of events per hour ('.$config['event_view_hr'].' hrs)'); ?></b> <a href="index.php?sec=eventos&sec2=operation/events/events&filter[event_view_hr]=24&filter[tag_with]=WyIwIl0=&filter[tag_without]=WyIwIl0="><?php echo __('Info'); ?></a>
|
||||||
</div>
|
</div>
|
||||||
<div id="events-last-24"><?php echo $Events->loading(); ?></div>
|
<div id="events-last-24"><?php echo $Events->loading(); ?></div>
|
||||||
<div class="row br-t h100p">
|
<div class="row br-t h100p observer">
|
||||||
<div class="col-4 br-r">
|
<div class="col-4 br-r">
|
||||||
<div class="subtitle padding10 padding2">
|
<div class="subtitle padding10 padding2">
|
||||||
<?php echo __('Criticality'); ?></b>
|
<?php echo __('Criticality'); ?></b>
|
||||||
@ -276,7 +280,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-4 br-r">
|
<div class="col-4 br-r">
|
||||||
<div class="subtitle padding10 padding2">
|
<div class="subtitle padding10 padding2">
|
||||||
<?php echo __('Status'); ?></b>
|
<?php echo __('Status (%)'); ?></b>
|
||||||
</div>
|
</div>
|
||||||
<div id="events-status-validate"><?php echo $Events->loading(); ?></div>
|
<div id="events-status-validate"><?php echo $Events->loading(); ?></div>
|
||||||
</div>
|
</div>
|
||||||
@ -288,7 +292,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4">
|
<div class="col-4 trigger-100">
|
||||||
<div class="subtitle link padding10 padding2">
|
<div class="subtitle link padding10 padding2">
|
||||||
<?php echo __('Active events ('.$config['event_view_hr'].' hrs)'); ?></b> <a href="index.php?sec=eventos&sec2=operation/events/events"><?php echo __('Info'); ?></a>
|
<?php echo __('Active events ('.$config['event_view_hr'].' hrs)'); ?></b> <a href="index.php?sec=eventos&sec2=operation/events/events"><?php echo __('Info'); ?></a>
|
||||||
</div>
|
</div>
|
||||||
@ -333,7 +337,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<?php echo $Agents->getOperatingSystemGraph(); ?>
|
<?php echo $Agents->getOperatingSystemGraph(); ?>
|
||||||
<div class="subtitle padding10 padding2 br-t">
|
<div class="subtitle padding10 padding2 br-t">
|
||||||
<?php echo __('Status'); ?></b>
|
<?php echo __('Status (%)'); ?></b>
|
||||||
</div>
|
</div>
|
||||||
<?php echo $Agents->getStatusGraph(); ?>
|
<?php echo $Agents->getStatusGraph(); ?>
|
||||||
</div>
|
</div>
|
||||||
@ -341,41 +345,43 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xl-6">
|
<div class="col-xl-6">
|
||||||
<div class="container mrgn_5px">
|
<?php if ($disableGeneralStatistics === false) : ?>
|
||||||
<div class="title br-b">
|
<div class="container mrgn_5px">
|
||||||
<?php echo $Configurations->title; ?>
|
<div class="title br-b">
|
||||||
</div>
|
<?php echo $Configurations->title; ?>
|
||||||
<div class="row br-b flex-nowrap">
|
</div>
|
||||||
<a href="index.php?sec=view&sec2=operation/agentes/group_view" class="col-3 flex flex-column center pdd_20px br-r">
|
<div class="row br-b flex-nowrap">
|
||||||
<?php echo $Configurations->getTotalGroups(); ?>
|
<a href="index.php?sec=view&sec2=operation/agentes/group_view" class="col-3 flex flex-column center pdd_20px br-r">
|
||||||
</a>
|
<?php echo $Configurations->getTotalGroups(); ?>
|
||||||
<a href="index.php?sec=view&sec2=extensions/agents_modules" class="col-3 flex flex-column center pdd_20px br-r">
|
|
||||||
<?php echo $Configurations->getTotalModules(); ?>
|
|
||||||
</a>
|
|
||||||
<?php if (enterprise_installed() === true) : ?>
|
|
||||||
<a href="index.php?sec=gmodules&sec2=enterprise/godmode/policies/policies" class="col-3 flex flex-column center pdd_20px br-r">
|
|
||||||
<?php echo $Configurations->getTotalPolicies(); ?>
|
|
||||||
</a>
|
</a>
|
||||||
<?php endif; ?>
|
<a href="index.php?sec=view&sec2=extensions/agents_modules" class="col-3 flex flex-column center pdd_20px br-r">
|
||||||
<a href="index.php?sec=gservers&sec2=godmode/servers/plugin" class="col-3 flex flex-column center pdd_20px">
|
<?php echo $Configurations->getTotalModules(); ?>
|
||||||
<?php echo $Configurations->getTotalRemotePlugins(); ?>
|
</a>
|
||||||
</a>
|
<?php if (enterprise_installed() === true) : ?>
|
||||||
|
<a href="index.php?sec=gmodules&sec2=enterprise/godmode/policies/policies" class="col-3 flex flex-column center pdd_20px br-r">
|
||||||
|
<?php echo $Configurations->getTotalPolicies(); ?>
|
||||||
|
</a>
|
||||||
|
<?php endif; ?>
|
||||||
|
<a href="index.php?sec=gservers&sec2=godmode/servers/plugin" class="col-3 flex flex-column center pdd_20px">
|
||||||
|
<?php echo $Configurations->getTotalRemotePlugins(); ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="row flex-nowrap br-b">
|
||||||
|
<a href="index.php?sec=templates&sec2=godmode/modules/manage_module_templates" class="col-4 flex flex-column center pdd_20px br-r">
|
||||||
|
<?php echo $Configurations->getTotalModuleTemplate(); ?>
|
||||||
|
</a>
|
||||||
|
<a href="index.php?sec=view&sec2=operation/agentes/estado_agente&status=5" class="col-4 flex flex-column center pdd_20px br-r">
|
||||||
|
<?php echo $Configurations->getNotInitModules(); ?>
|
||||||
|
</a>
|
||||||
|
<a href="index.php?sec=view&sec2=operation/agentes/estado_agente&status=3" class="col-4 flex flex-column center pdd_20px br-r">
|
||||||
|
<?php echo $Configurations->getTotalUnknowAgents(); ?>
|
||||||
|
</a>
|
||||||
|
<a href="index.php?sec=eventos&sec2=operation/events/events" class="col-4 flex flex-column center pdd_20px">
|
||||||
|
<?php echo $Configurations->getTotalEvents(); ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row flex-nowrap br-b">
|
<?php endif; ?>
|
||||||
<a href="index.php?sec=templates&sec2=godmode/modules/manage_module_templates" class="col-4 flex flex-column center pdd_20px br-r">
|
|
||||||
<?php echo $Configurations->getTotalModuleTemplate(); ?>
|
|
||||||
</a>
|
|
||||||
<a href="index.php?sec=view&sec2=operation/agentes/estado_agente&status=5" class="col-4 flex flex-column center pdd_20px br-r">
|
|
||||||
<?php echo $Configurations->getNotInitModules(); ?>
|
|
||||||
</a>
|
|
||||||
<a href="index.php?sec=view&sec2=operation/agentes/estado_agente&status=3" class="col-4 flex flex-column center pdd_20px br-r">
|
|
||||||
<?php echo $Configurations->getTotalUnknowAgents(); ?>
|
|
||||||
</a>
|
|
||||||
<a href="index.php?sec=eventos&sec2=operation/events/events" class="col-4 flex flex-column center pdd_20px">
|
|
||||||
<?php echo $Configurations->getTotalEvents(); ?>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php if ($ScheduledDowntime->checkAcl() === true) : ?>
|
<?php if ($ScheduledDowntime->checkAcl() === true) : ?>
|
||||||
<div class="container mrgn_5px">
|
<div class="container mrgn_5px">
|
||||||
<div class="title br-b">
|
<div class="title br-b">
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-server
|
package: pandorafms-server
|
||||||
Version: 7.0NG.774
|
Version: 7.0NG.774-231116
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="7.0NG.774"
|
pandora_version="7.0NG.774-231116"
|
||||||
|
|
||||||
package_cpan=0
|
package_cpan=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
@ -818,6 +818,8 @@ sub main() {
|
|||||||
&& $Config{"self_monitoring"} == 1
|
&& $Config{"self_monitoring"} == 1
|
||||||
&& !is_metaconsole(\%Config)
|
&& !is_metaconsole(\%Config)
|
||||||
&& time() - $thr_time_ref > $Config{'self_monitoring_interval'}) {
|
&& time() - $thr_time_ref > $Config{'self_monitoring_interval'}) {
|
||||||
|
# Update agent name token.
|
||||||
|
pandora_set_tconfig_token($DBH, 'self_monitoring_agent_name', $Config{'self_monitoring_agent_name'});
|
||||||
$thr_time_ref = time();
|
$thr_time_ref = time();
|
||||||
pandora_thread_monitoring (\%Config, $DBH, \@Servers);
|
pandora_thread_monitoring (\%Config, $DBH, \@Servers);
|
||||||
}
|
}
|
||||||
|
@ -422,6 +422,9 @@ self_monitoring 1
|
|||||||
# Self monitoring interval (in seconds).
|
# Self monitoring interval (in seconds).
|
||||||
self_monitoring_interval 300
|
self_monitoring_interval 300
|
||||||
|
|
||||||
|
# Self monitoring agent name.
|
||||||
|
self_monitoring_agent_name pandora.internals
|
||||||
|
|
||||||
# Update parent from the agent xml
|
# Update parent from the agent xml
|
||||||
|
|
||||||
update_parent 1
|
update_parent 1
|
||||||
|
@ -46,7 +46,7 @@ our @EXPORT = qw(
|
|||||||
|
|
||||||
# version: Defines actual version of Pandora Server for this module only
|
# version: Defines actual version of Pandora Server for this module only
|
||||||
my $pandora_version = "7.0NG.774";
|
my $pandora_version = "7.0NG.774";
|
||||||
my $pandora_build = "231102";
|
my $pandora_build = "231116";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
# Setup hash
|
# Setup hash
|
||||||
@ -206,6 +206,9 @@ sub pandora_get_sharedconfig ($$) {
|
|||||||
|
|
||||||
# Server identifier
|
# Server identifier
|
||||||
$pa_config->{'server_unique_identifier'} = pandora_get_tconfig_token ($dbh, 'server_unique_identifier', '');
|
$pa_config->{'server_unique_identifier'} = pandora_get_tconfig_token ($dbh, 'server_unique_identifier', '');
|
||||||
|
|
||||||
|
# Vulnerability scans
|
||||||
|
$pa_config->{'agent_vulnerabilities'} = pandora_get_tconfig_token ($dbh, 'agent_vulnerabilities', 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
@ -416,6 +419,9 @@ sub pandora_load_config {
|
|||||||
# Self monitoring interval
|
# Self monitoring interval
|
||||||
$pa_config->{'self_monitoring_interval'} = 300; # 5.1SP1
|
$pa_config->{'self_monitoring_interval'} = 300; # 5.1SP1
|
||||||
|
|
||||||
|
# Self monitoring agent name.
|
||||||
|
$pa_config->{'self_monitoring_agent_name'} = 'pandora.internals'; # 7.774
|
||||||
|
|
||||||
# Process XML data files as a stack
|
# Process XML data files as a stack
|
||||||
$pa_config->{"dataserver_lifo"} = 0; # 5.0
|
$pa_config->{"dataserver_lifo"} = 0; # 5.0
|
||||||
|
|
||||||
@ -1041,6 +1047,9 @@ sub pandora_load_config {
|
|||||||
elsif ($parametro =~ m/^self_monitoring_interval\s+([0-9]*)/i) {
|
elsif ($parametro =~ m/^self_monitoring_interval\s+([0-9]*)/i) {
|
||||||
$pa_config->{'self_monitoring_interval'} = clean_blank($1);
|
$pa_config->{'self_monitoring_interval'} = clean_blank($1);
|
||||||
}
|
}
|
||||||
|
elsif ($parametro =~ m/^self_monitoring_agent_name\s+(.*)/i) {
|
||||||
|
$pa_config->{'self_monitoring_agent_name'} = clean_blank($1);
|
||||||
|
}
|
||||||
elsif ($parametro =~ m/^update_parent\s+([0-1])/i) {
|
elsif ($parametro =~ m/^update_parent\s+([0-1])/i) {
|
||||||
$pa_config->{'update_parent'} = clean_blank($1);
|
$pa_config->{'update_parent'} = clean_blank($1);
|
||||||
}
|
}
|
||||||
|
@ -6315,7 +6315,7 @@ sub pandora_self_monitoring ($$) {
|
|||||||
|
|
||||||
my $xml_output = "";
|
my $xml_output = "";
|
||||||
|
|
||||||
$xml_output = "<agent_data os_name='$OS' os_version='$OS_VERSION' version='" . $pa_config->{'version'} . "' description='" . $pa_config->{'rb_product_name'} . " Server version " . $pa_config->{'version'} . "' agent_name='pandora.internals' agent_alias='pandora.internals' interval='".$pa_config->{"self_monitoring_interval"}."' timestamp='".$timestamp."' >";
|
$xml_output = "<agent_data os_name='$OS' os_version='$OS_VERSION' version='" . $pa_config->{'version'} . "' description='" . $pa_config->{'rb_product_name'} . " Server version " . $pa_config->{'version'} . "' agent_name='" . $pa_config->{"self_monitoring_agent_name"} . "' agent_alias='" . $pa_config->{"self_monitoring_agent_name"} . "' interval='".$pa_config->{"self_monitoring_interval"}."' timestamp='".$timestamp."' >";
|
||||||
$xml_output .=" <module>";
|
$xml_output .=" <module>";
|
||||||
$xml_output .=" <name>Status</name>";
|
$xml_output .=" <name>Status</name>";
|
||||||
$xml_output .=" <type>generic_proc</type>";
|
$xml_output .=" <type>generic_proc</type>";
|
||||||
@ -6514,7 +6514,7 @@ sub pandora_self_monitoring ($$) {
|
|||||||
|
|
||||||
$xml_output .= "</agent_data>";
|
$xml_output .= "</agent_data>";
|
||||||
|
|
||||||
my $filename = $pa_config->{"incomingdir"}."/pandora.internals.self".$utimestamp.".data";
|
my $filename = $pa_config->{"incomingdir"}."/".$pa_config->{"self_monitoring_agent_name"}.".self".$utimestamp.".data";
|
||||||
open (XMLFILE, ">", $filename) or die "[FATAL] Could not open internal monitoring XML file for deploying monitorization at '$filename'";
|
open (XMLFILE, ">", $filename) or die "[FATAL] Could not open internal monitoring XML file for deploying monitorization at '$filename'";
|
||||||
print XMLFILE $xml_output;
|
print XMLFILE $xml_output;
|
||||||
close (XMLFILE);
|
close (XMLFILE);
|
||||||
@ -6539,7 +6539,7 @@ sub pandora_thread_monitoring ($$$) {
|
|||||||
# All trhead modules are "Status" module sons.
|
# All trhead modules are "Status" module sons.
|
||||||
$module_parent = 'Status';
|
$module_parent = 'Status';
|
||||||
|
|
||||||
$xml_output = "<agent_data os_name='$OS' os_version='$OS_VERSION' version='" . $pa_config->{'version'} . "' description='" . $pa_config->{'rb_product_name'} . " Server version " . $pa_config->{'version'} . "' agent_name='pandora.internals' agent_alias='pandora.internals' interval='".$pa_config->{"self_monitoring_interval"}."' timestamp='".$timestamp."' >";
|
$xml_output = "<agent_data os_name='$OS' os_version='$OS_VERSION' version='" . $pa_config->{'version'} . "' description='" . $pa_config->{'rb_product_name'} . " Server version " . $pa_config->{'version'} . "' agent_name='" . $pa_config->{'self_monitoring_agent_name'} . "' agent_alias='pandora.internals' interval='".$pa_config->{"self_monitoring_interval"}."' timestamp='".$timestamp."' >";
|
||||||
foreach my $server (@{$servers}) {
|
foreach my $server (@{$servers}) {
|
||||||
my $producer_stats = $server->getProducerStats();
|
my $producer_stats = $server->getProducerStats();
|
||||||
while (my ($tid, $stats) = each(%{$producer_stats})) {
|
while (my ($tid, $stats) = each(%{$producer_stats})) {
|
||||||
@ -6605,7 +6605,7 @@ sub pandora_thread_monitoring ($$$) {
|
|||||||
}
|
}
|
||||||
$xml_output .= "</agent_data>";
|
$xml_output .= "</agent_data>";
|
||||||
|
|
||||||
my $filename = $pa_config->{"incomingdir"}."/pandora.internals.threads.".$utimestamp.".data";
|
my $filename = $pa_config->{"incomingdir"}."/".$pa_config->{'self_monitoring_agent_name'}.".threads.".$utimestamp.".data";
|
||||||
open (XMLFILE, ">", $filename) or die "[FATAL] Could not write to the thread monitoring XML file '$filename'";
|
open (XMLFILE, ">", $filename) or die "[FATAL] Could not write to the thread monitoring XML file '$filename'";
|
||||||
print XMLFILE $xml_output;
|
print XMLFILE $xml_output;
|
||||||
close (XMLFILE);
|
close (XMLFILE);
|
||||||
@ -7942,7 +7942,7 @@ sub process_inventory_data ($$$$$$$) {
|
|||||||
################################################################################
|
################################################################################
|
||||||
# Process inventory module data, creating the module if necessary.
|
# Process inventory module data, creating the module if necessary.
|
||||||
################################################################################
|
################################################################################
|
||||||
sub process_inventory_module_data ($$$$$$$$) {
|
sub process_inventory_module_data {
|
||||||
my ($pa_config, $data, $server_id, $agent_name,
|
my ($pa_config, $data, $server_id, $agent_name,
|
||||||
$module_name, $interval, $timestamp, $dbh) = @_;
|
$module_name, $interval, $timestamp, $dbh) = @_;
|
||||||
|
|
||||||
@ -8004,12 +8004,20 @@ sub process_inventory_module_data ($$$$$$$$) {
|
|||||||
'INSERT INTO tagente_datos_inventory (id_agent_module_inventory, data, timestamp, utimestamp)
|
'INSERT INTO tagente_datos_inventory (id_agent_module_inventory, data, timestamp, utimestamp)
|
||||||
VALUES (?, ?, ?, ?)',
|
VALUES (?, ?, ?, ?)',
|
||||||
$id_agent_module_inventory, safe_input($data), $timestamp, $utimestamp);
|
$id_agent_module_inventory, safe_input($data), $timestamp, $utimestamp);
|
||||||
|
} else {
|
||||||
return;
|
process_inventory_module_diff($pa_config, safe_input($data),
|
||||||
|
$inventory_module, $timestamp, $utimestamp, $dbh, $interval);
|
||||||
}
|
}
|
||||||
|
|
||||||
process_inventory_module_diff($pa_config, safe_input($data),
|
# Vulnerability scan.
|
||||||
$inventory_module, $timestamp, $utimestamp, $dbh, $interval);
|
if (($pa_config->{'agent_vulnerabilities'} == 0 && $agent->{'vul_scan_enabled'} == 1) ||
|
||||||
|
($pa_config->{'agent_vulnerabilities'} == 1 && $agent->{'vul_scan_enabled'} == 1) ||
|
||||||
|
($pa_config->{'agent_vulnerabilities'} == 1 && $agent->{'vul_scan_enabled'} == 2)) {
|
||||||
|
my $vulnerability_data = enterprise_hook('process_inventory_vulnerabilities', [$pa_config, $data, $agent, $inventory_module, $dbh]);
|
||||||
|
if (defined($vulnerability_data) && $vulnerability_data ne '') {
|
||||||
|
process_inventory_module_data ($pa_config, $vulnerability_data, $server_id, $agent_name, 'Vulnerabilities', $interval, $timestamp, $dbh);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
@ -433,16 +433,17 @@ sub exec_recon_app ($$$) {
|
|||||||
|
|
||||||
# Configure macros.
|
# Configure macros.
|
||||||
my %macros = (
|
my %macros = (
|
||||||
"__taskMD5__" => md5($task->{'id_rt'}),
|
"__taskMD5__" => md5($task->{'id_rt'}),
|
||||||
"__taskInterval__" => $task->{'interval_sweep'},
|
"__taskInterval__" => $task->{'interval_sweep'},
|
||||||
"__taskGroup__" => get_group_name($dbh, $task->{'id_group'}),
|
"__taskGroup__" => get_group_name($dbh, $task->{'id_group'}),
|
||||||
"__taskGroupID__" => $task->{'id_group'},
|
"__taskGroupID__" => $task->{'id_group'},
|
||||||
"__temp__" => $pa_config->{'temporal'},
|
"__temp__" => $pa_config->{'temporal'},
|
||||||
"__incomingDir__" => $pa_config->{'incomingdir'},
|
"__incomingDir__" => $pa_config->{'incomingdir'},
|
||||||
"__consoleAPIURL__" => $pa_config->{'console_api_url'},
|
"__consoleAPIURL__" => $pa_config->{'console_api_url'},
|
||||||
"__consoleAPIPass__" => $pa_config->{'console_api_pass'},
|
"__consoleAPIPass__" => $pa_config->{'console_api_pass'},
|
||||||
"__consoleUser__" => $pa_config->{'console_user'},
|
"__consoleUser__" => $pa_config->{'console_user'},
|
||||||
"__consolePass__" => $pa_config->{'console_pass'},
|
"__consolePass__" => $pa_config->{'console_pass'},
|
||||||
|
"__pandoraServerConf__" => $pa_config->{'pandora_path'},
|
||||||
get_recon_app_macros($pa_config, $dbh, $task),
|
get_recon_app_macros($pa_config, $dbh, $task),
|
||||||
get_recon_script_macros($pa_config, $dbh, $task)
|
get_recon_script_macros($pa_config, $dbh, $task)
|
||||||
);
|
);
|
||||||
@ -654,7 +655,11 @@ sub get_recon_macro_value($$$$) {
|
|||||||
}
|
}
|
||||||
# Name of the group if it exists. Empty otherwise.
|
# Name of the group if it exists. Empty otherwise.
|
||||||
elsif ($type eq 'agent_groups') {
|
elsif ($type eq 'agent_groups') {
|
||||||
my $group_name = get_group_name($dbh, $value);
|
my $group_name = '';
|
||||||
|
if ($value > 0) {
|
||||||
|
$group_name = get_group_name($dbh, $value);
|
||||||
|
}
|
||||||
|
|
||||||
if (defined($group_name)) {
|
if (defined($group_name)) {
|
||||||
$ret = $group_name;
|
$ret = $group_name;
|
||||||
}
|
}
|
||||||
@ -2227,6 +2232,7 @@ sub PandoraFMS::Recon::Base::connect_agents($$$$$;$) {
|
|||||||
# data = [
|
# data = [
|
||||||
# 'agent_data' => {},
|
# 'agent_data' => {},
|
||||||
# 'module_data' => []
|
# 'module_data' => []
|
||||||
|
# 'inventory_data' => []
|
||||||
# ]
|
# ]
|
||||||
################################################################################
|
################################################################################
|
||||||
sub PandoraFMS::Recon::Base::create_agents($$) {
|
sub PandoraFMS::Recon::Base::create_agents($$) {
|
||||||
@ -2240,7 +2246,8 @@ sub PandoraFMS::Recon::Base::create_agents($$) {
|
|||||||
|
|
||||||
foreach my $information (@{$data}) {
|
foreach my $information (@{$data}) {
|
||||||
my $agent = $information->{'agent_data'};
|
my $agent = $information->{'agent_data'};
|
||||||
my $modules = $information->{'module_data'};
|
my $modules = defined($information->{'module_data'}) ? $information->{'module_data'} : [];
|
||||||
|
my $inventory = defined($information->{'inventory_data'}) ? $information->{'inventory_data'} : [];
|
||||||
my $force_processing = 0;
|
my $force_processing = 0;
|
||||||
|
|
||||||
# Search agent
|
# Search agent
|
||||||
@ -2249,7 +2256,9 @@ sub PandoraFMS::Recon::Base::create_agents($$) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
my $parent_id;
|
my $parent_id;
|
||||||
if (defined($agent->{'parent_agent_name'})) {
|
if (defined($agent->{'id_parent'})) {
|
||||||
|
$parent_id = $agent->{'id_parent'};
|
||||||
|
} elsif (defined($agent->{'parent_agent_name'})) {
|
||||||
$parent_id = PandoraFMS::Core::locate_agent(
|
$parent_id = PandoraFMS::Core::locate_agent(
|
||||||
$pa_config, $dbh, $agent->{'parent_agent_name'}
|
$pa_config, $dbh, $agent->{'parent_agent_name'}
|
||||||
);
|
);
|
||||||
@ -2259,7 +2268,7 @@ sub PandoraFMS::Recon::Base::create_agents($$) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
my $agent_id;
|
my $agent_id;
|
||||||
my $os_id = get_os_id($dbh, $agent->{'os'});
|
my $os_id = defined($agent->{'id_os'}) ? $agent->{'id_os'} : get_os_id($dbh, $agent->{'os'});
|
||||||
|
|
||||||
if ($os_id < 0) {
|
if ($os_id < 0) {
|
||||||
$os_id = get_os_id($dbh, 'Other');
|
$os_id = get_os_id($dbh, 'Other');
|
||||||
@ -2322,8 +2331,20 @@ sub PandoraFMS::Recon::Base::create_agents($$) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
# Add inventory data.
|
||||||
|
if (ref($inventory) eq "HASH") {
|
||||||
|
PandoraFMS::Core::process_inventory_data (
|
||||||
|
$pa_config,
|
||||||
|
$inventory,
|
||||||
|
0, # Does not seem to be used.
|
||||||
|
$agent->{'agent_name'},
|
||||||
|
$agent->{'interval'},
|
||||||
|
strftime ("%Y/%m/%d %H:%M:%S", localtime()),
|
||||||
|
$dbh
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
|
|||||||
|
|
||||||
# version: Defines actual version of Pandora Server for this module only
|
# version: Defines actual version of Pandora Server for this module only
|
||||||
my $pandora_version = "7.0NG.774";
|
my $pandora_version = "7.0NG.774";
|
||||||
my $pandora_build = "231102";
|
my $pandora_build = "231116";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||||
|
@ -2735,12 +2735,6 @@ sub get_user_agent {
|
|||||||
# Disable verify host certificate (only needed for self-signed cert)
|
# Disable verify host certificate (only needed for self-signed cert)
|
||||||
$ua->ssl_opts( 'verify_hostname' => 0 );
|
$ua->ssl_opts( 'verify_hostname' => 0 );
|
||||||
$ua->ssl_opts( 'SSL_verify_mode' => 0x00 );
|
$ua->ssl_opts( 'SSL_verify_mode' => 0x00 );
|
||||||
|
|
||||||
# Disable library extra checks
|
|
||||||
BEGIN {
|
|
||||||
$ENV{PERL_NET_HTTPS_SSL_SOCKET_CLASS} = "Net::SSL";
|
|
||||||
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if($@) {
|
if($@) {
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
%define name pandorafms_server
|
%define name pandorafms_server
|
||||||
%define version 7.0NG.774
|
%define version 7.0NG.774
|
||||||
%define release 1
|
%define release 231116
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
%global __os_install_post %{nil}
|
%global __os_install_post %{nil}
|
||||||
%define name pandorafms_server
|
%define name pandorafms_server
|
||||||
%define version 7.0NG.774
|
%define version 7.0NG.774
|
||||||
%define release 1
|
%define release 231116
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
PI_VERSION="7.0NG.774"
|
PI_VERSION="7.0NG.774"
|
||||||
PI_BUILD="231102"
|
PI_BUILD="231116"
|
||||||
|
|
||||||
MODE=$1
|
MODE=$1
|
||||||
if [ $# -gt 1 ]; then
|
if [ $# -gt 1 ]; then
|
||||||
|
@ -38,7 +38,7 @@ use PandoraFMS::Config;
|
|||||||
use PandoraFMS::DB;
|
use PandoraFMS::DB;
|
||||||
|
|
||||||
# version: define current version
|
# version: define current version
|
||||||
my $version = "7.0NG.774 Build 231102";
|
my $version = "7.0NG.774 Build 231116";
|
||||||
|
|
||||||
# Pandora server configuration
|
# Pandora server configuration
|
||||||
my %conf;
|
my %conf;
|
||||||
|
@ -36,7 +36,7 @@ use Encode::Locale;
|
|||||||
Encode::Locale::decode_argv;
|
Encode::Locale::decode_argv;
|
||||||
|
|
||||||
# version: define current version
|
# version: define current version
|
||||||
my $version = "7.0NG.774 Build 231102";
|
my $version = "7.0NG.774 Build 231116";
|
||||||
|
|
||||||
# save program name for logging
|
# save program name for logging
|
||||||
my $progname = basename($0);
|
my $progname = basename($0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user