diff --git a/pandora_console/godmode/snmpconsole/snmp_filters.php b/pandora_console/godmode/snmpconsole/snmp_filters.php index 59b01469ca..348c27a9b8 100644 --- a/pandora_console/godmode/snmpconsole/snmp_filters.php +++ b/pandora_console/godmode/snmpconsole/snmp_filters.php @@ -333,7 +333,20 @@ if ($edit_filter > -2) { echo '
'; echo '
'; - html_print_submit_button(__('Create'), 'submit_button', false, 'class="sub next"'); + html_print_action_buttons( + html_print_submit_button( + __('Create'), + 'crt', + false, + [ 'icon' => 'next' ], + true + ), + [ + 'type' => 'data_table', + 'class' => 'fixed_action_buttons', + ] + ); + echo '
'; } ?> diff --git a/pandora_console/include/functions_filemanager.php b/pandora_console/include/functions_filemanager.php index 4fc6dd0b14..d0fe3a2bd7 100644 --- a/pandora_console/include/functions_filemanager.php +++ b/pandora_console/include/functions_filemanager.php @@ -752,7 +752,7 @@ function filemanager_file_explorer( && ($readOnly === false) ) { $data[4] .= '
'; - $data[4] .= ''; + $data[4] .= ''; $data[4] .= html_print_input_hidden('filename', $fileinfo['realpath'], true); $data[4] .= html_print_input_hidden('hash', md5($fileinfo['realpath'].$config['server_unique_identifier']), true); $data[4] .= html_print_input_hidden('delete_file', 1, true); @@ -857,7 +857,7 @@ function filemanager_file_explorer( $createFolderElements = $tabs_dialog; $createFolderElements .= sprintf('', $url); $createFolderElements .= html_print_input_text('dirname', '', '', 30, 255, true); - $createFolderElements .= html_print_submit_button(__('Create'), 'crt', false, 'class="sub next"', true); + $createFolderElements .= html_print_submit_button(__('Create'), 'crt', false, 'class="submitButton"', true); $createFolderElements .= html_print_input_hidden('directory', $relative_directory, true); $createFolderElements .= html_print_input_hidden('create_dir', 1, true); $createFolderElements .= html_print_input_hidden('hash', md5($relative_directory.$config['server_unique_identifier']), true); @@ -897,7 +897,7 @@ function filemanager_file_explorer( $uploadFileElements .= html_print_input_hidden('upload_file', 1, true); } - $uploadFileElements .= html_print_submit_button(__('Go'), 'go', false, 'class="sub next"', true); + $uploadFileElements .= html_print_submit_button(__('Go'), 'go', false, 'class="mrgn_lft_10px submitButton" style="display: inline;"', true); $uploadFileElements .= html_print_input_hidden('real_directory', $real_directory, true); $uploadFileElements .= html_print_input_hidden('directory', $relative_directory, true); $uploadFileElements .= html_print_input_hidden('hash', md5($real_directory.$relative_directory.$config['server_unique_identifier']), true); @@ -918,7 +918,7 @@ function filemanager_file_explorer( $createTextElements = $tabs_dialog; $createTextElements .= ''; $createTextElements .= html_print_input_text('name_file', '', '', 30, 50, true); - $createTextElements .= html_print_submit_button(__('Create'), 'create', false, 'class="sub next"', true); + $createTextElements .= html_print_submit_button(__('Create'), 'create', false, 'class="submitButton"', true); $createTextElements .= html_print_input_hidden('real_directory', $real_directory, true); $createTextElements .= html_print_input_hidden('directory', $relative_directory, true); $createTextElements .= html_print_input_hidden('hash', md5($real_directory.$relative_directory.$config['server_unique_identifier']), true); diff --git a/pandora_console/include/functions_snmp_browser.php b/pandora_console/include/functions_snmp_browser.php index b97f6cc313..cdf8bdfacb 100644 --- a/pandora_console/include/functions_snmp_browser.php +++ b/pandora_console/include/functions_snmp_browser.php @@ -690,76 +690,92 @@ function snmp_browser_print_container( global $config; $snmp_version = get_parameter('snmp_browser_version', '2c'); + // Target selection. $table = new stdClass(); $table->width = '100%'; - $table->class = 'databox filters'; + $table->class = 'filter-table-adv'; $table->size = []; $table->data = []; $table->size[0] = '30%'; + $table->size[1] = '30%'; + $table->size[2] = '30%'; - $table->data[0][0] = '
'.__('Target IP').'   '; - $table->data[0][0] .= html_print_input( - [ - 'type' => 'text', - 'name' => 'target_ip', - 'value' => get_parameter('target_ip', ''), - 'required' => true, - 'size' => 25, - 'maxlength' => 0, - 'return' => true, - ] - ); - $table->data[0][0] .= '  '.__('Port').'  '; - $table->data[0][0] .= html_print_input( - [ - 'type' => 'number', - 'name' => 'target_port', - 'id' => 'target_port', - 'value' => get_parameter('target_port', 161), - 'required' => true, - 'return' => true, - ] - ); - $table->data[0][0] .= '
'; - - $table->data[0][1] = ''.__('Community').'   '; - $table->data[0][1] .= html_print_input_text( - 'community', - get_parameter('community', ''), - '', - 25, - 0, - true - ); - $table->data[0][2] = ''.__('Starting OID').'   '; - $table->data[0][2] .= html_print_input_text( - 'starting_oid', - get_parameter('starting_oid', '.1.3.6.1.2.1.2.2'), - '', - 25, - 0, - true + $table->data[0][0] = html_print_label_input_block( + __('Target IP'), + html_print_input( + [ + 'type' => 'text', + 'name' => 'target_ip', + 'value' => get_parameter('target_ip', ''), + 'required' => true, + 'size' => 25, + 'maxlength' => 0, + 'return' => true, + ] + ) ); - $table->data[1][0] = ''.__('Version').'   '; - $table->data[1][0] .= html_print_select( - [ - '1' => 'v. 1', - '2' => 'v. 2', - '2c' => 'v. 2c', - '3' => 'v. 3', - ], - 'snmp_browser_version', - get_parameter('snmp_browser_version', '2c'), - 'checkSNMPVersion();', - '', - '', - true, - false, - false, - '' + $table->data[0][1] .= html_print_label_input_block( + __('Port'), + html_print_input( + [ + 'type' => 'number', + 'name' => 'target_port', + 'id' => 'target_port', + 'value' => get_parameter('target_port', 161), + 'required' => true, + 'return' => true, + ] + ) + ); + + $table->data[0][2] = html_print_label_input_block( + __('Community'), + html_print_input_text( + 'community', + get_parameter('community', ''), + '', + 25, + 0, + true + ) + ); + + $table->data[1][0] = html_print_label_input_block( + __('Starting OID'), + html_print_input_text( + 'starting_oid', + get_parameter('starting_oid', '.1.3.6.1.2.1.2.2'), + '', + 25, + 0, + true + ) + ); + + $table->data[1][1] = html_print_label_input_block( + __('Version'), + html_print_select( + [ + '1' => 'v. 1', + '2' => 'v. 2', + '2c' => 'v. 2c', + '3' => 'v. 3', + ], + 'snmp_browser_version', + get_parameter('snmp_browser_version', '2c'), + 'checkSNMPVersion();', + '', + '', + true, + false, + false, + '', + false, + 'width: 100%', + ) ); $servers_to_exec = []; @@ -782,31 +798,22 @@ function snmp_browser_print_container( } } - $table->data[1][1] = ''; - $table->data[1][1] .= __('Server to execute'); - $table->data[1][1] .= '   '; - $table->data[1][1] .= html_print_select( - $servers_to_exec, - 'server_to_exec', - '', - '', - '', - '', - true - ); - - $table->data[1][2] = html_print_input( - [ - 'type' => 'submit', - 'label' => __('Browse'), - 'name' => 'browse', - 'disabled' => false, - 'script' => 'snmpBrowse()', - 'attributes' => 'class="sub search mrgn_top_0px"', - 'return' => true, - ], - 'div', - true + $table->data[1][2] = html_print_label_input_block( + __('Server to execute'), + html_print_select( + $servers_to_exec, + 'server_to_exec', + '', + '', + '', + '', + true, + false, + false, + '', + false, + 'width: 100%', + ) ); // SNMP v3 options. @@ -819,87 +826,159 @@ function snmp_browser_print_container( $table3 = new stdClass(); $table3->width = '100%'; + $table3->class = 'filter-table-adv'; - $table3->valign[0] = ''; - $table3->valign[1] = ''; + $table3->size[0] = '30%'; + $table3->size[1] = '30%'; + $table3->size[2] = '30%'; - $table3->data[2][1] = ''.__('Auth user').''; - $table3->data[2][2] = html_print_input_text( - 'snmp3_browser_auth_user', - $snmp3_auth_user, - '', - 15, - 60, - true + $table3->data[0][0] = html_print_label_input_block( + __('Auth user'), + html_print_input_text( + 'snmp3_browser_auth_user', + $snmp3_auth_user, + '', + 15, + 60, + true + ) ); - $table3->data[2][3] = ''.__('Auth password').''; - $table3->data[2][4] = html_print_input_password( - 'snmp3_browser_auth_pass', - $snmp3_auth_pass, - '', - 15, - 60, - true + $table3->data[0][1] = html_print_label_input_block( + __('Auth password'), + '
'.html_print_input_password( + 'snmp3_browser_auth_pass', + $snmp3_auth_pass, + '', + 15, + 60, + true + ).'
' ); - $table3->data[2][4] .= html_print_input_hidden_extended( + $table3->data[0][1] .= html_print_input_hidden_extended( 'active_snmp_v3', 0, 'active_snmp_v3_fsb', true ); - $table3->data[5][0] = ''.__('Privacy method').''; - $table3->data[5][1] = html_print_select( + $table3->data[0][2] = html_print_label_input_block( + __('Privacy method'), + html_print_select( + [ + 'DES' => __('DES'), + 'AES' => __('AES'), + ], + 'snmp3_browser_privacy_method', + $snmp3_privacy_method, + '', + '', + '', + true + ) + ); + + $table3->data[1][0] = html_print_label_input_block( + __('Privacy pass'), + '
'.html_print_input_password( + 'snmp3_browser_privacy_pass', + $snmp3_privacy_pass, + '', + 15, + 60, + true + ).'
' + ); + + $table3->data[1][1] = html_print_label_input_block( + __('Auth method'), + html_print_select( + [ + 'MD5' => __('MD5'), + 'SHA' => __('SHA'), + ], + 'snmp3_browser_auth_method', + $snmp3_auth_method, + '', + '', + '', + true + ) + ); + + $table3->data[1][2] = html_print_label_input_block( + __('Security level'), + html_print_select( + [ + 'noAuthNoPriv' => __('Not auth and not privacy method'), + 'authNoPriv' => __('Auth and not privacy method'), + 'authPriv' => __('Auth and privacy method'), + ], + 'snmp3_browser_security_level', + $snmp3_security_level, + '', + '', + '', + true + ) + ); + + if (isset($snmp_version) === false) { + $snmp_version = null; + } + + if ($snmp_version == 3) { + $table->data[2] = '
'; + } else { + $table->data[2] = ''; + + $searchForm = ''; + $searchForm .= html_print_table($table, true); + $searchForm .= html_print_div( [ - 'DES' => __('DES'), - 'AES' => __('AES'), + 'class' => 'action-buttons', + 'content' => html_print_submit_button( + __('Execute'), + 'srcbutton', + false, + [ + 'mode' => 'mini', + 'icon' => 'cog', + ], + true + ), ], - 'snmp3_browser_privacy_method', - $snmp3_privacy_method, - '', - '', - '', true ); - $table3->data[5][2] = ''.__('Privacy pass').''; - $table3->data[5][3] = html_print_input_password( - 'snmp3_browser_privacy_pass', - $snmp3_privacy_pass, - '', - 15, - 60, - true - ); + $searchForm .= ''; - $table3->data[6][0] = ''.__('Auth method').''; - $table3->data[6][1] = html_print_select( - [ - 'MD5' => __('MD5'), - 'SHA' => __('SHA'), - ], - 'snmp3_browser_auth_method', - $snmp3_auth_method, + ui_toggle( + $searchForm, + ''.__('Filters').'', + 'filter_form', '', + false, + false, '', - '', - true - ); - $table3->data[6][2] = ''.__('Security level').''; - $table3->data[6][3] = html_print_select( - [ - 'noAuthNoPriv' => __('Not auth and not privacy method'), - 'authNoPriv' => __('Auth and not privacy method'), - 'authPriv' => __('Auth and privacy method'), - ], - 'snmp3_browser_security_level', - $snmp3_security_level, - '', - '', - '', - true + 'white-box-content', + 'box-flat white_table_graph fixed_filter_bar' ); // Search tools. @@ -1011,34 +1090,7 @@ function snmp_browser_print_container( $table2->data[0][2] .= ''; $table2->cellstyle[0][2] = 'text-align:center;'; - // This extra div that can be handled by jquery's dialog. - $output = '
'; - $output .= '
'; - $output .= '
'; - $output .= '
'; - $output .= html_print_table($table, true); - $output .= '
'; - - if (isset($snmp_version) === false) { - $snmp_version = null; - } - - if ($snmp_version == 3) { - $output .= '
'; - } else { - $output .= ''; - $output .= '
'; + $output = ''; // SNMP tree container. - $output .= '
'; + $output .= '