From 6a1f389109834eea33f5cc693a02044759c11392 Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Mon, 22 May 2023 09:38:01 +0200 Subject: [PATCH] #11229 Add input text for new filter name --- pandora_console/operation/netflow/nf_live_view.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pandora_console/operation/netflow/nf_live_view.php b/pandora_console/operation/netflow/nf_live_view.php index ceaa2249e6..06dffcaa9f 100644 --- a/pandora_console/operation/netflow/nf_live_view.php +++ b/pandora_console/operation/netflow/nf_live_view.php @@ -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 .= ''.html_print_checkbox_switch( 'displayMonitoringFilter()', ).''; +$advanced_toggle .= ''.__('New filter name').''; +$advanced_toggle .= ''.html_print_input_text('new_filter_name', '', false, 40, 80, true).''; + $advanced_toggle .= ''; $advanced_toggle .= "".__('Netflow monitoring interval').ui_print_help_tip(__('Netflow monitoring interval in secs.'), true).''; $advanced_toggle .= ''.html_print_input_number(