diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 014e74eb6b..4c8dc204d6 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2013-07-02 Miguel de Dios + + * include/functions_networkmap.php, + operation/agentes/networkmap.topology.php, + operation/agentes/networkmap.groups.php, + operation/agentes/networkmap.php: improved the source code style. + 2013-07-02 Sergio Martin * include/javascript/pandora_modules.js: Fixed deprecated way diff --git a/pandora_console/include/functions_netflow.php b/pandora_console/include/functions_netflow.php index 4ac45e60f6..237b71cca1 100644 --- a/pandora_console/include/functions_netflow.php +++ b/pandora_console/include/functions_netflow.php @@ -1165,7 +1165,7 @@ function netflow_xml_report ($id, $start_date, $end_date, $interval_length = 0) echo " \n"; } - echo "\n"; + echo "\n"; } /** @@ -1301,7 +1301,7 @@ function netflow_summary_xml ($data) { /** * Return a string describing the given unit. - * + * * @param string Netflow unit. */ function netflow_format_unit ($unit) { @@ -1325,7 +1325,7 @@ function netflow_format_unit ($unit) { /** * Return a string describing the given aggregate. - * + * * @param string Netflow aggregate. */ function netflow_format_aggregate ($aggregate) { diff --git a/pandora_console/operation/agentes/networkmap.groups.php b/pandora_console/operation/agentes/networkmap.groups.php index f960b549bc..1ad7e06922 100644 --- a/pandora_console/operation/agentes/networkmap.groups.php +++ b/pandora_console/operation/agentes/networkmap.groups.php @@ -31,6 +31,7 @@ require_once ('include/functions_networkmap.php'); // Set filter $filter = networkmap_get_filter ($layout); + // Generate dot file $graph = networkmap_generate_dot_groups (__('Pandora FMS'), $group, $simple, $font_size, $layout, $nooverlap, $zoom, $ranksep, $center, diff --git a/pandora_console/operation/agentes/networkmap.php b/pandora_console/operation/agentes/networkmap.php index 80f7d0c83f..b2a5b32711 100644 --- a/pandora_console/operation/agentes/networkmap.php +++ b/pandora_console/operation/agentes/networkmap.php @@ -45,6 +45,7 @@ if ($delete_networkmap) { __('Network map deleted successfully'), __('Could not delete network map'), '', true); + $id_networkmap = 0; } @@ -207,6 +208,7 @@ $buttons['topology'] = array('active' => $activeTab == 'topology', 'text' => '' . html_print_image("images/op_network.png", true, array ("title" => __('Topology view'))) .''); + $combolist = '
'; $combolist .= html_print_select($networkmaps, 'id_networkmap', $id_networkmap, 'onchange:this.form.submit()', __('No selected'), 0, true, false, false, '', false, 'margin-top:4px; margin-left:3px; width:150px;'); @@ -324,6 +326,7 @@ if ($activeTab == 'policies') { $table->data[0][] = __('Depth') . ' ' . html_print_select ($depth_levels, 'depth', $depth, '', '', '', true, false, false); } + $table->data[1][] = __('No Overlap') . ' ' . html_print_checkbox ('nooverlap', '1', $nooverlap, true); @@ -344,6 +347,7 @@ $table->data[1][] = __('Simple') . ' ' . $table->data[1][] = __('Regenerate') . ' ' . html_print_checkbox ('regen', '1', $regen, true); + if ($pure == "1") { // Zoom $zoom_array = array ( @@ -357,6 +361,7 @@ if ($pure == "1") { $table->data[1][] = __('Zoom') . ' ' . html_print_select ($zoom_array, 'zoom', $zoom, '', '', '', true, false, false, false); + } if ($nooverlap == 1) { diff --git a/pandora_console/operation/agentes/networkmap.topology.php b/pandora_console/operation/agentes/networkmap.topology.php index 97d1be14b4..0e3f8c1653 100644 --- a/pandora_console/operation/agentes/networkmap.topology.php +++ b/pandora_console/operation/agentes/networkmap.topology.php @@ -65,12 +65,13 @@ if ($nooverlap) { $filename_img .= "_nooverlap"; $filename_dot .= "_nooverlap"; } -$filename_map .= "_".$id_networkmap.".map"; -$filename_img .= "_".$id_networkmap.".png"; -$filename_dot .= "_".$id_networkmap.".dot"; +$filename_map .= "_" . $id_networkmap . ".map"; +$filename_img .= "_" . $id_networkmap . ".png"; +$filename_dot .= "_" . $id_networkmap . ".dot"; if ($regen != 1 && file_exists ($filename_img) && filemtime ($filename_img) > get_system_time () - SECONDS_5MINUTES) { + $result = true; } else {