mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 07:44:35 +02:00
Styling review
This commit is contained in:
parent
8bd4a2f8f7
commit
f58d1bc6ee
@ -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] = "<span title='".__('Severity')."'>".__('S.').'</span>';
|
||||
$table->headstyle[$i] = 'width: 1%;text-align: center;';
|
||||
$table->style[$i++] = 'text-align: center;';
|
||||
|
||||
$table->head[0] = "<span title='".__('Validated')."'>".__('V.').'</span>';
|
||||
$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] = "<span title='".__('Severity')."'>".__('S.').'</span>';
|
||||
$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] = "<span title='".__('Validated')."'>".__('V.').'</span>';
|
||||
$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] = "<a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=".$event['id_agente']."'>".agents_get_alias($event['id_agente']).'</A>';
|
||||
$data[$i] = "<a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=".$event['id_agente']."'>".agents_get_alias($event['id_agente']).'</A>';
|
||||
// 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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -306,18 +306,12 @@ $table_contact->data[] = $data;
|
||||
|
||||
|
||||
$data = [];
|
||||
$table_contact->colspan[2][0] = 2;
|
||||
$data[0] = '<b>'.__('Next contact').'</b>';
|
||||
$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'
|
||||
|
@ -122,7 +122,7 @@ echo '<td style="vertical-align: top; min-width: 180px; width:25%; padding-right
|
||||
// ---------------------------------------------------------------------
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = '';
|
||||
$table->class = 'info_table no-td-borders';
|
||||
$table->cellpadding = 2;
|
||||
$table->cellspacing = 2;
|
||||
$table->border = 0;
|
||||
@ -130,7 +130,7 @@ $table->head = [];
|
||||
$table->data = [];
|
||||
$table->style = [];
|
||||
|
||||
$table->head[0] = '<span>'.__('Report of State').'</span>';
|
||||
$table->head[0] = '<b><span>'.__('Report of State').'</span></b>';
|
||||
$stats = reporting_get_stats_indicators($data, 120, 10, false);
|
||||
$status = '<table class="status_tactical">';
|
||||
foreach ($stats as $stat) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user