Remove filter group for alert pandora_enterprise#12423

This commit is contained in:
daniel 2023-11-07 16:17:13 +01:00
parent 925e89e59b
commit c81b42cc95
2 changed files with 6 additions and 72 deletions

View File

@ -56,7 +56,7 @@ function validateAlert($ids)
}
function printFormFilterAlert($id_group, $filter, $free_search, $url, $filter_standby=false, $tag_filter=false, $action_filter=false, $return=false, $strict_user=false, $access='AR')
function printFormFilterAlert($filter, $free_search, $url, $filter_standby=false, $tag_filter=false, $action_filter=false, $return=false, $strict_user=false, $access='AR')
{
global $config;
include_once $config['homedir'].'/include/functions_tags.php';
@ -69,29 +69,6 @@ function printFormFilterAlert($id_group, $filter, $free_search, $url, $filter_st
$table->size[1] = '33%';
$table->size[2] = '33%';
$table->data = [];
$table->data[0][0] = html_print_label_input_block(
__('Group'),
html_print_select_groups(
$config['id_user'],
$access,
true,
'ag_group',
$id_group,
'',
'',
'',
true,
false,
false,
'',
false,
'',
false,
false,
'id_grupo',
$strict_user
)
);
$alert_status_filter = [];
$alert_status_filter['all_enabled'] = __('All (Enabled)');
@ -104,7 +81,7 @@ function printFormFilterAlert($id_group, $filter, $free_search, $url, $filter_st
$alert_standby['1'] = __('Standby on');
$alert_standby['0'] = __('Standby off');
$table->data[0][1] = html_print_label_input_block(
$table->data[0][0] = html_print_label_input_block(
__('Status'),
html_print_select(
$alert_status_filter,
@ -142,12 +119,12 @@ function printFormFilterAlert($id_group, $filter, $free_search, $url, $filter_st
);
}
$table->data[0][2] = html_print_label_input_block(
$table->data[0][1] = html_print_label_input_block(
__('Tags').ui_print_help_tip(__('Only it is show tags in use.'), true),
$callbackTag
);
$table->data[1][0] = html_print_label_input_block(
$table->data[0][2] = html_print_label_input_block(
__('Free text for search').ui_print_help_tip(
__('Filter by agent name, module name, template name or action name'),
true
@ -155,7 +132,7 @@ function printFormFilterAlert($id_group, $filter, $free_search, $url, $filter_st
html_print_input_text('free_search', $free_search, '', 20, 40, true)
);
$table->data[1][1] = html_print_label_input_block(
$table->data[1][0] = html_print_label_input_block(
__('Standby'),
html_print_select(
$alert_standby,
@ -174,7 +151,7 @@ function printFormFilterAlert($id_group, $filter, $free_search, $url, $filter_st
);
$alert_action = alerts_get_alert_actions_filter();
$table->data[1][2] = html_print_label_input_block(
$table->data[1][1] = html_print_label_input_block(
__('Action'),
html_print_select(
$alert_action,
@ -200,45 +177,3 @@ function printFormFilterAlert($id_group, $filter, $free_search, $url, $filter_st
echo $data;
}
}
function printFormFilterAlertAgent($agent_view_page, $free_search, $id_agent, $return=false)
{
$table_filter = new stdClass();
$table_filter->width = '100%';
if ($agent_view_page === true) {
$table_filter->class = 'info_table';
$table_filter->styleTable = 'border-radius: 0;padding: 0;margin: 0;';
$free_search_name = 'free_search_alert';
} else {
$table_filter->class = 'databox filters';
$free_search_name = 'free_search';
}
$table_filter->style = [];
$table_filter->style[0] = 'font-weight: bold';
$table_filter->data = [];
$table_filter->data[0][0] = __('Free text for search (*):').ui_print_help_tip(
__('Filter by module name, template name or action name'),
true
);
$table_filter->data[0][0] .= '<span class="mrgn_lft_10px">'.html_print_input_text(
$free_search_name,
$free_search,
'',
20,
100,
true
).'</span>';
$form = html_print_table($table_filter, true);
if ($return === true) {
return $form;
} else {
echo $form;
}
}

View File

@ -430,7 +430,6 @@ if ($agent_view_page === true) {
'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar',
'form' => [
'html' => printFormFilterAlert(
$id_group,
$disabled,
$free_search,
$url,