fixed problems in event view and event view custom fields
This commit is contained in:
parent
4d9d0deab7
commit
b4bd7f0f63
|
@ -217,7 +217,7 @@ function events_get_all_fields()
|
|||
*
|
||||
* @return string Traduction.
|
||||
*/
|
||||
function events_get_column_name($field)
|
||||
function events_get_column_name($field, $table_alias=false)
|
||||
{
|
||||
switch ($field) {
|
||||
case 'id_evento':
|
||||
|
@ -293,7 +293,11 @@ function events_get_column_name($field)
|
|||
return __('Options');
|
||||
|
||||
case 'mini_severity':
|
||||
return 'S';
|
||||
if ($table_alias === true) {
|
||||
return 'S';
|
||||
} else {
|
||||
return __('Severity mini');
|
||||
}
|
||||
|
||||
default:
|
||||
return __($field);
|
||||
|
@ -308,7 +312,7 @@ function events_get_column_name($field)
|
|||
*
|
||||
* @return array Names array.
|
||||
*/
|
||||
function events_get_column_names($fields)
|
||||
function events_get_column_names($fields, $table_alias=false)
|
||||
{
|
||||
if (!isset($fields) || !is_array($fields)) {
|
||||
return [];
|
||||
|
@ -318,14 +322,14 @@ function events_get_column_names($fields)
|
|||
foreach ($fields as $f) {
|
||||
if (is_array($f)) {
|
||||
$name = [];
|
||||
$name['text'] = events_get_column_name($f['text']);
|
||||
$name['text'] = events_get_column_name($f['text'], $table_alias);
|
||||
$name['class'] = $f['class'];
|
||||
$name['style'] = $f['style'];
|
||||
$name['extra'] = $f['extra'];
|
||||
$name['id'] = $f['id'];
|
||||
$names[] = $name;
|
||||
} else {
|
||||
$names[] = events_get_column_name($f);
|
||||
$names[] = events_get_column_name($f, $table_alias);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -118,14 +118,6 @@ table.dataTable tbody td {
|
|||
border-bottom: 2px solid #dedede;
|
||||
}
|
||||
|
||||
.info_table.events tr > td:first-child {
|
||||
padding-left: 5px;
|
||||
padding-top: 0;
|
||||
vertical-align: middle;
|
||||
width: 40%;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.filter_input {
|
||||
align-items: center;
|
||||
}
|
||||
|
|
|
@ -1258,7 +1258,7 @@ try {
|
|||
);
|
||||
|
||||
// Get column names.
|
||||
$column_names = events_get_column_names($fields);
|
||||
$column_names = events_get_column_names($fields, true);
|
||||
|
||||
// Open current filter quick reference.
|
||||
$active_filters_div = '<div class="filter_summary">';
|
||||
|
|
|
@ -88,7 +88,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
|
|||
('netflow_daemon', '/usr/bin/nfcapd'),
|
||||
('netflow_nfdump', '/usr/bin/nfdump'),
|
||||
('netflow_max_resolution', '50'),
|
||||
('event_fields', 'evento,id_agente,estado,timestamp'),
|
||||
('event_fields', 'mini_severity,evento,id_agente,estado,timestamp'),
|
||||
('status_monitor_fields', 'policy,agent,data_type,module_name,server_type,interval,status,graph,warn,data,timestamp'),
|
||||
('list_ACL_IPs_for_API', '127.0.0.1'),
|
||||
('enable_pass_policy', 0),
|
||||
|
|
Loading…
Reference in New Issue