Merge branch 'develop' into 'ent-11474-inventario-all-no-se-muestra-en-metaconsola'

# Conflicts:
#   pandora_console/operation/inventory/inventory.php
This commit is contained in:
Miguel Angel Rasteu 2023-06-08 14:52:20 +00:00
commit 878ec24a17
43 changed files with 86 additions and 54 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.771-230607
Version: 7.0NG.771-230608
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.771-230607"
pandora_version="7.0NG.771-230608"
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.771';
use constant AGENT_BUILD => '230607';
use constant AGENT_BUILD => '230608';
# 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.771
%define release 230607
%define release 230608
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.771
%define release 230607
%define release 230608
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.771"
PI_BUILD="230607"
PI_BUILD="230608"
OS_NAME=`uname -s`
FORCE=0

View File

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

View File

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

View File

@ -220,7 +220,7 @@ function pandora_realtime_graphs()
false,
'',
'white-box-content',
'box-flat white_table_graph fixed_filter_bar'
'box-flat white_table_graph fixed_filter_bar top_0px_important mrgn_btn_35px_imp'
);
$chart[time()]['graph'] = '0';

View File

@ -40,6 +40,4 @@ CREATE TABLE IF NOT EXISTS `tsesion_filter_log_viewer` (
ALTER TABLE `talert_template_module_actions` ADD COLUMN `recovered` TINYINT NOT NULL DEFAULT 0;
UPDATE tconfig SET value = 'Renaissance' WHERE token LIKE 'lts_name';
COMMIT;

View File

@ -83,4 +83,6 @@ ADD COLUMN `metaconsole_data_section` VARCHAR(255) NOT NULL DEFAULT '' AFTER `me
ALTER TABLE `tusuario`
ADD COLUMN `metaconsole_default_event_filter` INT UNSIGNED NOT NULL DEFAULT 0 AFTER `default_event_filter`;
UPDATE tconfig SET value = 'Renaissance' WHERE token LIKE 'lts_name';
COMMIT;

View File

@ -1460,7 +1460,7 @@ class HostDevices extends Wizard
}
include_once $config['homedir'].'/include/class/CredentialStore.class.php';
$available_keys = CredentialStore::getKeys('CUSTOM');
$available_keys = CredentialStore::getKeys('WMI');
if (check_acl($config['id_user'], 0, 'UM')) {
$link_to_cs = '<a class="ext_link" href="'.ui_get_full_url(
'index.php?sec=gmodules&sec2=godmode/groups/group_list&tab=credbox'
@ -1482,7 +1482,7 @@ class HostDevices extends Wizard
'arguments' => [
'type' => 'select',
'name' => 'auth_strings[]',
'fields' => CredentialStore::getKeys('CUSTOM'),
'fields' => CredentialStore::getKeys('WMI'),
'selected' => explode(
',',
$this->task['auth_strings']

View File

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

View File

@ -2298,6 +2298,8 @@ var formatterDataVerticalBar = function(value, ctx) {
$(document).ready(function() {
$("#icon_about").click(function() {
$("#icon_about").addClass("selected");
// Hidden tips modal.
$(".window").css("display", "none");
jQuery.post(
"ajax.php",

View File

@ -354,6 +354,8 @@ class ColorModuleTabs extends Widget
{
global $config;
include_once $config['homedir'].'/include/functions_graph.php';
$size = parent::getSize();
$output = '';

View File

@ -135,6 +135,7 @@ class EventCardboard extends Widget
include_once $config['homedir'].'/include/functions_agents.php';
include_once $config['homedir'].'/include/functions_modules.php';
include_once $config['homedir'].'/include/functions_events.php';
// WARNING: Do not edit. This chunk must be in the constructor.
parent::__construct(

View File

@ -384,7 +384,7 @@ class ModuleIconWidget extends Widget
'agent_id' => $values['agentId'],
'metaconsole_id' => $values['metaconsoleId'],
'style' => 'width: inherit;',
'filter_modules' => users_access_to_agent($values['agentId']) === false ? [$values['moduleId']] : [],
'filter_modules' => (users_access_to_agent($values['agentId'], 'AR', false, is_metaconsole()) === false) ? [$values['moduleId']] : [],
'nothing' => __('None'),
'nothing_value' => 0,
],
@ -563,10 +563,12 @@ class ModuleIconWidget extends Widget
$output .= '<div class="container-center" id="container-'.$uuid.'">';
$orientation = '';
$margin_bottom = '';
if ((int) $this->values['horizontal'] === 1) {
$orientation = 'flex aligni_center';
} else {
$orientation = 'grid';
$margin_bottom = 'mrgn_btn_15px';
}
// General div.
@ -596,7 +598,7 @@ class ModuleIconWidget extends Widget
// Div image.
$style_icon = 'flex: 0 1 '.$sizeIcon.'px;';
$output .= '<div class="pdd_l_15px pdd_r_15px mrgn_btn_25px" style="flex: 0 1 '.$sizeIcon.'px; height: '.$sizeIcon.'px;">';
$output .= '<div class="pdd_l_15px pdd_r_15px '.$margin_bottom.'" style="flex: 0 1 '.$sizeIcon.'px; height: '.$sizeIcon.'px;">';
$output .= html_print_image(
'images/console/icons/'.$icon.$color_icon.'.png',
true,
@ -604,7 +606,7 @@ class ModuleIconWidget extends Widget
);
$output .= '</div>';
// Div value.
$output .= '<div class="mrgn_btn_15px" style="flex: 0 1 10px; line-height: '.$sizeValue.'px; font-size:'.$sizeValue.'px;">';
$output .= '<div class="'.$margin_bottom.'" style="flex: 0 1 10px; line-height: '.$sizeValue.'px; font-size:'.$sizeValue.'px;">';
$output .= remove_right_zeros(
number_format($data_module, $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])
).$unit;

View File

@ -375,7 +375,7 @@ class ModuleStatusWidget extends Widget
'agent_id' => $values['agentId'],
'metaconsole_id' => $values['metaconsoleId'],
'style' => 'width: inherit;',
'filter_modules' => (users_access_to_agent($values['agentId']) === false) ? [$values['moduleId']] : [],
'filter_modules' => (users_access_to_agent($values['agentId'], 'AR', false, is_metaconsole()) === false) ? [$values['moduleId']] : [],
'nothing' => __('None'),
'nothing_value' => 0,
],
@ -560,17 +560,19 @@ class ModuleStatusWidget extends Widget
$output .= '<div class="container-center" id="container-'.$uuid.'">';
$orientation = '';
$margin_bottom = '';
if ((int) $this->values['horizontal'] === 1) {
$orientation = 'flex aligni_center';
} else {
$orientation = 'grid';
$margin_bottom = 'mrgn_btn_15px';
}
// General div.
$output .= '<div class="'.$orientation.'" id="general-'.$uuid.'">';
// Div image.
$output .= '<div class="pdd_l_15px pdd_r_15px mrgn_btn_25px" style="flex: 0 1 '.$sizeIcon.'px; height: '.$sizeIcon.'px;">';
$output .= '<div class="pdd_l_15px pdd_r_15px '.$margin_bottom.'" style="flex: 0 1 '.$sizeIcon.'px; height: '.$sizeIcon.'px;">';
$output .= html_print_image(
'images/console/icons/'.$icon,
true,

View File

@ -359,7 +359,7 @@ class ModuleValueWidget extends Widget
'agent_id' => $values['agentId'],
'metaconsole_id' => $values['metaconsoleId'],
'style' => 'width: inherit;',
'filter_modules' => (users_access_to_agent($values['agentId']) === false) ? [$values['moduleId']] : [],
'filter_modules' => (users_access_to_agent($values['agentId'], 'AR', false, is_metaconsole()) === false) ? [$values['moduleId']] : [],
'nothing' => __('None'),
'nothing_value' => 0,
],
@ -471,17 +471,19 @@ class ModuleValueWidget extends Widget
$output .= '<div class="container-center" id="container-'.$uuid.'">';
$orientation = '';
$margin_bottom = '';
if ((int) $this->values['horizontal'] === 1) {
$orientation = 'flex aligni_center';
} else {
$orientation = 'grid';
$margin_bottom = 'mrgn_btn_20px';
}
// General div.
$output .= '<div class="'.$orientation.'" id="general-'.$uuid.'">';
// Div value.
$output .= '<div class="pdd_l_15px pdd_r_15px mrgn_btn_20px" style="flex: 0 1 '.$sizeValue.'px; line-height: '.$sizeValue.'px; font-size:'.$sizeValue.'px; color: '.$color.'">';
$output .= '<div class="pdd_l_15px pdd_r_15px '.$margin_bottom.'" style="flex: 0 1 '.$sizeValue.'px; line-height: '.$sizeValue.'px; font-size:'.$sizeValue.'px; color: '.$color.'">';
if (is_numeric($data_module) === true) {
$dataDatos = remove_right_zeros(

View File

@ -516,16 +516,18 @@ class SLAPercentWidget extends Widget
$output .= '<div class="container-center" id="container-'.$uuid.'">';
$orientation = '';
$margin_bottom = '';
if ((int) $this->values['horizontal'] === 1) {
$orientation = 'flex aligni_center';
} else {
$orientation = 'grid';
$margin_bottom = 'mrgn_btn_20px';
}
// General div.
$output .= '<div class="'.$orientation.'" id="general-'.$uuid.'">';
// Div value.
$output .= '<div class="pdd_l_15px pdd_r_15px mrgn_btn_20px" style="flex: 0 1 '.$sizeValue.'px; line-height: '.$sizeValue.'px; font-size:'.$sizeValue.'px;">';
$output .= '<div class="pdd_l_15px pdd_r_15px '.$margin_bottom.'" style="flex: 0 1 '.$sizeValue.'px; line-height: '.$sizeValue.'px; font-size:'.$sizeValue.'px;">';
$output .= $sla_array['sla_fixed'].'%';
$output .= '</div>';

View File

@ -395,6 +395,12 @@ class SystemGroupStatusWidget extends Widget
$user_groups = users_get_groups(false, 'AR', $return_all_group);
$selected_groups = explode(',', $this->values['groupId'][0]);
if (in_array(0, $selected_groups) === true) {
$selected_groups = [];
foreach (groups_get_all() as $key => $name_group) {
$selected_groups[] = groups_get_id($name_group);
}
}
// Recursion.
if ($this->values['groupRecursion'] === true) {

View File

@ -181,7 +181,7 @@ final class Container extends Model
null
);
return ($backgroundImage === 'None.png') ? null : str_replace(' ', '%20', $backgroundImage);
return ($backgroundImage === 'None.png' || $backgroundImage === null) ? null : str_replace(' ', '%20', $backgroundImage);
}

View File

@ -142,7 +142,9 @@ h1 {
img {
cursor: pointer;
}
#modal-add-widget {
min-height: 566px !important;
}
#modal-add-widget .container-list-widgets {
display: flex;
flex-direction: row;

View File

@ -26,7 +26,7 @@
}
#div_display::-webkit-scrollbar:vertical {
width: 5px;
width: 0px;
}
#div_display::-webkit-scrollbar-button:increment,
@ -57,7 +57,7 @@
}
#div_management::-webkit-scrollbar:vertical {
width: 5px;
width: 0px;
}
#div_management::-webkit-scrollbar-button:increment,

View File

@ -7158,6 +7158,10 @@ div.graph div.legend table {
margin-bottom: 35px;
}
.mrgn_btn_35px_imp {
margin-bottom: 35px !important;
}
.mrgn_btn_40px {
margin-bottom: 40px;
}
@ -11856,6 +11860,10 @@ div.relative > div > div#ui-datepicker-div {
width: 400px;
}
#message_dialog_connection {
height: auto !important;
}
#module_relations > thead > tr {
border: none !important;
border-bottom: 1px solid #e2e2e2 !important;

View File

@ -32,16 +32,6 @@ if (defined('__PAN_XHPROF__') === false) {
define('__PAN_XHPROF__', 0);
}
require 'vendor/autoload.php';
if (__PAN_XHPROF__ === 1) {
if (function_exists('tideways_xhprof_enable') === true) {
tideways_xhprof_enable();
} else {
error_log('Cannot find tideways_xhprof_enable function');
}
}
// Needed for InfoBox count.
if (isset($_SESSION['info_box_count']) === true) {
$_SESSION['info_box_count'] = 0;
@ -142,6 +132,16 @@ if ((file_exists('include/config.php') === false)
exit;
}
require 'vendor/autoload.php';
if (__PAN_XHPROF__ === 1) {
if (function_exists('tideways_xhprof_enable') === true) {
tideways_xhprof_enable();
} else {
error_log('Cannot find tideways_xhprof_enable function');
}
}
/*
* DO NOT CHANGE ORDER OF FOLLOWING REQUIRES.
*/

View File

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

View File

@ -149,8 +149,11 @@ if (is_ajax() === true) {
$tmp->alias .= $server['server_name'].' &raquo; ';
}
$id = !empty($agent['id_agente']) ? $agent['id_agente'] : $agent['id_agent'];
$id = !empty($id) ? $id : $agent['id_tagente'];
if (is_metaconsole() === true) {
$id = !empty($agent['id_agente']) ? $agent['id_agente'] : $agent['id_tagente'];
} else {
$id = !empty($agent['id_agente']) ? $agent['id_agente'] : $agent['id_agent'];
}
$tmp->alias .= $agent['alias'];
$ip = '<em>'.__('N/A').'</em>';

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.771
%define release 230607
%define release 230608
# 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.771
%define release 230607
%define release 230608
# 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.771
%define release 230607
%define release 230608
%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.771-230607
Version: 7.0NG.771-230608
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.771-230607"
pandora_version="7.0NG.771-230608"
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.771";
my $pandora_build = "230607";
my $pandora_build = "230608";
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.771";
my $pandora_build = "230607";
my $pandora_build = "230608";
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.771
%define release 230607
%define release 230608
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.771
%define release 230607
%define release 230608
Summary: Pandora FMS Server
Name: %{name}

View File

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