diff --git a/pandora_console/godmode/alerts/alert_actions.php b/pandora_console/godmode/alerts/alert_actions.php index 05525323e8..7879b36fb9 100644 --- a/pandora_console/godmode/alerts/alert_actions.php +++ b/pandora_console/godmode/alerts/alert_actions.php @@ -230,11 +230,11 @@ $url = 'index.php?sec='.$sec.'&sec2=godmode/alerts/alert_actions&search_string=' // Filter table. $table_filter = new stdClass(); $table_filter->width = '100%'; -$table_filter->class = 'databox filters'; +$table_filter->class = 'databox filters filter-table-adv'; $table_filter->style = []; -$table_filter->style[0] = 'font-weight: bold'; -$table_filter->style[2] = 'font-weight: bold'; -$table_filter->style[4] = 'font-weight: bold'; +$table_filter->style[0] = 'width: 33%'; +$table_filter->style[2] = 'width: 33%'; +$table_filter->style[4] = 'width: 33%'; $table_filter->data = []; $table_filter->data[0][0] = __('Search'); @@ -246,6 +246,17 @@ $table_filter->data[0][1] = html_print_input_text( 255, true ); +$table_filter->data[0][0] = html_print_label_input_block( + __('Search'), + html_print_input_text( + 'search_string', + $search_string, + '', + 25, + 255, + true + ) +); $return_all_group = false; @@ -464,8 +475,9 @@ if (isset($data)) { if (is_management_allowed() === true) { echo '
'; } diff --git a/pandora_console/godmode/alerts/alert_list.builder.php b/pandora_console/godmode/alerts/alert_list.builder.php index bf55c5619b..74120d36c8 100644 --- a/pandora_console/godmode/alerts/alert_list.builder.php +++ b/pandora_console/godmode/alerts/alert_list.builder.php @@ -32,29 +32,16 @@ $pure = get_parameter('pure', 0); $table = new stdClass(); $table->id = 'add_alert_table'; -$table->class = 'databox filters'; +$table->class = 'databox filters filter-table-adv'; $table->width = '100%'; $table->head = []; $table->data = []; $table->size = []; -$table->size = []; -$table->style[0] = 'font-weight: bold;'; -$table->style[1] = 'font-weight: bold;display: flex;align-items: baseline;'; -$table->style[2] = 'font-weight: bold;'; -$table->style[3] = 'font-weight: bold;'; - -// This is because if this view is reused after list alert view then -// styles in the previous view can affect this table. -$table->rowstyle[0] = ''; -$table->rowstyle[1] = ''; -$table->rowstyle[2] = ''; -$table->rowstyle[3] = ''; - +$table->style[0] = 'width: 50%'; +$table->style[1] = 'width: 50%'; // Add an agent selector if (! $id_agente) { - $table->data['agent'][0] = __('Agent'); - $params = []; $params['return'] = true; $params['show_helptip'] = true; @@ -64,36 +51,37 @@ if (! $id_agente) { $params['metaconsole_enabled'] = false; $params['use_hidden_input_idagent'] = true; $params['print_hidden_input_idagent'] = true; - $table->data['agent'][1] = ui_print_agent_autocomplete_input($params); + $table->data[0][0] = html_print_label_input_block( + __('Agent'), + ui_print_agent_autocomplete_input($params) + ); } -$table->data[0][0] = __('Module'); $modules = []; if ($id_agente) { $modules = agents_get_modules($id_agente, false, ['delete_pending' => 0]); } -$table->data[0][1] = html_print_select( - $modules, - 'id_agent_module', - 0, - true, - __('Select'), - 0, - true, - false, - true, - '', - ($id_agente == 0), - 'min-width: 250px;margin-right: 0.5em;' +$table->data[0][1] = html_print_label_input_block( + __('Module'), + html_print_select( + $modules, + 'id_agent_module', + 0, + true, + __('Select'), + 0, + true, + false, + true, + 'w100p', + ($id_agente == 0), + 'width: 100%;' + ).''.__('Latest value').': + + '.html_print_image('images/spinner.gif', true).'' ); -$table->data[0][1] .= ' '.__('Latest value').': '; -$table->data[0][1] .= ' '; -$table->data[0][1] .= ' '; -$table->data[0][1] .= html_print_image('images/spinner.gif', true).''; - -$table->data[1][0] = __('Actions'); $groups_user = users_get_groups($config['id_user']); if (!empty($groups_user)) { @@ -109,40 +97,36 @@ if (!empty($groups_user)) { $actions = db_get_all_rows_sql($sql); } -$table->data[1][1] = html_print_select( - index_array($actions, 'id', 'name'), - 'action_select', - '', - '', - __('Default action'), - '0', - true, - false, - true, - '', - false, - 'width: 250px;' -); -$table->data[1][1] .= '