From 563e9e15c4ee58480ddc6333f345930fc59c9794 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Tue, 21 Mar 2023 10:30:35 +0100 Subject: [PATCH] #9624 fixed conflics --- pandora_console/godmode/setup/setup.php | 2 +- .../godmode/setup/setup_netflow.php | 7 +- pandora_console/godmode/setup/setup_sflow.php | 88 ++++++++++++------- 3 files changed, 63 insertions(+), 34 deletions(-) diff --git a/pandora_console/godmode/setup/setup.php b/pandora_console/godmode/setup/setup.php index f9c238e725..7b157648cf 100644 --- a/pandora_console/godmode/setup/setup.php +++ b/pandora_console/godmode/setup/setup.php @@ -293,7 +293,7 @@ switch ($section) { case 'sflow': $buttons['sflow']['active'] = true; - $subpage = ' » '.__('Sflow'); + $subpage = __('Sflow'); $help_header = 'setup_flow_tab'; break; diff --git a/pandora_console/godmode/setup/setup_netflow.php b/pandora_console/godmode/setup/setup_netflow.php index 3711280fad..b9cd79492d 100644 --- a/pandora_console/godmode/setup/setup_netflow.php +++ b/pandora_console/godmode/setup/setup_netflow.php @@ -45,7 +45,6 @@ $table->data[0][] = html_print_label_input_block( __('Data storage path'), html_print_input_text('netflow_name_dir', $config['netflow_name_dir'], false, 50, 200, true) ); -$table->data[0][] = ''; $table->data[0][] = html_print_label_input_block( __('Daemon interval'), @@ -101,3 +100,9 @@ html_print_action_buttons( ) ); echo ''; +?> + \ No newline at end of file diff --git a/pandora_console/godmode/setup/setup_sflow.php b/pandora_console/godmode/setup/setup_sflow.php index 2610bc3361..454be16034 100644 --- a/pandora_console/godmode/setup/setup_sflow.php +++ b/pandora_console/godmode/setup/setup_sflow.php @@ -1,6 +1,6 @@ width = '100%'; -$table->border = 0; -$table->cellspacing = 3; -$table->cellpadding = 5; -$table->class = 'databox filters'; +$table->class = 'databox filter-table-adv'; $table->data = []; -$table->data[0][0] = ''.__('Data storage path').''; -$table->data[0][1] = html_print_input_text('sflow_name_dir', $config['sflow_name_dir'], false, 50, 200, true); -$table->data[0][1] .= ''; +$table->data[0][] = html_print_label_input_block( + __('Data storage path'), + html_print_input_text('sflow_name_dir', $config['sflow_name_dir'], false, 50, 200, true) +); +$table->data[0][] = html_print_label_input_block( + __('Daemon interval'), + html_print_input_text('sflow_interval', $config['sflow_interval'], false, 50, 200, true) +); -$table->data[1][0] = ''.__('Daemon interval').''; -$table->data[1][1] = html_print_input_text('sflow_interval', $config['sflow_interval'], false, 50, 200, true); +$table->data[1][] = html_print_label_input_block( + __('Daemon binary path'), + html_print_input_text('sflow_daemon', $config['sflow_daemon'], false, 50, 200, true) +); -$table->data[2][0] = ''.__('Daemon binary path').''; -$table->data[2][1] = html_print_input_text('sflow_daemon', $config['sflow_daemon'], false, 50, 200, true); +$table->data[1][] = html_print_label_input_block( + __('Nfdump binary path'), + html_print_input_text('sflow_nfdump', $config['sflow_nfdump'], false, 50, 200, true) +); -$table->data[3][0] = ''.__('Nfdump binary path').''; -$table->data[3][1] = html_print_input_text('sflow_nfdump', $config['sflow_nfdump'], false, 50, 200, true); +$table->data[2][] = html_print_label_input_block( + __('Nfexpire binary path'), + html_print_input_text('sflow_nfexpire', $config['sflow_nfexpire'], false, 50, 200, true) +); -$table->data[4][0] = ''.__('Nfexpire binary path').''; -$table->data[4][1] = html_print_input_text('sflow_nfexpire', $config['sflow_nfexpire'], false, 50, 200, true); +$table->data[2][] = html_print_label_input_block( + __('Maximum chart resolution'), + html_print_input_text('sflow_max_resolution', $config['sflow_max_resolution'], false, 50, 200, true) +); -$table->data[5][0] = ''.__('Maximum chart resolution').''; -$table->data[5][1] = html_print_input_text('sflow_max_resolution', $config['sflow_max_resolution'], false, 50, 200, true); +$table->data[3][] = html_print_label_input_block( + __('Disable custom live view filters'), + html_print_checkbox_switch('sflow_disable_custom_lvfilters', 1, $config['sflow_disable_custom_lvfilters'], true) +); -$table->data[6][0] = ''.__('Disable custom live view filters').''; -$table->data[6][1] = html_print_checkbox_switch('sflow_disable_custom_lvfilters', 1, $config['sflow_disable_custom_lvfilters'], true); -$table->data[7][0] = ''.__('Max. sflow lifetime').''; -$table->data[7][1] = html_print_input_text('sflow_max_lifetime', $config['sflow_max_lifetime'], false, 50, 200, true); +$table->data[3][] = html_print_label_input_block( + __('Sflow max lifetime'), + html_print_input_text('sflow_max_lifetime', $config['sflow_max_lifetime'], false, 50, 200, true) +); -$table->data[8][0] = ''.__('Name resolution for IP address').''; $onclick = "if (!confirm('".__('Warning').'. '.__('IP address resolution can take a lot of time')."')) return false;"; -$table->data[8][1] = html_print_checkbox_switch_extended('sflow_get_ip_hostname', 1, $config['sflow_get_ip_hostname'], false, $onclick, '', true); - -echo '
'; +$table->data[4][] = html_print_label_input_block( + __('Name resolution for IP address'), + html_print_checkbox_switch_extended('sflow_get_ip_hostname', 1, $config['sflow_get_ip_hostname'], false, $onclick, '', true) +); +echo ''; html_print_table($table); - -// Update button. -echo '
'; - html_print_input_hidden('update_config', 1); - html_print_submit_button(__('Update'), 'upd_button', false, 'class="sub upd"'); -echo '
'; +html_print_input_hidden('update_config', 1); +html_print_action_buttons( + html_print_submit_button( + __('Update'), + 'upd_button', + false, + ['icon' => 'update'], + true + ) +); +echo ''; +?> + \ No newline at end of file