Merge remote-tracking branch 'origin/develop' into ent-4876-pandora_ui.js

This commit is contained in:
marcos 2019-11-28 10:02:43 +01:00
commit 99eb67c251
31 changed files with 60 additions and 35 deletions

View File

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

@ -55,7 +55,7 @@ my $Sem = undef;
my $ThreadSem = undef; my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.741'; use constant AGENT_VERSION => '7.0NG.741';
use constant AGENT_BUILD => '191127'; use constant AGENT_BUILD => '191128';
# 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.741 %define version 7.0NG.741
%define release 191127 %define release 191128
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.741 %define version 7.0NG.741
%define release 191127 %define release 191128
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.741" PI_VERSION="7.0NG.741"
PI_BUILD="191127" PI_BUILD="191128"
OS_NAME=`uname -s` OS_NAME=`uname -s`
FORCE=0 FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{191127} {191128}
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.741(Build 191127)") #define PANDORA_VERSION ("7.0NG.741(Build 191128)")
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.741(Build 191127))" VALUE "ProductVersion", "(7.0NG.741(Build 191128))"
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.741-191127 Version: 7.0NG.741-191128
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.741-191127" pandora_version="7.0NG.741-191128"
package_pear=0 package_pear=0
package_pandora=1 package_pandora=1

View File

@ -1,5 +1,6 @@
START TRANSACTION; START TRANSACTION;
ALTER TABLE `treport_template` ADD COLUMN `agent_regex` varchar(600) NOT NULL default '';
ALTER TABLE `tlayout_template_data` ADD COLUMN `cache_expiration` INTEGER UNSIGNED NOT NULL DEFAULT 0; ALTER TABLE `tlayout_template_data` ADD COLUMN `cache_expiration` INTEGER UNSIGNED NOT NULL DEFAULT 0;
INSERT INTO `ttipo_modulo` VALUES INSERT INTO `ttipo_modulo` VALUES

View File

@ -764,6 +764,8 @@ CREATE TABLE IF NOT EXISTS `treport_template` (
`footer` MEDIUMTEXT default NULL, `footer` MEDIUMTEXT default NULL,
`custom_font` varchar(200) default NULL, `custom_font` varchar(200) default NULL,
`metaconsole` tinyint(1) DEFAULT 0, `metaconsole` tinyint(1) DEFAULT 0,
`agent_regex` varchar(600) NOT NULL default '',
PRIMARY KEY(`id_report`) PRIMARY KEY(`id_report`)
) ENGINE = InnoDB DEFAULT CHARSET=utf8; ) ENGINE = InnoDB DEFAULT CHARSET=utf8;

View File

@ -2092,9 +2092,9 @@ class Diagnostics extends Wizard
* *
* @param string|null $filename Filename. * @param string|null $filename Filename.
* *
* @return void * @return mixed
*/ */
public function exportPDF(?string $filename=null):void public function exportPDF(?string $filename=null)
{ {
global $config; global $config;
@ -2141,7 +2141,7 @@ class Diagnostics extends Wizard
// Write html filename. // Write html filename.
$mpdf->writePDFfile($filename); $mpdf->writePDFfile($filename);
exit; return;
} }

View File

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

View File

@ -3509,6 +3509,27 @@ function agents_get_status_animation($up=true)
} }
function agents_get_agent_id_by_alias_regex($alias_regex, $flag='i', $limit=0)
{
$agents_id = [];
$all_agents = agents_get_agents(false, ['id_agente', 'alias']);
$agent_match = '/'.$alias_regex.'/'.$flag;
foreach ($all_agents as $agent) {
$result_agent_match = preg_match($agent_match, $agent['alias']);
if ($result_agent_match) {
$agents_id[] = $agent['id_agente'];
$i++;
if ($i === $limit) {
break;
}
}
}
return $agents_id;
}
/** /**
* Return if an agent is SAP or or an a agent SAP list. * Return if an agent is SAP or or an a agent SAP list.
* If function receive false, you will return all SAP agents, * If function receive false, you will return all SAP agents,
@ -3525,18 +3546,18 @@ function agents_get_sap_agents($id_agent)
$sap_modules = [ $sap_modules = [
160 => __('SAP Login OK'), 160 => __('SAP Login OK'),
109 => __('SAP Dumps'), 109 => __('SAP Dumps'),
111 => __('SAP List lock'), 111 => __('SAP lock entry list'),
113 => __('SAP Cancel Jobs'), 113 => __('SAP canceled Jobs'),
121 => __('SAP Batch input erroneus'), 121 => __('SAP Batch inputs erroneous'),
104 => __('SAP Idoc erroneus'), 104 => __('SAP IDOC erroneous'),
105 => __('SAP IDOC OK'), 105 => __('SAP IDOC OK'),
150 => __('SAP WP without active restart'), 150 => __('SAP WP without active restart'),
151 => __('SAP WP stopped'), 151 => __('SAP WP stopped'),
102 => __('Average time of SAPGUI response '), 102 => __('Average time of SAPGUI response '),
180 => __('Dialog response time'), 180 => __('Dialog response time'),
103 => __('Dialog Logged users '), 103 => __('Dialog Logged users '),
192 => __('SYSFAIL, delivery attempts tRFC wrong entries number'), 192 => __('TRFC in error'),
195 => __('SYSFAIL, queue qRFC INPUT, wrong entries number '), 195 => __('QRFC in error SMQ2'),
116 => __('Number of Update WPs in error'), 116 => __('Number of Update WPs in error'),
]; ];

View File

@ -456,7 +456,7 @@ function config_update_config()
} }
if (!config_update_value('sap_license', get_parameter('sap_license'))) { if (!config_update_value('sap_license', get_parameter('sap_license'))) {
$error_update[] = __('Deset SAP license'); $error_update[] = __('SAP/R3 Plugin Licence');
} }
$inventory_changes_blacklist = get_parameter('inventory_changes_blacklist', []); $inventory_changes_blacklist = get_parameter('inventory_changes_blacklist', []);

View File

@ -129,7 +129,7 @@
<div style='height: 10px'> <div style='height: 10px'>
<?php <?php
$version = '7.0NG.741'; $version = '7.0NG.741';
$build = '191127'; $build = '191128';
$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.741 %define version 7.0NG.741
%define release 191127 %define release 191128
# 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.741 %define version 7.0NG.741
%define release 191127 %define release 191128
# 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.741 %define version 7.0NG.741
%define release 191127 %define release 191128
%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

@ -2952,6 +2952,7 @@ CREATE TABLE IF NOT EXISTS `treport_template` (
`footer` MEDIUMTEXT default NULL, `footer` MEDIUMTEXT default NULL,
`custom_font` varchar(200) default NULL, `custom_font` varchar(200) default NULL,
`metaconsole` tinyint(1) DEFAULT 0, `metaconsole` tinyint(1) DEFAULT 0,
`agent_regex` varchar(600) BINARY NOT NULL default '',
PRIMARY KEY(`id_report`) PRIMARY KEY(`id_report`)
) ENGINE = InnoDB DEFAULT CHARSET=utf8; ) ENGINE = InnoDB DEFAULT CHARSET=utf8;

View File

@ -1,5 +1,5 @@
package: pandorafms-server package: pandorafms-server
Version: 7.0NG.741-191127 Version: 7.0NG.741-191128
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.741-191127" pandora_version="7.0NG.741-191128"
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.741"; my $pandora_version = "7.0NG.741";
my $pandora_build = "191127"; my $pandora_build = "191128";
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.741"; my $pandora_version = "7.0NG.741";
my $pandora_build = "191127"; my $pandora_build = "191128";
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.741 %define version 7.0NG.741
%define release 191127 %define release 191128
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.741 %define version 7.0NG.741
%define release 191127 %define release 191128
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}

View File

@ -9,7 +9,7 @@
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.741" PI_VERSION="7.0NG.741"
PI_BUILD="191127" PI_BUILD="191128"
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.741 PS191127"; my $version = "7.0NG.741 PS191128";
# 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.741 PS191127"; my $version = "7.0NG.741 PS191128";
# save program name for logging # save program name for logging
my $progname = basename($0); my $progname = basename($0);