diff --git a/pandora_console/operation/agentes/interface_view.functions.php b/pandora_console/operation/agentes/interface_view.functions.php index dc51d5a3b4..f470dabe18 100644 --- a/pandora_console/operation/agentes/interface_view.functions.php +++ b/pandora_console/operation/agentes/interface_view.functions.php @@ -21,111 +21,128 @@ */ function print_filters($sec) { + global $config; + $table = new StdClass(); $table->width = '100%'; - $table->cellspacing = 0; - $table->cellpadding = 0; - $table->class = 'databox filters'; + $table->rowspan = []; + $table->size = []; + $table->size[0] = '33%'; + $table->size[1] = '33%'; + $table->size[2] = '33%'; + $table->class = 'filter-table-adv'; if ($sec === 'view') { - $table->style[0] = 'font-weight: bold;'; - $table->style[1] = 'font-weight: bold;'; - $table->style[2] = 'font-weight: bold;'; - $table->style[3] = 'font-weight: bold;'; - $table->style[4] = 'font-weight: bold;'; - - $table->data[0][0] = __('Group'); - $table->data[0][1] .= html_print_select_groups( - $config['id_user'], - 'AR', - true, - 'group_id', - $ag_group, - '', - '', - '0', - true, - false, - false, - '', - false, - '', - false, - false, - 'id_grupo', - false + $table->data[0][0] = html_print_label_input_block( + __('Group'), + html_print_select_groups( + $config['id_user'], + 'AR', + true, + 'group_id', + '', + '', + '', + '0', + true, + false, + false, + '', + false, + '', + false, + false, + 'id_grupo', + false + ) ); - $table->data[0][2] = __('Recursion'); - - $table->data[0][2] .= html_print_input( + $table->data[0][0] .= html_print_label_input_block( + __('Recursion'), + html_print_input( + [ + 'type' => 'switch', + 'name' => 'recursion', + 'return' => true, + 'checked' => false, + 'value' => 1, + ] + ), [ - 'type' => 'checkbox', - 'name' => 'recursion', - 'return' => true, - 'checked' => $recursion, - 'value' => 1, + 'div_class' => 'add-input-reverse', + 'label_class' => 'label-thin', ] ); - - $table->data[1][0] = __('Filter Agents'); - $table->data[1][1] = html_print_input_text('filter_agents', '', '', 20, 255, true); - - $table->data[2][0] = __('Agents'); - - if (empty($agents) === true || $agents == -1) { - $agents = []; - } - - $table->data[2][1] = html_print_select( - [], - 'selected_agents[]', - '', - '', - '', - 0, - true, - true, - true, - '', - false, - 'min-width: 180px; max-width: 200px;' + $table->rowspan[0][1] = 2; + $table->data[0][1] = html_print_label_input_block( + __('Agents'), + html_print_select( + [], + 'selected_agents[]', + '', + '', + '', + 0, + true, + true, + true, + '', + false, + 'width:100%' + ) ); - // Interfaces. - $table->data[2][3] = ''.__('Interfaces').''; - $table->data[2][4] = html_print_select( - [], - 'selected_interfaces[]', - $selected_interfaces, - '', - '', - 0, - true, - true, - true, - '', - false, - 'min-width: 180px; max-width: 200px;' + $table->rowspan[0][2] = 2; + $table->data[0][2] = html_print_label_input_block( + __('Interfaces'), + html_print_select( + [], + 'selected_interfaces[]', + '', + '', + '', + 0, + true, + true, + true, + '', + false, + 'width:100%' + ) ); - $filters = '
'; } else { @@ -135,7 +152,7 @@ function print_filters($sec) $table->data[0][1] = html_print_select( [], 'selected_interfaces[]', - $selected_interfaces, + '', '', '', 0, @@ -147,13 +164,7 @@ function print_filters($sec) 'min-width: 180px; max-width: 200px;' ); - $filters = '