Merge remote-tracking branch 'origin/develop' into ent-9086-eliminacion-de-la-replicacion-de-eventos-duplicado

Conflicts:
	pandora_console/operation/events/events.php
This commit is contained in:
Daniel Barbero Martin 2022-06-16 09:09:49 +02:00
commit acef7e6f63
37 changed files with 170 additions and 80 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.762-220615
Version: 7.0NG.762-220616
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.762-220615"
pandora_version="7.0NG.762-220616"
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

@ -1015,7 +1015,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.762';
use constant AGENT_BUILD => '220615';
use constant AGENT_BUILD => '220616';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 7.0NG.762
%define release 220615
%define release 220616
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 7.0NG.762
%define release 220615
%define release 220616
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.762"
PI_BUILD="220615"
PI_BUILD="220616"
OS_NAME=`uname -s`
FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{220615}
{220616}
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.762 Build 220615")
#define PANDORA_VERSION ("7.0NG.762 Build 220616")
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.762(Build 220615))"
VALUE "ProductVersion", "(7.0NG.762(Build 220616))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 7.0NG.762-220615
Version: 7.0NG.762-220616
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.762-220615"
pandora_version="7.0NG.762-220616"
package_pear=0
package_pandora=1

View File

@ -26,6 +26,8 @@
* ============================================================================
*/
use function PHPSTORM_META\map;
// Begin.
if (isset($config['id_user']) === false) {
include 'general/login_page.php';
@ -57,52 +59,22 @@ if (isset($config['autohidden_menu']) === true && (bool) $config['autohidden_men
// Start of full lateral menu.
echo sprintf('<div id="menu_full" class="menu_full_%s">', $menuTypeClass);
$custom_logo = 'images/custom_logo/'.$config['custom_logo'];
$custom_logo_collapsed = 'images/custom_logo/'.$config['custom_logo_collapsed'];
if (defined('PANDORA_ENTERPRISE') === false) {
$logo_title = get_product_name().' Opensource';
$custom_logo = 'images/custom_logo/pandora_logo_head_3.png';
$custom_logo_collapsed = 'images/custom_logo/pandora_logo_green_collapsed.png';
} else {
if (file_exists(ENTERPRISE_DIR.'/'.$custom_logo) === true) {
$custom_logo = ENTERPRISE_DIR.'/'.$custom_logo;
}
$logo_title = get_product_name().' Enterprise';
}
echo '<div class="logo_green"><a href="index.php?sec=main">';
if (isset($config['custom_logo']) === true) {
echo html_print_image(
$custom_logo,
true,
// Header logo.
html_print_div(
[
'border' => '0',
'width' => '215',
'alt' => $logo_title,
'class' => 'logo_full',
'style' => ($menuCollapsed === true) ? 'display:none' : 'display:block',
]
);
}
if (isset($config['custom_logo_collapsed']) === true) {
echo html_print_image(
$custom_logo_collapsed,
true,
'class' => 'logo_green',
'content' => html_print_anchor(
[
'border' => '0',
'width' => '60',
'alt' => $logo_title,
'class' => 'logo_icon',
'style' => ($menuCollapsed === true) ? 'display:block' : 'display:none',
'href' => ui_get_full_url('index.php'),
'content' => html_print_header_logo_image(
$menuCollapsed,
true
),
],
true
),
]
);
}
echo '</a></div>';
);
require 'operation/menu.php';
require 'godmode/menu.php';

View File

@ -107,6 +107,39 @@ switch ($tab) {
case 'online':
default:
if (is_metaconsole() === false && has_metaconsole() === true) {
$meta_puid = null;
$server_id = $config['metaconsole_node_id'];
$dbh = (object) $config['dbconnection'];
// Connect to metaconsole.
$result_code = metaconsole_load_external_db(
[
'dbhost' => $config['replication_dbhost'],
'dbuser' => $config['replication_dbuser'],
'dbpass' => io_output_password($config['replication_dbpass']),
'dbname' => $config['replication_dbname'],
]
);
if ($result_code < 0) {
break;
}
$value = db_get_value('value', 'tconfig', 'token', 'pandora_uid');
$meta_puid = $value;
// Return connection to node.
metaconsole_restore_db();
if ($meta_puid === false || $meta_puid === null) {
ui_print_warning_message(__('Please register on metaconsole first.'));
break;
}
}
$mode = \UpdateManager\UI\Manager::MODE_ONLINE;
include $config['homedir'].'/godmode/um_client/index.php';
break;

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@ -20,7 +20,7 @@
/**
* Pandora build version and version
*/
$build_version = 'PC220615';
$build_version = 'PC220616';
$pandora_version = 'v7.0NG.762';
// Do not overwrite default timezone set if defined.

View File

@ -294,7 +294,11 @@ define('SERVICE_ELEMENT_DYNAMIC', 'dynamic');
define('SERVICE_MODE_MANUAL', 0);
define('SERVICE_MODE_SMART', 1);
// New installation Product Logo.
define('HEADER_LOGO_DEFAULT_CLASSIC', 'logo-default-pandorafms.png');
define('HEADER_LOGO_DEFAULT_COLLAPSED', 'logo-default-pandorafms-collapsed.png');
define('HEADER_LOGO_BLACK_CLASSIC', 'logo-black-pandorafms.png');
define('HEADER_LOGO_BLACK_COLLAPSED', 'logo-default-pandorafms-collapsed.png');
// Status images.
// For modules.

View File

@ -5116,7 +5116,7 @@ function api_set_update_snmp_module($id_module, $thrash1, $other, $thrash3)
function api_set_new_network_component($id, $thrash1, $other, $thrash2)
{
global $config;
if (is_metaconsole() === true) {
if (defined('METACONSOLE')) {
return;
}
@ -5218,7 +5218,7 @@ function api_set_new_plugin_component($id, $thrash1, $other, $thrash2)
{
global $config;
if (is_metaconsole() === true) {
if (defined('METACONSOLE')) {
return;
}
@ -5498,7 +5498,7 @@ function api_set_new_local_component($id, $thrash1, $other, $thrash2)
{
global $config;
if (is_metaconsole() === true) {
if (defined('METACONSOLE')) {
return;
}

View File

@ -2361,12 +2361,12 @@ function config_process_config()
config_update_value('custom_favicon', '');
}
if (!isset($config['custom_logo'])) {
config_update_value('custom_logo', 'pandora_logo_head_4.png');
if (isset($config['custom_logo']) === false) {
config_update_value('custom_logo', HEADER_LOGO_DEFAULT_CLASSIC);
}
if (!isset($config['custom_logo_collapsed'])) {
config_update_value('custom_logo_collapsed', 'pandora_logo_green_collapsed.png');
if (isset($config['custom_logo_collapsed']) === false) {
config_update_value('custom_logo_collapsed', HEADER_LOGO_DEFAULT_COLLAPSED);
}
if (is_metaconsole()) {

View File

@ -4237,6 +4237,82 @@ function html_print_image(
}
/**
* Function for print the logo in menu header.
*
* @param boolean $menuCollapsed If true, the menu is collapsed.
* @param boolean $return If true, the formed element is returned.
*
* @return mixed.
*/
function html_print_header_logo_image(bool $menuCollapsed, bool $return=false)
{
global $config;
if (defined('PANDORA_ENTERPRISE') === false) {
if ($config['style'] === 'pandora_black') {
$custom_logo = 'images/custom_logo/'.HEADER_LOGO_BLACK_CLASSIC;
$custom_logo_collapsed = 'images/custom_logo/'.HEADER_LOGO_DEFAULT_COLLAPSED;
} else if ($config['style'] === 'pandora') {
$custom_logo = 'images/custom_logo/'.HEADER_LOGO_DEFAULT_CLASSIC;
$custom_logo_collapsed = 'images/custom_logo/'.HEADER_LOGO_DEFAULT_COLLAPSED;
}
$logo_title = get_product_name().' Opensource';
} else {
// Handle default logos when change theme.
if ($config['style'] === 'pandora_black' && $config['custom_logo'] === HEADER_LOGO_DEFAULT_CLASSIC) {
$config['custom_logo'] = HEADER_LOGO_BLACK_CLASSIC;
} else if ($config['style'] === 'pandora' && $config['custom_logo'] === HEADER_LOGO_BLACK_CLASSIC) {
$config['custom_logo'] = HEADER_LOGO_DEFAULT_CLASSIC;
}
$logo_title = get_product_name().' Enterprise';
$custom_logo = 'images/custom_logo/'.$config['custom_logo'];
$custom_logo_collapsed = 'images/custom_logo/'.$config['custom_logo_collapsed'];
if (file_exists(ENTERPRISE_DIR.'/'.$custom_logo) === true) {
$custom_logo = ENTERPRISE_DIR.'/'.$custom_logo;
}
}
if (isset($config['custom_logo']) === true) {
$output = html_print_image(
$custom_logo,
true,
[
'border' => '0',
'width' => '215',
'alt' => $logo_title,
'class' => 'logo_full',
'style' => ($menuCollapsed === true) ? 'display:none' : 'display:block',
]
);
}
if (isset($config['custom_logo_collapsed']) === true) {
$output .= html_print_image(
$custom_logo_collapsed,
true,
[
'border' => '0',
'width' => '60',
'alt' => $logo_title,
'class' => 'logo_icon',
'style' => ($menuCollapsed === true) ? 'display:block' : 'display:none',
]
);
}
if ($return === false) {
echo $output;
} else {
return $output;
}
}
/**
* Render an input text element. Extended version, use html_print_input_text() to simplify.
*

View File

@ -115,6 +115,7 @@ table.dataTable tbody td {
padding-top: 7px;
padding-bottom: 7px;
border-bottom: 2px solid #dedede;
word-break: break-all;
}
.filter_input {

View File

@ -399,7 +399,8 @@ ul li {
}
.logo_green {
height: 60px;
background-color: #fff;
min-height: 60px;
display: flex;
justify-content: center;
align-items: center;

View File

@ -65,6 +65,9 @@ table.agent_info_table tr {
color: #fff !important;
}
.logo_green {
background-color: #000;
}
#um-next:hover,
#um-last:hover {
border: 1px solid #888 !important;

View File

@ -129,7 +129,7 @@
<div style='height: 10px'>
<?php
$version = '7.0NG.762';
$build = '220615';
$build = '220616';
$banner = "v$version Build $build";
error_reporting(0);

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.762
%define release 220615
%define release 220616
# 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.762
%define release 220615
%define release 220616
# 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.762
%define release 220615
%define release 220616
%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.762-220615
Version: 7.0NG.762-220616
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.762-220615"
pandora_version="7.0NG.762-220616"
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.762";
my $pandora_build = "220615";
my $pandora_build = "220616";
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.762";
my $pandora_build = "220615";
my $pandora_build = "220616";
our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_server
%define version 7.0NG.762
%define release 220615
%define release 220616
Summary: Pandora FMS Server
Name: %{name}

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_server
%define version 7.0NG.762
%define release 220615
%define release 220616
Summary: Pandora FMS Server
Name: %{name}

View File

@ -9,7 +9,7 @@
# **********************************************************************
PI_VERSION="7.0NG.762"
PI_BUILD="220615"
PI_BUILD="220616"
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.762 Build 220615";
my $version = "7.0NG.762 Build 220616";
# 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.762 Build 220615";
my $version = "7.0NG.762 Build 220616";
# save program name for logging
my $progname = basename($0);