diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 8cfb587eb2..7f1118ce3f 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -999,7 +999,7 @@ function events_print_event_table( $table->cellpadding = 0; $table->cellspacing = 0; $table->width = $width; - $table->class = 'info_table'; + $table->class = 'info_table no-td-padding'; if (!$tactical_view) { $table->title = __('Latest events'); } @@ -1012,41 +1012,38 @@ function events_print_event_table( $table->cellclass = []; $table->data = []; $table->align = []; - $table->style[0] = 'width:25px;'; - $table->style[1] = 'width:25px;padding: 0;'; - $table->style[2] = 'width:25px;'; - if ($agent_id == 0) { - $table->style[3] = 'word-break: break-all;'; - } + $table->style = []; - $table->style[4] = 'width:120px; word-break: break-all;'; + $i = 0; + $table->head[$i] = "".__('S.').''; + $table->headstyle[$i] = 'width: 1%;text-align: center;'; + $table->style[$i++] = 'text-align: center;'; - $table->head[0] = "".__('V.').''; - $table->align[0] = 'center'; + $table->head[$i] = __('Type'); + $table->headstyle[$i] = 'width: 3%;text-align: center;'; + $table->style[$i++] = 'text-align: center;'; - $table->head[1] = "".__('S.').''; - $table->align[1] = 'center'; - - $table->head[2] = __('Type'); - $table->headclass[2] = 'datos3 f9'; - $table->align[2] = 'center'; - - $table->head[3] = __('Event name'); + $table->head[$i] = __('Event name'); + $table->headstyle[$i] = ''; + $table->style[$i++] = 'word-break: break-word;'; if ($agent_id == 0) { - $table->head[4] = __('Agent name'); - $table->size[4] = '15%'; + $table->head[$i] = __('Agent name'); + $table->headstyle[$i] = ''; + $table->style[$i++] = 'word-break: break-all;'; } - $table->head[5] = __('Timestamp'); - $table->headclass[5] = 'datos3 f9'; - $table->align[5] = 'left'; - $table->size[5] = '15%'; + $table->head[$i] = __('Timestamp'); + $table->headstyle[$i] = 'width: 120px;'; + $table->style[$i++] = 'word-break: break-word;'; - $table->head[6] = __('Status'); - $table->headclass[6] = 'datos3 f9'; - $table->align[6] = 'left'; - $table->size[6] = '13%'; + $table->head[$i] = __('Status'); + $table->headstyle[$i] = 'width: 150px;text-align: center;'; + $table->style[$i++] = 'text-align: center;'; + + $table->head[$i] = "".__('V.').''; + $table->headstyle[$i] = 'width: 1%;text-align: center;'; + $table->style[$i++] = 'text-align: center;'; $all_groups = []; if ($agent_id != 0) { @@ -1085,44 +1082,15 @@ function events_print_event_table( break; } - $data[0] = html_print_image( - $img, - true, - [ - 'class' => 'image_status', - 'title' => $title, - ] - ); - - switch ($event['criticity']) { - default: - case EVENT_CRIT_MAINTENANCE: - $img = 'images/status_sets/default/severity_maintenance.png'; - break; - case EVENT_CRIT_INFORMATIONAL: - $img = 'images/status_sets/default/severity_informational.png'; - break; - - case EVENT_CRIT_NORMAL: - $img = 'images/status_sets/default/severity_normal.png'; - break; - - case EVENT_CRIT_WARNING: - $img = 'images/status_sets/default/severity_warning.png'; - break; - - case EVENT_CRIT_CRITICAL: - $img = 'images/status_sets/default/severity_critical.png'; - break; - } - - $data[1] = ui_print_event_priority($event['criticity'], true, true); + $i = 0; + // Criticity. + $data[$i++] = ui_print_event_priority($event['criticity'], true, true); // Event type. - $data[2] = events_print_type_img($event['event_type'], true); + $data[$i++] = events_print_type_img($event['event_type'], true); // Event text. - $data[3] = ui_print_string_substr( + $data[$i++] = ui_print_string_substr( strip_tags(io_safe_output($event['evento'])), 75, true, @@ -1133,36 +1101,32 @@ function events_print_event_table( if ($event['id_agente'] > 0) { // Agent name. // Get class name, for the link color, etc. - $data[4] = "".agents_get_alias($event['id_agente']).''; + $data[$i] = "".agents_get_alias($event['id_agente']).''; // For System or SNMP generated alerts. } else if ($event['event_type'] == 'system') { - $data[4] = __('System'); + $data[$i] = __('System'); } else { - $data[4] = __('Alert').'SNMP'; + $data[$i] = __('Alert').'SNMP'; } + + $i++; } // Timestamp. - $data[5] = ui_print_timestamp($event['timestamp'], true, ['style' => 'font-size: 7.5pt; letter-spacing: 0.3pt;']); + $data[$i++] = ui_print_timestamp($event['timestamp'], true, ['style' => 'font-size: 7.5pt; letter-spacing: 0.3pt;']); // Status. - $data[6] = ui_print_event_type($event['event_type'], true); + $data[$i++] = ui_print_event_type($event['event_type'], true); - /* - $class = get_priority_class($event['criticity']); - $cell_classes[3] = $class; - $cell_classes[4] = $class; - $cell_classes[5] = $class; - - array_push($table->cellclass, $cell_classes); - */ - - /* - Commented out (old). - // array_push ($table->rowclass, get_priority_class ($event["criticity"])); - */ - - array_push($table->data, $data); + $data[$i++] = html_print_image( + $img, + true, + [ + 'class' => 'image_status', + 'title' => $title, + ] + ); + $table->data[] = $data; } $events_table = html_print_table($table, true); diff --git a/pandora_console/include/styles/events.css b/pandora_console/include/styles/events.css index ef0244490e..20b1f59d15 100644 --- a/pandora_console/include/styles/events.css +++ b/pandora_console/include/styles/events.css @@ -4,8 +4,8 @@ div.criticity { color: #fff; text-align: center; border-radius: 5px; - font-size: 1.2em; - padding: 0; + font-size: 0.8em; + padding: 3px; margin: 0; display: table-cell; vertical-align: middle; diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 0e81f3e777..34c162a07d 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -468,6 +468,12 @@ select:-internal-list-box { .align-top td { vertical-align: top; } +.no-td-borders td { + border: none !important; +} +.no-td-padding td { + padding: 0 !important; +} div#page { background: #fbfbfb; @@ -1809,12 +1815,14 @@ div#main_pure { /* big_data is used in tactical and logon_ok */ .big_data { text-decoration: none; - font: bold 2em Arial, Sans-serif; + font-family: "lato", "Open Sans", sans-serif; + font-size: 2em; } .med_data { text-decoration: none; - font: bold 1.5em Arial, Sans-serif; + font-family: "lato", "Open Sans", sans-serif; + font-size: 1.5em; } .notify { @@ -2361,6 +2369,7 @@ td.cellBig { tr.group_view_data, .group_view_data { color: #3f3f3f; + font-family: "lato", "Open Sans", sans-serif; } tr.group_view_crit, @@ -3292,7 +3301,8 @@ table#policy_modules td * { color: #fff; margin: 2px; padding: 10px 30px; - font-size: 15px; + font-size: 16px; + font-family: "lato-bolder", "Open Sans", sans-serif; font-weight: bold; border-radius: 2px; } @@ -5913,7 +5923,7 @@ div#status_pie { display: flex; align-items: center; padding: 20px; - padding-bottom: 10px; + padding-bottom: 0; } .agent_details_agent_name { @@ -6038,13 +6048,10 @@ div#status_pie { .white_table thead tr:first-child > th { border-top-left-radius: 4px; border-top-right-radius: 4px; + border-bottom: 1px solid #e2e2e2; } .white_table tbody tr:first-child > td { - border-top: 1px solid #e2e2e2; -} - -.white_table tbody tr:first-child td { padding-top: 25px; } diff --git a/pandora_console/operation/agentes/estado_generalagente.php b/pandora_console/operation/agentes/estado_generalagente.php index cd30819b23..5d2411d0d3 100755 --- a/pandora_console/operation/agentes/estado_generalagente.php +++ b/pandora_console/operation/agentes/estado_generalagente.php @@ -306,18 +306,12 @@ $table_contact->data[] = $data; $data = []; -$table_contact->colspan[2][0] = 2; $data[0] = ''.__('Next contact').''; $progress = agents_get_next_contact($id_agente); -$table_contact->data[] = $data; - - -$data = []; -$table_contact->colspan[3][0] = 2; -$data[0] = ui_progress( +$data[1] = ui_progress( $progress, - '60%', - 2, + '100%', + 1.8, '#BBB', true, ($agent['intervalo'] * (100 - $progress) / 100).' s' diff --git a/pandora_console/operation/agentes/tactical.php b/pandora_console/operation/agentes/tactical.php index 9264cba0b3..e56f7f0e77 100755 --- a/pandora_console/operation/agentes/tactical.php +++ b/pandora_console/operation/agentes/tactical.php @@ -122,7 +122,7 @@ echo '