#11687 change ui bulk operations modules
This commit is contained in:
parent
c28c5c35b4
commit
4ace3b205a
|
@ -86,31 +86,39 @@ 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%';
|
||||||
false,
|
$table->size[0] = '50%';
|
||||||
'AW',
|
$table->size[1] = '50%';
|
||||||
true,
|
$table->data = [];
|
||||||
'source_id_group',
|
|
||||||
$source_id_group,
|
// Source selection.
|
||||||
false,
|
$table->data[0][0] = html_print_label_input_block(
|
||||||
'',
|
__('Group'),
|
||||||
'',
|
html_print_select_groups(
|
||||||
true
|
false,
|
||||||
|
'AW',
|
||||||
|
true,
|
||||||
|
'source_id_group',
|
||||||
|
$source_id_group,
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
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_list,
|
__('Status'),
|
||||||
'status_agents_source',
|
html_print_select(
|
||||||
'selected',
|
$status_list,
|
||||||
'',
|
'status_agents_source',
|
||||||
__('All'),
|
'selected',
|
||||||
AGENT_STATUS_ALL,
|
'',
|
||||||
true
|
__('All'),
|
||||||
|
AGENT_STATUS_ALL,
|
||||||
|
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,66 +192,61 @@ 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,
|
__('Tags'),
|
||||||
'tags[]',
|
html_print_select(
|
||||||
$tags_name,
|
$tags,
|
||||||
false,
|
'tags[]',
|
||||||
__('Any'),
|
$tags_name,
|
||||||
-1,
|
false,
|
||||||
true,
|
__('Any'),
|
||||||
true,
|
-1,
|
||||||
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['operations'][1] .= html_print_checkbox('copy_alerts', 1, true, true);
|
|
||||||
$table->data['operations'][1] .= html_print_label(__('Copy alerts'), 'checkbox-copy_alerts', true);
|
|
||||||
$table->data['operations'][1] .= '</span>';
|
|
||||||
|
|
||||||
$table->data['form_modules_filter'][0] = __('Filter Modules');
|
|
||||||
$table->data['form_modules_filter'][1] = html_print_input_text('filter_modules', '', '', 20, 255, true);
|
|
||||||
|
|
||||||
$table->data[1][0] = __('Modules');
|
|
||||||
$table->data[1][1] = '<span class="with_modules'.(empty($modules) ? ' invisible' : '').'">';
|
|
||||||
$table->data[1][1] .= html_print_select(
|
|
||||||
$modules,
|
|
||||||
'target_modules[]',
|
|
||||||
0,
|
|
||||||
false,
|
|
||||||
'',
|
|
||||||
'',
|
|
||||||
true,
|
|
||||||
true
|
|
||||||
);
|
);
|
||||||
$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->data[1][1] = html_print_label_input_block(
|
||||||
$table->data[2][1] = '<span class="with_alerts'.(empty($alerts) ? ' invisible' : '').'">';
|
__('Filter Modules'),
|
||||||
$table->data[2][1] .= html_print_select(
|
html_print_input_text('filter_modules', '', '', 20, 255, true)
|
||||||
$alerts,
|
);
|
||||||
'target_alerts[]',
|
|
||||||
0,
|
$table->colspan[2][0] = 2;
|
||||||
false,
|
$table->data[2][0] = html_print_label_input_block(
|
||||||
'',
|
__('Modules'),
|
||||||
'',
|
'<span class="with_modules'.(empty($modules) ? ' invisible' : '').'">'.html_print_select(
|
||||||
true,
|
$modules,
|
||||||
true
|
'target_modules[]',
|
||||||
|
0,
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
true,
|
||||||
|
true
|
||||||
|
).'</span><span class="without_modules'.(! empty($modules) ? ' invisible' : '').'"><em>'.__('No modules for this agent').'</em></span>'
|
||||||
|
);
|
||||||
|
|
||||||
|
$table->colspan[3][0] = 2;
|
||||||
|
$table->data[3][0] = html_print_label_input_block(
|
||||||
|
__('Alerts'),
|
||||||
|
'<span class="with_alerts'.(empty($alerts) ? ' invisible' : '').'">'.html_print_select(
|
||||||
|
$alerts,
|
||||||
|
'target_alerts[]',
|
||||||
|
0,
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
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,35 +258,50 @@ 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'),
|
||||||
false,
|
html_print_select_groups(
|
||||||
'AW',
|
false,
|
||||||
true,
|
'AW',
|
||||||
'destiny_id_group',
|
true,
|
||||||
$destiny_id_group,
|
'destiny_id_group',
|
||||||
false,
|
$destiny_id_group,
|
||||||
'',
|
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(
|
||||||
'destiny_recursion',
|
__('Group recursion'),
|
||||||
1,
|
html_print_checkbox(
|
||||||
$destiny_recursion,
|
'destiny_recursion',
|
||||||
true,
|
1,
|
||||||
false
|
$destiny_recursion,
|
||||||
|
true,
|
||||||
|
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,32 +311,30 @@ $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'),
|
||||||
$status_list,
|
html_print_select(
|
||||||
'status_agents_destiny',
|
$status_list,
|
||||||
'selected',
|
'status_agents_destiny',
|
||||||
'',
|
'selected',
|
||||||
__('All'),
|
'',
|
||||||
AGENT_STATUS_ALL,
|
__('All'),
|
||||||
true
|
AGENT_STATUS_ALL,
|
||||||
|
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>';
|
||||||
|
|
|
@ -310,45 +310,47 @@ 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->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');
|
|
||||||
$table->colspan['form_modules_1'][1] = 2;
|
|
||||||
$table->data['form_modules_1'][1] = html_print_select(
|
|
||||||
$types,
|
|
||||||
'module_type',
|
|
||||||
'',
|
|
||||||
false,
|
|
||||||
__('Select'),
|
|
||||||
-1,
|
|
||||||
true,
|
|
||||||
false,
|
|
||||||
true,
|
|
||||||
'',
|
|
||||||
false,
|
|
||||||
'width:100%'
|
|
||||||
);
|
);
|
||||||
$table->data['form_modules_1'][3] = __('Select all modules of this type').' '.html_print_checkbox_extended(
|
|
||||||
'force_type',
|
$table->rowclass[1] = 'select_modules_row';
|
||||||
'type',
|
$types[0] = __('All');
|
||||||
'',
|
$table->data[1][0] = html_print_label_input_block(
|
||||||
'',
|
__('Module type').'<span id="module_loading" class="invisible">'.html_print_image('images/spinner.png', true).'</span>',
|
||||||
false,
|
html_print_select(
|
||||||
'class="mrgn_right_40px"',
|
$types,
|
||||||
true,
|
'module_type',
|
||||||
''
|
'',
|
||||||
|
false,
|
||||||
|
__('Select'),
|
||||||
|
-1,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
'width:100%'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$table->data[1][1] = html_print_label_input_block(
|
||||||
|
__('Select all modules of this type'),
|
||||||
|
html_print_checkbox_extended(
|
||||||
|
'force_type',
|
||||||
|
'type',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
'class="mrgn_right_40px"',
|
||||||
|
true,
|
||||||
|
''
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$modules = [];
|
$modules = [];
|
||||||
|
@ -368,52 +370,56 @@ 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'),
|
||||||
false,
|
html_print_select_groups(
|
||||||
'AW',
|
false,
|
||||||
true,
|
'AW',
|
||||||
'groups_select',
|
true,
|
||||||
'',
|
'groups_select',
|
||||||
false,
|
'',
|
||||||
'',
|
false,
|
||||||
'',
|
'',
|
||||||
true
|
'',
|
||||||
).' '.__('Group recursion').' '.html_print_checkbox('recursion', 1, false, true, false);
|
true
|
||||||
$table->data['form_agents_1'][3] = __('Select all modules of this group').' '.html_print_checkbox_extended(
|
).' '.__('Group recursion').' '.html_print_checkbox('recursion', 1, false, true, false)
|
||||||
'force_group',
|
);
|
||||||
'group',
|
|
||||||
'',
|
$table->data[2][1] = html_print_label_input_block(
|
||||||
'',
|
__('Select all modules of this group'),
|
||||||
false,
|
html_print_checkbox_extended(
|
||||||
'',
|
'force_group',
|
||||||
'class="mrgn_right_40px"',
|
'group',
|
||||||
true
|
'',
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
'class="mrgn_right_40px"',
|
||||||
|
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'),
|
||||||
$tags,
|
html_print_select(
|
||||||
'tags[]',
|
$tags,
|
||||||
$tags_name,
|
'tags[]',
|
||||||
false,
|
$tags_name,
|
||||||
__('Any'),
|
false,
|
||||||
-1,
|
__('Any'),
|
||||||
true,
|
-1,
|
||||||
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,166 +427,175 @@ $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',
|
$status_list,
|
||||||
'',
|
'status_module',
|
||||||
__('All'),
|
'selected',
|
||||||
AGENT_STATUS_ALL,
|
'',
|
||||||
true
|
__('All'),
|
||||||
|
AGENT_MODULE_STATUS_ALL,
|
||||||
|
true
|
||||||
|
)
|
||||||
);
|
);
|
||||||
$table->data['form_agents_2'][3] = '';
|
|
||||||
|
|
||||||
$table->rowclass['form_modules_3'] = '';
|
$table->cellclass[4][1] = 'select_agents_row';
|
||||||
$table->data['form_modules_3'][0] = __('Module Status');
|
$table->data[4][1] = html_print_label_input_block(
|
||||||
$table->colspan['form_modules_3'][1] = 2;
|
__('Status'),
|
||||||
$status_list = [];
|
html_print_select(
|
||||||
$status_list[AGENT_MODULE_STATUS_NORMAL] = __('Normal');
|
$status_list,
|
||||||
$status_list[AGENT_MODULE_STATUS_WARNING] = __('Warning');
|
'status_agents',
|
||||||
$status_list[AGENT_MODULE_STATUS_CRITICAL_BAD] = __('Critical');
|
'selected',
|
||||||
$status_list[AGENT_MODULE_STATUS_UNKNOWN] = __('Unknown');
|
'',
|
||||||
$status_list[AGENT_MODULE_STATUS_NOT_NORMAL] = __('Not normal');
|
__('All'),
|
||||||
$status_list[AGENT_MODULE_STATUS_NOT_INIT] = __('Not init');
|
AGENT_STATUS_ALL,
|
||||||
$table->data['form_modules_3'][1] = html_print_select(
|
true
|
||||||
$status_list,
|
)
|
||||||
'status_module',
|
|
||||||
'selected',
|
|
||||||
'',
|
|
||||||
__('All'),
|
|
||||||
AGENT_MODULE_STATUS_ALL,
|
|
||||||
true
|
|
||||||
);
|
);
|
||||||
$table->data['form_modules_3'][3] = '';
|
|
||||||
|
|
||||||
$table->rowstyle['form_modules_filter'] = 'vertical-align: top;';
|
$table->rowclass[5] = 'select_modules_row select_modules_row_2';
|
||||||
$table->rowclass['form_modules_filter'] = 'select_modules_row select_modules_row_2';
|
$table->data[5][0] = html_print_label_input_block(
|
||||||
$table->data['form_modules_filter'][0] = __('Filter Modules');
|
__('Filter Modules'),
|
||||||
$table->data['form_modules_filter'][1] = html_print_input_text('filter_modules', '', '', 20, 255, true);
|
html_print_input_text('filter_modules', '', '', 20, 255, true)
|
||||||
|
|
||||||
$table->rowstyle['form_modules_2'] = 'vertical-align: top;';
|
|
||||||
$table->rowclass['form_modules_2'] = 'select_modules_row select_modules_row_2';
|
|
||||||
$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,
|
|
||||||
'width:100%'
|
|
||||||
).' '.__('Select all modules').' '.html_print_checkbox('select_all_modules', 1, false, true, false, '', false, "class='static'");
|
|
||||||
|
|
||||||
$table->data['form_modules_2'][2] = __('When select modules');
|
|
||||||
$table->data['form_modules_2'][2] .= '<br>';
|
|
||||||
$table->data['form_modules_2'][2] .= html_print_select(
|
|
||||||
[
|
|
||||||
'common' => __('Show common agents'),
|
|
||||||
'all' => __('Show all agents'),
|
|
||||||
],
|
|
||||||
'agents_selection_mode',
|
|
||||||
'common',
|
|
||||||
false,
|
|
||||||
'',
|
|
||||||
'',
|
|
||||||
true,
|
|
||||||
false,
|
|
||||||
true,
|
|
||||||
'',
|
|
||||||
false
|
|
||||||
);
|
);
|
||||||
$table->data['form_modules_2'][3] = html_print_select(
|
|
||||||
[],
|
$table->data[5][1] = html_print_label_input_block(
|
||||||
'agents[]',
|
__('When select modules'),
|
||||||
$agents_select,
|
html_print_select(
|
||||||
false,
|
[
|
||||||
__('None'),
|
'common' => __('Show common agents'),
|
||||||
0,
|
'all' => __('Show all agents'),
|
||||||
true,
|
],
|
||||||
true,
|
'agents_selection_mode',
|
||||||
false,
|
'common',
|
||||||
'',
|
false,
|
||||||
false,
|
'',
|
||||||
'width:100%'
|
'',
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
'',
|
||||||
|
false
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$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_select,
|
||||||
|
false,
|
||||||
|
__('None'),
|
||||||
|
0,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
'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'),
|
||||||
$tags,
|
html_print_select(
|
||||||
'tags[]',
|
$tags,
|
||||||
$tags_name,
|
'tags[]',
|
||||||
false,
|
$tags_name,
|
||||||
__('Any'),
|
false,
|
||||||
-1,
|
__('Any'),
|
||||||
true,
|
-1,
|
||||||
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->rowclass['form_agents_3'] = 'select_agents_row select_agents_row_2';
|
|
||||||
$table->data['form_agents_3'][0] = __('Agents');
|
|
||||||
$table->data['form_agents_3'][1] = html_print_select(
|
|
||||||
$agents,
|
|
||||||
'id_agents[]',
|
|
||||||
$agents_id,
|
|
||||||
false,
|
|
||||||
'',
|
|
||||||
'',
|
|
||||||
true,
|
|
||||||
true,
|
|
||||||
false,
|
|
||||||
'',
|
|
||||||
false,
|
|
||||||
'width:100%'
|
|
||||||
).' '.__('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(
|
|
||||||
[],
|
|
||||||
'module[]',
|
|
||||||
$modules_select,
|
|
||||||
false,
|
|
||||||
'',
|
|
||||||
'',
|
|
||||||
true,
|
|
||||||
true,
|
|
||||||
false,
|
|
||||||
'',
|
|
||||||
false,
|
|
||||||
'width:100%'
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$table->data[8][1] = html_print_label_input_block(
|
||||||
|
__('When select agents'),
|
||||||
|
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,
|
||||||
|
'id_agents[]',
|
||||||
|
$agents_id,
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
'width:100%'
|
||||||
|
).' '.__('Select all agents').' '.html_print_checkbox('select_all_agents', 1, false, true, false, '', false, "class='static'")
|
||||||
|
);
|
||||||
|
|
||||||
echo '<form method="post" id="form_modules" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=delete_modules" >';
|
$table->data[9][1] = html_print_label_input_block(
|
||||||
|
__('Modules'),
|
||||||
|
html_print_select(
|
||||||
|
[],
|
||||||
|
'module[]',
|
||||||
|
$modules_select,
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
'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" >';
|
||||||
html_print_table($table);
|
html_print_table($table);
|
||||||
|
|
||||||
attachActionButton('delete', 'delete', $table->width, false, $SelectAction);
|
attachActionButton('delete', 'delete', $table->width, false, $SelectAction);
|
||||||
|
|
Loading…
Reference in New Issue