diff --git a/extras/deploy-scripts/pandora_deploy_community.sh b/extras/deploy-scripts/pandora_deploy_community.sh index 51f61c2b8a..aa858eec3a 100644 --- a/extras/deploy-scripts/pandora_deploy_community.sh +++ b/extras/deploy-scripts/pandora_deploy_community.sh @@ -71,7 +71,7 @@ check_pre_pandora () { check_repo_connection () { execute_cmd "ping -c 2 8.8.8.8" "Checking internet connection" execute_cmd "ping -c 2 firefly.artica.es" "Checking Community repo" - execute_cmd "ping -c 2 support.artica.es" "Checking Enterprise repo" + execute_cmd "ping -c 2 support.pandorafms.com" "Checking Enterprise repo" } check_root_permissions () { diff --git a/pandora_agents/Dockerfile b/pandora_agents/Dockerfile index 0ee2515a75..79257b955c 100644 --- a/pandora_agents/Dockerfile +++ b/pandora_agents/Dockerfile @@ -1,15 +1,15 @@ -FROM centos:centos8 -MAINTAINER Pandora FMS Team +FROM centos:7 +LABEL maintainer="Pandora FMS Team " # Add Pandora FMS agent installer ADD unix /opt/pandora/pandora_agent/unix RUN export LC_ALL=C -RUN dnf install -y dnf-plugins-core; dnf config-manager --set-enabled PowerTools +RUN yum -y update # Install dependencies -RUN dnf -y install \ +RUN yum -y install \ epel-release \ unzip \ perl \ @@ -17,7 +17,7 @@ RUN dnf -y install \ sed \ perl-YAML-Tiny \ "perl(Sys::Syslog)" \ - && dnf clean all + && yum clean all # Install Pandora FMS agent diff --git a/pandora_agents/pc/AIX/pandora_agent.conf b/pandora_agents/pc/AIX/pandora_agent.conf index 3df511bc34..f7231889cc 100644 --- a/pandora_agents/pc/AIX/pandora_agent.conf +++ b/pandora_agents/pc/AIX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.752, AIX version +# Version 7.0NG.753, AIX version # Licensed under GPL license v2, # Copyright (c) 2003-2021 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/FreeBSD/pandora_agent.conf b/pandora_agents/pc/FreeBSD/pandora_agent.conf index 67e18c61ce..4dc59ea6d4 100644 --- a/pandora_agents/pc/FreeBSD/pandora_agent.conf +++ b/pandora_agents/pc/FreeBSD/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.752, FreeBSD Version +# Version 7.0NG.753, FreeBSD Version # Licensed under GPL license v2, # Copyright (c) 2003-2021 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/HP-UX/pandora_agent.conf b/pandora_agents/pc/HP-UX/pandora_agent.conf index 73e4aa4cbd..59decfc0b9 100644 --- a/pandora_agents/pc/HP-UX/pandora_agent.conf +++ b/pandora_agents/pc/HP-UX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.752, HP-UX Version +# Version 7.0NG.753, HP-UX Version # Licensed under GPL license v2, # Copyright (c) 2003-2021 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/Linux/pandora_agent.conf b/pandora_agents/pc/Linux/pandora_agent.conf index 251de4f671..33622d0f5c 100644 --- a/pandora_agents/pc/Linux/pandora_agent.conf +++ b/pandora_agents/pc/Linux/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.752, GNU/Linux +# Version 7.0NG.753, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2021 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/NT4/pandora_agent.conf b/pandora_agents/pc/NT4/pandora_agent.conf index 4dcd110dc4..4b4d0cd477 100644 --- a/pandora_agents/pc/NT4/pandora_agent.conf +++ b/pandora_agents/pc/NT4/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.752, GNU/Linux +# Version 7.0NG.753, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2021 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/SunOS/pandora_agent.conf b/pandora_agents/pc/SunOS/pandora_agent.conf index 5f86dd5a56..4da381cf33 100644 --- a/pandora_agents/pc/SunOS/pandora_agent.conf +++ b/pandora_agents/pc/SunOS/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.752, Solaris Version +# Version 7.0NG.753, Solaris Version # Licensed under GPL license v2, # Copyright (c) 2003-2021 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/Win32/pandora_agent.conf b/pandora_agents/pc/Win32/pandora_agent.conf index 60d0bbde2c..43bfcd8655 100644 --- a/pandora_agents/pc/Win32/pandora_agent.conf +++ b/pandora_agents/pc/Win32/pandora_agent.conf @@ -1,6 +1,6 @@ # Base config file for Pandora FMS Windows Agent # (c) 2006-2021 Artica Soluciones Tecnologicas -# Version 7.0NG.752 +# Version 7.0NG.753 # This program is Free Software, you can redistribute it and/or modify it # under the terms of the GNU General Public Licence as published by the Free Software # Foundation; either version 2 of the Licence or any later version diff --git a/pandora_agents/shellscript/aix/pandora_agent.conf b/pandora_agents/shellscript/aix/pandora_agent.conf index 5bc9d9ba56..55c5f2003f 100644 --- a/pandora_agents/shellscript/aix/pandora_agent.conf +++ b/pandora_agents/shellscript/aix/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.752, AIX version +# Version 7.0NG.753, AIX version # General Parameters # ================== diff --git a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf index 4183cef424..5ea521adb2 100644 --- a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf +++ b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.752 +# Version 7.0NG.753 # FreeBSD/IPSO version # Licenced under GPL licence, 2003-2007 Sancho Lerena diff --git a/pandora_agents/shellscript/hp-ux/pandora_agent.conf b/pandora_agents/shellscript/hp-ux/pandora_agent.conf index 38030783ac..d7f5c8435f 100644 --- a/pandora_agents/shellscript/hp-ux/pandora_agent.conf +++ b/pandora_agents/shellscript/hp-ux/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.752, HPUX Version +# Version 7.0NG.753, HPUX Version # General Parameters # ================== diff --git a/pandora_agents/shellscript/linux/pandora_agent.conf b/pandora_agents/shellscript/linux/pandora_agent.conf index bbf8fffcb6..2ddb7b18fc 100644 --- a/pandora_agents/shellscript/linux/pandora_agent.conf +++ b/pandora_agents/shellscript/linux/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.752 +# Version 7.0NG.753 # Licensed under GPL license v2, # (c) 2003-2021 Artica Soluciones Tecnologicas # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/mac_osx/pandora_agent.conf b/pandora_agents/shellscript/mac_osx/pandora_agent.conf index e4e21da030..da30108c8b 100644 --- a/pandora_agents/shellscript/mac_osx/pandora_agent.conf +++ b/pandora_agents/shellscript/mac_osx/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.752 +# Version 7.0NG.753 # Licensed under GPL license v2, # (c) 2003-2021 Artica Soluciones Tecnologicas # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/openWRT/pandora_agent.conf b/pandora_agents/shellscript/openWRT/pandora_agent.conf index f957a45b87..12a1a2078a 100644 --- a/pandora_agents/shellscript/openWRT/pandora_agent.conf +++ b/pandora_agents/shellscript/openWRT/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.752 +# Version 7.0NG.753 # Licensed under GPL license v2, # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/solaris/pandora_agent.conf b/pandora_agents/shellscript/solaris/pandora_agent.conf index be2f3b22f3..055e942318 100644 --- a/pandora_agents/shellscript/solaris/pandora_agent.conf +++ b/pandora_agents/shellscript/solaris/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.752, Solaris version +# Version 7.0NG.753, Solaris version # General Parameters # ================== diff --git a/pandora_agents/unix/AIX/pandora_agent.conf b/pandora_agents/unix/AIX/pandora_agent.conf index 1584ce4dc2..d6f314c516 100644 --- a/pandora_agents/unix/AIX/pandora_agent.conf +++ b/pandora_agents/unix/AIX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.752, AIX version +# Version 7.0NG.753, AIX version # Licensed under GPL license v2, # Copyright (c) 2003-2021 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 7a76392a62..1702ba40e0 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.752-210222 +Version: 7.0NG.753-210330 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 1ecbc72ec5..e7aa071815 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.752-210222" +pandora_version="7.0NG.753-210330" 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/Darwin/dmg/build_darwin_dmg.sh b/pandora_agents/unix/Darwin/dmg/build_darwin_dmg.sh index f21b4f0896..ef51f8c2e6 100644 --- a/pandora_agents/unix/Darwin/dmg/build_darwin_dmg.sh +++ b/pandora_agents/unix/Darwin/dmg/build_darwin_dmg.sh @@ -24,7 +24,7 @@ fi if [ "$#" -ge 2 ]; then VERSION="$2" else - VERSION="7.0NG.752" + VERSION="7.0NG.753" fi # Path for the generated DMG file diff --git a/pandora_agents/unix/Darwin/dmg/extras/distribution.xml b/pandora_agents/unix/Darwin/dmg/extras/distribution.xml index 14e4b9ff7a..5d12c4e87b 100644 --- a/pandora_agents/unix/Darwin/dmg/extras/distribution.xml +++ b/pandora_agents/unix/Darwin/dmg/extras/distribution.xml @@ -19,11 +19,11 @@ - pandorafms_src.pdk + pandorafms_src.pdk - pandorafms_uninstall.pdk + pandorafms_uninstall.pdk - + - + + .show(); + // Don't allow close the dialog with X button + $('.ui-dialog-titlebar-close').css('display', 'none'); + + '; } diff --git a/pandora_console/general/ui/agents_list.php b/pandora_console/general/ui/agents_list.php index 8dcfeaaaed..deaafe1bc8 100644 --- a/pandora_console/general/ui/agents_list.php +++ b/pandora_console/general/ui/agents_list.php @@ -142,7 +142,7 @@ unset($filter['offset']); if (! is_ajax()) { echo ''; } diff --git a/pandora_console/godmode/admin_access_logs.php b/pandora_console/godmode/admin_access_logs.php index 53923b3ee8..f635e945c3 100644 --- a/pandora_console/godmode/admin_access_logs.php +++ b/pandora_console/godmode/admin_access_logs.php @@ -35,8 +35,21 @@ $filter_ip = (string) get_parameter('filter_ip'); $filter_query = '&filter_type='.$filter_type.'&filter_user='.$filter_user.'&filter_text='.$filter_text.'&filter_period='.$filter_period.'&filter_ip='.$filter_ip; -$csv_url = ui_get_full_url(false, false, false, false).'index.php?sec=gextensions&sec2=godmode/audit_log_csv'.$filter_query; -$csv_img = html_print_image('images/csv_mc.png', true, ['title' => __('Export to CSV')]); +$csv_url = ui_get_full_url( + false, + false, + false, + false +).'index.php?sec=gextensions&sec2=godmode/audit_log_csv'.$filter_query; +$csv_img = html_print_image( + 'images/csv.png', + true, + [ + 'title' => __( + 'Export to CSV' + ),'class' => 'invert_filter', + ] +); $header_buttons = [ 'csv' => [ 'active' => false, diff --git a/pandora_console/godmode/agentes/agent_conf_gis.php b/pandora_console/godmode/agentes/agent_conf_gis.php index 260a220ad3..1b083e160f 100644 --- a/pandora_console/godmode/agentes/agent_conf_gis.php +++ b/pandora_console/godmode/agentes/agent_conf_gis.php @@ -22,7 +22,7 @@ require_once 'include/functions_agents.php'; ui_require_javascript_file('openlayers.pandora'); -echo "
"; +echo "
"; $agentData = gis_get_data_last_position_agent($id_agente); $updateGisData = db_get_value('update_gis_data', 'tagente', 'id_agente', $id_agente); @@ -32,7 +32,7 @@ $agent_name = agents_get_name($id_agente); $agent_name = md5($agent_name); // Map with the current position -echo '
'; +echo '
'; if (!gis_get_agent_map($id_agente, '500px', '100%', false)) { ui_print_error_message(__('There is no default map. Please go to the setup for to set a default map.')); @@ -122,15 +122,15 @@ $table->data[2][1] = html_print_input_text_extended( ); $table->data[2][2] = __('Ignore new GIS data:'); -$table->data[2][3] = __('Yes').' '.html_print_radio_button_extended('update_gis_data', 0, '', $updateGisData, false, '', 'style="margin-right: 40px;"', true); -$table->data[2][3] .= __('No').' '.html_print_radio_button_extended('update_gis_data', 1, '', $updateGisData, false, '', 'style="margin-right: 40px;"', true); +$table->data[2][3] = __('Yes').' '.html_print_radio_button_extended('update_gis_data', 0, '', $updateGisData, false, '', 'class="mrgn_right_40px"', true); +$table->data[2][3] .= __('No').' '.html_print_radio_button_extended('update_gis_data', 1, '', $updateGisData, false, '', 'class="mrgn_right_40px"', true); $url = 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=gis&id_agente='.$id_agente; echo "
"; html_print_input_hidden('update_gis', 1); html_print_table($table); -echo '
'; +echo '
'; html_print_submit_button(__('Update'), '', false, 'class="sub upd"'); echo '
'; echo ''; diff --git a/pandora_console/godmode/agentes/agent_incidents.php b/pandora_console/godmode/agentes/agent_incidents.php index c144cdfdcd..16cdd9370c 100644 --- a/pandora_console/godmode/agentes/agent_incidents.php +++ b/pandora_console/godmode/agentes/agent_incidents.php @@ -18,6 +18,11 @@ require_once 'include/functions_incidents.php'; check_login(); +if (!$config['integria_enabled']) { + ui_print_error_message(__('In order to access ticket management system, integration with Integria IMS must be enabled and properly configured')); + return; +} + $group = $id_grupo; if (! check_acl($config['id_user'], $group, 'AW', $id_agente)) { @@ -38,30 +43,25 @@ $groups = users_get_groups($config['id_user'], 'IR'); $filter = ' AND id_agent = '.$id_agent; $url = 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=incident&id_agente='.$id_agent; -// Select incidencts where the user has access to ($groups from -// get_user_groups), array_keys for the id, implode to pass to SQL -switch ($config['dbtype']) { - case 'mysql': - $sql = 'SELECT * FROM tincidencia WHERE - id_grupo IN ('.implode(',', array_keys($groups)).')'.$filter.' - ORDER BY actualizacion DESC LIMIT '.$offset.','.$config['block_size']; - break; +$params = [ + '', + '-10', + '1', + '-1', + '0', + '', + '', + '', + agents_get_name($id_agent), +]; - case 'oracle': - $sql = 'SELECT * FROM tincidencia WHERE - id_grupo IN ('.implode(',', array_keys($groups)).')'.$filter.' - AND rownum <= '.$offset.','.$config['block_size'].' - ORDER BY actualizacion DESC'; - break; -} +$result = integria_api_call($config['integria_hostname'], $config['integria_user'], $config['integria_pass'], $config['integria_api_pass'], 'get_incidents', $params, false, 'json', ','); -$result = db_get_all_rows_sql($sql); +$result = json_decode($result, true); -$count_sql = 'SELECT count(*) FROM tincidencia WHERE - id_grupo IN ('.implode(',', array_keys($groups)).')'.$filter.' - ORDER BY actualizacion DESC'; +$count = count($result); -$count = db_get_value_sql($count_sql); +$result = array_slice($result, $offset, $config['block_size']); if (empty($result)) { $result = []; @@ -91,8 +91,6 @@ $table->head[2] = __('Incident'); $table->head[3] = __('Priority'); $table->head[4] = __('Group'); $table->head[5] = __('Updated'); -$table->head[6] = __('Source'); -$table->head[7] = __('Owner'); $table->size[0] = 43; $table->size[7] = 50; @@ -115,7 +113,7 @@ foreach ($result as $row) { $data = []; - $data[0] = ''.$row['id_incidencia'].''; + $data[0] = ''.$row['id_incidencia'].''; $attach = incidents_get_attach($row['id_incidencia']); if (!empty($attach)) { @@ -123,12 +121,10 @@ foreach ($result as $row) { } $data[1] = incidents_print_status_img($row['estado'], true); - $data[2] = ''.substr(io_safe_output($row['titulo']), 0, 45).''; + $data[2] = ''.substr(io_safe_output($row['titulo']), 0, 45).''; $data[3] = incidents_print_priority_img($row['prioridad'], true); - $data[4] = ui_print_group_icon($row['id_grupo'], true); + $data[4] = $row['id_grupo']; $data[5] = ui_print_timestamp($row['actualizacion'], true); - $data[6] = $row['origen']; - $data[7] = ui_print_username($row['id_usuario'], true); array_push($table->data, $data); } @@ -139,4 +135,4 @@ echo '
'; unset($table); echo '

'; -echo '
 
'; +echo '
 
'; diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index fafac5bcde..326dde3207 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -147,6 +147,8 @@ if (is_ajax()) { return; } + + ui_require_javascript_file('openlayers.pandora'); $new_agent = (empty($id_agente)) ? true : false; @@ -207,11 +209,11 @@ $custom_id_div .= html_print_input_text( if (!$new_agent && $alias != '') { $table_agent_name = '

'.__('Agent name').'

'; $table_agent_name .= '
'; - $table_agent_name .= '
'.html_print_input_text('agente', $nombre_agente, '', 50, 100, true).'
'; - $table_agent_name .= '
'; + $table_agent_name .= '
'.html_print_input_text('agente', $nombre_agente, '', 50, 100, true).'
'; + $table_agent_name .= '
'; if ($id_agente) { - $table_agent_name .= ''; + $table_agent_name .= ''; $table_agent_name .= ''; $table_agent_name .= html_print_image( 'images/zoom.png', @@ -219,6 +221,7 @@ if (!$new_agent && $alias != '') { [ 'border' => 0, 'title' => __('Agent detail'), + 'class' => 'invert_filter', ] ); $table_agent_name .= ''; @@ -228,7 +231,14 @@ if (!$new_agent && $alias != '') { // Delete link from here. if (!is_central_policies_on_node()) { - $table_agent_name .= "".html_print_image('images/cross.png', true, ['title' => __('Delete agent')]).''; + $table_agent_name .= "".html_print_image( + 'images/cross.png', + true, + [ + 'title' => __('Delete agent'), + 'class' => 'invert_filter', + ] + ).''; } // Remote configuration available. @@ -245,6 +255,7 @@ if (!$new_agent && $alias != '') { [ 'border' => 0, 'title' => __('This agent can be remotely configured'), + 'class' => 'invert_filter', ] ); $table_agent_name .= ''; @@ -578,6 +589,7 @@ if (enterprise_installed()) { [ 'title' => __('Delete remote configuration file'), 'style' => 'vertical-align: middle;', + 'class' => 'invert_filter', ] ).''; $table_adv_remote .= ''; @@ -736,11 +748,11 @@ $table_adv_agent_icon = '

'.__(' if ($icon_path == '') { $display_icons = 'none'; // Hack to show no icon. Use any given image to fix not found image errors. - $path_without = 'images/spinner.png'; - $path_default = 'images/spinner.png'; - $path_ok = 'images/spinner.png'; - $path_bad = 'images/spinner.png'; - $path_warning = 'images/spinner.png'; + $path_without = 'images/spinner.gif'; + $path_default = 'images/spinner.gif'; + $path_ok = 'images/spinner.gif'; + $path_bad = 'images/spinner.gif'; + $path_warning = 'images/spinner.gif'; } else { $display_icons = ''; $path_without = $path.$icon_path.'.default.png'; @@ -794,7 +806,7 @@ if ($config['activate_gis']) { if (enterprise_installed()) { $advanced_div = '

'; } else { - $advanced_div = '