cascade protection services
This commit is contained in:
parent
84f1cf95eb
commit
85897315cd
|
@ -523,7 +523,11 @@ if($cps > 0){
|
|||
$cps_array[$cps] = __('Enabled');
|
||||
}
|
||||
else{
|
||||
$cps_array[0] = __('Enabled');
|
||||
$cps_inc = 0;
|
||||
if($id_agente){
|
||||
$cps_inc = service_agents_cps($id_agente);
|
||||
}
|
||||
$cps_array[$cps_inc] = __('Enabled');
|
||||
}
|
||||
|
||||
$table->data[6][0] = __('Cascade protection services');
|
||||
|
|
|
@ -570,11 +570,15 @@ $table_advanced->data[7][0] .= ui_print_help_tip(__('The module still stores dat
|
|||
$table_advanced->data[7][1] = html_print_checkbox('quiet_module', 1, $quiet_module, true, $disabledBecauseInPolicy);
|
||||
|
||||
$cps_array[-1] = __('Disabled');
|
||||
if($cps > 0){
|
||||
if($cps_module > 0){
|
||||
$cps_array[$cps_module] = __('Enabled');
|
||||
}
|
||||
else{
|
||||
$cps_array[0] = __('Enabled');
|
||||
$cps_inc = 0;
|
||||
if($id_agent_module){
|
||||
$cps_inc = service_modules_cps($id_agent_module);
|
||||
}
|
||||
$cps_array[$cps_inc] = __('Enabled');
|
||||
}
|
||||
$table_advanced->data[7][2] = __('Cascade Protection Services');
|
||||
$table_advanced->data[7][2] .= ui_print_help_tip(__('Disable the alerts and events of the elements that belong to this service'), true);
|
||||
|
|
|
@ -82,8 +82,6 @@ if ($update_agents) {
|
|||
$values['delete_conf'] = get_parameter('delete_conf');
|
||||
if (get_parameter('quiet_select', -1) != -1)
|
||||
$values['quiet'] = get_parameter('quiet_select');
|
||||
if (get_parameter('cps_select', -2) != -2)
|
||||
$values['cps'] = get_parameter('cps_select');
|
||||
|
||||
$fields = db_get_all_fields_in_table('tagent_custom_fields');
|
||||
|
||||
|
@ -394,7 +392,6 @@ $update_gis_data = -1;
|
|||
$cascade_protection = -1;
|
||||
$cascade_protection_module = -1;
|
||||
$quiet_select = -1;
|
||||
$cps_select = -2;
|
||||
|
||||
$table = new StdClass();
|
||||
$table->width = '100%';
|
||||
|
@ -482,19 +479,6 @@ $table->data[6][1] = html_print_select(array(-1 => __('No change'),
|
|||
1 => __('Yes'), 0 => __('No')),
|
||||
"quiet_select", $quiet_select, "", '', 0, true);
|
||||
|
||||
$cps_array[-2] = __('No change');
|
||||
$cps_array[-1] = __('Disabled');
|
||||
if($cps > 0){
|
||||
$cps_array[$cps_select] = __('Enabled');
|
||||
}
|
||||
else{
|
||||
$cps_array[0] = __('Enabled');
|
||||
}
|
||||
|
||||
$table->data[7][0] = __('Cascade Protection Service');
|
||||
$table->data[7][0] .= ui_print_help_tip(__('Disable the alerts and events of the elements that belong to this service'), true);
|
||||
$table->data[7][1] = html_print_select($cps_array, "cps_select", $cps_select, "", '', 0, true);
|
||||
|
||||
ui_toggle(html_print_table ($table, true), __('Advanced options'));
|
||||
unset($table);
|
||||
|
||||
|
|
|
@ -636,27 +636,16 @@ $table->data['edit11'][1] = html_print_select(array(-1 => __('No change'),
|
|||
1 => __('Yes'), 0 => __('No')),
|
||||
"quiet_select", -1, "", '', 0, true);
|
||||
|
||||
$cps_array[-2] = __('No change');
|
||||
$cps_array[-1] = __('Disabled');
|
||||
if($cps > 0){
|
||||
$cps_array[$cps_select] = __('Enabled');
|
||||
}
|
||||
else{
|
||||
$cps_array[0] = __('Enabled');
|
||||
}
|
||||
|
||||
$table->data['edit11'][2] = __('Cascade Protection Service');
|
||||
$table->data['edit11'][2] .= ui_print_help_tip(__('Disable the alerts and events of the elements that belong to this service'), true);
|
||||
$table->data['edit11'][3] .= html_print_select($cps_array, "cps_select", -1, "", '', 0, true);
|
||||
|
||||
$table->data['edit16'][0] = __('Timeout');
|
||||
$table->data['edit16'][1] .= html_print_input_text(
|
||||
$table->data['edit11'][2] = __('Timeout');
|
||||
$table->data['edit11'][3] = html_print_input_text(
|
||||
'max_timeout', '', '', 5, 10, true) . ' ' .
|
||||
ui_print_help_tip (
|
||||
__('Seconds that agent will wait for the execution of the module.'), true);
|
||||
|
||||
$table->data['edit16'][1] .= __('Retries');
|
||||
$table->data['edit16'][1] .= html_print_input_text ('max_retries', '', '', 5, 10, true) . ' ' .
|
||||
$table->data['edit16'][0] = __('Retries');
|
||||
$table->data['edit16'][1] = html_print_input_text ('max_retries', '', '', 5, 10, true) . ' ' .
|
||||
ui_print_help_tip (
|
||||
__('Number of retries that the module will attempt to run.'), true);
|
||||
|
||||
|
@ -1521,10 +1510,6 @@ function process_manage_edit ($module_name, $agents_select = null, $module_statu
|
|||
$values['quiet'] = get_parameter('quiet_select');
|
||||
}
|
||||
|
||||
if (get_parameter('cps_select', -2) != -2) {
|
||||
$values['cps'] = get_parameter('cps_select');
|
||||
}
|
||||
|
||||
$filter_modules = false;
|
||||
|
||||
if (!is_numeric($module_name) or ($module_name != 0))
|
||||
|
|
Loading…
Reference in New Issue