From 4fec6a1ccbef81a0c4bbe9721d32ff635f6a73f9 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Tue, 14 Nov 2023 17:04:31 +0100 Subject: [PATCH] #12296 restyling agent detail filters --- pandora_console/include/styles/pandora.css | 16 ++++++++ .../operation/agentes/estado_agente.php | 41 +++++++++++++------ 2 files changed, 44 insertions(+), 13 deletions(-) diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 7c740bba2b..43b3823153 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -10214,6 +10214,14 @@ div#err_msg_centralised { align-items: flex-start; } +.div-col-4 { + width: 25%; + display: flex; + flex-direction: column; + align-items: flex-start; + margin-top: 10px; +} + .div-span { width: 100%; color: #161628; @@ -12792,3 +12800,11 @@ tr.shown td.details-control { position: relative; top: -92px; } + +.span_as_label { + font-size: 13px; + line-height: 16px; + color: #161628; + font-weight: bold; + margin-bottom: 10px; +} diff --git a/pandora_console/operation/agentes/estado_agente.php b/pandora_console/operation/agentes/estado_agente.php index d126b19144..d3543b0a7c 100644 --- a/pandora_console/operation/agentes/estado_agente.php +++ b/pandora_console/operation/agentes/estado_agente.php @@ -320,6 +320,7 @@ $table->size[0] = '50%'; $table->size[1] = '50%'; $table->class = 'filter-table-adv'; +$table->cellstyle['group'][0] = 'display: flex;width: 95% !important;'; $table->data['group'][0] = html_print_label_input_block( __('Group'), html_print_select_groups( @@ -336,7 +337,8 @@ $table->data['group'][0] = html_print_label_input_block( true, '', false - ) + ), + ['div_class' => 'w100p'] ); $table->data['group'][0] .= html_print_label_input_block( @@ -346,11 +348,7 @@ $table->data['group'][0] .= html_print_label_input_block( 1, $recursion, true - ), - [ - 'div_class' => 'add-input-reverse', - 'label_class' => 'label-thin', - ] + ) ); $table->data['group'][1] = html_print_label_input_block( @@ -405,7 +403,7 @@ foreach ($pre_fields as $key => $value) { $table->data[1][0] = html_print_label_input_block( __('Operating System'), - html_print_select($fields, 'os', $os, '', 'All', 0, true) + html_print_select($fields, 'os', $os, '', 'All', 0, true, false, true, 'w100p', false, 'width:100%') ); $table->data[1][1] = html_print_label_input_block( @@ -428,9 +426,22 @@ if (function_exists('policies_get_policies') === true) { } } -$table->data[2][0] = html_print_label_input_block( +$table->data[2][1] = html_print_label_input_block( __('Policies'), - html_print_select($fields, 'policies[]', $policies, '', 'All', 0, true, true) + html_print_select( + $fields, + 'policies', + $policies, + 'this.form.submit()', + __('All'), + 0, + true, + false, + true, + 'w100p', + false, + 'width: 100%' + ) ); $custom_fields = db_get_all_fields_in_table('tagent_custom_fields'); @@ -438,7 +449,7 @@ if ($custom_fields === false) { $custom_fields = []; } -$div_custom_fields = '
'; +$div_custom_fields = '
'; foreach ($custom_fields as $custom_field) { $custom_field_value = ''; if (empty($ag_custom_fields) === false) { @@ -448,10 +459,10 @@ foreach ($custom_fields as $custom_field) { } } - $div_custom_fields .= '
'; + $div_custom_fields .= '
'; $div_custom_fields .= '
'; - $div_custom_fields .= ''.$custom_field['name'].''; + $div_custom_fields .= ''.$custom_field['name'].''; $div_custom_fields .= '
'; $div_custom_fields .= '
'; @@ -890,7 +901,11 @@ if ($group_id > 0) { $groups = array_keys($user_groups); } -$all_policies = in_array(0, ($policies ?? [])); +if (is_array($policies)) { + $all_policies = in_array(0, ($policies ?? [])); +} else { + $all_policies = []; +} $id_os_sql = ''; $policies_sql = '';