Merge branch 'ent-12423-error-en-vista-de-alertas-de-un-agente-visor' into 'develop'
Remove filter group for alert pandora_enterprise#12423 See merge request artica/pandorafms!6640
This commit is contained in:
commit
8c26dbe973
|
@ -56,8 +56,18 @@ 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(
|
||||
$id_group,
|
||||
$filter,
|
||||
$free_search,
|
||||
$alert_agent_view,
|
||||
$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 +79,32 @@ 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
|
||||
)
|
||||
);
|
||||
|
||||
if ($alert_agent_view === false) {
|
||||
$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)');
|
||||
|
@ -200,45 +213,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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -405,6 +405,12 @@ if ($agent_view_page === true) {
|
|||
]
|
||||
);
|
||||
} else {
|
||||
$tab = get_parameter('tab', 'main');
|
||||
$alert_agent_view = false;
|
||||
if ($tab == 'alert') {
|
||||
$alert_agent_view = true;
|
||||
}
|
||||
|
||||
ui_print_datatable(
|
||||
[
|
||||
'id' => 'alerts_status_datatable',
|
||||
|
@ -433,7 +439,7 @@ if ($agent_view_page === true) {
|
|||
$id_group,
|
||||
$disabled,
|
||||
$free_search,
|
||||
$url,
|
||||
$alert_agent_view,
|
||||
$filter_standby,
|
||||
$tag_filter,
|
||||
true,
|
||||
|
@ -441,7 +447,7 @@ if ($agent_view_page === true) {
|
|||
$strict_user
|
||||
),
|
||||
],
|
||||
'start_disabled' => true,
|
||||
'start_disabled' => !$alert_agent_view,
|
||||
]
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue