Merge branch 'ent-9662-second-round' of brutus.artica.es:artica/pandorafms into ent-9662-second-round

This commit is contained in:
Pablo Aragon 2023-03-23 11:51:32 +01:00
commit 1ac37dd538
29 changed files with 71 additions and 43 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.769-230322
Version: 7.0NG.769-230323
Architecture: all
Priority: optional
Section: admin

View File

@ -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

View File

@ -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;

View File

@ -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}

View File

@ -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}

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.769"
PI_BUILD="230322"
PI_BUILD="230323"
OS_NAME=`uname -s`
FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{230322}
{230323}
ViewReadme
{Yes}

View File

@ -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;

View File

@ -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

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 7.0NG.769-230322
Version: 7.0NG.769-230323
Architecture: all
Priority: optional
Section: admin

View File

@ -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

View File

@ -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.

View File

@ -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;

View File

@ -131,7 +131,7 @@
<div style='padding-bottom: 50px'>
<?php
$version = '7.0NG.769';
$build = '230322';
$build = '230323';
$banner = "v$version Build $build";
error_reporting(0);

View File

@ -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' => '<a href="index.php?sec=godgismaps&sec2=operation/gis_maps/gis_map">'.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',
]
).'</a>',
];
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']);

View File

@ -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'] = [
'active' => false,
'text' => '<a href="index.php?sec=godgismaps&sec2=operation/gis_maps/gis_map">'.html_print_image(
'images/list.png',
'images/logs@svg.svg',
true,
[
'title' => __('GIS Maps list'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'</a>',
];
if ($config['pure'] == 0) {
$buttons[]['text'] = '<a href="index.php?sec=gismaps&amp;sec2=operation/gis_maps/render_view&amp;map_id='.$idMap.'&amp;refr='.((int) get_parameter('refr', 0)).'&amp;pure=1">'.html_print_image('images/full_screen.png', true, ['title' => __('Full screen mode'), 'class' => 'invert_filter']).'</a>';
$buttons[]['text'] = '<a href="index.php?sec=gismaps&amp;sec2=operation/gis_maps/render_view&amp;map_id='.$idMap.'&amp;refr='.((int) get_parameter('refr', 0)).'&amp;pure=1">'.html_print_image('images/fullscreen@svg.svg', true, ['title' => __('Full screen mode'), 'class' => 'main_menu_icon invert_filter']).'</a>';
} else {
$buttons[]['text'] = '<a href="index.php?sec=gismaps&amp;sec2=operation/gis_maps/render_view&amp;map_id='.$idMap.'&amp;refr='.((int) get_parameter('refr', 0)).'">'.html_print_image('images/normalscreen.png', true, ['title' => __('Back to normal mode'), 'class' => 'invert_filter']).'</a>';
$buttons[]['text'] = '<a href="index.php?sec=gismaps&amp;sec2=operation/gis_maps/render_view&amp;map_id='.$idMap.'&amp;refr='.((int) get_parameter('refr', 0)).'">'.html_print_image('images/exit_fullscreen@svg.svg', true, ['title' => __('Back to normal mode'), 'class' => 'main_menu_icon invert_filter']).'</a>';
}
if ($has_management_acl) {
if ($has_management_acl === true) {
$hash = md5($config['dbpass'].$idMap.$config['id_user']);
$buttons['public_link']['text'] = '<a href="'.ui_get_full_url(
'operation/gis_maps/public_console.php?hash='.$hash.'&map_id='.$idMap.'&id_user='.$config['id_user']
).'" target="_blank">'.html_print_image('images/camera_mc.png', true, ['title' => __('Show link to public GIS map'), 'class' => 'invert_filter']).'</a>';
).'" target="_blank">'.html_print_image('images/item-icon.svg', true, ['title' => __('Show link to public GIS map'), 'class' => 'main_menu_icon invert_filter']).'</a>';
}
$times = [
@ -170,17 +171,27 @@ $status = [
$buttons[]['text'] = "<div class='mrgn_top_6px'>".__('Filter by status').': '.html_print_select($status, 'show_status', 'all', 'changeShowStatus(this.value);', '', 0, true, false, false).'</div>';
if ($has_management_acl) {
$buttons['setup']['text'] = '<a href="index.php?sec=godgismaps&sec2=godmode/gis_maps/configure_gis_map&action=edit_map&map_id='.$idMap.'">'.html_print_image('images/setup.png', true, ['title' => __('Setup'), 'class' => 'invert_filter']).'</a>';
$buttons['setup']['text'] = '<a href="index.php?sec=godgismaps&sec2=godmode/gis_maps/configure_gis_map&action=edit_map&map_id='.$idMap.'">'.html_print_image('images/configuration@svg.svg', true, ['title' => __('Setup'), 'class' => 'main_menu_icon invert_filter']).'</a>';
$buttons['setup']['godmode'] = 1;
}
ui_print_page_header(
ui_print_standard_header(
__('Map').' &raquo; '.__('Map').'&nbsp;'.$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);';

View File

@ -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 = [];

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.769
%define release 230322
%define release 230323
# User and Group under which Apache is running
%define httpd_name httpd

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.769
%define release 230322
%define release 230323
# User and Group under which Apache is running
%define httpd_name httpd

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.769
%define release 230322
%define release 230323
%define httpd_name httpd
# User and Group under which Apache is running
%define httpd_name apache2

View File

@ -1,5 +1,5 @@
package: pandorafms-server
Version: 7.0NG.769-230322
Version: 7.0NG.769-230323
Architecture: all
Priority: optional
Section: admin

View File

@ -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_cpan=0
package_pandora=1

View File

@ -46,7 +46,7 @@ our @EXPORT = qw(
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.769";
my $pandora_build = "230322";
my $pandora_build = "230323";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash

View File

@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.769";
my $pandora_build = "230322";
my $pandora_build = "230323";
our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

@ -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}

View File

@ -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}

View File

@ -9,7 +9,7 @@
# **********************************************************************
PI_VERSION="7.0NG.769"
PI_BUILD="230322"
PI_BUILD="230323"
MODE=$1
if [ $# -gt 1 ]; then

View File

@ -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;

View File

@ -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);