fixed errors view events sort and save filters pandora_enterprise#9425

This commit is contained in:
Daniel Barbero 2022-10-14 09:31:45 +02:00
parent a21048c4c5
commit 4dd311063e
3 changed files with 18 additions and 2 deletions

View File

@ -438,8 +438,12 @@ $table->data[10][1] = html_print_select(
true
);
$repeated_sel[0] = __('All events');
$repeated_sel[1] = __('Group events');
$repeated_sel = [
EVENT_GROUP_REP_ALL => __('All events'),
EVENT_GROUP_REP_EVENTS => __('Group events'),
EVENT_GROUP_REP_AGENTS => __('Group agents'),
EVENT_GROUP_REP_EXTRAIDS => __('Group extra id'),
];
$table->data[11][0] = '<b>'.__('Repeated').'</b>';
$table->data[11][1] = html_print_select(
$repeated_sel,

View File

@ -5190,6 +5190,14 @@ function events_get_sql_order($sort_field='timestamp', $sort='DESC', $group_rep=
$sort_field_translated = 'id_extra';
break;
case 'agent_name':
$sort_field_translated = 'ta.nombre';
break;
case 'module_custom_id':
$sort_field_translated = 'am.custom_id';
break;
default:
$sort_field_translated = $sort_field;
break;

View File

@ -356,6 +356,10 @@ if (is_ajax() === true) {
$order['field'] = 'agent_name';
break;
case 'if(te.ack_utimestamp > 0, from_unixtime(te.ack_utimestamp),"") as ack_utimestamp':
$order['field'] = 'ack_utimestamp';
break;
default:
$order['field'] = $field;
break;