Merge remote-tracking branch 'origin/develop' into new-vc-line-element

This commit is contained in:
Daniel Barbero 2019-12-18 07:50:08 +01:00
commit 49ab5e95aa
32 changed files with 111 additions and 45 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix package: pandorafms-agent-unix
Version: 7.0NG.742-191217 Version: 7.0NG.742-191218
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.742-191217" pandora_version="7.0NG.742-191218"
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.742'; use constant AGENT_VERSION => '7.0NG.742';
use constant AGENT_BUILD => '191217'; use constant AGENT_BUILD => '191218';
# 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.742 %define version 7.0NG.742
%define release 191217 %define release 191218
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.742 %define version 7.0NG.742
%define release 191217 %define release 191218
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.742" PI_VERSION="7.0NG.742"
PI_BUILD="191217" PI_BUILD="191218"
OS_NAME=`uname -s` OS_NAME=`uname -s`
FORCE=0 FORCE=0

View File

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

View File

@ -1051,6 +1051,19 @@ $row++;
$table_report->data[$row][1] = html_print_input_text('graph_image_height', $config['graph_image_height'], '', 20, 20, true); $table_report->data[$row][1] = html_print_input_text('graph_image_height', $config['graph_image_height'], '', 20, 20, true);
$row++; $row++;
$interval_description = [
'large' => 'Long',
'tiny' => 'Short',
];
$table_report->data[$row][0] = __('Interval description');
$table_report->data[$row][0] .= ui_print_help_tip(
__('A long interval description is for example 10 hours, 20 minutes 33 seconds”, a short one is 10h 20m 33s'),
true
);
$table_report->data[$row][1] = html_print_select($interval_description, 'interval_description', $config['interval_description'], '', '', '', true, false, false);
$row++;
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
$dirItems = scandir($config['homedir'].'/images/custom_logo'); $dirItems = scandir($config['homedir'].'/images/custom_logo');
foreach ($dirItems as $entryDir) { foreach ($dirItems as $entryDir) {

View File

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

View File

@ -3868,8 +3868,8 @@ function generator_chart_to_pdf($type_graph_pdf, $params, $params_combined=false
} }
if ($type_graph_pdf === 'slicebar') { if ($type_graph_pdf === 'slicebar') {
$height_img = 90; $width_img = 360;
$params['height'] = 90; $height_img = 70;
} }
$params_encode_json = urlencode(json_encode($params)); $params_encode_json = urlencode(json_encode($params));

View File

@ -1289,6 +1289,10 @@ function config_update_config()
$error_update[] = __('Font size for items reports'); $error_update[] = __('Font size for items reports');
} }
if (!config_update_value('interval_description', (string) get_parameter('interval_description', 'large'))) {
$error_update[] = __('Interval description');
}
if (!config_update_value('custom_report_front', get_parameter('custom_report_front'))) { if (!config_update_value('custom_report_front', get_parameter('custom_report_front'))) {
$error_update[] = __('Custom report front'); $error_update[] = __('Custom report front');
} }
@ -2813,6 +2817,10 @@ function config_process_config()
config_update_value('font_size_item_report', 2); config_update_value('font_size_item_report', 2);
} }
if (!isset($config['interval_description'])) {
config_update_value('interval_description', 'large');
}
if (!isset($config['custom_report_front_font'])) { if (!isset($config['custom_report_front_font'])) {
config_update_value('custom_report_front_font', 'FreeSans.ttf'); config_update_value('custom_report_front_font', 'FreeSans.ttf');
} }

View File

@ -444,6 +444,8 @@ function reporting_html_SLA($table, $item, $mini, $pdf=0)
global $config; global $config;
$interval_description = $config['interval_description'];
if ($mini) { if ($mini) {
$font_size = '1.5'; $font_size = '1.5';
} else { } else {
@ -606,7 +608,9 @@ function reporting_html_SLA($table, $item, $mini, $pdf=0)
if ($sla['time_total'] != 0) { if ($sla['time_total'] != 0) {
$row2[] = human_time_description_raw( $row2[] = human_time_description_raw(
$sla['time_total'] $sla['time_total'],
false,
$interval_description
); );
} else { } else {
$row2[] = '--'; $row2[] = '--';
@ -615,7 +619,8 @@ function reporting_html_SLA($table, $item, $mini, $pdf=0)
if ($sla['time_error'] != 0) { if ($sla['time_error'] != 0) {
$row2[] = '<span style="color: '.COL_CRITICAL.';">'.human_time_description_raw( $row2[] = '<span style="color: '.COL_CRITICAL.';">'.human_time_description_raw(
$sla['time_error'], $sla['time_error'],
true true,
$interval_description
).'</span>'; ).'</span>';
} else { } else {
$row2[] = '--'; $row2[] = '--';
@ -624,7 +629,8 @@ function reporting_html_SLA($table, $item, $mini, $pdf=0)
if ($sla['time_ok'] != 0) { if ($sla['time_ok'] != 0) {
$row2[] = '<span style="color: '.COL_NORMAL.';">'.human_time_description_raw( $row2[] = '<span style="color: '.COL_NORMAL.';">'.human_time_description_raw(
$sla['time_ok'], $sla['time_ok'],
true true,
$interval_description
).'</span>'; ).'</span>';
} else { } else {
$row2[] = '--'; $row2[] = '--';
@ -633,7 +639,8 @@ function reporting_html_SLA($table, $item, $mini, $pdf=0)
if ($sla['time_unknown'] != 0) { if ($sla['time_unknown'] != 0) {
$row2[] = '<span style="color: '.COL_UNKNOWN.';">'.human_time_description_raw( $row2[] = '<span style="color: '.COL_UNKNOWN.';">'.human_time_description_raw(
$sla['time_unknown'], $sla['time_unknown'],
true true,
$interval_description
).'</span>'; ).'</span>';
} else { } else {
$row2[] = '--'; $row2[] = '--';
@ -642,7 +649,8 @@ function reporting_html_SLA($table, $item, $mini, $pdf=0)
if ($sla['time_not_init'] != 0) { if ($sla['time_not_init'] != 0) {
$row2[] = '<span style="color: '.COL_NOTINIT.';">'.human_time_description_raw( $row2[] = '<span style="color: '.COL_NOTINIT.';">'.human_time_description_raw(
$sla['time_not_init'], $sla['time_not_init'],
true true,
$interval_description
).'</span>'; ).'</span>';
} else { } else {
$row2[] = '--'; $row2[] = '--';
@ -651,7 +659,8 @@ function reporting_html_SLA($table, $item, $mini, $pdf=0)
if ($sla['time_downtime'] != 0) { if ($sla['time_downtime'] != 0) {
$row2[] = '<span style="color: '.COL_DOWNTIME.';">'.human_time_description_raw( $row2[] = '<span style="color: '.COL_DOWNTIME.';">'.human_time_description_raw(
$sla['time_downtime'], $sla['time_downtime'],
true true,
$interval_description
).'</span>'; ).'</span>';
} else { } else {
$row2[] = '--'; $row2[] = '--';
@ -716,11 +725,14 @@ function reporting_html_SLA($table, $item, $mini, $pdf=0)
$table->data['error']['cell'] = __('There are no Agent/Modules defined'); $table->data['error']['cell'] = __('There are no Agent/Modules defined');
} }
if (!empty($item['charts'])) { if (empty($item['charts']) === false) {
$table1 = new stdClass(); $table1 = new stdClass();
$table1->width = '99%'; $table1->width = '100%';
$table1->size = []; $table1->size = [];
$table1->size[0] = '10%'; $table1->size[0] = '10%';
if ($pdf !== 0) {
$table1->size[0] = '20%';
}
$table1->data = []; $table1->data = [];
@ -3009,6 +3021,8 @@ function reporting_html_availability($table, $item, $pdf=0)
global $config; global $config;
$interval_description = $config['interval_description'];
if (!empty($item['data'])) { if (!empty($item['data'])) {
$table1 = new stdClass(); $table1 = new stdClass();
$table1->width = '99%'; $table1->width = '99%';
@ -3144,7 +3158,8 @@ function reporting_html_availability($table, $item, $pdf=0)
if ($row['time_total'] != 0 && $item['fields']['total_time']) { if ($row['time_total'] != 0 && $item['fields']['total_time']) {
$table_row[] = human_time_description_raw( $table_row[] = human_time_description_raw(
$row['time_total'], $row['time_total'],
true true,
$interval_description
); );
} else if ($row['time_total'] == 0 && $item['fields']['total_time']) { } else if ($row['time_total'] == 0 && $item['fields']['total_time']) {
$table_row[] = '--'; $table_row[] = '--';
@ -3155,7 +3170,8 @@ function reporting_html_availability($table, $item, $pdf=0)
if ($row['time_error'] != 0 && $item['fields']['time_failed']) { if ($row['time_error'] != 0 && $item['fields']['time_failed']) {
$table_row[] = human_time_description_raw( $table_row[] = human_time_description_raw(
$row['time_error'], $row['time_error'],
true true,
$interval_description
); );
} else if ($row['time_error'] == 0 && $item['fields']['time_failed']) { } else if ($row['time_error'] == 0 && $item['fields']['time_failed']) {
$table_row[] = '--'; $table_row[] = '--';
@ -3166,7 +3182,8 @@ function reporting_html_availability($table, $item, $pdf=0)
if ($row['time_ok'] != 0 && $item['fields']['time_in_ok_status']) { if ($row['time_ok'] != 0 && $item['fields']['time_in_ok_status']) {
$table_row[] = human_time_description_raw( $table_row[] = human_time_description_raw(
$row['time_ok'], $row['time_ok'],
true true,
$interval_description
); );
} else if ($row['time_ok'] == 0 && $item['fields']['time_in_ok_status']) { } else if ($row['time_ok'] == 0 && $item['fields']['time_in_ok_status']) {
$table_row[] = '--'; $table_row[] = '--';
@ -3177,7 +3194,8 @@ function reporting_html_availability($table, $item, $pdf=0)
if ($row['time_unknown'] != 0 && $item['fields']['time_in_unknown_status']) { if ($row['time_unknown'] != 0 && $item['fields']['time_in_unknown_status']) {
$table_row[] = human_time_description_raw( $table_row[] = human_time_description_raw(
$row['time_unknown'], $row['time_unknown'],
true true,
$interval_description
); );
} else if ($row['time_unknown'] == 0 && $item['fields']['time_in_unknown_status']) { } else if ($row['time_unknown'] == 0 && $item['fields']['time_in_unknown_status']) {
$table_row[] = '--'; $table_row[] = '--';
@ -3188,7 +3206,8 @@ function reporting_html_availability($table, $item, $pdf=0)
if ($row['time_not_init'] != 0 && $item['fields']['time_of_not_initialized_module']) { if ($row['time_not_init'] != 0 && $item['fields']['time_of_not_initialized_module']) {
$table_row[] = human_time_description_raw( $table_row[] = human_time_description_raw(
$row['time_not_init'], $row['time_not_init'],
true true,
$interval_description
); );
} else if ($row['time_not_init'] == 0 && $item['fields']['time_of_not_initialized_module']) { } else if ($row['time_not_init'] == 0 && $item['fields']['time_of_not_initialized_module']) {
$table_row[] = '--'; $table_row[] = '--';
@ -3199,7 +3218,8 @@ function reporting_html_availability($table, $item, $pdf=0)
if ($row['time_downtime'] != 0 && $item['fields']['time_of_downtime']) { if ($row['time_downtime'] != 0 && $item['fields']['time_of_downtime']) {
$table_row[] = human_time_description_raw( $table_row[] = human_time_description_raw(
$row['time_downtime'], $row['time_downtime'],
true true,
$interval_description
); );
} else if ($row['time_downtime'] == 0 && $item['fields']['time_of_downtime']) { } else if ($row['time_downtime'] == 0 && $item['fields']['time_of_downtime']) {
$table_row[] = '--'; $table_row[] = '--';
@ -3407,13 +3427,20 @@ function reporting_html_availability_graph($table, $item, $pdf=0)
// Check failover availability report. // Check failover availability report.
if ($item['data'][$k_chart]['failover'] === '') { if ($item['data'][$k_chart]['failover'] === '') {
$table1 = new stdClass(); $table1 = new stdClass();
$table1->width = '99%'; $table1->width = '100%';
$table1->data = []; $table1->data = [];
$table1->size = []; $table1->size = [];
$table1->size[0] = '10%'; $table1->size[0] = '10%';
$table1->size[1] = '80%'; $table1->size[1] = '80%';
$table1->size[2] = '5%'; $table1->size[2] = '5%';
$table1->size[3] = '5%'; $table1->size[3] = '5%';
if ($pdf !== 0) {
$table1->size[0] = '20%';
$table1->size[1] = '60%';
$table1->size[2] = '10%';
$table1->size[3] = '10%';
}
$table1->data[0][0] = $chart['agent'].'<br />'.$chart['module']; $table1->data[0][0] = $chart['agent'].'<br />'.$chart['module'];
$table1->data[0][1] = $chart['chart']; $table1->data[0][1] = $chart['chart'];
$table1->data[0][2] = "<span style = 'font: bold 2em Arial, Sans-serif; color: ".$color."'>".$sla_value.'</span>'; $table1->data[0][2] = "<span style = 'font: bold 2em Arial, Sans-serif; color: ".$color."'>".$sla_value.'</span>';

View File

@ -22,8 +22,8 @@ function include_javascript_d3($return=false)
$is_include_javascript = true; $is_include_javascript = true;
if (is_metaconsole()) { if (is_metaconsole()) {
$output .= '<script type="text/javascript" src="'.'../../'.'include/javascript/d3.3.5.14.js" charset="utf-8"></script>'; $output .= '<script type="text/javascript" src="'.$config['homeurl'].'../../include/javascript/d3.3.5.14.js" charset="utf-8"></script>';
$output .= '<script type="text/javascript" src="'.'../../'.'include/graphs/pandora.d3.js" charset="utf-8"></script>'; $output .= '<script type="text/javascript" src="'.$config['homeurl'].'../../include/graphs/pandora.d3.js" charset="utf-8"></script>';
} else { } else {
$output .= '<script type="text/javascript" src="'.$config['homeurl'].'include/javascript/d3.3.5.14.js" charset="utf-8"></script>'; $output .= '<script type="text/javascript" src="'.$config['homeurl'].'include/javascript/d3.3.5.14.js" charset="utf-8"></script>';
$output .= '<script type="text/javascript" src="'.$config['homeurl'].'include/graphs/pandora.d3.js" charset="utf-8"></script>'; $output .= '<script type="text/javascript" src="'.$config['homeurl'].'include/graphs/pandora.d3.js" charset="utf-8"></script>';

View File

@ -196,6 +196,10 @@ h4 {
color: #3f3f3f; color: #3f3f3f;
text-transform: none; text-transform: none;
} }
table tbody tr td h4 {
color: #ffffff;
}
a { a {
color: #3f3f3f; color: #3f3f3f;
text-decoration: none; text-decoration: none;

View File

@ -35,6 +35,16 @@ table.header_table {
table.header_table thead tr th, table.header_table thead tr th,
table.header_table tbody tr td { table.header_table tbody tr td {
padding: 10px; padding: 10px;
background-color: #acacac;
}
table thead tr th {
background-color: #acacac;
}
table thead tr th.title_table_pdf {
background-color: #d6d6d6;
color: #1c1c1c;
} }
thead.header_tr tr { thead.header_tr tr {
@ -52,7 +62,7 @@ thead.header_tr tr th.th_first {
} }
thead.header_tr tr th.th_description { thead.header_tr tr th.th_description {
background-color: #f5f5f5; background-color: #fafafa;
color: #1c1c1c; color: #1c1c1c;
text-align: justify; text-align: justify;
} }
@ -81,6 +91,10 @@ table.table_agent_module tr td {
padding: 5px; padding: 5px;
} }
table.header_table tbody tr td {
background-color: #fafafa;
}
/* TABLE OF CONTENTS */ /* TABLE OF CONTENTS */
div.mpdf_toc { div.mpdf_toc {
font-family: sans-serif; font-family: sans-serif;

View File

@ -129,7 +129,7 @@
<div style='height: 10px'> <div style='height: 10px'>
<?php <?php
$version = '7.0NG.742'; $version = '7.0NG.742';
$build = '191217'; $build = '191218';
$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.742 %define version 7.0NG.742
%define release 191217 %define release 191218
# 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.742 %define version 7.0NG.742
%define release 191217 %define release 191218
# 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.742 %define version 7.0NG.742
%define release 191217 %define release 191218
%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.742-191217 Version: 7.0NG.742-191218
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.742-191217" pandora_version="7.0NG.742-191218"
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.742"; my $pandora_version = "7.0NG.742";
my $pandora_build = "191217"; my $pandora_build = "191218";
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.742"; my $pandora_version = "7.0NG.742";
my $pandora_build = "191217"; my $pandora_build = "191218";
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.742 %define version 7.0NG.742
%define release 191217 %define release 191218
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.742 %define version 7.0NG.742
%define release 191217 %define release 191218
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}

View File

@ -9,7 +9,7 @@
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.742" PI_VERSION="7.0NG.742"
PI_BUILD="191217" PI_BUILD="191218"
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.742 PS191217"; my $version = "7.0NG.742 PS191218";
# 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.742 PS191217"; my $version = "7.0NG.742 PS191218";
# save program name for logging # save program name for logging
my $progname = basename($0); my $progname = basename($0);