From eb49bde71f3b10efd1df21a47c7ecc3164b1832c Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Tue, 19 Feb 2019 15:50:14 +0100 Subject: [PATCH 01/38] Ticekt resolved Former-commit-id: b93b1c5cb39239f3b038d55b39e8102de1628742 --- pandora_console/extensions/dbmanager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/extensions/dbmanager.php b/pandora_console/extensions/dbmanager.php index 2aface6996..c924bd3ea9 100644 --- a/pandora_console/extensions/dbmanager.php +++ b/pandora_console/extensions/dbmanager.php @@ -106,7 +106,7 @@ function dbmgr_extension_main() echo '

'; echo "
"; - html_print_textarea('sql', 5, 50, html_entity_decode($sql, ENT_QUOTES)); + html_print_textarea('sql', 5, 50, $sql); echo '
'; echo '
'; echo '
'; From 6ef1c3951af5cc8e82279531fc7b19b23b580f6f Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Thu, 21 Feb 2019 14:04:00 +0100 Subject: [PATCH 02/38] Ticket Changed Former-commit-id: e258f0932398d9fc58a8d097098c83b7bed084c5 --- pandora_console/operation/agentes/status_monitor.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index ada6cd6ec6..953996678a 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -945,7 +945,7 @@ $sql = 'SELECT LIMIT '.$offset.','.$limit_sql; // When you enter for the first time you have less than 4 query params in the url -$first_interaction = count($_GET) > 4; +$first_interaction = count($_GET); // We do not show the modules until the user searches with the filter if ($first_interaction) { if (! defined('METACONSOLE')) { @@ -1032,6 +1032,7 @@ if (($config['dbtype'] == 'oracle') && ($result !== false)) { } } + // Start Build List Result // if (!empty($result)) { From 35ad2f4bb5d7d537bc69804643feedc4f0644ff2 Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Fri, 22 Feb 2019 11:21:38 +0100 Subject: [PATCH 03/38] Validations for default values Former-commit-id: a33139b817ece206a611d5f2678b62c876a8e41f --- .../operation/agentes/status_monitor.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index 953996678a..6e3c26b470 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -63,6 +63,17 @@ $sort = get_parameter('sort', 'none'); $id_module = (int) get_parameter('id_module', 0); $ag_custom_fields = (array) get_parameter('ag_custom_fields', []); $module_option = (int) get_parameter('module_option', 1); +$autosearch = false; + +// It is validated if it receives parameters different from those it has by default +if ($ag_freestring != '' || $moduletype != '' || $datatype != '' + || $ag_modulename != '' || $refr != 0 || $offset != 0 || $status != 4 + || $modulegroup != -1 || $tag_filter != 0 || $sortField != '' + || $sort != '' || $id_module != 0 || $ag_custom_fields != null + || $module_option != 1 +) { + $autosearch = true; +} if (!is_metaconsole()) { $ag_group = (int) get_parameter('ag_group', 0); @@ -947,7 +958,7 @@ $sql = 'SELECT // When you enter for the first time you have less than 4 query params in the url $first_interaction = count($_GET); // We do not show the modules until the user searches with the filter -if ($first_interaction) { +if ($first_interaction || $autosearch) { if (! defined('METACONSOLE')) { $result = db_get_all_rows_sql($sql); From 504a8e9d1a3c0ccb92090d4131b7f39acfa839d1 Mon Sep 17 00:00:00 2001 From: daniel Date: Mon, 25 Feb 2019 13:02:39 +0100 Subject: [PATCH 04/38] fixed warnings php Former-commit-id: d21cb02113c65a7f50a5e29f7f536e85ba5cb945 --- pandora_console/extras/pandora_diag.php | 4 +- .../godmode/groups/modu_group_list.php | 179 ++++--- .../godmode/massive/massive_add_alerts.php | 88 ++-- .../godmode/servers/manage_recontask.php | 109 ++-- .../godmode/servers/manage_recontask_form.php | 479 ++++++++++++++---- pandora_console/include/functions_events.php | 46 +- .../include/functions_pandora_networkmap.php | 293 ++++++----- .../agentes/pandora_networkmap.editor.php | 46 +- .../agentes/pandora_networkmap.view.php | 157 +++--- 9 files changed, 913 insertions(+), 488 deletions(-) diff --git a/pandora_console/extras/pandora_diag.php b/pandora_console/extras/pandora_diag.php index 519b4b32a5..d6cd017087 100644 --- a/pandora_console/extras/pandora_diag.php +++ b/pandora_console/extras/pandora_diag.php @@ -106,7 +106,9 @@ function get_value_sum($arr) { foreach ($arr as $clave) { foreach ($clave as $valor) { - $result += $valor; + if (is_numeric($valor) === true) { + $result += $valor; + } } } diff --git a/pandora_console/godmode/groups/modu_group_list.php b/pandora_console/godmode/groups/modu_group_list.php index f75d46cfd8..9dbc9311a6 100644 --- a/pandora_console/godmode/groups/modu_group_list.php +++ b/pandora_console/godmode/groups/modu_group_list.php @@ -1,17 +1,32 @@ $name]); + $result = db_process_sql_insert( + 'tmodule_group', + ['name' => $name] + ); if ($result) { ui_print_success_message(__('Group successfully created')); } else { - ui_print_error_message(__('There was a problem creating group')); + ui_print_error_message( + __('There was a problem creating group') + ); } } else { - ui_print_error_message(__('Each module group must have a different name')); + ui_print_error_message( + __('Each module group must have a different name') + ); } } else { ui_print_error_message(__('Module group must have a name')); } } -// Update group +// Update group. if ($update_group) { $id_group = (int) get_parameter('id_group'); $name = (string) get_parameter('name'); @@ -98,38 +127,79 @@ if ($update_group) { if ($name) { if (!$check || $subcheck == $name) { - $result = db_process_sql_update('tmodule_group', ['name' => $name], ['id_mg' => $id_group]); + $result = db_process_sql_update( + 'tmodule_group', + ['name' => $name], + ['id_mg' => $id_group] + ); if ($result !== false) { ui_print_success_message(__('Group successfully updated')); } else { - ui_print_error_message(__('There was a problem modifying group')); + ui_print_error_message( + __('There was a problem modifying group') + ); } } else { - ui_print_error_message(__('Each module group must have a different name')); + ui_print_error_message( + __('Each module group must have a different name') + ); } } else { ui_print_error_message(__('Module group must have a name')); } } -// Delete group +// Delete group. if ($delete_group) { $id_group = (int) get_parameter('id_group'); $result = db_process_sql_delete('tmodule_group', ['id_mg' => $id_group]); if ($result) { - $result = db_process_sql_update('tagente_modulo', ['id_module_group' => 0], ['id_module_group' => $id_group]); - db_process_sql_update('tpolicy_modules', ['id_module_group' => 0], ['id_module_group' => $id_group]); - db_process_sql_update('tcontainer_item', ['id_module_group' => 0], ['id_module_group' => $id_group]); - db_process_sql_update('tnetwork_component', ['id_module_group' => 0], ['id_module_group' => $id_group]); - db_process_sql_update('treport_content', ['id_module_group' => 0], ['id_module_group' => $id_group]); - db_process_sql_update('tnetwork_map', ['id_module_group' => 0], ['id_module_group' => $id_group]); - db_process_sql_update('tlocal_component', ['id_module_group' => 0], ['id_module_group' => $id_group]); - db_process_sql_update('treport_content_template', ['id_module_group' => 0], ['id_module_group' => $id_group]); + $result = db_process_sql_update( + 'tagente_modulo', + ['id_module_group' => 0], + ['id_module_group' => $id_group] + ); + db_process_sql_update( + 'tpolicy_modules', + ['id_module_group' => 0], + ['id_module_group' => $id_group] + ); + db_process_sql_update( + 'tcontainer_item', + ['id_module_group' => 0], + ['id_module_group' => $id_group] + ); + db_process_sql_update( + 'tnetwork_component', + ['id_module_group' => 0], + ['id_module_group' => $id_group] + ); + db_process_sql_update( + 'treport_content', + ['id_module_group' => 0], + ['id_module_group' => $id_group] + ); + db_process_sql_update( + 'tnetwork_map', + ['id_module_group' => 0], + ['id_module_group' => $id_group] + ); + db_process_sql_update( + 'tlocal_component', + ['id_module_group' => 0], + ['id_module_group' => $id_group] + ); + db_process_sql_update( + 'treport_content_template', + ['id_module_group' => 0], + ['id_module_group' => $id_group] + ); - // A group with no modules can be deleted, to avoid a message error then do the follwing + // A group with no modules can be deleted, + // to avoid a message error then do the follwing. if ($result !== false) { $result = true; } @@ -150,36 +220,15 @@ $offset = (int) get_parameter('offset', 0); ui_pagination($total_groups, $url, $offset); -switch ($config['dbtype']) { - case 'mysql': - $sql = 'SELECT * - FROM tmodule_group - ORDER BY name ASC - LIMIT '.$offset.', '.$config['block_size']; - break; - case 'postgresql': - $sql = 'SELECT * - FROM tmodule_group - ORDER BY name ASC - LIMIT '.$config['block_size'].' OFFSET '.$offset; - break; - - case 'oracle': - $set = []; - $set['limit'] = $config['block_size']; - $set['offset'] = $offset; - - $sql = 'SELECT * - FROM tmodule_group - ORDER BY name ASC'; - - $sql = oracle_recode_query($sql, $set); - break; -} +$sql = 'SELECT * + FROM tmodule_group + ORDER BY name ASC + LIMIT '.$offset.', '.$config['block_size']; $groups = db_get_all_rows_sql($sql); +$table = new stdClass(); $table->width = '100%'; $table->class = 'databox data'; @@ -210,11 +259,21 @@ if (!empty($groups)) { html_print_table($table); } else { - ui_print_info_message(['no_close' => true, 'message' => __('There are no defined module groups') ]); + ui_print_info_message( + [ + 'no_close' => true, + 'message' => __('There are no defined module groups'), + ] + ); } echo ''; echo '
'; -html_print_submit_button(__('Create module group'), 'crt', false, 'class="sub next"'); +html_print_submit_button( + __('Create module group'), + 'crt', + false, + 'class="sub next"' +); echo '
'; echo ''; diff --git a/pandora_console/godmode/massive/massive_add_alerts.php b/pandora_console/godmode/massive/massive_add_alerts.php index 989a8cd3a8..bf52fd0459 100755 --- a/pandora_console/godmode/massive/massive_add_alerts.php +++ b/pandora_console/godmode/massive/massive_add_alerts.php @@ -1,17 +1,32 @@ $v) { $agents[$keys_prefix.$k] = $v; @@ -92,8 +108,8 @@ function process_manage_add($id_alert_template, $id_agents, $module_names) foreach ($module_names as $module) { foreach ($id_agents as $id_agent) { - $module_id = modules_get_agentmodule_id($module, $id_agent); - $modules_id[] = $module_id['id_agente_modulo']; + $module_id = modules_get_agentmodule_id($module, $id_agent); + $modules_id[] = $module_id['id_agente_modulo']; } } @@ -148,6 +164,7 @@ if (!$own_info['is_admin'] && !check_acl($config['id_user'], 0, 'AW')) { $return_all_group = true; } +$table = new stdClass(); $table->id = 'add_table'; $table->class = 'databox filters'; $table->width = '100%'; @@ -251,10 +268,10 @@ html_print_submit_button(__('Add'), 'go', false, 'class="sub add"'); echo '
'; echo ''; -// TODO: Change to iu_print_error system +// TODO: Change to iu_print_error system. echo ''; -// Hack to translate text "none" in PHP to javascript +// Hack to translate text "none" in PHP to javascript. echo ''; ui_require_jquery_file('form'); @@ -270,42 +287,40 @@ $(document).ready (function () { var get_parameters_count = window.location.href.slice( window.location.href.indexOf('?') + 1).split('&').length; var post_parameters_count = $("#form_alerts").serializeArray().length; - + var count_parameters = get_parameters_count + post_parameters_count; - + if (count_parameters > limit_parameters_massive) { alert(""); return false; } }); - - + $("#checkbox-recursion").click(function () { $("#id_group").trigger("change"); }); - + $("#id_agents").change(agent_changed_by_multiple_agents); - + $("#id_group").change (function () { var $select = $("#id_agents").enable (); $("#agent_loading").show (); $("option", $select).remove (); - + jQuery.post ("ajax.php", {"page" : "godmode/massive/massive_add_alerts", "get_agents" : 1, "id_group" : this.value, "recursion" : $("#checkbox-recursion").is(":checked") ? 1 : 0, - // Add a key prefix to avoid auto sorting in js object conversion + // Add a key prefix to avoid auto sorting in js object conversion. "keys_prefix" : "_" }, function (data, status) { options = ""; jQuery.each (data, function (id, value) { - // Remove keys_prefix from the index + // Remove keys_prefix from the index. id = id.substring(1); - options += ""; }); $("#id_agents").append (options); @@ -315,40 +330,39 @@ $(document).ready (function () { "json" ); }); - + $("#id_group").value = "0"; - + $("#id_group").click ( function () { $(this).css ("width", "auto"); }); - + $("#id_group").blur (function () { $(this).css ("width", "180px"); }); - + $("#id_agents").click ( function () { $(this).css ("width", "auto"); }); - + $("#id_agents").blur (function () { $(this).css ("width", "180px"); }); - + $("#module").click ( function () { $(this).css ("width", "auto"); }); - + $("#module").blur (function () { $(this).css ("width", "180px"); }); - + $("#modules_selection_mode").change (function() { $("#id_agents").trigger('change'); }); - }); /* ]]> */ diff --git a/pandora_console/godmode/servers/manage_recontask.php b/pandora_console/godmode/servers/manage_recontask.php index a76571d54a..00ac75d1da 100644 --- a/pandora_console/godmode/servers/manage_recontask.php +++ b/pandora_console/godmode/servers/manage_recontask.php @@ -1,17 +1,32 @@ $disabled], ['id_rt' => $id]); + $result = db_process_sql_update( + 'trecon_task', + ['disabled' => $disabled], + ['id_rt' => $id] + ); if ($result !== false) { ui_print_success_message(__('Successfully updated recon task')); - // If the action is enabled, we force recon_task to be queued asap + // If the action is enabled, we force recon_task to be queued asap. if ($disabled == 0) { servers_force_recon_task($id); } @@ -73,9 +98,9 @@ if (isset($_GET['delete'])) { } // -------------------------------- -// GET PARAMETERS IF UPDATE OR CREATE +// GET PARAMETERS IF UPDATE OR CREATE. // -------------------------------- -if ((isset($_GET['update'])) or ((isset($_GET['create'])))) { +if ((isset($_GET['update'])) || ((isset($_GET['create'])))) { $name = get_parameter_post('name'); $network = get_parameter_post('network'); $description = get_parameter_post('description'); @@ -115,14 +140,16 @@ if ((isset($_GET['update'])) or ((isset($_GET['create'])))) { $alias_as_name = (int) get_parameter('alias_as_name', 0); $snmp_enabled = (int) get_parameter('snmp_enabled', 0); $vlan_enabled = (int) get_parameter('vlan_enabled', 0); - // Get macros + // Get macros. $macros = (string) get_parameter('macros'); if (!empty($macros)) { $macros = json_decode(base64_decode($macros), true); - foreach ($macros as $k => $m) { - $macros[$k]['value'] = get_parameter($m['macro'], ''); + if (isset($macros) === true && is_array($macros) === true) { + foreach ($macros as $k => $m) { + $macros[$k]['value'] = get_parameter($m['macro'], ''); + } } } @@ -130,7 +157,7 @@ if ((isset($_GET['update'])) or ((isset($_GET['create'])))) { } // -------------------------------- -// UPDATE A RECON TASK +// UPDATE A RECON TASK. // -------------------------------- if (isset($_GET['update'])) { $id = get_parameter_get('update'); @@ -193,10 +220,18 @@ if (isset($_GET['update'])) { $reason = __('Wrong format in Subnet field'); $result = false; } else { - $result = db_process_sql_update('trecon_task', $values, $where); + $result = db_process_sql_update( + 'trecon_task', + $values, + $where + ); } } else { - $result = db_process_sql_update('trecon_task', $values, $where); + $result = db_process_sql_update( + 'trecon_task', + $values, + $where + ); } } else { $result = false; @@ -314,9 +349,9 @@ if (isset($_GET['create'])) { } // -------------------------------- -// SHOW TABLE WITH ALL RECON TASKs +// SHOW TABLE WITH ALL RECON TASKs. // -------------------------------- -// Pandora Admin must see all columns +// Pandora Admin must see all columns. if (! check_acl($config['id_user'], 0, 'PM')) { $sql = sprintf( 'SELECT * @@ -377,26 +412,26 @@ if ($result !== false) { if ($row['id_recon_script'] == 0) { - // Network recon task + // Network recon task. $data[2] = html_print_image('images/network.png', true, ['title' => __('Network recon task')]).'  '; $data[2] .= network_profiles_get_name($row['id_network_profile']); $mode_name = ''; } else { - // APP recon task + // APP recon task. $data[2] = html_print_image('images/plugin.png', true).'  '; $mode_name = db_get_sql(sprintf('SELECT name FROM trecon_script WHERE id_recon_script = %d', $row['id_recon_script'])); $data[2] .= $mode_name; } - // GROUP + // GROUP. if ($row['id_recon_script'] == 0) { $data[3] = ui_print_group_icon($row['id_group'], true); } else { $data[3] = '-'; } - // SNMP VERSION + // SNMP VERSION. if ($row['snmp_version'] == '1') { $data[4] = 'v. 1'; } else if ($row['snmp_version'] == '2') { @@ -409,31 +444,31 @@ if ($result !== false) { - // INCIDENT + // INCIDENT. $data[5] = (($row['create_incident'] == 1) ? __('Yes') : __('No')); - // OS + // OS. if ($row['id_recon_script'] == 0) { $data[6] = (($row['id_os'] > 0) ? ui_print_os_icon($row['id_os'], false, true) : __('Any')); } else { $data[6] = '-'; } - // INTERVAL + // INTERVAL. if ($row['interval_sweep'] == 0) { $data[7] = __('Manual'); } else { $data[7] = human_time_description_raw($row['interval_sweep']); } - // PORTS + // PORTS. if ($row['id_recon_script'] == 0) { $data[8] = substr($row['recon_ports'], 0, 15); } else { $data[8] = '-'; } - // ACTION + // ACTION. $task_group = $row['id_group']; if (in_array($task_group, $user_groups_w)) { diff --git a/pandora_console/godmode/servers/manage_recontask_form.php b/pandora_console/godmode/servers/manage_recontask_form.php index c47416afd7..37947900b4 100644 --- a/pandora_console/godmode/servers/manage_recontask_form.php +++ b/pandora_console/godmode/servers/manage_recontask_form.php @@ -1,17 +1,32 @@ rowclass[14] = 'recon_script'; $table->rowclass[15] = 'recon_script'; $table->rowclass[16] = 'recon_script'; $table->rowclass[17] = 'recon_script'; -// Name +// Name. $table->data[0][0] = ''.__('Task name').''; $table->data[0][1] = html_print_input_text('name', $name, '', 25, 0, true); -// Recon server +// Recon server. $table->data[1][0] = ''.__('Recon server').ui_print_help_tip( __('You must select a Recon Server for the Task, otherwise the Recon Task will never run'), true @@ -258,7 +301,15 @@ $sql = 'SELECT id_server, name FROM tserver WHERE server_type = 3 ORDER BY name'; -$table->data[1][1] = html_print_select_from_sql($sql, 'id_recon_server', $id_recon_server, '', '', '', true); +$table->data[1][1] = html_print_select_from_sql( + $sql, + 'id_recon_server', + $id_recon_server, + '', + '', + '', + true +); $fields['network_sweep'] = __('Network sweep'); if (!$is_windows) { @@ -267,44 +318,94 @@ if (!$is_windows) { $table->data[2][0] = ''.__('Mode').''; -$table->data[2][1] = html_print_select($fields, 'mode', $mode, '', '', 0, true); +$table->data[2][1] = html_print_select( + $fields, + 'mode', + $mode, + '', + '', + 0, + true +); -// Network +// Network. $table->data[3][0] = ''.__('Network').''; -$table->data[3][0] .= ui_print_help_tip(__('You can specify several networks, separated by commas, for example: 192.168.50.0/24,192.168.60.0/24'), true); -$table->data[3][1] = html_print_input_text('network', $network, '', 25, 0, true); +$table->data[3][0] .= ui_print_help_tip( + __('You can specify several networks, separated by commas, for example: 192.168.50.0/24,192.168.60.0/24'), + true +); +$table->data[3][1] = html_print_input_text( + 'network', + $network, + '', + 25, + 0, + true +); -// Interval +// Interval. $interv_manual = 0; if ((int) $interval == 0) { $interv_manual = 1; } $table->data[4][0] = ''.__('Interval'); -$table->data[4][0] .= ui_print_help_tip(__('Manual interval means that it will be executed only On-demand'), true); +$table->data[4][0] .= ui_print_help_tip( + __('Manual interval means that it will be executed only On-demand'), + true +); $values = [ 0 => __('Defined'), 1 => __('Manual'), ]; -$table->data[4][1] = html_print_select($values, 'interval_manual_defined', $interv_manual, '', '', '', true); +$table->data[4][1] = html_print_select( + $values, + 'interval_manual_defined', + $interv_manual, + '', + '', + '', + true +); $table->data[4][1] .= ''; -$table->data[4][1] .= html_print_extended_select_for_time('interval', $interval, '', '', '0', false, true, false, false); -$table->data[4][1] .= ui_print_help_tip(__('The minimum recomended interval for Recon Task is 5 minutes'), true); +$table->data[4][1] .= html_print_extended_select_for_time( + 'interval', + $interval, + '', + '', + '0', + false, + true, + false, + false +); +$table->data[4][1] .= ui_print_help_tip( + __('The minimum recomended interval for Recon Task is 5 minutes'), + true +); $table->data[4][1] .= ''; -// Module template +// Module template. $table->data[5][0] = ''.__('Module template').''; $sql = 'SELECT id_np, name FROM tnetwork_profile ORDER BY name'; -$table->data[5][1] = html_print_select_from_sql($sql, 'id_network_profile', $id_network_profile, '', __('None'), 0, true); +$table->data[5][1] = html_print_select_from_sql( + $sql, + 'id_network_profile', + $id_network_profile, + '', + __('None'), + 0, + true +); -// Recon script +// Recon script. $data[1] = ''; $table->data[6][0] = ''.__('Recon script').''; @@ -314,35 +415,72 @@ $sql = "SELECT id_recon_script, name WHERE name <> 'IPAM Recon' ORDER BY name"; if ($name_script != 'IPAM Recon') { - $table->data[6][1] = html_print_select_from_sql($sql, 'id_recon_script', $id_recon_script, '', '', '', true); + $table->data[6][1] = html_print_select_from_sql( + $sql, + 'id_recon_script', + $id_recon_script, + '', + '', + '', + true + ); $table->data[6][1] .= "'; - $table->data[6][1] .= $data[1] .= html_print_input_hidden('macros', base64_encode($macros), true); + $table->data[6][1] .= $data[1] .= html_print_input_hidden( + 'macros', + base64_encode($macros), + true + ); } else { $table->data[6][1] = 'IPAM Recon'; } -// OS +// OS. $table->data[7][0] = ''.__('OS').''; $sql = 'SELECT id_os, name FROM tconfig_os ORDER BY name'; -$table->data[7][1] = html_print_select_from_sql($sql, 'id_os', $id_os, '', __('Any'), -1, true); +$table->data[7][1] = html_print_select_from_sql( + $sql, + 'id_os', + $id_os, + '', + __('Any'), + -1, + true +); -// Recon ports +// Recon ports. $table->data[8][0] = ''.__('Ports').''; -$table->data[8][1] = html_print_input_text('recon_ports', $recon_ports, '', 25, 0, true); +$table->data[8][1] = html_print_input_text( + 'recon_ports', + $recon_ports, + '', + 25, + 0, + true +); $table->data[8][1] .= ui_print_help_tip( __('Ports defined like: 80 or 80,443,512 or even 0-1024 (Like Nmap command line format). If dont want to do a sweep using portscan, left it in blank'), true ); -// Group +// Group. $table->data[9][0] = ''.__('Group'); $groups = users_get_groups(false, 'PM', false); -$table->data[9][1] = html_print_select_groups(false, 'PM', false, 'id_group', $id_group, '', '', 0, true); +$table->data[9][1] = html_print_select_groups( + false, + 'PM', + false, + 'id_group', + $id_group, + '', + '', + 0, + true +); -// Incident +// Incident. $values = [ 0 => __('No'), 1 => __('Yes'), @@ -356,24 +494,50 @@ $table->data[10][1] = html_print_select( '', '', true -).' '.ui_print_help_tip(__('Choose if the discovery of a new system creates an incident or not.'), true); +).' '.ui_print_help_tip( + __('Choose if the discovery of a new system creates an incident or not.'), + true +); -// snmp_enabled +// Snmp_enabled. $table->data[11][0] = ''.__('SNMP enabled'); -$table->data[11][1] = html_print_checkbox('snmp_enabled', 1, $snmp_enabled, true); +$table->data[11][1] = html_print_checkbox( + 'snmp_enabled', + 1, + $snmp_enabled, + true +); -// SNMP default community +// SNMP default community. $table->data[12][0] = ''.__('SNMP Default community'); -$table->data[12][0] .= ui_print_help_tip(__('You can specify several values, separated by commas, for example: public,mysecret,1234'), true); -$table->data[12][1] = html_print_input_text('snmp_community', $snmp_community, '', 35, 0, true); +$table->data[12][0] .= ui_print_help_tip( + __('You can specify several values, separated by commas, for example: public,mysecret,1234'), + true +); +$table->data[12][1] = html_print_input_text( + 'snmp_community', + $snmp_community, + '', + 35, + 0, + true +); -// SNMP version +// SNMP version. $snmp_versions['1'] = 'v. 1'; $snmp_versions['2'] = 'v. 2'; $snmp_versions['2c'] = 'v. 2c'; $snmp_versions['3'] = 'v. 3'; $table->data[24][0] = ''._('SNMP version'); -$table->data[24][1] = html_print_select($snmp_versions, 'snmp_version', $snmp_version, '', '', 0, true); +$table->data[24][1] = html_print_select( + $snmp_versions, + 'snmp_version', + $snmp_version, + '', + '', + 0, + true +); $table->data[25][0] = ''.__('Auth user'); $table->data[25][1] = html_print_input_text( @@ -400,10 +564,30 @@ $table->data[26][1] = html_print_input_password( false, '' ); -$table->data[26][1] .= html_print_input_hidden_extended('active_snmp_v3', 0, 'active_snmp_v3_mmen', true); +$table->data[26][1] .= html_print_input_hidden_extended( + 'active_snmp_v3', + 0, + 'active_snmp_v3_mmen', + true +); $table->data[27][0] = ''.__('Privacy method'); -$table->data[27][1] = html_print_select(['DES' => __('DES'), 'AES' => __('AES')], 'snmp_privacy_method', $snmp3_privacy_method, '', '', '', true, false, false, '', ''); +$table->data[27][1] = html_print_select( + [ + 'DES' => __('DES'), + 'AES' => __('AES'), + ], + 'snmp_privacy_method', + $snmp3_privacy_method, + '', + '', + '', + true, + false, + false, + '', + '' +); $table->data[28][0] = ''.__('Privacy pass').ui_print_help_tip(__('The pass length must be eight character minimum.'), true); $table->data[28][1] = html_print_input_password( 'snmp_privacy_pass', @@ -417,7 +601,22 @@ $table->data[28][1] = html_print_input_password( '' ); $table->data[29][0] = ''.__('Auth method'); -$table->data[29][1] = html_print_select(['MD5' => __('MD5'), 'SHA' => __('SHA')], 'snmp_auth_method', $snmp3_auth_method, '', '', '', true, false, false, '', ''); +$table->data[29][1] = html_print_select( + [ + 'MD5' => __('MD5'), + 'SHA' => __('SHA'), + ], + 'snmp_auth_method', + $snmp3_auth_method, + '', + '', + '', + true, + false, + false, + '', + '' +); $table->data[30][0] = ''.__('Security level'); $table->data[30][1] = html_print_select( [ @@ -437,75 +636,139 @@ $table->data[30][1] = html_print_select( '' ); -// Explanation -$explanation = db_get_value('description', 'trecon_script', 'id_recon_script', $id_recon_script); +// Explanation. +$explanation = db_get_value( + 'description', + 'trecon_script', + 'id_recon_script', + $id_recon_script +); $table->data[13][0] = ''.__('Explanation').''; $table->data[13][1] = "'.html_print_textarea('explanation', 4, 60, $explanation, 'style="width: 388px;"', true); -// A hidden "model row" to clone it from javascript to add fields dynamicaly +// A hidden "model row" to clone it from javascript to add fields dynamicaly. $data = []; $data[0] = 'macro_desc'; $data[0] .= ui_print_help_tip('macro_help', true); -$data[1] = html_print_input_text('macro_name', 'macro_value', '', 100, 255, true); +$data[1] = html_print_input_text( + 'macro_name', + 'macro_value', + '', + 100, + 255, + true +); $table->colspan['macro_field'][1] = 3; $table->rowstyle['macro_field'] = 'display:none'; $table->data['macro_field'] = $data; -// If there are $macros, we create the form fields +// If there are $macros, we create the form fields. if (!empty($macros)) { $macros = json_decode($macros, true); - foreach ($macros as $k => $m) { - $data = []; - $data[0] = ''.$m['desc'].''; - if (!empty($m['help'])) { - $data[0] .= ui_print_help_tip($m['help'], true); + if (isset($macros) === true + && is_array($macros) === true + ) { + foreach ($macros as $k => $m) { + $data = []; + $data[0] = ''.$m['desc'].''; + if (!empty($m['help'])) { + $data[0] .= ui_print_help_tip($m['help'], true); + } + + if ($m['hide']) { + $data[1] = html_print_input_password( + $m['macro'], + $m['value'], + '', + 100, + 255, + true + ); + } else { + $data[1] = html_print_input_text( + $m['macro'], + $m['value'], + '', + 100, + 255, + true + ); + } + + $table->colspan['macro'.$m['macro']][1] = 3; + $table->rowclass['macro'.$m['macro']] = 'macro_field'; + + $table->data['macro'.$m['macro']] = $data; } - - if ($m['hide']) { - $data[1] = html_print_input_password($m['macro'], $m['value'], '', 100, 255, true); - } else { - $data[1] = html_print_input_text($m['macro'], $m['value'], '', 100, 255, true); - } - - $table->colspan['macro'.$m['macro']][1] = 3; - $table->rowclass['macro'.$m['macro']] = 'macro_field'; - - $table->data['macro'.$m['macro']] = $data; } } -// Comments +// Comments. $table->data[18][0] = ''.__('Comments'); -$table->data[18][1] = html_print_input_text('description', $description, '', 45, 0, true); +$table->data[18][1] = html_print_input_text( + 'description', + $description, + '', + 45, + 0, + true +); -// OS detection +// OS detection. $table->data[19][0] = ''.__('OS detection'); -$table->data[19][1] = html_print_checkbox('os_detect', 1, $os_detect, true); +$table->data[19][1] = html_print_checkbox( + 'os_detect', + 1, + $os_detect, + true +); -// Name resolution +// Name resolution. $table->data[20][0] = ''.__('Name resolution'); -$table->data[20][1] = html_print_checkbox('resolve_names', 1, $resolve_names, true); +$table->data[20][1] = html_print_checkbox( + 'resolve_names', + 1, + $resolve_names, + true +); -// Parent detection +// Parent detection. $table->data[21][0] = ''.__('Parent detection'); -$table->data[21][1] = html_print_checkbox('parent_detection', 1, $parent_detection, true); +$table->data[21][1] = html_print_checkbox( + 'parent_detection', + 1, + $parent_detection, + true +); -// Parent recursion +// Parent recursion. $table->data[22][0] = ''.__('Parent recursion'); -$table->data[22][1] = html_print_input_text('parent_recursion', $parent_recursion, '', 5, 0, true).ui_print_help_tip(__('Maximum number of parent hosts that will be created if parent detection is enabled.'), true); +$table->data[22][1] = html_print_input_text( + 'parent_recursion', + $parent_recursion, + '', + 5, + 0, + true +).ui_print_help_tip( + __('Maximum number of parent hosts that will be created if parent detection is enabled.'), + true +); -// vlan_enabled +// Vlan_enabled. $table->data[23][0] = ''.__('Vlan enabled'); -$table->data[23][1] = html_print_checkbox('vlan_enabled', 1, $vlan_enabled, true); +$table->data[23][1] = html_print_checkbox( + 'vlan_enabled', + 1, + $vlan_enabled, + true +); -// Alias as name // NOTE: The 7.0NG Recon Server will not generate random names, since IP // address collisions could have other consequences. -// $table->data[22][0] = "".__('Alias as Name'); -// $table->data[22][1] = html_print_checkbox ('alias_as_name', 1, $alias_as_name, true); -// Different Form url if it's a create or if it's a update form +// Different Form url if it's a create or if it's a update form. echo '
'; html_print_table($table); echo '
'; @@ -529,23 +792,23 @@ ui_require_javascript_file('pandora_modules'); \ No newline at end of file + From de7c1ce978f508e071aad2923b6dbe7358dfd98b Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Tue, 26 Feb 2019 09:40:04 +0100 Subject: [PATCH 05/38] Fixed ACL selection menu wrong sec for visual console Former-commit-id: dd9f4a212f43774c2602932baa0c1a83e3ba6e56 --- pandora_console/include/functions_menu.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pandora_console/include/functions_menu.php b/pandora_console/include/functions_menu.php index 39e5adf455..7012094570 100644 --- a/pandora_console/include/functions_menu.php +++ b/pandora_console/include/functions_menu.php @@ -510,8 +510,6 @@ function menu_add_extras(&$menu) $menu_extra['workspace']['sub']['operation/incidents/incident_detail']['text'] = __('Manage incident'); - $menu_extra['reporting']['sub']['godmode/reporting/visual_console_builder']['text'] = __('Manage visual console'); - // Duplicate extensions as sec=extension to check it from url foreach ($menu as $k => $m) { if (!isset($m['sub'])) { @@ -649,6 +647,7 @@ function menu_get_sec_pages($sec, $menu_hash=false) /** * Get the pages in a section2 + * $menu * * @param string sec code * @param string menu hash. All the menu structure (For example From 8780571a74085fa0a26cf90c7b269938311ec0d8 Mon Sep 17 00:00:00 2001 From: daniel Date: Wed, 27 Feb 2019 10:59:44 +0100 Subject: [PATCH 06/38] add new functionality in event response Former-commit-id: 2cf28b95c068c40e79b8f05b212aad0f720de79b --- pandora_console/include/ajax/events.php | 96 +++++++++++++- .../include/javascript/pandora_events.js | 82 ++++++++++-- .../operation/events/events.build_table.php | 119 ++++++++++++------ pandora_console/operation/events/events.php | 1 + 4 files changed, 243 insertions(+), 55 deletions(-) diff --git a/pandora_console/include/ajax/events.php b/pandora_console/include/ajax/events.php index 9d327bb540..0d7d3f5a9f 100644 --- a/pandora_console/include/ajax/events.php +++ b/pandora_console/include/ajax/events.php @@ -54,6 +54,7 @@ $table_events = get_parameter('table_events', 0); $total_events = (bool) get_parameter('total_events'); $total_event_graph = (bool) get_parameter('total_event_graph'); $graphic_event_group = (bool) get_parameter('graphic_event_group'); +$get_table_response_command = (bool) get_parameter('get_table_response_command'); if ($get_event_name) { $event_id = get_parameter('event_id'); @@ -116,6 +117,7 @@ if ($get_response_target) { } echo events_get_response_target($event_id, $response_id, $server_id); + return; } @@ -129,6 +131,7 @@ if ($get_response) { } echo json_encode($event_response); + return; } @@ -136,6 +139,7 @@ if ($perform_event_response) { global $config; $command = get_parameter('target', ''); + $response_id = get_parameter('response_id'); $event_response = db_get_row('tevent_response', 'id', $response_id); @@ -148,7 +152,11 @@ if ($perform_event_response) { 'nano', ]; - $server_data = db_get_row('tserver', 'id_server', $event_response['server_to_exec']); + $server_data = db_get_row( + 'tserver', + 'id_server', + $event_response['server_to_exec'] + ); if (in_array(strtolower($command), $commandExclusions)) { echo 'Only stdin/stdout commands are supported'; @@ -234,13 +242,29 @@ if ($dialogue_event_response) { ); echo '

'; - echo "'; + echo "'; echo "
"; if ($end) { echo "
'; } } else { @@ -796,3 +820,67 @@ if ($graphic_event_group) { echo $prueba; return; } + +if ($get_table_response_command) { + global $config; + + $response_id = get_parameter('event_response_id'); + $params_string = db_get_value( + 'params', + 'tevent_response', + 'id', + $response_id + ); + + $params = explode(',', $params_string); + + $table = new stdClass; + $table->id = 'events_responses_table_command'; + $table->width = '90%'; + $table->styleTable = 'text-align:center; margin: 0 auto;'; + + $table->style = []; + $table->style[0] = 'text-align:center;'; + $table->style[1] = 'text-align:center;'; + + $table->head = []; + $table->head[0] = __('Commands'); + $table->head[0] .= ui_print_help_tip( + __('These commands will apply to all selected events'), + true + ); + $table->head[1] = __('Value'); + + if (isset($params) === true + && is_array($params) === true + ) { + foreach ($params as $key => $value) { + $table->data[$key][0] = $value; + $table->data[$key][1] = html_print_input_text( + $value.'-'.$key, + '', + '', + 50, + 255, + true, + false, + false, + '', + 'response_command_input' + ); + } + } + + echo ''; + echo html_print_table($table, true); + echo '
'; + echo html_print_submit_button( + __('Execute'), + 'enter_command', + false, + 'class="sub next" style="float:right; margin-top:15px; margin-right:25px;"', + true + ); + + return; +} diff --git a/pandora_console/include/javascript/pandora_events.js b/pandora_console/include/javascript/pandora_events.js index 8fbef6b03d..42d67fffd6 100644 --- a/pandora_console/include/javascript/pandora_events.js +++ b/pandora_console/include/javascript/pandora_events.js @@ -241,6 +241,7 @@ function show_massive_response_dialog( }, close: function(event, ui) { $(".chk_val").prop("checked", false); + $("#event_response_command_window").dialog("close"); }, width: response["modal_width"], height: response["modal_height"] @@ -375,7 +376,12 @@ function add_row_param(id_table, param) { } // Get an event response from db -function get_response_target(event_id, response_id, server_id) { +function get_response_target( + event_id, + response_id, + server_id, + response_command +) { var ajax_file = $("#hidden-ajax_file").val(); var target = ""; @@ -400,15 +406,21 @@ function get_response_target(event_id, response_id, server_id) { } }); - // Replace the custom params macros + // Replace the custom params macros. var response_params = get_response_params(response_id); - if (response_params.length > 1 || response_params[0] != "") { for (i = 0; i < response_params.length; i++) { - target = target.replace( - "_" + response_params[i] + "_", - $("#" + response_params[i]).val() - ); + if (!response_command) { + target = target.replace( + "_" + response_params[i] + "_", + $("#" + response_params[i]).val() + ); + } else { + target = target.replace( + "_" + response_params[i] + "_", + response_command[response_params[i] + "-" + i] + ); + } } } @@ -459,10 +471,6 @@ function perform_response_massive(target, response_id, out_iterator) { $("#response_loading_command_" + out_iterator).show(); $("#response_out_" + out_iterator).html(""); - var finished = 0; - var time = Math.round(+new Date() / 1000); - var timeout = time + 10; - var params = []; params.push("page=include/ajax/events"); params.push("perform_event_response=1"); @@ -487,7 +495,7 @@ function perform_response_massive(target, response_id, out_iterator) { return false; } -// Change the status of an event to new, in process or validated +// Change the status of an event to new, in process or validated. function event_change_status(event_ids) { var ajax_file = $("#hidden-ajax_file").val(); @@ -681,3 +689,53 @@ function show_events_group_agent(id_insert, id_agent, server_id) { } }); } + +function show_event_response_command_dialog(id, response, total_checked) { + var ajax_file = $("#hidden-ajax_file").val(); + + var params = []; + params.push("page=include/ajax/events"); + params.push("get_table_response_command=1"); + params.push("event_response_id=" + id); + + jQuery.ajax({ + data: params.join("&"), + type: "POST", + url: (action = ajax_file), + dataType: "html", + success: function(data) { + $("#event_response_command_window") + .hide() + .empty() + .append(data) + .dialog({ + resizable: true, + draggable: true, + modal: false, + open: function() { + $("#response_loading_dialog").hide(); + $("#button-submit_event_response").show(); + }, + width: 600, + height: 300 + }) + .show(); + + $("#submit-enter_command").on("click", function(e) { + e.preventDefault(); + var response_command = []; + + $(".response_command_input").each(function() { + response_command[$(this).attr("name")] = $(this).val(); + }); + + check_massive_response_event( + id, + response, + total_checked, + response_command + ); + }); + } + }); +} diff --git a/pandora_console/operation/events/events.build_table.php b/pandora_console/operation/events/events.build_table.php index a9e319c82a..d38bd1918e 100644 --- a/pandora_console/operation/events/events.build_table.php +++ b/pandora_console/operation/events/events.build_table.php @@ -988,6 +988,10 @@ if ($group_rep == 2) { 'A maximum of %s event custom responses can be selected', $config['max_execution_event_response'] ).''; + echo ''; echo ''; } } @@ -995,12 +999,14 @@ if ($group_rep == 2) { ?> "; echo "
"; +echo "
"; ui_require_jquery_file('bgiframe'); ui_require_javascript_file('pandora_events'); From 95b5c4ad0172e75dd9376a71b9e0e37a80b8b66c Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 28 Feb 2019 12:30:01 +0100 Subject: [PATCH 07/38] add new macro for alert events Former-commit-id: 08c5bf0168bcd5d9c23a23443187870269d61a40 --- pandora_console/include/help/en/help_alert_config.php | 1 + pandora_console/include/help/en/help_alert_macros.php | 1 + pandora_console/include/help/es/help_alert_config.php | 1 + pandora_console/include/help/es/help_alert_macros.php | 1 + pandora_console/include/help/ja/help_alert_config.php | 1 + pandora_console/include/help/ja/help_alert_macros.php | 1 + 6 files changed, 6 insertions(+) diff --git a/pandora_console/include/help/en/help_alert_config.php b/pandora_console/include/help/en/help_alert_config.php index c210a3164e..a78e468107 100644 --- a/pandora_console/include/help/en/help_alert_config.php +++ b/pandora_console/include/help/en/help_alert_config.php @@ -52,6 +52,7 @@ Apart from the defined module macros, the following macros are also available:
  • _event_extra_id_ : (Only event alerts) Extra id.
  • _event_id_: (Only event alerts) ID of the event that triggered the alert.
  • _event_text_severity_: (Only event alerts) Event text severity (Maintenance, Informational, Normal Minor, Warning, Major, Critical).
  • +
  • _eventTimestamp_: Timestamp in which the event was created.
  • _field1_: User defined field 1.
  • _field2_: User defined field 2.
  • _field3_: User defined field 3.
  • diff --git a/pandora_console/include/help/en/help_alert_macros.php b/pandora_console/include/help/en/help_alert_macros.php index 16ee3a91dd..9d730cfcc9 100644 --- a/pandora_console/include/help/en/help_alert_macros.php +++ b/pandora_console/include/help/en/help_alert_macros.php @@ -37,6 +37,7 @@ Besides the defined module macros, the following macros are available:
  • _event_extra_id_: (Only event alerts) Extra id.
  • _event_id_: (Only event alerts) ID of the event that triggered the alert.
  • _event_text_severity_: (Only event alerts) Event text severity (Maintenance, Informational, Normal Minor, Warning, Major, Critical).
  • +
  • _eventTimestamp_: Timestamp in which the event was created.
  • _field1_: User defined field 1.
  • _field2_: User defined field 2.
  • _field3_: User defined field 3.
  • diff --git a/pandora_console/include/help/es/help_alert_config.php b/pandora_console/include/help/es/help_alert_config.php index 3c6d0b8e53..ec219d87ca 100644 --- a/pandora_console/include/help/es/help_alert_config.php +++ b/pandora_console/include/help/es/help_alert_config.php @@ -54,6 +54,7 @@ Además de las macros de módulo definidas, las siguientes macros están disponi
  • _event_extra_id_ : (Solo alertas de evento) Id extra.
  • _event_id_: (Solo alertas de evento) Id del evento que disparó la alerta.
  • _event_text_severity_: (Solo alertas de evento) Prioridad en texto de el evento que dispara la alerta (Maintenance, Informational, Normal Minor, Warning, Major, Critical).
  • +
  • _eventTimestamp_: Timestamp en el que se creo el evento.
  • _field1_: Campo 1 definido por el usuario.
  • _field2_: Campo 2 definido por el usuario.
  • _field3_: Campo 3 definido por el usuario.
  • diff --git a/pandora_console/include/help/es/help_alert_macros.php b/pandora_console/include/help/es/help_alert_macros.php index de420b31c7..75e627f19a 100644 --- a/pandora_console/include/help/es/help_alert_macros.php +++ b/pandora_console/include/help/es/help_alert_macros.php @@ -37,6 +37,7 @@ Además de las macros de módulo definidas, las siguientes macros están disponi
  • _event_extra_id_ : (Solo alertas de evento) Id extra.
  • _event_id_: (Solo alertas de evento) Id del evento que disparó la alerta.
  • _event_text_severity_:(Solo alertas de evento) Prioridad en texto de el evento que dispara la alerta (Maintenance, Informational, Normal Minor, Warning, Major, Critical).
  • +
  • _eventTimestamp_: Timestamp en el que se creo el evento.
  • _field1_: Campo 1 definido por el usuario.
  • _field2_: Campo 2 definido por el usuario.
  • _field3_: Campo 3 definido por el usuario.
  • diff --git a/pandora_console/include/help/ja/help_alert_config.php b/pandora_console/include/help/ja/help_alert_config.php index 21e12b1baf..b606b1571f 100644 --- a/pandora_console/include/help/ja/help_alert_config.php +++ b/pandora_console/include/help/ja/help_alert_config.php @@ -53,6 +53,7 @@ email アクションを設定するには、_field1_ (送信先アドレス)、
  • _event_extra_id_: (イベントアラートのみ) 拡張 ID
  • _event_id_ : (イベントアラートのみ) アラート発生元のイベントID
  • _event_text_severity_ : (イベントアラートのみ) イベント(アラートの発生元)のテキストでの重要度 (Maintenance, Informational, Normal Minor, Warning, Major, Critical)
  • +
  • _eventTimestamp_: Timestamp in which the event was created.
  • _field1_ : ユーザ定義フィールド1
  • _field2_ : ユーザ定義フィールド2
  • _field3_ : ユーザ定義フィールド3
  • diff --git a/pandora_console/include/help/ja/help_alert_macros.php b/pandora_console/include/help/ja/help_alert_macros.php index 73ca00126e..36ff609741 100644 --- a/pandora_console/include/help/ja/help_alert_macros.php +++ b/pandora_console/include/help/ja/help_alert_macros.php @@ -37,6 +37,7 @@
  • _event_extra_id_: (Only event alerts) Extra id.
  • _event_id_ : (イベントアラートのみ) アラート発生元のイベントID
  • _event_text_severity_ : (イベントアラートのみ) イベント(アラートの発生元)のテキストでの重要度 (Maintenance, Informational, Normal Minor, Warning, Major, Critical)
  • +
  • _eventTimestamp_: Timestamp in which the event was created.
  • _field1_ : ユーザ定義フィールド1
  • _field2_ : ユーザ定義フィールド2
  • _field3_ : ユーザ定義フィールド3
  • From cefaccb6511f59b1c7d46d24911811f8a0c338a1 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 28 Feb 2019 13:02:59 +0100 Subject: [PATCH 08/38] Fixed synchronize collections in node Former-commit-id: d48015ff7c41298fa87cbb5cf1f298beac501719 --- pandora_console/include/functions_filemanager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_filemanager.php b/pandora_console/include/functions_filemanager.php index fa51e3ad12..a249760f4c 100644 --- a/pandora_console/include/functions_filemanager.php +++ b/pandora_console/include/functions_filemanager.php @@ -127,7 +127,7 @@ if (isset($config['homedir_filemanager'])) { } $sec2 = get_parameter('sec2'); -if ($sec2 == 'enterprise/godmode/agentes/collections') { +if ($sec2 == 'enterprise/godmode/agentes/collections' || $sec2 == 'advanced/collections') { $homedir_filemanager .= '/attachment/collection/'; } From fb40ef7ce4190814f473222cd39d17e6445d675a Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 28 Feb 2019 17:12:31 +0100 Subject: [PATCH 09/38] Changed Maintainer in pandorafms-agent-unix Former-commit-id: c0bff759d2926ec1459e66205b3918ec3d02d3f4 --- pandora_agents/pc/DEBIAN/control | 6 +++--- pandora_agents/shellscript/linux/DEBIAN/control | 4 ++-- pandora_agents/unix/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_server/DEBIAN/control | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pandora_agents/pc/DEBIAN/control b/pandora_agents/pc/DEBIAN/control index af1e09fc24..cdbcc99cfe 100644 --- a/pandora_agents/pc/DEBIAN/control +++ b/pandora_agents/pc/DEBIAN/control @@ -1,10 +1,10 @@ package: pandorafms-agent-unix -Version: 4.0.1 +Version: 7.0 Architecture: all Priority: optional Section: admin Installed-Size: 260 -Maintainer: Miguel de Dios -Homepage: http://pandorafms.org/ +Maintainer: ÁRTICA ST +Homepage: https://pandorafms.org/ Depends: coreutils, perl, unzip Description: Pandora FMS agents are based on native languages in every platform: scripts that can be written in any language. It’s possible to reproduce any agent in any programming language and can be extended without difficulty the existing ones in order to cover aspects not taken into account up to the moment. These scripts are formed by modules that each one gathers a "chunk" of information. Thus, every agent gathers several "chunks" of information; this one is organized in a data set and stored in a single file, called data file. diff --git a/pandora_agents/shellscript/linux/DEBIAN/control b/pandora_agents/shellscript/linux/DEBIAN/control index d17817f5b8..55a5168f93 100755 --- a/pandora_agents/shellscript/linux/DEBIAN/control +++ b/pandora_agents/shellscript/linux/DEBIAN/control @@ -1,10 +1,10 @@ package: pandorafms-agent -Version: 4.0 +Version: 7.0 Architecture: all Priority: optional Section: admin Installed-Size: 260 -Maintainer: Miguel de Dios +Maintainer: ÁRTICA ST Homepage: http://pandorafms.org/ Depends: coreutils, perl Description: Pandora FMS agents are based on native languages in every platform: scripts that can be written in any language. It’s possible to reproduce any agent in any programming language and can be extended without difficulty the existing ones in order to cover aspects not taken into account up to the moment. These scripts are formed by modules that each one gathers a "chunk" of information. Thus, every agent gathers several "chunks" of information; this one is organized in a data set and stored in a single file, called data file. diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 13323ebd9e..7f6ab99071 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -4,7 +4,7 @@ Architecture: all Priority: optional Section: admin Installed-Size: 260 -Maintainer: Miguel de Dios +Maintainer: ÁRTICA ST Homepage: http://pandorafms.org/ Depends: coreutils, perl, unzip Description: Pandora FMS agents are based on native languages in every platform: scripts that can be written in any language. It’s possible to reproduce any agent in any programming language and can be extended without difficulty the existing ones in order to cover aspects not taken into account up to the moment. These scripts are formed by modules that each one gathers a "chunk" of information. Thus, every agent gathers several "chunks" of information; this one is organized in a data set and stored in a single file, called data file. diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 9902501164..c62e0945f2 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -149,7 +149,7 @@ if [ $package_pear -eq 1 ] then echo "Make the package \"php-xml-rpc\"." cd temp_package - dh-make-pear --maintainer "Miguel de Dios " XML_RPC + dh-make-pear --maintainer "ÁRTICA ST " XML_RPC cd php-xml-rpc-* dpkg-buildpackage -rfakeroot cd .. diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index 4f78a1c055..c8259b54b9 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -4,7 +4,7 @@ Architecture: all Priority: optional Section: admin Installed-Size: 640 -Maintainer: Miguel de Dios +Maintainer: ÁRTICA ST Homepage: http://pandorafms.org/ Depends: perl (>= 5.8), libdbi-perl, libdbd-mysql-perl, libtime-format-perl, libnetaddr-ip-perl, libtime-format-perl, libxml-simple-perl, libxml-twig-perl, libhtml-parser-perl, snmp, snmpd, traceroute, xprobe2, nmap, sudo, libwww-perl, libsocket6-perl, libio-socket-inet6-perl, snmp-mibs-downloader, libjson-perl, libnet-telnet-perl, libencode-locale-perl, libgeo-ip-perl Description: Pandora FMS is a monitoring system for big IT environments. It uses remote tests, or local agents to grab information. Pandora supports all standard OS (Linux, AIX, HP-UX, Solaris and Windows XP,2000/2003), and support multiple setups in HA enviroments. This is the server package. Server makes the remote checks and process information transfer by Pandora FMS agents to the server. From 02ff69ea0bf8c767fba502bda0f2631960b95615 Mon Sep 17 00:00:00 2001 From: daniel Date: Fri, 1 Mar 2019 12:34:34 +0100 Subject: [PATCH 10/38] fixed errors SLA With planned downtime Former-commit-id: 7350d33d917f967ea624e4763ed816af97c0743a --- .../include/functions_reporting.php | 564 +++++++++++------- 1 file changed, 360 insertions(+), 204 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 1581119772..e0b719006e 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -822,7 +822,7 @@ function reporting_SLA( $return['description'] = $content['description']; $return['date'] = reporting_get_date_text($report, $content); - // Get chart + // Get chart. reporting_set_conf_charts( $width, $height, @@ -883,7 +883,7 @@ function reporting_SLA( foreach ($slas as $sla) { $server_name = $sla['server_name']; - // Metaconsole connection + // Metaconsole connection. if ($metaconsole_on && $server_name != '') { $connection = metaconsole_get_connection($server_name); if (!metaconsole_load_external_db($connection)) { @@ -902,7 +902,7 @@ function reporting_SLA( continue; } - // controller min and max == 0 then dinamic min and max critical + // Controller min and max == 0 then dinamic min and max critical. $dinamic_text = 0; if ($sla['sla_min'] == 0 && $sla['sla_max'] == 0) { $sla['sla_min'] = null; @@ -910,7 +910,7 @@ function reporting_SLA( $dinamic_text = __('Dynamic'); } - // controller inverse interval + // Controller inverse interval. $inverse_interval = 0; if ((isset($sla['sla_max'])) && (isset($sla['sla_min']))) { if ($sla['sla_max'] < $sla['sla_min']) { @@ -922,26 +922,25 @@ function reporting_SLA( } } - // for graph slice for module-interval, if not slice=0; + // For graph slice for module-interval, if not slice=0. if ($show_graphs) { - $module_interval = modules_get_interval($sla['id_agent_module']); + $module_interval = modules_get_interval( + $sla['id_agent_module'] + ); $slice = ($content['period'] / $module_interval); } else { $slice = 1; } - // call functions sla + // Call functions sla. $sla_array = []; $sla_array = reporting_advanced_sla( $sla['id_agent_module'], ($report['datetime'] - $content['period']), $report['datetime'], $sla['sla_min'], - // min_value -> dynamic $sla['sla_max'], - // max_value -> dynamic $inverse_interval, - // inverse_interval -> dynamic [ '1' => $content['sunday'], '2' => $content['monday'], @@ -957,12 +956,12 @@ function reporting_SLA( ); if ($metaconsole_on) { - // Restore db connection + // Restore db connection. metaconsole_restore_db(); } $server_name = $sla['server_name']; - // Metaconsole connection + // Metaconsole connection. if ($metaconsole_on && $server_name != '') { $connection = metaconsole_get_connection($server_name); if (metaconsole_connect($connection) != NOERR) { @@ -971,10 +970,16 @@ function reporting_SLA( } if ($show_graphs) { - $planned_downtimes = reporting_get_planned_downtimes_intervals($sla['id_agent_module'], ($report['datetime'] - $content['period']), $report['datetime']); + $planned_downtimes = reporting_get_planned_downtimes_intervals( + $sla['id_agent_module'], + ($report['datetime'] - $content['period']), + $report['datetime'] + ); - if ((is_array($planned_downtimes)) && (count($planned_downtimes) > 0)) { - // Sort retrieved planned downtimes + if ((is_array($planned_downtimes)) + && (count($planned_downtimes) > 0) + ) { + // Sort retrieved planned downtimes. usort( $planned_downtimes, function ($a, $b) { @@ -984,16 +989,16 @@ function reporting_SLA( return 0; } - return ($a < $b) ? -1 : 1; + return ($a < $b) ? (-1) : 1; } ); - // Compress (overlapped) planned downtimes + // Compress (overlapped) planned downtimes. $npd = count($planned_downtimes); for ($i = 0; $i < $npd; $i++) { if (isset($planned_downtimes[($i + 1)])) { if ($planned_downtimes[$i]['date_to'] >= $planned_downtimes[($i + 1)]['date_from']) { - // merge + // Merge. $planned_downtimes[$i]['date_to'] = $planned_downtimes[($i + 1)]['date_to']; array_splice($planned_downtimes, ($i + 1), 1); $npd--; @@ -1006,8 +1011,17 @@ function reporting_SLA( } $data = []; - $data['agent'] = io_safe_output(modules_get_agentmodule_agent_alias($sla['id_agent_module'])); - $data['module'] = io_safe_output(modules_get_agentmodule_name($sla['id_agent_module'])); + $data['agent'] = io_safe_output( + modules_get_agentmodule_agent_alias( + $sla['id_agent_module'] + ) + ); + $data['module'] = io_safe_output( + modules_get_agentmodule_name( + $sla['id_agent_module'] + ) + ); + $data['max'] = $sla['sla_max']; $data['min'] = $sla['sla_min']; $data['sla_limit'] = $sla['sla_limit']; @@ -1041,16 +1055,17 @@ function reporting_SLA( $data['checks_unknown'] += $value_sla['checks_unknown']; $data['checks_not_init'] += $value_sla['checks_not_init']; - // generate raw data for graph + // Generate raw data for graph. if ($value_sla['time_total'] != 0) { if ($value_sla['time_error'] > 0) { - // ERR + // ERR. $raw_graph[$i]['data'] = 3; } else if ($value_sla['time_unknown'] > 0) { - // UNKNOWN + // UNKNOWN. $raw_graph[$i]['data'] = 4; - } else if ($value_sla['time_not_init'] == $value_sla['time_total']) { - // NOT INIT + } else if ($value_sla['time_not_init'] == $value_sla['time_total'] + ) { + // NOT INIT. $raw_graph[$i]['data'] = 6; } else { $raw_graph[$i]['data'] = 1; @@ -1059,7 +1074,8 @@ function reporting_SLA( $raw_graph[$i]['data'] = 7; } - $raw_graph[$i]['utimestamp'] = ($value_sla['date_to'] - $value_sla['date_from']); + $raw_graph[$i]['utimestamp'] = ( + $value_sla['date_to'] - $value_sla['date_from']); if (isset($planned_downtimes)) { foreach ($planned_downtimes as $pd) { @@ -1067,7 +1083,7 @@ function reporting_SLA( && ($value_sla['date_to'] <= $pd['date_to']) ) { $raw_graph[$i]['data'] = 5; - // in scheduled downtime + // In scheduled downtime. break; } } @@ -1076,10 +1092,15 @@ function reporting_SLA( $i++; } - $data['sla_value'] = reporting_sla_get_compliance_from_array($data); - $data['sla_fixed'] = sla_truncate($data['sla_value'], $config['graph_precision']); + $data['sla_value'] = reporting_sla_get_compliance_from_array( + $data + ); + $data['sla_fixed'] = sla_truncate( + $data['sla_value'], + $config['graph_precision'] + ); } else { - // Show only table not divider in slice for defect slice=1 + // Show only table not divider in slice for defect slice=1. $data['time_total'] = $sla_array['time_total']; $data['time_ok'] = $sla_array['time_ok']; $data['time_error'] = $sla_array['time_error']; @@ -1095,7 +1116,7 @@ function reporting_SLA( $data['sla_fixed'] = $sla_array['sla_fixed']; } - // checks whether or not it meets the SLA + // Checks whether or not it meets the SLA. if ($data['sla_value'] >= $sla['sla_limit']) { $data['sla_status'] = 1; $sla_failed = false; @@ -1104,19 +1125,19 @@ function reporting_SLA( $data['sla_status'] = 0; } - // Do not show right modules if 'only_display_wrong' is active + // Do not show right modules if 'only_display_wrong' is active. if ($content['only_display_wrong'] && $sla_failed == false) { continue; } - // find order + // Find order. $data['order'] = $data['sla_value']; if ($show_table) { $return['data'][] = $data; } - // Slice graphs calculation + // Slice graphs calculation. if ($show_graphs) { $data_init = -1; $acum = 0; @@ -1149,8 +1170,16 @@ function reporting_SLA( $array_result[$i]['real_data'] = $sum; $dataslice = []; - $dataslice['agent'] = io_safe_output(modules_get_agentmodule_agent_alias($sla['id_agent_module'])); - $dataslice['module'] = io_safe_output(modules_get_agentmodule_name($sla['id_agent_module'])); + $dataslice['agent'] = io_safe_output( + modules_get_agentmodule_agent_alias( + $sla['id_agent_module'] + ) + ); + $dataslice['module'] = io_safe_output( + modules_get_agentmodule_name( + $sla['id_agent_module'] + ) + ); $dataslice['sla_value'] = $data['sla_value']; $dataslice['order'] = $data['sla_value']; @@ -1175,24 +1204,24 @@ function reporting_SLA( } if ($metaconsole_on) { - // Restore db connection + // Restore db connection. metaconsole_restore_db(); } } if ($content['top_n'] == 2) { - // SLA items sorted descending () + // SLA items sorted descending. arsort($return['data']['']); } else if ($content['top_n'] == 1) { - // SLA items sorted ascending + // SLA items sorted ascending. asort($sla_showed_values); } - // order data for ascending or descending + // Order data for ascending or descending. if ($content['top_n'] != 0) { switch ($content['top_n']) { case 1: - // order tables + // Order tables. $temp = []; foreach ($return['data'] as $row) { $i = 0; @@ -1209,7 +1238,7 @@ function reporting_SLA( $return['data'] = $temp; - // order graphs + // Order graphs. $temp = []; foreach ($return['charts'] as $row) { $i = 0; @@ -1229,7 +1258,7 @@ function reporting_SLA( break; case 2: - // order tables + // Order tables. $temp = []; foreach ($return['data'] as $row) { $i = 0; @@ -1246,7 +1275,7 @@ function reporting_SLA( $return['data'] = $temp; - // order graph + // Order graph. $temp = []; foreach ($return['charts'] as $row) { $i = 0; @@ -4877,7 +4906,9 @@ function reporting_sql($report, $content) $return['date'] = reporting_get_date_text(); if ($config['metaconsole']) { - $id_meta = metaconsole_get_id_server($content['server_name']); + $id_meta = metaconsole_get_id_server( + $content['server_name'] + ); $server = metaconsole_get_connection_by_id($id_meta); metaconsole_connect($server); @@ -4886,22 +4917,40 @@ function reporting_sql($report, $content) if ($content['treport_custom_sql_id'] != 0) { switch ($config['dbtype']) { case 'mysql': - $sql = io_safe_output(db_get_value_filter('`sql`', 'treport_custom_sql', ['id' => $content['treport_custom_sql_id']])); + $sql = io_safe_output( + db_get_value_filter( + '`sql`', + 'treport_custom_sql', + ['id' => $content['treport_custom_sql_id']] + ) + ); break; case 'postgresql': - $sql = io_safe_output(db_get_value_filter('"sql"', 'treport_custom_sql', ['id' => $content['treport_custom_sql_id']])); + $sql = io_safe_output( + db_get_value_filter( + '"sql"', + 'treport_custom_sql', + ['id' => $content['treport_custom_sql_id']] + ) + ); break; case 'oracle': - $sql = io_safe_output(db_get_value_filter('sql', 'treport_custom_sql', ['id' => $content['treport_custom_sql_id']])); + $sql = io_safe_output( + db_get_value_filter( + 'sql', + 'treport_custom_sql', + ['id' => $content['treport_custom_sql_id']] + ) + ); break; } } else { $sql = io_safe_output($content['external_source']); } - // Do a security check on SQL coming from the user + // Do a security check on SQL coming from the user. $sql = check_sql($sql); $return['sql'] = $sql; @@ -4916,7 +4965,9 @@ function reporting_sql($report, $content) } if ($content['id_rc'] != null) { - $historical_db = db_get_value_sql('SELECT historical_db from treport_content where id_rc ='.$content['id_rc']); + $historical_db = db_get_value_sql( + 'SELECT historical_db from treport_content where id_rc ='.$content['id_rc'] + ); } else { $historical_db = $content['historical_db']; } @@ -4971,11 +5022,16 @@ function sla_truncate($num, $accurancy=2) } -// -// Aux: check value limits -// -// Returns if the data is in a valid range or not -// +/** + * SLA check value. + * + * @param integer $value Value. + * @param integer $min Treshold min SLA. + * @param boolean $max Treshold max SLA. + * @param boolean $inverse_interval Treshold inverse SLA. + * + * @return boolean Returns the interval in downtime (false if no matches). + */ function sla_check_value($value, $min, $max, $inverse_interval=0) { if (!isset($inverse_interval)) { @@ -4983,12 +5039,12 @@ function sla_check_value($value, $min, $max, $inverse_interval=0) } if ((!isset($max)) && (!isset($min))) { - // disabled thresholds + // Disabled thresholds. return true; } if ($max == $min) { - // equal + // Equal. if ($value == $max) { return ($inverse_interval == 0) ? true : false; } @@ -4997,7 +5053,7 @@ function sla_check_value($value, $min, $max, $inverse_interval=0) } if (!isset($max)) { - // greater or equal than min + // Greater or equal than min. if ($value >= $min) { return ($inverse_interval == 0) ? true : false; } @@ -5006,7 +5062,7 @@ function sla_check_value($value, $min, $max, $inverse_interval=0) } if (!isset($min)) { - // smaller or equal than max + // Smaller or equal than max. if ($value <= $max) { return ($inverse_interval == 0) ? true : false; } @@ -5023,20 +5079,25 @@ function sla_check_value($value, $min, $max, $inverse_interval=0) /** - * SLA downtime worktime + * SLA downtime worktime. * - * Check (if needed) if the range specified by wt_start and wt_end is downtime + * Check (if needed) if the range specified by wt_start and wt_end is downtime. * - * Only used for inclusive downtimes calculation (from sla_fixed_worktime) + * Only used for inclusive downtimes calculation (from sla_fixed_worktime). * - * @param integer $wt_start start of the range - * @param integer $wt_end end of the range - * @param hash $planned_downtimes array with the planned downtimes (ordered and merged) + * @param integer $wt_start Start of the range. + * @param integer $wt_end End of the range. + * @param boolean $inclusive_downtimes Boolean. + * @param array $planned_downtimes Array with the planned downtimes (ordered and merged). * - * @return integer returns the interval in downtime (false if no matches) + * @return integer Returns the interval in downtime (false if no matches). */ -function sla_downtime_worktime($wt_start, $wt_end, $inclusive_downtimes=1, $planned_downtimes=null) -{ +function sla_downtime_worktime( + $wt_start, + $wt_end, + $inclusive_downtimes=1, + $planned_downtimes=null +) { if ((!isset($planned_downtimes)) || (!is_array($planned_downtimes))) { return false; } @@ -5050,6 +5111,7 @@ function sla_downtime_worktime($wt_start, $wt_end, $inclusive_downtimes=1, $plan } $rt = false; + foreach ($planned_downtimes as $pd) { if (($wt_start >= $pd['date_from']) && ($wt_start <= $pd['date_to']) @@ -5071,7 +5133,7 @@ function sla_downtime_worktime($wt_start, $wt_end, $inclusive_downtimes=1, $plan && ($wt_end > $pd['date_to']) ) { // ..[..start..]..end.. - $rt = ($wt_end - $pd['date_to']); + $rt = ($pd['date_to'] - $wt_start); break; } else if (($wt_start >= $pd['date_to']) && ($wt_end >= $pd['date_to']) @@ -5095,29 +5157,44 @@ function sla_downtime_worktime($wt_start, $wt_end, $inclusive_downtimes=1, $plan * As worktime is order (older ... newer) the idx works as flag to identify * last range checked, in order to improve the algorythm performance. * - * @param integer $wt_start start of the range - * @param integer $wt_end end of the range - * @param hash $worktime hash containing the valid intervals - * @param hash $planned_downtimes array with the planned downtimes (ordered and merged) - * @param integer $inclusive_downtimes In downtime as OK (1) or ignored (0) - * @param integer $idx last ranges checked + * @param integer $wt_start Start of the range. + * @param integer $wt_end End of the range. + * @param array $worktime Hash containing the valid intervals. + * @param array $planned_downtimes Array with the planned downtimes (ordered and merged). + * @param integer $inclusive_downtimes In downtime as OK (1) or ignored (0). + * @param integer $idx Last ranges checked. + * + * @return array */ -function sla_fixed_worktime($wt_start, $wt_end, $worktime=null, $planned_downtimes=null, $inclusive_downtimes=1, $idx=0) -{ +function sla_fixed_worktime( + $wt_start, + $wt_end, + $worktime=null, + $planned_downtimes=null, + $inclusive_downtimes=1, + $idx=0 +) { $return = []; - // Accept all ranges by default + // Accept all ranges by default. $return['wt_valid'] = 1; $return['interval'] = ($wt_end - $wt_start); - if ((!isset($wt_start)) || (!isset($wt_end)) || ($wt_start > $wt_end) || ($wt_start > time())) { + if ((!isset($wt_start)) || (!isset($wt_end)) + || ($wt_start > $wt_end) || ($wt_start > time()) + ) { $return['wt_valid'] = 0; $return['interval'] = 0; } - // No exclusions defined, entire worktime is valid + // No exclusions defined, entire worktime is valid. if ((!isset($worktime) || (!is_array($worktime)))) { - $time_in_downtime = sla_downtime_worktime($wt_start, $wt_end, $inclusive_downtimes, $planned_downtimes); + $time_in_downtime = sla_downtime_worktime( + $wt_start, + $wt_end, + $inclusive_downtimes, + $planned_downtimes + ); if ($time_in_downtime != false) { $return['wt_in_downtime'] = 1; $return['downtime_interval'] = $time_in_downtime; @@ -5127,7 +5204,7 @@ function sla_fixed_worktime($wt_start, $wt_end, $worktime=null, $planned_downtim return $return; } - // Check exceptions + // Check exceptions. $total = count($worktime); $return['idx'] = $idx; @@ -5141,10 +5218,15 @@ function sla_fixed_worktime($wt_start, $wt_end, $worktime=null, $planned_downtim $wt = $worktime[$i]; if ($start_fixed == 1) { - // Intervals greater than 1 DAY + // Intervals greater than 1 DAY. if ($wt_end < $wt['date_from']) { // Case G: ..end..[..].. - $time_in_downtime = sla_downtime_worktime($wt_start, $wt_end, $inclusive_downtimes, $planned_downtimes); + $time_in_downtime = sla_downtime_worktime( + $wt_start, + $wt_end, + $inclusive_downtimes, + $planned_downtimes + ); if ($time_in_downtime != false) { $return['wt_in_downtime'] = 1; $return['downtime_interval'] = $time_in_downtime; @@ -5160,9 +5242,14 @@ function sla_fixed_worktime($wt_start, $wt_end, $worktime=null, $planned_downtim && ($wt_end <= $wt['date_to']) ) { // Case H: ..[..end..].. - // add last slice + // add last slice. $return['interval'] += ($wt_end - $wt['date_from']); - $time_in_downtime = sla_downtime_worktime($wt['date_from'], $wt_end, $inclusive_downtimes, $planned_downtimes); + $time_in_downtime = sla_downtime_worktime( + $wt['date_from'], + $wt_end, + $inclusive_downtimes, + $planned_downtimes + ); if ($time_in_downtime != false) { $return['wt_in_downtime'] = 1; $return['downtime_interval'] = $time_in_downtime; @@ -5176,9 +5263,14 @@ function sla_fixed_worktime($wt_start, $wt_end, $worktime=null, $planned_downtim && ($wt_end > $wt['date_to']) ) { // Case H: ..[..]..end.. - // Add current slice and continue checking + // Add current slice and continue checking. $return['interval'] += ($wt['date_to'] - $wt['date_from']); - $time_in_downtime = sla_downtime_worktime($wt['date_from'], $wt['date_to'], $inclusive_downtimes, $planned_downtimes); + $time_in_downtime = sla_downtime_worktime( + $wt['date_from'], + $wt['date_to'], + $inclusive_downtimes, + $planned_downtimes + ); if ($time_in_downtime != false) { $return['wt_in_downtime'] = 1; $return['downtime_interval'] = $time_in_downtime; @@ -5202,7 +5294,12 @@ function sla_fixed_worktime($wt_start, $wt_end, $worktime=null, $planned_downtim // Case B: ...start..[..end..]...... $return['wt_valid'] = 1; $return['interval'] = ($wt_end - $wt['date_from']); - $time_in_downtime = sla_downtime_worktime($wt['date_from'], $wt_end, $inclusive_downtimes, $planned_downtimes); + $time_in_downtime = sla_downtime_worktime( + $wt['date_from'], + $wt_end, + $inclusive_downtimes, + $planned_downtimes + ); if ($time_in_downtime != false) { $return['wt_in_downtime'] = 1; $return['downtime_interval'] = $time_in_downtime; @@ -5219,7 +5316,12 @@ function sla_fixed_worktime($wt_start, $wt_end, $worktime=null, $planned_downtim ) { // Case C: ...[..start..end..]...... $return['wt_valid'] = 1; - $time_in_downtime = sla_downtime_worktime($wt_start, $wt_end, $inclusive_downtimes, $planned_downtimes); + $time_in_downtime = sla_downtime_worktime( + $wt_start, + $wt_end, + $inclusive_downtimes, + $planned_downtimes + ); if ($time_in_downtime != false) { $return['wt_in_downtime'] = 1; $return['downtime_interval'] = $time_in_downtime; @@ -5235,7 +5337,12 @@ function sla_fixed_worktime($wt_start, $wt_end, $worktime=null, $planned_downtim ) { // Case D: ...[..start..]...end..... $return['interval'] = ($wt['date_to'] - $wt_start); - $time_in_downtime = sla_downtime_worktime($wt_start, $wt['date_to'], $inclusive_downtimes, $planned_downtimes); + $time_in_downtime = sla_downtime_worktime( + $wt_start, + $wt['date_to'], + $inclusive_downtimes, + $planned_downtimes + ); if ($time_in_downtime != false) { $return['wt_in_downtime'] = 1; $return['downtime_interval'] = $time_in_downtime; @@ -5244,10 +5351,11 @@ function sla_fixed_worktime($wt_start, $wt_end, $worktime=null, $planned_downtim $return['wt_valid'] = 1; $start_fixed = 1; - // we must check if 'end' is greater than the next valid worktime range start time - // unless is the last one + // We must check if 'end' is greater than the next valid + // worktime range start time unless is the last one. if (($i + 1) == $total) { - // if there's no more worktime ranges to check return the accumulated + // If there's no more worktime ranges + // to check return the accumulated. return $return; } } @@ -5258,7 +5366,12 @@ function sla_fixed_worktime($wt_start, $wt_end, $worktime=null, $planned_downtim // Case E: ...start...[...]...end... $return['wt_valid'] = 1; $return['interval'] = ($wt['date_to'] - $wt['date_from']); - $time_in_downtime = sla_downtime_worktime($wt['date_from'], $wt['date_to'], $inclusive_downtimes, $planned_downtimes); + $time_in_downtime = sla_downtime_worktime( + $wt['date_from'], + $wt['date_to'], + $inclusive_downtimes, + $planned_downtimes + ); if ($time_in_downtime != false) { $return['wt_in_downtime'] = 1; $return['downtime_interval'] = $time_in_downtime; @@ -5266,10 +5379,10 @@ function sla_fixed_worktime($wt_start, $wt_end, $worktime=null, $planned_downtim } if (($wt_end - $wt_start) < SECONDS_1DAY) { - // Interval is less than 1 day + // Interval is less than 1 day. return $return; } else { - // Interval greater than 1 day, split valid worktimes + // Interval greater than 1 day, split valid worktimes. $start_fixed = 1; } } @@ -5278,9 +5391,9 @@ function sla_fixed_worktime($wt_start, $wt_end, $worktime=null, $planned_downtim && ($wt_end > $wt['date_to']) ) { // Case F: ...[....]..start...end... - // Invalid, check next worktime hole + // Invalid, check next worktime hole. $return['wt_valid'] = 0; - // and remove current one + // And remove current one. $return['idx'] = ($i + 1); } } @@ -5295,19 +5408,19 @@ function sla_fixed_worktime($wt_start, $wt_end, $worktime=null, $planned_downtim /** * Advanced SLA result with summary * - * @param integer $id_agent_module id_agent_module - * @param integer $time_from Time start - * @param integer $time_to time end - * @param integer $min_value minimum value for OK status - * @param integer $max_value maximum value for OK status - * @param integer $inverse_interval inverse interval (range) for OK status - * @param hash $daysWeek Days of active work times (M-T-W-T-V-S-S) - * @param integer $timeFrom Start of work time, in each day - * @param integer $timeTo End of work time, in each day - * @param integer $slices Number of reports (time division) - * @param integer $inclusive_downtimes In downtime as OK (1) or ignored (0) + * @param integer $id_agent_module Id_agent_module. + * @param integer $time_from Time start. + * @param integer $time_to Time end. + * @param integer $min_value Minimum value for OK status. + * @param integer $max_value Maximum value for OK status. + * @param integer $inverse_interval Inverse interval (range) for OK status. + * @param array $daysWeek Days of active work times (M-T-W-T-V-S-S). + * @param integer $timeFrom Start of work time, in each day. + * @param integer $timeTo End of work time, in each day. + * @param integer $slices Number of reports (time division). + * @param integer $inclusive_downtimes In downtime as OK (1) or ignored (0). * - * @return array Returns a hash with the calculated data + * @return array Returns a hash with the calculated data. */ function reporting_advanced_sla( $id_agent_module, @@ -5323,9 +5436,8 @@ function reporting_advanced_sla( $inclusive_downtimes=1 ) { // In content: - // - // [time_from, time_to] => Worktime - // week's days => flags to manage workdays + // Example: [time_from, time_to] => Worktime + // week's days => flags to manage workdays. if (!isset($id_agent_module)) { return false; } @@ -5335,13 +5447,13 @@ function reporting_advanced_sla( } if ((!isset($min_value)) && (!isset($max_value))) { - // Infer availability range based on the critical thresholds + // Infer availability range based on the critical thresholds. $agentmodule_info = modules_get_agentmodule($id_agent_module); - // take in mind: the "inverse" critical threshold + // Take in mind: the "inverse" critical threshold. $min_value = $agentmodule_info['min_critical']; $max_value = $agentmodule_info['max_critical']; - $inverse_interval = $agentmodule_info['critical_inverse'] == 0 ? 1 : 0; + $inverse_interval = ($agentmodule_info['critical_inverse'] == 0) ? 1 : 0; if ((!isset($min_value)) || ($min_value == 0)) { $min_value = null; @@ -5358,19 +5470,19 @@ function reporting_advanced_sla( if ((!isset($min_value)) && (!isset($max_value))) { if (($agentmodule_info['id_tipo_modulo'] == '2') - // generic_proc + // Generic_proc. || ($agentmodule_info['id_tipo_modulo'] == '6') - // remote_icmp_proc + // Remote_icmp_proc. || ($agentmodule_info['id_tipo_modulo'] == '9') - // remote_tcp_proc + // Remote_tcp_proc. || ($agentmodule_info['id_tipo_modulo'] == '18') - // remote_snmp_proc + // Remote_snmp_proc. || ($agentmodule_info['id_tipo_modulo'] == '21') - // async_proc + // Async_proc. || ($agentmodule_info['id_tipo_modulo'] == '31') ) { - // web_proc - // Boolean values are OK if they're different from 0 + // Web_proc + // boolean values are OK if they're different from 0. $max_value = 0; $min_value = 0; $inverse_interval = 1; @@ -5378,11 +5490,11 @@ function reporting_advanced_sla( } } - // By default show last day + // By default show last day. $datetime_to = time(); $datetime_from = ($datetime_to - SECONDS_1DAY); - // Or apply specified range + // Or apply specified range. if ((isset($time_to) && isset($time_from)) && ($time_to > $time_from)) { $datetime_to = $time_to; $datetime_from = $time_from; @@ -5396,7 +5508,11 @@ function reporting_advanced_sla( $datetime_from = $time_from; } - $uncompressed_data = db_uncompress_module_data($id_agent_module, $datetime_from, $datetime_to); + $uncompressed_data = db_uncompress_module_data( + $id_agent_module, + $datetime_from, + $datetime_to + ); if (is_array($uncompressed_data)) { $n_pools = count($uncompressed_data); @@ -5405,10 +5521,14 @@ function reporting_advanced_sla( } } - $planned_downtimes = reporting_get_planned_downtimes_intervals($id_agent_module, $datetime_from, $datetime_to); + $planned_downtimes = reporting_get_planned_downtimes_intervals( + $id_agent_module, + $datetime_from, + $datetime_to + ); if ((is_array($planned_downtimes)) && (count($planned_downtimes) > 0)) { - // Sort retrieved planned downtimes + // Sort retrieved planned downtimes. usort( $planned_downtimes, function ($a, $b) { @@ -5418,16 +5538,16 @@ function reporting_advanced_sla( return 0; } - return ($a < $b) ? -1 : 1; + return ($a < $b) ? (-1) : 1; } ); - // Compress (overlapped) planned downtimes + // Compress (overlapped) planned downtimes. $npd = count($planned_downtimes); for ($i = 0; $i < $npd; $i++) { if (isset($planned_downtimes[($i + 1)])) { if ($planned_downtimes[$i]['date_to'] >= $planned_downtimes[($i + 1)]['date_from']) { - // merge + // Merge. $planned_downtimes[$i]['date_to'] = $planned_downtimes[($i + 1)]['date_to']; array_splice($planned_downtimes, ($i + 1), 1); $npd--; @@ -5446,9 +5566,8 @@ function reporting_advanced_sla( // data // array // utimestamp - // datos - // - // Build exceptions + // datos. + // Build exceptions. $worktime = null; if (((isset($daysWeek)) @@ -5459,22 +5578,22 @@ function reporting_advanced_sla( $n = 0; if (!isset($daysWeek)) { - // init + // Init. $daysWeek = [ '1' => 1, - // sunday" + // Sunday. '2' => 1, - // monday + // Monday. '3' => 1, - // tuesday + // Tuesday. '4' => 1, - // wednesday + // Wednesday. '5' => 1, - // thursday + // Thursday. '6' => 1, - // friday + // Friday. '7' => 1, - // saturday + // Saturday. ]; } @@ -5485,10 +5604,10 @@ function reporting_advanced_sla( } if (($n == count($daysWeek)) && ($timeFrom == $timeTo)) { - // Ignore custom ranges + // Ignore custom ranges. $worktime = null; } else { - // get only first day + // Get only first day. $date_start = strtotime(date('Y/m/d', $datetime_from)); $date_end = strtotime(date('Y/m/d', $datetime_to)); @@ -5509,25 +5628,31 @@ function reporting_advanced_sla( $timeTo = '00:00:00'; } - // timeFrom (seconds) + // TimeFrom (seconds). sscanf($timeFrom, '%d:%d:%d', $hours, $minutes, $seconds); $secondsFrom = ($hours * 3600 + $minutes * 60 + $seconds); - // timeTo (seconds) + // TimeTo (seconds). sscanf($timeTo, '%d:%d:%d', $hours, $minutes, $seconds); $secondsTo = ($hours * 3600 + $minutes * 60 + $seconds); - // Apply planned downtime exceptions (fix matrix) + // Apply planned downtime exceptions (fix matrix). while ($t_day <= $date_end) { if ($daysWeek[(date('w', $t_day) + 1)] == 1) { - $wt_start = strtotime(date('Y/m/d H:i:s', ($t_day + $secondsFrom))); - $wt_end = strtotime(date('Y/m/d H:i:s', ($t_day + $secondsTo))); + $wt_start = strtotime( + date('Y/m/d H:i:s', ($t_day + $secondsFrom)) + ); + $wt_end = strtotime( + date('Y/m/d H:i:s', ($t_day + $secondsTo)) + ); if ($timeFrom == $timeTo) { $wt_end += SECONDS_1DAY; } - // Check if in planned downtime if exclusive downtimes - if (($inclusive_downtimes == 0) && (is_array($planned_downtimes))) { + // Check if in planned downtime if exclusive downtimes. + if (($inclusive_downtimes == 0) + && (is_array($planned_downtimes)) + ) { $start_fixed = 0; $n_planned_downtimes = count($planned_downtimes); @@ -5536,7 +5661,8 @@ function reporting_advanced_sla( $last_pd = end($planned_downtimes); if ($wt_start > $last_pd['date_to']) { - // There's no more planned downtimes, accept remaining range + // There's no more planned downtimes, + // accept remaining range. $worktime[$i] = []; $worktime[$i]['date_from'] = $wt_start; $worktime[$i]['date_to'] = $wt_end; @@ -5546,10 +5672,10 @@ function reporting_advanced_sla( $pd = $planned_downtimes[$i_planned_downtimes]; if ($start_fixed == 1) { - // Interval greater than found planned downtime + // Interval greater than found planned downtime. if ($wt_end < $pd['date_from']) { $worktime[$i] = []; - // wt_start already fixed + // Wt_start already fixed. $worktime[$i]['date_from'] = $wt_start; $worktime[$i]['date_to'] = $wt_end; $i++; @@ -5560,7 +5686,7 @@ function reporting_advanced_sla( && ( $wt_end <= $pd['date_to'] ) ) { $worktime[$i] = []; - // wt_start already fixed + // Wt_start already fixed. $worktime[$i]['date_from'] = $wt_start; $worktime[$i]['date_to'] = $pd['date_from']; $i++; @@ -5569,13 +5695,14 @@ function reporting_advanced_sla( if ($wt_end > $pd['date_to']) { $worktime[$i] = []; - // wt_start already fixed + // Wt_start already fixed. $worktime[$i]['date_from'] = $wt_start; $worktime[$i]['date_to'] = $pd['date_from']; $i++; $start_fixed = 0; - // Search following planned downtimes, we're still on work time! + // Search following planned downtimes, + // we're still on work time!. $wt_start = $pd['date_from']; } } @@ -5583,7 +5710,7 @@ function reporting_advanced_sla( if (( $wt_start < $pd['date_from']) && ( $wt_end < $pd['date_from']) ) { - // Out of planned downtime: Add worktime + // Out of planned downtime: Add worktime. $worktime[$i] = []; $worktime[$i]['date_from'] = $wt_start; $worktime[$i]['date_to'] = $wt_end; @@ -5605,7 +5732,7 @@ function reporting_advanced_sla( if (( $wt_start >= $pd['date_from']) && ( $wt_end <= $pd['date_to']) ) { - // All worktime in downtime, ignore + // All worktime in downtime, ignore. break; } @@ -5632,8 +5759,11 @@ function reporting_advanced_sla( $start_fixed = 1; } - if (($start_fixed == 1) && (($i_planned_downtimes + 1) == $n_planned_downtimes)) { - // There's no more planned downtimes, accept remaining range + if (($start_fixed == 1) + && (($i_planned_downtimes + 1) == $n_planned_downtimes) + ) { + // There's no more planned downtimes, + // accept remaining range. $worktime[$i] = []; $worktime[$i]['date_from'] = $wt_start; $worktime[$i]['date_to'] = $wt_end; @@ -5643,7 +5773,7 @@ function reporting_advanced_sla( } } } else { - // No planned downtimes scheduled + // No planned downtimes scheduled. $worktime[$i] = []; $worktime[$i]['date_from'] = $wt_start; $worktime[$i]['date_to'] = $wt_end; @@ -5652,9 +5782,9 @@ function reporting_advanced_sla( } $t_day = strtotime(' + 1 days', $t_day); - } //end while - } //end if - } //end if + } + } + } // DEBUG // print "
    Umcompressed data debug:\n";
    @@ -5665,23 +5795,29 @@ function reporting_advanced_sla(
         // }
         // }
         // print "
    "; - // Initialization + // Initialization. $global_return = []; $wt_check['idx'] = 0; $last_pool_id = 0; $last_item_id = 0; - // Support to slices + // Support to slices. $global_datetime_from = $datetime_from; $global_datetime_to = $datetime_to; $range = (($datetime_to - $datetime_from) / $slices); - // Analysis begins + // Analysis begins. for ($count = 0; $count < $slices; $count++) { - // use strtotime based on local timezone to avoid datetime conversions - $datetime_from = strtotime(' + '.($count * $range).' seconds', $global_datetime_from); - $datetime_to = strtotime(' + '.(($count + 1) * $range).' seconds', $global_datetime_from); + // Use strtotime based on local timezone to avoid datetime conversions. + $datetime_from = strtotime( + ' + '.($count * $range).' seconds', + $global_datetime_from + ); + $datetime_to = strtotime( + ' + '.(($count + 1) * $range).' seconds', + $global_datetime_from + ); if ((!isset($datetime_from)) || ($datetime_from === false)) { $datetime_from = ($global_datetime_from + ($count * $range)); @@ -5692,7 +5828,7 @@ function reporting_advanced_sla( } $return = []; - // timing + // Timing. $time_total = 0; $time_in_ok = 0; $time_in_error = 0; @@ -5701,7 +5837,7 @@ function reporting_advanced_sla( $time_in_down = 0; $time_out = 0; - // checks + // Checks. $bad_checks = 0; $ok_checks = 0; $not_init_checks = 0; @@ -5713,7 +5849,7 @@ function reporting_advanced_sla( for ($pool_index = $last_pool_id; $pool_index < $n_pools; $pool_index++) { $pool = $uncompressed_data[$pool_index]; - // check limits + // Check limits. if (isset($uncompressed_data[($pool_index + 1)])) { $next_pool = $uncompressed_data[($pool_index + 1)]; } else { @@ -5726,36 +5862,37 @@ function reporting_advanced_sla( $pool['next_utimestamp'] = $global_datetime_to; } - // update last pool checked: avoid repetition + // Update last pool checked: avoid repetition. $last_pool_id = $pool_index; if ($datetime_from > $pool['utimestamp']) { - // Skip pool + // Skip pool. continue; } - // Test if need to acquire current pool - if ((($datetime_from <= $pool['utimestamp']) && ($datetime_to >= $pool['next_utimestamp'])) + // Test if need to acquire current pool. + if ((($datetime_from <= $pool['utimestamp']) + && ($datetime_to >= $pool['next_utimestamp'])) || ($datetime_to > $pool['utimestamp']) ) { - // Acquire pool to this slice + // Acquire pool to this slice. $nitems_in_pool = count($pool['data']); for ($i = 0; $i < $nitems_in_pool; $i++) { $current_data = $pool['data'][$i]; if (($i + 1) >= $nitems_in_pool) { - // if pool exceded, check next pool timestamp + // If pool exceded, check next pool timestamp. $next_data = $next_pool; } else { - // pool not exceded, check next item + // Pool not exceded, check next item. $next_data = $pool['data'][($i + 1)]; } if (isset($next_data['utimestamp'])) { - // check next mark time in current pool + // Check next mark time in current pool. $next_timestamp = $next_data['utimestamp']; } else { - // check last time -> datetime_to + // Check last time -> datetime_to. if (!isset($next_pool)) { $next_timestamp = $global_datetime_to; } else { @@ -5763,12 +5900,20 @@ function reporting_advanced_sla( } } - // Effective time limits for current data + // Effective time limits for current data. $wt_start = $current_data['utimestamp']; $wt_end = $next_timestamp; - // Remove time spent not in planning (and in planned downtime if needed) - $wt_check = sla_fixed_worktime($wt_start, $wt_end, $worktime, $planned_downtimes, $inclusive_downtimes, $wt_check['idx']); + // Remove time spent not in planning + // (and in planned downtime if needed). + $wt_check = sla_fixed_worktime( + $wt_start, + $wt_end, + $worktime, + $planned_downtimes, + $inclusive_downtimes, + $wt_check['idx'] + ); $time_interval = $wt_check['interval']; if (($wt_check['wt_valid'] == 1)) { @@ -5776,9 +5921,17 @@ function reporting_advanced_sla( if ($time_interval > 0) { $total_checks++; - if ((isset($current_data['datos'])) && ($current_data['datos'] !== false)) { - // not unknown nor not init values - if (sla_check_value($current_data['datos'], $min_value, $max_value, $inverse_interval)) { + if ((isset($current_data['datos'])) + && ($current_data['datos'] !== false) + ) { + // Not unknown nor not init values. + if (sla_check_value( + $current_data['datos'], + $min_value, + $max_value, + $inverse_interval + ) + ) { $ok_checks++; $time_in_ok += $time_interval; } else { @@ -5798,7 +5951,8 @@ function reporting_advanced_sla( if ($inclusive_downtimes == 1) { if ($wt_check['wt_in_downtime']) { - // Add downtime interval as OK in inclusion mode + // Add downtime interval as + // OK in inclusion mode. $total_checks++; $ok_checks++; $time_total += $wt_check['downtime_interval']; @@ -5811,24 +5965,23 @@ function reporting_advanced_sla( $time_out += $wt_check['downtime_interval']; } - // ignore worktime, is in an invalid period: + // Ignore worktime, is in an invalid period: // scheduled downtimes in exclusion mode - // not 24x7 sla's + // not 24x7 sla's. } - } //end for - } //end if - else { + } + } else { break; } - } //end for + } } else { - // If monitor in not-init status => no data to show + // If monitor in not-init status => no data to show. $time_in_not_init = ($datetime_to - $datetime_from); $time_total += $time_in_not_init; $not_init_checks++; } - // Timing + // Timing. $return['time_total'] = $time_total; $return['time_ok'] = $time_in_ok; $return['time_error'] = $time_in_error; @@ -5837,25 +5990,28 @@ function reporting_advanced_sla( $return['time_downtime'] = $time_in_down; $return['time_out'] = $time_out; - // # Checks + // Checks. $return['checks_total'] = $total_checks; $return['checks_ok'] = $ok_checks; $return['checks_error'] = $bad_checks; $return['checks_unknown'] = $unknown_checks; $return['checks_not_init'] = $not_init_checks; - // SLA + // SLA. $return['SLA'] = reporting_sla_get_compliance_from_array($return); - $return['SLA_fixed'] = sla_truncate($return['SLA'], $config['graph_precision']); + $return['SLA_fixed'] = sla_truncate( + $return['SLA'], + $config['graph_precision'] + ); - // Time ranges + // Time ranges. $return['date_from'] = $datetime_from; $return['date_to'] = $datetime_to; if ($slices > 1) { array_push($global_return, $return); } - } //end for + } if ($slices > 1) { return $global_return; From fadf75a6260ee14069aef6f91dbc03ebb40b16ac Mon Sep 17 00:00:00 2001 From: daniel Date: Fri, 1 Mar 2019 13:36:38 +0100 Subject: [PATCH 11/38] fixed minor error lenght str.warning and str.critical 1024 charts Former-commit-id: c7c32a48731eff5c786bd0710652a31a64364861 --- .../godmode/agentes/module_manager_editor_common.php | 4 ++-- pandora_console/godmode/massive/massive_edit_modules.php | 4 ++-- .../godmode/modules/manage_network_components_form_common.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pandora_console/godmode/agentes/module_manager_editor_common.php b/pandora_console/godmode/agentes/module_manager_editor_common.php index 9f321bff59..892228042a 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_common.php +++ b/pandora_console/godmode/agentes/module_manager_editor_common.php @@ -431,7 +431,7 @@ if (modules_is_string_type($id_module_type) || $edit) { str_replace('"', '', $str_warning), '', 10, - 255, + 1024, true, $disabledBecauseInPolicy, false, @@ -484,7 +484,7 @@ if (modules_is_string_type($id_module_type) || $edit) { str_replace('"', '', $str_critical), '', 10, - 255, + 1024, true, $disabledBecauseInPolicy, false, diff --git a/pandora_console/godmode/massive/massive_edit_modules.php b/pandora_console/godmode/massive/massive_edit_modules.php index 700aab40ee..568e74dbbb 100755 --- a/pandora_console/godmode/massive/massive_edit_modules.php +++ b/pandora_console/godmode/massive/massive_edit_modules.php @@ -562,7 +562,7 @@ $table->data['edit1'][1] = ''; '', '', 5, - 255, + 1024, true ); $table->data['edit1'][1] .= ''; @@ -631,7 +631,7 @@ $table->data['edit1'][1] = '
    '; '', '', 5, - 255, + 1024, true ); $table->data['edit1'][3] .= ''; diff --git a/pandora_console/godmode/modules/manage_network_components_form_common.php b/pandora_console/godmode/modules/manage_network_components_form_common.php index 1f51302db6..ba463d9bb9 100644 --- a/pandora_console/godmode/modules/manage_network_components_form_common.php +++ b/pandora_console/godmode/modules/manage_network_components_form_common.php @@ -190,7 +190,7 @@ $table->data[4][1] .= html_print_input_text( $str_warning, '', 5, - 64, + 1024, true ).''; $table->data[4][1] .= '
    '.__('Inverse interval').''; @@ -216,7 +216,7 @@ $table->data[5][1] .= html_print_input_text( $max_critical, '', 5, - 15, + 1024, true ).''; $table->data[5][1] .= ''.__('Str.').'  '; From c5a5df01f622741e1660773d6282e5df3f046ada Mon Sep 17 00:00:00 2001 From: daniel Date: Fri, 1 Mar 2019 14:26:25 +0100 Subject: [PATCH 12/38] add tip SLA Services Former-commit-id: da452d98c0b3b43d36c4c53de70df762f6530c8d --- pandora_console/include/functions_reporting_html.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index 362120e0a1..d54199030f 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -4752,7 +4752,10 @@ function reporting_html_planned_downtimes_table($planned_downtimes) $table = new StdClass(); $table->width = '99%'; - $table->title = __('This SLA has been affected by the following planned downtimes'); + $table->title = __('This SLA has been affected by the following planned downtimes').ui_print_help_tip( + __('If the duration of the planned downtime is less than 5 minutes it will not be represented in the graph'), + true + ); $table->head = []; $table->head[0] = __('Name'); $table->head[1] = __('Description'); From 488be0d602a858eff96dbe6382fcbe7510fd12af Mon Sep 17 00:00:00 2001 From: manuel Date: Mon, 4 Mar 2019 13:12:01 +0100 Subject: [PATCH 13/38] Changed radio buttons by checkbox switch Former-commit-id: f0c64cecbf9e1197be08a9a95248d3b4ea8bd949 --- pandora_console/godmode/setup/setup_auth.php | 1 - .../godmode/setup/setup_ehorus.php | 36 ++++++++++-------- .../godmode/setup/setup_general.php | 36 ++++++++++-------- .../godmode/setup/setup_netflow.php | 37 +++++++++++-------- .../godmode/setup/setup_visuals.php | 8 ++-- 5 files changed, 65 insertions(+), 53 deletions(-) diff --git a/pandora_console/godmode/setup/setup_auth.php b/pandora_console/godmode/setup/setup_auth.php index cdb75816cc..ac9f706e41 100644 --- a/pandora_console/godmode/setup/setup_auth.php +++ b/pandora_console/godmode/setup/setup_auth.php @@ -134,7 +134,6 @@ if (is_ajax()) { set_unless_defined($config['double_auth_enabled'], false); $row = []; $row['name'] = __('Double authentication').ui_print_help_tip(__('If this option is enabled, the users can use double authentication with their accounts'), true); - $row['control'] = html_print_input_hidden('double_auth_enabled', 0); $row['control'] .= html_print_checkbox_switch('double_auth_enabled', 1, $config['double_auth_enabled'], true); $table->data['double_auth_enabled'] = $row; diff --git a/pandora_console/godmode/setup/setup_ehorus.php b/pandora_console/godmode/setup/setup_ehorus.php index f51854a63c..0274767cff 100644 --- a/pandora_console/godmode/setup/setup_ehorus.php +++ b/pandora_console/godmode/setup/setup_ehorus.php @@ -1,18 +1,23 @@ style['name'] = 'font-weight: bold'; // Enable eHorus $row = []; $row['name'] = __('Enable eHorus'); -$row['control'] = __('Enabled').' '.html_print_radio_button('ehorus_enabled', 1, '', $config['ehorus_enabled'], true).'  '; -$row['control'] .= __('Disabled').' '.html_print_radio_button('ehorus_enabled', 0, '', $config['ehorus_enabled'], true); +$row['control'] = html_print_checkbox_switch('ehorus_enabled', false, $config['ehorus_enabled'], true); $row['button'] = html_print_submit_button(__('Update'), 'update_button', false, 'class="sub upd"', true); $table_enable->data['ehorus_enabled'] = $row; @@ -169,7 +173,7 @@ if ($config['ehorus_enabled']) { if (event.target.value == '1') showFields(); else hideFields(); } - $('input:radio[name="ehorus_enabled"]').change(handleEnable); + $('input:checkbox[name="ehorus_enabled"]').change(handleEnable); var handleTest = function (event) { var user = $('input#text-ehorus_user').val(); diff --git a/pandora_console/godmode/setup/setup_general.php b/pandora_console/godmode/setup/setup_general.php index 8f07d3d88d..370df5d808 100644 --- a/pandora_console/godmode/setup/setup_general.php +++ b/pandora_console/godmode/setup/setup_general.php @@ -1,17 +1,23 @@ data[37][0] = __('Audit log directory').ui_print_help_tip(__('Directory $table->data[37][1] = html_print_input_text('auditdir', io_safe_output($config['auditdir']), '', 30, 100, true); $table->data[38][0] = __('Set alias as name by default in agent creation'); -$table->data[38][1] = __('Yes').'   '.html_print_radio_button('alias_as_name', 1, '', $config['alias_as_name'], true).'  '; -$table->data[38][1] .= __('No').'   '.html_print_radio_button('alias_as_name', 0, '', $config['alias_as_name'], true); +$table->data[38][1] = html_print_checkbox_switch('alias_as_name', 1, $config['alias_as_name'], true); $table->data[39][0] = __('Unique IP').ui_print_help_tip(__('Set the primary IP address as the unique IP, preventing the same primary IP address from being used in more than one agent'), true); -$table->data[39][1] = __('Yes').'   '.html_print_radio_button('unique_ip', 1, '', $config['unique_ip'], true).'  '; -$table->data[39][1] .= __('No').'   '.html_print_radio_button('unique_ip', 0, '', $config['unique_ip'], true); +$table->data[39][1] = html_print_checkbox_switch('unique_ip', 1, $config['unique_ip'], true); echo '
    '; diff --git a/pandora_console/godmode/setup/setup_netflow.php b/pandora_console/godmode/setup/setup_netflow.php index 1b62a23810..0b2cddbc25 100644 --- a/pandora_console/godmode/setup/setup_netflow.php +++ b/pandora_console/godmode/setup/setup_netflow.php @@ -1,16 +1,23 @@ data[5][0] = ''.__('Maximum chart resolution').''.ui_print_help_t $table->data[5][1] = html_print_input_text('netflow_max_resolution', $config['netflow_max_resolution'], false, 50, 200, true); $table->data[6][0] = ''.__('Disable custom live view filters').''.ui_print_help_tip(__('Disable the definition of custom filters in the live view. Only existing filters can be used.'), true); -$table->data[6][1] = __('Yes').'  '.html_print_radio_button('netflow_disable_custom_lvfilters', 1, '', $config['netflow_disable_custom_lvfilters'], true).'   '; -$table->data[6][1] .= __('No').'  '.html_print_radio_button('netflow_disable_custom_lvfilters', 0, '', $config['netflow_disable_custom_lvfilters'], true); +$table->data[6][1] = html_print_checkbox_switch('netflow_disable_custom_lvfilters', 1, $config['netflow_disable_custom_lvfilters'], true); $table->data[7][0] = ''.__('Netflow max lifetime').''.ui_print_help_tip(__('Sets the maximum lifetime for netflow data in days.'), true); $table->data[7][1] = html_print_input_text('netflow_max_lifetime', $config['netflow_max_lifetime'], false, 50, 200, true); $table->data[8][0] = ''.__('Name resolution for IP address').''.ui_print_help_tip(__('Resolve the IP addresses to get their hostnames.'), true); $onclick = "if (!confirm('".__('Warning').'. '.__('IP address resolution can take a lot of time')."')) return false;"; -$table->data[8][1] = __('Yes').'  '.html_print_radio_button_extended('netflow_get_ip_hostname', 1, '', $config['netflow_get_ip_hostname'], false, $onclick, '', true).'   '; -$table->data[8][1] .= __('No').'  '.html_print_radio_button('netflow_get_ip_hostname', 0, '', $config['netflow_get_ip_hostname'], true); +$table->data[8][1] = html_print_checkbox_switch_extended('netflow_get_ip_hostname', 1, $config['netflow_get_ip_hostname'], false, $onclick, '', true); echo ''; html_print_table($table); -// Update button +// Update button. echo '
    '; html_print_input_hidden('update_config', 1); html_print_submit_button(__('Update'), 'upd_button', false, 'class="sub upd"'); diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php index 85047cd488..2a8cf22d8d 100755 --- a/pandora_console/godmode/setup/setup_visuals.php +++ b/pandora_console/godmode/setup/setup_visuals.php @@ -961,7 +961,7 @@ $table_other->data[$row][0] = __('Custom report front page').ui_print_help_tip( __('Custom report front page. It will be applied to all reports and templates by default.'), true ); -$table_other->data[$row][1] = html_print_checkbox( +$table_other->data[$row][1] = html_print_checkbox_switch( 'custom_report_front', 1, $config['custom_report_front'], @@ -1435,12 +1435,12 @@ $(document).ready (function () { // Juanma (06/05/2014) New feature: Custom front page for reports var custom_report = $('#checkbox-custom_report_front') .prop('checked'); - display_custom_report_front(custom_report,$('#checkbox-custom_report_front').parent().parent().parent().parent().attr('id')); + display_custom_report_front(custom_report,$('#checkbox-custom_report_front').parent().parent().parent().parent().parent().attr('id')); - $("#checkbox-custom_report_front").click( function() { + $("#checkbox-custom_report_front").change( function() { var custom_report = $('#checkbox-custom_report_front') .prop('checked'); - display_custom_report_front(custom_report,$(this).parent().parent().parent().parent().attr('id')); + display_custom_report_front(custom_report,$(this).parent().parent().parent().parent().parent().attr('id')); }); $(".databox.filters").css('margin-bottom','-10px'); }); From 9d7c6854a8ab4bf04842c9a5837ba7b3546bfd1c Mon Sep 17 00:00:00 2001 From: daniel Date: Mon, 4 Mar 2019 15:33:36 +0100 Subject: [PATCH 14/38] fixed error in snmp browser change server Former-commit-id: 0545012dd8526bdf4cc836af2d263af7b5ca5328 --- .../include/functions_snmp_browser.php | 167 ++++++++++++++---- .../javascript/pandora_snmp_browser.js | 2 + .../operation/snmpconsole/snmp_browser.php | 93 +++++++--- 3 files changed, 198 insertions(+), 64 deletions(-) diff --git a/pandora_console/include/functions_snmp_browser.php b/pandora_console/include/functions_snmp_browser.php index 4920816c89..fd68b77e54 100644 --- a/pandora_console/include/functions_snmp_browser.php +++ b/pandora_console/include/functions_snmp_browser.php @@ -1,21 +1,41 @@ '.$error_redir_dir, $output, $rc); + if ($server_to_exec != 0) { + $sql = sprintf( + 'SELECT ip_address FROM tserver WHERE id_server = %d', + $server_to_exec + ); + $server_data = db_get_row_sql($sql); + + if ($version == '3') { + $command = $snmpget_bin.' -m ALL -v 3 -u '.escapeshellarg($snmp3_auth_user).' -A '.escapeshellarg($snmp3_auth_pass).' -l '.escapeshellarg($snmp3_security_level).' -a '.escapeshellarg($snmp3_auth_method).' -x '.escapeshellarg($snmp3_privacy_method).' -X '.escapeshellarg($snmp3_privacy_pass).' '.escapeshellarg($target_ip).' '.escapeshellarg($target_oid).' 2> '.$error_redir_dir; + } else { + $command = $snmpget_bin.' -m ALL -M +'.escapeshellarg($config['homedir'].'/attachment/mibs').' -On -c '.escapeshellarg(io_safe_output($community)).' -v '.escapeshellarg($version).' '.escapeshellarg($target_ip).' '.escapeshellarg($target_oid).' 2> '.$error_redir_dir; + } + + exec( + 'ssh pandora_exec_proxy@'.$server_data['ip_address'].' "'.$command.'"', + $output, + $rc + ); } else { - exec($snmpget_bin.' -m ALL -M +'.escapeshellarg($config['homedir'].'/attachment/mibs').' -On -c '.escapeshellarg(io_safe_output($community)).' -v '.escapeshellarg($version).' '.escapeshellarg($target_ip).' '.escapeshellarg($target_oid).' 2> '.$error_redir_dir, $output, $rc); + if ($version == '3') { + exec( + $snmpget_bin.' -m ALL -v 3 -u '.escapeshellarg($snmp3_auth_user).' -A '.escapeshellarg($snmp3_auth_pass).' -l '.escapeshellarg($snmp3_security_level).' -a '.escapeshellarg($snmp3_auth_method).' -x '.escapeshellarg($snmp3_privacy_method).' -X '.escapeshellarg($snmp3_privacy_pass).' '.escapeshellarg($target_ip).' '.escapeshellarg($target_oid).' 2> '.$error_redir_dir, + $output, + $rc + ); + } else { + exec( + $snmpget_bin.' -m ALL -M +'.escapeshellarg($config['homedir'].'/attachment/mibs').' -On -c '.escapeshellarg(io_safe_output($community)).' -v '.escapeshellarg($version).' '.escapeshellarg($target_ip).' '.escapeshellarg($target_oid).' 2> '.$error_redir_dir, + $output, + $rc + ); + } } if ($rc != 0) { @@ -359,7 +444,7 @@ function snmp_browser_get_oid($target_ip, $community, $target_oid, $version='2c' } foreach ($output as $line) { - // Separate the OID from the value + // Separate the OID from the value. $full_oid = explode('=', $line); if (! isset($full_oid[1])) { break; @@ -368,7 +453,7 @@ function snmp_browser_get_oid($target_ip, $community, $target_oid, $version='2c' $oid = trim($full_oid[0]); $oid_data['numeric_oid'] = $oid; - // Translate the OID + // Translate the OID. if (empty($config['snmptranslate'])) { switch (PHP_OS) { case 'FreeBSD': @@ -387,10 +472,20 @@ function snmp_browser_get_oid($target_ip, $community, $target_oid, $version='2c' $snmptranslate_bin = $config['snmptranslate']; } - exec( - $snmptranslate_bin.' -m ALL -M +'.escapeshellarg($config['homedir'].'/attachment/mibs').' -Td '.escapeshellarg($oid), - $translate_output - ); + if ($server_to_exec != 0) { + $command_output = $snmptranslate_bin.' -m ALL -M +'.escapeshellarg($config['homedir'].'/attachment/mibs').' -Td '.escapeshellarg($oid); + exec( + 'ssh pandora_exec_proxy@'.$server_data['ip_address'].' "'.$command_output.'"', + $translate_output, + $rc + ); + } else { + exec( + $snmptranslate_bin.' -m ALL -M +'.escapeshellarg($config['homedir'].'/attachment/mibs').' -Td '.escapeshellarg($oid), + $translate_output + ); + } + foreach ($translate_output as $line) { if (preg_match('/SYNTAX\s+(.*)/', $line, $matches) == 1) { $oid_data['syntax'] = $matches[1]; @@ -403,7 +498,7 @@ function snmp_browser_get_oid($target_ip, $community, $target_oid, $version='2c' } } - // Parse the description. First search for it in custom values + // Parse the description. First search for it in custom values. $custom_data = db_get_row('ttrap_custom_values', 'oid', $oid); if ($custom_data === false) { $translate_output = implode('', $translate_output); diff --git a/pandora_console/include/javascript/pandora_snmp_browser.js b/pandora_console/include/javascript/pandora_snmp_browser.js index eb4cc80f2e..ee75eac71f 100644 --- a/pandora_console/include/javascript/pandora_snmp_browser.js +++ b/pandora_console/include/javascript/pandora_snmp_browser.js @@ -164,6 +164,7 @@ function snmpGet(oid) { var snmp3_privacy_method = $("#snmp3_browser_privacy_method").val(); var snmp3_privacy_pass = $("#password-snmp3_browser_privacy_pass").val(); var ajax_url = $("#hidden-ajax_url").val(); + var server_to_exec = $("#server_to_exec").val(); // Check for a custom action var custom_action = $("#hidden-custom_action").val(); @@ -183,6 +184,7 @@ function snmpGet(oid) { "snmp3_browser_auth_pass=" + snmp3_auth_pass, "snmp3_browser_privacy_method=" + snmp3_privacy_method, "snmp3_browser_privacy_pass=" + snmp3_privacy_pass, + "server_to_exec=" + server_to_exec, "action=" + "snmpget", "custom_action=" + custom_action, "page=operation/snmpconsole/snmp_browser" diff --git a/pandora_console/operation/snmpconsole/snmp_browser.php b/pandora_console/operation/snmpconsole/snmp_browser.php index 9cc50e1fc3..bae4f9e06f 100644 --- a/pandora_console/operation/snmpconsole/snmp_browser.php +++ b/pandora_console/operation/snmpconsole/snmp_browser.php @@ -1,24 +1,39 @@ '.html_print_image('images/normal_screen.png', true, ['title' => __('Normal screen')]).''; + // Windowed. + $link['text'] = ''; + $link['text'] .= html_print_image( + 'images/normal_screen.png', + true, + ['title' => __('Normal screen')] + ); + $link['text'] .= ''; } else { - // Fullscreen - $link['text'] = ''.html_print_image('images/full_screen.png', true, ['title' => __('Full screen')]).''; + // Fullscreen. + $link['text'] = ''; + $link['text'] .= html_print_image( + 'images/full_screen.png', + true, + ['title' => __('Full screen')] + ); + $link['text'] .= ''; } -ui_print_page_header(__('SNMP Browser'), 'images/op_snmp.png', false, '', false, [$link]); +ui_print_page_header( + __('SNMP Browser'), + 'images/op_snmp.png', + false, + '', + false, + [$link] +); -// SNMP tree container +// SNMP tree container. snmp_browser_print_container(); From 18ca3a191bce2ae991dd9018ff4a8a007505c6b7 Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Wed, 6 Mar 2019 16:47:56 +0100 Subject: [PATCH 15/38] ticket changed Former-commit-id: 532d461aa9ff0c956dbbe0dd931dc6f03d56498b --- .../operation/agentes/status_monitor.php | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index 6e3c26b470..f32c10d890 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -63,17 +63,6 @@ $sort = get_parameter('sort', 'none'); $id_module = (int) get_parameter('id_module', 0); $ag_custom_fields = (array) get_parameter('ag_custom_fields', []); $module_option = (int) get_parameter('module_option', 1); -$autosearch = false; - -// It is validated if it receives parameters different from those it has by default -if ($ag_freestring != '' || $moduletype != '' || $datatype != '' - || $ag_modulename != '' || $refr != 0 || $offset != 0 || $status != 4 - || $modulegroup != -1 || $tag_filter != 0 || $sortField != '' - || $sort != '' || $id_module != 0 || $ag_custom_fields != null - || $module_option != 1 -) { - $autosearch = true; -} if (!is_metaconsole()) { $ag_group = (int) get_parameter('ag_group', 0); @@ -955,10 +944,23 @@ $sql = 'SELECT ORDER BY '.$order['field'].' '.$order['order'].' LIMIT '.$offset.','.$limit_sql; -// When you enter for the first time you have less than 4 query params in the url -$first_interaction = count($_GET); -// We do not show the modules until the user searches with the filter -if ($first_interaction || $autosearch) { + $automonitordetail = false; + $autovisualconsole = false; + + // It is validated if it receives parameters different from those it has by default + $defaulturl = ui_get_full_url(); +if ($defaulturl !== 'http://localhost/pandora_console/index.php?sec=view&sec2=operation/agentes/status_monitor') { + $automonitordetail = true; +} + + $urlvisual = 'http://localhost/pandora_console/index.php?sec=view&sec2=operation/agentes/status_monitor&id_module='.$id_module; + +if ($urlvisual !== $defaulturl) { + $autovisualconsole = true; +} + + // We do not show the modules until the user searches with the filter +if ($automonitordetail && $autovisualconsole) { if (! defined('METACONSOLE')) { $result = db_get_all_rows_sql($sql); From d760c7d7017e2bb6a879fd769e06d44d7a3b4ea3 Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Wed, 6 Mar 2019 17:07:37 +0100 Subject: [PATCH 16/38] fix bug in functions_filemanager Former-commit-id: 93507790a70eb673a5660357acfcdf9c68279047 --- pandora_console/include/functions_filemanager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_filemanager.php b/pandora_console/include/functions_filemanager.php index fa51e3ad12..0f7e125852 100644 --- a/pandora_console/include/functions_filemanager.php +++ b/pandora_console/include/functions_filemanager.php @@ -121,9 +121,9 @@ if (!function_exists('mime_content_type')) { global $config; if (isset($config['homedir_filemanager'])) { - $homedir_filemanager = io_safe_output($config['homedir_filemanager']); + $homedir_filemanager = trim(io_safe_output($config['homedir_filemanager'])); } else { - $homedir_filemanager = $config['homedir']; + $homedir_filemanager = trim($config['homedir']); } $sec2 = get_parameter('sec2'); From e79e2a4fbc6cfca0dfdd79c060c52c10c15efb6e Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Wed, 6 Mar 2019 17:25:36 +0100 Subject: [PATCH 17/38] Finished Former-commit-id: 529f6297404b74dc41af77ae672a034530f18727 --- .../operation/agentes/status_monitor.php | 30 ++++++++----------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index f32c10d890..4a4114b6f8 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -63,6 +63,16 @@ $sort = get_parameter('sort', 'none'); $id_module = (int) get_parameter('id_module', 0); $ag_custom_fields = (array) get_parameter('ag_custom_fields', []); $module_option = (int) get_parameter('module_option', 1); +$autosearch = false; + +// It is validated if it receives parameters different from those it has by default +if ($ag_freestring !== '' || $moduletype !== '' || $datatype !== '' + || $ag_modulename !== '' || $refr !== 0 || $offset !== 0 || $status !== 4 + || $modulegroup !== -1 || $tag_filter !== 0 || $sortField !== '' + || $sort !== 'none' || $id_module !== 0 || $module_option !== 1 +) { + $autosearch = true; +} if (!is_metaconsole()) { $ag_group = (int) get_parameter('ag_group', 0); @@ -84,6 +94,7 @@ if ($id_module) { $status = -1; $ag_modulename = modules_get_agentmodule_name($id_module); $ag_freestring = modules_get_agentmodule_agent_alias($id_module); + $autosearch = false; } enterprise_hook('open_meta_frame'); @@ -944,23 +955,8 @@ $sql = 'SELECT ORDER BY '.$order['field'].' '.$order['order'].' LIMIT '.$offset.','.$limit_sql; - $automonitordetail = false; - $autovisualconsole = false; - - // It is validated if it receives parameters different from those it has by default - $defaulturl = ui_get_full_url(); -if ($defaulturl !== 'http://localhost/pandora_console/index.php?sec=view&sec2=operation/agentes/status_monitor') { - $automonitordetail = true; -} - - $urlvisual = 'http://localhost/pandora_console/index.php?sec=view&sec2=operation/agentes/status_monitor&id_module='.$id_module; - -if ($urlvisual !== $defaulturl) { - $autovisualconsole = true; -} - - // We do not show the modules until the user searches with the filter -if ($automonitordetail && $autovisualconsole) { +// We do not show the modules until the user searches with the filter +if ($autosearch) { if (! defined('METACONSOLE')) { $result = db_get_all_rows_sql($sql); From 4eb6c163398f21ba03ae145fa2f12e51c45b7fdb Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 7 Mar 2019 00:01:27 +0100 Subject: [PATCH 18/38] Auto-updated build strings. Former-commit-id: 4c22b36dac2410ec75f5cae1c0e6ec7b81e5d78f --- 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.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 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 1e3ae42078..f90226b707 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.732-190306 +Version: 7.0NG.732-190307 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 69d3728d28..19e8634366 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.732-190306" +pandora_version="7.0NG.732-190307" 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 61fc3a9c19..dfc55dae4b 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.732'; -use constant AGENT_BUILD => '190306'; +use constant AGENT_BUILD => '190307'; # 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 8df72d2f4d..3e212a7139 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.732 -%define release 190306 +%define release 190307 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 b38fb0c45c..8e7f60697d 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.732 -%define release 190306 +%define release 190307 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 a8eea69ed5..3ef65442bb 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.732" -PI_BUILD="190306" +PI_BUILD="190307" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index c5eda239d1..303d32ebe3 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190306} +{190307} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 6bcec9ac58..1cf874d803 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.732(Build 190306)") +#define PANDORA_VERSION ("7.0NG.732(Build 190307)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index afb7e2b05b..e30768134c 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.732(Build 190306))" + VALUE "ProductVersion", "(7.0NG.732(Build 190307))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index e560460e93..db5f4731d4 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.732-190306 +Version: 7.0NG.732-190307 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 07b9b05804..a6c6534ff2 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.732-190306" +pandora_version="7.0NG.732-190307" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index fa74d2780a..1057963b87 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 = 'PC190306'; +$build_version = 'PC190307'; $pandora_version = 'v7.0NG.732'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 594d22456c..a9d2a9b254 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 5ef7631700..dccbcc4d4b 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.732 -%define release 190306 +%define release 190307 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 53bfba37b8..9cdb2c0cfd 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.732 -%define release 190306 +%define release 190307 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index b3fc8c30c0..866b746b79 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.732" -PI_BUILD="190306" +PI_BUILD="190307" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 945689e1a9..e1c17b78cd 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.732 PS190306"; +my $version = "7.0NG.732 PS190307"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 1cf905d5bb..ccca4efe53 100644 --- 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.732 PS190306"; +my $version = "7.0NG.732 PS190307"; # save program name for logging my $progname = basename($0); From 798567bf8efa4a5e28fcfbee1a421eb37a4cac19 Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 7 Mar 2019 09:05:38 +0100 Subject: [PATCH 19/38] fixed minor errors change word command for parameters Former-commit-id: 6e6e56bded99331c606f7a9f6179826afee22d16 --- pandora_console/include/ajax/events.php | 2 +- pandora_console/operation/events/events.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/ajax/events.php b/pandora_console/include/ajax/events.php index 0d7d3f5a9f..6b7be8eb28 100644 --- a/pandora_console/include/ajax/events.php +++ b/pandora_console/include/ajax/events.php @@ -844,7 +844,7 @@ if ($get_table_response_command) { $table->style[1] = 'text-align:center;'; $table->head = []; - $table->head[0] = __('Commands'); + $table->head[0] = __('Parameters'); $table->head[0] .= ui_print_help_tip( __('These commands will apply to all selected events'), true diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index f84e92571e..9fb78b084c 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -611,7 +611,7 @@ if ($delete) { echo "
    "; echo "
    "; -echo "
    "; +echo "
    "; ui_require_jquery_file('bgiframe'); ui_require_javascript_file('pandora_events'); From 2d6636bb51f7d2004c4f3f53aa486b81637eabeb Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Thu, 7 Mar 2019 10:36:06 +0100 Subject: [PATCH 20/38] Revert changes on dbmanager.php Former-commit-id: 3c9eaec695b923ea81f60d8dcfb5716af6515e37 --- pandora_console/extensions/dbmanager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/extensions/dbmanager.php b/pandora_console/extensions/dbmanager.php index c924bd3ea9..2aface6996 100644 --- a/pandora_console/extensions/dbmanager.php +++ b/pandora_console/extensions/dbmanager.php @@ -106,7 +106,7 @@ function dbmgr_extension_main() echo '

    '; echo ""; - html_print_textarea('sql', 5, 50, $sql); + html_print_textarea('sql', 5, 50, html_entity_decode($sql, ENT_QUOTES)); echo '
    '; echo '
    '; echo '
    '; From d4f5482e99209bf3addf227a1ede2b8b692e9fc4 Mon Sep 17 00:00:00 2001 From: manuel Date: Thu, 7 Mar 2019 13:37:36 +0100 Subject: [PATCH 21/38] Added custom field combo values in agent custom field Former-commit-id: 55ca33d3de14c868e1eec3f32179b33dc3ff589b --- pandora_console/extras/mr/25.sql | 4 + .../pandoradb_migrate_6.0_to_7.0.mysql.sql | 4 + .../godmode/agentes/agent_manager.php | 31 +++- .../godmode/agentes/configure_field.php | 151 +++++++++++++++++- .../godmode/agentes/fields_manager.php | 16 +- .../godmode/massive/massive_edit_agents.php | 29 ++++ 6 files changed, 221 insertions(+), 14 deletions(-) diff --git a/pandora_console/extras/mr/25.sql b/pandora_console/extras/mr/25.sql index 0809bc486e..d69c619586 100644 --- a/pandora_console/extras/mr/25.sql +++ b/pandora_console/extras/mr/25.sql @@ -143,5 +143,9 @@ INSERT INTO tlog_graph_models (`title`,`regexp`,`fields`,`average`) VALUES ('Pag INSERT INTO tlog_graph_models (`title`,`regexp`,`fields`,`average`) VALUES ('Users login', 'Starting Session \d+\ of user (.*)', 'user', 0); +-- ---------------------------------------------------------------------- +-- Add column in table `tagent_custom_fields` +-- ---------------------------------------------------------------------- +ALTER TABLE tagent_custom_fields ADD COLUMN `combo_values` VARCHAR(200) DEFAULT ''; COMMIT; 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 d8377484c3..b9e44bf064 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 @@ -2034,3 +2034,7 @@ INSERT INTO `tnotification_user` (`id_mensaje`, `id_user`) SELECT `id_mensaje`, -- ---------------------------------------------------------------------- INSERT INTO `trecon_script` (`name`,`description`,`script`,`macros`) VALUES ('Discovery.Application.VMware', 'Discovery Application script to monitor VMware technologies (ESXi, VCenter, VSphere)', '/usr/share/pandora_server/util/recon_scripts/vmware-plugin.pl', '{"1":{"macro":"_field1_","desc":"Configuration file","help":"","value":"","hide":""}}'); INSERT INTO `trecon_script` (`name`,`description`,`script`,`macros`) VALUES ('Discovery.Cloud', 'Discovery Cloud script to monitor Cloud technologies (AWS.EC2, AWS.S3, AWS.RDS, RDS,ȊWS.EKS)', '/usr/share/pandora_server/util/recon_scripts/pcm_client.pl', '{"1":{"macro":"_field1_","desc":"Configuration file","help":"","value":"","hide":""}}'); +-- ---------------------------------------------------------------------- +-- Add column in table `tagent_custom_fields` +-- ---------------------------------------------------------------------- +ALTER TABLE tagent_custom_fields ADD COLUMN `combo_values` VARCHAR(200) DEFAULT ''; diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index 143d6d880b..a7fc1f156a 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -708,6 +708,13 @@ foreach ($fields as $field) { __('This field allows url insertion using the BBCode\'s url tag').'.
    '.__('The format is: [url=\'url to navigate\']\'text to show\'[/url]').'.

    '.__('e.g.: [url=google.com]Google web search[/url]'), true ); + $combo = []; + $combo = $field['combo_values']; + $combo = explode(',', $combo); + $combo_values = []; + foreach ($combo as $value) { + $combo_values[$value] = $value; + } $custom_value = db_get_value_filter( 'description', @@ -747,6 +754,28 @@ foreach ($fields as $field) { ); } + if ($field['combo_values'] !== '') { + $data[1] = html_print_select( + $combo_values, + 'customvalue_'.$field['id_field'], + $custom_value, + '', + __('None'), + '', + true, + false, + false, + '', + false, + false, + false, + false, + false, + '', + false + ); + }; + array_push($table->data, $data); } @@ -757,7 +786,7 @@ if (!empty($fields)) { echo '
    '; -// The context help about the learning mode +// The context help about the learning mode. if ($modo == 0) { echo ""; } else { diff --git a/pandora_console/godmode/agentes/configure_field.php b/pandora_console/godmode/agentes/configure_field.php index 25afef0c21..5f7c6b91d0 100755 --- a/pandora_console/godmode/agentes/configure_field.php +++ b/pandora_console/godmode/agentes/configure_field.php @@ -25,13 +25,16 @@ $id_field = (int) get_parameter('id_field', 0); $name = (string) get_parameter('name', ''); $display_on_front = (bool) get_parameter('display_on_front', 0); $is_password_type = (bool) get_parameter('is_password_type', 0); - -// Header +$is_combo_enable = (bool) get_parameter('is_combo_enable', 0); +$combo_values = (string) get_parameter('combo_values', ''); +// Header. if ($id_field) { $field = db_get_row_filter('tagent_custom_fields', ['id_field' => $id_field]); $name = $field['name']; $display_on_front = $field['display_on_front']; $is_password_type = $field['is_password_type']; + $combo_values = $field['combo_values']; + $is_combo_enable = $config['is_combo_enable']; ui_print_page_header(__('Update agent custom field'), 'images/custom_field.png', false, '', true, ''); } else { ui_print_page_header(__('Create agent custom field'), 'images/custom_field.png', false, '', true, ''); @@ -40,17 +43,87 @@ if ($id_field) { $table = new stdClass(); $table->width = '100%'; $table->class = 'databox filters'; +$table->id = 'configure_field'; $table->style[0] = 'font-weight: bold'; $table->style[2] = 'font-weight: bold'; +$table->style[4] = 'font-weight: bold'; +$table->style[6] = 'font-weight: bold'; + +echo "'; + +echo "'; + +echo "'; + +echo "'; + + $table->data = []; + $table->data[0][0] = __('Name'); -$table->data[0][1] = html_print_input_text('name', $name, '', 35, 100, true); +$table->data[0][1] = html_print_input_text( + 'name', + $name, + '', + 35, + 100, + true +); -$table->data[0][2] = __('Pass type').ui_print_help_tip(__('The fields with pass type enabled will be displayed like html input type pass in html'), true); -$table->data[0][3] = html_print_checkbox('is_password_type', 1, $is_password_type, true); +$table->data[1][0] = __('Pass type').ui_print_help_tip( + __('The fields with pass type enabled will be displayed like html input type pass in html'), + true +); +$table->data[1][1] = html_print_checkbox_switch( + 'is_password_type', + 1, + $is_password_type, + true +); -$table->data[0][4] = __('Display on front').ui_print_help_tip(__('The fields with display on front enabled will be displayed into the agent details'), true); -$table->data[0][5] = html_print_checkbox('display_on_front', 1, $display_on_front, true); +$table->data[2][0] = __('Display on front').ui_print_help_tip( + __('The fields with display on front enabled will be displayed into the agent details'), + true +); +$table->data[2][1] = html_print_checkbox_switch( + 'display_on_front', + 1, + $display_on_front, + true +); + +$table->data[3][0] = __('Enabled combo'); +$table->data[3][1] = html_print_checkbox_switch_extended( + 'is_combo_enable', + 0, + $config['is_combo_enable'], + false, + '', + '', + true +); + +$table->rowstyle[4] = 'display: none;'; +$table->data[4][0] = __('Combo values').ui_print_help_tip( + __('Set values separated by comma'), + true +); +$table->data[4][1] = html_print_input_text( + 'combo_values', + io_safe_output($combo_values), + '', + 35, + 200, + true +); echo ''; html_print_table($table); @@ -67,3 +140,67 @@ if ($id_field) { echo '
    '; echo ''; +?> + + diff --git a/pandora_console/godmode/agentes/fields_manager.php b/pandora_console/godmode/agentes/fields_manager.php index 867942871d..0be7166062 100644 --- a/pandora_console/godmode/agentes/fields_manager.php +++ b/pandora_console/godmode/agentes/fields_manager.php @@ -26,7 +26,7 @@ if (!check_acl($config['id_user'], 0, 'PM')) { return; } -// Header +// Header. ui_print_page_header(__('Agents custom fields manager'), 'images/custom_field.png', false, '', true, ''); $create_field = (bool) get_parameter('create_field'); @@ -36,10 +36,12 @@ $id_field = (int) get_parameter('id_field', 0); $name = (string) get_parameter('name', ''); $display_on_front = (int) get_parameter('display_on_front', 0); $is_password_type = (int) get_parameter('is_password_type', 0); +$combo_values = (string) get_parameter('combo_values', ''); +$combo_value_selected = (string) get_parameter('combo_value_selected', ''); -// Create field +// Create field. if ($create_field) { - // Check if name field is empty + // Check if name field is empty. if ($name == '') { ui_print_error_message(__('The name must not be empty')); } else if ($name == db_get_value('name', 'tagent_custom_fields', 'name', $name)) { @@ -51,20 +53,22 @@ if ($create_field) { 'name' => $name, 'display_on_front' => $display_on_front, 'is_password_type' => $is_password_type, + 'combo_values' => $combo_values, ] ); ui_print_success_message(__('Field successfully created')); } } -// Update field +// Update field. if ($update_field) { - // Check if name field is empty + // Check if name field is empty. if ($name != '') { $values = [ 'name' => $name, 'display_on_front' => $display_on_front, 'is_password_type' => $is_password_type, + 'combo_values' => $combo_values, ]; $result = db_process_sql_update('tagent_custom_fields', $values, ['id_field' => $id_field]); @@ -79,7 +83,7 @@ if ($update_field) { } } -// Delete field +// Delete field. if ($delete_field) { $result = db_process_sql_delete( 'tagent_custom_fields', diff --git a/pandora_console/godmode/massive/massive_edit_agents.php b/pandora_console/godmode/massive/massive_edit_agents.php index 2011eec564..74d05c10d0 100755 --- a/pandora_console/godmode/massive/massive_edit_agents.php +++ b/pandora_console/godmode/massive/massive_edit_agents.php @@ -689,6 +689,13 @@ foreach ($fields as $field) { __('This field allows url insertion using the BBCode\'s url tag').'.
    '.__('The format is: [url=\'url to navigate\']\'text to show\'[/url]').'.

    '.__('e.g.: [url=google.com]Google web search[/url]'), true ); + $combo = []; + $combo = $field['combo_values']; + $combo = explode(',', $combo); + $combo_values = []; + foreach ($combo as $value) { + $combo_values[$value] = $value; + } $custom_value = db_get_value_filter('description', 'tagent_custom_data', ['id_field' => $field['id_field'], 'id_agent' => $id_agente]); @@ -714,6 +721,28 @@ foreach ($fields as $field) { $data[1] = html_print_textarea('customvalue_'.$field['id_field'], 2, 65, $custom_value, 'style="min-height: 30px;"', true); } + if ($field['combo_values'] !== '') { + $data[1] = html_print_select( + $combo_values, + 'customvalue_'.$field['id_field'], + $custom_value, + '', + __('No change'), + '', + true, + false, + false, + '', + false, + false, + false, + false, + false, + '', + false + ); + }; + array_push($table->data, $data); } From cfcb42767699cc8422fb8ad6ec946f653234bd80 Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 7 Mar 2019 14:52:31 +0100 Subject: [PATCH 22/38] fixed minor error Former-commit-id: 5025e19699e773afee950a31bdceeeb0eb4bc47d --- .../godmode/modules/manage_network_components_form_common.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/modules/manage_network_components_form_common.php b/pandora_console/godmode/modules/manage_network_components_form_common.php index ba463d9bb9..2e511c6f6f 100644 --- a/pandora_console/godmode/modules/manage_network_components_form_common.php +++ b/pandora_console/godmode/modules/manage_network_components_form_common.php @@ -216,7 +216,7 @@ $table->data[5][1] .= html_print_input_text( $max_critical, '', 5, - 1024, + 15, true ).''; $table->data[5][1] .= ''.__('Str.').'  '; @@ -225,7 +225,7 @@ $table->data[5][1] .= html_print_input_text( $str_critical, '', 5, - 64, + 1024, true ).''; $table->data[5][1] .= '
    '.__('Inverse interval').''; From 98ec2f31e66aa88e0d1f0b9b62ff3b41c0507a56 Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Thu, 7 Mar 2019 18:05:03 +0100 Subject: [PATCH 23/38] Restored width in % and forced Agent SNMP view to enter if with widget=true Former-commit-id: 25ca763789d5d30d298b6bf77bd5f0630aff526f --- pandora_console/include/functions_reporting_html.php | 2 +- pandora_console/include/graphs/functions_flot.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index 362120e0a1..786a31ae7f 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -4531,7 +4531,7 @@ function reporting_get_event_histogram($events, $text_header_event=false) [], true, $ttl, - false, + true, false ); diff --git a/pandora_console/include/graphs/functions_flot.php b/pandora_console/include/graphs/functions_flot.php index 39c4c347dc..637d02b34b 100644 --- a/pandora_console/include/graphs/functions_flot.php +++ b/pandora_console/include/graphs/functions_flot.php @@ -748,7 +748,7 @@ function flot_slicesbar_graph( if ($widgets) { $return = "
    "; } else { - $return = "
    "; + $return = "
    "; } } From e43d1aa35600d66ac2586292380238a3ca935b71 Mon Sep 17 00:00:00 2001 From: artica Date: Fri, 8 Mar 2019 00:01:31 +0100 Subject: [PATCH 24/38] Auto-updated build strings. Former-commit-id: d9a712a382713bbbbb82849a2be70991acd7e72f --- 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.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 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index f90226b707..3792cba965 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.732-190307 +Version: 7.0NG.732-190308 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 19e8634366..f752620797 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.732-190307" +pandora_version="7.0NG.732-190308" 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 dfc55dae4b..bc4506b120 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.732'; -use constant AGENT_BUILD => '190307'; +use constant AGENT_BUILD => '190308'; # 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 3e212a7139..563fa5261f 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.732 -%define release 190307 +%define release 190308 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 8e7f60697d..b440a03c4f 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.732 -%define release 190307 +%define release 190308 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 3ef65442bb..e66981e5a7 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.732" -PI_BUILD="190307" +PI_BUILD="190308" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 303d32ebe3..044c2645c9 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190307} +{190308} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 1cf874d803..d5599b189a 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.732(Build 190307)") +#define PANDORA_VERSION ("7.0NG.732(Build 190308)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index e30768134c..edcbbda609 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.732(Build 190307))" + VALUE "ProductVersion", "(7.0NG.732(Build 190308))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index db5f4731d4..b1a739e3dd 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.732-190307 +Version: 7.0NG.732-190308 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 a6c6534ff2..023455e028 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.732-190307" +pandora_version="7.0NG.732-190308" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 1057963b87..ac7d110f66 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 = 'PC190307'; +$build_version = 'PC190308'; $pandora_version = 'v7.0NG.732'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index a9d2a9b254..8c3b201fea 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 dccbcc4d4b..60399c3a0b 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.732 -%define release 190307 +%define release 190308 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 9cdb2c0cfd..212cb99d53 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.732 -%define release 190307 +%define release 190308 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 866b746b79..2f4bdafaca 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.732" -PI_BUILD="190307" +PI_BUILD="190308" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index e1c17b78cd..9341a7fe0a 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.732 PS190307"; +my $version = "7.0NG.732 PS190308"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index ccca4efe53..9ddd183499 100644 --- 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.732 PS190307"; +my $version = "7.0NG.732 PS190308"; # save program name for logging my $progname = basename($0); From c41c9d10e0ce84d5a4bb62af5968de38fbd7d585 Mon Sep 17 00:00:00 2001 From: manuel Date: Fri, 8 Mar 2019 10:01:55 +0100 Subject: [PATCH 25/38] Changed sql files Former-commit-id: b9b20d2a5aee08ca1638df9bdb8e16c3b693d47b --- pandora_console/extras/mr/25.sql | 4 ---- pandora_console/extras/mr/26.sql | 8 ++++++++ .../extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 6 +++--- pandora_console/pandoradb.sql | 1 + pandora_console/pandoradb_data.sql | 6 +++--- 5 files changed, 15 insertions(+), 10 deletions(-) create mode 100644 pandora_console/extras/mr/26.sql diff --git a/pandora_console/extras/mr/25.sql b/pandora_console/extras/mr/25.sql index d69c619586..0809bc486e 100644 --- a/pandora_console/extras/mr/25.sql +++ b/pandora_console/extras/mr/25.sql @@ -143,9 +143,5 @@ INSERT INTO tlog_graph_models (`title`,`regexp`,`fields`,`average`) VALUES ('Pag INSERT INTO tlog_graph_models (`title`,`regexp`,`fields`,`average`) VALUES ('Users login', 'Starting Session \d+\ of user (.*)', 'user', 0); --- ---------------------------------------------------------------------- --- Add column in table `tagent_custom_fields` --- ---------------------------------------------------------------------- -ALTER TABLE tagent_custom_fields ADD COLUMN `combo_values` VARCHAR(200) DEFAULT ''; COMMIT; diff --git a/pandora_console/extras/mr/26.sql b/pandora_console/extras/mr/26.sql new file mode 100644 index 0000000000..f9c904a0a3 --- /dev/null +++ b/pandora_console/extras/mr/26.sql @@ -0,0 +1,8 @@ +START TRANSACTION; + +-- ---------------------------------------------------------------------- +-- Add column in table `tagent_custom_fields` +-- ---------------------------------------------------------------------- +ALTER TABLE tagent_custom_fields ADD COLUMN `combo_values` VARCHAR(255) DEFAULT ''; + +COMMIT; 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 b9e44bf064..a2953d00f5 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 @@ -1199,13 +1199,13 @@ ALTER TABLE titem MODIFY `source_data` int(10) unsigned; INSERT INTO `tconfig` (`token`, `value`) VALUES ('big_operation_step_datos_purge', '100'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '30'); -INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 25); +INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 26); INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_docs_logo', 'default_docs.png'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_support_logo', 'default_support.png'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png'); UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.php' WHERE token='url_update_manager'; DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise'; -INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '732'); +INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '733'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('status_monitor_fields', 'policy,agent,data_type,module_name,server_type,interval,status,graph,warn,data,timestamp'); -- --------------------------------------------------------------------- @@ -2037,4 +2037,4 @@ INSERT INTO `trecon_script` (`name`,`description`,`script`,`macros`) VALUES ('Di -- ---------------------------------------------------------------------- -- Add column in table `tagent_custom_fields` -- ---------------------------------------------------------------------- -ALTER TABLE tagent_custom_fields ADD COLUMN `combo_values` VARCHAR(200) DEFAULT ''; +ALTER TABLE tagent_custom_fields ADD COLUMN `combo_values` VARCHAR(255) DEFAULT ''; diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index ae780a5470..ac1f16c6f7 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -1894,6 +1894,7 @@ CREATE TABLE IF NOT EXISTS `tagent_custom_fields` ( `name` varchar(45) NOT NULL default '', `display_on_front` tinyint(1) NOT NULL default 0, `is_password_type` tinyint(1) NOT NULL default 0, + `combo_values` VARCHAR(255) DEFAULT '', PRIMARY KEY (`id_field`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 25bff0eb4d..9b5ec600a2 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -111,10 +111,10 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_report_front_logo', 'images/pandora_logo_white.jpg'), ('custom_report_front_header', ''), ('custom_report_front_footer', ''), -('MR', 25), +('MR', 26), ('identification_reminder', 1), ('identification_reminder_timestamp', 0), -('current_package_enterprise', '732'), +('current_package_enterprise', '733'), ('post_process_custom_values', '{"0.00000038580247":"Seconds to months","0.00000165343915":"Seconds to weeks","0.00001157407407":"Seconds to days","0.01666666666667":"Seconds to minutes","0.00000000093132":"Bytes to Gigabytes","0.00000095367432":"Bytes to Megabytes","0.0009765625":"Bytes to Kilobytes","0.00000001653439":"Timeticks to weeks","0.00000011574074":"Timeticks to days"}'), ('custom_docs_logo', 'default_docs.png'), ('custom_support_logo', 'default_support.png'), @@ -1151,7 +1151,7 @@ INSERT INTO `tplugin` (`id`, `name`, `description`, `max_timeout`, `execute`, `p INSERT INTO `tplugin` (`id`, `name`, `description`, `max_timeout`, `max_retries`, `execute`, `net_dst_opt`, `net_port_opt`, `user_opt`, `pass_opt`, `plugin_type`, `macros`, `parameters`) VALUES (9,'Packet Loss','Checks for dropped packages after X seconds of testing. It returns % of dropped packets. It uses ping flood mode to launch 50 consecutive pings to a remote destination. On local, stable networks, value should be 0. ',30,0,'/usr/share/pandora_server/util/plugin/packet_loss.sh','','','','',0,'{\"1\":{\"macro\":\"_field1_\",\"desc\":\"Test time\",\"help\":\"\",\"value\":\"8\",\"hide\":\"\"},\"2\":{\"macro\":\"_field2_\",\"desc\":\"Target IP\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"}}','_field1_ _field2_'); -INSERT INTO `tagent_custom_fields` VALUES (1,'Serial Number',0,0),(2,'Department',0,0),(3,'Additional ID',0,0),(4,'eHorusID',0,0); +INSERT INTO `tagent_custom_fields` VALUES (1,'Serial Number',0,0,''),(2,'Department',0,0,''),(3,'Additional ID',0,0,''),(4,'eHorusID',0,0,''); INSERT INTO `ttag` VALUES (1,'network','Network equipment','http://artica.es','',''),(2,'critical','Critical modules','','',''),(3,'dmz','DMZ Network Zone','','',''),(4,'performance','Performance anda capacity modules','','',''),(5,'configuration','','','',''); From fd68b49710d4911a490c598edb6139f8486de70f Mon Sep 17 00:00:00 2001 From: artica Date: Sat, 9 Mar 2019 00:01:32 +0100 Subject: [PATCH 26/38] Auto-updated build strings. Former-commit-id: 6b07eeeea7577d37282399b23c8b409ab7253507 --- 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.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 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 3792cba965..08b9b8b0d4 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.732-190308 +Version: 7.0NG.732-190309 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 f752620797..5a4c9f5b81 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.732-190308" +pandora_version="7.0NG.732-190309" 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 bc4506b120..d8386903a9 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.732'; -use constant AGENT_BUILD => '190308'; +use constant AGENT_BUILD => '190309'; # 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 563fa5261f..63c0661d89 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.732 -%define release 190308 +%define release 190309 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 b440a03c4f..93ed89a213 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.732 -%define release 190308 +%define release 190309 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 e66981e5a7..1ff1e27391 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.732" -PI_BUILD="190308" +PI_BUILD="190309" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 044c2645c9..e07483e93e 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190308} +{190309} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index d5599b189a..a83a0744dc 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.732(Build 190308)") +#define PANDORA_VERSION ("7.0NG.732(Build 190309)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index edcbbda609..33a7f55f0f 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.732(Build 190308))" + VALUE "ProductVersion", "(7.0NG.732(Build 190309))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index b1a739e3dd..0785913d63 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.732-190308 +Version: 7.0NG.732-190309 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 023455e028..ede9646d7f 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.732-190308" +pandora_version="7.0NG.732-190309" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index ac7d110f66..1f1896db1a 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 = 'PC190308'; +$build_version = 'PC190309'; $pandora_version = 'v7.0NG.732'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 8c3b201fea..f194f758cb 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 60399c3a0b..398199a186 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.732 -%define release 190308 +%define release 190309 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 212cb99d53..f2d29498f0 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.732 -%define release 190308 +%define release 190309 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 2f4bdafaca..b0db46d7bc 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.732" -PI_BUILD="190308" +PI_BUILD="190309" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 9341a7fe0a..aa205c440d 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.732 PS190308"; +my $version = "7.0NG.732 PS190309"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 9ddd183499..ca1ae28fb4 100644 --- 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.732 PS190308"; +my $version = "7.0NG.732 PS190309"; # save program name for logging my $progname = basename($0); From b79815bb06ce5f1af779ee66f879d38f6e62c3c5 Mon Sep 17 00:00:00 2001 From: artica Date: Sun, 10 Mar 2019 00:01:25 +0100 Subject: [PATCH 27/38] Auto-updated build strings. Former-commit-id: e002aa51a4e0ad634ed459dcccd4444cb1d0081c --- 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.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 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 08b9b8b0d4..b98b45ad32 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.732-190309 +Version: 7.0NG.732-190310 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 5a4c9f5b81..17297ae4fb 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.732-190309" +pandora_version="7.0NG.732-190310" 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 d8386903a9..32599fc805 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.732'; -use constant AGENT_BUILD => '190309'; +use constant AGENT_BUILD => '190310'; # 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 63c0661d89..c432c8431a 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.732 -%define release 190309 +%define release 190310 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 93ed89a213..57d40b1e84 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.732 -%define release 190309 +%define release 190310 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 1ff1e27391..99c26865ab 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.732" -PI_BUILD="190309" +PI_BUILD="190310" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index e07483e93e..b64f9c969e 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190309} +{190310} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index a83a0744dc..fa1b438fa3 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.732(Build 190309)") +#define PANDORA_VERSION ("7.0NG.732(Build 190310)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 33a7f55f0f..e1e42cae47 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.732(Build 190309))" + VALUE "ProductVersion", "(7.0NG.732(Build 190310))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 0785913d63..edf0e9e7c7 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.732-190309 +Version: 7.0NG.732-190310 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 ede9646d7f..bc520dd17b 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.732-190309" +pandora_version="7.0NG.732-190310" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 1f1896db1a..7182010499 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 = 'PC190309'; +$build_version = 'PC190310'; $pandora_version = 'v7.0NG.732'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index f194f758cb..c7efb7b369 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 398199a186..d5edc25f25 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.732 -%define release 190309 +%define release 190310 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index f2d29498f0..7bd24ee70f 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.732 -%define release 190309 +%define release 190310 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index b0db46d7bc..33312c2f0d 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.732" -PI_BUILD="190309" +PI_BUILD="190310" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index aa205c440d..0cc14e1fe0 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.732 PS190309"; +my $version = "7.0NG.732 PS190310"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index ca1ae28fb4..cb0294ef25 100644 --- 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.732 PS190309"; +my $version = "7.0NG.732 PS190310"; # save program name for logging my $progname = basename($0); From 0210c2381d58d9cd3319a6767f57b53ef0c474a3 Mon Sep 17 00:00:00 2001 From: artica Date: Mon, 11 Mar 2019 00:01:58 +0100 Subject: [PATCH 28/38] Auto-updated build strings. Former-commit-id: 7f83037f89edf17156828a793fa1ae3a5920d818 --- 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.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 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index b98b45ad32..5792ba17ca 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.732-190310 +Version: 7.0NG.732-190311 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 17297ae4fb..4f7a02a497 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.732-190310" +pandora_version="7.0NG.732-190311" 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 32599fc805..e0a754adad 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.732'; -use constant AGENT_BUILD => '190310'; +use constant AGENT_BUILD => '190311'; # 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 c432c8431a..fb0952ad20 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.732 -%define release 190310 +%define release 190311 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 57d40b1e84..c4cca3a53b 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.732 -%define release 190310 +%define release 190311 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 99c26865ab..26aaea4fa7 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.732" -PI_BUILD="190310" +PI_BUILD="190311" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index b64f9c969e..23cad4a284 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190310} +{190311} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index fa1b438fa3..0d2b48f5d0 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.732(Build 190310)") +#define PANDORA_VERSION ("7.0NG.732(Build 190311)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index e1e42cae47..a9ecca4a92 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.732(Build 190310))" + VALUE "ProductVersion", "(7.0NG.732(Build 190311))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index edf0e9e7c7..ac8156d640 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.732-190310 +Version: 7.0NG.732-190311 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 bc520dd17b..7a8fe965bb 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.732-190310" +pandora_version="7.0NG.732-190311" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 7182010499..c71487946d 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 = 'PC190310'; +$build_version = 'PC190311'; $pandora_version = 'v7.0NG.732'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index c7efb7b369..22574acdab 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 d5edc25f25..8be92339c6 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.732 -%define release 190310 +%define release 190311 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 7bd24ee70f..8107520b9f 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.732 -%define release 190310 +%define release 190311 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 33312c2f0d..bcdeb6a35a 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.732" -PI_BUILD="190310" +PI_BUILD="190311" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 0cc14e1fe0..c8256d9739 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.732 PS190310"; +my $version = "7.0NG.732 PS190311"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index cb0294ef25..ea0e6f48e5 100644 --- 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.732 PS190310"; +my $version = "7.0NG.732 PS190311"; # save program name for logging my $progname = basename($0); From ccb669a204967d6cd72607c998eaebfe4d609bc5 Mon Sep 17 00:00:00 2001 From: manuel Date: Mon, 11 Mar 2019 09:37:08 +0100 Subject: [PATCH 29/38] Fixed minor errors in setup_ehorus Former-commit-id: ed0ba17641714a87446b4db88d933d7b176e531e --- .../godmode/setup/setup_ehorus.php | 43 +++++++++++-------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/pandora_console/godmode/setup/setup_ehorus.php b/pandora_console/godmode/setup/setup_ehorus.php index 0274767cff..fc2ebd3d3a 100644 --- a/pandora_console/godmode/setup/setup_ehorus.php +++ b/pandora_console/godmode/setup/setup_ehorus.php @@ -28,7 +28,7 @@ if (! check_acl($config['id_user'], 0, 'PM') && ! is_user_admin($config['id_user return; } -// Check custom field +// Check custom field. $custom_field = db_get_value('name', 'tagent_custom_fields', 'name', $config['ehorus_custom_field']); $custom_field_exists = !empty($custom_field); $custom_field_created = null; @@ -41,7 +41,7 @@ if ($config['ehorus_enabled'] && !$custom_field_exists) { $custom_field_exists = $custom_field_created = $result; } -// Enable table +// Enable table. $table_enable = new StdClass(); $table_enable->data = []; $table_enable->width = '100%'; @@ -50,14 +50,13 @@ $table_enable->class = 'databox filters'; $table_enable->size['name'] = '30%'; $table_enable->style['name'] = 'font-weight: bold'; -// Enable eHorus +// Enable eHorus. $row = []; $row['name'] = __('Enable eHorus'); -$row['control'] = html_print_checkbox_switch('ehorus_enabled', false, $config['ehorus_enabled'], true); -$row['button'] = html_print_submit_button(__('Update'), 'update_button', false, 'class="sub upd"', true); +$row['control'] = html_print_checkbox_switch('ehorus_enabled', 1, $config['ehorus_enabled'], true); $table_enable->data['ehorus_enabled'] = $row; -// Remote config table +// Remote config table. $table_remote = new StdClass(); $table_remote->data = []; $table_remote->width = '100%'; @@ -67,40 +66,40 @@ $table_remote->class = 'databox filters'; $table_remote->size['name'] = '30%'; $table_remote->style['name'] = 'font-weight: bold'; -// User +// User. $row = []; $row['name'] = __('User'); $row['control'] = html_print_input_text('ehorus_user', $config['ehorus_user'], '', 30, 100, true); $table_remote->data['ehorus_user'] = $row; -// Pass +// Pass. $row = []; $row['name'] = __('Password'); $row['control'] = html_print_input_password('ehorus_pass', io_output_password($config['ehorus_pass']), '', 30, 100, true); $table_remote->data['ehorus_pass'] = $row; -// Directory hostname +// Directory hostname. $row = []; $row['name'] = __('API Hostname'); $row['control'] = html_print_input_text('ehorus_hostname', $config['ehorus_hostname'], '', 30, 100, true); $row['control'] .= ui_print_help_tip(__('Hostname of the eHorus API').'. '.__('Without protocol and port').'. '.__('e.g., portal.ehorus.com'), true); $table_remote->data['ehorus_hostname'] = $row; -// Directory port +// Directory port. $row = []; $row['name'] = __('API Port'); $row['control'] = html_print_input_text('ehorus_port', $config['ehorus_port'], '', 6, 100, true); $row['control'] .= ui_print_help_tip(__('e.g., 18080'), true); $table_remote->data['ehorus_port'] = $row; -// Request timeout +// Request timeout. $row = []; $row['name'] = __('Request timeout'); $row['control'] = html_print_input_text('ehorus_req_timeout', $config['ehorus_req_timeout'], '', 3, 10, true); $row['control'] .= ui_print_help_tip(__('Time in seconds to set the maximum time of the requests to the eHorus API').'. '.__('0 to disable'), true); $table_remote->data['ehorus_req_timeout'] = $row; -// Test +// Test. $row = []; $row['name'] = __('Test'); $row['control'] = html_print_button(__('Start'), 'test-ehorus', false, '', 'class="sub next"', true); @@ -110,7 +109,7 @@ $row['control'] .= '
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 8be92339c6..5c6662ad47 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.732 -%define release 190311 +%define release 190312 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 8107520b9f..239b8b4a98 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.732 -%define release 190311 +%define release 190312 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index bcdeb6a35a..8bfb991f42 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.732" -PI_BUILD="190311" +PI_BUILD="190312" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index c8256d9739..8602f0d24d 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.732 PS190311"; +my $version = "7.0NG.732 PS190312"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index ea0e6f48e5..1b00ef349a 100644 --- 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.732 PS190311"; +my $version = "7.0NG.732 PS190312"; # save program name for logging my $progname = basename($0); From 29f00dd1dac4199b7670590252c287d1ffa487d7 Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Tue, 12 Mar 2019 11:09:12 +0100 Subject: [PATCH 36/38] New login page Former-commit-id: ae1cc9368536c6a9fbcea12ec2aa1d6b7584268a --- .../images/custom_logo_login/pandora_logo.png | Bin 4542 -> 8929 bytes .../custom_logo_login/pandora_logo_2.png | Bin 0 -> 4542 bytes pandora_console/include/styles/login.css | 4 ++-- 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 pandora_console/images/custom_logo_login/pandora_logo_2.png diff --git a/pandora_console/images/custom_logo_login/pandora_logo.png b/pandora_console/images/custom_logo_login/pandora_logo.png index 67aeb1bf842857f742c1b755858df7e44a353a7c..c84a02fb6a4283f810cf1655c3ac4bc60f1ed31a 100644 GIT binary patch literal 8929 zcmb8UWmuG7^fo$x4j?HYC_{sQq|_kYCDI`F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I1wMb`OM>enCa^F=GH=Dm+*)i~ z;4_y#+akwhP9g#eKI_SVC1MiKZQ}zjjwhN%0@iGV*`TKPmw0Z!*x=$05MalqcHq7+ zScnDaQY}W;zS-h32k(VlmFI??o^>J~YBxA%gX68P;gddaT{1rCSP@vK2Ay8xoHI%t z;@@=r<%ga(;g%75?O^wTCa|t^O0_exBWf6fYbw!{uuZXN*|q)CnDkHik@V zyKPpW2PAMGYUKK&@Gj7+Gff@P;BZ1nG_=j$0J^m)O-XpR1YnS&Ws<~g$D-c z8&1a5cmOq5Ru0}Rn7BllJ)6B9`%)-zfY5tU!UGg*1llqnp_rnF+jsw&{-kV$zwgky z2Two=@L7lh%NtxC*+=UZiErDJqBoeAARp(k{=4`>YH#!2t?Hq)m7ExCjalSIIg{y& z(TZhnCUAm@$9y4WB?-b^?m)!9GDSjKrhgvQz4FdqX9}iJm5dMz<{6Ws3g>1gkWyc| z__Rz^5BtJT8bjQ?(fX2$(0e@!7#s^qiyWl(L@})vjB5V;2fyEc6I@SR8O@EN+#QwD zoA}^NkGdoi^H!?hdJ`{Lb6@_ZMqj0_w`l!X*_!$^d^Dw4YmpfbsG@_*JlS|al?+@B zkWHQLk%d{}6N)PJ-D7qMTjtELAZAPVDqE9O2dTPx#07*qoM6N<$f@U&P@c;k- diff --git a/pandora_console/images/custom_logo_login/pandora_logo_2.png b/pandora_console/images/custom_logo_login/pandora_logo_2.png new file mode 100644 index 0000000000000000000000000000000000000000..67aeb1bf842857f742c1b755858df7e44a353a7c GIT binary patch literal 4542 zcmV;v5kc;WP)q?75JHABkzvpQTxuC9@fJ)yOr8;+LFk46)d&Eo_dx6j#QTw?0)c8bun-#_Aj_a) zFmXmC2doG28KDY6oB(VF0p;ccsRUdWA$t`T0k{k@KsN|yknBzPPR zu=tV;6Aps}NX<$>UpX@2@ZNh|X$xQ4V?uM00(w%wqGoF;KWVK)H%Qxd%+7_j-@V{s|gN|=&N&qU3<#zZYwp}K6B+Ido4iEb$@(JI1X1WAD)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O0_exBWf6fYbw!{uuZXN*|q)CnDkHik@V zyKPpW2PAMGYUKK&@Gj7+Gff@P;BZ1nG_=j$0J^m)O-XpR1YnS&Ws<~g$D-c z8&1a5cmOq5Ru0}Rn7BllJ)6B9`%)-zfY5tU!UGg*1llqnp_rnF+jsw&{-kV$zwgky z2Two=@L7lh%NtxC*+=UZiErDJqBoeAARp(k{=4`>YH#!2t?Hq)m7ExCjalSIIg{y& z(TZhnCUAm@$9y4WB?-b^?m)!9GDSjKrhgvQz4FdqX9}iJm5dMz<{6Ws3g>1gkWyc| z__Rz^5BtJT8bjQ?(fX2$(0e@!7#s^qiyWl(L@})vjB5V;2fyEc6I@SR8O@EN+#QwD zoA}^NkGdoi^H!?hdJ`{Lb6@_ZMqj0_w`l!X*_!$^d^Dw4YmpfbsG@_*JlS|al?+@B zkWHQLk%d{}6N)PJ-D7qMTjtELAZAPVDqE9O2dTPx#07*qoM6N<$f@U&P@c;k- literal 0 HcmV?d00001 diff --git a/pandora_console/include/styles/login.css b/pandora_console/include/styles/login.css index 3836dbdfb8..bffcda19d5 100644 --- a/pandora_console/include/styles/login.css +++ b/pandora_console/include/styles/login.css @@ -173,12 +173,12 @@ div.login_pass input { width: 100%; height: 40px; font-size: 10pt; - padding: 0px !important; + padding: 0px 0px 0px 35px !important; background-repeat: no-repeat; background-size: 27px; background-position: left center; - text-indent: 35px; font-family: "Open Sans", sans-serif; + box-sizing: border-box; } div.login_nick input:focus, From 5227390c87eb25f09fcde3be5c53017c527423b4 Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Tue, 12 Mar 2019 13:06:27 +0100 Subject: [PATCH 37/38] se elimina linea de autosearch = false Former-commit-id: aab03c4e38d41b098a8af818b45036f6524580de --- pandora_console/operation/agentes/status_monitor.php | 1 - 1 file changed, 1 deletion(-) diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index 4a4114b6f8..31e7cb2f2a 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -94,7 +94,6 @@ if ($id_module) { $status = -1; $ag_modulename = modules_get_agentmodule_name($id_module); $ag_freestring = modules_get_agentmodule_agent_alias($id_module); - $autosearch = false; } enterprise_hook('open_meta_frame'); From 99afea22cb2d3a62e32b5b42e3215618006b56fa Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 13 Mar 2019 00:01:24 +0100 Subject: [PATCH 38/38] Auto-updated build strings. Former-commit-id: 9d92b8845f144366f2d7ed521fefbea0ce7e8eac --- 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 | 4 ++-- pandora_console/pandora_console.redhat.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 +- 24 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 4b20131ada..b4a1487f25 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.732-190312 +Version: 7.0NG.732-190313 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 4c38106b0f..0481649acd 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.732-190312" +pandora_version="7.0NG.732-190313" 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 7bf1e25c3a..025c7ff0ef 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.732'; -use constant AGENT_BUILD => '190312'; +use constant AGENT_BUILD => '190313'; # 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 5bb4145674..e066d9b3b6 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.732 -%define release 190312 +%define release 190313 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 f98ff3cd9d..b9017687a1 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.732 -%define release 190312 +%define release 190313 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 fb27a8e252..4f0011c733 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.732" -PI_BUILD="190312" +PI_BUILD="190313" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 20957929d2..09defbca4a 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190312} +{190313} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 5ea340e78e..f566961adb 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.732(Build 190312)") +#define PANDORA_VERSION ("7.0NG.732(Build 190313)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 9f62b65035..472d9723ce 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.732(Build 190312))" + VALUE "ProductVersion", "(7.0NG.732(Build 190313))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 0f08432214..b28bde0506 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.732-190312 +Version: 7.0NG.732-190313 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 a15849cec1..a000b443a0 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.732-190312" +pandora_version="7.0NG.732-190313" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 6cadc13ccd..a3a2f4662e 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 = 'PC190312'; +$build_version = 'PC190313'; $pandora_version = 'v7.0NG.732'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index e4b6fb5827..c83ac86528 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -128,8 +128,8 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 5c6662ad47..b72c6fba9c 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.732 -%define release 190312 +%define release 190313 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 239b8b4a98..ef34f29d11 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.732 -%define release 190312 +%define release 190313 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 8bfb991f42..85d5e4023c 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.732" -PI_BUILD="190312" +PI_BUILD="190313" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 8602f0d24d..3db44fae7b 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.732 PS190312"; +my $version = "7.0NG.732 PS190313"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 1b00ef349a..61817bc6e9 100644 --- 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.732 PS190312"; +my $version = "7.0NG.732 PS190313"; # save program name for logging my $progname = basename($0);