From 3e90c362503a1b3a1c98d5fd581219651b80e9c4 Mon Sep 17 00:00:00 2001 From: sergio Date: Mon, 28 Nov 2022 11:31:44 +0100 Subject: [PATCH 01/56] #9713 New button for real path in filemanager --- .../include/functions_filemanager.php | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/pandora_console/include/functions_filemanager.php b/pandora_console/include/functions_filemanager.php index 94e16e822b..cfa7ed143c 100644 --- a/pandora_console/include/functions_filemanager.php +++ b/pandora_console/include/functions_filemanager.php @@ -571,6 +571,40 @@ function filemanager_file_explorer( } }).show(); } + + function show_modal_real_path (path) { + $('#modal_real_path').addClass('file_table_modal_active'); + $('#real_path').empty(); + $('#real_path').html(path); + title_action = ""; + $('#modal_real_path') + .dialog({ + title: title_action, + resizable: true, + draggable: true, + modal: true, + overlay: { + opacity: 0.5, + background: "black" + }, + width: 448, + minWidth: 448, + minHeight: 213, + maxWidth: 800, + maxHeight: 300, + close: function () { + $('#modal_real_path').removeClass('file_table_modal_active'); + } + }).show(); + + $("#submit-submit").on("click",copyToClipboard); + } + + function copyToClipboard() { + navigator.clipboard.writeText($("#real_path").text()).then(function (){ + $('#modal_real_path').dialog('close'); + }); + } '; } + if (is_writable($fileinfo['realpath']) === true + && (is_dir($fileinfo['realpath']) === false || count(scandir($fileinfo['realpath'])) < 3) + && ($readOnly === false) + ) { + $data[4] .= ''.html_print_image('images/book_edit.png', true, ['style' => 'margin-top: 2px;', 'title' => __('Real path'), 'class' => 'invert_filter']).''; + } + $data[4] .= ''; array_push($table->data, $data); @@ -925,6 +966,18 @@ function filemanager_file_explorer( ); echo ''; + // Show Modal Real Path + $modal_real_path = "
Real path to plugin execution is:
+
+
".html_print_submit_button(__('Copy'), 'submit', false, 'class="sub next"', true).'
'; + html_print_div( + [ + 'id' => 'modal_real_path', + 'class' => 'invisible', + 'content' => $modal_real_path, + ] + ); + echo ''; } else { echo "
"; From 9cf50d005cc1b34676de072b348f41c7c9847b7e Mon Sep 17 00:00:00 2001 From: KANAYAMA Akihiro Date: Tue, 20 Dec 2022 12:06:18 +0900 Subject: [PATCH 02/56] fixed typo --- pandora_server/util/plugin/pandora_snmp_bandwidth.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_server/util/plugin/pandora_snmp_bandwidth.pl b/pandora_server/util/plugin/pandora_snmp_bandwidth.pl index 9b28848b48..db38b8444d 100755 --- a/pandora_server/util/plugin/pandora_snmp_bandwidth.pl +++ b/pandora_server/util/plugin/pandora_snmp_bandwidth.pl @@ -563,7 +563,7 @@ foreach my $iface (keys %{$analysis_tree}) { $inUsage += $analysis_tree->{$iface}{'inUsage'}; $j++; } - if (is_enabled($analysis_tree->{$iface}{'outUsage'}) || $analysis_tree->{$iface}{'inUsage'} == 0) { + if (is_enabled($analysis_tree->{$iface}{'outUsage'}) || $analysis_tree->{$iface}{'outUsage'} == 0) { $outUsage += $analysis_tree->{$iface}{'outUsage'}; $k++; } From 407ce7baa0156ee15ab18dbbd743a1330200ffe6 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Tue, 31 Jan 2023 13:33:02 +0100 Subject: [PATCH 03/56] #9003 changed command center name to Merging tool --- pandora_console/general/node_deactivated.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/general/node_deactivated.php b/pandora_console/general/node_deactivated.php index c88f4f599e..ae0e3b8f24 100644 --- a/pandora_console/general/node_deactivated.php +++ b/pandora_console/general/node_deactivated.php @@ -56,7 +56,7 @@ ui_require_css_file('maintenance'); 'Please navigate to %s to unify system', ''.__('command center').'' + ).'" target="_new">'.__('merging tool').'' ); ?>

From 2b9f7f9b09a3b76310c1bc30a0fa7a5c6458cb99 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Wed, 1 Feb 2023 10:47:36 +0100 Subject: [PATCH 04/56] #10267 limit entries in events list --- pandora_console/operation/events/events.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 18c928727a..ba27a38a6e 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -2413,8 +2413,6 @@ try { 100, 200, 500, - 1000, - -1, ], [ $config['block_size'], @@ -2423,8 +2421,6 @@ try { 100, 200, 500, - 1000, - 'All', ], ], 'order' => [ From e465fb67596758b1c039f34a91f3d70c71574688 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Wed, 1 Feb 2023 17:35:56 +0100 Subject: [PATCH 05/56] #9003 changed merging tool for command center in warning --- pandora_console/general/node_deactivated.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/general/node_deactivated.php b/pandora_console/general/node_deactivated.php index ae0e3b8f24..c88f4f599e 100644 --- a/pandora_console/general/node_deactivated.php +++ b/pandora_console/general/node_deactivated.php @@ -56,7 +56,7 @@ ui_require_css_file('maintenance'); 'Please navigate to %s to unify system', ''.__('merging tool').'' + ).'" target="_new">'.__('command center').'' ); ?>

From 18f2cee2a7698e6b6e4624d72d14400109eea0ce Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Thu, 2 Feb 2023 11:18:47 +0100 Subject: [PATCH 06/56] #10283 fixed filter design in snmp console --- .../include/class/SnmpConsole.class.php | 105 +++++++++--------- pandora_console/include/styles/tables.css | 22 +++- 2 files changed, 74 insertions(+), 53 deletions(-) diff --git a/pandora_console/include/class/SnmpConsole.class.php b/pandora_console/include/class/SnmpConsole.class.php index 9aae307bc5..96553d2ac4 100644 --- a/pandora_console/include/class/SnmpConsole.class.php +++ b/pandora_console/include/class/SnmpConsole.class.php @@ -413,73 +413,74 @@ class SnmpConsole extends HTML 'class' => 'flex-row', 'inputs' => [ [ - 'label' => __('Alert'), - 'type' => 'select', - 'id' => 'filter_alert', - 'name' => 'filter_alert', - 'class' => 'w200px', - 'fields' => $show_alerts, - 'return' => true, - 'selected' => $this->filter_alert, + 'label' => __('Alert'), + 'type' => 'select', + 'id' => 'filter_alert', + 'input_class' => 'filter_input_datatable', + 'name' => 'filter_alert', + 'fields' => $show_alerts, + 'return' => true, + 'selected' => $this->filter_alert, ], [ - 'label' => __('Severity'), - 'type' => 'select', - 'id' => 'filter_severity', - 'name' => 'filter_severity', - 'class' => 'w200px', - 'fields' => $severities, - 'return' => true, - 'selected' => $this->filter_severity, + 'label' => __('Severity'), + 'type' => 'select', + 'id' => 'filter_severity', + 'input_class' => 'filter_input_datatable', + 'name' => 'filter_severity', + 'fields' => $severities, + 'return' => true, + 'selected' => $this->filter_severity, ], [ - 'label' => __('Free search'), - 'type' => 'text', - 'class' => 'w400px', - 'id' => 'filter_free_search', - 'name' => 'filter_free_search', - 'value' => $this->filter_free_search, + 'label' => __('Free search'), + 'type' => 'text', + 'id' => 'filter_free_search', + 'input_class' => 'filter_input_datatable', + 'name' => 'filter_free_search', + 'value' => $this->filter_free_search, ], [ - 'label' => __('Status'), - 'type' => 'select', - 'id' => 'filter_status', - 'name' => 'filter_status', - 'class' => 'w200px', - 'fields' => $status_array, - 'return' => true, - 'selected' => $this->filter_status, + 'label' => __('Status'), + 'type' => 'select', + 'id' => 'filter_status', + 'input_class' => 'filter_input_datatable', + 'name' => 'filter_status', + 'fields' => $status_array, + 'return' => true, + 'selected' => $this->filter_status, ], [ - 'label' => __('Group by Enterprise String/IP'), - 'type' => 'select', - 'name' => 'filter_group_by', - 'selected' => $this->filter_group_by, - 'disabled' => false, - 'return' => true, - 'id' => 'filter_group_by', - 'fields' => [ + 'label' => __('Group by Enterprise String/IP'), + 'type' => 'select', + 'name' => 'filter_group_by', + 'selected' => $this->filter_group_by, + 'disabled' => false, + 'return' => true, + 'id' => 'filter_group_by', + 'input_class' => 'filter_input_datatable', + 'fields' => [ 0 => __('No'), 1 => __('Yes'), ], ], [ - 'label' => __('Max. hours old'), - 'type' => 'text', - 'class' => 'w200px', - 'id' => 'filter_hours_ago', - 'name' => 'filter_hours_ago', - 'value' => $this->filter_hours_ago, + 'label' => __('Max. hours old'), + 'type' => 'text', + 'id' => 'filter_hours_ago', + 'input_class' => 'filter_input_datatable', + 'name' => 'filter_hours_ago', + 'value' => $this->filter_hours_ago, ], [ - 'label' => __('Trap type'), - 'type' => 'select', - 'id' => 'filter_trap_type', - 'name' => 'filter_trap_type', - 'class' => 'w200px', - 'fields' => $trap_types, - 'return' => true, - 'selected' => $this->filter_trap_type, + 'label' => __('Trap type'), + 'type' => 'select', + 'id' => 'filter_trap_type', + 'input_class' => 'filter_input_datatable', + 'name' => 'filter_trap_type', + 'fields' => $trap_types, + 'return' => true, + 'selected' => $this->filter_trap_type, ], ], ], diff --git a/pandora_console/include/styles/tables.css b/pandora_console/include/styles/tables.css index 40ecaf11ba..fca924b6e0 100644 --- a/pandora_console/include/styles/tables.css +++ b/pandora_console/include/styles/tables.css @@ -323,6 +323,25 @@ a.pandora_pagination.current:hover { cursor: default; } +.filter_input_datatable { + width: 45% !important; + display: flex; + flex-wrap: nowrap; + flex-direction: row; + max-width: 450px; + min-width: 400px; +} +.filter_input_datatable input { + flex: 1; +} +.filter_input_datatable label { + width: 93px; + max-width: 100%; +} +.filter_input_datatable .select2.select2-container { + flex: 1; +} + /* Default datatable filter style */ .datatable_filter.content { display: flex; @@ -336,7 +355,8 @@ a.pandora_pagination.current:hover { } .datatable_filter.content li { flex: 1 1 auto; - margin: 1em auto; + margin: 1em 0; + padding: 0px 10px; } .sorting_desc { background: url(../../images/sort_down_green.png) no-repeat; From c9ea46e219f58da0df3eacbec1b89933add280f0 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Thu, 2 Feb 2023 11:25:59 +0100 Subject: [PATCH 07/56] #10283 align left input only in datatable_filter --- pandora_console/include/styles/tables.css | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/styles/tables.css b/pandora_console/include/styles/tables.css index fca924b6e0..30592ed6db 100644 --- a/pandora_console/include/styles/tables.css +++ b/pandora_console/include/styles/tables.css @@ -341,7 +341,9 @@ a.pandora_pagination.current:hover { .filter_input_datatable .select2.select2-container { flex: 1; } - +.datatable_filter.content li.filter_input_datatable { + margin: 1em 0; +} /* Default datatable filter style */ .datatable_filter.content { display: flex; @@ -355,7 +357,7 @@ a.pandora_pagination.current:hover { } .datatable_filter.content li { flex: 1 1 auto; - margin: 1em 0; + margin: 1em auto; padding: 0px 10px; } .sorting_desc { From 925880dbdbe1bd0b31859700975977909aabd5cc Mon Sep 17 00:00:00 2001 From: Jonathan Date: Thu, 2 Feb 2023 17:06:28 +0100 Subject: [PATCH 08/56] #9523 dialog title plugins --- pandora_console/godmode/servers/plugin.php | 46 +++++++++++----------- 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/pandora_console/godmode/servers/plugin.php b/pandora_console/godmode/servers/plugin.php index 5a0d8a063a..b6d78e1d98 100644 --- a/pandora_console/godmode/servers/plugin.php +++ b/pandora_console/godmode/servers/plugin.php @@ -892,7 +892,7 @@ if (($create != '') || ($view != '')) { echo ' From 1457dffe6cf80c34721327190145e5b499c56054 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Tue, 7 Feb 2023 10:30:22 +0100 Subject: [PATCH 14/56] #10296 added getSystemDate in AJAXMethods --- pandora_console/include/class/Diagnostics.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pandora_console/include/class/Diagnostics.class.php b/pandora_console/include/class/Diagnostics.class.php index 44e003fd95..99e28e3983 100644 --- a/pandora_console/include/class/Diagnostics.class.php +++ b/pandora_console/include/class/Diagnostics.class.php @@ -104,6 +104,7 @@ class Diagnostics extends Wizard 'getChartAjax', 'formFeedback', 'createdScheduleFeedbackTask', + 'getSystemDate', ]; @@ -209,6 +210,7 @@ class Diagnostics extends Wizard 'getAttachmentFolder', 'getInfoTagenteDatos', 'getServerThreads', + 'getSystemDate', ]; if ($this->pdf === true) { @@ -278,6 +280,10 @@ class Diagnostics extends Wizard $title = __('SQL show engine innodb status'); break; + case 'getSystemDate': + $title = __('Date system'); + break; + default: // Not possible. $title = ''; From 06442fa6e30cb00fe4d41245814ff53831722c96 Mon Sep 17 00:00:00 2001 From: Calvo Date: Fri, 10 Feb 2023 15:03:57 +0100 Subject: [PATCH 15/56] WIP: Omnishell error xml if YAML::Tiny not installed on agent --- pandora_agents/unix/pandora_agent | 46 ++++++++++++++++++------------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index f01ddb5744..90b7d93c7c 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -556,30 +556,38 @@ BEGIN { sub runCommand { my ($self, $ref, $output_mode) = @_; + my $result; if($self->load_libraries()) { # Functionality possible. my $command = $self->{'commands'}->{$ref}; - my $result = $self->evaluate_command($ref); - if (ref($result) eq "HASH") { - # Process command result. - if (defined($output_mode) && $output_mode eq 'xml') { - my $output = ''; - $output .= "\n"; - $output .= " \n"; - $output .= " {'name'}."]]>\n"; - $output .= " \n"; - $output .= " {'error_level'}."]]>\n"; - $output .= " {'stdout'}."]]>\n"; - $output .= " {'stderr'}."]]>\n"; - $output .= " \n"; - $output .= "\n"; + $result = $self->evaluate_command($ref); + } else { + $result = { + 'stderr' => 'Cannot use commands without YAML dependency, please install it.', + 'name' => 'YAML::Tiny', + 'error_level' => 2, + }; + } - return $output; - } - return $result; - } else { - $self->set_last_error('Failed to process ['.$ref.']: '.$result); + if (ref($result) eq "HASH") { + # Process command result. + if (defined($output_mode) && $output_mode eq 'xml') { + my $output = ''; + $output .= "\n"; + $output .= " \n"; + $output .= " {'name'}."]]>\n"; + $output .= " \n"; + $output .= " {'error_level'}."]]>\n"; + $output .= " {'stdout'}."]]>\n"; + $output .= " {'stderr'}."]]>\n"; + $output .= " \n"; + $output .= "\n"; + + return $output; } + return $result; + } else { + $self->set_last_error('Failed to process ['.$ref.']: '.$result); } return undef; From 1e5ac4281c0751f6ed6a72d2b2004c766ac1650b Mon Sep 17 00:00:00 2001 From: artica Date: Sat, 11 Feb 2023 01:02:09 +0100 Subject: [PATCH 16/56] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index b565d1ff22..19d729f0d0 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.768-230210 +Version: 7.0NG.768-230211 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 7dc4394f80..c33f1bed6d 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.768-230210" +pandora_version="7.0NG.768-230211" 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 3d0e51330f..b745fd89b1 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.768'; -use constant AGENT_BUILD => '230210'; +use constant AGENT_BUILD => '230211'; # 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 48e2b24538..ce2bcea385 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_linux %define version 7.0NG.768 -%define release 230210 +%define release 230211 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 92666a0db0..817db34242 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_linux %define version 7.0NG.768 -%define release 230210 +%define release 230211 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 b5ad7ba5c4..66c90d0773 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.768" -PI_BUILD="230210" +PI_BUILD="230211" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 8927624adc..89efa6e3c2 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{230210} +{230211} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 5067264a29..f1ffa7392a 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.768 Build 230210") +#define PANDORA_VERSION ("7.0NG.768 Build 230211") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 54596f74f5..473b20bbb9 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.768(Build 230210))" + VALUE "ProductVersion", "(7.0NG.768(Build 230211))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 9a08efb4dc..8f221ab965 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.768-230210 +Version: 7.0NG.768-230211 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 70a58b8f43..b2c8bfcebd 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.768-230210" +pandora_version="7.0NG.768-230211" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 79016bf075..176d23b0d6 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC230210'; +$build_version = 'PC230211'; $pandora_version = 'v7.0NG.768'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index e19455763e..851451d651 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -131,7 +131,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 35238d78ba..1defcc1be7 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.768 -%define release 230210 +%define release 230211 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index ab61c7894d..d99379b166 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.768 -%define release 230210 +%define release 230211 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 4a3432fbfe..0a51e9e089 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.768" -PI_BUILD="230210" +PI_BUILD="230211" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 15b8b0897e..9d0a89c017 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.768 Build 230210"; +my $version = "7.0NG.768 Build 230211"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index b0839f05af..5b81529bb2 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.768 Build 230210"; +my $version = "7.0NG.768 Build 230211"; # save program name for logging my $progname = basename($0); From 98c05a4bea3facfab91cb6fced89b39e120d0a07 Mon Sep 17 00:00:00 2001 From: artica Date: Sun, 12 Feb 2023 01:02:01 +0100 Subject: [PATCH 17/56] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 19d729f0d0..e7b513e141 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.768-230211 +Version: 7.0NG.768-230212 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 c33f1bed6d..962bdbdedc 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.768-230211" +pandora_version="7.0NG.768-230212" 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 b745fd89b1..f3c98efa21 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.768'; -use constant AGENT_BUILD => '230211'; +use constant AGENT_BUILD => '230212'; # 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 ce2bcea385..8137d70444 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_linux %define version 7.0NG.768 -%define release 230211 +%define release 230212 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 817db34242..0662632ca1 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_linux %define version 7.0NG.768 -%define release 230211 +%define release 230212 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 66c90d0773..ea44be02b3 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.768" -PI_BUILD="230211" +PI_BUILD="230212" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 89efa6e3c2..92c21d5c1d 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{230211} +{230212} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index f1ffa7392a..baebb9ff14 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.768 Build 230211") +#define PANDORA_VERSION ("7.0NG.768 Build 230212") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 473b20bbb9..754d2fed2a 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.768(Build 230211))" + VALUE "ProductVersion", "(7.0NG.768(Build 230212))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 8f221ab965..0b84ee5643 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.768-230211 +Version: 7.0NG.768-230212 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 b2c8bfcebd..810cdafcb5 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.768-230211" +pandora_version="7.0NG.768-230212" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 176d23b0d6..1155531082 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC230211'; +$build_version = 'PC230212'; $pandora_version = 'v7.0NG.768'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 851451d651..178158ddb4 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -131,7 +131,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 1defcc1be7..a777c099e7 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.768 -%define release 230211 +%define release 230212 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index d99379b166..2989d2001e 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.768 -%define release 230211 +%define release 230212 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 0a51e9e089..d09995795c 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.768" -PI_BUILD="230211" +PI_BUILD="230212" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 9d0a89c017..7909617726 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.768 Build 230211"; +my $version = "7.0NG.768 Build 230212"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 5b81529bb2..a6533edb52 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.768 Build 230211"; +my $version = "7.0NG.768 Build 230212"; # save program name for logging my $progname = basename($0); From 885c128556752d4d3848b4808d36ff876092fbcd Mon Sep 17 00:00:00 2001 From: artica Date: Mon, 13 Feb 2023 01:01:18 +0100 Subject: [PATCH 18/56] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index e7b513e141..7802c679e5 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.768-230212 +Version: 7.0NG.768-230213 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 962bdbdedc..eb4279b84f 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.768-230212" +pandora_version="7.0NG.768-230213" 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 f3c98efa21..1668a50e86 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.768'; -use constant AGENT_BUILD => '230212'; +use constant AGENT_BUILD => '230213'; # 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 8137d70444..4482ace58a 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_linux %define version 7.0NG.768 -%define release 230212 +%define release 230213 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 0662632ca1..1b07645a58 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_linux %define version 7.0NG.768 -%define release 230212 +%define release 230213 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 ea44be02b3..601db13b4b 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.768" -PI_BUILD="230212" +PI_BUILD="230213" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 92c21d5c1d..1cf8ab41dc 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{230212} +{230213} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index baebb9ff14..d44d4eb5a1 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.768 Build 230212") +#define PANDORA_VERSION ("7.0NG.768 Build 230213") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 754d2fed2a..e983b3cba2 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.768(Build 230212))" + VALUE "ProductVersion", "(7.0NG.768(Build 230213))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 0b84ee5643..8b393620b9 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.768-230212 +Version: 7.0NG.768-230213 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 810cdafcb5..399096ff6a 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.768-230212" +pandora_version="7.0NG.768-230213" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 1155531082..5a8c0631b1 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC230212'; +$build_version = 'PC230213'; $pandora_version = 'v7.0NG.768'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 178158ddb4..835b2efaea 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -131,7 +131,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index a777c099e7..90ebdbf8bc 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.768 -%define release 230212 +%define release 230213 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 2989d2001e..9698e8c1dc 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.768 -%define release 230212 +%define release 230213 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index d09995795c..52e6b86b35 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.768" -PI_BUILD="230212" +PI_BUILD="230213" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 7909617726..2667cdbbb7 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.768 Build 230212"; +my $version = "7.0NG.768 Build 230213"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index a6533edb52..378688aa67 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.768 Build 230212"; +my $version = "7.0NG.768 Build 230213"; # save program name for logging my $progname = basename($0); From 4cd0820f117a4428c65e4e6dae60603fc3d4d340 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Mon, 13 Feb 2023 11:44:01 +0100 Subject: [PATCH 19/56] #10118 Changed radio button --- .../agentes/pandora_networkmap.editor.php | 33 ++++++++++++------- .../agentes/pandora_networkmap.view.php | 30 +++++++++++++---- 2 files changed, 46 insertions(+), 17 deletions(-) diff --git a/pandora_console/operation/agentes/pandora_networkmap.editor.php b/pandora_console/operation/agentes/pandora_networkmap.editor.php index c03af62bf3..507e037b1e 100644 --- a/pandora_console/operation/agentes/pandora_networkmap.editor.php +++ b/pandora_console/operation/agentes/pandora_networkmap.editor.php @@ -352,7 +352,23 @@ if ($not_found) { $table->data[6][1] = html_print_input_text('scale_z', $scale_z, '', 2, 10, true).ui_print_help_tip(__('Introduce zoom level. 1 = Highest resolution. Figures may include decimals'), true); $table->data['source'][0] = __('Source'); - $table->data['source'][1] = html_print_radio_button('source', 'group', __('Group'), $source, true, $disabled_source).html_print_radio_button('source', 'recon_task', __('Discovery task'), $source, true, $disabled_source).html_print_radio_button('source', 'ip_mask', __('CIDR IP mask'), $source, true, $disabled_source); + $table->data['source'][1] = html_print_select( + [ + 'group' => __('Group'), + 'recon_task' => __('Discovery task'), + 'ip_mask' => __('CIDR IP mask'), + ], + 'source', + $source, + '', + '', + 0, + true, + false, + false, + '', + $disabled_source + ); $table->data['source_data_recon_task'][0] = __('Source from recon task'); $table->data['source_data_recon_task'][0] .= ui_print_help_tip( @@ -498,9 +514,9 @@ if ($not_found) { '; From d2856e09bd72c94972bcd7dbc5913b845c6bc124 Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" Date: Mon, 13 Feb 2023 13:39:20 +0100 Subject: [PATCH 20/56] implemented per-task sap license --- pandora_console/include/functions_config.php | 4 ---- pandora_server/lib/PandoraFMS/DiscoveryServer.pm | 12 ++++++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index b0d15d5cef..1acbfa0760 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -463,10 +463,6 @@ function config_update_config() if (config_update_value('ipam_ocuppied_warning_treshold', get_parameter('ipam_ocuppied_warning_treshold'), true) === false) { $error_update[] = __('Ipam Ocuppied Manager Warning'); } - - if (config_update_value('sap_license', get_parameter('sap_license'), true) === false) { - $error_update[] = __('SAP/R3 Plugin Licence'); - } } break; diff --git a/pandora_server/lib/PandoraFMS/DiscoveryServer.pm b/pandora_server/lib/PandoraFMS/DiscoveryServer.pm index e6c42fab34..2d5928333d 100644 --- a/pandora_server/lib/PandoraFMS/DiscoveryServer.pm +++ b/pandora_server/lib/PandoraFMS/DiscoveryServer.pm @@ -221,10 +221,14 @@ sub data_consumer ($$) { if ($task->{'type'} == DISCOVERY_APP_SAP) { # SAP TASK, retrieve license. - $task->{'sap_license'} = pandora_get_config_value( - $dbh, - 'sap_license' - ); + if (defined($task->{'field4'}) && $task->{'field4'} ne "") { + $task->{'sap_license'} = $task->{'field4'}; + } else { + $task->{'sap_license'} = pandora_get_config_value( + $dbh, + 'sap_license' + ); + } # Retrieve credentials for task (optional). if (defined($task->{'auth_strings'}) From b3ca6c78bf46abd2637b0a519d1d1372e8d853e3 Mon Sep 17 00:00:00 2001 From: sergio Date: Mon, 13 Feb 2023 13:58:37 +0100 Subject: [PATCH 21/56] #9713 ent Problems with the copy button fixed --- .../include/functions_filemanager.php | 193 +++++++++--------- 1 file changed, 93 insertions(+), 100 deletions(-) diff --git a/pandora_console/include/functions_filemanager.php b/pandora_console/include/functions_filemanager.php index 1db21b308a..4fc6dd0b14 100644 --- a/pandora_console/include/functions_filemanager.php +++ b/pandora_console/include/functions_filemanager.php @@ -1,4 +1,5 @@ - function show_create_text_file() { - actions_dialog('create_text_file'); - $("#create_text_file").css("display", "block"); - check_opened_dialog('create_text_file'); - } + function show_create_text_file() { + actions_dialog('create_text_file'); + $("#create_text_file").css("display", "block"); + check_opened_dialog('create_text_file'); + } + function show_upload_file() { actions_dialog('upload_file'); $("#upload_file").css("display", "block"); check_opened_dialog('upload_file'); } - function check_opened_dialog(check_opened){ - if(check_opened !== 'create_folder'){ + function check_opened_dialog(check_opened) { + if (check_opened !== 'create_folder') { if (($("#create_folder").hasClass("ui-dialog-content") && $('#create_folder').dialog('isOpen') === true)) { $('#create_folder').dialog('close'); } } - if(check_opened !== 'create_text_file'){ - if (($("#create_text_file").hasClass("ui-dialog-content") && $('#create_text_file').dialog('isOpen') === true)) { - $('#create_text_file').dialog('close'); + if (check_opened !== 'create_text_file') { + if (($("#create_text_file").hasClass("ui-dialog-content") && $('#create_text_file').dialog('isOpen') === true)) { + $('#create_text_file').dialog('close'); + } } - } - if(check_opened !== 'upload_file'){ + if (check_opened !== 'upload_file') { if (($("#upload_file").hasClass("ui-dialog-content") && $('#upload_file').dialog('isOpen')) === true) { $('#upload_file').dialog('close'); } } } - function actions_dialog(action){ - $('.'+action).addClass('file_table_modal_active'); - var title_action =''; + function actions_dialog(action) { + $('.' + action).addClass('file_table_modal_active'); + var title_action = ''; switch (action) { case 'create_folder': - title_action = ""; + title_action = ""; break; - - case 'create_text_file': - title_action = ""; - break; - + + case 'create_text_file': + title_action = ""; + break; + case 'upload_file': - title_action = ""; + title_action = ""; break; default: break; } - $('#'+action) - .dialog({ - title: title_action, - resizable: true, - draggable: true, - modal: true, - overlay: { - opacity: 0.5, - background: "black" - }, - width: 500, - minWidth: 500, - minHeight: 210, - maxWidth: 800, - maxHeight: 300, - close: function () { - $('.'+action).removeClass('file_table_modal_active'); - } - }).show(); + $('#' + action) + .dialog({ + title: title_action, + resizable: true, + draggable: true, + modal: true, + overlay: { + opacity: 0.5, + background: "black" + }, + width: 500, + minWidth: 500, + minHeight: 210, + maxWidth: 800, + maxHeight: 300, + close: function() { + $('.' + action).removeClass('file_table_modal_active'); + } + }).show(); } - function show_modal_real_path (path) { + function show_modal_real_path(path) { + if (navigator.clipboard && window.isSecureContext) ; + else ; $('#modal_real_path').addClass('file_table_modal_active'); $('#real_path').empty(); $('#real_path').html(path); title_action = ""; $('#modal_real_path') - .dialog({ - title: title_action, - resizable: true, - draggable: true, - modal: true, - overlay: { - opacity: 0.5, - background: "black" - }, - width: 448, - minWidth: 448, - minHeight: 213, - maxWidth: 800, - maxHeight: 300, - close: function () { - $('#modal_real_path').removeClass('file_table_modal_active'); - } - }).show(); + .dialog({ + title: title_action, + resizable: true, + draggable: true, + modal: true, + overlay: { + opacity: 0.5, + background: "black" + }, + width: 448, + minWidth: 448, + minHeight: 213, + maxWidth: 800, + maxHeight: 300, + close: function() { + $('#modal_real_path').removeClass('file_table_modal_active'); + } + }).show(); - $("#submit-submit").on("click",copyToClipboard); + $("#submit-submit").on("click", copyToClipboard); } function copyToClipboard() { - navigator.clipboard.writeText($("#real_path").text()).then(function (){ - $('#modal_real_path').dialog('close'); - }); + if (navigator.clipboard && window.isSecureContext) { + window.navigator.clipboard.writeText($("#real_path").text()).then(function() { + $('#modal_real_path').dialog('close'); + }); + } } '.$data[1].''; + $error_message = __('This file could be executed by any user'); + $error_message .= '. '.__('Make sure it can\'t perform dangerous tasks'); + $data[1] = ''.$data[1].''; } $data[2] = ui_print_timestamp( @@ -753,11 +742,11 @@ function filemanager_file_explorer( $data[3] = ui_format_filesize($fileinfo['size']); } - // Actions buttons - // Delete button. - $data[4] = ''; - $data[4] .= ''; - $typefile = array_pop(explode('.', $fileinfo['name'])); + // Actions buttons + // Delete button. + $data[4] = ''; + $data[4] .= ''; + $typefile = array_pop(explode('.', $fileinfo['name'])); if (is_writable($fileinfo['realpath']) === true && (is_dir($fileinfo['realpath']) === false || count(scandir($fileinfo['realpath'])) < 3) && ($readOnly === false) @@ -805,9 +794,9 @@ function filemanager_file_explorer( $data[4] .= ''.html_print_image('images/book_edit.png', true, ['style' => 'margin-top: 2px;', 'title' => __('Real path'), 'class' => 'invert_filter']).''; } - $data[4] .= ''; + $data[4] .= ''; - array_push($table->data, $data); + array_push($table->data, $data); } } else { ui_print_info_message( @@ -900,7 +889,7 @@ function filemanager_file_explorer( 'content' => html_print_input_file( 'file', true, - [ 'style' => 'border:0; padding:0; width:100%' ] + ['style' => 'border:0; padding:0; width:100%'] ), ], true @@ -985,8 +974,12 @@ function filemanager_file_explorer( // Show Modal Real Path $modal_real_path = "
Real path to plugin execution is:
-
-
".html_print_submit_button(__('Copy'), 'submit', false, 'class="sub next"', true).'
'; +
"; + + if (isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'on' || $_SERVER['SERVER_NAME'] == 'localhost' || $_SERVER['SERVER_NAME'] == '127.0.0.1') { + $modal_real_path .= "
".html_print_submit_button(__('Copy'), 'submit', false, 'class="sub next"', true).'
'; + } + html_print_div( [ 'id' => 'modal_real_path', @@ -1141,4 +1134,4 @@ function filemanager_safe_directory( } return $directory; -} \ No newline at end of file +} From a9832e9886b9bbff50c51021b0fe1d44c721ae7e Mon Sep 17 00:00:00 2001 From: Calvo Date: Mon, 13 Feb 2023 15:40:55 +0100 Subject: [PATCH 22/56] WIP: Added pandora notification if missing library on agent --- .../include/class/ConsoleSupervisor.php | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/pandora_console/include/class/ConsoleSupervisor.php b/pandora_console/include/class/ConsoleSupervisor.php index b6a6d3df43..17d7b2213a 100644 --- a/pandora_console/include/class/ConsoleSupervisor.php +++ b/pandora_console/include/class/ConsoleSupervisor.php @@ -518,6 +518,14 @@ class ConsoleSupervisor $this->checkSyncQueueLength(); $this->checkSyncQueueStatus(); } + + /* + * Checkc agent missing libraries. + * NOTIF.AGENT.LIBRARY + */ + if ((bool) enterprise_installed() === true) { + $this->checkLibaryError(); + } } @@ -2806,4 +2814,29 @@ class ConsoleSupervisor } + /** + * Chechs if an agent has a dependency eror on omnishell + * + * @return void + */ + public function checkLibaryError() + { + $sql = 'SELECT COUNT(errorlevel) from tremote_command_target WHERE errorlevel = 2'; + + $error_dependecies = db_get_sql($sql); + if ($error_dependecies > 0) { + $this->notify( + [ + 'type' => 'NOTIF.AGENT.LIBRARY', + 'title' => __('Agent dependency error'), + 'message' => __( + 'There are omnishell agents with dependency errors', + ), + 'url' => $url, + ] + ); + } + } + + } From 5b263981c477010b8d6d5dcd813cd25e1ad480ef Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Mon, 13 Feb 2023 17:06:09 +0100 Subject: [PATCH 23/56] #10118 Added group multiselector --- pandora_console/extras/mr/61.sql | 2 ++ .../include/class/NetworkMap.class.php | 21 ++++++++++++------- .../agentes/pandora_networkmap.editor.php | 14 ++++++++++--- .../operation/agentes/pandora_networkmap.php | 6 +++--- .../agentes/pandora_networkmap.view.php | 2 -- 5 files changed, 29 insertions(+), 16 deletions(-) diff --git a/pandora_console/extras/mr/61.sql b/pandora_console/extras/mr/61.sql index b73069c058..2812efb2a6 100644 --- a/pandora_console/extras/mr/61.sql +++ b/pandora_console/extras/mr/61.sql @@ -2,6 +2,8 @@ START TRANSACTION; ALTER TABLE `tserver` ADD COLUMN `server_keepalive_utimestamp` BIGINT NOT NULL DEFAULT 0; +ALTER TABLE `tmap` MODIFY COLUMN `id_group` TEXT NOT NULL default ''; + CREATE TABLE IF NOT EXISTS `tmonitor_filter` ( `id_filter` INT UNSIGNED NOT NULL AUTO_INCREMENT, `id_name` VARCHAR(600) NOT NULL, diff --git a/pandora_console/include/class/NetworkMap.class.php b/pandora_console/include/class/NetworkMap.class.php index 7b43a3daf6..ebfa966a9b 100644 --- a/pandora_console/include/class/NetworkMap.class.php +++ b/pandora_console/include/class/NetworkMap.class.php @@ -792,17 +792,22 @@ class NetworkMap || $this->mapOptions['map_filter']['dont_show_subgroups'] == 1 ) { // Show only current selected group. - $filter['id_grupo'] = $this->idGroup; + $filter['id_grupo'] = explode(',', $this->idGroup); } else { // Show current group and children. - $childrens = groups_get_children($this->idGroup, null, true); - if (!empty($childrens)) { - $childrens = array_keys($childrens); + foreach (explode(',', $this->idGroup) as $key => $group) { + $childrens = groups_get_children($group, null, true); + if (!empty($childrens)) { + $childrens = array_keys($childrens); - $filter['id_grupo'] = $childrens; - $filter['id_grupo'][] = $this->idGroup; - } else { - $filter['id_grupo'] = $this->idGroup; + if (empty($filter['id_grupo']) === false) { + $filter['id_grupo'] = array_merge($filter['id_grupo'], $childrens); + } else { + $filter['id_grupo'] = $childrens; + } + } else { + $filter['id_grupo'][] = $group; + } } } diff --git a/pandora_console/operation/agentes/pandora_networkmap.editor.php b/pandora_console/operation/agentes/pandora_networkmap.editor.php index 507e037b1e..0d2c7193e1 100644 --- a/pandora_console/operation/agentes/pandora_networkmap.editor.php +++ b/pandora_console/operation/agentes/pandora_networkmap.editor.php @@ -337,7 +337,14 @@ if ($not_found) { ); $table->data[3][0] = __('Description'); - $table->data[3][1] = html_print_textarea('description', 7, 25, $description, '', true); + $table->data[3][1] = html_print_input_text( + 'description', + $description, + '', + 100, + 100, + true + ); $table->data[4][0] = __('Position X'); $table->data[4][1] = html_print_input_text('pos_x', $offset_x, '', 2, 10, true); @@ -401,11 +408,12 @@ if ($not_found) { $config['id_user'], 'AR', true, - 'id_group', - $id_group, + 'id_group[]', + explode(',', $id_group), '', '', '', + true, true ).'
'; $table->data['source_data_group'][1] .= html_print_image( diff --git a/pandora_console/operation/agentes/pandora_networkmap.php b/pandora_console/operation/agentes/pandora_networkmap.php index 9c57ad033f..9fcf1b7fae 100644 --- a/pandora_console/operation/agentes/pandora_networkmap.php +++ b/pandora_console/operation/agentes/pandora_networkmap.php @@ -237,7 +237,7 @@ if ($new_networkmap || $save_networkmap) { } if ($save_networkmap) { - $id_group = (int) get_parameter('id_group', 0); + $id_group = get_parameter('id_group', 0); $id_group_map = (int) get_parameter('id_group_map', 0); @@ -292,7 +292,7 @@ if ($new_networkmap || $save_networkmap) { $values = []; $values['name'] = $name; - $values['id_group'] = $id_group; + $values['id_group'] = implode(',', $id_group); $values['source_period'] = 60; $values['width'] = $width; $values['height'] = $height; @@ -333,7 +333,7 @@ if ($new_networkmap || $save_networkmap) { if ($source == 'group') { $values['source'] = 0; - $values['source_data'] = $id_group; + $values['source_data'] = implode(',', $id_group); } else if ($source == 'recon_task') { $values['source'] = 1; $values['source_data'] = $recon_task_id; diff --git a/pandora_console/operation/agentes/pandora_networkmap.view.php b/pandora_console/operation/agentes/pandora_networkmap.view.php index 6613daea79..61cfba9e97 100644 --- a/pandora_console/operation/agentes/pandora_networkmap.view.php +++ b/pandora_console/operation/agentes/pandora_networkmap.view.php @@ -315,8 +315,6 @@ if (is_ajax() === true) { $("#source").change(function() { const source = $(this).val(); - console.log("aaaaaaaaaaaaaaaa"); - if (source == \'recon_task\') { $("#form_editor-source_data_ip_mask") .css(\'display\', \'none\'); From 8ca25c01a2e4e8db00d3b23bc8a1d9bc5866ba65 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Mon, 13 Feb 2023 17:11:19 +0100 Subject: [PATCH 24/56] #10384 Sql error correction delete modules in bulk --- pandora_console/include/functions_modules.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_modules.php b/pandora_console/include/functions_modules.php index 15c6da909e..aa45aacc10 100755 --- a/pandora_console/include/functions_modules.php +++ b/pandora_console/include/functions_modules.php @@ -519,12 +519,13 @@ function modules_delete_agent_module($id_agent_module) 'disabled' => 1, 'delete_pending' => 1, ]; - $result = db_process_sql_update( + $id_agent = db_process_sql_update( 'tagente_modulo', $values, ['id_agente_modulo' => $id_borrar_modulo] ); - if ($result === false) { + + if ($id_agent === false) { $error++; } else { // Set flag to update module status count. @@ -562,7 +563,7 @@ function modules_delete_agent_module($id_agent_module) $result = db_process_delete_temp( 'ttag_module', 'id_agente_modulo', - $id_borrar_modulo + $id_agent ); if ($result === false) { $error++; From 1d62129357ef41d17af10f6bdd3de92d9b3c79b9 Mon Sep 17 00:00:00 2001 From: artica Date: Tue, 14 Feb 2023 01:01:40 +0100 Subject: [PATCH 25/56] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 7802c679e5..cb4b34773f 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.768-230213 +Version: 7.0NG.768-230214 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 eb4279b84f..2fdf61f38b 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.768-230213" +pandora_version="7.0NG.768-230214" 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 1668a50e86..9d3cc8cba6 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.768'; -use constant AGENT_BUILD => '230213'; +use constant AGENT_BUILD => '230214'; # 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 4482ace58a..7a8736a942 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_linux %define version 7.0NG.768 -%define release 230213 +%define release 230214 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 1b07645a58..e3a4334b3d 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_linux %define version 7.0NG.768 -%define release 230213 +%define release 230214 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 601db13b4b..ba729305b9 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.768" -PI_BUILD="230213" +PI_BUILD="230214" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 1cf8ab41dc..15174f2833 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{230213} +{230214} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index d44d4eb5a1..5138ad8fe4 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.768 Build 230213") +#define PANDORA_VERSION ("7.0NG.768 Build 230214") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index e983b3cba2..bcba63f1ba 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.768(Build 230213))" + VALUE "ProductVersion", "(7.0NG.768(Build 230214))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 8b393620b9..5fdad46edb 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.768-230213 +Version: 7.0NG.768-230214 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 399096ff6a..02c7869a01 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.768-230213" +pandora_version="7.0NG.768-230214" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 5a8c0631b1..a38089f89a 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC230213'; +$build_version = 'PC230214'; $pandora_version = 'v7.0NG.768'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 835b2efaea..77ba7bc29c 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -131,7 +131,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 90ebdbf8bc..8dbbf2efa9 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.768 -%define release 230213 +%define release 230214 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 9698e8c1dc..e4390722e2 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.768 -%define release 230213 +%define release 230214 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 52e6b86b35..1f651d7741 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.768" -PI_BUILD="230213" +PI_BUILD="230214" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index d29d04b6a7..77d8749d2d 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.768 Build 230213"; +my $version = "7.0NG.768 Build 230214"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 378688aa67..e3522c3c6a 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.768 Build 230213"; +my $version = "7.0NG.768 Build 230214"; # save program name for logging my $progname = basename($0); From 9c4a0f8a2bcae7f3094f8d72a3ff2a5917767ff6 Mon Sep 17 00:00:00 2001 From: Calvo Date: Tue, 14 Feb 2023 09:03:51 +0100 Subject: [PATCH 26/56] Agent library error notification --- pandora_console/include/class/ConsoleSupervisor.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/class/ConsoleSupervisor.php b/pandora_console/include/class/ConsoleSupervisor.php index 17d7b2213a..1f82d1cea0 100644 --- a/pandora_console/include/class/ConsoleSupervisor.php +++ b/pandora_console/include/class/ConsoleSupervisor.php @@ -258,6 +258,14 @@ class ConsoleSupervisor $this->checkSyncQueueStatus(); } + /* + * Checkc agent missing libraries. + * NOTIF.AGENT.LIBRARY + */ + if ((bool) enterprise_installed() === true) { + $this->checkLibaryError(); + } + } @@ -2832,7 +2840,8 @@ class ConsoleSupervisor 'message' => __( 'There are omnishell agents with dependency errors', ), - 'url' => $url, + + 'url' => '__url__/index.php?sec=gextensions&sec2=enterprise/tools/omnishell', ] ); } From ccb0cda3057fa784e0675723031d1732a7113da8 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 14 Feb 2023 12:16:38 +0100 Subject: [PATCH 27/56] #10118 changed CIDR input --- .../include/class/NetworkMap.class.php | 4 ++- .../include/functions_networkmap.php | 15 ++++++----- .../agentes/pandora_networkmap.editor.php | 26 ++++++++++++++++++- .../agentes/pandora_networkmap.view.php | 11 +++++++- 4 files changed, 46 insertions(+), 10 deletions(-) diff --git a/pandora_console/include/class/NetworkMap.class.php b/pandora_console/include/class/NetworkMap.class.php index ebfa966a9b..3f1a5f6e9a 100644 --- a/pandora_console/include/class/NetworkMap.class.php +++ b/pandora_console/include/class/NetworkMap.class.php @@ -782,7 +782,9 @@ class NetworkMap if ($this->network) { // Network map, based on direct network. $nodes = networkmap_get_nodes_from_ip_mask( - $this->network + $this->network, + false, + ' ' ); } else if ($this->mapOptions['map_filter']['empty_map']) { // Empty map returns no data. diff --git a/pandora_console/include/functions_networkmap.php b/pandora_console/include/functions_networkmap.php index 120af5b571..de685384be 100644 --- a/pandora_console/include/functions_networkmap.php +++ b/pandora_console/include/functions_networkmap.php @@ -1356,9 +1356,10 @@ function networkmap_get_types($strict_user=false) */ function networkmap_get_nodes_from_ip_mask( $ip_mask, - $return_ids_only=false + $return_ids_only=false, + $separator=',', ) { - $list_ip_masks = explode(',', $ip_mask); + $list_ip_masks = explode($separator, $ip_mask); if (empty($list_ip_masks) === true) { return []; @@ -1375,14 +1376,14 @@ function networkmap_get_nodes_from_ip_mask( $sql = sprintf( 'SELECT * FROM `tagente` - INNER JOIN - (SELECT DISTINCT `id_agent` FROM + INNER JOIN + (SELECT DISTINCT `id_agent` FROM (SELECT `id_agente` AS "id_agent", `direccion` AS "ip" - FROM `tagente` + FROM `tagente` UNION SELECT ag.`id_agent`, a.`ip` - FROM `taddress_agent` ag - INNER JOIN `taddress` a + FROM `taddress_agent` ag + INNER JOIN `taddress` a ON ag.id_a=a.id_a ) t_tmp WHERE (-1 << %d) & INET_ATON(t_tmp.ip) = INET_ATON("%s") diff --git a/pandora_console/operation/agentes/pandora_networkmap.editor.php b/pandora_console/operation/agentes/pandora_networkmap.editor.php index 0d2c7193e1..59f2befad4 100644 --- a/pandora_console/operation/agentes/pandora_networkmap.editor.php +++ b/pandora_console/operation/agentes/pandora_networkmap.editor.php @@ -273,6 +273,21 @@ if (!empty($result)) { if ($not_found) { ui_print_error_message(__('Not found networkmap.')); } else { + if ($disabled_source === false) { + $info1 = __('To create a network map that visually recreates link-level (L2) relationships, you must first discover these relationships with Discovery Server. Network maps only reflect relationships that have already been discovered.'); + $separator = '
'; + $info2 = __('Discovery Server discovers relationships between interfaces (L2) through SNMP and relationships between hosts (L3) through route discovery.'); + $info3 = __('You can also create these relationships manually by editing nodes or re-passing a discovery task after adding new information (for example by adding new SNMP communities).'); + $info4 = __('See our documentation for more information.'); + ui_print_info_message( + [ + 'no_close' => false, + 'message' => $info1.$separator.$info2.$separator.$info3.$separator.$info4, + ], + 'style="width: 98%;"' + ); + } + $table = new stdClass(); $table->id = 'form_editor'; @@ -401,7 +416,16 @@ if ($not_found) { ); $table->data['source_data_ip_mask'][0] = __('Source from CIDR IP mask'); - $table->data['source_data_ip_mask'][1] = html_print_input_text('ip_mask', $ip_mask, '', 20, 255, true, $disabled_source); + $table->data['source_data_ip_mask'][1] = html_print_textarea( + 'ip_mask', + 3, + 5, + $ip_mask, + 'style="width: 238px"', + true, + '', + $disabled_source + ); $table->data['source_data_group'][0] = __('Source group'); $table->data['source_data_group'][1] = '
'.html_print_select_groups( diff --git a/pandora_console/operation/agentes/pandora_networkmap.view.php b/pandora_console/operation/agentes/pandora_networkmap.view.php index 61cfba9e97..d85264b093 100644 --- a/pandora_console/operation/agentes/pandora_networkmap.view.php +++ b/pandora_console/operation/agentes/pandora_networkmap.view.php @@ -237,7 +237,16 @@ if (is_ajax() === true) { ); $table->data['source_data_ip_mask'][0] = __('Source from CIDR IP mask'); - $table->data['source_data_ip_mask'][1] = html_print_input_text('ip_mask', $map_info['source_data'], '', 20, 255, true); + $table->data['source_data_ip_mask'][1] = html_print_textarea( + 'ip_mask', + 3, + 5, + $map_info['source_data'], + '', + true, + '', + $disabled_source + ); $dont_show_subgroups = 0; if (isset($map_filter['dont_show_subgroups'])) { From 856fade86cfe187f715cc0db73fdff42f2b3631f Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 14 Feb 2023 14:45:46 +0100 Subject: [PATCH 28/56] #10118 Added spinner --- .../operation/agentes/pandora_networkmap.editor.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pandora_console/operation/agentes/pandora_networkmap.editor.php b/pandora_console/operation/agentes/pandora_networkmap.editor.php index 59f2befad4..a638bc9aa9 100644 --- a/pandora_console/operation/agentes/pandora_networkmap.editor.php +++ b/pandora_console/operation/agentes/pandora_networkmap.editor.php @@ -274,6 +274,10 @@ if ($not_found) { ui_print_error_message(__('Not found networkmap.')); } else { if ($disabled_source === false) { + echo '
'; + echo html_print_image('images/spinner.gif', true, 'width: 50px;height: 50px;'); + echo '
'.__('Creating map...').'
'; + echo '
'; $info1 = __('To create a network map that visually recreates link-level (L2) relationships, you must first discover these relationships with Discovery Server. Network maps only reflect relationships that have already been discovered.'); $separator = '
'; $info2 = __('Discovery Server discovers relationships between interfaces (L2) through SNMP and relationships between hosts (L3) through route discovery.'); @@ -546,6 +550,7 @@ if ($not_found) {