diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php
index fca78f233f..f8874476e3 100644
--- a/pandora_console/include/functions_events.php
+++ b/pandora_console/include/functions_events.php
@@ -2752,6 +2752,146 @@ function events_print_type_img(
}
+/**
+ * Prints the event type image.
+ *
+ * @param string $type Event type from SQL.
+ * @param boolean $return Whether to return or print.
+ *
+ * @return string HTML with img.
+ */
+function events_print_type_img_pdf(
+ $type,
+ $return=false
+) {
+ $svg = '';
+
+ switch ($type) {
+ case 'alert_recovered':
+ $svg = '';
+ break;
+
+ case 'alert_manual_validation':
+ $svg = '';
+ break;
+
+ case 'going_down_critical':
+ case 'going_up_critical':
+ $svg = '';
+ break;
+
+ case 'going_up_normal':
+ case 'going_down_normal':
+ $svg = '';
+ break;
+
+ case 'going_up_warning':
+ case 'going_down_warning':
+ $svg = '';
+ break;
+
+ case 'going_unknown':
+ $svg = '';
+ break;
+
+ case 'system':
+ $svg = '';
+ break;
+
+ case 'new_agent':
+ $svg = '';
+ break;
+
+ case 'configuration_change':
+ $svg = '';
+ break;
+
+ case 'unknown':
+ default:
+ $svg = '';
+ break;
+ }
+
+ $output = '
'.$svg.'
';
+
+ if ($return) {
+ return $output;
+ }
+
+ echo $output;
+}
+
+
/**
* Prints the event type description
*
diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php
index 013cb1c617..a43f852945 100644
--- a/pandora_console/include/functions_reporting_html.php
+++ b/pandora_console/include/functions_reporting_html.php
@@ -1075,24 +1075,6 @@ function reporting_html_event_report_group($table, $item, $pdf=0)
}
foreach ($item['data'] as $k => $event) {
- // First pass along the class of this row.
- if ($item['show_summary_group']) {
- $table1->cellclass[$k][2] = get_priority_class($event['criticity']);
- $table1->cellclass[$k][3] = get_priority_class($event['criticity']);
- $table1->cellclass[$k][4] = get_priority_class($event['criticity']);
- $table1->cellclass[$k][5] = get_priority_class($event['criticity']);
- $table1->cellclass[$k][6] = get_priority_class($event['criticity']);
- $table1->cellclass[$k][7] = get_priority_class($event['criticity']);
- $table1->cellclass[$k][8] = get_priority_class($event['criticity']);
- } else {
- $table1->cellclass[$k][2] = get_priority_class($event['criticity']);
- $table1->cellclass[$k][3] = get_priority_class($event['criticity']);
- $table1->cellclass[$k][4] = get_priority_class($event['criticity']);
- $table1->cellclass[$k][5] = get_priority_class($event['criticity']);
- $table1->cellclass[$k][6] = get_priority_class($event['criticity']);
- $table1->cellclass[$k][7] = get_priority_class($event['criticity']);
- }
-
$data = [];
// Colored box.
@@ -1125,7 +1107,11 @@ function reporting_html_event_report_group($table, $item, $pdf=0)
]
);
- $data[] = events_print_type_img($event['event_type'], true);
+ if ($pdf) {
+ $data[] = events_print_type_img_pdf($event['event_type'], true);
+ } else {
+ $data[] = events_print_type_img($event['event_type'], true);
+ }
if ($item['show_summary_group']) {
$data[] = $event['event_rep'];
@@ -1343,19 +1329,6 @@ function reporting_html_event_report_module($table, $item, $pdf=0)
if (is_array($item_data) || is_object($item_data)) {
foreach ($item_data as $i => $event) {
$data = [];
- if ($show_summary_group) {
- $table1->cellclass[$i][2] = get_priority_class($event['criticity']);
- $table1->cellclass[$i][3] = get_priority_class($event['criticity']);
- $table1->cellclass[$i][4] = get_priority_class($event['criticity']);
- $table1->cellclass[$i][5] = get_priority_class($event['criticity']);
- $table1->cellclass[$i][6] = get_priority_class($event['criticity']);
- } else {
- $table1->cellclass[$i][2] = get_priority_class($event['criticity']);
- $table1->cellclass[$i][3] = get_priority_class($event['criticity']);
- $table1->cellclass[$i][4] = get_priority_class($event['criticity']);
- $table1->cellclass[$i][6] = get_priority_class($event['criticity']);
- }
-
// Colored box.
switch ($event['estado']) {
case 0:
@@ -1386,7 +1359,12 @@ function reporting_html_event_report_module($table, $item, $pdf=0)
]
);
- $data[1] = events_print_type_img($event['event_type'], true);
+ if ($pdf) {
+ $data[1] = events_print_type_img_pdf($event['event_type'], true);
+ } else {
+ $data[1] = events_print_type_img($event['event_type'], true);
+ }
+
$data[2] = io_safe_output($event['evento']);
$data[3] = get_priority_name($event['criticity']);
if ($show_summary_group) {
@@ -2671,21 +2649,6 @@ function reporting_html_event_report_agent($table, $item, $pdf=0)
}
foreach ($item['data'] as $i => $event) {
- if ($item['show_summary_group']) {
- $table1->cellclass[$i][2] = get_priority_class($event['criticity']);
- $table1->cellclass[$i][3] = get_priority_class($event['criticity']);
- $table1->cellclass[$i][4] = get_priority_class($event['criticity']);
- $table1->cellclass[$i][5] = get_priority_class($event['criticity']);
- $table1->cellclass[$i][6] = get_priority_class($event['criticity']);
- $table1->cellclass[$i][7] = get_priority_class($event['criticity']);
- } else {
- $table1->cellclass[$i][2] = get_priority_class($event['criticity']);
- $table1->cellclass[$i][3] = get_priority_class($event['criticity']);
- $table1->cellclass[$i][4] = get_priority_class($event['criticity']);
- $table1->cellclass[$i][5] = get_priority_class($event['criticity']);
- $table1->cellclass[$i][6] = get_priority_class($event['criticity']);
- }
-
$data = [];
// Colored box.
switch ($event['status']) {
@@ -2716,7 +2679,11 @@ function reporting_html_event_report_agent($table, $item, $pdf=0)
]
);
- $data[] = events_print_type_img($event['type'], true);
+ if ($pdf) {
+ $data[] = events_print_type_img_pdf($event['type'], true);
+ } else {
+ $data[] = events_print_type_img($event['type'], true);
+ }
if ($item['show_summary_group']) {
$data[] = $event['count'];
@@ -3284,6 +3251,7 @@ function get_alert_table($data)
{
$table = new StdCLass();
$table->width = '99%';
+ $table->class = 'info_table';
$table->data = [];
$table->head = [];
$table->headstyle = [];
diff --git a/pandora_console/include/styles/pandoraPDF.css b/pandora_console/include/styles/pandoraPDF.css
index 05e6ec9bb9..151ee4ea8f 100644
--- a/pandora_console/include/styles/pandoraPDF.css
+++ b/pandora_console/include/styles/pandoraPDF.css
@@ -216,6 +216,19 @@ table tbody td.cellBig {
font-size: 18px;
}
-table.info_table > tbody > tr:nth-child(even) {
- background-color: #e5e9ed !important;
+table.info_table {
+ border-collapse: collapse;
+}
+
+table.info_table thead tr th,
+table.info_table thead tr td {
+ background-color: white !important;
+}
+
+table.info_table thead tr th {
+ border-bottom: 1px solid #333333;
+}
+
+table.info_table tbody tr td {
+ border-bottom: 1px solid #e5e5e5;
}