Merge remote-tracking branch 'origin/develop' into 2784-Pantalla_por_dispositivos_filtrado_por_custom_fields

This commit is contained in:
daniel 2018-11-13 15:47:07 +01:00
commit ac671d041c
32 changed files with 44 additions and 55 deletions

View File

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

@ -42,7 +42,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.728';
use constant AGENT_BUILD => '181112';
use constant AGENT_BUILD => '181113';
# 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.728
%define release 181112
%define release 181113
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

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

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.728"
PI_BUILD="181112"
PI_BUILD="181113"
OS_NAME=`uname -s`
FORCE=0

View File

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

View File

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

View File

@ -1943,7 +1943,7 @@ switch ($tab) {
var aget_id_os = '<?php echo agents_get_os(modules_get_agentmodule_agent(get_parameter("id_agent_module"))); ?>';
if('<?php echo modules_get_agentmodule_name(get_parameter("id_agent_module")); ?>' != $('#text-name').val() &&
if('<?php echo html_entity_decode(modules_get_agentmodule_name(get_parameter("id_agent_module"))); ?>' != $('#text-name').val() &&
'<?php echo agents_get_os(modules_get_agentmodule_agent(get_parameter("id_agent_module"))); ?>' == 19){
event.preventDefault();
@ -1977,7 +1977,7 @@ switch ($tab) {
var module_type_snmp = '<?php echo modules_get_agentmodule_type(get_parameter("id_agent_module")); ?>';
if('<?php echo modules_get_agentmodule_name(get_parameter("id_agent_module")); ?>' != $('#text-name').val() && (
if('<?php echo html_entity_decode(modules_get_agentmodule_name(get_parameter("id_agent_module"))); ?>' != $('#text-name').val() && (
module_type_snmp == 15 || module_type_snmp == 16 || module_type_snmp == 17 || module_type_snmp == 18)){
event.preventDefault();

View File

@ -735,7 +735,6 @@ $(document).ready (function () {
}
else {
$('#user_configuration_table-metaconsole_agents_manager').hide();
$('#user_configuration_table-metaconsole_assigned_server').show();
$('#user_configuration_table-metaconsole_access_node').hide();
}
});

View File

@ -22,7 +22,7 @@
/**
* Pandora build version and version
*/
$build_version = 'PC181112';
$build_version = 'PC181113';
$pandora_version = 'v7.0NG.728';
// Do not overwrite default timezone set if defined.

View File

@ -495,17 +495,13 @@ function filemanager_file_explorer($real_directory, $relative_directory,
if ($homedir_filemanager === false) {
$homedir_filemanager = $config['homedir'];
unset($config['homedir_filemanager']);
config_update_value('homedir_filemanager',
$homedir_filemanager);
}
else {
$config['homedir_filemanager'] = $homedir_filemanager;
}
unset($config['homedir_filemanager']);
config_update_value(
'homedir_filemanager',
$homedir_filemanager
);
$hack_metaconsole = '';
if (defined('METACONSOLE'))
$hack_metaconsole = '../../';
@ -743,11 +739,11 @@ function filemanager_file_explorer($real_directory, $relative_directory,
//Actions buttons
//Delete button
$data[4] = '';
$data[4] .= '<span style="">';
$data[4] .= '<span style="display: flex">';
$typefile = array_pop(explode(".",$fileinfo['name']));
if (is_writable ($fileinfo['realpath']) &&
(! is_dir ($fileinfo['realpath']) || count (scandir ($fileinfo['realpath'])) < 3)) {
$data[4] .= '<form method="post" action="' . $url . '" style="display: inline;">';
$data[4] .= '<form method="post" action="' . $url . '" style="">';
$data[4] .= '<input type="image" src="images/cross.png" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
$data[4] .= html_print_input_hidden ('filename', $fileinfo['realpath'], true);
$data[4] .= html_print_input_hidden('hash', md5($fileinfo['realpath'] . $config['dbpass']), true);

View File

@ -4387,7 +4387,7 @@ function graph_monitor_wheel ($width = 550, $height = 600, $filter = false) {
$data_agents[$agent_id]['children'][$module_group_id]['children'][] = $data_module;
unset($modules[$module_id]);
}
function order_module_group_keys ($value, $key) {
function order_module_group_keys ($value) {
$value['children'] = array_merge($value['children']);
return $value;
}

View File

@ -1701,7 +1701,7 @@ function groups_get_tree_good (&$groups, $parent = false, &$childs) {
if ($parent === false && (!isset($group['parent']) || $group['parent'] == 0 || !in_array($group['parent'], $groups))) {
$return[$id] = $group;
//unset($groups[$id]);
$children = groups_get_tree_good($groups, $id);
$children = groups_get_tree_good($groups, $id, $noUse);
if (!empty($children)) {
$return[$id]['children'] = $children;
@ -1713,7 +1713,7 @@ function groups_get_tree_good (&$groups, $parent = false, &$childs) {
else if ($parent && isset($group['parent']) && $group['parent'] == $parent) {
$return[$id] = $group;
//unset($groups[$id]);
$children = groups_get_tree_good($groups, $id);
$children = groups_get_tree_good($groups, $id, $noUse);
if (!empty($children)) {
$return[$id]['children'] = $children;

View File

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

View File

@ -18,10 +18,11 @@
global $config;
check_login ();
if (_id_ != "_id_") {
if (defined('_id_') && _id_ != "_id_") {
$id = _id_;
}
else {
define("_id_", "_id_");
$id = get_parameter('id_networkmap', true);
}
@ -36,8 +37,7 @@ if (enterprise_installed()) {
$activeTab = $tab;
}
}
if (_activeTab_ != "_activeTab_") {
if (defined("_activeTab_") && _activeTab_ != "_activeTab_") {
$activeTab = _activeTab_;
$tab = $activeTab;
}

View File

@ -445,6 +445,7 @@ switch ($tab) {
if (enterprise_installed()) {
$old_networkmaps_enterprise = db_get_all_rows_sql("SELECT * FROM tnetworkmap_enterprise");
if ($old_networkmaps_enterprise === false) $old_networkmaps_enterprise = array();
}
$old_networkmaps_open = db_get_all_rows_sql("SELECT * FROM tnetwork_map");

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.728
%define release 181112
%define release 181113
# 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.728
%define release 181112
%define release 181113
%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.728-181112
Version: 7.0NG.728-181113
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.728-181112"
pandora_version="7.0NG.728-181113"
package_cpan=0
package_pandora=1

View File

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

View File

@ -52,7 +52,6 @@ my %Agents :shared;
my $Sem :shared;
my $TaskSem :shared;
my $AgentSem :shared;
my $ModuleSem :shared;
########################################################################################
# Data Server class constructor.
@ -69,7 +68,6 @@ sub new ($$;$) {
$Sem = Thread::Semaphore->new;
$TaskSem = Thread::Semaphore->new (0);
$AgentSem = Thread::Semaphore->new (1);
$ModuleSem = Thread::Semaphore->new (1);
# Call the constructor of the parent class
my $self = $class->SUPER::new($config, DATASERVER, \&PandoraFMS::DataServer::data_producer, \&PandoraFMS::DataServer::data_consumer, $dbh);
@ -677,7 +675,6 @@ sub process_module_data ($$$$$$$$$$) {
$module_conf->{'module_macros'} = '' unless defined ($module_conf->{'module_macros'});
# Get module data or create it if it does not exist
$ModuleSem->down ();
my $module = get_db_single_row ($dbh, 'SELECT * FROM tagente_modulo WHERE id_agente = ? AND ' . db_text ('nombre') . ' = ?', $agent->{'id_agente'}, safe_input($module_name));
if (! defined ($module)) {
@ -685,14 +682,12 @@ sub process_module_data ($$$$$$$$$$) {
# Do not auto create modules
#if ($pa_config->{'autocreate'} ne '1') {
# logger($pa_config, "Module '$module_name' not found for agent '$agent_name' and module auto-creation disabled.", 10);
# $ModuleSem->up ();
# return;
#}
# Is the agent not learning?
if (($agent->{'modo'} == 0) && !($force_processing)) {
logger($pa_config, "Learning mode disabled. Skipping module '$module_name' agent '$agent_name'.", 10);
$ModuleSem->up ();
return;
}
@ -700,7 +695,6 @@ sub process_module_data ($$$$$$$$$$) {
$module_conf->{'id_tipo_modulo'} = get_module_id ($dbh, $module_type);
if ($module_conf->{'id_tipo_modulo'} <= 0) {
logger($pa_config, "Invalid module type '$module_type' for module '$module_name' agent '$agent_name'.", 3);
$ModuleSem->up ();
return;
}
@ -758,7 +752,6 @@ sub process_module_data ($$$$$$$$$$) {
$module = get_db_single_row ($dbh, 'SELECT * FROM tagente_modulo WHERE id_agente = ? AND ' . db_text('nombre') . ' = ?', $agent->{'id_agente'}, safe_input($module_name));
if (! defined ($module)) {
logger($pa_config, "Could not create module '$module_name' for agent '$agent_name'.", 3);
$ModuleSem->up ();
return;
}
@ -816,8 +809,6 @@ sub process_module_data ($$$$$$$$$$) {
update_module_configuration ($pa_config, $dbh, $module, $module_conf);
}
$ModuleSem->up ();
# Module disabled!
if ($module->{'disabled'} eq '1') {
logger($pa_config, "Skipping disabled module '$module_name' agent '$agent_name'.", 10);

View File

@ -32,7 +32,7 @@ our @ISA = qw(Exporter);
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.728";
my $pandora_build = "181112";
my $pandora_build = "181113";
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.728
%define release 181112
%define release 181113
Summary: Pandora FMS Server
Name: %{name}

View File

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

View File

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

View File

@ -34,7 +34,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB;
# version: define current version
my $version = "7.0NG.728 PS181112";
my $version = "7.0NG.728 PS181113";
# Pandora server configuration
my %conf;
@ -297,7 +297,9 @@ sub pandora_purgedb ($$) {
my $buffer = 1000;
my $id_module = $module->{'id_agente_modulo'};
db_do ($dbh, 'UPDATE tagente_modulo SET parent_module_id=0 WHERE parent_module_id=?', $id_module);
log_message ('', ".");
while(1) {

View File

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