10454-Events
This commit is contained in:
parent
6f16c45285
commit
e024658520
|
@ -127,19 +127,21 @@ foreach ($fields_available as $key => $available) {
|
|||
$table->data[0][0] = '<b>'.__('Fields available').'</b>';
|
||||
$table->data[1][0] = html_print_select($fields_available, 'fields_available[]', true, '', '', 0, true, true, false, '', false, 'width: 300px');
|
||||
$table->data[1][1] = '<a href="javascript:">'.html_print_image(
|
||||
'images/darrowright_green.png',
|
||||
'images/arrow@svg.svg',
|
||||
true,
|
||||
[
|
||||
'id' => 'right',
|
||||
'title' => __('Add fields to select'),
|
||||
'style' => 'rotate: 180deg; width: 40px',
|
||||
]
|
||||
).'</a>';
|
||||
$table->data[1][1] .= '<br><br><br><br><a href="javascript:">'.html_print_image(
|
||||
'images/darrowleft_green.png',
|
||||
'images/arrow@svg.svg',
|
||||
true,
|
||||
[
|
||||
'id' => 'left',
|
||||
'title' => __('Delete fields to select'),
|
||||
'style' => 'width: 40px',
|
||||
]
|
||||
).'</a>';
|
||||
|
||||
|
|
|
@ -262,12 +262,17 @@ if ($create) {
|
|||
$own_info = get_user_info($config['id_user']);
|
||||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->width = '1366px';
|
||||
// $table->width = '100%';
|
||||
$table->border = 0;
|
||||
$table->cellspacing = 0;
|
||||
$table->cellpadding = 0;
|
||||
$table->class = 'databox filters';
|
||||
$table->size[0] = '50%';
|
||||
$table->size[1] = '50%';
|
||||
$table->class = 'databox filters events-filters-create';
|
||||
$table->style[0] = 'vertical-align: top;';
|
||||
$table->rowspan = [];
|
||||
$table->rowspan[3][0] = 2;
|
||||
|
||||
$table->valign[1] = 'top';
|
||||
|
||||
|
@ -285,10 +290,22 @@ if (is_metaconsole()) {
|
|||
}
|
||||
|
||||
$table->data = [];
|
||||
$table->data[0][0] = '<b>'.__('Filter name').'</b>';
|
||||
$table->data[0][1] = html_print_input_text('id_name', $id_name, false, 20, 80, true);
|
||||
|
||||
$table->data[1][0] = '<b>'.__('Save in group').'</b>'.ui_print_help_tip(__('This group will be use to restrict the visibility of this filter with ACLs'), true);
|
||||
$table->data[0][0] = html_print_label_input_block(
|
||||
__('Filter name'),
|
||||
html_print_input_text(
|
||||
'id_name',
|
||||
$id_name,
|
||||
false,
|
||||
20,
|
||||
80,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
'w100p'
|
||||
)
|
||||
);
|
||||
|
||||
$returnAllGroup = users_can_manage_group_all();
|
||||
// If the user can't manage All group but the filter is for All group, the user should see All group in the select.
|
||||
|
@ -296,115 +313,135 @@ if ($returnAllGroup === false && $id_group_filter == 0) {
|
|||
$returnAllGroup = true;
|
||||
}
|
||||
|
||||
$table->data[1][1] = '<div class="w250px">'.html_print_select_groups(
|
||||
$config['id_user'],
|
||||
$access,
|
||||
$returnAllGroup,
|
||||
'id_group_filter',
|
||||
$id_group_filter,
|
||||
'',
|
||||
'',
|
||||
-1,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
false,
|
||||
'id_grupo',
|
||||
$strict_user
|
||||
).'</div>';
|
||||
|
||||
$table->data[0][1] = html_print_label_input_block(
|
||||
__('Save in group').ui_print_help_tip(__('This group will be use to restrict the visibility of this filter with ACLs'), true),
|
||||
'<div class="w100p">'.html_print_select_groups(
|
||||
$config['id_user'],
|
||||
$access,
|
||||
$returnAllGroup,
|
||||
'id_group_filter',
|
||||
$id_group_filter,
|
||||
'',
|
||||
'',
|
||||
-1,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
false,
|
||||
'id_grupo',
|
||||
$strict_user
|
||||
).'</div>'
|
||||
);
|
||||
$return_all_group = false;
|
||||
|
||||
if (users_can_manage_group_all('AR') === true) {
|
||||
$return_all_group = true;
|
||||
}
|
||||
|
||||
$table->data[2][0] = '<b>'.__('Group').'</b>';
|
||||
$display_all_group = (users_is_admin() || users_can_manage_group_all('AR'));
|
||||
$table->data[2][1] = '<div class="w250px">'.html_print_select_groups(
|
||||
$config['id_user'],
|
||||
'AR',
|
||||
$return_all_group,
|
||||
'id_group',
|
||||
$id_group,
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true
|
||||
).'</div>';
|
||||
$table->data[2][0] = html_print_label_input_block(
|
||||
__('Group'),
|
||||
'<div class="w100p">'.html_print_select_groups(
|
||||
$config['id_user'],
|
||||
'AR',
|
||||
$return_all_group,
|
||||
'id_group',
|
||||
$id_group,
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true
|
||||
).'</div>'
|
||||
);
|
||||
|
||||
$types = get_event_types();
|
||||
// Expand standard array to add not_normal (not exist in the array, used only for searches)
|
||||
$types['not_normal'] = __('Not normal');
|
||||
|
||||
$table->data[3][0] = '<b>'.__('Event type').'</b>';
|
||||
$table->data[3][1] = html_print_select(
|
||||
$types,
|
||||
'event_type',
|
||||
$event_type,
|
||||
'',
|
||||
__('All'),
|
||||
'',
|
||||
true
|
||||
$table->data[2][1] = html_print_label_input_block(
|
||||
__('Event type'),
|
||||
'<div class="w100p">'.html_print_select(
|
||||
$types,
|
||||
'event_type',
|
||||
$event_type,
|
||||
'',
|
||||
__('All'),
|
||||
'',
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'w100p'
|
||||
).'</div>'
|
||||
);
|
||||
|
||||
if (empty($severity) && $severity !== '0') {
|
||||
$severity = -1;
|
||||
}
|
||||
|
||||
$table->data[4][0] = '<b>'.__('Severity').'</b>';
|
||||
$table->data[4][1] = html_print_select(
|
||||
get_priorities(),
|
||||
'severity[]',
|
||||
$severity,
|
||||
'',
|
||||
__('All'),
|
||||
-1,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'width: 175px'
|
||||
$table->data[3][0] = html_print_label_input_block(
|
||||
__('Severity'),
|
||||
html_print_select(
|
||||
get_priorities(),
|
||||
'severity[]',
|
||||
$severity,
|
||||
'',
|
||||
__('All'),
|
||||
-1,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'width: 100%'
|
||||
)
|
||||
);
|
||||
|
||||
$fields = events_get_all_status();
|
||||
|
||||
$table->data[5][0] = '<b>'.__('Event status').'</b>';
|
||||
$table->data[5][1] = html_print_select(
|
||||
$fields,
|
||||
'status',
|
||||
$status,
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true
|
||||
$table->data[3][1] = html_print_label_input_block(
|
||||
__('Event status'),
|
||||
html_print_select(
|
||||
$fields,
|
||||
'status',
|
||||
$status,
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'width: 100%'
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[6][0] = '<b>'.__('Free search').'</b>';
|
||||
$table->data[6][1] = html_print_input_text(
|
||||
'search',
|
||||
$search,
|
||||
'',
|
||||
15,
|
||||
255,
|
||||
true
|
||||
);
|
||||
$table->data[6][1] .= ' '.html_print_checkbox_switch(
|
||||
'not_search',
|
||||
$not_search,
|
||||
$not_search,
|
||||
true,
|
||||
false,
|
||||
'checked_slide_events(this);',
|
||||
true
|
||||
$table->data[4][1] = html_print_label_input_block(
|
||||
__('Free search'),
|
||||
'<div class="flex_center">'.html_print_input_text(
|
||||
'search',
|
||||
$search,
|
||||
'',
|
||||
15,
|
||||
255,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
'w96p mrgn_right_15px'
|
||||
).' '.html_print_checkbox_switch(
|
||||
'not_search',
|
||||
$not_search,
|
||||
$not_search,
|
||||
true,
|
||||
false,
|
||||
'checked_slide_events(this);',
|
||||
true
|
||||
).'</div>'
|
||||
);
|
||||
|
||||
$table->data[7][0] = '<b>'.__('Agent search').'</b>';
|
||||
$params = [];
|
||||
$params['show_helptip'] = true;
|
||||
$params['input_name'] = 'text_agent';
|
||||
|
@ -419,39 +456,48 @@ if (is_metaconsole()) {
|
|||
$params['hidden_input_idagent_value'] = $id_agent;
|
||||
}
|
||||
|
||||
$table->data[7][1] = ui_print_agent_autocomplete_input($params);
|
||||
$table->data[5][0] = html_print_label_input_block(
|
||||
__('Agent search'),
|
||||
'<div class="w100p">'.ui_print_agent_autocomplete_input($params).'</div>'
|
||||
);
|
||||
|
||||
$lpagination[25] = 25;
|
||||
$lpagination[50] = 50;
|
||||
$lpagination[100] = 100;
|
||||
$lpagination[200] = 200;
|
||||
$lpagination[500] = 500;
|
||||
$table->data[8][0] = '<b>'.__('Block size for pagination').'</b>';
|
||||
$table->data[8][1] = html_print_select(
|
||||
$lpagination,
|
||||
'pagination',
|
||||
$pagination,
|
||||
'',
|
||||
__('Default'),
|
||||
$config['block_size'],
|
||||
true
|
||||
$table->data[5][1] = html_print_label_input_block(
|
||||
__('Block size for pagination'),
|
||||
'<div class="w100p">'.html_print_select(
|
||||
$lpagination,
|
||||
'pagination',
|
||||
$pagination,
|
||||
'',
|
||||
__('Default'),
|
||||
$config['block_size'],
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'width: 100%'
|
||||
).'</div>'
|
||||
);
|
||||
|
||||
$table->data[9][0] = '<b>'.__('Max. hours old').'</b>';
|
||||
$table->data[9][1] = html_print_input_text(
|
||||
'event_view_hr',
|
||||
$event_view_hr,
|
||||
'',
|
||||
5,
|
||||
255,
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[10][0] = '<b>'.__('User ack.').'</b>';
|
||||
$table->data[10][0] .= ' ';
|
||||
$table->data[10][0] .= ui_print_help_tip(
|
||||
__('Choose between the users who have validated an event. '),
|
||||
true
|
||||
$table->data[6][0] = html_print_label_input_block(
|
||||
__('Max. hours old'),
|
||||
'<div class="w100p">'.html_print_input_text(
|
||||
'event_view_hr',
|
||||
$event_view_hr,
|
||||
'',
|
||||
5,
|
||||
255,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
'w100p'
|
||||
).'</div>'
|
||||
);
|
||||
|
||||
if ($strict_user) {
|
||||
|
@ -464,49 +510,96 @@ if ($strict_user) {
|
|||
);
|
||||
}
|
||||
|
||||
$table->data[10][1] = html_print_select(
|
||||
$users,
|
||||
'id_user_ack',
|
||||
$id_user_ack,
|
||||
'',
|
||||
__('Any'),
|
||||
0,
|
||||
true
|
||||
$table->data[6][1] = html_print_label_input_block(
|
||||
__('User ack.').' '.ui_print_help_tip(
|
||||
__('Choose between the users who have validated an event. '),
|
||||
true
|
||||
),
|
||||
'<div class="w100p">'.html_print_select(
|
||||
$users,
|
||||
'id_user_ack',
|
||||
$id_user_ack,
|
||||
'',
|
||||
__('Any'),
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'w100p'
|
||||
).'</div>'
|
||||
);
|
||||
|
||||
$table->data[11][0] = '<b>'.__('Owner.').'</b>';
|
||||
$table->data[11][1] = html_print_select(
|
||||
$users,
|
||||
'owner_user',
|
||||
$owner_user,
|
||||
'',
|
||||
__('Any'),
|
||||
0,
|
||||
true
|
||||
$table->data[7][0] = html_print_label_input_block(
|
||||
__('Owner.'),
|
||||
'<div class="w100p">'.html_print_select(
|
||||
$users,
|
||||
'owner_user',
|
||||
$owner_user,
|
||||
'',
|
||||
__('Any'),
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'w100p'
|
||||
).'</div>'
|
||||
);
|
||||
|
||||
$repeated_sel = [
|
||||
EVENT_GROUP_REP_ALL => __('All events'),
|
||||
EVENT_GROUP_REP_EVENTS => __('Group events'),
|
||||
EVENT_GROUP_REP_AGENTS => __('Group agents'),
|
||||
EVENT_GROUP_REP_EXTRAIDS => __('Group extra id'),
|
||||
];
|
||||
$table->data[12][0] = '<b>'.__('Repeated').'</b>';
|
||||
$table->data[12][1] = html_print_select(
|
||||
$repeated_sel,
|
||||
'group_rep',
|
||||
$group_rep,
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true
|
||||
|
||||
$table->data[7][1] = html_print_label_input_block(
|
||||
__('Repeated'),
|
||||
'<div class="w100p">'.html_print_select(
|
||||
$repeated_sel,
|
||||
'group_rep',
|
||||
$group_rep,
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'w100p'
|
||||
).'</div>'
|
||||
);
|
||||
|
||||
$table->data[13][0] = '<b>'.__('Date from').'</b>';
|
||||
$table->data[13][1] = html_print_input_text('date_from', $date_from, '', 15, 10, true);
|
||||
$date_from = html_print_label_input_block(
|
||||
__('Date from'),
|
||||
'<div class="w100p">'.html_print_input_text(
|
||||
'date_to',
|
||||
$date_to,
|
||||
'',
|
||||
15,
|
||||
10,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
'w100p'
|
||||
).'</div>'
|
||||
);
|
||||
|
||||
$table->data[14][0] = '<b>'.__('Date to').'</b>';
|
||||
$table->data[14][1] = html_print_input_text('date_to', $date_to, '', 15, 10, true);
|
||||
$date_to = html_print_label_input_block(
|
||||
__('Date from'),
|
||||
'<div class="w100p">'.html_print_input_text(
|
||||
'date_to',
|
||||
$date_to,
|
||||
'',
|
||||
15,
|
||||
10,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
'w100p'
|
||||
).'</div>'
|
||||
);
|
||||
|
||||
$table->data[8][0] = '<div class="flex-row">'.$date_from.$date_to.'</div>';
|
||||
|
||||
$tag_with = json_decode($tag_with_json_clean, true);
|
||||
if (empty($tag_with)) {
|
||||
|
@ -545,176 +638,272 @@ $remove_with_tag_disabled = empty($tag_with_temp);
|
|||
$add_without_tag_disabled = empty($tags_select_without);
|
||||
$remove_without_tag_disabled = empty($tag_without_temp);
|
||||
|
||||
$table->colspan[15][0] = '2';
|
||||
$table->data[15][0] = '<b>'.__('Events with following tags').'</b>';
|
||||
$table->data[16][0] = html_print_select(
|
||||
$tags_select_with,
|
||||
'select_with',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'width: 220px;'
|
||||
);
|
||||
$table->data[16][1] = html_print_button(
|
||||
__('Add'),
|
||||
'add_whith',
|
||||
$add_with_tag_disabled,
|
||||
'',
|
||||
'class="add sub"',
|
||||
true
|
||||
$table->data[8][0] = html_print_label_input_block(
|
||||
__('Events with following tags'),
|
||||
'<div class="w100p">'.html_print_select(
|
||||
$tags_select_with,
|
||||
'select_with',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'w100p'
|
||||
).'</div>'
|
||||
);
|
||||
|
||||
$table->data[17][0] = html_print_select(
|
||||
$tag_with_temp,
|
||||
'tag_with_temp',
|
||||
[],
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'width: 220px; height: 50px;'
|
||||
$table->data[8][1] = html_print_label_input_block(
|
||||
' ',
|
||||
'<div class="w100p">'.html_print_button(
|
||||
__('Add'),
|
||||
'add_whith',
|
||||
$add_with_tag_disabled,
|
||||
'',
|
||||
['class' => 'submitButton mini'],
|
||||
true
|
||||
).'</div>'
|
||||
);
|
||||
$table->data[17][0] .= html_print_input_hidden(
|
||||
|
||||
$table->data[9][0] = html_print_label_input_block(
|
||||
'',
|
||||
'<div class="w100p no-margin-top">'.html_print_select(
|
||||
$tag_with_temp,
|
||||
'tag_with_temp',
|
||||
[],
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'width: 100%; height: 50px;'
|
||||
).'</div>'
|
||||
).html_print_input_hidden(
|
||||
'tag_with',
|
||||
$tag_with_base64,
|
||||
true
|
||||
);
|
||||
$table->data[17][1] = html_print_button(
|
||||
__('Remove'),
|
||||
'remove_whith',
|
||||
$remove_with_tag_disabled,
|
||||
'',
|
||||
'class="delete sub"',
|
||||
true
|
||||
|
||||
$table->data[9][1] = html_print_label_input_block(
|
||||
' ',
|
||||
'<div class="w100p">'.html_print_button(
|
||||
__('Remove'),
|
||||
'remove_whith',
|
||||
false,
|
||||
'',
|
||||
[
|
||||
'mode' => 'link',
|
||||
'class' => 'submitButton',
|
||||
],
|
||||
true
|
||||
).'</div>'
|
||||
);
|
||||
|
||||
$table->colspan[18][0] = '2';
|
||||
$table->data[18][0] = '<b>'.__('Events without following tags').'</b>';
|
||||
$table->data[19][0] = html_print_select(
|
||||
$tags_select_without,
|
||||
'select_without',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'width: 220px;'
|
||||
);
|
||||
$table->data[19][1] = html_print_button(
|
||||
__('Add'),
|
||||
'add_whithout',
|
||||
$add_without_tag_disabled,
|
||||
'',
|
||||
'class="add sub"',
|
||||
true
|
||||
$table->data[10][0] = html_print_label_input_block(
|
||||
__('Events without following tags'),
|
||||
'<div class="w100p">'.html_print_select(
|
||||
$tags_select_without,
|
||||
'select_without',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'w100p'
|
||||
).'</div>'
|
||||
);
|
||||
|
||||
$table->data[20][0] = html_print_select(
|
||||
$tag_without_temp,
|
||||
'tag_without_temp',
|
||||
[],
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'width: 220px; height: 50px;'
|
||||
$table->data[10][1] = html_print_label_input_block(
|
||||
' ',
|
||||
'<div class="w100p">'.html_print_button(
|
||||
__('Add'),
|
||||
'add_whithout',
|
||||
$add_without_tag_disabled,
|
||||
'',
|
||||
['class' => 'submitButton mini'],
|
||||
true
|
||||
).'</div>'
|
||||
);
|
||||
$table->data[20][0] .= html_print_input_hidden(
|
||||
|
||||
$table->data[11][0] = html_print_label_input_block(
|
||||
'',
|
||||
'<div class="w100p no-margin-top">'.html_print_select(
|
||||
$tag_without_temp,
|
||||
'tag_without_temp',
|
||||
[],
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'width: 100%; height: 50px;'
|
||||
).'</div>'
|
||||
).html_print_input_hidden(
|
||||
'tag_without',
|
||||
$tag_without_base64,
|
||||
true
|
||||
);
|
||||
$table->data[20][1] = html_print_button(
|
||||
__('Remove'),
|
||||
'remove_whithout',
|
||||
$remove_without_tag_disabled,
|
||||
'',
|
||||
'class="delete sub"',
|
||||
true
|
||||
|
||||
$table->data[11][1] = html_print_label_input_block(
|
||||
' ',
|
||||
'<div class="w100p">'.html_print_button(
|
||||
__('Remove'),
|
||||
'remove_whithout',
|
||||
false,
|
||||
'',
|
||||
[
|
||||
'mode' => 'link',
|
||||
'class' => 'submitButton',
|
||||
],
|
||||
true
|
||||
).'</div>'
|
||||
);
|
||||
|
||||
$table->data[21][0] = '<b>'.__('Alert events').'</b>';
|
||||
$table->data[21][1] = html_print_select(
|
||||
[
|
||||
'-1' => __('All'),
|
||||
'0' => __('Filter alert events'),
|
||||
'1' => __('Only alert events'),
|
||||
],
|
||||
'filter_only_alert',
|
||||
$filter_only_alert,
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true
|
||||
$table->data[12][0] = html_print_label_input_block(
|
||||
__('Alert events'),
|
||||
'<div class="w100p">'.html_print_select(
|
||||
[
|
||||
'-1' => __('All'),
|
||||
'0' => __('Filter alert events'),
|
||||
'1' => __('Only alert events'),
|
||||
],
|
||||
'filter_only_alert',
|
||||
$filter_only_alert,
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'w100p'
|
||||
).'</div>'
|
||||
);
|
||||
|
||||
if (!is_metaconsole()) {
|
||||
$table->data[22][0] = '<b>'.__('Module search').'</b>';
|
||||
$table->data[22][1] .= html_print_autocomplete_modules(
|
||||
'module_search',
|
||||
$text_module,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
[],
|
||||
true,
|
||||
$id_agent_module
|
||||
$table->data[12][1] = html_print_label_input_block(
|
||||
__('Module search'),
|
||||
'<div class="w100p">'.html_print_autocomplete_modules(
|
||||
'module_search',
|
||||
$text_module,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
[],
|
||||
true,
|
||||
$id_agent_module
|
||||
).'</div>'
|
||||
);
|
||||
} else {
|
||||
$table->data[12][1] = '';
|
||||
}
|
||||
|
||||
$table->data[23][0] = '<b>'.__('Source').'</b>';
|
||||
$table->data[23][1] = html_print_input_text('source', $source, '', 35, 255, true);
|
||||
|
||||
$table->data[24][0] = '<b>'.__('Extra ID').'</b>';
|
||||
$table->data[24][1] = html_print_input_text('id_extra', $id_extra, '', 11, 255, true);
|
||||
|
||||
$table->data[25][0] = '<b>'.__('Comment').'</b>';
|
||||
$table->data[25][1] = html_print_input_text('user_comment', $user_comment, '', 35, 255, true);
|
||||
|
||||
$table->data[26][0] = '<b>'.__('Custom data filter type').'</b>';
|
||||
$table->data[26][1] = html_print_select(
|
||||
[
|
||||
'0' => __('Filter custom data by name field'),
|
||||
'1' => __('Filter custom data by value field'),
|
||||
],
|
||||
'custom_data_filter_type',
|
||||
$custom_data_filter_type,
|
||||
'',
|
||||
false,
|
||||
'',
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[27][0] = '<b>'.__('Custom data').'</b>';
|
||||
$table->data[27][1] = html_print_input_text('custom_data', $custom_data, '', 35, 255, true);
|
||||
|
||||
if (is_metaconsole()) {
|
||||
$table->data[28][0] = '<b>'.__('Id souce event').'</b>';
|
||||
$table->data[28][1] = html_print_input_text(
|
||||
'id_source_event',
|
||||
$id_source_event,
|
||||
$table->data[13][0] = html_print_label_input_block(
|
||||
__('Source'),
|
||||
'<div class="w100p">'.html_print_input_text(
|
||||
'source',
|
||||
$source,
|
||||
'',
|
||||
35,
|
||||
255,
|
||||
true
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
'w100p'
|
||||
).'</div>'
|
||||
);
|
||||
|
||||
$table->data[13][1] = html_print_label_input_block(
|
||||
__('Extra ID'),
|
||||
'<div class="w100p">'.html_print_input_text(
|
||||
'id_extra',
|
||||
$id_extra,
|
||||
'',
|
||||
11,
|
||||
255,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
'w100p'
|
||||
).'</div>'
|
||||
);
|
||||
|
||||
$table->data[14][0] = html_print_label_input_block(
|
||||
__('Comment'),
|
||||
'<div class="w100p">'.html_print_input_text(
|
||||
'user_comment',
|
||||
$user_comment,
|
||||
'',
|
||||
35,
|
||||
255,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
'w100p'
|
||||
).'</div>'
|
||||
);
|
||||
|
||||
$table->data[14][1] = html_print_label_input_block(
|
||||
__('Custom data filter type'),
|
||||
'<div class="w100p">'.html_print_select(
|
||||
[
|
||||
'0' => __('Filter custom data by name field'),
|
||||
'1' => __('Filter custom data by value field'),
|
||||
],
|
||||
'custom_data_filter_type',
|
||||
$custom_data_filter_type,
|
||||
'',
|
||||
false,
|
||||
'',
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'w100p'
|
||||
).'</div>'
|
||||
);
|
||||
|
||||
$table->data[15][0] = html_print_label_input_block(
|
||||
__('Custom data'),
|
||||
'<div class="w100p">'.html_print_input_text(
|
||||
'custom_data',
|
||||
$custom_data,
|
||||
'',
|
||||
35,
|
||||
255,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
'w100p'
|
||||
).'</div>'
|
||||
);
|
||||
|
||||
if (is_metaconsole()) {
|
||||
$table->data[15][1] = html_print_label_input_block(
|
||||
__('Id souce event'),
|
||||
'<div class="w100p">'.html_print_input_text(
|
||||
'id_source_event',
|
||||
$id_source_event,
|
||||
'',
|
||||
35,
|
||||
255,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
'w100p'
|
||||
).'</div>'
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -750,20 +939,20 @@ if (is_metaconsole() === true) {
|
|||
}
|
||||
}
|
||||
|
||||
$table->data[29][0] = '<b>'.__('Server').'</b>';
|
||||
$table->data[29][1] = html_print_select(
|
||||
$servers,
|
||||
'server_id[]',
|
||||
$server_id,
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'height: 60px;'
|
||||
$table->data[16][0] = html_print_label_input_block(
|
||||
__('Server'),
|
||||
'<div class="w100p">'.html_print_select(
|
||||
$servers,
|
||||
'server_id[]',
|
||||
$server_id,
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
'w100p'
|
||||
).'</div>'
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -775,12 +964,14 @@ echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
|||
if ($id) {
|
||||
html_print_input_hidden('update', 1);
|
||||
html_print_input_hidden('id', $id);
|
||||
html_print_submit_button(__('Update'), 'crt', false, ['icon' => 'update']);
|
||||
$actionButtons = html_print_submit_button(__('Update'), 'crt', false, ['icon' => 'update'], true);
|
||||
} else {
|
||||
html_print_input_hidden('create', 1);
|
||||
html_print_submit_button(__('Create'), 'crt', false, ['icon' => 'wand']);
|
||||
$actionButtons = html_print_submit_button(__('Create'), 'crt', false, ['icon' => 'wand'], true);
|
||||
}
|
||||
|
||||
html_print_action_buttons($actionButtons, ['type' => 'form_action']);
|
||||
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
|
||||
|
|
|
@ -198,37 +198,57 @@ foreach ($filters as $filter) {
|
|||
array_push($table->data, $data);
|
||||
}
|
||||
|
||||
|
||||
if (isset($data)) {
|
||||
echo "<form method='post' action='index.php?sec=geventos&sec2=godmode/events/events&pure=".$config['pure']."'>";
|
||||
echo "<form id='form-delete-filters' method='post' action='index.php?sec=geventos&sec2=godmode/events/events&pure=".$config['pure']."'>";
|
||||
html_print_input_hidden('multiple_delete', 1);
|
||||
html_print_table($table);
|
||||
if (!is_metaconsole()) {
|
||||
echo "<div class='pdd_b_20px right'>";
|
||||
} else {
|
||||
if (is_metaconsole() === true) {
|
||||
echo "<div class='right'>";
|
||||
}
|
||||
|
||||
html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"');
|
||||
if (is_metaconsole() === true) {
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
echo '</form>';
|
||||
} else {
|
||||
ui_print_info_message(['no_close' => true, 'message' => __('There are no defined filters') ]);
|
||||
}
|
||||
|
||||
echo '<form method="post" action="index.php?sec=geventos&sec2=godmode/events/events§ion=edit_filter&pure='.$config['pure'].'">';
|
||||
html_print_div(
|
||||
|
||||
$submitButtons = '<form method="post" action="index.php?sec=geventos&sec2=godmode/events/events§ion=edit_filter&pure='.$config['pure'].'">';
|
||||
$submitButtons .= html_print_submit_button(
|
||||
__('Create filter'),
|
||||
'crt',
|
||||
false,
|
||||
[
|
||||
'class' => 'action-buttons',
|
||||
'content' => html_print_submit_button(
|
||||
__('Create filter'),
|
||||
'crt',
|
||||
false,
|
||||
[ 'icon' => 'wand' ],
|
||||
true
|
||||
),
|
||||
'icon' => 'wand',
|
||||
'class' => 'mrgn_lft_15px',
|
||||
],
|
||||
true
|
||||
);
|
||||
$submitButtons .= '</form>';
|
||||
|
||||
$submitButtons .= html_print_submit_button(
|
||||
__('Delete'),
|
||||
'delete_btn',
|
||||
false,
|
||||
[
|
||||
'icon' => 'delete',
|
||||
'class' => 'secondary',
|
||||
'id' => 'delete-event-filters',
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
html_print_action_buttons(
|
||||
$submitButtons,
|
||||
[
|
||||
'type' => 'form_action',
|
||||
'id' => 'list-events-filters',
|
||||
]
|
||||
);
|
||||
echo '</form>';
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
@ -247,14 +267,18 @@ echo '</form>';
|
|||
$('[id^=checkbox-all_delete]').change(function(){
|
||||
if ($("#checkbox-all_delete").prop("checked")) {
|
||||
$('[id^=checkbox-delete_multiple]').parent().parent().addClass('checkselected');
|
||||
$(".check_delete").prop("checked", true);
|
||||
$("[id^=checkbox-delete_multiple]").prop("checked", true);
|
||||
}
|
||||
else{
|
||||
$('[id^=checkbox-delete_multiple]').parent().parent().removeClass('checkselected');
|
||||
$(".check_delete").prop("checked", false);
|
||||
$("[id^=checkbox-delete_multiple]").prop("checked", false);
|
||||
}
|
||||
});
|
||||
|
||||
$('#button-delete_btn').click(function (e) {
|
||||
$('#form-delete-filters').submit();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
|
@ -571,7 +571,7 @@ if ($load_filter_modal) {
|
|||
$table->cellpadding = 4;
|
||||
$table->styleTable = 'font-weight: bold; color: #555; text-align:left; border: 0px !important;';
|
||||
$table->class = 'databox';
|
||||
$filter_id_width = '200px';
|
||||
$filter_id_width = '300px';
|
||||
if (is_metaconsole() === true) {
|
||||
$table->cellspacing = 0;
|
||||
$table->cellpadding = 0;
|
||||
|
@ -596,32 +596,39 @@ if ($load_filter_modal) {
|
|||
false,
|
||||
'margin-left:5px; width:'.$filter_id_width.';'
|
||||
);
|
||||
$data[1] = html_print_submit_button(
|
||||
__('Load filter'),
|
||||
'load_filter',
|
||||
false,
|
||||
[
|
||||
'icon' => 'update',
|
||||
'mode' => 'secondary mini',
|
||||
],
|
||||
true
|
||||
);
|
||||
$data[1] .= html_print_input_hidden('load_filter', 1, true);
|
||||
|
||||
$table->data[] = $data;
|
||||
$table->rowclass[] = '';
|
||||
|
||||
html_print_table($table);
|
||||
|
||||
html_print_div(
|
||||
[
|
||||
'class' => 'action-buttons',
|
||||
'content' => html_print_submit_button(
|
||||
__('Load filter'),
|
||||
'load_filter',
|
||||
false,
|
||||
[
|
||||
'icon' => 'update',
|
||||
'mode' => 'secondary mini',
|
||||
],
|
||||
true
|
||||
).html_print_input_hidden('load_filter', 1, true),
|
||||
]
|
||||
);
|
||||
echo '</form>';
|
||||
echo '</div>';
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
function show_filter() {
|
||||
$("#load-filter-select").dialog({
|
||||
title: 'Load filter',
|
||||
resizable: true,
|
||||
draggable: true,
|
||||
modal: false,
|
||||
closeOnEscape: true,
|
||||
width: 550
|
||||
width: 340
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -764,24 +771,26 @@ if ($save_filter_modal) {
|
|||
$data[0] = html_print_radio_button(
|
||||
'filter_mode',
|
||||
'new',
|
||||
'',
|
||||
__('New filter'),
|
||||
true,
|
||||
true
|
||||
).__('New filter').'';
|
||||
);
|
||||
|
||||
$data[1] = html_print_radio_button(
|
||||
'filter_mode',
|
||||
'update',
|
||||
'',
|
||||
__('Update filter'),
|
||||
false,
|
||||
true
|
||||
).__('Update filter').'';
|
||||
);
|
||||
|
||||
$table->data[] = $data;
|
||||
$table->rowclass[] = '';
|
||||
|
||||
$data = [];
|
||||
$table->rowid[1] = 'save_filter_row1';
|
||||
$table->size[0] = '50%';
|
||||
$table->size[1] = '50%';
|
||||
$data[0] = '<b>'.__('Filter name').'</b>'.$jump;
|
||||
$data[0] .= html_print_input_text('id_name', '', '', 15, 255, true);
|
||||
if (is_metaconsole()) {
|
||||
|
@ -832,14 +841,10 @@ if ($save_filter_modal) {
|
|||
'',
|
||||
'',
|
||||
0,
|
||||
true
|
||||
);
|
||||
$data[1] = html_print_submit_button(
|
||||
__('Update filter'),
|
||||
'update_filter',
|
||||
true,
|
||||
false,
|
||||
'class="sub upd" onclick="save_update_filter();"',
|
||||
true
|
||||
true,
|
||||
'w130'
|
||||
);
|
||||
|
||||
$table->data[] = $data;
|
||||
|
@ -863,10 +868,28 @@ if ($save_filter_modal) {
|
|||
),
|
||||
]
|
||||
);
|
||||
|
||||
html_print_div(
|
||||
[
|
||||
'class' => 'action-buttons',
|
||||
'content' => html_print_submit_button(
|
||||
__('Update filter'),
|
||||
'update_filter',
|
||||
false,
|
||||
[
|
||||
'icon' => 'update',
|
||||
'mode' => 'secondary mini',
|
||||
'onClick' => 'save_update_filter();',
|
||||
],
|
||||
true
|
||||
),
|
||||
]
|
||||
);
|
||||
} else {
|
||||
include 'general/noaccess.php';
|
||||
}
|
||||
|
||||
$modal_title = __('Save/Update filters');
|
||||
echo '</div>';
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
|
@ -874,22 +897,26 @@ function show_save_filter() {
|
|||
$('#save_filter_row1').show();
|
||||
$('#save_filter_row2').show();
|
||||
$('#update_filter_row1').hide();
|
||||
$('#button-update_filter').hide();
|
||||
// Filter save mode selector
|
||||
$("[name='filter_mode']").click(function() {
|
||||
if ($(this).val() == 'new') {
|
||||
$('#save_filter_row1').show();
|
||||
$('#save_filter_row2').show();
|
||||
$('#submit-save_filter').show();
|
||||
$('#button-save_filter').show();
|
||||
$('#update_filter_row1').hide();
|
||||
$('#button-update_filter').hide();
|
||||
}
|
||||
else {
|
||||
$('#save_filter_row1').hide();
|
||||
$('#save_filter_row2').hide();
|
||||
$('#update_filter_row1').show();
|
||||
$('#submit-save_filter').hide();
|
||||
$('#button-update_filter').show();
|
||||
$('#button-save_filter').hide();
|
||||
}
|
||||
});
|
||||
$("#save-filter-select").dialog({
|
||||
title: '<?php echo $modal_title; ?>',
|
||||
resizable: true,
|
||||
draggable: true,
|
||||
modal: false,
|
||||
|
|
|
@ -171,9 +171,20 @@ fieldset {
|
|||
max-width: 10px;
|
||||
}
|
||||
|
||||
.fixed_filter_bar:has(div > div.filter-datatable-submain > form#events_form) {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.fixed_filter_bar > div.white_table_graph_header:has(div.filter_summary) {
|
||||
padding: 5px 20px;
|
||||
}
|
||||
|
||||
.filter_summary {
|
||||
margin-bottom: 3em;
|
||||
height: 3em;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
/* justify-content: space-around; */
|
||||
width: 100%;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.filter_summary div.label {
|
||||
|
@ -181,10 +192,10 @@ fieldset {
|
|||
color: #fff;
|
||||
font-weight: bolder;
|
||||
border-radius: 5px;
|
||||
padding: 0.5em;
|
||||
padding: 0.2em 0.5em;
|
||||
}
|
||||
.filter_summary div.content {
|
||||
padding: 0.5em;
|
||||
padding: 0.2em 0.5em;
|
||||
}
|
||||
|
||||
.filter_summary > div {
|
||||
|
@ -501,3 +512,13 @@ td:has(div#server_to_exec_label),
|
|||
td:has(div#server_to_exec_value) {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
table#save_filter_form,
|
||||
table#load_filter_form {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
td#save_filter_form-0-0 > input[type="radio"],
|
||||
td#save_filter_form-0-1 > input[type="radio"] {
|
||||
height: 14px;
|
||||
}
|
||||
|
|
|
@ -1382,3 +1382,40 @@ select[multiple] option:active {
|
|||
> .select2-results__option.select2-results__option--highlighted {
|
||||
background-color: #008d86;
|
||||
}
|
||||
|
||||
.filter_summary > div,
|
||||
.filter_summary > div > div.content {
|
||||
background-color: #222 !important;
|
||||
}
|
||||
|
||||
ul.datatable_filter:has(li > div.action-buttons) {
|
||||
background-color: #222 !important;
|
||||
}
|
||||
|
||||
span.ui-dialog-title {
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
span.select2-dropdown.select2-dropdown--below {
|
||||
z-index: 1200;
|
||||
}
|
||||
|
||||
div.fixed_filter_bar,
|
||||
div.white_table_graph_header {
|
||||
border-radius: 0;
|
||||
border-left: 0px;
|
||||
border-right: 0px;
|
||||
}
|
||||
|
||||
div.white_table_graph {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
div.white_box_opened[style*="height: 0px"],
|
||||
div.white_box_opened[style*="height:0"] {
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
div.white_box.white_box_opened.no_border {
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
|
|
@ -639,7 +639,8 @@ tr#update_save_selector {
|
|||
td#load_filter_form-0-0,
|
||||
td#load_filter_form-0-1,
|
||||
td#save_filter_form-1-0,
|
||||
td#save_filter_form-1-1 {
|
||||
td#save_filter_form-1-1,
|
||||
td#save_filter_form-3-0 {
|
||||
display: grid;
|
||||
}
|
||||
|
||||
|
@ -657,7 +658,8 @@ tr#save_filter_row1 {
|
|||
td#save_filter_form-0-0,
|
||||
td#save_filter_form-0-1,
|
||||
td#save_filter_form-1-0 > input#text-id_name,
|
||||
td#save_filter_form-1-1 > span {
|
||||
td#save_filter_form-1-1 > span,
|
||||
td#save_filter_form-3-0 > span {
|
||||
width: 300px !important;
|
||||
}
|
||||
|
||||
|
@ -671,3 +673,41 @@ div.filter-datatable-submain > form > ul > li > label {
|
|||
line-height: 16px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
table.events-filters-create > tbody > tr > td > div > label,
|
||||
table.events-filters-create > tbody > tr > td > div.flex-row > div > label {
|
||||
font-size: 13px;
|
||||
line-height: 16px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
table.events-filters-create > tbody > tr > td > div > input,
|
||||
table.events-filters-create > tbody > tr > td > div > div,
|
||||
table.events-filters-create > tbody > tr > td > div > select,
|
||||
table.events-filters-create > tbody > tr > td > div > span,
|
||||
table.events-filters-create > tbody > tr > td > div.flex-row > div > div {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
table.events-filters-create
|
||||
> tbody
|
||||
> tr
|
||||
> td
|
||||
> div
|
||||
> div
|
||||
> .ui-autocomplete-input {
|
||||
width: 94%;
|
||||
}
|
||||
|
||||
table.events-filters-create > tbody > tr > td > div.flex-row > div {
|
||||
width: 48%;
|
||||
}
|
||||
|
||||
td:has(div > .no-margin-top) {
|
||||
margin-top: 0px !important;
|
||||
padding-top: 0px !important;
|
||||
}
|
||||
|
||||
.no-margin-top {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
|
|
@ -2423,11 +2423,16 @@ try {
|
|||
$table_id = 'table_events';
|
||||
$form_id = 'events_form';
|
||||
|
||||
$show_hide_filters = '';
|
||||
if ((int) $_GET['pure'] === 1) {
|
||||
$show_hide_filters = 'invisible';
|
||||
}
|
||||
|
||||
// Print datatable.
|
||||
html_print_div(
|
||||
[
|
||||
'class' => 'events_table_wrapper',
|
||||
'style' => 'margin: 10px 10px 0;',
|
||||
'style' => 'margin-top: 0px; margin-bottom: 0px;',
|
||||
'content' => ui_print_datatable(
|
||||
[
|
||||
'id' => $table_id,
|
||||
|
@ -2481,7 +2486,7 @@ try {
|
|||
'drawCallback' => 'process_datatables_callback(this, settings)',
|
||||
'print' => false,
|
||||
'csv' => 0,
|
||||
'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar',
|
||||
'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar '.$show_hide_filters,
|
||||
],
|
||||
),
|
||||
]
|
||||
|
@ -3211,5 +3216,7 @@ $(document).ready(function () {
|
|||
let moduleLabel = $('#text-module_search').prev();
|
||||
let moduleTip = $('#text-module_search').next().next();
|
||||
moduleLabel.append(moduleTip);
|
||||
|
||||
$('.white_table_graph_header').first().append($('.filter_summary'));
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue