#11687 change ui bulk operations modules

This commit is contained in:
Jonathan 2023-07-06 11:53:52 +02:00
parent c28c5c35b4
commit 4ace3b205a
2 changed files with 411 additions and 365 deletions

View File

@ -86,19 +86,17 @@ if ($do_operation) {
$groups = users_get_groups(); $groups = users_get_groups();
$table = new stdClass(); $table = new stdClass();
$table->class = 'databox filters';
$table->width = '100%';
$table->data = [];
$table->style = [];
$table->style[0] = 'font-weight: bold;';
$table->style[2] = 'font-weight: bold';
$table->style[4] = 'font-weight: bold';
$table->style[6] = 'font-weight: bold';
// Source selection
$table->id = 'source_table'; $table->id = 'source_table';
$table->data[0][0] = __('Group'); $table->class = 'databox filters filter-table-adv';
$table->data[0][1] = html_print_select_groups( $table->width = '100%';
$table->size[0] = '50%';
$table->size[1] = '50%';
$table->data = [];
// Source selection.
$table->data[0][0] = html_print_label_input_block(
__('Group'),
html_print_select_groups(
false, false,
'AW', 'AW',
true, true,
@ -107,10 +105,20 @@ $table->data[0][1] = html_print_select_groups(
false, false,
'', '',
'', '',
true true,
false,
false,
'w100p',
false,
'width:100%'
)
); );
$table->data[0][2] = __('Group recursion');
$table->data[0][3] = html_print_checkbox('source_recursion', 1, $source_recursion, true, false); $table->data[0][1] = html_print_label_input_block(
__('Group recursion'),
html_print_checkbox('source_recursion', 1, $source_recursion, true, false)
);
$status_list = []; $status_list = [];
$status_list[AGENT_STATUS_NORMAL] = __('Normal'); $status_list[AGENT_STATUS_NORMAL] = __('Normal');
$status_list[AGENT_STATUS_WARNING] = __('Warning'); $status_list[AGENT_STATUS_WARNING] = __('Warning');
@ -118,37 +126,52 @@ $status_list[AGENT_STATUS_CRITICAL] = __('Critical');
$status_list[AGENT_STATUS_UNKNOWN] = __('Unknown'); $status_list[AGENT_STATUS_UNKNOWN] = __('Unknown');
$status_list[AGENT_STATUS_NOT_NORMAL] = __('Not normal'); $status_list[AGENT_STATUS_NOT_NORMAL] = __('Not normal');
$status_list[AGENT_STATUS_NOT_INIT] = __('Not init'); $status_list[AGENT_STATUS_NOT_INIT] = __('Not init');
$table->data[0][4] = __('Status');
$table->data[0][5] = html_print_select( $table->data[1][0] = html_print_label_input_block(
__('Status'),
html_print_select(
$status_list, $status_list,
'status_agents_source', 'status_agents_source',
'selected', 'selected',
'', '',
__('All'), __('All'),
AGENT_STATUS_ALL, AGENT_STATUS_ALL,
true true,
false,
true,
'w100p'
)
); );
$table->data[0][6] = __('Agent');
$table->data[0][6] .= ' <span id="source_agent_loading" class="invisible">';
$table->data[0][6] .= html_print_image('images/spinner.png', true);
$table->data[0][6] .= '</span>';
// $table->data[0][7] = html_print_select (agents_get_group_agents ($source_id_group, false, "none"),
// 'source_id_agent', $source_id_agent, false, __('Select'), 0, true);
$agents = ( $source_id_group ? agents_get_group_agents($source_id_group, false, 'none') : agents_get_group_agents(array_keys(users_get_groups($config['id_user'], 'AW', false))) ); $agents = ( $source_id_group ? agents_get_group_agents($source_id_group, false, 'none') : agents_get_group_agents(array_keys(users_get_groups($config['id_user'], 'AW', false))) );
$table->data[0][7] = html_print_select($agents, 'source_id_agent', $source_id_agent, false, __('Select'), 0, true); $table->data[1][1] = html_print_label_input_block(
__('Agent').' <span id="source_agent_loading" class="invisible">'.html_print_image('images/spinner.png', true).'</span>',
echo '<form '.'action="index.php?'.'sec=gmassive&'.'sec2=godmode/massive/massive_operations&'.'option=copy_modules" '.'id="manage_config_form" '.'method="post">'; html_print_select(
$agents,
'source_id_agent',
$source_id_agent,
false,
__('Select'),
0,
true
)
);
echo '<form action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=copy_modules" id="manage_config_form" method="post" class="max_floating_element_size">';
echo '<fieldset id="fieldset_source">'; echo '<fieldset id="fieldset_source">';
echo '<legend>'; echo '<legend><span>'.__('Source').'</span></legend>';
echo '<span>'.__('Source');
echo '</legend>';
html_print_table($table); html_print_table($table);
echo '</fieldset>'; echo '</fieldset>';
// Target selection
unset($table);
// Target selection.
$table = new stdClass();
$table->id = 'target_table'; $table->id = 'target_table';
$table->class = 'databox filters'; $table->class = 'databox filters filter-table-adv';
$table->width = '100%';
$table->size[0] = '50%';
$table->size[1] = '50%';
$table->data = []; $table->data = [];
$modules = []; $modules = [];
@ -169,8 +192,10 @@ foreach ($agent_alerts as $alert) {
} }
$tags = tags_get_user_tags(); $tags = tags_get_user_tags();
$table->data['tags'][0] = __('Tags'); $table->colspan[0][0] = 2;
$table->data['tags'][1] = html_print_select( $table->data[0][0] = html_print_label_input_block(
__('Tags'),
html_print_select(
$tags, $tags,
'tags[]', 'tags[]',
$tags_name, $tags_name,
@ -180,25 +205,23 @@ $table->data['tags'][1] = html_print_select(
true, true,
true, true,
true true
)
); );
$table->data['operations'][0] = __('Operations'); $table->data[1][0] = html_print_label_input_block(
$table->data['operations'][1] = '<span class="with_modules'.(empty($modules) ? ' invisible' : '').'">'; __('Operations'),
$table->data['operations'][1] .= html_print_checkbox('copy_modules', 1, true, true); '<span class="with_modules'.(empty($modules) ? ' invisible' : '').'">'.html_print_checkbox('copy_modules', 1, true, true).html_print_label(__('Copy modules'), 'checkbox-copy_modules', true).'</span><span class="with_alerts'.(empty($alerts) ? ' invisible' : '').'">'.html_print_checkbox('copy_alerts', 1, true, true).html_print_label(__('Copy alerts'), 'checkbox-copy_alerts', true).'</span>'
$table->data['operations'][1] .= html_print_label(__('Copy modules'), 'checkbox-copy_modules', true); );
$table->data['operations'][1] .= '</span><br />';
$table->data['operations'][1] .= '<span class="with_alerts'.(empty($alerts) ? ' invisible' : '').'">'; $table->data[1][1] = html_print_label_input_block(
$table->data['operations'][1] .= html_print_checkbox('copy_alerts', 1, true, true); __('Filter Modules'),
$table->data['operations'][1] .= html_print_label(__('Copy alerts'), 'checkbox-copy_alerts', true); html_print_input_text('filter_modules', '', '', 20, 255, true)
$table->data['operations'][1] .= '</span>'; );
$table->data['form_modules_filter'][0] = __('Filter Modules'); $table->colspan[2][0] = 2;
$table->data['form_modules_filter'][1] = html_print_input_text('filter_modules', '', '', 20, 255, true); $table->data[2][0] = html_print_label_input_block(
__('Modules'),
$table->data[1][0] = __('Modules'); '<span class="with_modules'.(empty($modules) ? ' invisible' : '').'">'.html_print_select(
$table->data[1][1] = '<span class="with_modules'.(empty($modules) ? ' invisible' : '').'">';
$table->data[1][1] .= html_print_select(
$modules, $modules,
'target_modules[]', 'target_modules[]',
0, 0,
@ -207,15 +230,13 @@ $table->data[1][1] .= html_print_select(
'', '',
true, true,
true true
).'</span><span class="without_modules'.(! empty($modules) ? ' invisible' : '').'"><em>'.__('No modules for this agent').'</em></span>'
); );
$table->data[1][1] .= '</span>';
$table->data[1][1] .= '<span class="without_modules'.(! empty($modules) ? ' invisible' : '').'">';
$table->data[1][1] .= '<em>'.__('No modules for this agent').'</em>';
$table->data[1][1] .= '</span>';
$table->data[2][0] = __('Alerts'); $table->colspan[3][0] = 2;
$table->data[2][1] = '<span class="with_alerts'.(empty($alerts) ? ' invisible' : '').'">'; $table->data[3][0] = html_print_label_input_block(
$table->data[2][1] .= html_print_select( __('Alerts'),
'<span class="with_alerts'.(empty($alerts) ? ' invisible' : '').'">'.html_print_select(
$alerts, $alerts,
'target_alerts[]', 'target_alerts[]',
0, 0,
@ -224,11 +245,8 @@ $table->data[2][1] .= html_print_select(
'', '',
true, true,
true true
).'</span><span class="without_alerts'.(! empty($modules) ? ' invisible' : '').'"><em>'.__('No alerts for this agent').'</em></span>'
); );
$table->data[2][1] .= '</span>';
$table->data[2][1] .= '<span class="without_alerts'.(! empty($modules) ? ' invisible' : '').'">';
$table->data[2][1] .= '<em>'.__('No alerts for this agent').'</em>';
$table->data[2][1] .= '</span>';
echo '<div id="modules_loading" class="loading invisible">'; echo '<div id="modules_loading" class="loading invisible">';
html_print_image('images/spinner.png'); html_print_image('images/spinner.png');
@ -240,18 +258,19 @@ echo '<legend><span>'.__('Targets').'</span></legend>';
html_print_table($table); html_print_table($table);
echo '</fieldset>'; echo '</fieldset>';
unset($table);
// Destiny selection // Destiny selection.
$table = new stdClass();
$table->id = 'destiny_table'; $table->id = 'destiny_table';
$table->class = 'databox filters'; $table->class = 'databox filters filter-table-adv';
$table->width = '100%';
$table->size[0] = '50%';
$table->size[1] = '50%';
$table->data = []; $table->data = [];
$table->size[0] = '20%';
$table->size[1] = '30%';
$table->size[2] = '20%';
$table->size[3] = '30%';
$table->data[0][0] = __('Group'); $table->data[0][0] = html_print_label_input_block(
$table->data[0][1] = html_print_select_groups( __('Group'),
html_print_select_groups(
false, false,
'AW', 'AW',
true, true,
@ -260,15 +279,29 @@ $table->data[0][1] = html_print_select_groups(
false, false,
'', '',
'', '',
true true,
false,
false,
'w100p',
false,
'width:100%'
)
); );
$table->data[0][2] = __('Group recursion');
$table->data[0][3] = html_print_checkbox( $table->data[0][1] = html_print_label_input_block(
__('Group recursion'),
html_print_checkbox(
'destiny_recursion', 'destiny_recursion',
1, 1,
$destiny_recursion, $destiny_recursion,
true, true,
false false
)
);
$table->data[1][0] = html_print_label_input_block(
__('Filter Agents'),
html_print_input_text('filter_agents', '', '', 20, 255, true)
); );
$status_list = []; $status_list = [];
@ -278,8 +311,9 @@ $status_list[AGENT_STATUS_CRITICAL] = __('Critical');
$status_list[AGENT_STATUS_UNKNOWN] = __('Unknown'); $status_list[AGENT_STATUS_UNKNOWN] = __('Unknown');
$status_list[AGENT_STATUS_NOT_NORMAL] = __('Not normal'); $status_list[AGENT_STATUS_NOT_NORMAL] = __('Not normal');
$status_list[AGENT_STATUS_NOT_INIT] = __('Not init'); $status_list[AGENT_STATUS_NOT_INIT] = __('Not init');
$table->data[1][0] = __('Status'); $table->data[1][1] = html_print_label_input_block(
$table->data[1][1] = html_print_select( __('Status'),
html_print_select(
$status_list, $status_list,
'status_agents_destiny', 'status_agents_destiny',
'selected', 'selected',
@ -287,23 +321,20 @@ $table->data[1][1] = html_print_select(
__('All'), __('All'),
AGENT_STATUS_ALL, AGENT_STATUS_ALL,
true true
)
); );
$table->data['form_agents_filter'][0] = __('Filter Agents');
$table->data['form_agents_filter'][1] = html_print_input_text('filter_agents', '', '', 20, 255, true);
$table->data[2][0] = __('Agent');
$table->data[2][0] .= '<span id="destiny_agent_loading" class="invisible">';
$table->data[2][0] .= html_print_image('images/spinner.png', true);
$table->data[2][0] .= '</span>';
$agents = []; $agents = [];
if ($source_id_agent) { if ($source_id_agent) {
$agents = ( $destiny_id_group ? agents_get_group_agents($destiny_id_group, false, 'none') : agents_get_group_agents(array_keys(users_get_groups($config['id_user'], 'AW', false))) ); $agents = ( $destiny_id_group ? agents_get_group_agents($destiny_id_group, false, 'none') : agents_get_group_agents(array_keys(users_get_groups($config['id_user'], 'AW', false))) );
unset($agents[$source_id_agent]); unset($agents[$source_id_agent]);
} }
$table->data[2][1] = html_print_select($agents, 'destiny_id_agent[]', 0, false, '', '', true, true); $table->colspan[2][0] = 2;
$table->data[2][0] = html_print_label_input_block(
__('Agent').'<span id="destiny_agent_loading" class="invisible">'.html_print_image('images/spinner.png', true).'</span>',
html_print_select($agents, 'destiny_id_agent[]', 0, false, '', '', true, true)
);
echo '<fieldset id="fieldset_destiny"'.($source_id_agent ? '' : ' class="invisible"').'>'; echo '<fieldset id="fieldset_destiny"'.($source_id_agent ? '' : ' class="invisible"').'>';
echo '<legend><span>'.__('To agent(s)').'</span></legend>'; echo '<legend><span>'.__('To agent(s)').'</span></legend>';

View File

@ -310,23 +310,21 @@ foreach ($module_types as $type) {
$table = new stdClass(); $table = new stdClass();
$table->width = '100%'; $table->width = '100%';
$table->class = 'databox filters'; $table->class = 'databox filters filter-table-adv';
$table->size[0] = '50%';
$table->size[1] = '50%';
$table->data = []; $table->data = [];
$table->style[0] = 'font-weight: bold';
$table->style[2] = 'font-weight: bold';
$table->data['selection_mode'][0] = __('Selection mode'); $table->data[0][0] = html_print_label_input_block(
$table->data['selection_mode'][1] = '<span class="massive_span">'.__('Select modules first ').'</span>'.html_print_radio_button_extended('selection_mode', 'modules', '', $selection_mode, false, '', 'class="mrgn_right_40px"', true).'<br>'; __('Selection mode'),
$table->data['selection_mode'][1] .= '<span class="massive_span">'.__('Select agents first ').'</span>'.html_print_radio_button_extended('selection_mode', 'agents', '', $selection_mode, false, '', 'class="mrgn_right_40px"', true); '<div class="flex"><span class="massive_span">'.__('Select modules first ').'</span>'.html_print_radio_button_extended('selection_mode', 'modules', '', $selection_mode, false, '', 'class="mrgn_right_40px"', true).'<br><span class="massive_span">'.__('Select agents first ').'</span>'.html_print_radio_button_extended('selection_mode', 'agents', '', $selection_mode, false, '', 'class="mrgn_right_40px"', true).'</div>'
);
$table->rowclass['form_modules_1'] = 'select_modules_row'; $table->rowclass[1] = 'select_modules_row';
$table->data['form_modules_1'][0] = __('Module type');
$table->data['form_modules_1'][0] .= '<span id="module_loading" class="invisible">';
$table->data['form_modules_1'][0] .= html_print_image('images/spinner.png', true);
$table->data['form_modules_1'][0] .= '</span>';
$types[0] = __('All'); $types[0] = __('All');
$table->colspan['form_modules_1'][1] = 2; $table->data[1][0] = html_print_label_input_block(
$table->data['form_modules_1'][1] = html_print_select( __('Module type').'<span id="module_loading" class="invisible">'.html_print_image('images/spinner.png', true).'</span>',
html_print_select(
$types, $types,
'module_type', 'module_type',
'', '',
@ -339,8 +337,11 @@ $table->data['form_modules_1'][1] = html_print_select(
'', '',
false, false,
'width:100%' 'width:100%'
)
); );
$table->data['form_modules_1'][3] = __('Select all modules of this type').' '.html_print_checkbox_extended( $table->data[1][1] = html_print_label_input_block(
__('Select all modules of this type'),
html_print_checkbox_extended(
'force_type', 'force_type',
'type', 'type',
'', '',
@ -349,6 +350,7 @@ $table->data['form_modules_1'][3] = __('Select all modules of this type').' '.ht
'class="mrgn_right_40px"', 'class="mrgn_right_40px"',
true, true,
'' ''
)
); );
$modules = []; $modules = [];
@ -368,12 +370,12 @@ foreach ($names as $name) {
$modules[$name['nombre']] = $name['nombre']; $modules[$name['nombre']] = $name['nombre'];
} }
$table->rowclass['form_agents_1'] = 'select_agents_row'; $table->rowclass[2] = 'select_agents_row';
$table->data['form_agents_1'][0] = __('Agent group');
$groups = users_get_groups($config['id_user'], 'AW', false); $groups = users_get_groups($config['id_user'], 'AW', false);
$groups[0] = __('All'); $groups[0] = __('All');
$table->colspan['form_agents_1'][1] = 2; $table->data[2][0] = html_print_label_input_block(
$table->data['form_agents_1'][1] = html_print_select_groups( __('Agent group'),
html_print_select_groups(
false, false,
'AW', 'AW',
true, true,
@ -383,8 +385,12 @@ $table->data['form_agents_1'][1] = html_print_select_groups(
'', '',
'', '',
true true
).' '.__('Group recursion').' '.html_print_checkbox('recursion', 1, false, true, false); ).' '.__('Group recursion').' '.html_print_checkbox('recursion', 1, false, true, false)
$table->data['form_agents_1'][3] = __('Select all modules of this group').' '.html_print_checkbox_extended( );
$table->data[2][1] = html_print_label_input_block(
__('Select all modules of this group'),
html_print_checkbox_extended(
'force_group', 'force_group',
'group', 'group',
'', '',
@ -393,13 +399,15 @@ $table->data['form_agents_1'][3] = __('Select all modules of this group').' '.ht
'', '',
'class="mrgn_right_40px"', 'class="mrgn_right_40px"',
true true
)
); );
$tags = tags_get_user_tags(); $tags = tags_get_user_tags();
$table->rowstyle['form_modules_4'] = 'vertical-align: top;'; $table->rowclass[3] = 'select_modules_row select_modules_row_2';
$table->rowclass['form_modules_4'] = 'select_modules_row select_modules_row_2'; $table->colspan[3][0] = 2;
$table->data['form_modules_4'][0] = __('Tags'); $table->data[3][0] = html_print_label_input_block(
$table->data['form_modules_4'][1] = html_print_select( __('Tags'),
html_print_select(
$tags, $tags,
'tags[]', 'tags[]',
$tags_name, $tags_name,
@ -409,11 +417,9 @@ $table->data['form_modules_4'][1] = html_print_select(
true, true,
true, true,
true true
)
); );
$table->rowclass['form_agents_2'] = 'select_agents_row';
$table->data['form_agents_2'][0] = __('Status');
$table->colspan['form_agents_2'][1] = 2;
$status_list = []; $status_list = [];
$status_list[AGENT_STATUS_NORMAL] = __('Normal'); $status_list[AGENT_STATUS_NORMAL] = __('Normal');
$status_list[AGENT_STATUS_WARNING] = __('Warning'); $status_list[AGENT_STATUS_WARNING] = __('Warning');
@ -421,28 +427,9 @@ $status_list[AGENT_STATUS_CRITICAL] = __('Critical');
$status_list[AGENT_STATUS_UNKNOWN] = __('Unknown'); $status_list[AGENT_STATUS_UNKNOWN] = __('Unknown');
$status_list[AGENT_STATUS_NOT_NORMAL] = __('Not normal'); $status_list[AGENT_STATUS_NOT_NORMAL] = __('Not normal');
$status_list[AGENT_STATUS_NOT_INIT] = __('Not init'); $status_list[AGENT_STATUS_NOT_INIT] = __('Not init');
$table->data['form_agents_2'][1] = html_print_select( $table->data[4][0] = html_print_label_input_block(
$status_list, __('Module Status'),
'status_agents', html_print_select(
'selected',
'',
__('All'),
AGENT_STATUS_ALL,
true
);
$table->data['form_agents_2'][3] = '';
$table->rowclass['form_modules_3'] = '';
$table->data['form_modules_3'][0] = __('Module Status');
$table->colspan['form_modules_3'][1] = 2;
$status_list = [];
$status_list[AGENT_MODULE_STATUS_NORMAL] = __('Normal');
$status_list[AGENT_MODULE_STATUS_WARNING] = __('Warning');
$status_list[AGENT_MODULE_STATUS_CRITICAL_BAD] = __('Critical');
$status_list[AGENT_MODULE_STATUS_UNKNOWN] = __('Unknown');
$status_list[AGENT_MODULE_STATUS_NOT_NORMAL] = __('Not normal');
$status_list[AGENT_MODULE_STATUS_NOT_INIT] = __('Not init');
$table->data['form_modules_3'][1] = html_print_select(
$status_list, $status_list,
'status_module', 'status_module',
'selected', 'selected',
@ -450,35 +437,32 @@ $table->data['form_modules_3'][1] = html_print_select(
__('All'), __('All'),
AGENT_MODULE_STATUS_ALL, AGENT_MODULE_STATUS_ALL,
true true
)
); );
$table->data['form_modules_3'][3] = '';
$table->rowstyle['form_modules_filter'] = 'vertical-align: top;'; $table->cellclass[4][1] = 'select_agents_row';
$table->rowclass['form_modules_filter'] = 'select_modules_row select_modules_row_2'; $table->data[4][1] = html_print_label_input_block(
$table->data['form_modules_filter'][0] = __('Filter Modules'); __('Status'),
$table->data['form_modules_filter'][1] = html_print_input_text('filter_modules', '', '', 20, 255, true); html_print_select(
$status_list,
$table->rowstyle['form_modules_2'] = 'vertical-align: top;'; 'status_agents',
$table->rowclass['form_modules_2'] = 'select_modules_row select_modules_row_2'; 'selected',
$table->data['form_modules_2'][0] = __('Modules');
$table->data['form_modules_2'][1] = html_print_select(
$modules,
'module_name[]',
$module_name,
false,
__('Select'),
-1,
true,
true,
true,
'', '',
false, __('All'),
'width:100%' AGENT_STATUS_ALL,
).' '.__('Select all modules').' '.html_print_checkbox('select_all_modules', 1, false, true, false, '', false, "class='static'"); true
)
);
$table->data['form_modules_2'][2] = __('When select modules'); $table->rowclass[5] = 'select_modules_row select_modules_row_2';
$table->data['form_modules_2'][2] .= '<br>'; $table->data[5][0] = html_print_label_input_block(
$table->data['form_modules_2'][2] .= html_print_select( __('Filter Modules'),
html_print_input_text('filter_modules', '', '', 20, 255, true)
);
$table->data[5][1] = html_print_label_input_block(
__('When select modules'),
html_print_select(
[ [
'common' => __('Show common agents'), 'common' => __('Show common agents'),
'all' => __('Show all agents'), 'all' => __('Show all agents'),
@ -493,8 +477,31 @@ $table->data['form_modules_2'][2] .= html_print_select(
true, true,
'', '',
false false
)
); );
$table->data['form_modules_2'][3] = html_print_select(
$table->rowclass[6] = 'select_modules_row select_modules_row_2';
$table->data[6][0] = html_print_label_input_block(
__('Modules'),
html_print_select(
$modules,
'module_name[]',
$module_name,
false,
__('Select'),
-1,
true,
true,
true,
'',
false,
'width:100%'
).' '.__('Select all modules').' '.html_print_checkbox('select_all_modules', 1, false, true, false, '', false, "class='static'")
);
$table->data[6][1] = html_print_label_input_block(
__('Agents'),
html_print_select(
[], [],
'agents[]', 'agents[]',
$agents_select, $agents_select,
@ -507,13 +514,15 @@ $table->data['form_modules_2'][3] = html_print_select(
'', '',
false, false,
'width:100%' 'width:100%'
)
); );
$tags = tags_get_user_tags(); $tags = tags_get_user_tags();
$table->rowstyle['form_agents_4'] = 'vertical-align: top;'; $table->colspan[7] = 2;
$table->rowclass['form_agents_4'] = 'select_agents_row select_agents_row_2'; $table->rowclass[7] = 'select_agents_row select_agents_row_2';
$table->data['form_agents_4'][0] = __('Tags'); $table->data[7][0] = html_print_label_input_block(
$table->data['form_agents_4'][1] = html_print_select( __('Tags'),
html_print_select(
$tags, $tags,
'tags[]', 'tags[]',
$tags_name, $tags_name,
@ -523,17 +532,36 @@ $table->data['form_agents_4'][1] = html_print_select(
true, true,
true, true,
true true
)
); );
$table->rowstyle['form_agents_filter'] = 'vertical-align: top;'; $table->rowclass[8] = 'select_agents_row select_agents_row_2';
$table->rowclass['form_agents_filter'] = 'select_agents_row select_agents_row_2'; $table->data[8][0] = html_print_label_input_block(
$table->data['form_agents_filter'][0] = __('Filter Agents'); __('Filter Agents'),
$table->data['form_agents_filter'][1] = html_print_input_text('filter_agents', '', '', 20, 255, true); html_print_input_text('filter_agents', '', '', 20, 255, true)
);
$table->rowstyle['form_agents_3'] = 'vertical-align: top;'; $table->data[8][1] = html_print_label_input_block(
$table->rowclass['form_agents_3'] = 'select_agents_row select_agents_row_2'; __('When select agents'),
$table->data['form_agents_3'][0] = __('Agents'); html_print_select(
$table->data['form_agents_3'][1] = html_print_select( [
'common' => __('Show common modules'),
'all' => __('Show all modules'),
'unknown' => __('Show unknown and not init modules'),
],
'modules_selection_mode',
'common',
false,
'',
'',
true
)
);
$table->rowclass[9] = 'select_agents_row select_agents_row_2';
$table->data[9][0] = html_print_label_input_block(
__('Agents'),
html_print_select(
$agents, $agents,
'id_agents[]', 'id_agents[]',
$agents_id, $agents_id,
@ -546,24 +574,12 @@ $table->data['form_agents_3'][1] = html_print_select(
'', '',
false, false,
'width:100%' 'width:100%'
).' '.__('Select all agents').' '.html_print_checkbox('select_all_agents', 1, false, true, false, '', false, "class='static'"); ).' '.__('Select all agents').' '.html_print_checkbox('select_all_agents', 1, false, true, false, '', false, "class='static'")
$table->data['form_agents_3'][2] = __('When select agents');
$table->data['form_agents_3'][2] .= '<br>';
$table->data['form_agents_3'][2] .= html_print_select(
[
'common' => __('Show common modules'),
'all' => __('Show all modules'),
'unknown' => __('Show unknown and not init modules'),
],
'modules_selection_mode',
'common',
false,
'',
'',
true
); );
$table->data['form_agents_3'][3] = html_print_select(
$table->data[9][1] = html_print_label_input_block(
__('Modules'),
html_print_select(
[], [],
'module[]', 'module[]',
$modules_select, $modules_select,
@ -576,11 +592,10 @@ $table->data['form_agents_3'][3] = html_print_select(
'', '',
false, false,
'width:100%' 'width:100%'
)
); );
echo '<form method="post" class="max_floating_element_size" id="form_modules" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=delete_modules" >';
echo '<form method="post" id="form_modules" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=delete_modules" >';
html_print_table($table); html_print_table($table);
attachActionButton('delete', 'delete', $table->width, false, $SelectAction); attachActionButton('delete', 'delete', $table->width, false, $SelectAction);