diff --git a/pandora_agents/pc/pandora_agent_installer b/pandora_agents/pc/pandora_agent_installer
index 7d8de1134d..bcfee3eb00 100644
--- a/pandora_agents/pc/pandora_agent_installer
+++ b/pandora_agents/pc/pandora_agent_installer
@@ -467,7 +467,7 @@ fi
# Script banner at start
echo " "
-echo "Pandora FMS Agent UNIX Installer $PI_VERSION $PI_BUILD (c) 2008-2015 ArticaST"
+echo "Pandora FMS Agent UNIX Installer $PI_VERSION $PI_BUILD (c) 2008-2024 PandoraFMS"
echo "This program is licensed under GPL2 Terms. http://pandorafms.com"
echo " "
diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index 53c77569a8..574029ce9f 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-agent-unix
-Version: 7.0NG.775-240214
+Version: 7.0NG.775-240220
Architecture: all
Priority: optional
Section: admin
diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh
index 7bf7bc4137..2b0d9e0fb4 100644
--- a/pandora_agents/unix/DEBIAN/make_deb_package.sh
+++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-pandora_version="7.0NG.775-240214"
+pandora_version="7.0NG.775-240220"
echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent
index b34f9d03dd..5a963ef6e5 100755
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -1039,7 +1039,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.775';
-use constant AGENT_BUILD => '240214';
+use constant AGENT_BUILD => '240220';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;
diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec
index ec2bd3452a..53d0db8510 100644
--- a/pandora_agents/unix/pandora_agent.redhat.spec
+++ b/pandora_agents/unix/pandora_agent.redhat.spec
@@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.775
-%define release 240214
+%define release 240220
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}
diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec
index 65e0909714..3e053d1139 100644
--- a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec
+++ b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec
@@ -5,7 +5,7 @@
%define name pandorafms_agent_linux_bin
%define source_name pandorafms_agent_linux
%define version 7.0NG.775
-%define release 240214
+%define release 240220
%define debug_package %{nil}
Summary: Pandora FMS Linux agent, binary version
diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec
index a275445faa..2d3be11084 100644
--- a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec
+++ b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec
@@ -5,7 +5,7 @@
%define name pandorafms_agent_linux_bin
%define source_name pandorafms_agent_linux
%define version 7.0NG.775
-%define release 240214
+%define release 240220
%define debug_package %{nil}
Summary: Pandora FMS Linux agent, binary version
diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.spec b/pandora_agents/unix/pandora_agent.redhat_bin.spec
index b8b9328937..78495c142d 100644
--- a/pandora_agents/unix/pandora_agent.redhat_bin.spec
+++ b/pandora_agents/unix/pandora_agent.redhat_bin.spec
@@ -5,7 +5,7 @@
%define name pandorafms_agent_linux_bin
%define source_name pandorafms_agent_linux
%define version 7.0NG.775
-%define release 240214
+%define release 240220
Summary: Pandora FMS Linux agent, binary version
Name: %{name}
diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec
index 7c6f827532..ae7336afaa 100644
--- a/pandora_agents/unix/pandora_agent.spec
+++ b/pandora_agents/unix/pandora_agent.spec
@@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.775
-%define release 240214
+%define release 240220
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}
diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer
index f7df2b0f00..4231f83ca3 100755
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.775"
-PI_BUILD="240214"
+PI_BUILD="240220"
OS_NAME=`uname -s`
FORCE=0
@@ -579,7 +579,7 @@ fi
# Script banner at start
echo " "
-echo "Pandora FMS Agent UNIX Installer $PI_VERSION $PI_BUILD (c) 2008-2015 ArticaST"
+echo "Pandora FMS Agent UNIX Installer $PI_VERSION $PI_BUILD (c) 2008-2024 PandoraFMS"
echo "This program is licensed under GPL2 Terms. http://pandorafms.com"
echo " "
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index 635fa7571a..dfdeecea3d 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
-{240214}
+{240220}
ViewReadme
{Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index c61bdb22ec..0f7f128e46 100644
--- a/pandora_agents/win32/pandora.cc
+++ b/pandora_agents/win32/pandora.cc
@@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
-#define PANDORA_VERSION ("7.0NG.775 Build 240214")
+#define PANDORA_VERSION ("7.0NG.775 Build 240220")
string pandora_path;
string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index fc0510add9..ff6ed8fa7e 100644
--- a/pandora_agents/win32/versioninfo.rc
+++ b/pandora_agents/win32/versioninfo.rc
@@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Pandora FMS"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
- VALUE "ProductVersion", "(7.0NG.775(Build 240214))"
+ VALUE "ProductVersion", "(7.0NG.775(Build 240220))"
VALUE "FileVersion", "1.0.0.0"
END
END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index bffc7430e0..cab607fc18 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-console
-Version: 7.0NG.775-240214
+Version: 7.0NG.775-240220
Architecture: all
Priority: optional
Section: admin
diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh
index df5cfce604..610e452556 100644
--- a/pandora_console/DEBIAN/make_deb_package.sh
+++ b/pandora_console/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-pandora_version="7.0NG.775-240214"
+pandora_version="7.0NG.775-240220"
package_pear=0
package_pandora=1
diff --git a/pandora_console/extensions/quick_shell.php b/pandora_console/extensions/quick_shell.php
index 9ea79ba364..a3f5872f84 100644
--- a/pandora_console/extensions/quick_shell.php
+++ b/pandora_console/extensions/quick_shell.php
@@ -394,7 +394,7 @@ function quickShellSettings()
__('Address'),
html_print_input_text(
'gotty_addr',
- $config['gotty_addr'],
+ ($config['gotty_addr'] ?? ''),
'',
30,
100,
@@ -443,9 +443,8 @@ function quickShellSettings()
html_print_checkbox_switch(
'gotty_ssh_use_ssl',
1,
- $config['gotty_ssh_use_ssl'],
- true,
- $disable_agentaccess
+ ($config['gotty_ssh_use_ssl'] ?? false),
+ true
)
);
@@ -497,7 +496,7 @@ function quickShellSettings()
html_print_checkbox_switch(
'gotty_telnet_use_ssl',
1,
- $config['gotty_telnet_use_ssl'],
+ ($config['gotty_telnet_use_ssl'] ?? false),
true
)
);
diff --git a/pandora_console/extras/discovery/DiscoveryApplicationsMigrateCodes.ini b/pandora_console/extras/discovery/DiscoveryApplicationsMigrateCodes.ini
index d05611a6b5..ea136c996c 100644
--- a/pandora_console/extras/discovery/DiscoveryApplicationsMigrateCodes.ini
+++ b/pandora_console/extras/discovery/DiscoveryApplicationsMigrateCodes.ini
@@ -1,5 +1,5 @@
pandorafms.vmware=248788e0fb2cd4e11623e4a52ee7d05b
-pandorafms.mysql=fadb4750d18285c0eca34f47c6aa3cfe
+pandorafms.mysql=ca7dd8b80a1a03a25eb0fb077818ad63
pandorafms.mssql=1cc215409741d19080269ffba112810e
pandorafms.oracle=abdfd7280f76276f696115cabdac731e
pandorafms.db2=122f2abff0ec1d668c35ee0911483021
diff --git a/pandora_console/extras/mr/68.sql b/pandora_console/extras/mr/68.sql
index aa815a869a..6315c64ae7 100644
--- a/pandora_console/extras/mr/68.sql
+++ b/pandora_console/extras/mr/68.sql
@@ -58,9 +58,43 @@ UPDATE `tncm_agent_data_template` SET `vendors` = CONCAT('["', TRIM(BOTH '"' FRO
-- Update version for plugin oracle
UPDATE `tdiscovery_apps` SET `version` = '1.2' WHERE `short_name` = 'pandorafms.oracle';
+-- Update version for plugin mysql
+UPDATE `tdiscovery_apps` SET `version` = '1.1' WHERE `short_name` = 'pandorafms.mysql';
+
SET @widget_id = NULL;
SELECT @widget_id := `id` FROM `twidget` WHERE `unique_name` = 'GisMap';
INSERT IGNORE INTO `twidget` (`id`,`class_name`,`unique_name`,`description`,`options`,`page`) VALUES (@widget_id,'GisMap','GisMap','Gis map','','GisMap.php');
+SET @class_name = 'ITSMIncidences';
+SET @unique_name = 'ITSMIncidences';
+SET @description = 'Pandora ITSM tickets';
+SET @page = 'ITSMIncidences.php';
+SET @widget_id = NULL;
+SELECT @widget_id := `id` FROM `twidget` WHERE `unique_name` = @unique_name;
+INSERT IGNORE INTO `twidget` (`id`,`class_name`,`unique_name`,`description`,`options`,`page`) VALUES (@widget_id,@class_name,@unique_name,@description,'',@page);
+
+-- Create SNMPv3 credentials for recon tasks and update them
+SET @creds_name = 'Recon-SNMP-creds-';
+INSERT IGNORE INTO `tcredential_store` (`identifier`, `id_group`, `product`, `extra_1`)
+ SELECT
+ CONCAT(@creds_name,`id_rt`) AS `identifier`,
+ `id_group`,
+ 'SNMP' AS `product`,
+ CONCAT(
+ '{',
+ '"community":"',`snmp_community`,'",',
+ '"version":"',`snmp_version`,'",',
+ '"securityLevelV3":"',`snmp_security_level`,'",',
+ '"authUserV3":"',`snmp_auth_user`,'",',
+ '"authMethodV3":"',`snmp_auth_method`,'",',
+ '"authPassV3":"',`snmp_auth_pass`,'",',
+ '"privacyMethodV3":"',`snmp_privacy_method`,'",',
+ '"privacyPassV3":"',`snmp_privacy_pass`,'"',
+ '}'
+ ) AS `extra1`
+ FROM `trecon_task` WHERE `snmp_version` = 3 AND `snmp_enabled` = 1
+;
+UPDATE `trecon_task` SET `auth_strings` = IF(`auth_strings` = '',CONCAT(@creds_name,`id_rt`),CONCAT(@creds_name,`id_rt`,',',`auth_strings`)) WHERE `snmp_version` = 3 AND `snmp_enabled` = 1;
+
COMMIT;
\ No newline at end of file
diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php
index 35b994fead..e2573bd859 100644
--- a/pandora_console/general/header.php
+++ b/pandora_console/general/header.php
@@ -54,7 +54,7 @@ echo sprintf('
$field) {
+ $col_string = sprintf($search_column_pattern, $field);
+
$sql_search .= sprintf(
'%s %s %s %s',
($key === 0) ? '' : $nexo,
- $field,
+ $col_string,
$not_search,
$comp_string
);
diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php
index 7534cb5e23..c5c7090623 100755
--- a/pandora_console/include/functions_reporting.php
+++ b/pandora_console/include/functions_reporting.php
@@ -12546,7 +12546,7 @@ function reporting_get_stats_indicators($data, $width=280, $height=20, $html=tru
$table_ind = html_get_predefined_table();
$servers = [];
- $servers['all'] = (int) db_get_value('COUNT(id_server)', 'tserver');
+ $servers['all'] = (int) count((servers_get_info() ?? []));
$servers['up'] = (int) servers_check_status();
$servers['down'] = ($servers['all'] - $servers['up']);
if ($servers['all'] == 0) {
@@ -12607,7 +12607,7 @@ function reporting_get_stats_indicators_mobile($data, $width=280, $height=20, $h
$table_ind = html_get_predefined_table();
$servers = [];
- $servers['all'] = (int) db_get_value('COUNT(id_server)', 'tserver');
+ $servers['all'] = (int) count((servers_get_info() ?? []));
$servers['up'] = (int) servers_check_status();
$servers['down'] = ($servers['all'] - $servers['up']);
if ($servers['all'] == 0) {
@@ -16206,7 +16206,8 @@ function reporting_module_histogram_graph($report, $content, $pdf=0)
// Si viene de no iniciado busco el primer dato del modulo y si es de histórico.
$first_utimestamp = false;
$search_historydb = false;
- $extract_first_data = modules_get_first_date($content['id_agent_module'], 0);
+ // Limitamos el primer dato al rango de tiempo seleccionado por el usuario.
+ $extract_first_data = modules_get_first_date($content['id_agent_module'], $date_start);
if (empty($extract_first_data) === false) {
$first_utimestamp = $extract_first_data['first_utimestamp'];
$search_historydb = (isset($extract_first_data['search_historydb']) === true) ? $extract_first_data['search_historydb'] : false;
@@ -16311,7 +16312,8 @@ function reporting_module_histogram_graph($report, $content, $pdf=0)
$return['data_ok'] = $check_ok;
$return['data_total'] = $check_total;
if ($check_total > 0) {
- $return['percent_ok'] = (($time_ok * 100) / $content['period']);
+ $percent_ok = (($time_ok * 100) / $content['period']);
+ $return['percent_ok'] = ($percent_ok > 100) ? 100 : $percent_ok;
} else {
$return['percent_ok'] = 0;
}
diff --git a/pandora_console/include/functions_servers.php b/pandora_console/include/functions_servers.php
index bdc8a56fc9..8805998232 100644
--- a/pandora_console/include/functions_servers.php
+++ b/pandora_console/include/functions_servers.php
@@ -615,7 +615,7 @@ function servers_get_rate($avg_interval, $num_modules)
* This function will get all the server information in an array
* or a specific server.
*
- * @param integer $id_server An optional integer or array of integers
+ * @param integer|array $id_server An optional integer or array of integers
* to select specific servers.
*
* @return mixed False in case the server doesn't exist or an array with info.
@@ -624,28 +624,63 @@ function servers_get_info($id_server=-1, $sql_limit=-1)
{
global $config;
- if (is_array($id_server)) {
- $select_id = ' WHERE id_server IN ('.implode(',', $id_server).')';
+ $select_id = '';
+ if (is_array($id_server) === true) {
+ $select_id = ' AND id_server IN ('.implode(',', $id_server).')';
} else if ($id_server > 0) {
- $select_id = ' WHERE id_server IN ('.(int) $id_server.')';
- } else {
- $select_id = '';
+ $select_id = ' AND id_server IN ('.(int) $id_server.')';
}
- $sql = '
- SELECT *
- FROM tserver '.$select_id.'
- ORDER BY server_type';
+ $types_sql = sprintf(
+ ' AND (
+ `server_type` != %d AND
+ `server_type` != %d
+ )',
+ SERVER_TYPE_AUTOPROVISION,
+ SERVER_TYPE_MIGRATION
+ );
+ if (is_metaconsole() === true && isset($config['ndbh']) === false) {
+ $types_sql = sprintf(
+ ' AND (
+ `server_type` = %d OR
+ `server_type` = %d OR
+ `server_type` = %d OR
+ `server_type` = %d
+ )',
+ SERVER_TYPE_AUTOPROVISION,
+ SERVER_TYPE_EVENT,
+ SERVER_TYPE_MIGRATION,
+ SERVER_TYPE_PREDICTION
+ );
+ }
+
+ $sql = sprintf(
+ 'SELECT *
+ FROM tserver
+ WHERE 1=1
+ %s
+ %s
+ ORDER BY server_type',
+ $select_id,
+ $types_sql
+ );
if ($sql_limit !== -1) {
- $sql = '
- SELECT *
- FROM tserver '.$select_id.'
- ORDER BY server_type'.$sql_limit;
+ $sql = sprintf(
+ 'SELECT *
+ FROM tserver
+ WHERE 1=1
+ %s
+ %s
+ ORDER BY server_type
+ %s',
+ $select_id,
+ $types_sql,
+ $sql_limit
+ );
}
$result = db_get_all_rows_sql($sql);
- $time = get_system_time();
if (empty($result)) {
return false;
@@ -1445,6 +1480,12 @@ function servers_get_server_string_name(int $server)
case SERVER_TYPE_NCM:
return __('NCM server');
+ case SERVER_TYPE_AUTOPROVISION:
+ return __('Autoprovision server');
+
+ case SERVER_TYPE_MIGRATION:
+ return __('Migration server');
+
default:
return __('N/A');
}
diff --git a/pandora_console/include/functions_welcome_wizard.php b/pandora_console/include/functions_welcome_wizard.php
index f1b8d672f1..249fa53e20 100644
--- a/pandora_console/include/functions_welcome_wizard.php
+++ b/pandora_console/include/functions_welcome_wizard.php
@@ -472,14 +472,124 @@ function create_module_packet_lost($id_agent, $id_group, $ip_target)
/**
* Create module packet lost and return module id.
*
- * @param string $ip_target Ip and red mask.
+ * @param string $ip_target Ip and red mask.
+ * @param string $snmp_communities SNMP Communities to use in recon task.
+ * @param array $wmi_credentials WMI Credentials to use in recon task.
+ * @param array $rcmd_credentials RCMD Credentials to use in recon task.
*
* @return interger Module id.
*/
-function create_net_scan($ip_target)
+function create_net_scan($ip_target, $snmp_version, $snmp_communities, $wmi_credentials, $rcmd_credentials)
{
global $config;
include_once $config['homedir'].'/godmode/wizards/HostDevices.class.php';
+ include_once $config['homedir'].'/include/functions_groups.php';
+
+ $group_name = 'AutoDiscovery';
+ $id_group = db_get_value('id_grupo', 'tgrupo', 'nombre', io_safe_input($group_name));
+ if (!($id_group > 0)) {
+ $id_group = groups_create_group(
+ io_safe_input($group_name),
+ [
+ 'icon' => 'applications.png',
+ 'description' => '',
+ 'contact' => '',
+ 'other' => '',
+ ]
+ );
+
+ if (!($id_group > 0)) {
+ $id_group = 10;
+ }
+ }
+
+ $auth_strings = [];
+
+ $default_templates = [
+ io_safe_input('Linux System'),
+ io_safe_input('Windows System'),
+ io_safe_input('Windows Hardware'),
+ io_safe_input('Network Management'),
+ ];
+
+ $default_templates_ids = db_get_all_rows_sql(
+ 'SELECT id_np
+ FROM tnetwork_profile
+ WHERE name IN ('.implode(
+ ',',
+ array_map(
+ function ($template) {
+ return "'".$template."'";
+ },
+ $default_templates
+ )
+ ).')
+ ORDER BY name'
+ );
+
+ $id_base = 'autoDiscovery-WMI-';
+ $id = 0;
+ foreach ($wmi_credentials as $wmi) {
+ $id++;
+ $identifier = $id_base.$id;
+ while (db_get_value_sql(
+ sprintf(
+ 'SELECT COUNT(*) AS count FROM tcredential_store WHERE identifier = "%s"',
+ $identifier
+ )
+ ) > 0) {
+ $id++;
+ $identifier = $id_base.$id;
+ }
+
+ $storeKey = db_process_sql_insert(
+ 'tcredential_store',
+ [
+ 'identifier' => $identifier,
+ 'id_group' => $id_group,
+ 'product' => 'WMI',
+ 'username' => $wmi['credential']['user'],
+ 'password' => $wmi['credential']['pass'],
+ 'extra_1' => $wmi['credential']['namespace'],
+ ]
+ );
+
+ if ($storeKey !== false) {
+ $auth_strings[] = $identifier;
+ }
+ }
+
+ $id_base = 'autoDiscovery-RCMD-';
+ $id = 0;
+ foreach ($rcmd_credentials as $rcmd) {
+ $id++;
+ $identifier = $id_base.$id;
+ while (db_get_value_sql(
+ sprintf(
+ 'SELECT COUNT(*) AS count FROM tcredential_store WHERE identifier = "%s"',
+ $identifier
+ )
+ ) > 0) {
+ $id++;
+ $identifier = $id_base.$id;
+ }
+
+ $storeKey = db_process_sql_insert(
+ 'tcredential_store',
+ [
+ 'identifier' => $identifier,
+ 'id_group' => $id_group,
+ 'product' => 'CUSTOM',
+ 'username' => $rcmd['credential']['user'],
+ 'password' => $rcmd['credential']['pass'],
+ ]
+ );
+
+ if ($storeKey !== false) {
+ $auth_strings[] = $identifier;
+ }
+ }
+
$HostDevices = new HostDevices(1);
$id_recon_server = db_get_row_filter('tserver', ['server_type' => SERVER_TYPE_DISCOVERY], 'id_server')['id_server'];
@@ -493,7 +603,7 @@ function create_net_scan($ip_target)
'taskname' => __('Basic network'),
'id_recon_server' => $id_recon_server,
'network' => $ip_target,
- 'id_group' => '8',
+ 'id_group' => $id_group,
'comment' => __('Created on welcome'),
];
$task_created = $HostDevices->parseNetScan();
@@ -504,13 +614,13 @@ function create_net_scan($ip_target)
'page' => '2',
'recon_ports' => '',
'auto_monitor' => 'on',
- 'id_network_profile' => ['0' => '2'],
+ 'id_network_profile' => array_column($default_templates_ids, 'id_np'),
'review_results' => 'on',
'review_limited' => '0',
'snmp_enabled' => 'on',
- 'snmp_version' => '1',
+ 'snmp_version' => $snmp_version,
'snmp_skip_non_enabled_ifs' => 'on',
- 'community' => '',
+ 'community' => $snmp_communities,
'snmp_context' => '',
'snmp_auth_user' => '',
'snmp_security_level' => 'authNoPriv',
@@ -523,6 +633,9 @@ function create_net_scan($ip_target)
'parent_detection' => 'on',
'parent_recursion' => 'on',
'vlan_enabled' => 'on',
+ 'wmi_enabled' => 'on',
+ 'rcmd_enabled' => 'on',
+ 'auth_strings' => $auth_strings,
];
$task_final_created = $HostDevicesFinal->parseNetScan();
diff --git a/pandora_console/include/javascript/graph_analytics.js b/pandora_console/include/javascript/graph_analytics.js
index 475a310ebc..5a83c7c88f 100644
--- a/pandora_console/include/javascript/graph_analytics.js
+++ b/pandora_console/include/javascript/graph_analytics.js
@@ -253,30 +253,35 @@ function createDroppableZones(
)
);
- // Create remove button.
if (
- graphDiv
- .children()
- .children()
- .hasClass("parent_graph") === true
+ $("#hidden-section").val() ===
+ "operation/reporting/graph_analytics"
) {
- graphDiv
- .children()
- .children()
- .children(":first-child")
- .prepend(
- $(
- '

'
- )
- );
- } else {
- graphDiv
- .children()
- .append(
- $(
- '

'
- )
- );
+ // Create remove button.
+ if (
+ graphDiv
+ .children()
+ .children()
+ .hasClass("parent_graph") === true
+ ) {
+ graphDiv
+ .children()
+ .children()
+ .children(":first-child")
+ .prepend(
+ $(
+ '

'
+ )
+ );
+ } else {
+ graphDiv
+ .children()
+ .append(
+ $(
+ '

'
+ )
+ );
+ }
}
}
}
@@ -753,7 +758,7 @@ $("#button-share-modal").click(function(e) {
window.open(
configHomeurl +
- "/operation/reporting/graph_analytics_public.php?" +
+ "operation/reporting/graph_analytics_public.php?" +
queryParams
);
});
diff --git a/pandora_console/include/lib/Dashboard/Manager.php b/pandora_console/include/lib/Dashboard/Manager.php
index 0c81045403..9c823ead01 100644
--- a/pandora_console/include/lib/Dashboard/Manager.php
+++ b/pandora_console/include/lib/Dashboard/Manager.php
@@ -1266,17 +1266,19 @@ class Manager implements PublicLogin
}
if (empty($cells) === false) {
- $result = array_values(array_reduce(
- $cells,
- function ($carry, $item) {
- $carry[$item['order']]['id'] = $item['id'];
- $carry[$item['order']]['position'] = $item['position'];
- $carry[$item['order']]['widgetId'] = $item['id_widget'];
+ $result = array_values(
+ array_reduce(
+ $cells,
+ function ($carry, $item) {
+ $carry[$item['order']]['id'] = $item['id'];
+ $carry[$item['order']]['position'] = $item['position'];
+ $carry[$item['order']]['widgetId'] = $item['id_widget'];
- return $carry;
- },
- []
- ));
+ return $carry;
+ },
+ []
+ )
+ );
}
echo json_encode($result);
diff --git a/pandora_console/include/styles/jquery.tag-editor.css b/pandora_console/include/styles/jquery.tag-editor.css
index 5d535dba1e..31040fca45 100644
--- a/pandora_console/include/styles/jquery.tag-editor.css
+++ b/pandora_console/include/styles/jquery.tag-editor.css
@@ -108,9 +108,7 @@
cursor: default;
font-size: 14px;
}
-.ui-front {
- z-index: 9999;
-}
+
.ui-menu {
list-style: none;
padding: 1px;
diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css
index b94418b090..2b347fd81a 100644
--- a/pandora_console/include/styles/pandora.css
+++ b/pandora_console/include/styles/pandora.css
@@ -1945,7 +1945,7 @@ div.title_line {
#menu_tab_frame_view_bc {
position: sticky;
top: 61px;
- z-index: 2;
+ z-index: 3;
display: flex;
align-items: flex-end;
justify-content: space-between;
@@ -13517,6 +13517,10 @@ tr.shown td.details-control {
-webkit-mask: url(../../images/minimizar.svg) no-repeat right / contain;
}
+#modules-toggle > .modules > .white-box-content div {
+ z-index: 1 !important;
+}
+
/* Import/export */
.div-import-export {
display: flex;
@@ -13584,3 +13588,7 @@ button.disabled {
background: #c0ccdc !important;
border: 0px;
}
+
+.ui-draggable-handle {
+ z-index: 2 !important;
+}
diff --git a/pandora_console/install.php b/pandora_console/install.php
index 706a340e30..f3cd8dfd5f 100644
--- a/pandora_console/install.php
+++ b/pandora_console/install.php
@@ -131,7 +131,7 @@