diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index d0a9b4fc46..9191546c7b 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-agent-unix
-Version: 7.0NG.742-191217
+Version: 7.0NG.742-191218
Architecture: all
Priority: optional
Section: admin
diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh
index bbd81c6f51..d3b0ff6755 100644
--- a/pandora_agents/unix/DEBIAN/make_deb_package.sh
+++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# 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."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent
index 59ab0b9530..f082cafd63 100755
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -55,7 +55,7 @@ my $Sem = undef;
my $ThreadSem = undef;
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
use constant DEFAULT_MAX_LOG_SIZE => 600000;
diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec
index 10e99ce4dc..428547be10 100644
--- a/pandora_agents/unix/pandora_agent.redhat.spec
+++ b/pandora_agents/unix/pandora_agent.redhat.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 7.0NG.742
-%define release 191217
+%define release 191218
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}
diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec
index 4bf932d9cd..9527d7c17f 100644
--- a/pandora_agents/unix/pandora_agent.spec
+++ b/pandora_agents/unix/pandora_agent.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 7.0NG.742
-%define release 191217
+%define release 191218
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}
diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer
index 7c1a0f802b..60367e69b7 100755
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.742"
-PI_BUILD="191217"
+PI_BUILD="191218"
OS_NAME=`uname -s`
FORCE=0
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index 774fa3d46e..cf7405327e 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
-{191217}
+{191218}
ViewReadme
{Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index e4b720807c..0ee6f3a858 100644
--- a/pandora_agents/win32/pandora.cc
+++ b/pandora_agents/win32/pandora.cc
@@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#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_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index 32e28abb66..335d4f6209 100644
--- a/pandora_agents/win32/versioninfo.rc
+++ b/pandora_agents/win32/versioninfo.rc
@@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe"
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"
END
END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index 0c893684f3..9c08c23793 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-console
-Version: 7.0NG.742-191217
+Version: 7.0NG.742-191218
Architecture: all
Priority: optional
Section: admin
diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh
index 57885c0b67..5cb910fb8d 100644
--- a/pandora_console/DEBIAN/make_deb_package.sh
+++ b/pandora_console/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-pandora_version="7.0NG.742-191217"
+pandora_version="7.0NG.742-191218"
package_pear=0
package_pandora=1
diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php
index 9fce3076d8..9c3c857b0a 100755
--- a/pandora_console/godmode/setup/setup_visuals.php
+++ b/pandora_console/godmode/setup/setup_visuals.php
@@ -1051,6 +1051,19 @@ $row++;
$table_report->data[$row][1] = html_print_input_text('graph_image_height', $config['graph_image_height'], '', 20, 20, true);
$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');
foreach ($dirItems as $entryDir) {
diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php
index b1359e74d8..6656a517d3 100644
--- a/pandora_console/include/config_process.php
+++ b/pandora_console/include/config_process.php
@@ -20,7 +20,7 @@
/**
* Pandora build version and version
*/
-$build_version = 'PC191217';
+$build_version = 'PC191218';
$pandora_version = 'v7.0NG.742';
// Do not overwrite default timezone set if defined.
diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php
index f2e350dc8f..08a41a00f2 100644
--- a/pandora_console/include/functions.php
+++ b/pandora_console/include/functions.php
@@ -3868,8 +3868,8 @@ function generator_chart_to_pdf($type_graph_pdf, $params, $params_combined=false
}
if ($type_graph_pdf === 'slicebar') {
- $height_img = 90;
- $params['height'] = 90;
+ $width_img = 360;
+ $height_img = 70;
}
$params_encode_json = urlencode(json_encode($params));
diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php
index 0e4dd9940d..92491fb02b 100644
--- a/pandora_console/include/functions_config.php
+++ b/pandora_console/include/functions_config.php
@@ -1289,6 +1289,10 @@ function config_update_config()
$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'))) {
$error_update[] = __('Custom report front');
}
@@ -2813,6 +2817,10 @@ function config_process_config()
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'])) {
config_update_value('custom_report_front_font', 'FreeSans.ttf');
}
diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php
index 933c0e8134..cd93334327 100644
--- a/pandora_console/include/functions_reporting_html.php
+++ b/pandora_console/include/functions_reporting_html.php
@@ -444,6 +444,8 @@ function reporting_html_SLA($table, $item, $mini, $pdf=0)
global $config;
+ $interval_description = $config['interval_description'];
+
if ($mini) {
$font_size = '1.5';
} else {
@@ -606,7 +608,9 @@ function reporting_html_SLA($table, $item, $mini, $pdf=0)
if ($sla['time_total'] != 0) {
$row2[] = human_time_description_raw(
- $sla['time_total']
+ $sla['time_total'],
+ false,
+ $interval_description
);
} else {
$row2[] = '--';
@@ -615,7 +619,8 @@ function reporting_html_SLA($table, $item, $mini, $pdf=0)
if ($sla['time_error'] != 0) {
$row2[] = ''.human_time_description_raw(
$sla['time_error'],
- true
+ true,
+ $interval_description
).'';
} else {
$row2[] = '--';
@@ -624,7 +629,8 @@ function reporting_html_SLA($table, $item, $mini, $pdf=0)
if ($sla['time_ok'] != 0) {
$row2[] = ''.human_time_description_raw(
$sla['time_ok'],
- true
+ true,
+ $interval_description
).'';
} else {
$row2[] = '--';
@@ -633,7 +639,8 @@ function reporting_html_SLA($table, $item, $mini, $pdf=0)
if ($sla['time_unknown'] != 0) {
$row2[] = ''.human_time_description_raw(
$sla['time_unknown'],
- true
+ true,
+ $interval_description
).'';
} else {
$row2[] = '--';
@@ -642,7 +649,8 @@ function reporting_html_SLA($table, $item, $mini, $pdf=0)
if ($sla['time_not_init'] != 0) {
$row2[] = ''.human_time_description_raw(
$sla['time_not_init'],
- true
+ true,
+ $interval_description
).'';
} else {
$row2[] = '--';
@@ -651,7 +659,8 @@ function reporting_html_SLA($table, $item, $mini, $pdf=0)
if ($sla['time_downtime'] != 0) {
$row2[] = ''.human_time_description_raw(
$sla['time_downtime'],
- true
+ true,
+ $interval_description
).'';
} else {
$row2[] = '--';
@@ -716,11 +725,14 @@ function reporting_html_SLA($table, $item, $mini, $pdf=0)
$table->data['error']['cell'] = __('There are no Agent/Modules defined');
}
- if (!empty($item['charts'])) {
+ if (empty($item['charts']) === false) {
$table1 = new stdClass();
- $table1->width = '99%';
+ $table1->width = '100%';
$table1->size = [];
$table1->size[0] = '10%';
+ if ($pdf !== 0) {
+ $table1->size[0] = '20%';
+ }
$table1->data = [];
@@ -3009,6 +3021,8 @@ function reporting_html_availability($table, $item, $pdf=0)
global $config;
+ $interval_description = $config['interval_description'];
+
if (!empty($item['data'])) {
$table1 = new stdClass();
$table1->width = '99%';
@@ -3144,7 +3158,8 @@ function reporting_html_availability($table, $item, $pdf=0)
if ($row['time_total'] != 0 && $item['fields']['total_time']) {
$table_row[] = human_time_description_raw(
$row['time_total'],
- true
+ true,
+ $interval_description
);
} else if ($row['time_total'] == 0 && $item['fields']['total_time']) {
$table_row[] = '--';
@@ -3155,7 +3170,8 @@ function reporting_html_availability($table, $item, $pdf=0)
if ($row['time_error'] != 0 && $item['fields']['time_failed']) {
$table_row[] = human_time_description_raw(
$row['time_error'],
- true
+ true,
+ $interval_description
);
} else if ($row['time_error'] == 0 && $item['fields']['time_failed']) {
$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']) {
$table_row[] = human_time_description_raw(
$row['time_ok'],
- true
+ true,
+ $interval_description
);
} else if ($row['time_ok'] == 0 && $item['fields']['time_in_ok_status']) {
$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']) {
$table_row[] = human_time_description_raw(
$row['time_unknown'],
- true
+ true,
+ $interval_description
);
} else if ($row['time_unknown'] == 0 && $item['fields']['time_in_unknown_status']) {
$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']) {
$table_row[] = human_time_description_raw(
$row['time_not_init'],
- true
+ true,
+ $interval_description
);
} else if ($row['time_not_init'] == 0 && $item['fields']['time_of_not_initialized_module']) {
$table_row[] = '--';
@@ -3199,7 +3218,8 @@ function reporting_html_availability($table, $item, $pdf=0)
if ($row['time_downtime'] != 0 && $item['fields']['time_of_downtime']) {
$table_row[] = human_time_description_raw(
$row['time_downtime'],
- true
+ true,
+ $interval_description
);
} else if ($row['time_downtime'] == 0 && $item['fields']['time_of_downtime']) {
$table_row[] = '--';
@@ -3407,13 +3427,20 @@ function reporting_html_availability_graph($table, $item, $pdf=0)
// Check failover availability report.
if ($item['data'][$k_chart]['failover'] === '') {
$table1 = new stdClass();
- $table1->width = '99%';
+ $table1->width = '100%';
$table1->data = [];
$table1->size = [];
$table1->size[0] = '10%';
$table1->size[1] = '80%';
$table1->size[2] = '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'].'
'.$chart['module'];
$table1->data[0][1] = $chart['chart'];
$table1->data[0][2] = "".$sla_value.'';
diff --git a/pandora_console/include/graphs/functions_d3.php b/pandora_console/include/graphs/functions_d3.php
index fea1273015..7dc30ab007 100644
--- a/pandora_console/include/graphs/functions_d3.php
+++ b/pandora_console/include/graphs/functions_d3.php
@@ -22,8 +22,8 @@ function include_javascript_d3($return=false)
$is_include_javascript = true;
if (is_metaconsole()) {
- $output .= '';
- $output .= '';
+ $output .= '';
+ $output .= '';
} else {
$output .= '';
$output .= '';
diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css
index a4f9636bf5..5822ab4eac 100644
--- a/pandora_console/include/styles/pandora.css
+++ b/pandora_console/include/styles/pandora.css
@@ -196,6 +196,10 @@ h4 {
color: #3f3f3f;
text-transform: none;
}
+
+table tbody tr td h4 {
+ color: #ffffff;
+}
a {
color: #3f3f3f;
text-decoration: none;
diff --git a/pandora_console/include/styles/pandoraPDF.css b/pandora_console/include/styles/pandoraPDF.css
index a63017ad89..2a046aa122 100644
--- a/pandora_console/include/styles/pandoraPDF.css
+++ b/pandora_console/include/styles/pandoraPDF.css
@@ -35,6 +35,16 @@ table.header_table {
table.header_table thead tr th,
table.header_table tbody tr td {
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 {
@@ -52,7 +62,7 @@ thead.header_tr tr th.th_first {
}
thead.header_tr tr th.th_description {
- background-color: #f5f5f5;
+ background-color: #fafafa;
color: #1c1c1c;
text-align: justify;
}
@@ -81,6 +91,10 @@ table.table_agent_module tr td {
padding: 5px;
}
+table.header_table tbody tr td {
+ background-color: #fafafa;
+}
+
/* TABLE OF CONTENTS */
div.mpdf_toc {
font-family: sans-serif;
diff --git a/pandora_console/install.php b/pandora_console/install.php
index 837221b102..eafa07b1f0 100644
--- a/pandora_console/install.php
+++ b/pandora_console/install.php
@@ -129,7 +129,7 @@