From 8d7620e88da116de0452d43b40d93ff2ce741073 Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Thu, 16 Mar 2023 13:11:11 +0100 Subject: [PATCH] Setup updates --- .../godmode/setup/setup_general.php | 4 +- .../godmode/setup/setup_netflow.php | 82 ++++++++++++------- .../godmode/setup/setup_visuals.php | 18 ++-- 3 files changed, 62 insertions(+), 42 deletions(-) diff --git a/pandora_console/godmode/setup/setup_general.php b/pandora_console/godmode/setup/setup_general.php index 90c7403847..b586cb0d72 100644 --- a/pandora_console/godmode/setup/setup_general.php +++ b/pandora_console/godmode/setup/setup_general.php @@ -680,7 +680,7 @@ $table->data[$i][] = html_print_label_input_block( echo '
'; -echo '
'; +echo '
'; echo ''.__('General options').''; html_print_input_hidden('update_config', 1); @@ -695,7 +695,7 @@ $encryption = [ echo '
'; -echo '
'; +echo '
'; echo ''.__('Mail configuration').''; ui_print_warning_message( diff --git a/pandora_console/godmode/setup/setup_netflow.php b/pandora_console/godmode/setup/setup_netflow.php index 48a2947bb2..fbecfa766d 100644 --- a/pandora_console/godmode/setup/setup_netflow.php +++ b/pandora_console/godmode/setup/setup_netflow.php @@ -14,7 +14,7 @@ * |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______| * * ============================================================================ - * Copyright (c) 2005-2022 Artica Soluciones Tecnologicas + * Copyright (c) 2005-2023 Artica Soluciones Tecnologicas * Please see http://pandorafms.org for full contribution list * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -37,46 +37,66 @@ $update = (bool) get_parameter('update'); $table = new stdClass(); $table->width = '100%'; +$table->class = 'databox filter-table-adv'; $table->border = 0; -$table->cellspacing = 3; -$table->cellpadding = 5; -$table->class = 'databox filters'; - $table->data = []; -$table->data[0][0] = ''.__('Data storage path').''; -$table->data[0][1] = html_print_input_text('netflow_path', $config['netflow_path'], false, 50, 200, true); +$table->data[0][] = html_print_label_input_block( + __('Data storage path'), + html_print_input_text('netflow_path', $config['netflow_path'], false, 50, 200, true) +); -$table->data[1][0] = ''.__('Daemon interval').''; -$table->data[1][1] = html_print_input_text('netflow_interval', $config['netflow_interval'], false, 50, 200, true); +$table->data[0][] = html_print_label_input_block( + __('Daemon interval'), + html_print_input_text('netflow_interval', $config['netflow_interval'], false, 50, 200, true) +); -$table->data[2][0] = ''.__('Daemon binary path').''; -$table->data[2][1] = html_print_input_text('netflow_daemon', $config['netflow_daemon'], false, 50, 200, true); +$table->data[1][] = html_print_label_input_block( + __('Daemon binary path'), + html_print_input_text('netflow_daemon', $config['netflow_daemon'], false, 50, 200, true) +); -$table->data[3][0] = ''.__('Nfdump binary path').''; -$table->data[3][1] = html_print_input_text('netflow_nfdump', $config['netflow_nfdump'], false, 50, 200, true); +$table->data[1][] = html_print_label_input_block( + __('Nfdump binary path'), + html_print_input_text('netflow_nfdump', $config['netflow_nfdump'], false, 50, 200, true) +); -$table->data[4][0] = ''.__('Nfexpire binary path').''; -$table->data[4][1] = html_print_input_text('netflow_nfexpire', $config['netflow_nfexpire'], false, 50, 200, true); +$table->data[2][] = html_print_label_input_block( + __('Nfexpire binary path'), + html_print_input_text('netflow_nfexpire', $config['netflow_nfexpire'], false, 50, 200, true) +); -$table->data[5][0] = ''.__('Maximum chart resolution').''; -$table->data[5][1] = html_print_input_text('netflow_max_resolution', $config['netflow_max_resolution'], false, 50, 200, true); +$table->data[2][] = html_print_label_input_block( + __('Maximum chart resolution'), + html_print_input_text('netflow_max_resolution', $config['netflow_max_resolution'], false, 50, 200, true) +); -$table->data[6][0] = ''.__('Disable custom live view filters').''; -$table->data[6][1] = html_print_checkbox_switch('netflow_disable_custom_lvfilters', 1, $config['netflow_disable_custom_lvfilters'], true); -$table->data[7][0] = ''.__('Netflow max lifetime').''; -$table->data[7][1] = html_print_input_text('netflow_max_lifetime', $config['netflow_max_lifetime'], false, 50, 200, true); +$table->data[3][] = html_print_label_input_block( + __('Disable custom live view filters'), + html_print_checkbox_switch('netflow_disable_custom_lvfilters', 1, $config['netflow_disable_custom_lvfilters'], true) +); + +$table->data[3][] = html_print_label_input_block( + __('Netflow max lifetime'), + html_print_input_text('netflow_max_lifetime', $config['netflow_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('netflow_get_ip_hostname', 1, $config['netflow_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('netflow_get_ip_hostname', 1, $config['netflow_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 ''; diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php index 589593ba49..2e18178773 100755 --- a/pandora_console/godmode/setup/setup_visuals.php +++ b/pandora_console/godmode/setup/setup_visuals.php @@ -2041,47 +2041,47 @@ $row++; * */ -echo '
'; +echo '
'; echo ''.__('Behaviour configuration').' '.ui_print_help_icon('behavoir_conf_tab', true).''; html_print_table($table_behaviour); echo '
'; -echo '
'; +echo '
'; echo ''.__('GIS configuration').' '.ui_print_help_icon('gis_conf_tab', true).''; html_print_table($table_gis); echo '
'; -echo '
'; +echo '
'; echo ''.__('Style configuration').' '.ui_print_help_icon('style_conf_tab', true).''; html_print_table($table_styles); echo '
'; -echo '
'; +echo '
'; echo ''.__('Charts configuration').' '.ui_print_help_icon('charts_conf_tab', true).''; html_print_table($table_chars); echo '
'; -echo '
'; +echo '
'; echo ''.__('Font and Text configuration').' '.ui_print_help_icon('front_and_text_conf_tab', true).''; html_print_table($table_font); echo '
'; -echo '
'; +echo '
'; echo ''.__('Visual consoles configuration').' '.ui_print_help_icon('visual_consoles_conf_tab', true).''; html_print_table($table_vc); echo '
'; -echo '
'; +echo '
'; echo ''.__('Reports configuration ').ui_print_help_icon('reports_configuration_tab', true).''; html_print_table($table_report); echo '
'; -echo '
'; +echo '
'; echo ''.__('Services configuration').' '.ui_print_help_icon('services_conf_tab', true).''; html_print_table($table_ser); echo '
'; -echo '
'; +echo '
'; echo ''.__('Other configuration').' '.ui_print_help_icon('other_conf_tab', true).''; html_print_table($table_other); echo '
';