From 3ab970ced9a2e49a65ecb6654c9a3f62398cc968 Mon Sep 17 00:00:00 2001 From: marcos Date: Tue, 20 Apr 2021 12:41:21 +0200 Subject: [PATCH 01/30] fixed visual error on tm --- pandora_console/include/styles/pandora.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 740e5c6053..2e9b46cc8d 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -8500,3 +8500,6 @@ div.stat-win-spinner img { .font_11pt { font-size: 11pt; } +.align-left-important { + text-align: left !important; +} From 9ab027b2868ae6d9476a42bf692f431c63825dd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Gonz=C3=A1lez?= Date: Thu, 29 Apr 2021 13:28:03 +0200 Subject: [PATCH 02/30] WIP: Upload --- pandora_console/extensions/agents_modules.php | 50 +++++++--- pandora_console/extensions/module_groups.php | 16 +++- .../extensions/realtime_graphs.php | 15 ++- .../extensions/resource_registration.php | 9 +- .../general/first_task/cluster_builder.php | 14 ++- .../godmode/agentes/modificar_agente.php | 53 ++++++++--- .../godmode/agentes/module_manager.php | 1 - .../agentes/module_manager_editor_common.php | 7 +- .../godmode/reporting/map_builder.php | 62 ++++++++---- .../reporting/visual_console_favorite.php | 65 +++++++++---- .../godmode/snmpconsole/snmp_filters.php | 27 +++++- .../snmpconsole/snmp_trap_generator.php | 17 +++- .../include/class/AgentsAlerts.class.php | 39 +++----- pandora_console/include/functions_ui.php | 95 +++++++++++++++++++ .../operation/agentes/alerts_status.php | 19 +++- .../operation/agentes/estado_agente.php | 54 ++++++++--- .../operation/agentes/group_view.php | 56 ++++++++--- .../operation/agentes/status_monitor.php | 60 ++++++++---- .../operation/agentes/tactical.php | 55 ++++++++--- .../operation/dashboard/dashboard.php | 4 +- .../operation/snmpconsole/snmp_browser.php | 22 +++-- .../snmpconsole/snmp_mib_uploader.php | 61 +++++++++--- 22 files changed, 598 insertions(+), 203 deletions(-) diff --git a/pandora_console/extensions/agents_modules.php b/pandora_console/extensions/agents_modules.php index 0abde09010..f93dec02a4 100644 --- a/pandora_console/extensions/agents_modules.php +++ b/pandora_console/extensions/agents_modules.php @@ -1,16 +1,29 @@ '', + 'label' => __('Monitoring'), + ], + [ + 'link' => '', + 'label' => __('Views'), + ], + ] ); + echo ''; echo ''; echo "'; diff --git a/pandora_console/extensions/module_groups.php b/pandora_console/extensions/module_groups.php index 3b9670a8e0..4e1f0e791c 100644 --- a/pandora_console/extensions/module_groups.php +++ b/pandora_console/extensions/module_groups.php @@ -196,7 +196,6 @@ function mainModuleGroups() ON ta.id_agente = tam.id_agente WHERE ta.disabled = 0 AND tam.disabled = 0 - AND tam.id_modulo <> 0 AND tam.delete_pending = 0 AND ta.id_grupo IN (%s) GROUP BY tam.id_agente_modulo @@ -246,13 +245,24 @@ function mainModuleGroups() $array_data[$value['id_grupo']][$value['id_mg']] = $value; } - ui_print_page_header( + // Header. + ui_print_standard_header( __('Combined table of agent group and module group'), 'images/module_group.png', false, '', false, - '' + [], + [ + [ + 'link' => '', + 'label' => __('Monitoring'), + ], + [ + 'link' => '', + 'label' => __('Views'), + ], + ] ); echo "
".$fullscreen['text'].'
diff --git a/pandora_console/extensions/realtime_graphs.php b/pandora_console/extensions/realtime_graphs.php index 86fcfc4f0e..51d987ae25 100644 --- a/pandora_console/extensions/realtime_graphs.php +++ b/pandora_console/extensions/realtime_graphs.php @@ -49,13 +49,24 @@ function pandora_realtime_graphs() $hide_header = get_parameter('hide_header', 0); if ($hide_header === 0) { - ui_print_page_header( + // Header. + ui_print_standard_header( __('Realtime graphs'), 'images/extensions.png', false, 'real_time_view', false, - $onheader + $onheader, + [ + [ + 'link' => '', + 'label' => __('Monitoring'), + ], + [ + 'link' => '', + 'label' => __('Views'), + ], + ] ); } diff --git a/pandora_console/extensions/resource_registration.php b/pandora_console/extensions/resource_registration.php index 950f4e2b81..2f904dbf9f 100755 --- a/pandora_console/extensions/resource_registration.php +++ b/pandora_console/extensions/resource_registration.php @@ -1096,13 +1096,8 @@ function resource_registration_extension_main() } $xml = simplexml_load_file($_FILES['resource_upload']['tmp_name'], null, LIBXML_NOCDATA); - if ($xml === false) { - ui_print_error_message( - __('Error uploading resource. Check if the selected file is a valid resource template in .ptr format') - ); - } else { - process_upload_xml($xml); - } + + process_upload_xml($xml); } diff --git a/pandora_console/general/first_task/cluster_builder.php b/pandora_console/general/first_task/cluster_builder.php index 08ea618cce..157bdce0d7 100644 --- a/pandora_console/general/first_task/cluster_builder.php +++ b/pandora_console/general/first_task/cluster_builder.php @@ -24,12 +24,20 @@ if (! check_acl($config['id_user'], 0, 'AR') && ! check_acl($config['id_user'], return; } -\ui_print_page_header( - __('Monitoring').' » '.__('Clusters'), +// Header. +ui_print_standard_header( + __('Clusters'), 'images/chart.png', false, '', - false + false, + [], + [ + [ + 'link' => '', + 'label' => __('Monitoring'), + ], + ] ); ui_require_css_file('first_task'); diff --git a/pandora_console/godmode/agentes/modificar_agente.php b/pandora_console/godmode/agentes/modificar_agente.php index 6d9516bad7..807635bd80 100644 --- a/pandora_console/godmode/agentes/modificar_agente.php +++ b/pandora_console/godmode/agentes/modificar_agente.php @@ -1,17 +1,32 @@ $viewtab]; // Header. -ui_print_page_header( +ui_print_standard_header( __('Agents defined in %s', get_product_name()), 'images/agent.png', false, '', true, - $onheader + $onheader, + [ + [ + 'link' => '', + 'label' => __('Resources'), + ], + [ + 'link' => '', + 'label' => __('Manage agents'), + ], + ] ); if (is_central_policies_on_node()) { diff --git a/pandora_console/godmode/agentes/module_manager.php b/pandora_console/godmode/agentes/module_manager.php index d8dd0eeef2..91c6395b96 100644 --- a/pandora_console/godmode/agentes/module_manager.php +++ b/pandora_console/godmode/agentes/module_manager.php @@ -1072,7 +1072,6 @@ foreach ($modules as $module) { [ 'alt' => __('Enable module'), 'title' => __('Enable module'), - 'class' => 'invert_filter_important', ] ).''; } else { diff --git a/pandora_console/godmode/agentes/module_manager_editor_common.php b/pandora_console/godmode/agentes/module_manager_editor_common.php index 1a4577c4ee..7e9f29f2eb 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_common.php +++ b/pandora_console/godmode/agentes/module_manager_editor_common.php @@ -115,12 +115,7 @@ function add_component_selection($id_network_component_type) '', '---'.__('Manual setup').'---', 0, - true, - false, - true, - '', - false, - 'width: 460px; ' + true ); $data[1] .= ''; $data[1] .= ' '; $data[1] .= ''; - $data[1] .= ''; + $data[1] .= ''; $data[1] .= ''; } } @@ -1278,7 +1285,34 @@ if ($create_alert || $update_alert) { } if (check_acl_restricted_all($config['id_user'], $row['id_group'], 'LW')) { - $data[8] = ''.html_print_image('images/copy.png', true, ['alt' => __('Duplicate'), 'title' => __('Duplicate'), 'class' => 'invert_filter']).''.''.html_print_image('images/config.png', true, ['border' => '0', 'alt' => __('Update'), 'class' => 'invert_filter']).''.''.html_print_image('images/add.png', true, ['title' => __('Add action'), 'class' => 'invert_filter']).''.''.html_print_image('images/cross.png', true, ['border' => '0', 'class' => 'invert_filter', 'alt' => __('Delete')]).''; + $data[8] = ''.html_print_image( + 'images/copy.png', + true, + [ + 'alt' => __('Duplicate'), + 'title' => __('Duplicate'), + ] + ).''.''.html_print_image( + 'images/config.png', + true, + [ + 'border' => '0', + 'alt' => __('Update'), + ] + ).''.''.html_print_image( + 'images/add.png', + true, + [ + 'title' => __('Add action'), + ] + ).''.''.html_print_image( + 'images/cross.png', + true, + [ + 'border' => '0', + 'alt' => __('Delete'), + ] + ).''; $data[9] = html_print_checkbox_extended( @@ -1409,7 +1443,7 @@ if ($create_alert || $update_alert) { echo '
'; html_print_input_hidden('multiple_delete', 1); - html_print_submit_button(__('Delete selected'), 'delete_button', false, 'class="sub delete"'); + html_print_submit_button(__('Delete selected'), 'delete_button', false, 'class="sub delete mrgn_btn_10px"'); echo '
'; echo ''; } diff --git a/pandora_console/include/styles/pandora_black.css b/pandora_console/include/styles/pandora_black.css index f5e971c065..09393879ba 100644 --- a/pandora_console/include/styles/pandora_black.css +++ b/pandora_console/include/styles/pandora_black.css @@ -1019,3 +1019,11 @@ li.ui-tabs-tab.ui-corner-top.ui-state-default.ui-tab { margin: 20px auto; border-radius: 3px; } + +table.alternate tr:nth-child(2n + 1) td { + background-color: #222; +} + +table.alternate tr:nth-child(2n) td { + background-color: #111; +} From cb6f130ab0f4cec05e508b82e420721cbfd444ed Mon Sep 17 00:00:00 2001 From: Luis Date: Thu, 27 May 2021 16:22:47 +0000 Subject: [PATCH 20/30] Fixed not showing agents with not init modules on os treeview --- pandora_console/include/class/Tree.class.php | 28 +++++++++++-------- .../include/class/TreeModuleGroup.class.php | 2 ++ .../include/class/TreeTag.class.php | 2 ++ 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/pandora_console/include/class/Tree.class.php b/pandora_console/include/class/Tree.class.php index dc0dca6df4..6050bffa2e 100644 --- a/pandora_console/include/class/Tree.class.php +++ b/pandora_console/include/class/Tree.class.php @@ -279,8 +279,10 @@ class Tree protected function getTagJoin() { - return 'INNER JOIN ttag_module ttm - ON tam.id_agente_modulo = ttm.id_agente_modulo'; + return 'INNER JOIN tagente_modulo tam + ON ta.id_agente = tam.id_agente + INNER JOIN ttag_module ttm + ON tam.id_agente_modulo = ttm.id_agente_modulo'; } @@ -931,11 +933,16 @@ class Tree $agent_status_filter = $this->getAgentStatusFilter(); $module_search_filter = $this->getModuleSearchFilter(); $module_status_inner = ''; - $module_status_filter = $this->getModuleStatusFilterFromTestado(); - if (!empty($module_status_filter)) { - $module_status_inner = ' - INNER JOIN tagente_estado tae - ON tae.id_agente_modulo = tam.id_agente_modulo'; + $module_search_inner = ''; + $module_search_filter = ''; + if (!empty($this->filter['searchModule'])) { + $module_search_inner = ' + INNER JOIN tagente_modulo tam + ON ta.id_agente = tam.id_agente + INNER JOIN tagente_estado tae + ON tae.id_agente_modulo = tam.id_agente_modulo'; + $module_search_filter = "AND tam.disabled = 0 + AND tam.nombre LIKE '%%".$this->filter['searchModule']."%%' ".$this->getModuleStatusFilterFromTestado(); } $sql_model = "SELECT %s FROM @@ -944,13 +951,11 @@ class Tree FROM tagente ta LEFT JOIN tagent_secondary_group tasg ON ta.id_agente = tasg.id_agent - INNER JOIN tagente_modulo tam - ON ta.id_agente = tam.id_agente $inner_inside $module_status_inner $group_inner + $module_search_inner WHERE ta.disabled = 0 - AND tam.disabled = 0 %s $agent_search_filter $agent_status_filter @@ -973,6 +978,7 @@ class Tree $inner GROUP BY g ORDER BY $order_by_final"; + hd($sql, true); return $sql; } @@ -1020,7 +1026,7 @@ class Tree $agent_search_filter = $this->getAgentSearchFilter(); $agent_status_filter = $this->getAgentStatusFilter(); $module_search_filter = $this->getModuleSearchFilter(); - $module_status_filter = $this->getModuleStatusFilterFromTestado($this->filter['statusModule']); + $module_status_filter = $this->getModuleStatusFilter(); $condition = $this->L2condition; $condition_inside = $this->L2conditionInside; diff --git a/pandora_console/include/class/TreeModuleGroup.class.php b/pandora_console/include/class/TreeModuleGroup.class.php index b5cec41370..9b8d39fd6f 100644 --- a/pandora_console/include/class/TreeModuleGroup.class.php +++ b/pandora_console/include/class/TreeModuleGroup.class.php @@ -31,6 +31,8 @@ class TreeModuleGroup extends Tree 'tmg.id_mg AS id', ]; $this->L1inner = 'INNER JOIN tmodule_group tmg ON tmg.id_mg = x2.g'; + $this->L1innerInside = 'INNER JOIN tagente_modulo tam + ON ta.id_agente = tam.id_agente'; $this->L1orderByFinal = 'tmg.name'; $this->L2condition = 'AND tam.id_module_group = '.$this->rootID; diff --git a/pandora_console/include/class/TreeTag.class.php b/pandora_console/include/class/TreeTag.class.php index 280d34fa2b..87d05a644b 100644 --- a/pandora_console/include/class/TreeTag.class.php +++ b/pandora_console/include/class/TreeTag.class.php @@ -27,6 +27,8 @@ class TreeTag extends Tree $this->L1fieldName = 'id_tag'; $this->L1fieldNameSql = 'ttm.id_tag'; $this->L1innerInside = ' + INNER JOIN tagente_modulo tam + ON ta.id_agente = tam.id_agente INNER JOIN ttag_module ttm ON ttm.id_agente_modulo = tam.id_agente_modulo '; From db306a30b953e6e5ce2ca9de0e4066c072853ea0 Mon Sep 17 00:00:00 2001 From: Luis Date: Thu, 27 May 2021 16:23:20 +0000 Subject: [PATCH 21/30] Fixed report exception item with not ok on meta --- pandora_console/godmode/reporting/reporting_builder.php | 2 +- pandora_console/include/functions_reporting.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index d96d239417..29a7260848 100755 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -2486,7 +2486,7 @@ switch ($action) { 0 ); $values['exception_condition'] = (int) get_parameter( - 'radiobutton_exception_condition', + 'exception_condition', 0 ); $values['exception_condition_value'] = get_parameter( diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index b2d1edb62d..0842cff2bd 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -2711,6 +2711,7 @@ function reporting_exception( // Metaconsole connection. $server_name = $exc['server_name']; if (($config['metaconsole'] == 1) && $server_name != '' && is_metaconsole()) { + metaconsole_restore_db(); $connection = metaconsole_get_connection($server_name); if (metaconsole_load_external_db($connection) != NOERR) { // ui_print_error_message ("Error connecting to ".$server_name); From 91e870edbc30c8b11d56a5ef965cb11520e4e7cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Gonz=C3=A1lez?= Date: Thu, 27 May 2021 22:06:58 +0200 Subject: [PATCH 22/30] Fixed issue with id_plugin with bandwidth modules --- .../include/class/AgentWizard.class.php | 51 ++++++++++++------- 1 file changed, 33 insertions(+), 18 deletions(-) diff --git a/pandora_console/include/class/AgentWizard.class.php b/pandora_console/include/class/AgentWizard.class.php index b72b2985f9..7c27f34525 100644 --- a/pandora_console/include/class/AgentWizard.class.php +++ b/pandora_console/include/class/AgentWizard.class.php @@ -312,7 +312,7 @@ class AgentWizard extends HTML $this->idPolicy = get_parameter('id', ''); $this->targetIp = get_parameter('targetIp', ''); - if (!empty($this->idAgent)) { + if (empty($this->idAgent) === false) { $array_aux = db_get_all_rows_sql( sprintf( 'SELECT ip FROM taddress ta @@ -1687,28 +1687,43 @@ class AgentWizard extends HTML ) ); - if ($fieldsPlugin !== false) { - $fieldsPlugin = json_decode($fieldsPlugin, true); - $i = 1; - foreach ($infoMacros as $key => $value) { - if (empty(preg_match('/_snmp_field/', $key)) === false) { - $new_macros = []; - foreach ($fieldsPlugin as $k => $v) { - if ($v['macro'] === preg_replace('/_snmp_field/', '', $key)) { - $fieldsPlugin[$k]['value'] = $this->replacementMacrosPlugin( - $value, - $infoMacros['macros'] - ); - $i++; - continue; + if ($this->wizardSection === 'snmp_interfaces_explorer' + && empty($candidate['macros']) === false + ) { + // Use definition provided. + $values['id_plugin'] = $candidate['id_plugin']; + $values['macros'] = base64_decode($candidate['macros']); + } else { + $fieldsPlugin = db_get_value_sql( + sprintf( + 'SELECT macros FROM tplugin WHERE id=%d', + (int) $infoMacros['server_plugin'] + ) + ); + + if ($fieldsPlugin !== false) { + $fieldsPlugin = json_decode($fieldsPlugin, true); + $i = 1; + foreach ($infoMacros as $key => $value) { + if (empty(preg_match('/_snmp_field/', $key)) === false) { + $new_macros = []; + foreach ($fieldsPlugin as $k => $v) { + if ($v['macro'] === preg_replace('/_snmp_field/', '', $key)) { + $fieldsPlugin[$k]['value'] = $this->replacementMacrosPlugin( + $value, + $infoMacros['macros'] + ); + $i++; + continue; + } } } } } - } - $values['id_plugin'] = $infoMacros['server_plugin']; - $values['macros'] = json_encode($fieldsPlugin); + $values['id_plugin'] = $infoMacros['server_plugin']; + $values['macros'] = json_encode($fieldsPlugin); + } } } } else if ($this->protocol === 'wmi') { From 059b14dbf657ab6b19ddfa89d866ec422e562bb0 Mon Sep 17 00:00:00 2001 From: artica Date: Fri, 28 May 2021 01:00:43 +0200 Subject: [PATCH 23/30] 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 68fed537b4..5199a030ae 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.754-210527 +Version: 7.0NG.754-210528 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 1a3b93590f..f01b00ee29 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.754-210527" +pandora_version="7.0NG.754-210528" 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 2dc59f129b..0329fd8a41 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.754'; -use constant AGENT_BUILD => '210527'; +use constant AGENT_BUILD => '210528'; # 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 3b3ea1d6ec..b094bd0ae7 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_unix %define version 7.0NG.754 -%define release 210527 +%define release 210528 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 b940c8b585..d71828b386 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.754 -%define release 210527 +%define release 210528 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 c761574ac4..c64d01b09e 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.754" -PI_BUILD="210527" +PI_BUILD="210528" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 0d7d94ede5..01fba38997 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{210527} +{210528} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 014db5cebb..83d167d56d 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.754 Build 210527") +#define PANDORA_VERSION ("7.0NG.754 Build 210528") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 69bafa9a00..bc907eca4b 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.754(Build 210527))" + VALUE "ProductVersion", "(7.0NG.754(Build 210528))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index e96ee4632a..f56c42c5e2 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.754-210527 +Version: 7.0NG.754-210528 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 352fe3bf0c..15edaa640e 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.754-210527" +pandora_version="7.0NG.754-210528" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 430ca593b6..d18146b678 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 = 'PC210527'; +$build_version = 'PC210528'; $pandora_version = 'v7.0NG.754'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index ad0f399c50..b423e99b20 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index a72bdc6256..e0c3bd5aab 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.754 -%define release 210527 +%define release 210528 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 12c3a8577b..1597fac0db 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.754 -%define release 210527 +%define release 210528 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 3ac49eb4ad..d896afab15 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.754" -PI_BUILD="210527" +PI_BUILD="210528" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index a8a231fbb3..32ff1f6268 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.754 Build 210527"; +my $version = "7.0NG.754 Build 210528"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index f5ac53a2d9..ab5f85af33 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.754 Build 210527"; +my $version = "7.0NG.754 Build 210528"; # save program name for logging my $progname = basename($0); From 84902a5d3d5956cc90a845f76e40c6f96d24d41d Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Fri, 28 May 2021 13:20:16 +0200 Subject: [PATCH 24/30] Fixed code --- pandora_console/extensions/module_groups.php | 1 + .../extensions/resource_registration.php | 70 ++++++++++++------- .../agentes/module_manager_editor_common.php | 50 +++++++++---- 3 files changed, 82 insertions(+), 39 deletions(-) diff --git a/pandora_console/extensions/module_groups.php b/pandora_console/extensions/module_groups.php index 4e1f0e791c..054eabb73d 100644 --- a/pandora_console/extensions/module_groups.php +++ b/pandora_console/extensions/module_groups.php @@ -196,6 +196,7 @@ function mainModuleGroups() ON ta.id_agente = tam.id_agente WHERE ta.disabled = 0 AND tam.disabled = 0 + AND tam.id_modulo <> 0 AND tam.delete_pending = 0 AND ta.id_grupo IN (%s) GROUP BY tam.id_agente_modulo diff --git a/pandora_console/extensions/resource_registration.php b/pandora_console/extensions/resource_registration.php index 2f904dbf9f..f1fc645179 100755 --- a/pandora_console/extensions/resource_registration.php +++ b/pandora_console/extensions/resource_registration.php @@ -1,29 +1,43 @@ '; $data[1] .= '
'.alerts_get_alert_action_name($action['alert_type']).' '.html_print_image('images/cross.png', true, ['border' => '0', 'alt' => __('Delete')]).' '.html_print_image( + 'images/cross.png', + true, + [ + 'border' => '0', + 'alt' => __('Delete'), + ] + ).'