Merge branch 'ent-11229-al-guardar-filtro-en-netflow-live-view-lo-guarda-sin-nombre' into 'develop'

Ent 11229 al guardar filtro en netflow live view lo guarda sin nombre

See merge request artica/pandorafms!5927
This commit is contained in:
Matias Didier 2023-05-22 12:31:30 +00:00
commit 451bc20330
1 changed files with 8 additions and 1 deletions

View File

@ -85,7 +85,7 @@ if (is_ajax() === true) {
// Read filter configuration.
$filter_id = (int) get_parameter('filter_id', 0);
$filter['id_name'] = get_parameter('name', '');
$filter['id_name'] = get_parameter('new_filter_name', '');
$filter['id_group'] = (int) get_parameter('assign_group', 0);
$filter['aggregate'] = get_parameter('aggregate', '');
$filter['ip_dst'] = get_parameter('ip_dst', '');
@ -162,6 +162,10 @@ if ($save != '' && check_acl($config['id_user'], 0, 'AW')) {
// Save filter args.
$filter['filter_args'] = netflow_get_filter_arguments($filter, true);
if ($filter['id_name'] === '') {
$filter['id_name'] = 'Netflow_Filter_'.time();
}
$filter_id = db_process_sql_insert('tnetflow_filter', $filter);
if ($filter_id === false) {
$filter_id = 0;
@ -380,6 +384,9 @@ $advanced_toggle .= '<td colspan="2">'.html_print_checkbox_switch(
'displayMonitoringFilter()',
).'</td>';
$advanced_toggle .= '<td><b>'.__('New filter name').'</b></td>';
$advanced_toggle .= '<td>'.html_print_input_text('new_filter_name', '', false, 40, 80, true).'</td>';
$advanced_toggle .= '<tr id="netlofw_monitoring_filters">';
$advanced_toggle .= "<td style='font-weight:bold;'>".__('Netflow monitoring interval').ui_print_help_tip(__('Netflow monitoring interval in secs.'), true).'</td>';
$advanced_toggle .= '<td colspan="2">'.html_print_input_number(