Merge remote-tracking branch 'origin/develop' into ent-2169-REDIRIS-modificacion-de-comandos-en-alertas

This commit is contained in:
fermin831 2018-11-12 13:10:53 +01:00
commit 3d04a742a3
27 changed files with 72 additions and 60 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix package: pandorafms-agent-unix
Version: 7.0NG.728-181108 Version: 7.0NG.728-181112
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.728-181108" pandora_version="7.0NG.728-181112"
echo "Test if you has the tools for to make the packages." echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null

View File

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

View File

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

View File

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

View File

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

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{181108} {181112}
ViewReadme ViewReadme
{Yes} {Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils; using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1 #define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.728(Build 181108)") #define PANDORA_VERSION ("7.0NG.728(Build 181112)")
string pandora_path; string pandora_path;
string pandora_dir; string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST" VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent" VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.728(Build 181108))" VALUE "ProductVersion", "(7.0NG.728(Build 181112))"
VALUE "FileVersion", "1.0.0.0" VALUE "FileVersion", "1.0.0.0"
END END
END END

View File

@ -1,5 +1,5 @@
package: pandorafms-console package: pandorafms-console
Version: 7.0NG.728-181108 Version: 7.0NG.728-181112
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.728-181108" pandora_version="7.0NG.728-181112"
package_pear=0 package_pear=0
package_pandora=1 package_pandora=1

View File

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

View File

@ -1314,7 +1314,7 @@ function agents_get_name ($id_agent, $case = "none") {
} }
/** /**
* Get alias of an agent. * Get alias of an agent (cached function).
* *
* @param int $id_agent Agent id. * @param int $id_agent Agent id.
* @param string $case Case (upper, lower, none) * @param string $case Case (upper, lower, none)
@ -1323,6 +1323,13 @@ function agents_get_name ($id_agent, $case = "none") {
*/ */
function agents_get_alias ($id_agent, $case = 'none') { function agents_get_alias ($id_agent, $case = 'none') {
global $config; global $config;
// Prepare cache
static $cache = array();
if (empty($case)) $case = 'none';
// Check cache
if (isset($cache[$case][$id_agent])) return $cache[$case][$id_agent];
if($config['dbconnection_cache'] == null && is_metaconsole()){ if($config['dbconnection_cache'] == null && is_metaconsole()){
$alias = (string) db_get_value ('alias', 'tmetaconsole_agent', 'id_tagente', (int) $id_agent); $alias = (string) db_get_value ('alias', 'tmetaconsole_agent', 'id_tagente', (int) $id_agent);
} else { } else {
@ -1331,13 +1338,15 @@ function agents_get_alias ($id_agent, $case = 'none') {
switch ($case) { switch ($case) {
case 'upper': case 'upper':
return mb_strtoupper($alias, 'UTF-8'); $alias = mb_strtoupper($alias, 'UTF-8');
break;
case 'lower': case 'lower':
return mb_strtolower($alias, 'UTF-8'); $alias = mb_strtolower($alias, 'UTF-8');
case 'none': break;
default:
return ($alias);
} }
$cache[$case][$id_agent] = $alias;
return $alias;
} }
function agents_get_alias_by_name ($name, $case = 'none') { function agents_get_alias_by_name ($name, $case = 'none') {

View File

@ -1015,7 +1015,7 @@ function graphic_combined_module (
$params['stacked'] = $params_combined['stacked']; $params['stacked'] = $params_combined['stacked'];
if(!isset($params_combined['projection'])){ if(!isset($params_combined['projection']) || $params_combined['projection'] == false){
$params_combined['projection'] = false; $params_combined['projection'] = false;
} }
else{ else{

View File

@ -6303,42 +6303,45 @@ function reporting_custom_graph($report, $content, $type = 'dinamic',
$graph = db_get_row ("tgraph", "id_graph", $content['id_gs']); $graph = db_get_row ("tgraph", "id_graph", $content['id_gs']);
$return = array(); $return = array();
$return['type'] = 'custom_graph'; $return['type'] = 'custom_graph';
if (empty($content['name'])) { if (empty($content['name'])) {
if ($type_report == "custom_graph") { if($type_report == "custom_graph"){
$content['name'] = __('Custom graph'); $content['name'] = __('Custom graph');
$graphs = db_get_all_rows_field_filter ("tgraph", "id_graph", $content['id_gs']); } else if($type_report == "automatic_graph"){
$id_graph = $content['id_gs'];
}
else if($type_report == "automatic_graph"){
$content['name'] = __('Automatic combined graph'); $content['name'] = __('Automatic combined graph');
$graphs[0]["stacked"] = ''; } else {
$graphs[0]["summatory_series"] = ''; $content['name'] ='';
$graphs[0]["average_series"] = ''; }
$graphs[0]["modules_series"] = ''; }
$graphs[0]["fullscale"] = $content['style']['fullscale'];
if(is_array($content['id_agent_module'])){ if ($type_report == "custom_graph") {
foreach ($content['id_agent_module'] as $key => $value) { $graphs = db_get_all_rows_field_filter ("tgraph", "id_graph", $content['id_gs']);
if($content['each_agent']){ $id_graph = $content['id_gs'];
$modules[] = $value; }
} else if($type_report == "automatic_graph"){
else{ $graphs[0]["stacked"] = '';
$modules[] = $value['module']; $graphs[0]["summatory_series"] = '';
} $graphs[0]["average_series"] = '';
$graphs[0]["modules_series"] = '';
$graphs[0]["fullscale"] = $content['style']['fullscale'];
if(is_array($content['id_agent_module'])){
foreach ($content['id_agent_module'] as $key => $value) {
if($content['each_agent']){
$modules[] = $value;
}
else{
$modules[] = $value['module'];
} }
} }
else{
$modules[] = $content['id_agent_module'];
}
$id_graph = 0;
} }
else { else{
$content['name'] = __('Simple graph'); $modules[] = $content['id_agent_module'];
}
} else {
if ($type_report == "custom_graph") {
$graphs = db_get_all_rows_field_filter ("tgraph", "id_graph", $content['id_gs']);
$id_graph = $content['id_gs'];
} }
$id_graph = 0;
}
else {
$content['name'] = __('Simple graph');
} }
$return['title'] = $content['name']; $return['title'] = $content['name'];

View File

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

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.728 %define version 7.0NG.728
%define release 181108 %define release 181112
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name httpd %define httpd_name httpd

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.728 %define version 7.0NG.728
%define release 181108 %define release 181112
%define httpd_name httpd %define httpd_name httpd
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name apache2 %define httpd_name apache2

View File

@ -1,5 +1,5 @@
package: pandorafms-server package: pandorafms-server
Version: 7.0NG.728-181108 Version: 7.0NG.728-181112
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.728-181108" pandora_version="7.0NG.728-181112"
package_cpan=0 package_cpan=0
package_pandora=1 package_pandora=1

View File

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

View File

@ -32,7 +32,7 @@ our @ISA = qw(Exporter);
# version: Defines actual version of Pandora Server for this module only # version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.728"; my $pandora_version = "7.0NG.728";
my $pandora_build = "181108"; my $pandora_build = "181112";
our $VERSION = $pandora_version." ".$pandora_build; our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] ); our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

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

View File

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

View File

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

View File

@ -34,7 +34,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB; use PandoraFMS::DB;
# version: define current version # version: define current version
my $version = "7.0NG.728 PS181108"; my $version = "7.0NG.728 PS181112";
# Pandora server configuration # Pandora server configuration
my %conf; my %conf;

View File

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