From b658fddfc2f3147310ee61e3338ad1f4441f7797 Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Fri, 7 Feb 2020 13:58:26 +0100 Subject: [PATCH 1/6] visual changes in module creation --- .../agentes/module_manager_editor_common.php | 566 +++++++++--------- 1 file changed, 282 insertions(+), 284 deletions(-) diff --git a/pandora_console/godmode/agentes/module_manager_editor_common.php b/pandora_console/godmode/agentes/module_manager_editor_common.php index f9685bcf87..90df118c35 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_common.php +++ b/pandora_console/godmode/agentes/module_manager_editor_common.php @@ -182,19 +182,11 @@ $table_simple->cellclass = []; $table_simple->colspan = []; - - -$table_simple->colspan[6][1] = 3; - $table_simple->rowspan = []; -if (strstr($page, 'policy_modules')) { - $table_simple->rowspan[3][2] = 3; - $table_simple->colspan[3][2] = 2; -} else { - $table_simple->rowspan[4][2] = 3; - $table_simple->colspan[4][2] = 2; - $table_simple->colspan[5][1] = 3; -} + +$table_simple->rowspan[2][2] = 3; +$table_simple->colspan[2][2] = 2; +$table_simple->colspan[3][1] = 3; $table_simple->data[0][0] = __('Name'); $table_simple->data[0][1] = html_print_input_text_extended( @@ -264,40 +256,9 @@ if ((isset($id_agent_module) && $id_agent_module) || $id_policy_module != 0) { } $in_policy = strstr($page, 'policy_modules'); -if (!$in_policy) { - // Cannot select the current module to be itself parent. - $module_parent_filter = ($id_agent_module) ? ['tagente_modulo.id_agente_modulo' => "<>$id_agent_module"] : ''; - $table_simple->data[1][0] = __('Module parent'); - $modules_can_be_parent = agents_get_modules( - $id_agente, - false, - $module_parent_filter - ); - // If the user cannot have access to parent module, only print the name. - if ($parent_module_id != 0 - && !in_array($parent_module_id, array_keys($modules_can_be_parent)) - ) { - $table_simple->data[1][1] = db_get_value( - 'nombre', - 'tagente_modulo', - 'id_agente_modulo', - $parent_module_id - ); - } else { - $table_simple->data[1][1] = html_print_select( - $modules_can_be_parent, - 'parent_module_id', - $parent_module_id, - '', - __('Not assigned'), - '0', - true - ); - } -} -$table_simple->data[2][0] = __('Type').' '.ui_print_help_icon($help_type, true, '', 'images/help_green.png', '', 'module_type_help'); -$table_simple->data[2][0] .= html_print_input_hidden('id_module_type_hidden', $id_module_type, true); +$table_simple->data[1][0] = __('Type').' '.ui_print_help_icon($help_type, true, '', 'images/help_green.png', '', 'module_type_help'); +$table_simple->data[1][0] .= html_print_input_hidden('id_module_type_hidden', $id_module_type, true); if (!$edit) { $sql = sprintf( @@ -315,8 +276,8 @@ if (!$edit) { $type_names_hash[$tn['id_tipo']] = $tn['nombre']; } - $table_simple->data[2][1] = ''.modules_get_moduletype_description($id_module_type).' ('.$type_names_hash[$id_module_type].')'; - $table_simple->data[2][1] .= html_print_input_hidden( + $table_simple->data[1][1] = ''.modules_get_moduletype_description($id_module_type).' ('.$type_names_hash[$id_module_type].')'; + $table_simple->data[1][1] .= html_print_input_hidden( 'type_names', base64_encode(io_json_mb_encode($type_names_hash)), true @@ -358,7 +319,7 @@ if (!$edit) { } } - $table_simple->data[2][1] = html_print_select( + $table_simple->data[1][1] = html_print_select( $type_description_hash, 'id_module_type', $idModuleType, @@ -376,7 +337,7 @@ if (!$edit) { ); // Store the relation between id and name of the types on a hidden field. - $table_simple->data[2][1] .= html_print_input_hidden( + $table_simple->data[1][1] .= html_print_input_hidden( 'type_names', base64_encode(io_json_mb_encode($type_names_hash)), true @@ -409,74 +370,22 @@ if ($edit_module) { $help_header = 'webserver_module_tab'; } - $table_simple->data[2][0] = __('Type').' '; - $table_simple->data[2][0] .= ui_print_help_icon($help_header, true); + $table_simple->data[1][0] = __('Type').' '; + $table_simple->data[1][0] .= ui_print_help_icon($help_header, true); } if ($disabledBecauseInPolicy) { - $table_simple->data[2][3] .= html_print_input_hidden( + $table_simple->data[1][3] .= html_print_input_hidden( 'id_module_group', $id_module_group, true ); } -$table_simple->data[3][0] = __('Dynamic Threshold Interval'); -$table_simple->data[3][1] = html_print_extended_select_for_time( - 'dynamic_interval', - $dynamic_interval, - '', - 'None', - '0', - 10, - true, - 'width:150px', - false, - $classdisabledBecauseInPolicy, - $disabledBecauseInPolicy -); -$table_simple->data[3][1] .= ''.html_print_image('images/cog.png', true, ['title' => __('Advanced options Dynamic Threshold')]).''; -if ($in_policy) { - $table_simple->cellclass[2][2] = 'hide_dinamic'; - $table_simple->cellclass[2][3] = 'hide_dinamic'; -} else { - $table_simple->cellclass[3][2] = 'hide_dinamic'; - $table_simple->cellclass[3][3] = 'hide_dinamic'; -} - -$table_simple->data[3][2] = ''.__('Dynamic Threshold Min. ').''; -$table_simple->data[3][2] .= html_print_input_text( - 'dynamic_min', - $dynamic_min, - '', - 10, - 255, - true, - $disabledBecauseInPolicy, - false, - '', - $classdisabledBecauseInPolicy -); -$table_simple->data[3][2] .= '
'.__('Dynamic Threshold Max. ').''; -$table_simple->data[3][2] .= html_print_input_text( - 'dynamic_max', - $dynamic_max, - '', - 10, - 255, - true, - $disabledBecauseInPolicy, - false, - '', - $classdisabledBecauseInPolicy -); -$table_simple->data[3][3] = ''.__('Dynamic Threshold Two Tailed: ').''; -$table_simple->data[3][3] .= html_print_checkbox('dynamic_two_tailed', 1, $dynamic_two_tailed, true, $disabledBecauseInPolicy); - -$table_simple->data[4][0] = __('Warning status'); +$table_simple->data[2][0] = __('Warning status'); if (!modules_is_string_type($id_module_type) || $edit) { - $table_simple->data[4][1] .= ''.__('Min. ').''; - $table_simple->data[4][1] .= html_print_input_text( + $table_simple->data[2][1] .= ''.__('Min. ').''; + $table_simple->data[2][1] .= html_print_input_text( 'min_warning', $min_warning, '', @@ -488,8 +397,8 @@ if (!modules_is_string_type($id_module_type) || $edit) { '', $classdisabledBecauseInPolicy ); - $table_simple->data[4][1] .= '
'.__('Max.').''; - $table_simple->data[4][1] .= html_print_input_text( + $table_simple->data[2][1] .= '
'.__('Max.').''; + $table_simple->data[2][1] .= html_print_input_text( 'max_warning', $max_warning, '', @@ -504,8 +413,8 @@ if (!modules_is_string_type($id_module_type) || $edit) { } if (modules_is_string_type($id_module_type) || $edit) { - $table_simple->data[4][1] .= ''.__('Str.').''; - $table_simple->data[4][1] .= html_print_input_text( + $table_simple->data[2][1] .= ''.__('Str.').''; + $table_simple->data[2][1] .= html_print_input_text( 'str_warning', str_replace('"', '', $str_warning), '', @@ -519,17 +428,17 @@ if (modules_is_string_type($id_module_type) || $edit) { ).''; } - $table_simple->data[4][1] .= '
'.__('Inverse interval').''; - $table_simple->data[4][1] .= html_print_checkbox('warning_inverse', 1, $warning_inverse, true, $disabledBecauseInPolicy); + $table_simple->data[2][1] .= '
'.__('Inverse interval').''; + $table_simple->data[2][1] .= html_print_checkbox('warning_inverse', 1, $warning_inverse, true, $disabledBecauseInPolicy); if (!modules_is_string_type($id_module_type) || $edit) { - $table_simple->data[4][2] = ' '; + $table_simple->data[2][2] = ' '; } -$table_simple->data[5][0] = __('Critical status'); +$table_simple->data[3][0] = __('Critical status'); if (!modules_is_string_type($id_module_type) || $edit) { - $table_simple->data[5][1] .= ''.__('Min. ').''; - $table_simple->data[5][1] .= html_print_input_text( + $table_simple->data[3][1] .= ''.__('Min. ').''; + $table_simple->data[3][1] .= html_print_input_text( 'min_critical', $min_critical, '', @@ -541,8 +450,8 @@ if (!modules_is_string_type($id_module_type) || $edit) { '', $classdisabledBecauseInPolicy ); - $table_simple->data[5][1] .= '
'.__('Max.').''; - $table_simple->data[5][1] .= html_print_input_text( + $table_simple->data[3][1] .= '
'.__('Max.').''; + $table_simple->data[3][1] .= html_print_input_text( 'max_critical', $max_critical, '', @@ -557,8 +466,8 @@ if (!modules_is_string_type($id_module_type) || $edit) { } if (modules_is_string_type($id_module_type) || $edit) { - $table_simple->data[5][1] .= ''.__('Str.').''; - $table_simple->data[5][1] .= html_print_input_text( + $table_simple->data[3][1] .= ''.__('Str.').''; + $table_simple->data[3][1] .= html_print_input_text( 'str_critical', str_replace('"', '', $str_critical), '', @@ -572,109 +481,24 @@ if (modules_is_string_type($id_module_type) || $edit) { ).''; } -$table_simple->data[5][1] .= '
'.__('Inverse interval').''; -$table_simple->data[5][1] .= html_print_checkbox('critical_inverse', 1, $critical_inverse, true, $disabledBecauseInPolicy); +$table_simple->data[3][1] .= '
'.__('Inverse interval').''; +$table_simple->data[3][1] .= html_print_checkbox('critical_inverse', 1, $critical_inverse, true, $disabledBecauseInPolicy); -// FF stands for Flip-flop. -$table_simple->data[6][0] = __('FF threshold').' '; - -$table_simple->data[6][1] .= __('Keep counters'); -$table_simple->data[6][1] .= html_print_checkbox( - 'ff_type', - 1, - $ff_type, - true, - $disabledBecauseInPolicy -).'
'; - -$table_simple->data[6][1] .= html_print_radio_button( - 'each_ff', - 0, - '', - $each_ff, - true, - $disabledBecauseInPolicy -); -$table_simple->data[6][1] .= ' '.__('All state changing').' : '; -$table_simple->data[6][1] .= html_print_input_text( - 'ff_event', - $ff_event, - '', - 5, - 15, - true, - $disabledBecauseInPolicy, - false, - '', - $classdisabledBecauseInPolicy -).'
'; -$table_simple->data[6][1] .= html_print_radio_button( - 'each_ff', - 1, - '', - $each_ff, - true, - $disabledBecauseInPolicy -); - -$table_simple->data[6][1] .= ' '.__('Each state changing').' : '; -$table_simple->data[6][1] .= __('To normal'); -$table_simple->data[6][1] .= html_print_input_text( - 'ff_event_normal', - $ff_event_normal, - '', - 5, - 15, - true, - $disabledBecauseInPolicy, - false, - '', - $classdisabledBecauseInPolicy -).' '; - -$table_simple->data[6][1] .= __('To warning'); -$table_simple->data[6][1] .= html_print_input_text( - 'ff_event_warning', - $ff_event_warning, - '', - 5, - 15, - true, - $disabledBecauseInPolicy, - false, - '', - $classdisabledBecauseInPolicy -).' '; - -$table_simple->data[6][1] .= __('To critical'); -$table_simple->data[6][1] .= html_print_input_text( - 'ff_event_critical', - $ff_event_critical, - '', - 5, - 15, - true, - $disabledBecauseInPolicy, - false, - '', - $classdisabledBecauseInPolicy -); - -$table_simple->data[7][0] = __('Historical data'); +$table_simple->data[4][0] = __('Historical data'); if ($disabledBecauseInPolicy) { // If is disabled, we send a hidden in his place and print a false // checkbox because HTML dont send disabled fields // and could be disabled by error. - $table_simple->data[7][1] = html_print_checkbox( + $table_simple->data[4][1] = html_print_checkbox( 'history_data_fake', 1, $history_data, true, $disabledBecauseInPolicy ); - $table_simple->data[7][1] .= ''; + $table_simple->data[4][1] .= ''; } else { - $table_simple->data[7][1] = html_print_checkbox( + $table_simple->data[4][1] = html_print_checkbox( 'history_data', 1, $history_data, @@ -693,21 +517,11 @@ $table_advanced->style = []; $table_advanced->style[0] = $table_advanced->style[3] = $table_advanced->style[5] = 'font-weight: bold;'; $table_advanced->colspan = []; -$table_advanced->data[0][0] = __('Description'); -$table_advanced->colspan[0][1] = 6; -$table_advanced->data[0][1] = html_print_textarea( - 'description', - 2, - 65, - $description, - $disabledTextBecauseInPolicy, - true, - $largeClassDisabledBecauseInPolicy -); +$table_advanced->colspan[17][1] = 3; -$table_advanced->data[1][0] = __('Custom ID'); -$table_advanced->colspan[1][1] = 2; -$table_advanced->data[1][1] = html_print_input_text( +$table_advanced->data[0][0] = __('Custom ID'); +$table_advanced->colspan[0][1] = 2; +$table_advanced->data[0][1] = html_print_input_text( 'custom_id', $custom_id, '', @@ -720,11 +534,11 @@ $table_advanced->data[1][1] = html_print_input_text( $classdisabledBecauseInPolicy ); -$table_advanced->data[1][3] = __('Unit'); +$table_advanced->data[0][3] = __('Unit'); // $table_advanced->data[1][4] = html_print_input_text ('unit', $unit, '', 20, 65, true, // $disabledBecauseInPolicy, false, '', $classdisabledBecauseInPolicy); // $table_advanced->colspan[1][4] = 3; -$table_advanced->data[1][4] = html_print_extended_select_for_unit( +$table_advanced->data[0][4] = html_print_extended_select_for_unit( 'unit', $unit, '', @@ -735,7 +549,7 @@ $table_advanced->data[1][4] = html_print_extended_select_for_unit( false, false ); -$table_advanced->colspan[1][4] = 3; +$table_advanced->colspan[0][4] = 3; $module_id_policy_module = 0; if (isset($module['id_policy_module'])) { @@ -745,38 +559,38 @@ if (isset($module['id_policy_module'])) { // In the data modules, the interval is not in seconds. It is a factor // to be multiplied for the agent interval if ($moduletype == MODULE_DATA) { - $table_advanced->data[2][0] = __('Interval'); - $table_advanced->colspan[2][1] = 2; + $table_advanced->data[1][0] = __('Interval'); + $table_advanced->colspan[1][1] = 2; $interval_factor = 1; if (isset($id_agente)) { $agent_interval = agents_get_interval($id_agente); $interval_factor = ($interval / $agent_interval); - $table_advanced->data[2][1] = human_time_description_raw($interval).' ('.sprintf(__('Agent interval x %s'), $interval_factor).') '; + $table_advanced->data[1][1] = human_time_description_raw($interval).' ('.sprintf(__('Agent interval x %s'), $interval_factor).') '; } else { - $table_advanced->data[2][1] = sprintf(__('Agent interval x %s'), $interval_factor); + $table_advanced->data[1][1] = sprintf(__('Agent interval x %s'), $interval_factor); } if ($__code_from == 'policies') { // If is the policy form, module_interval will store the factor (not the seconds). // So server will transform it to interval in seconds - $table_advanced->data[2][1] = sprintf(__('Default').': 1', $interval_factor); - $table_advanced->data[2][1] .= html_print_input_hidden('module_interval', $interval_factor, true); + $table_advanced->data[1][1] = sprintf(__('Default').': 1', $interval_factor); + $table_advanced->data[1][1] .= html_print_input_hidden('module_interval', $interval_factor, true); } else if ($module_id_policy_module != 0) { - $table_advanced->data[2][1] .= ui_print_help_tip(__('The policy modules of data type will only update their intervals when policy is applied.'), true); + $table_advanced->data[1][1] .= ui_print_help_tip(__('The policy modules of data type will only update their intervals when policy is applied.'), true); } // If it is a non policy form, the module_interval will not provided and will // be taken the agent interval (this code is at configurar_agente.php) } else { - $table_advanced->data[2][0] = __('Interval'); - $table_advanced->colspan[2][1] = 2; - $table_advanced->data[2][1] = html_print_extended_select_for_time('module_interval', $interval, '', '', '0', false, true, false, false, $classdisabledBecauseInPolicy, $disabledBecauseInPolicy); + $table_advanced->data[1][0] = __('Interval'); + $table_advanced->colspan[1][1] = 2; + $table_advanced->data[1][1] = html_print_extended_select_for_time('module_interval', $interval, '', '', '0', false, true, false, false, $classdisabledBecauseInPolicy, $disabledBecauseInPolicy); } -$table_advanced->data[2][1] .= html_print_input_hidden('moduletype', $moduletype, true); +$table_advanced->data[1][1] .= html_print_input_hidden('moduletype', $moduletype, true); -$table_advanced->data[2][3] = __('Post process'); -$table_advanced->data[2][4] = html_print_extended_select_for_post_process( +$table_advanced->data[1][3] = __('Post process'); +$table_advanced->data[1][4] = html_print_extended_select_for_post_process( 'post_process', $post_process, '', @@ -788,17 +602,17 @@ $table_advanced->data[2][4] = html_print_extended_select_for_post_process( false, $disabledBecauseInPolicy ); +$table_advanced->colspan[1][4] = 3; + +$table_advanced->data[2][0] = __('Min. Value'); +$table_advanced->colspan[2][1] = 2; + +$table_advanced->data[2][1] = html_print_input_text('min', $min, '', 5, 15, true, $disabledBecauseInPolicy, false, '', $classdisabledBecauseInPolicy).' '.ui_print_help_tip(__('Any value below this number is discarted.'), true); +$table_advanced->data[2][3] = __('Max. Value'); +$table_advanced->data[2][4] = html_print_input_text('max', $max, '', 5, 15, true, $disabledBecauseInPolicy, false, '', $classdisabledBecauseInPolicy).' '.ui_print_help_tip(__('Any value over this number is discarted.'), true); $table_advanced->colspan[2][4] = 3; -$table_advanced->data[3][0] = __('Min. Value'); -$table_advanced->colspan[3][1] = 2; - -$table_advanced->data[3][1] = html_print_input_text('min', $min, '', 5, 15, true, $disabledBecauseInPolicy, false, '', $classdisabledBecauseInPolicy).' '.ui_print_help_tip(__('Any value below this number is discarted.'), true); -$table_advanced->data[3][3] = __('Max. Value'); -$table_advanced->data[3][4] = html_print_input_text('max', $max, '', 5, 15, true, $disabledBecauseInPolicy, false, '', $classdisabledBecauseInPolicy).' '.ui_print_help_tip(__('Any value over this number is discarted.'), true); -$table_advanced->colspan[3][4] = 3; - -$table_advanced->data[4][0] = __('Export target'); +$table_advanced->data[3][0] = __('Export target'); // Default text message for export target select and disabled option $none_text = __('None'); $disabled_export = false; @@ -808,7 +622,7 @@ if ($__code_from == 'policies') { $disabled_export = true; } -$table_advanced->data[4][1] = html_print_select_from_sql( +$table_advanced->data[3][1] = html_print_select_from_sql( 'SELECT id, name FROM tserver_export ORDER BY name', 'id_export', $id_export, @@ -820,7 +634,7 @@ $table_advanced->data[4][1] = html_print_select_from_sql( false, $disabled_export ).ui_print_help_tip(__('In case you use an Export server you can link this module and export data to one these.'), true); -$table_advanced->colspan[4][1] = 2; +$table_advanced->colspan[3][1] = 2; // Code comes from module_editor if ($__code_from == 'modules') { @@ -831,18 +645,18 @@ if ($__code_from == 'modules') { $throw_unknown_events_check = policy_module_is_disable_type_event($__id_pol_mod, EVENTS_GOING_UNKNOWN); } -$table_advanced->data[4][3] = __('Discard unknown events'); -$table_advanced->data[4][4] = html_print_checkbox( +$table_advanced->data[3][3] = __('Discard unknown events'); +$table_advanced->data[3][4] = html_print_checkbox( 'throw_unknown_events', 1, $throw_unknown_events_check, true, $disabledBecauseInPolicy ); -$table_advanced->colspan[4][4] = 3; +$table_advanced->colspan[3][4] = 3; -$table_advanced->data[5][0] = __('FF interval'); -$table_advanced->data[5][1] = html_print_input_text( +$table_advanced->data[4][0] = __('FF interval'); +$table_advanced->data[4][1] = html_print_input_text( 'module_ff_interval', $ff_interval, '', @@ -854,14 +668,14 @@ $table_advanced->data[5][1] = html_print_input_text( '', $classdisabledBecauseInPolicy ).ui_print_help_tip(__('Module execution flip flop time interval (in secs).'), true); -$table_advanced->colspan[5][1] = 2; +$table_advanced->colspan[4][1] = 2; -$table_advanced->data[5][3] = __('FF timeout'); +$table_advanced->data[4][3] = __('FF timeout'); $module_type_name = modules_get_type_name($id_module_type); -$table_advanced->data[5][4] = ''; +$table_advanced->data[4][4] = ''; if (preg_match('/async/', $module_type_name) || $edit) { - $table_advanced->data[5][4] .= ''.html_print_input_text( + $table_advanced->data[4][4] .= ''.html_print_input_text( 'ff_timeout', $ff_timeout, '', @@ -873,16 +687,16 @@ if (preg_match('/async/', $module_type_name) || $edit) { } if (!preg_match('/async/', $module_type_name) || $edit) { - $table_advanced->data[5][4] .= ''.__('Disabled').ui_print_help_tip(__('This value can be set only in the async modules.'), true).''; + $table_advanced->data[4][4] .= ''.__('Disabled').ui_print_help_tip(__('This value can be set only in the async modules.'), true).''; } -$table_advanced->colspan[5][4] = 3; +$table_advanced->colspan[4][4] = 3; /* Tags */ // This var comes from module_manager_editor.php or policy_modules.php global $__code_from; -$table_advanced->data[6][0] = __('Tags available'); +$table_advanced->data[5][0] = __('Tags available'); // Code comes from module_editor if ($__code_from == 'modules') { $__table_modules = 'ttag_module'; @@ -902,7 +716,7 @@ if ($__code_from == 'modules') { } if (!tags_has_user_acl_tags($config['id_user'])) { - $table_advanced->data[6][1] = html_print_select_from_sql( + $table_advanced->data[5][1] = html_print_select_from_sql( "SELECT id_tag, name FROM ttag WHERE id_tag NOT IN ( @@ -927,7 +741,7 @@ if (!tags_has_user_acl_tags($config['id_user'])) { if (!empty($user_tags)) { $id_user_tags = array_keys($user_tags); - $table_advanced->data[6][1] = html_print_select_from_sql( + $table_advanced->data[5][1] = html_print_select_from_sql( 'SELECT id_tag, name FROM ttag WHERE id_tag IN ('.implode(',', $id_user_tags).") AND @@ -949,7 +763,7 @@ if (!tags_has_user_acl_tags($config['id_user'])) { '5' ); } else { - $table_advanced->data[6][1] = html_print_select_from_sql( + $table_advanced->data[5][1] = html_print_select_from_sql( "SELECT id_tag, name FROM ttag WHERE id_tag NOT IN ( @@ -972,12 +786,12 @@ if (!tags_has_user_acl_tags($config['id_user'])) { } } -$table_advanced->data[6][2] = html_print_image('images/darrowright.png', true, ['id' => 'right', 'title' => __('Add tags to module')]); +$table_advanced->data[5][2] = html_print_image('images/darrowright.png', true, ['id' => 'right', 'title' => __('Add tags to module')]); // html_print_input_image ('add', 'images/darrowright.png', 1, '', true, array ('title' => __('Add tags to module'))); -$table_advanced->data[6][2] .= '



'.html_print_image('images/darrowleft.png', true, ['id' => 'left', 'title' => __('Delete tags to module')]); +$table_advanced->data[5][2] .= '



'.html_print_image('images/darrowleft.png', true, ['id' => 'left', 'title' => __('Delete tags to module')]); // html_print_input_image ('add', 'images/darrowleft.png', 1, '', true, array ('title' => __('Delete tags to module'))); -$table_advanced->data[6][3] = ''.__('Tags selected').''; -$table_advanced->data[6][4] = html_print_select_from_sql( +$table_advanced->data[5][3] = ''.__('Tags selected').''; +$table_advanced->data[5][4] = html_print_select_from_sql( "SELECT a.id_tag, name FROM ttag a, $__table_modules b WHERE a.id_tag = b.id_tag AND $__id_where = $__id @@ -997,8 +811,8 @@ $table_advanced->data[6][4] = html_print_select_from_sql( ); if ($__code_from == 'modules') { - $table_advanced->data[6][5] = ''.__('Tags from policy').''; - $table_advanced->data[6][6] = html_print_select_from_sql( + $table_advanced->data[5][5] = ''.__('Tags from policy').''; + $table_advanced->data[5][6] = html_print_select_from_sql( "SELECT a.id_tag, name FROM ttag a, $__table_modules b WHERE a.id_tag = b.id_tag AND $__id_where = $__id @@ -1018,9 +832,9 @@ if ($__code_from == 'modules') { ); } -$table_advanced->data[7][0] = __('Quiet'); -$table_advanced->data[7][0] .= ui_print_help_tip(__('The module still stores data but the alerts and events will be stop'), true); -$table_advanced->data[7][1] = html_print_checkbox('quiet_module', 1, $quiet_module, true, $disabledBecauseInPolicy); +$table_advanced->data[6][0] = __('Quiet'); +$table_advanced->data[6][0] .= ui_print_help_tip(__('The module still stores data but the alerts and events will be stop'), true); +$table_advanced->data[6][1] = html_print_checkbox('quiet_module', 1, $quiet_module, true, $disabledBecauseInPolicy); $cps_array[-1] = __('Disabled'); if ($cps_module > 0) { @@ -1037,22 +851,37 @@ if ($cps_module > 0) { $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); -$table_advanced->colspan[7][3] = 5; -$table_advanced->data[7][3] = html_print_select($cps_array, 'cps_module', $cps_module, '', '', 0, true, false, true, '', $disabledBecauseInPolicy); +$table_advanced->data[6][2] = ''; +$table_advanced->data[6][3] = __('Cascade Protection Services'); +$table_advanced->data[6][3] .= ui_print_help_tip(__('Disable the alerts and events of the elements that belong to this service'), true); +$table_advanced->colspan[6][4] = 3; +$table_advanced->data[6][4] = html_print_select($cps_array, 'cps_module', $cps_module, '', '', 0, true, false, true, '', $disabledBecauseInPolicy); + +$textarea_custom_style = ' style="min-height: 0px;"'; + +$table_advanced->data[7][0] = __('Description'); +$table_advanced->colspan[7][1] = 6; +$table_advanced->data[7][1] = html_print_textarea( + 'description', + 3, + 65, + $description, + $disabledTextBecauseInPolicy.$textarea_custom_style, + true, + $largeClassDisabledBecauseInPolicy +); $table_advanced->data[8][0] = __('Critical instructions').ui_print_help_tip(__('Instructions when the status is critical'), true); -$table_advanced->data[8][1] = html_print_textarea('critical_instructions', 2, 65, $critical_instructions, $disabledTextBecauseInPolicy, true, $largeClassDisabledBecauseInPolicy); +$table_advanced->data[8][1] = html_print_textarea('critical_instructions', 3, 65, $critical_instructions, $disabledTextBecauseInPolicy.$textarea_custom_style, true, $largeClassDisabledBecauseInPolicy); $table_advanced->colspan[8][1] = 6; $table_advanced->data[9][0] = __('Warning instructions').ui_print_help_tip(__('Instructions when the status is warning'), true); -$table_advanced->data[9][1] = html_print_textarea('warning_instructions', 2, 65, $warning_instructions, $disabledTextBecauseInPolicy, true, $largeClassDisabledBecauseInPolicy); +$table_advanced->data[9][1] = html_print_textarea('warning_instructions', 3, 65, $warning_instructions, $disabledTextBecauseInPolicy.$textarea_custom_style, true, $largeClassDisabledBecauseInPolicy); $table_advanced->colspan[9][1] = 6; $table_advanced->data[10][0] = __('Unknown instructions').ui_print_help_tip(__('Instructions when the status is unknown'), true); -$table_advanced->data[10][1] = html_print_textarea('unknown_instructions', 2, 65, $unknown_instructions, $disabledTextBecauseInPolicy, true, $largeClassDisabledBecauseInPolicy); +$table_advanced->data[10][1] = html_print_textarea('unknown_instructions', 3, 65, $unknown_instructions, $disabledTextBecauseInPolicy.$textarea_custom_style, true, $largeClassDisabledBecauseInPolicy); $table_advanced->colspan[10][1] = 6; if (isset($id_agente) && $moduletype == MODULE_DATA) { @@ -1112,6 +941,175 @@ if (check_acl($config['id_user'], 0, 'PM')) { $table_advanced->data[13][4] .= html_print_input_hidden('id_category', $id_category, true); } +if (!$in_policy) { + // Cannot select the current module to be itself parent. + $module_parent_filter = ($id_agent_module) ? ['tagente_modulo.id_agente_modulo' => "<>$id_agent_module"] : ''; + $table_advanced->data[15][0] = __('Module parent'); + $modules_can_be_parent = agents_get_modules( + $id_agente, + false, + $module_parent_filter + ); + // If the user cannot have access to parent module, only print the name. + if ($parent_module_id != 0 + && !in_array($parent_module_id, array_keys($modules_can_be_parent)) + ) { + $table_advanced->data[15][1] = db_get_value( + 'nombre', + 'tagente_modulo', + 'id_agente_modulo', + $parent_module_id + ); + } else { + $table_advanced->data[15][1] = html_print_select( + $modules_can_be_parent, + 'parent_module_id', + $parent_module_id, + '', + __('Not assigned'), + '0', + true + ); + } +} + +$table_advanced->data[16][0] = __('Dynamic Threshold Interval'); +$table_advanced->data[16][1] = html_print_extended_select_for_time( + 'dynamic_interval', + $dynamic_interval, + '', + 'None', + '0', + 10, + true, + 'width:150px', + false, + $classdisabledBecauseInPolicy, + $disabledBecauseInPolicy +); +$table_advanced->data[16][1] .= ''.html_print_image('images/cog.png', true, ['title' => __('Advanced options Dynamic Threshold')]).''; + +$table_advanced->cellclass[16][2] = 'hide_dinamic'; +$table_advanced->cellclass[16][3] = 'hide_dinamic'; + + +$table_advanced->data[16][2] = ''.__('Dynamic Threshold Min. ').''; +$table_advanced->data[16][2] .= html_print_input_text( + 'dynamic_min', + $dynamic_min, + '', + 10, + 255, + true, + $disabledBecauseInPolicy, + false, + '', + $classdisabledBecauseInPolicy +); +$table_advanced->data[16][2] .= '
'.__('Dynamic Threshold Max. ').''; +$table_advanced->data[16][2] .= html_print_input_text( + 'dynamic_max', + $dynamic_max, + '', + 10, + 255, + true, + $disabledBecauseInPolicy, + false, + '', + $classdisabledBecauseInPolicy +); +$table_advanced->data[16][3] = ''.__('Dynamic Threshold Two Tailed: ').''; +$table_advanced->data[16][3] .= html_print_checkbox('dynamic_two_tailed', 1, $dynamic_two_tailed, true, $disabledBecauseInPolicy); + + + +// FF stands for Flip-flop. +$table_advanced->data[17][0] = __('FF threshold').' '; + +$table_advanced->data[17][1] .= __('Keep counters'); +$table_advanced->data[17][1] .= html_print_checkbox( + 'ff_type', + 1, + $ff_type, + true, + $disabledBecauseInPolicy +).'
'; + +$table_advanced->data[17][1] .= html_print_radio_button( + 'each_ff', + 0, + '', + $each_ff, + true, + $disabledBecauseInPolicy +); +$table_advanced->data[17][1] .= ' '.__('All state changing').' : '; +$table_advanced->data[17][1] .= html_print_input_text( + 'ff_event', + $ff_event, + '', + 5, + 15, + true, + $disabledBecauseInPolicy, + false, + '', + $classdisabledBecauseInPolicy +).'
'; +$table_advanced->data[17][1] .= html_print_radio_button( + 'each_ff', + 1, + '', + $each_ff, + true, + $disabledBecauseInPolicy +); + +$table_advanced->data[17][1] .= ' '.__('Each state changing').' : '; +$table_advanced->data[17][1] .= __('To normal'); +$table_advanced->data[17][1] .= html_print_input_text( + 'ff_event_normal', + $ff_event_normal, + '', + 5, + 15, + true, + $disabledBecauseInPolicy, + false, + '', + $classdisabledBecauseInPolicy +).' '; + +$table_advanced->data[17][1] .= __('To warning'); +$table_advanced->data[17][1] .= html_print_input_text( + 'ff_event_warning', + $ff_event_warning, + '', + 5, + 15, + true, + $disabledBecauseInPolicy, + false, + '', + $classdisabledBecauseInPolicy +).' '; + +$table_advanced->data[17][1] .= __('To critical'); +$table_advanced->data[17][1] .= html_print_input_text( + 'ff_event_critical', + $ff_event_critical, + '', + 5, + 15, + true, + $disabledBecauseInPolicy, + false, + '', + $classdisabledBecauseInPolicy +); + + // Advanced form part $table_macros = new stdClass(); $table_macros->id = 'module_macros'; From bc96e0b32ad664a05d5524be098b85683205662b Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Fri, 7 Feb 2020 13:59:50 +0100 Subject: [PATCH 2/6] visual changes in module creation --- pandora_console/include/javascript/pandora.js | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/pandora_console/include/javascript/pandora.js b/pandora_console/include/javascript/pandora.js index 99b98ec957..29da1ecc16 100644 --- a/pandora_console/include/javascript/pandora.js +++ b/pandora_console/include/javascript/pandora.js @@ -1523,6 +1523,8 @@ function paint_graph_status( width_x = 101; height_x = 50; + legend_width_x = 190; + legend_height_x = 80; svg .append("g") @@ -1535,8 +1537,8 @@ function paint_graph_status( .attr("width", 300) .attr("height", 300) .append("text") - .attr("x", width_x) - .attr("y", height_x - 20) + .attr("x", legend_width_x + 15) + .attr("y", legend_height_x - 20) .attr("fill", "black") .style("font-family", "arial") .style("font-weight", "bold") @@ -1551,8 +1553,8 @@ function paint_graph_status( .append("g") .append("rect") .attr("id", "legend_normal") - .attr("x", width_x + 80) - .attr("y", height_x - 30) + .attr("x", legend_width_x) + .attr("y", legend_height_x - 30) .attr("width", 10) .attr("height", 10) .style("fill", "#82B92E"); @@ -1561,8 +1563,8 @@ function paint_graph_status( svg .append("g") .append("text") - .attr("x", width_x + 100) - .attr("y", height_x - 20) + .attr("x", legend_width_x + 15) + .attr("y", legend_height_x + 5) .attr("fill", "black") .style("font-family", "arial") .style("font-weight", "bold") @@ -1575,8 +1577,8 @@ function paint_graph_status( .append("g") .append("rect") .attr("id", "legend_warning") - .attr("x", width_x + 185) - .attr("y", height_x - 30) + .attr("x", legend_width_x) + .attr("y", legend_height_x - 5) .attr("width", 10) .attr("height", 10) .style("fill", "#ffd731"); @@ -1585,8 +1587,8 @@ function paint_graph_status( svg .append("g") .append("text") - .attr("x", width_x + 205) - .attr("y", height_x - 20) + .attr("x", legend_width_x + 15) + .attr("y", legend_height_x + 30) .attr("fill", "black") .style("font-family", "arial") .style("font-weight", "bold") @@ -1599,8 +1601,8 @@ function paint_graph_status( .append("g") .append("rect") .attr("id", "legend_critical") - .attr("x", width_x + 285) - .attr("y", height_x - 30) + .attr("x", legend_width_x) + .attr("y", legend_height_x + 20) .attr("width", 10) .attr("height", 10) .style("fill", "#e63c52"); @@ -1624,7 +1626,7 @@ function paint_graph_status( .attr("id", "status_rect") .attr("x", width_x) .attr("y", height_x) - .attr("width", 300) + .attr("width", 75) .attr("height", 200) .style("fill", "#82B92E"); @@ -1641,7 +1643,7 @@ function paint_graph_status( "y", height_x + (range_max - min_w) * position - (max_w - min_w) * position ) - .attr("width", 300) + .attr("width", 75) .attr("height", (max_w - min_w) * position) .style("fill", "#ffd731"); } else { @@ -1653,7 +1655,7 @@ function paint_graph_status( .attr("id", "warning_rect") .attr("x", width_x) .attr("y", height_x + 200 - (min_w - range_min) * position) - .attr("width", 300) + .attr("width", 75) .attr("height", (min_w - range_min) * position) .style("fill", "#ffd731"); @@ -1665,7 +1667,7 @@ function paint_graph_status( .attr("id", "warning_inverse_rect") .attr("x", width_x) .attr("y", height_x) - .attr("width", 300) + .attr("width", 75) .attr( "height", (range_max - min_w) * position - (max_w - min_w) * position @@ -1685,7 +1687,7 @@ function paint_graph_status( "y", height_x + (range_max - min_c) * position - (max_c - min_c) * position ) - .attr("width", 300) + .attr("width", 75) .attr("height", (max_c - min_c) * position) .style("fill", "#e63c52"); } else { @@ -1697,7 +1699,7 @@ function paint_graph_status( .attr("id", "critical_rect") .attr("x", width_x) .attr("y", height_x + 200 - (min_c - range_min) * position) - .attr("width", 300) + .attr("width", 75) .attr("height", (min_c - range_min) * position) .style("fill", "#e63c52"); svg @@ -1708,7 +1710,7 @@ function paint_graph_status( .attr("id", "critical_inverse_rect") .attr("x", width_x) .attr("y", height_x) - .attr("width", 300) + .attr("width", 75) .attr( "height", (range_max - min_c) * position - (max_c - min_c) * position From 58364f90d577a807bef0487a1cfabce75ea32e8e Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Fri, 7 Feb 2020 14:01:59 +0100 Subject: [PATCH 3/6] visual changes in module creation --- pandora_console/include/javascript/pandora.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/javascript/pandora.js b/pandora_console/include/javascript/pandora.js index 29da1ecc16..a3e1476ebd 100644 --- a/pandora_console/include/javascript/pandora.js +++ b/pandora_console/include/javascript/pandora.js @@ -1521,10 +1521,10 @@ function paint_graph_status( //delete elements svg.selectAll("g").remove(); - width_x = 101; - height_x = 50; - legend_width_x = 190; - legend_height_x = 80; + var width_x = 101; + var height_x = 50; + var legend_width_x = 190; + var legend_height_x = 80; svg .append("g") From 526ba3715156e44fbac892e45afa5ef0ad05579b Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Tue, 11 Feb 2020 10:10:03 +0100 Subject: [PATCH 4/6] minor visual change in threshold graph --- pandora_console/include/javascript/pandora.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pandora_console/include/javascript/pandora.js b/pandora_console/include/javascript/pandora.js index a3e1476ebd..9a9c8bcba0 100644 --- a/pandora_console/include/javascript/pandora.js +++ b/pandora_console/include/javascript/pandora.js @@ -1523,7 +1523,7 @@ function paint_graph_status( var width_x = 101; var height_x = 50; - var legend_width_x = 190; + var legend_width_x = 135; var legend_height_x = 80; svg @@ -1626,7 +1626,7 @@ function paint_graph_status( .attr("id", "status_rect") .attr("x", width_x) .attr("y", height_x) - .attr("width", 75) + .attr("width", 20) .attr("height", 200) .style("fill", "#82B92E"); @@ -1643,7 +1643,7 @@ function paint_graph_status( "y", height_x + (range_max - min_w) * position - (max_w - min_w) * position ) - .attr("width", 75) + .attr("width", 20) .attr("height", (max_w - min_w) * position) .style("fill", "#ffd731"); } else { @@ -1655,7 +1655,7 @@ function paint_graph_status( .attr("id", "warning_rect") .attr("x", width_x) .attr("y", height_x + 200 - (min_w - range_min) * position) - .attr("width", 75) + .attr("width", 20) .attr("height", (min_w - range_min) * position) .style("fill", "#ffd731"); @@ -1667,7 +1667,7 @@ function paint_graph_status( .attr("id", "warning_inverse_rect") .attr("x", width_x) .attr("y", height_x) - .attr("width", 75) + .attr("width", 20) .attr( "height", (range_max - min_w) * position - (max_w - min_w) * position @@ -1687,7 +1687,7 @@ function paint_graph_status( "y", height_x + (range_max - min_c) * position - (max_c - min_c) * position ) - .attr("width", 75) + .attr("width", 20) .attr("height", (max_c - min_c) * position) .style("fill", "#e63c52"); } else { @@ -1699,7 +1699,7 @@ function paint_graph_status( .attr("id", "critical_rect") .attr("x", width_x) .attr("y", height_x + 200 - (min_c - range_min) * position) - .attr("width", 75) + .attr("width", 20) .attr("height", (min_c - range_min) * position) .style("fill", "#e63c52"); svg @@ -1710,7 +1710,7 @@ function paint_graph_status( .attr("id", "critical_inverse_rect") .attr("x", width_x) .attr("y", height_x) - .attr("width", 75) + .attr("width", 20) .attr( "height", (range_max - min_c) * position - (max_c - min_c) * position From 87dc92ffd9a72db313831e56a2af936cb116f8d9 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 18 Feb 2020 13:24:22 +0100 Subject: [PATCH 5/6] Ent 5457 suid nodos elastic --- pandora_console/extras/mr/36.sql | 14 ++++++++++++++ .../extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 2 ++ pandora_console/pandoradb.sql | 6 ++++-- pandora_console/pandoradb_data.sql | 3 ++- 4 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 pandora_console/extras/mr/36.sql diff --git a/pandora_console/extras/mr/36.sql b/pandora_console/extras/mr/36.sql new file mode 100644 index 0000000000..2efc2409e7 --- /dev/null +++ b/pandora_console/extras/mr/36.sql @@ -0,0 +1,14 @@ +START TRANSACTION; + +ALTER TABLE `tmetaconsole_setup` ADD COLUMN `server_uid` TEXT NOT NULL default ''; +SET @st_oum744 = (SELECT IF( + (SELECT COUNT(*) FROM tconfig WHERE token LIKE 'server_unique_identifier') > 0, + "SELECT 1", + "INSERT INTO `tconfig` (`token`, `value`) VALUES ('server_unique_identifier', replace(uuid(),'-',''))" +)); + +PREPARE pr_oum744 FROM @st_oum744; +EXECUTE pr_oum744; +DEALLOCATE PREPARE pr_oum744; + +COMMIT; \ No newline at end of file diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql index 20451647a1..d4c9184242 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql @@ -392,6 +392,8 @@ ALTER TABLE `tmetaconsole_setup` MODIFY COLUMN `meta_dbuser` text NULL, MODIFY COLUMN `meta_dbport` text NULL, MODIFY COLUMN `meta_dbname` text NULL; +ALTER TABLE `tmetaconsole_setup` ADD COLUMN `server_uid` TEXT NOT NULL default ''; + -- --------------------------------------------------------------------- -- Table `tprofile_view` -- --------------------------------------------------------------------- diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 741a0dc1d8..46a42ee82c 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -2579,7 +2579,7 @@ CREATE TABLE IF NOT EXISTS `ttrap_custom_values` ( -- Table `tmetaconsole_setup` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `tmetaconsole_setup` ( - `id` int(10) NOT NULL auto_increment primary key, + `id` int(10) NOT NULL auto_increment, `server_name` text, `server_url` text, `dbuser` text, @@ -2596,7 +2596,9 @@ CREATE TABLE IF NOT EXISTS `tmetaconsole_setup` ( `id_group` int(10) unsigned NOT NULL default 0, `api_password` text NOT NULL, `disabled` tinyint(1) unsigned NOT NULL default '0', - `last_event_replication` bigint(20) default '0' + `last_event_replication` bigint(20) default '0', + `server_uid` text NOT NULL default '', + PRIMARY KEY (`id`) ) ENGINE=InnoDB COMMENT = 'Table to store metaconsole sources' DEFAULT CHARSET=utf8; diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 1cdba8578f..fc2e8ce131 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -141,7 +141,8 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('cr_incident_content', ''), ('sample_agent', '0'), ('gotty', '/usr/bin/gotty'), -('custom_module_units', '{"bytes":"bytes","entries":"entries","files":"files","hits":"hits","sessions":"sessions","users":"users","ºC":"ºC","ºF":"ºF"}'); +('custom_module_units', '{"bytes":"bytes","entries":"entries","files":"files","hits":"hits","sessions":"sessions","users":"users","ºC":"ºC","ºF":"ºF"}'), +('server_unique_identifier', replace(uuid(),'-','')); UNLOCK TABLES; -- From a04b92a0bcaaa856fdd3a8cd7c6d3b423c47fd92 Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 19 Feb 2020 09:12:12 +0100 Subject: [PATCH 6/6] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 3f8c5a9cd1..b8dd0aee9f 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.743-200218 +Version: 7.0NG.743-200219 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index bd823fa40a..1b7c0c2f2e 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.743-200218" +pandora_version="7.0NG.743-200219" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 44e7b9f1f3..3f717d5e61 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.743'; -use constant AGENT_BUILD => '200218'; +use constant AGENT_BUILD => '200219'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 9eacce62ca..8934739e61 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.743 -%define release 200218 +%define release 200219 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 5cc3882051..fb91375d8f 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.743 -%define release 200218 +%define release 200219 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index f3bb85ec26..22254f40cd 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.743" -PI_BUILD="200218" +PI_BUILD="200219" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 295f7d2ac1..e89461325d 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{200218} +{200219} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index b596ec6dad..45799836a7 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.743(Build 200218)") +#define PANDORA_VERSION ("7.0NG.743(Build 200219)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 21cc51b41e..165eecc5e8 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.743(Build 200218))" + VALUE "ProductVersion", "(7.0NG.743(Build 200219))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 74667c47ce..0219307dfe 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.743-200218 +Version: 7.0NG.743-200219 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index f75114d9b0..8d9bec4922 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.743-200218" +pandora_version="7.0NG.743-200219" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 2f3820b77b..6ed6083c46 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC200218'; +$build_version = 'PC200219'; $pandora_version = 'v7.0NG.743'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index e9249528f3..abf77439ff 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 55a7424d2c..7add8a2ed7 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.743 -%define release 200218 +%define release 200219 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index e5f4895760..418bbfc0e0 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.743 -%define release 200218 +%define release 200219 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 72d6b998a8..3c3e42ca79 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.743" -PI_BUILD="200218" +PI_BUILD="200219" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 279b9f83c4..e4beba8a4b 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.743 PS200218"; +my $version = "7.0NG.743 PS200219"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 90b93fcf83..a1c6513e02 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.743 PS200218"; +my $version = "7.0NG.743 PS200219"; # save program name for logging my $progname = basename($0);