Merge remote-tracking branch 'origin/develop' into ent-8075-Informe-de-acciones-de-alerta

This commit is contained in:
Daniel Barbero Martin 2021-11-29 08:05:45 +01:00
commit 75354a97d9
32 changed files with 59 additions and 67 deletions

View File

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

View File

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

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.758.1"
PI_BUILD="211126"
PI_BUILD="211129"
OS_NAME=`uname -s`
FORCE=0

View File

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

View File

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

View File

@ -131,7 +131,7 @@ if (!empty($files)) {
$config_url = ui_get_full_url(
'index.php?sec=godmode/extensions&sec2=extensions/files_repo&file_id='.$file_id
);
$data[4] .= '<a href=\"$config_url\">';
$data[4] .= "<a href=\"$config_url\">";
$data[4] .= html_print_image(
'images/config.png',
true,

View File

@ -1078,8 +1078,11 @@ if ($update_agent) {
// If IP is set for deletion, delete first.
if ($action_delete_ip) {
$delete_ip = get_parameter_post('address_list');
$direccion_agente = agents_delete_address($id_agente, $delete_ip);
if (empty($direccion_agente) === true) {
$direccideon_agente = agents_delete_address($id_agente, $delete_ip);
} else {
agents_delete_address($id_agente, $delete_ip);
}
}
$values = [

View File

@ -144,7 +144,7 @@ if ($prediction_available) {
$modules['predictionserver'] = __('Create a new prediction server module');
}
if ($web_available) {
if (is_metaconsole() === true || $web_available === '1') {
$modules['webserver'] = __('Create a new web Server module');
}

View File

@ -62,7 +62,9 @@ html_print_div(
]
);
require_once $config['homedir'].'/include/ajax/web_server_module_debug.php';
if (is_int($id_agent_module) && $id_agent_module !== 0) {
include_once $config['homedir'].'/include/ajax/web_server_module_debug.php';
}
define('ID_NETWORK_COMPONENT_TYPE', 7);

View File

@ -34,6 +34,7 @@ require_once $config['homedir'].'/include/functions_modules.php';
require_once $config['homedir'].'/include/functions_users.php';
$pure = get_parameter('pure', 0);
$agent_id = get_parameter('agent_id', 0);
if (defined('METACONSOLE')) {
$sec = 'advanced';
@ -74,6 +75,11 @@ $params['input_name'] = 'agent_name';
$params['value'] = $agentName;
$params['size'] = 24;
$params['metaconsole_enabled'] = false;
$params['use_hidden_input_idagent'] = true;
$params['print_hidden_input_idagent'] = true;
$params['hidden_input_idagent_id'] = 'hidden-autocomplete_id_agent';
$params['hidden_input_idagent_name'] = 'agent_id';
$params['hidden_input_idagent_value'] = $agent_id;
$form_filter .= ui_print_agent_autocomplete_input($params);
@ -234,7 +240,7 @@ if ($searchFlag) {
$id_agents = array_keys($agents);
$total = agents_get_alerts_simple(
$id_agents,
(empty($agent_id) === false) ? ['0' => $agent_id] : $id_agents,
false,
false,
$where,
@ -412,7 +418,7 @@ if ($id_agente) {
$offset = (int) get_parameter('offset');
$simple_alerts = agents_get_alerts_simple(
$id_agents,
(empty($agent_id) === false) ? ['0' => $agent_id] : $id_agents,
false,
[
'offset' => $offset,

View File

@ -290,7 +290,7 @@ if (is_array($config) === true
$config['history_db_host'],
$config['history_db_name'],
$config['history_db_user'],
$config['history_db_pass'],
io_output_password($config['history_db_pass']),
$config['history_db_port']
);
ob_get_clean();

View File

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

View File

@ -421,12 +421,13 @@ function agents_get_alerts_simple($id_agent=false, $filter='', $options=false, $
INNER JOIN tagente_modulo t2
ON talert_template_modules.id_agent_module = t2.id_agente_modulo
INNER JOIN tagente t3
ON t2.id_agente = t3.id_agente
ON t2.id_agente = t3.id_agente %s
%s
INNER JOIN talert_templates t4
ON talert_template_modules.id_alert_template = t4.id
WHERE id_agent_module in (%s) %s %s %s',
$selectText,
($id_agent !== false && is_array($id_agent)) ? 'AND t3.id_agente IN ('.implode(',', $id_agent).')' : '',
$secondary_join,
$subQuery,
$where,
@ -434,40 +435,14 @@ function agents_get_alerts_simple($id_agent=false, $filter='', $options=false, $
$orderbyText
);
switch ($config['dbtype']) {
case 'mysql':
$limit_sql = '';
if (isset($offset) && isset($limit)) {
$limit_sql = " LIMIT $offset, $limit ";
}
$sql = sprintf('%s %s', $sql, $limit_sql);
$alerts = db_get_all_rows_sql($sql);
break;
case 'postgresql':
$limit_sql = '';
if (isset($offset) && isset($limit)) {
$limit_sql = " OFFSET $offset LIMIT $limit ";
}
$sql = sprintf('%s %s', $sql, $limit_sql);
$alerts = db_get_all_rows_sql($sql);
break;
case 'oracle':
$set = [];
if (isset($offset) && isset($limit)) {
$set['limit'] = $limit;
$set['offset'] = $offset;
}
$alerts = oracle_recode_query($sql, $set, 'AND', false);
break;
$limit_sql = '';
if (isset($offset) && isset($limit)) {
$limit_sql = " LIMIT $offset, $limit ";
}
$sql = sprintf('%s %s', $sql, $limit_sql);
$alerts = db_get_all_rows_sql($sql);
if ($alerts === false) {
return [];
}

View File

@ -129,7 +129,7 @@
<div style='height: 10px'>
<?php
$version = '7.0NG.758.1';
$build = '211126';
$build = '211129';
$banner = "v$version Build $build";
error_reporting(0);
@ -993,8 +993,14 @@ function install_step4()
$step5 = mysqli_query(
$connection,
"CREATE USER pandora@$host IDENTIFIED BY '".$random_password."'"
"CREATE USER IF NOT EXISTS pandora@$host"
);
mysqli_query(
$connection,
"SET PASSWORD FOR 'pandora'@'".$host."' = '".$random_password."'"
);
$step5 |= mysqli_query(
$connection,
"GRANT ALL PRIVILEGES ON `$dbname`.* to pandora@$host"

View File

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

View File

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

View File

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