From cbbddd1ac6d7de4f8c08da84c1c8ab2c6652de59 Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 23 Mar 2023 01:00:18 +0100 Subject: [PATCH 1/2] 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 32ae346476..d2e886052d 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.769-230322 +Version: 7.0NG.769-230323 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 eae3843db7..122b06ac79 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.769-230322" +pandora_version="7.0NG.769-230323" 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 6b8caef6e7..ef17f8a8f4 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1023,7 +1023,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.769'; -use constant AGENT_BUILD => '230322'; +use constant AGENT_BUILD => '230323'; # 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 00bebae366..af7e2e2596 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.769 -%define release 230322 +%define release 230323 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 a61b2f56f8..7a3adae918 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.769 -%define release 230322 +%define release 230323 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 2e2d4ec44a..97c4765dbd 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.769" -PI_BUILD="230322" +PI_BUILD="230323" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 8daa30ae18..9f9bbb30f2 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{230322} +{230323} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index a1b982a207..1a59e872aa 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.769 Build 230322") +#define PANDORA_VERSION ("7.0NG.769 Build 230323") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 7e27b054d3..bb8562378a 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.769(Build 230322))" + VALUE "ProductVersion", "(7.0NG.769(Build 230323))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index b5db0c7fc3..b766df0562 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.769-230322 +Version: 7.0NG.769-230323 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 e528acf30e..7425ed46b6 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.769-230322" +pandora_version="7.0NG.769-230323" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index a1f6040007..ec90b4d8c2 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 = 'PC230322'; +$build_version = 'PC230323'; $pandora_version = 'v7.0NG.769'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 42bc80a76c..0cd9bd0385 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 27492125a8..05e0de628b 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.769 -%define release 230322 +%define release 230323 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 308a016430..0303266d05 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.769 -%define release 230322 +%define release 230323 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 9213cdd253..8800e2e408 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.769" -PI_BUILD="230322" +PI_BUILD="230323" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index b6e04d983b..60699c5dbe 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.769 Build 230322"; +my $version = "7.0NG.769 Build 230323"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 78c1965717..da84e3f0d8 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.769 Build 230322"; +my $version = "7.0NG.769 Build 230323"; # save program name for logging my $progname = basename($0); From 94c843dac29421bc0715da40dc9d0a87a72366f3 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 23 Mar 2023 10:41:08 +0100 Subject: [PATCH 2/2] #9662 Fixed gis map menu --- pandora_console/include/functions_menu.php | 5 +++ .../operation/gis_maps/gis_map.php | 22 +++++++++--- .../operation/gis_maps/render_view.php | 35 ++++++++++++------- pandora_console/operation/menu.php | 2 +- 4 files changed, 46 insertions(+), 18 deletions(-) diff --git a/pandora_console/include/functions_menu.php b/pandora_console/include/functions_menu.php index 14c43a5c14..1e8dfca576 100644 --- a/pandora_console/include/functions_menu.php +++ b/pandora_console/include/functions_menu.php @@ -68,6 +68,11 @@ function menu_print_menu(&$menu) $sec2 = 'godmode/alerts/alert_commands'; } else if ($sec2 === 'enterprise/godmode/setup/edit_skin') { $sec2 = 'enterprise/godmode/setup/setup_skins'; + } else if ($sec2 === 'operation/gis_maps/render_view') { + $map_id = (int) get_parameter('map_id'); + if (empty($map_id) === false) { + $sec2 .= '&map_id='.$map_id; + } } else if ($sec2 === 'godmode/servers/discovery') { $wiz = (string) get_parameter('wiz'); $sec2 = 'godmode/servers/discovery&wiz='.$wiz; diff --git a/pandora_console/operation/gis_maps/gis_map.php b/pandora_console/operation/gis_maps/gis_map.php index 4a9f56dd7a..5c615bef61 100644 --- a/pandora_console/operation/gis_maps/gis_map.php +++ b/pandora_console/operation/gis_maps/gis_map.php @@ -21,23 +21,35 @@ global $config; require_once 'include/functions_gis.php'; -// ui_require_javascript_file('openlayers.pandora'); $buttons['gis_maps_list'] = [ 'active' => true, 'text' => ''.html_print_image( - 'images/list.png', + 'images/logs@svg.svg', true, - ['title' => __('GIS Maps list')] + [ + 'title' => __('GIS Maps list'), + 'class' => 'main_menu_icon invert_filter', + ] ).'', ]; -ui_print_page_header( +ui_print_standard_header( __('GIS Maps'), 'images/op_gis.png', false, '', false, - $buttons + $buttons, + [ + [ + 'link' => '', + 'label' => __('Topology maps'), + ], + [ + 'link' => '', + 'label' => __('GIS Maps'), + ], + ] ); $own_info = get_user_info($config['id_user']); diff --git a/pandora_console/operation/gis_maps/render_view.php b/pandora_console/operation/gis_maps/render_view.php index 6ecb1ed6a4..5db4c1ea41 100644 --- a/pandora_console/operation/gis_maps/render_view.php +++ b/pandora_console/operation/gis_maps/render_view.php @@ -116,33 +116,34 @@ $controls = [ $layers = gis_get_layers($idMap); -// Render map +// Render map. $has_management_acl = check_acl_restricted_all($config['id_user'], $map['group_id'], 'MW') || check_acl_restricted_all($config['id_user'], $map['group_id'], 'MM'); $buttons = []; $buttons['gis_maps_list'] = [ - 'text' => ''.html_print_image( - 'images/list.png', + 'active' => false, + 'text' => ''.html_print_image( + 'images/logs@svg.svg', true, [ 'title' => __('GIS Maps list'), - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ).'', ]; if ($config['pure'] == 0) { - $buttons[]['text'] = ''.html_print_image('images/full_screen.png', true, ['title' => __('Full screen mode'), 'class' => 'invert_filter']).''; + $buttons[]['text'] = ''.html_print_image('images/fullscreen@svg.svg', true, ['title' => __('Full screen mode'), 'class' => 'main_menu_icon invert_filter']).''; } else { - $buttons[]['text'] = ''.html_print_image('images/normalscreen.png', true, ['title' => __('Back to normal mode'), 'class' => 'invert_filter']).''; + $buttons[]['text'] = ''.html_print_image('images/exit_fullscreen@svg.svg', true, ['title' => __('Back to normal mode'), 'class' => 'main_menu_icon invert_filter']).''; } -if ($has_management_acl) { +if ($has_management_acl === true) { $hash = md5($config['dbpass'].$idMap.$config['id_user']); $buttons['public_link']['text'] = ''.html_print_image('images/camera_mc.png', true, ['title' => __('Show link to public GIS map'), 'class' => 'invert_filter']).''; + ).'" target="_blank">'.html_print_image('images/item-icon.svg', true, ['title' => __('Show link to public GIS map'), 'class' => 'main_menu_icon invert_filter']).''; } $times = [ @@ -170,17 +171,27 @@ $status = [ $buttons[]['text'] = "
".__('Filter by status').': '.html_print_select($status, 'show_status', 'all', 'changeShowStatus(this.value);', '', 0, true, false, false).'
'; if ($has_management_acl) { - $buttons['setup']['text'] = ''.html_print_image('images/setup.png', true, ['title' => __('Setup'), 'class' => 'invert_filter']).''; + $buttons['setup']['text'] = ''.html_print_image('images/configuration@svg.svg', true, ['title' => __('Setup'), 'class' => 'main_menu_icon invert_filter']).''; $buttons['setup']['godmode'] = 1; } -ui_print_page_header( +ui_print_standard_header( __('Map').' » '.__('Map').' '.$map['map_name'], 'images/op_gis.png', false, - 'render_view_tab', + '', false, - $buttons + $buttons, + [ + [ + 'link' => '', + 'label' => __('Topology maps'), + ], + [ + 'link' => '', + 'label' => __('GIS Maps'), + ], + ] ); $map_inline_style = 'width: 100%; min-height:500px; height: calc(100vh - 80px);'; diff --git a/pandora_console/operation/menu.php b/pandora_console/operation/menu.php index b9e2d2d714..11472b54a1 100644 --- a/pandora_console/operation/menu.php +++ b/pandora_console/operation/menu.php @@ -411,7 +411,7 @@ if ($access_console_node === true) { // INI GIS Maps. if ($config['activate_gis']) { $sub['gismaps']['text'] = __('GIS Maps'); - $sub['gismaps']['id'] = 'GIS Maps'; + $sub['gismaps']['id'] = 'GIS_Maps'; $sub['gismaps']['type'] = 'direct'; $sub['gismaps']['subtype'] = 'nolink'; $sub2 = [];