Merge branch 'develop' into ent-10435-cambios-intaladores-online

This commit is contained in:
Rafael 2023-02-21 15:30:20 +01:00
commit f98b8baec1
38 changed files with 163 additions and 85 deletions

View File

@ -1,6 +1,7 @@
#
#Pandora FMS Linux Agent
#
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 4.0
%define release 1

View File

@ -1,6 +1,7 @@
#
#Pandora FMS Linux Agent
#
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 4.0.1
%define release 1

View File

@ -1,6 +1,7 @@
#
#Pandora FMS Linux Agent
#
%global __os_install_post %{nil}
%define name pandorafms_agent
%define version 3.2
Summary: Pandora FMS Linux agent

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.769-230217
Version: 7.0NG.769-230221
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-230217"
pandora_version="7.0NG.769-230221"
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 => '230217';
use constant AGENT_BUILD => '230221';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

@ -1,9 +1,10 @@
#
#Pandora FMS Linux Agent
#
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.769
%define release 230217
%define release 230221
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -1,9 +1,10 @@
#
#Pandora FMS Linux Agent
#
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.769
%define release 230217
%define release 230221
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

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

View File

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

View File

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

View File

@ -359,6 +359,10 @@ if ($config['enterprise_installed']) {
}
// CSRF validation.
if (isset($_SESSION['csrf_code']) === true) {
unset($_SESSION['csrf_code']);
}
html_print_csrf_hidden();
echo '</form></div>';

View File

@ -402,6 +402,11 @@ if ($delete_user === true) {
__('There was a problem deleting the profile')
);
} else if ($disable_user !== false) {
// CSRF Validator.
if (html_print_csrf_error()) {
return;
}
// Disable_user.
$id_user = get_parameter('id', 0);
@ -646,6 +651,8 @@ $limit = (int) $config['block_size'];
$rowPair = true;
$iterator = 0;
$cont = 0;
// Creates csrf.
$csrf = html_print_csrf_hidden(true);
foreach ($info as $user_id => $user_info) {
if (empty($user_id) === true) {
continue;
@ -815,6 +822,8 @@ foreach ($info as $user_id => $user_info) {
$user_info['id_user'],
true
);
// Same csrf for every disable button for submit.
$data[6] .= $csrf;
$data[6] .= html_print_input_hidden(
'disable_user',
$toDoAction,

View File

@ -104,6 +104,7 @@ class Diagnostics extends Wizard
'getChartAjax',
'formFeedback',
'createdScheduleFeedbackTask',
'getSystemDate',
];
@ -209,6 +210,7 @@ class Diagnostics extends Wizard
'getAttachmentFolder',
'getInfoTagenteDatos',
'getServerThreads',
'getSystemDate',
];
if ($this->pdf === true) {
@ -278,6 +280,10 @@ class Diagnostics extends Wizard
$title = __('SQL show engine innodb status');
break;
case 'getSystemDate':
$title = __('Date system');
break;
default:
// Not possible.
$title = '';
@ -516,6 +522,27 @@ class Diagnostics extends Wizard
}
/**
* Date system
*
* @return string
*/
public function getSystemDate(): string
{
$result = [
'error' => false,
'data' => [
'date' => [
'name' => __('System Date (Console)'),
'value' => date('H:i:s Y-m-d'),
],
],
];
return json_encode($result);
}
/**
* Database size stats.
*

View File

@ -413,73 +413,74 @@ class SnmpConsole extends HTML
'class' => 'flex-row',
'inputs' => [
[
'label' => __('Alert'),
'type' => 'select',
'id' => 'filter_alert',
'name' => 'filter_alert',
'class' => 'w200px',
'fields' => $show_alerts,
'return' => true,
'selected' => $this->filter_alert,
'label' => __('Alert'),
'type' => 'select',
'id' => 'filter_alert',
'input_class' => 'filter_input_datatable',
'name' => 'filter_alert',
'fields' => $show_alerts,
'return' => true,
'selected' => $this->filter_alert,
],
[
'label' => __('Severity'),
'type' => 'select',
'id' => 'filter_severity',
'name' => 'filter_severity',
'class' => 'w200px',
'fields' => $severities,
'return' => true,
'selected' => $this->filter_severity,
'label' => __('Severity'),
'type' => 'select',
'id' => 'filter_severity',
'input_class' => 'filter_input_datatable',
'name' => 'filter_severity',
'fields' => $severities,
'return' => true,
'selected' => $this->filter_severity,
],
[
'label' => __('Free search'),
'type' => 'text',
'class' => 'w400px',
'id' => 'filter_free_search',
'name' => 'filter_free_search',
'value' => $this->filter_free_search,
'label' => __('Free search'),
'type' => 'text',
'id' => 'filter_free_search',
'input_class' => 'filter_input_datatable',
'name' => 'filter_free_search',
'value' => $this->filter_free_search,
],
[
'label' => __('Status'),
'type' => 'select',
'id' => 'filter_status',
'name' => 'filter_status',
'class' => 'w200px',
'fields' => $status_array,
'return' => true,
'selected' => $this->filter_status,
'label' => __('Status'),
'type' => 'select',
'id' => 'filter_status',
'input_class' => 'filter_input_datatable',
'name' => 'filter_status',
'fields' => $status_array,
'return' => true,
'selected' => $this->filter_status,
],
[
'label' => __('Group by Enterprise String/IP'),
'type' => 'select',
'name' => 'filter_group_by',
'selected' => $this->filter_group_by,
'disabled' => false,
'return' => true,
'id' => 'filter_group_by',
'fields' => [
'label' => __('Group by Enterprise String/IP'),
'type' => 'select',
'name' => 'filter_group_by',
'selected' => $this->filter_group_by,
'disabled' => false,
'return' => true,
'id' => 'filter_group_by',
'input_class' => 'filter_input_datatable',
'fields' => [
0 => __('No'),
1 => __('Yes'),
],
],
[
'label' => __('Max. hours old'),
'type' => 'text',
'class' => 'w200px',
'id' => 'filter_hours_ago',
'name' => 'filter_hours_ago',
'value' => $this->filter_hours_ago,
'label' => __('Max. hours old'),
'type' => 'text',
'id' => 'filter_hours_ago',
'input_class' => 'filter_input_datatable',
'name' => 'filter_hours_ago',
'value' => $this->filter_hours_ago,
],
[
'label' => __('Trap type'),
'type' => 'select',
'id' => 'filter_trap_type',
'name' => 'filter_trap_type',
'class' => 'w200px',
'fields' => $trap_types,
'return' => true,
'selected' => $this->filter_trap_type,
'label' => __('Trap type'),
'type' => 'select',
'id' => 'filter_trap_type',
'input_class' => 'filter_input_datatable',
'name' => 'filter_trap_type',
'fields' => $trap_types,
'return' => true,
'selected' => $this->filter_trap_type,
],
],
],

View File

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

View File

@ -797,6 +797,7 @@ if (is_ajax()) {
$db_fragmentation = json_decode($d->getTablesFragmentation());
$sys_info = json_decode($d->getSystemInfo());
$php_sys = json_decode($d->getPHPSetup());
$system_date = json_decode($d->getSystemDate());
$fragmentation_status = '';
if ($db_fragmentation->data->tablesFragmentationStatus->status === 1) {
@ -1030,6 +1031,14 @@ if (is_ajax()) {
<p>'.$sys_info->data->ipInfo->value.'</p>
</th>
</tr>
<tr>
<th style="width: 15%;">
<p><span>'.$system_date->data->date->name.'</span></p>
</th>
<th style="width: 85%;">
<p>'.$system_date->data->date->value.'</p>
</th>
</tr>
</tbody>
</table>
</div>

View File

@ -323,6 +323,27 @@ a.pandora_pagination.current:hover {
cursor: default;
}
.filter_input_datatable {
width: 45% !important;
display: flex;
flex-wrap: nowrap;
flex-direction: row;
max-width: 450px;
min-width: 400px;
}
.filter_input_datatable input {
flex: 1;
}
.filter_input_datatable label {
width: 93px;
max-width: 100%;
}
.filter_input_datatable .select2.select2-container {
flex: 1;
}
.datatable_filter.content li.filter_input_datatable {
margin: 1em 0;
}
/* Default datatable filter style */
.datatable_filter.content {
display: flex;
@ -337,6 +358,7 @@ a.pandora_pagination.current:hover {
.datatable_filter.content li {
flex: 1 1 auto;
margin: 1em auto;
padding: 0px 10px;
}
.sorting_desc {
background: url(../../images/sort_down_green.png) no-repeat;

View File

@ -1049,6 +1049,7 @@ if (isset($_GET['bye'])) {
header_remove('Set-Cookie');
setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/');
generate_csrf_code();
// Process logout.
include 'general/logoff.php';

View File

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

View File

@ -2413,8 +2413,6 @@ try {
100,
200,
500,
1000,
-1,
],
[
$config['block_size'],
@ -2423,8 +2421,6 @@ try {
100,
200,
500,
1000,
'All',
],
],
'order' => [

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.769
%define release 230217
%define release 230221
# 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 230217
%define release 230221
# 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 230217
%define release 230221
%define httpd_name httpd
# User and Group under which Apache is running
%define httpd_name apache2

View File

@ -97,7 +97,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
('first_login', 0),
('mins_fail_pass', 5),
('number_attempts', 5),
('enable_pass_policy_admin', 0),
('enable_pass_policy_admin', 1),
('enable_pass_history', 0),
('compare_pass', 3),
('meta_style', 'meta_pandora'),

View File

@ -1,5 +1,5 @@
package: pandorafms-server
Version: 7.0NG.769-230217
Version: 7.0NG.769-230221
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-230217"
pandora_version="7.0NG.769-230221"
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 = "230217";
my $pandora_build = "230221";
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 = "230217";
my $pandora_build = "230221";
our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

@ -1,9 +1,10 @@
#
# Pandora FMS Server
#
%global __os_install_post %{nil}
%define name pandorafms_server
%define version 7.0NG.769
%define release 230217
%define release 230221
Summary: Pandora FMS Server
Name: %{name}

View File

@ -1,9 +1,10 @@
#
# Pandora FMS Server
#
%global __os_install_post %{nil}
%define name pandorafms_server
%define version 7.0NG.769
%define release 230217
%define release 230221
Summary: Pandora FMS Server
Name: %{name}

View File

@ -9,7 +9,7 @@
# **********************************************************************
PI_VERSION="7.0NG.769"
PI_BUILD="230217"
PI_BUILD="230221"
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 230217";
my $version = "7.0NG.769 Build 230221";
# Pandora server configuration
my %conf;
@ -53,6 +53,9 @@ my $SMALL_OPERATION_STEP = 1000; # 1000 is default
# Timeout for lock acquisition.
my $LOCK_TIMEOUT = 60;
# Cron cookies file.
my $COOKIES_FILE = '/tmp/cron-session-cookies';
# FLUSH in each IO
$| = 1;
@ -1075,9 +1078,8 @@ sub pandora_delete_old_session_data {
db_do ($dbh, "DELETE FROM tsessions_php WHERE data IS NULL OR id_session REGEXP '^cron-'");
# Delete cron cookies file
my $cookie_file = '/tmp/cron-session-cookies';
log_message ('PURGE', "Deleting cron session file");
unlink($cookie_file) or die log_message ('PURGE', "Could not delete session file");
unlink($COOKIES_FILE);
}

View File

@ -36,7 +36,7 @@ use Encode::Locale;
Encode::Locale::decode_argv;
# version: define current version
my $version = "7.0NG.769 Build 230217";
my $version = "7.0NG.769 Build 230221";
# save program name for logging
my $progname = basename($0);

View File

@ -571,7 +571,7 @@ foreach my $iface (keys %{$analysis_tree}) {
$inUsage += $analysis_tree->{$iface}{'inUsage'};
$j++;
}
if (is_enabled($analysis_tree->{$iface}{'outUsage'}) || $analysis_tree->{$iface}{'inUsage'} == 0) {
if (is_enabled($analysis_tree->{$iface}{'outUsage'}) || $analysis_tree->{$iface}{'outUsage'} == 0) {
$outUsage += $analysis_tree->{$iface}{'outUsage'};
$k++;
}