diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index 67e9bee69a..a0e62119f6 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-agent-unix
-Version: 7.0NG.774-231123
+Version: 7.0NG.774-231128
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 00b50b4032..30706ab7f0 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.774-231123"
+pandora_version="7.0NG.774-231128"
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 0cd9b1fddf..2625838a81 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.774';
-use constant AGENT_BUILD => '231123';
+use constant AGENT_BUILD => '231128';
# 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 33b94d8697..c96556e69e 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.774
-%define release 231123
+%define release 231128
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 fdbbabbb8f..9a868fdb3a 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.774
-%define release 231123
+%define release 231128
%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 91615903ed..f60f615ab1 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.774
-%define release 231123
+%define release 231128
%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 ee88eaa7de..e9f42fe9b6 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.774
-%define release 231123
+%define release 231128
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 8e3498ef71..630a2d41bf 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.774
-%define release 231123
+%define release 231128
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 5fdf76928f..0465566c29 100755
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.774"
-PI_BUILD="231123"
+PI_BUILD="231128"
OS_NAME=`uname -s`
FORCE=0
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index 246bd6dc3e..5320cdc50f 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
-{231123}
+{231128}
ViewReadme
{Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index fc84cd3119..e3354d8624 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.774 Build 231123")
+#define PANDORA_VERSION ("7.0NG.774 Build 231128")
string pandora_path;
string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index 8a8f1ac85e..4748301aed 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.774(Build 231123))"
+ VALUE "ProductVersion", "(7.0NG.774(Build 231128))"
VALUE "FileVersion", "1.0.0.0"
END
END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index 3a99aa4b24..5967daa525 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-console
-Version: 7.0NG.774-231123
+Version: 7.0NG.774-231128
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 31b6c1c366..08082b5f41 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.774-231123"
+pandora_version="7.0NG.774-231128"
package_pear=0
package_pandora=1
diff --git a/pandora_console/extensions/agents_modules_csv.php b/pandora_console/extensions/agents_modules_csv.php
index 6ed1061c11..e4a331338f 100644
--- a/pandora_console/extensions/agents_modules_csv.php
+++ b/pandora_console/extensions/agents_modules_csv.php
@@ -27,17 +27,18 @@
*/
global $config;
-if (true) {
- include_once '../include/config.php';
- include_once '../include/functions_agents.php';
- include_once '../include/functions_reporting.php';
- include_once '../include/functions_modules.php';
- include_once '../include/functions_users.php';
+if ((bool) $config['metaconsole']) {
include_once $config['homedir'].'/include/config.php';
include_once $config['homedir'].'/include/functions_agents.php';
include_once $config['homedir'].'/include/functions_reporting.php';
include_once $config['homedir'].'/include/functions_modules.php';
include_once $config['homedir'].'/include/functions_users.php';
+} else {
+ include_once '../include/config.php';
+ include_once '../include/functions_agents.php';
+ include_once '../include/functions_reporting.php';
+ include_once '../include/functions_modules.php';
+ include_once '../include/functions_users.php';
}
@@ -106,7 +107,25 @@ if ($get_agents_module_csv === '1') {
foreach ($results as $result) {
foreach ($result as $key => $value) {
- $out_csv .= io_safe_output($value).$divider;
+ if (preg_match('/Linux/i', $_SERVER['HTTP_USER_AGENT'])) {
+ $value = preg_replace(
+ '/\s+/',
+ ' ',
+ io_safe_output($value)
+ );
+ } else {
+ $value = mb_convert_encoding(
+ preg_replace(
+ '/\s+/',
+ '',
+ io_safe_output($value)
+ ),
+ 'UTF-16LE',
+ 'UTF-8'
+ );
+ }
+
+ $out_csv .= $value.$divider;
}
$out_csv .= "\n";
diff --git a/pandora_console/extensions/api_checker.php b/pandora_console/extensions/api_checker.php
index fce3e1a00f..38488fc9e4 100755
--- a/pandora_console/extensions/api_checker.php
+++ b/pandora_console/extensions/api_checker.php
@@ -99,7 +99,7 @@ function api_execute(
if (empty($token) === true) {
$data['apipass'] = $apipass;
$data['user'] = $user;
- $data['password'] = $password;
+ $data['pass'] = $password;
}
}
diff --git a/pandora_console/extensions/dbmanager.php b/pandora_console/extensions/dbmanager.php
index 983e208bef..acaaadd12c 100644
--- a/pandora_console/extensions/dbmanager.php
+++ b/pandora_console/extensions/dbmanager.php
@@ -90,7 +90,7 @@ function dbmgr_extension_main()
// Header.
ui_print_standard_header(
- __('Database interface'),
+ __('DB interface'),
'images/gm_db.png',
false,
'',
diff --git a/pandora_console/extras/mr/67.sql b/pandora_console/extras/mr/67.sql
index 7e598f9bd9..a594cc24e6 100644
--- a/pandora_console/extras/mr/67.sql
+++ b/pandora_console/extras/mr/67.sql
@@ -3,4 +3,9 @@ START TRANSACTION;
ALTER TABLE `tevento`
ADD COLUMN `event_custom_id` TEXT NULL AFTER `module_status`;
+-- Delete table tagent_access
+DROP TABLE tagent_access;
+
+ALTER TABLE treport_content ADD check_unknowns_graph tinyint DEFAULT 0 NULL;
+
COMMIT;
diff --git a/pandora_console/general/login_page.php b/pandora_console/general/login_page.php
index e18d278ac8..bbc499661f 100755
--- a/pandora_console/general/login_page.php
+++ b/pandora_console/general/login_page.php
@@ -418,7 +418,7 @@ switch ($login_screen) {
}
if ($config['enterprise_installed']) {
- if ($config['reset_pass_option']) {
+ if ($config['reset_pass_option'] && $config['auth'] === 'mysql') {
$reset_pass_link = 'reset_pass.php';
// Reset password link.
echo '
';
diff --git a/pandora_console/godmode/agentes/fields_manager.php b/pandora_console/godmode/agentes/fields_manager.php
index 25b06e2f5a..53b4995d20 100644
--- a/pandora_console/godmode/agentes/fields_manager.php
+++ b/pandora_console/godmode/agentes/fields_manager.php
@@ -217,6 +217,7 @@ foreach ($fields as $field) {
array_push($table->data, $data);
}
+$tablePagination = '';
if ($fields) {
html_print_table($table);
$tablePagination = ui_pagination($count_fields, false, $offset, 0, true, 'offset', false);
@@ -231,6 +232,9 @@ html_print_action_buttons(
[ 'icon' => 'next' ],
true
),
- ['type' => 'form_action']
+ [
+ 'type' => 'form_action',
+ 'right_content' => $tablePagination,
+ ],
);
echo '';
diff --git a/pandora_console/godmode/agentes/module_manager_editor_common.php b/pandora_console/godmode/agentes/module_manager_editor_common.php
index de08a299de..f987292126 100644
--- a/pandora_console/godmode/agentes/module_manager_editor_common.php
+++ b/pandora_console/godmode/agentes/module_manager_editor_common.php
@@ -1391,7 +1391,6 @@ $table_advanced->data['made_enabled'][0] = html_print_checkbox_switch(
false,
'',
false,
- false,
'wp100 static'
);
@@ -2000,7 +1999,11 @@ ui_require_jquery_file('json');
$('#' + thisLabel).prop('checked', true);
$('#' + thisLabel).siblings().prop('checked', false);
- if ($('#radius-percentage_warning').prop('checked') === true || $('#radius-percentage_critical').prop('checked') === true) {
+ var type_selected = $("#id_module_type").val();
+ var type_names = jQuery.parseJSON(Base64.decode($('#hidden-type_names').val()));
+ var type_name_selected = type_names[type_selected];
+
+ if ($('#radius-percentage_warning').prop('checked') === true || $('#radius-percentage_critical').prop('checked') === true || type_name_selected == 'generic_data_string') {
$("#svg_dinamic").hide();
} else {
paint_graph_values();
diff --git a/pandora_console/godmode/agentes/module_manager_editor_prediction.php b/pandora_console/godmode/agentes/module_manager_editor_prediction.php
index eb85a05618..095708d2b1 100644
--- a/pandora_console/godmode/agentes/module_manager_editor_prediction.php
+++ b/pandora_console/godmode/agentes/module_manager_editor_prediction.php
@@ -131,9 +131,10 @@ if ($module_service_synthetic_selector !== ENTERPRISE_NOT_HOOK) {
}
$data = [];
-$data[0] = __('Agent');
-$data[1] = __('Module');
-$data[2] = __('Period');
+
+$data[0] = __('Module');
+$data[1] = __('Period');
+
$table_simple->cellclass['caption_prediction_module'][0] = 'w33p';
$table_simple->cellclass['caption_prediction_module'][1] = 'w33p';
$table_simple->cellclass['caption_prediction_module'][2] = 'w33p';
@@ -163,34 +164,68 @@ $params['none_module_text'] = __('Select Module');
$params['use_hidden_input_idagent'] = true;
$params['input_style'] = 'width: 100%;';
$params['hidden_input_idagent_id'] = 'hidden-id_agente_module_prediction';
-$data[0] = ui_print_agent_autocomplete_input($params);
-if ($id_agente > 0) {
- $predictionModuleInput = html_print_select_from_sql(
- 'SELECT id_agente_modulo, nombre
- FROM tagente_modulo
- WHERE delete_pending = 0
- AND history_data = 1
- AND id_agente = '.$id_agente_clean.'
- AND id_agente_modulo <> '.$id_agente_modulo,
+if (strstr($page, 'policy_modules') === false) {
+ $modules = agents_get_modules($id_agente);
+
+ $predictionModuleInput = html_print_select(
+ $modules,
'prediction_module',
$prediction_module,
'',
- __('Select Module'),
+ '',
0,
true,
false,
true,
+ '',
false,
- 'width: 100%;'
+ false,
+ false,
+ false,
+ false,
+ '',
+ false,
+ false,
+ false,
+ false,
+ true,
+ false,
+ false,
+ '',
+ false,
+ 'pm'
);
} else {
- $predictionModuleInput = '
';
+ $modules = index_array(policies_get_modules($policy_id, false, ['id', 'name']));
+
+ $predictionModuleInput = html_print_select(
+ $modules,
+ 'id_module_policy',
+ $module['custom_integer_1'],
+ '',
+ '',
+ 0,
+ true,
+ false,
+ true,
+ '',
+ false,
+ false,
+ false,
+ false,
+ false,
+ '',
+ false,
+ false,
+ true
+ );
}
-$data[1] = $predictionModuleInput;
-$data[2] = html_print_select([__('Weekly'), __('Monthly'), __('Daily')], 'custom_integer_2', $custom_integer_2, '', '', 0, true, false, true, '', false, 'width: 100%;');
-$data[2] .= html_print_input_hidden('id_agente_module_prediction', $id_agente, true);
+$data[0] = $predictionModuleInput;
+$data[1] = html_print_select([__('Weekly'), __('Monthly'), __('Daily')], 'custom_integer_2', $custom_integer_2, '', '', 0, true, false, true, '', false, 'width: 100%;');
+$data[1] .= html_print_input_hidden('id_agente_module_prediction', $id_agente, true);
+
$table_simple->cellclass['prediction_module'][0] = 'w33p';
$table_simple->cellclass['prediction_module'][1] = 'w33p';
$table_simple->cellclass['prediction_module'][2] = 'w33p';
@@ -264,7 +299,7 @@ if ($selector_form !== ENTERPRISE_NOT_HOOK) {
}
// Synthetic modules are an Enterprise feature.
-$synthetic_module_form = enterprise_hook('get_synthetic_module_form');
+$synthetic_module_form = enterprise_hook('get_synthetic_module_form', [$policy_id]);
if ($synthetic_module_form !== ENTERPRISE_NOT_HOOK) {
$data = [];
$data[0] = $synthetic_module_form;
diff --git a/pandora_console/godmode/alerts/alert_templates.php b/pandora_console/godmode/alerts/alert_templates.php
index 003ec45d03..8236d1e69c 100644
--- a/pandora_console/godmode/alerts/alert_templates.php
+++ b/pandora_console/godmode/alerts/alert_templates.php
@@ -31,13 +31,14 @@ if (is_ajax()) {
return;
}
- echo '
'.$template['name'].'
';
+ echo '
'.$template['name'].'
';
+ echo html_print_image('images/info.svg', true, ['class' => 'invert_filter']);
+ echo ui_print_alert_template_example($template['id'], true, true, false);
+ echo '
';
+ echo '
';
echo '
'.__('Type').': ';
echo alerts_get_alert_templates_type_name($template['type']);
- echo '
';
- echo ui_print_alert_template_example($template['id'], true);
-
echo '
';
if ($template['description'] != '') {
diff --git a/pandora_console/godmode/alerts/configure_alert_action.php b/pandora_console/godmode/alerts/configure_alert_action.php
index 4718689da5..6d33077bf8 100644
--- a/pandora_console/godmode/alerts/configure_alert_action.php
+++ b/pandora_console/godmode/alerts/configure_alert_action.php
@@ -520,7 +520,7 @@ $(document).ready (function () {
name: "id_action",
value: ""
});
-
+
jQuery.post (,
values,
function (data, status) {
@@ -552,6 +552,9 @@ $(document).ready (function () {
// If the row is empty, hide it
if (field_row == '') {
+ // Clear hidden fields.
+ $("[name=field" + i + "_value]").val('');
+ $("[name=field" + i + "_recovery_value]").val('')
$table_macros_field.hide();
continue;
}
diff --git a/pandora_console/godmode/alerts/configure_alert_template.php b/pandora_console/godmode/alerts/configure_alert_template.php
index bbd758d9a9..7365339191 100644
--- a/pandora_console/godmode/alerts/configure_alert_template.php
+++ b/pandora_console/godmode/alerts/configure_alert_template.php
@@ -1240,7 +1240,7 @@ if ($step == 2) {
'priority',
$priority,
'',
- 0,
+ '',
0,
true,
false,
diff --git a/pandora_console/godmode/db/db_main.php b/pandora_console/godmode/db/db_main.php
index 9979b2c224..3bd4052ba2 100644
--- a/pandora_console/godmode/db/db_main.php
+++ b/pandora_console/godmode/db/db_main.php
@@ -27,7 +27,6 @@ if (! check_acl($config['id_user'], 0, 'DM')) {
// Get some general DB stats (not very heavy)
// NOTE: this is not realtime monitoring stats, are more focused on DB sanity
-$stat_access = db_get_sql('SELECT COUNT(*) FROM tagent_access WHERE id_agent != 0');
$stat_data = db_get_sql('SELECT COUNT(*) FROM tagente_datos WHERE id_agente_modulo != 0');
$stat_data_log4x = db_get_sql('SELECT COUNT(*) FROM tagente_datos_log4x WHERE id_agente_modulo != 0');
$stat_data_string = db_get_sql('SELECT COUNT(*) FROM tagente_datos_string WHERE id_agente_modulo != 0');
@@ -149,18 +148,6 @@ echo $stat_modules;
echo '';
-
-echo '
';
-echo __('Total agent access records');
-echo ' | ';
-if ($stat_access > $max_access) {
- echo "$stat_access";
-} else {
- echo $stat_access;
-}
-
-echo ' |
';
-
// Sanity
echo '
';
echo __('Database sanity');
diff --git a/pandora_console/godmode/gis_maps/configure_gis_map.php b/pandora_console/godmode/gis_maps/configure_gis_map.php
index a6f282d2cf..524ab245fb 100644
--- a/pandora_console/godmode/gis_maps/configure_gis_map.php
+++ b/pandora_console/godmode/gis_maps/configure_gis_map.php
@@ -68,7 +68,7 @@ foreach ($layer_ids as $layer_id) {
$layer_list[] = [
'id' => (strpos($layer_id, 'new_') === false) ? (int) $layer_id : null,
'layer_name' => $trimmed_name,
- 'layer_visible' => ((int) $layers[$layer_id]['visible'] === 1),
+ 'layer_visible' => ($layers[$layer_id]['visible'] === 'true'),
'layer_group' => (int) $layers[$layer_id]['agents_from_group'],
'layer_agent_list' => $layers[$layer_id]['agents'],
'layer_group_list' => $layers[$layer_id]['groups'],
@@ -560,21 +560,23 @@ html_print_table($table);
$user_groups = users_get_groups($config['user'], 'AR', false);
-echo ''.__('Layers').'';
+echo ' |
---|
+
+
+
+ |
+
+
+ |
+
+
' === 'new'){
diff --git a/pandora_console/godmode/reporting/reporting_builder.list_items.php b/pandora_console/godmode/reporting/reporting_builder.list_items.php
index d3fd439181..e92e038dfe 100755
--- a/pandora_console/godmode/reporting/reporting_builder.list_items.php
+++ b/pandora_console/godmode/reporting/reporting_builder.list_items.php
@@ -777,7 +777,7 @@ $table->data[0][0] = html_print_label_input_block(
)
);
$table->data[0][1] = html_print_label_input_block(
- __('Poisition'),
+ __('Position'),
html_print_input_text_extended(
'position_to_delete',
1,
diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php
index 095f79b14a..e0e06f0f42 100755
--- a/pandora_console/godmode/reporting/reporting_builder.php
+++ b/pandora_console/godmode/reporting/reporting_builder.php
@@ -1928,6 +1928,7 @@ switch ($action) {
$values['graph_render'] = (int) get_parameter(
'graph_render'
);
+ $values['check_unknowns_graph'] = get_parameter_switch('unknowns_graph', 0);
case 'simple_baseline_graph':
// HACK it is saved in show_graph field.
$values['show_graph'] = (int) get_parameter(
@@ -2867,6 +2868,7 @@ switch ($action) {
$values['graph_render'] = (int) get_parameter(
'graph_render'
);
+ $values['check_unknowns_graph'] = get_parameter_switch('unknowns_graph', 0);
case 'simple_baseline_graph':
// HACK it is saved in show_graph field.
$values['show_graph'] = (int) get_parameter(
diff --git a/pandora_console/godmode/reporting/visual_console_builder.data.php b/pandora_console/godmode/reporting/visual_console_builder.data.php
index 5ce3c3f679..f5cc8d059c 100644
--- a/pandora_console/godmode/reporting/visual_console_builder.data.php
+++ b/pandora_console/godmode/reporting/visual_console_builder.data.php
@@ -151,7 +151,7 @@ $table->data[0][] = html_print_label_input_block(
__('Name'),
html_print_input_text(
'name',
- $visualConsoleName,
+ io_safe_output($visualConsoleName),
'',
80,
100,
diff --git a/pandora_console/godmode/reporting/visual_console_builder.php b/pandora_console/godmode/reporting/visual_console_builder.php
index 986dcb423b..694a2a6ea3 100755
--- a/pandora_console/godmode/reporting/visual_console_builder.php
+++ b/pandora_console/godmode/reporting/visual_console_builder.php
@@ -163,7 +163,7 @@ switch ($activeTab) {
$background_color = (string) get_parameter('background_color');
$width = (int) get_parameter('width');
$height = (int) get_parameter('height');
- $visualConsoleName = (string) get_parameter('name');
+ $visualConsoleName = (string) io_safe_input(get_parameter('name'));
$is_favourite = (int) get_parameter('is_favourite_sent');
$auto_adjust = (int) get_parameter('auto_adjust_sent');
@@ -239,7 +239,7 @@ switch ($activeTab) {
if ($uploadOK == 1) {
if (move_uploaded_file($_FILES['background_image']['tmp_name'], $target_file)) {
$background = $nameImage;
- $values['background'] = $background;
+ $values['background'] = io_safe_input($background);
$error2 = chmod($target_file, 0644);
$uploadOK = $error2;
} else {
@@ -872,7 +872,7 @@ $buttons[$activeTab]['active'] = true;
$tab_builder = ($activeTab === 'editor') ? 'visual_console_editor_editor_tab' : '';
ui_print_standard_header(
- ($visualConsoleName ?? ''),
+ (io_safe_output($visualConsoleName) ?? ''),
'images/visual_console.png',
false,
$tab_builder,
diff --git a/pandora_console/godmode/servers/servers.build_table.php b/pandora_console/godmode/servers/servers.build_table.php
index 101a99d955..95b831b86c 100644
--- a/pandora_console/godmode/servers/servers.build_table.php
+++ b/pandora_console/godmode/servers/servers.build_table.php
@@ -64,32 +64,33 @@ $table->style = [];
// $table->style[0] = 'font-weight: bold';
$table->align = [];
$table->align[1] = 'center';
-$table->align[3] = 'center';
-$table->align[8] = 'right';
+$table->align[4] = 'center';
+$table->align[9] = 'right';
$table->headstyle[1] = 'text-align:center';
-$table->headstyle[3] = 'text-align:center';
-$table->headstyle[8] = 'text-align:right;width: 120px;';
+$table->headstyle[4] = 'text-align:center';
+$table->headstyle[9] = 'text-align:right;width: 120px;';
$table->titleclass = 'tabletitle';
$table->titlestyle = 'text-transform:uppercase;';
-$table->style[6] = 'display: flex;align-items: center;';
+$table->style[7] = 'display: flex;align-items: center;';
$table->head = [];
$table->head[0] = __('Name');
$table->head[1] = __('Status');
$table->head[2] = __('Type');
-$table->head[3] = __('Version');
-$table->head[4] = __('Modules');
-$table->head[5] = __('Lag').ui_print_help_tip(__('Avg. Delay(sec)/Modules delayed'), true);
-$table->head[6] = __('T/Q').ui_print_help_tip(__('Threads / Queued modules currently'), true);
+$table->head[3] = __('Master');
+$table->head[4] = __('Version');
+$table->head[5] = __('Modules');
+$table->head[6] = __('Lag').ui_print_help_tip(__('Avg. Delay(sec)/Modules delayed'), true);
+$table->head[7] = __('T/Q').ui_print_help_tip(__('Threads / Queued modules currently'), true);
// This will have a column of data such as "6 hours".
-$table->head[7] = __('Updated');
+$table->head[8] = __('Updated');
// Only Pandora Administrator can delete servers.
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
- $table->head[8] = ''.__('Op.').'';
+ $table->head[9] = ''.__('Op.').'';
}
$table->data = [];
@@ -143,9 +144,11 @@ foreach ($servers as $server) {
}
// Type.
- $data[2] = ''.$server['img'];
+ $data[2] = ''.$server['img'].' '.$server['name'];
if ($server['master'] == $master) {
- $data[2] .= ui_print_help_tip(__('This is a master server'), true);
+ $data[3] .= __('Yes', true);
+ } else {
+ $data[3] .= __('-');
}
if ((int) $server['exec_proxy'] === 1) {
@@ -157,27 +160,27 @@ foreach ($servers as $server) {
case 'event':
case 'autoprovision':
case 'migration':
- $data[3] = $server['version'];
- $data[4] = __('N/A');
+ $data[4] = $server['version'];
$data[5] = __('N/A');
+ $data[6] = __('N/A');
break;
case 'export':
- $data[3] = $server['version'];
- $data[4] = $server['modules'].' '.__('of').' '.$server['modules_total'];
- $data[5] = __('N/A');
+ $data[4] = $server['version'];
+ $data[5] = $server['modules'].' '.__('of').' '.$server['modules_total'];
+ $data[6] = __('N/A');
break;
default:
- $data[3] = $server['version'];
- $data[4] = $server['modules'].' '.__('of').' '.$server['modules_total'];
- $data[5] = ''.$server['lag_txt'].'';
+ $data[4] = $server['version'];
+ $data[5] = $server['modules'].' '.__('of').' '.$server['modules_total'];
+ $data[6] = ''.$server['lag_txt'].'';
break;
}
- $data[6] = '';
+ $data[7] = '';
if ($server['queued_modules'] > 500) {
- $data[6] .= ''.html_print_image(
+ $data[7] .= ' ';
}
- $data[6] .= $server['threads'].' : '.$server['queued_modules'];
+ $data[7] .= $server['threads'].' : '.$server['queued_modules'];
- $data[7] = ui_print_timestamp($server['keepalive'], true);
+ $data[8] = ui_print_timestamp($server['keepalive'], true);
if ($server['type'] === 'data') {
$ext = '_server';
@@ -208,11 +211,11 @@ foreach ($servers as $server) {
// Only Pandora Administrator can delete servers.
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
- $data[8] = '';
+ $data[9] = '';
if ($server['type'] === 'recon') {
- $data[8] .= '';
- $data[8] .= html_print_image(
+ $data[9] .= '';
+ $data[9] .= html_print_image(
'images/snmp-trap@svg.svg',
true,
[
@@ -221,12 +224,12 @@ foreach ($servers as $server) {
]
);
- $data[8] .= '';
+ $data[9] .= '';
}
if ($server['type'] === 'data') {
- $data[8] .= ' ';
- $data[8] .= html_print_image(
+ $data[9] .= '';
+ $data[9] .= html_print_image(
'images/force@svg.svg',
true,
[
@@ -234,10 +237,10 @@ foreach ($servers as $server) {
'class' => 'main_menu_icon invert_filter',
]
);
- $data[8] .= '';
+ $data[9] .= '';
} else if ($server['type'] === 'enterprise snmp') {
- $data[8] .= ' ';
- $data[8] .= html_print_image(
+ $data[9] .= '';
+ $data[9] .= html_print_image(
'images/force@svg.svg',
true,
[
@@ -245,12 +248,12 @@ foreach ($servers as $server) {
'class' => 'main_menu_icon invert_filter',
]
);
- $data[8] .= '';
+ $data[9] .= '';
}
if ($server['type'] === 'event' && (bool) check_acl($config['id_user'], 0, 'LM') === true) {
- $data[8] .= ' ';
- $data[8] .= html_print_image(
+ $data[9] .= '';
+ $data[9] .= html_print_image(
'images/alert@svg.svg',
true,
[
@@ -258,11 +261,11 @@ foreach ($servers as $server) {
'class' => 'main_menu_icon invert_filter',
]
);
- $data[8] .= '';
+ $data[9] .= '';
}
- $data[8] .= ' ';
- $data[8] .= html_print_image(
+ $data[9] .= '';
+ $data[9] .= html_print_image(
'images/edit.svg',
true,
[
@@ -270,11 +273,11 @@ foreach ($servers as $server) {
'class' => 'main_menu_icon invert_filter',
]
);
- $data[8] .= '';
+ $data[9] .= '';
if (($names_servers[$safe_server_name] === true) && ($ext === '_server' || $server['type'] === 'enterprise satellite')) {
- $data[8] .= ' ';
- $data[8] .= html_print_image(
+ $data[9] .= '';
+ $data[9] .= html_print_image(
'images/agents@svg.svg',
true,
[
@@ -282,10 +285,10 @@ foreach ($servers as $server) {
'class' => 'main_menu_icon invert_filter',
]
);
- $data[8] .= '';
+ $data[9] .= '';
- $data[8] .= ' ';
- $data[8] .= html_print_image(
+ $data[9] .= '';
+ $data[9] .= html_print_image(
'images/remote-configuration@svg.svg',
true,
[
@@ -293,12 +296,12 @@ foreach ($servers as $server) {
'class' => 'main_menu_icon invert_filter',
]
);
- $data[8] .= '';
+ $data[9] .= '';
$names_servers[$safe_server_name] = false;
}
- $data[8] .= ' ';
- $data[8] .= html_print_image(
+ $data[9] .= '';
+ $data[9] .= html_print_image(
'images/delete.svg',
true,
[
@@ -307,14 +310,14 @@ foreach ($servers as $server) {
'class' => 'main_menu_icon invert_filter',
]
);
- $data[8] .= '';
+ $data[9] .= '';
}
if ($tiny) {
- unset($data[4]);
- unset($data[6]);
+ unset($data[5]);
unset($data[7]);
unset($data[8]);
+ unset($data[9]);
}
$ext = '';
@@ -323,10 +326,10 @@ foreach ($servers as $server) {
}
if ($tiny) {
- unset($table->head[4]);
- unset($table->head[6]);
+ unset($table->head[5]);
unset($table->head[7]);
unset($table->head[8]);
+ unset($table->head[9]);
}
if ($tiny) {
diff --git a/pandora_console/godmode/setup/file_manager.php b/pandora_console/godmode/setup/file_manager.php
index cfcf3c0827..211af66cb7 100644
--- a/pandora_console/godmode/setup/file_manager.php
+++ b/pandora_console/godmode/setup/file_manager.php
@@ -71,6 +71,8 @@ if (isset($config['filemanager']['message']) === true) {
$fallback_directory = 'images';
// Get directory.
$directory = (string) get_parameter('directory');
+$directory = str_replace('<', '', $text);
+$directory = str_replace('>', '', $text);
if (empty($directory) === true) {
$directory = $fallback_directory;
} else {
diff --git a/pandora_console/godmode/setup/os.builder.php b/pandora_console/godmode/setup/os.builder.php
index 2d0e54a681..6313aa3edd 100644
--- a/pandora_console/godmode/setup/os.builder.php
+++ b/pandora_console/godmode/setup/os.builder.php
@@ -46,7 +46,7 @@ if ($idOS > 0) {
$description = $os['description'];
$icon = $os['icon_name'];
} else {
- $name = io_safe_input(strip_tags(io_safe_output((string) get_parameter('name'))));
+ $name = io_safe_input(strip_tags(trim(io_safe_output((string) get_parameter('name')))));
$description = io_safe_input(strip_tags(io_safe_output((string) get_parameter('description'))));
$icon = get_parameter('icon', 0);
}
@@ -87,9 +87,16 @@ if ($is_management_allowed === true) {
if (in_array($file_ext, $allowed_extensions) === false) {
$message = 9;
+ } else if (exif_imagetype($file_tmp) === false && $file_ext !== 'svg') {
+ $message = 10;
} else {
$message = 8;
- move_uploaded_file($file_tmp, $config['homedir'].'/images/os_icons/'.$file_name);
+
+ $file_uploaded = move_uploaded_file($file_tmp, $config['homedir'].'/images/os_icons/'.$file_name);
+
+ if ($file_uploaded !== true) {
+ $message = 10;
+ }
}
}
} else {
@@ -108,7 +115,7 @@ if ($is_management_allowed === true) {
if ($resultOrId === false) {
$message = 2;
- $tab = 'builder';
+ $tab = 'manage_os';
$actionHidden = 'save';
$textButton = __('Create');
$classButton = ['icon' => 'wand'];
@@ -144,13 +151,19 @@ if ($is_management_allowed === true) {
if (in_array($file_ext, $allowed_extensions) === false) {
$message = 9;
+ } else if (exif_imagetype($file_tmp) === false) {
+ $message = 10;
} else {
$message = 8;
- move_uploaded_file($file_tmp, $config['homedir'].'/images/os_icons/'.$file_name);
+ $file_uploaded = move_uploaded_file($file_tmp, $config['homedir'].'/images/os_icons/'.$file_name);
+
+ if ($file_uploaded !== true) {
+ $message = 10;
+ }
}
}
} else {
- $name = io_safe_input(strip_tags(io_safe_output((string) get_parameter('name'))));
+ $name = io_safe_input(strip_tags(trim(io_safe_output((string) get_parameter('name')))));
$description = io_safe_input(strip_tags(io_safe_output((string) get_parameter('description'))));
$icon = get_parameter('icon', 0);
@@ -254,7 +267,7 @@ $table->class = 'databox filter-table-adv';
$table->data[0][] = html_print_label_input_block(
__('Name'),
- html_print_input_text('name', $name, __('Name'), 20, 30, true, false, false, '', 'w250px')
+ html_print_input_text('name', $name, __('Name'), 20, 30, true, false, true, '', 'w250px')
);
$table->data[0][] = html_print_label_input_block(
@@ -290,6 +303,28 @@ html_print_action_buttons(
echo '';
+$id_message = get_parameter('id_message', 0);
+
+if ($id_message !== 0) {
+ switch ($id_message) {
+ case 8:
+ echo ui_print_success_message(__('Icon successfuly uploaded'), '', true);
+ break;
+
+ case 9:
+ echo ui_print_error_message(__('File must be of type JPG, JPEG, PNG or SVG'), '', true);
+ break;
+
+ case 10:
+ echo ui_print_error_message(__('An error ocurrered to upload icon'), '', true);
+ break;
+
+ default:
+ // Nothing to do.
+ break;
+ }
+}
+
function get_list_os_icons_dir()
{
diff --git a/pandora_console/godmode/setup/os.php b/pandora_console/godmode/setup/os.php
index 99402ff30a..dcfe95ecdb 100644
--- a/pandora_console/godmode/setup/os.php
+++ b/pandora_console/godmode/setup/os.php
@@ -162,11 +162,15 @@ if (empty($id_message) === false) {
break;
case 8:
- echo ui_print_success_message(__('Icon successfuly uploaded'), '', true);
+ header('Location: index.php?sec=gagente&sec2=godmode/setup/os&tab=manage_os&action=edit&id_message=8');
break;
case 9:
- echo ui_print_error_message(__('File must be of type JPG, JPEG, PNG or SVG'), '', true);
+ header('Location: index.php?sec=gagente&sec2=godmode/setup/os&tab=manage_os&action=edit&id_message=9');
+ break;
+
+ case 10:
+ header('Location: index.php?sec=gagente&sec2=godmode/setup/os&tab=manage_os&action=edit&id_message=10');
break;
default:
diff --git a/pandora_console/godmode/setup/performance.php b/pandora_console/godmode/setup/performance.php
index 51cd554a66..870c4c283a 100644
--- a/pandora_console/godmode/setup/performance.php
+++ b/pandora_console/godmode/setup/performance.php
@@ -154,8 +154,7 @@ if ($update_config == 1 && $config['history_db_enabled'] == 1) {
$performance_variables_control = (array) json_decode(io_safe_output($config['performance_variables_control']));
$total_agents = db_get_value('count(*)', 'tagente');
-$disable_agentaccess = ($total_agents >= 200 && $config['agentaccess'] == 0) ? true : false;
-
+// $disable_agentaccess = ($total_agents >= 200 && $config['agentaccess'] == 0) ? true : false;
$table_status = new StdClass();
$table_status->width = '100%';
$table_status->class = 'databox filters';
@@ -666,8 +665,8 @@ $table_other->data[2][1] = html_print_label_input_block(
true
)
);
-
-$table_other->data[3][0] = html_print_label_input_block(
+/*
+ $table_other->data[3][0] = html_print_label_input_block(
__('Use agent access graph'),
html_print_checkbox_switch(
'agentaccess',
@@ -676,9 +675,9 @@ $table_other->data[3][0] = html_print_label_input_block(
true,
$disable_agentaccess
)
-);
-
-$table_other->data[3][1] = html_print_label_input_block(
+ );
+*/
+$table_other->data[3][0] = html_print_label_input_block(
__('Max. recommended number of files in attachment directory'),
html_print_input_text(
'num_files_attachment',
diff --git a/pandora_console/godmode/setup/setup.php b/pandora_console/godmode/setup/setup.php
index 0fd6bebff8..0f3b494fc5 100644
--- a/pandora_console/godmode/setup/setup.php
+++ b/pandora_console/godmode/setup/setup.php
@@ -93,7 +93,7 @@ $buttons['general'] = [
'images/setup.png',
true,
[
- 'title' => __('General'),
+ 'title' => __('General setup'),
'class' => 'invert_filter',
]
@@ -265,7 +265,7 @@ if (enterprise_installed()) {
switch ($section) {
case 'general':
$buttons['general']['active'] = true;
- $subpage = __('General');
+ $subpage = __('General setup');
$help_header = 'setup_general_tab';
break;
@@ -370,14 +370,14 @@ switch ($section) {
break;
default:
- $subpage = 'seccion: '.$section;
+ $subpage = 'seccion: ';
// Default.
break;
}
// Header.
ui_print_standard_header(
- $subpage,
+ __('Setup').' » '.$subpage,
'',
false,
$help_header,
@@ -388,6 +388,10 @@ ui_print_standard_header(
'link' => '',
'label' => __('Setup'),
],
+ [
+ 'link' => '',
+ 'label' => $subpage,
+ ],
]
);
diff --git a/pandora_console/godmode/setup/setup_auth.php b/pandora_console/godmode/setup/setup_auth.php
index 40a816a6fa..f9f2afcd14 100644
--- a/pandora_console/godmode/setup/setup_auth.php
+++ b/pandora_console/godmode/setup/setup_auth.php
@@ -535,16 +535,47 @@ html_print_action_buttons(
__('Update'),
'update_button',
false,
- [ 'icon' => 'update' ],
+ [
+ 'icon' => 'update',
+ 'onclick' => 'onFormSubmit()',
+ ],
true
)
);
echo '';
+echo ui_print_warning_message(
+ [
+ 'message' => __('Session timeout must be a number'),
+ 'force_class' => 'invisible js_warning_msg',
+ ],
+ '',
+ true
+);
?>
diff --git a/pandora_console/operation/menu.php b/pandora_console/operation/menu.php
index 3794a30ae3..c800d9b372 100644
--- a/pandora_console/operation/menu.php
+++ b/pandora_console/operation/menu.php
@@ -819,13 +819,6 @@ if ($access_console_node === true) {
}
}
}
-
- if (!empty($sub)) {
- $menu_operation['extensions']['text'] = __('Tools');
- $menu_operation['extensions']['sec2'] = 'operation/extensions';
- $menu_operation['extensions']['id'] = 'oper-extensions';
- $menu_operation['extensions']['sub'] = $sub;
- }
}
// ~ }
diff --git a/pandora_console/operation/messages/message_edit.php b/pandora_console/operation/messages/message_edit.php
index d2d3520b2b..cc197960ed 100644
--- a/pandora_console/operation/messages/message_edit.php
+++ b/pandora_console/operation/messages/message_edit.php
@@ -38,7 +38,7 @@ $send_mes = (bool) get_parameter('send_mes', false);
$new_msg = (string) get_parameter('new_msg');
$dst_user = get_parameter('dst_user');
$dst_group = get_parameter('dst_group');
-$subject = io_safe_html_tags(get_parameter('subject'));
+$subject = io_safe_input(get_parameter('subject'));
$message = (string) get_parameter('message');
$read_message = (bool) get_parameter('read_message', false);
$reply = (bool) get_parameter('reply', false);
@@ -132,7 +132,7 @@ if ($read_message) {
echo ' Conversation with '.$user_name.'';
}
- echo ' Subject: '.$message['subject'].'';
+ echo ' Subject: '.io_safe_output($message['subject']).'';
$conversation = messages_get_conversation($message);
diff --git a/pandora_console/operation/messages/message_list.php b/pandora_console/operation/messages/message_list.php
index d7dc2881da..26ffbc5bfe 100644
--- a/pandora_console/operation/messages/message_list.php
+++ b/pandora_console/operation/messages/message_list.php
@@ -259,7 +259,7 @@ if (empty($messages) === true) {
$pathSubject = 'index.php?sec=message_list&sec2=operation/messages/message_edit&read_message=1&id_message='.$message_id;
}
- $contentSubject = (empty($message['subject']) === true) ? __('No Subject') : $message['subject'];
+ $contentSubject = (empty($message['subject']) === true) ? __('No Subject') : io_safe_output($message['subject']);
if ((int) $message['read'] !== 1) {
$contentSubject = ' '.$contentSubject.'';
diff --git a/pandora_console/operation/search_agents.getdata.php b/pandora_console/operation/search_agents.getdata.php
index bdeea391a1..d8182385b2 100644
--- a/pandora_console/operation/search_agents.getdata.php
+++ b/pandora_console/operation/search_agents.getdata.php
@@ -72,6 +72,7 @@ if ($searchAgents) {
$has_secondary = enterprise_hook('agents_is_using_secondary_groups');
$stringSearchSQL = str_replace('&', '&', $stringSearchSQL);
+ $stringSearchSQL = str_replace('\', '\\', $stringSearchSQL);
$sql = "SELECT DISTINCT taddress_agent.id_agent FROM taddress
INNER JOIN taddress_agent ON
taddress.id_a = taddress_agent.id_a
diff --git a/pandora_console/operation/search_modules.getdata.php b/pandora_console/operation/search_modules.getdata.php
index e83c6035ef..a278ca8cd0 100644
--- a/pandora_console/operation/search_modules.getdata.php
+++ b/pandora_console/operation/search_modules.getdata.php
@@ -19,17 +19,25 @@ require_once $config['homedir'].'/include/functions_users.php';
$searchModules = check_acl($config['id_user'], 0, 'AR');
-$selectModuleNameUp = '';
-$selectModuleNameDown = '';
-$selectAgentNameUp = '';
-$selectAgentNameDown = '';
+if ($config['style'] === 'pandora_black') {
+ $selectModuleNameUp = '';
+ $selectModuleNameDown = '';
+ $selectAgentNameUp = '';
+ $selectAgentNameDown = '';
+} else {
+ $selectModuleNameUp = '_black';
+ $selectModuleNameDown = '_black';
+ $selectAgentNameUp = '_black';
+ $selectAgentNameDown = '_black';
+}
+
$is_admin = (bool) db_get_value('is_admin', 'tusuario', 'id_user', $config['id_user']);
switch ($sortField) {
case 'module_name':
switch ($sort) {
case 'up':
- $selectModuleNameUp = $selected;
+ $selectModuleNameUp = $selected_module;
$order = [
'field' => 'module_name',
'order' => 'ASC',
@@ -37,7 +45,7 @@ switch ($sortField) {
break;
case 'down':
- $selectModuleNameDown = $selected;
+ $selectModuleNameDown = $selected_module;
$order = [
'field' => 'module_name',
'order' => 'DESC',
@@ -49,7 +57,7 @@ switch ($sortField) {
case 'agent_name':
switch ($sort) {
case 'up':
- $selectAgentNameUp = $selected;
+ $selectAgentNameUp = $selected_module;
$order = [
'field' => 'agent_name',
'order' => 'ASC',
@@ -57,7 +65,7 @@ switch ($sortField) {
break;
case 'down':
- $selectAgentNameDown = $selected;
+ $selectAgentNameDown = $selected_module;
$order = [
'field' => 'agent_name',
'order' => 'DESC',
@@ -67,7 +75,7 @@ switch ($sortField) {
break;
default:
- $selectModuleNameUp = $selected;
+ $selectModuleNameUp = $selected_module;
$order = [
'field' => 'module_name',
'order' => 'ASC',
diff --git a/pandora_console/operation/search_modules.php b/pandora_console/operation/search_modules.php
index 6d35064b68..e2ae260d3c 100644
--- a/pandora_console/operation/search_modules.php
+++ b/pandora_console/operation/search_modules.php
@@ -30,10 +30,9 @@ if (!$modules || !$searchModules) {
$table->cellspacing = 4;
$table->width = '98%';
$table->class = 'info_table';
-
$table->head = [];
- $table->head[0] = __('Module').' '.html_print_image('images/sort_up.png', true, ['style' => $selectModuleNameUp]).''.html_print_image('images/sort_down.png', true, ['style' => $selectModuleNameDown]).'';
- $table->head[1] = __('Agent').' '.html_print_image('images/sort_up.png', true, ['style' => $selectAgentNameUp]).''.html_print_image('images/sort_down.png', true, ['style' => $selectAgentNameDown]).'';
+ $table->head[0] = __('Module').' '.html_print_image('images/sort_up'.$selectModuleNameUp.'.png', true).''.html_print_image('images/sort_down'.$selectModuleNameDown.'.png', true).'';
+ $table->head[1] = __('Agent').' '.html_print_image('images/sort_up'.$selectAgentNameUp.'.png', true).''.html_print_image('images/sort_down'.$selectAgentNameDown.'.png', true).'';
$table->head[2] = __('Type');
$table->head[3] = __('Interval');
$table->head[4] = __('Status');
@@ -80,6 +79,9 @@ if (!$modules || !$searchModules) {
$module['datos'] = modules_get_last_value($module['id_agente_modulo']);
$module['module_name'] = $module['nombre'];
+ $linked_module_name = ' ';
+ $linked_module_name .= $module['module_name'];
+ $linked_module_name .= '';
// To search the monitor status
$status_sql = sprintf('SELECT estado from tagente_estado where id_agente_modulo ='.$module['id_agente_modulo']);
$status_sql = db_process_sql($status_sql);
@@ -217,7 +219,7 @@ if (!$modules || !$searchModules) {
$url_edit = 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$module['id_agente'].'&tab=module&id_agent_module='.$module['id_agente_modulo'].'&edit_module=1';
- $edit_module = ' '.html_print_image('images/edit.svg', true).'';
+ $edit_module = ' '.html_print_image('images/edit.svg', true, ['class' => 'invert_filter main_menu_icon']).'';
} else {
$edit_module = '';
}
@@ -226,7 +228,7 @@ if (!$modules || !$searchModules) {
array_push(
$table->data,
[
- $module['module_name'],
+ $linked_module_name,
$agentCell,
$typeCell,
$intervalCell,
diff --git a/pandora_console/operation/search_results.php b/pandora_console/operation/search_results.php
index cef9788be0..76638e3525 100644
--- a/pandora_console/operation/search_results.php
+++ b/pandora_console/operation/search_results.php
@@ -60,7 +60,7 @@ $order = null;
$sortField = get_parameter('sort_field');
$sort = get_parameter('sort', 'none');
$selected = 'border: 1px solid black;';
-
+$selected_module = '_green';
if ($searchMain) {
$main_tab = [
'text' => " ".html_print_image(
diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec
index 8249ba13d6..0bfd28d7df 100644
--- a/pandora_console/pandora_console.redhat.spec
+++ b/pandora_console/pandora_console.redhat.spec
@@ -6,7 +6,7 @@
%define debug_package %{nil}
%define name pandorafms_console
%define version 7.0NG.774
-%define release 231123
+%define release 231128
# User and Group under which Apache is running
%define httpd_name httpd
diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec
index f1cd103edd..c990a10693 100644
--- a/pandora_console/pandora_console.rhel7.spec
+++ b/pandora_console/pandora_console.rhel7.spec
@@ -6,7 +6,7 @@
%define debug_package %{nil}
%define name pandorafms_console
%define version 7.0NG.774
-%define release 231123
+%define release 231128
# User and Group under which Apache is running
%define httpd_name httpd
diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec
index ec3d23c877..a66e332559 100644
--- a/pandora_console/pandora_console.spec
+++ b/pandora_console/pandora_console.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.774
-%define release 231123
+%define release 231128
%define httpd_name httpd
# User and Group under which Apache is running
%define httpd_name apache2
diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql
index 9f63bdf12b..8c6aacd54d 100644
--- a/pandora_console/pandoradb.sql
+++ b/pandora_console/pandoradb.sql
@@ -293,12 +293,12 @@ CREATE TABLE IF NOT EXISTS `tagente_modulo` (
-- -----------------------------------------------------
-- Table `tagent_access`
-- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS `tagent_access` (
- `id_agent` INT UNSIGNED NOT NULL DEFAULT 0,
- `utimestamp` BIGINT NOT NULL DEFAULT 0,
- KEY `agent_index` (`id_agent`),
- KEY `idx_utimestamp` USING BTREE (`utimestamp`)
-) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
+-- CREATE TABLE IF NOT EXISTS `tagent_access` (
+-- `id_agent` INT UNSIGNED NOT NULL DEFAULT 0,
+-- `utimestamp` BIGINT NOT NULL DEFAULT 0,
+-- KEY `agent_index` (`id_agent`),
+-- KEY `idx_utimestamp` USING BTREE (`utimestamp`)
+-- ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
-- -----------------------------------------------------
-- Table `talert_snmp`
@@ -1647,6 +1647,7 @@ CREATE TABLE IF NOT EXISTS `treport_content` (
`cat_security_hardening` INT NOT NULL DEFAULT 0,
`ignore_skipped` INT NOT NULL DEFAULT 0,
`status_of_check` TINYTEXT,
+ `check_unknowns_graph` tinyint DEFAULT '0',
PRIMARY KEY(`id_rc`),
FOREIGN KEY (`id_report`) REFERENCES treport(`id_report`)
ON UPDATE CASCADE ON DELETE CASCADE
diff --git a/pandora_console/update_manager_client/lib/UpdateManager/Client.php b/pandora_console/update_manager_client/lib/UpdateManager/Client.php
index c75c84fefb..a0ca625009 100644
--- a/pandora_console/update_manager_client/lib/UpdateManager/Client.php
+++ b/pandora_console/update_manager_client/lib/UpdateManager/Client.php
@@ -1378,6 +1378,34 @@ class Client
}
+ private function getDirectorySize($directory)
+ {
+ if (is_string($directory) === false || is_dir($directory) === false) {
+ throw new \InvalidArgumentException('Invalid directory path');
+ }
+
+ $size = 0;
+
+ if ($handle = opendir($directory)) {
+ while (false !== ($file = readdir($handle))) {
+ if ($file != '.' && $file != '..') {
+ $path = $directory.DIRECTORY_SEPARATOR.$file;
+ if (is_dir($path) === true) {
+ // Recursive call for subdirectories.
+ $size += $this->getDirectorySize($path);
+ } else {
+ $size += filesize($path);
+ }
+ }
+ }
+
+ closedir($handle);
+ }
+
+ return $size;
+ }
+
+
/**
* Update files.
*
@@ -1395,7 +1423,8 @@ class Client
string $from,
string $to,
bool $test=false,
- bool $classic=false
+ bool $classic=false,
+ bool $called_recursively=false
) :void {
if (is_dir($from) !== true || is_readable($from) !== true) {
throw new \Exception('Cannot access patch files '.$from);
@@ -1416,6 +1445,18 @@ class Client
throw new \Exception('Files are not readable');
}
+ if ($test === true && $called_recursively === false) {
+ // Get size of folder and its subfolders corresponding to "from" path containing those files
+ // that will be updated in product.
+ // Do once.
+ $source_size = $this->getDirectorySize($from);
+
+ // Check available disk space before writing files.
+ if (disk_free_space($to) < $source_size) {
+ throw new \Exception('Not enough disk space to write the files');
+ }
+ }
+
$created_directories = [];
while (($pf = readdir($pd)) !== false) {
@@ -1440,11 +1481,13 @@ class Client
$created_directories[] = $dest;
}
- $this->updateFiles($version, $pf.'/', $to, $test, $classic);
+ $this->updateFiles($version, $pf.'/', $to, $test, $classic, true);
} else {
// It's a file.
if ($test === true) {
- if (is_writable($target_folder) !== true) {
+ if (is_writable($target_folder) !== true
+ || (file_exists($dest) === true && is_writable($dest) !== true)
+ ) {
throw new \Exception($dest.' is not writable');
}
} else {
diff --git a/pandora_console/views/dashboard/cell.php b/pandora_console/views/dashboard/cell.php
index 919ce9e07e..7816f79351 100644
--- a/pandora_console/views/dashboard/cell.php
+++ b/pandora_console/views/dashboard/cell.php
@@ -34,9 +34,8 @@ if ($redraw === false) {
$output .= ' |