2014-06-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/setup/setup_visuals.php, include/functions_networkmap.php, include/functions_config.php: added the visual config value for to set the width of networkmap, and fixed the overlap of networkmap L2. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10277 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
eda02e75d6
commit
f8a4628d3a
|
@ -1,3 +1,10 @@
|
|||
2014-06-24 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* godmode/setup/setup_visuals.php, include/functions_networkmap.php,
|
||||
include/functions_config.php: added the visual config value for
|
||||
to set the width of networkmap, and fixed the overlap of networkmap
|
||||
L2.
|
||||
|
||||
2014-06-24 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* operation/snmpconsole/snmp_mib_uploader.php: Added additional information.
|
||||
|
|
|
@ -185,21 +185,22 @@ $row++;
|
|||
|
||||
$table->data[$row][0] = __('Font size');
|
||||
|
||||
$font_size_array = array( 1 => 1,
|
||||
2 => 2,
|
||||
3 => 3,
|
||||
4 => 4,
|
||||
5 => 5,
|
||||
6 => 6,
|
||||
7 => 7,
|
||||
8 => 8,
|
||||
9 => 9,
|
||||
10 => 10,
|
||||
11 => 11,
|
||||
12 => 12,
|
||||
13 => 13,
|
||||
14 => 14,
|
||||
15 => 15);
|
||||
$font_size_array = array(
|
||||
1 => 1,
|
||||
2 => 2,
|
||||
3 => 3,
|
||||
4 => 4,
|
||||
5 => 5,
|
||||
6 => 6,
|
||||
7 => 7,
|
||||
8 => 8,
|
||||
9 => 9,
|
||||
10 => 10,
|
||||
11 => 11,
|
||||
12 => 12,
|
||||
13 => 13,
|
||||
14 => 14,
|
||||
15 => 15);
|
||||
|
||||
$table->data[$row][1] = html_print_select($font_size_array, 'font_size', $config["font_size"], '', '', 0, true);
|
||||
|
||||
|
@ -393,6 +394,11 @@ $table->data[$row][1] = html_print_input_text ('graphviz_bin_dir', $config["grap
|
|||
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Networkmap max width');
|
||||
$table->data[$row][1] = html_print_input_text ('networkmap_max_width', $config["networkmap_max_width"], '', 10, 20, true);
|
||||
|
||||
$row++;
|
||||
|
||||
echo '<form id="form_setup" method="post">';
|
||||
html_print_input_hidden ('update_config', 1);
|
||||
html_print_table ($table);
|
||||
|
|
|
@ -437,6 +437,8 @@ function config_update_config () {
|
|||
$error_update[] = __('Paginate module');
|
||||
if (!config_update_value ('graphviz_bin_dir', get_parameter('graphviz_bin_dir')))
|
||||
$error_update[] = __('Custom graphviz directory');
|
||||
if (!config_update_value ('networkmap_max_width', get_parameter('networkmap_max_width')))
|
||||
$error_update[] = __('Networkmap max width');
|
||||
|
||||
$interval_values = get_parameter ('interval_values');
|
||||
|
||||
|
@ -1170,6 +1172,10 @@ function config_process_config () {
|
|||
config_update_value ('autohidden_menu', 0);
|
||||
}
|
||||
|
||||
if (!isset($config['networkmap_max_width'])) {
|
||||
config_update_value ('networkmap_max_width', 800);
|
||||
}
|
||||
|
||||
/* Finally, check if any value was overwritten in a form */
|
||||
config_update_config();
|
||||
}
|
||||
|
|
|
@ -237,6 +237,10 @@ function networkmap_generate_dot ($pandora_name, $group = 0,
|
|||
|
||||
global $config;
|
||||
|
||||
if ($l2_network) {
|
||||
$nooverlap = 1;
|
||||
}
|
||||
|
||||
$parents = array();
|
||||
$orphans = array();
|
||||
|
||||
|
@ -1263,10 +1267,19 @@ function networkmap_close_group () {
|
|||
|
||||
// Opens a graph definition
|
||||
function networkmap_open_graph ($layout, $nooverlap, $pure, $zoom, $ranksep, $font_size) {
|
||||
global $config;
|
||||
|
||||
$overlap = 'compress';
|
||||
$size_x = 8;
|
||||
$size_y = 5.4;
|
||||
$size = '';
|
||||
|
||||
if (isset($config['networkmap_max_width'])) {
|
||||
$size_x = $config['networkmap_max_width'] / 100;
|
||||
$size_y = $size_x * 0.8;
|
||||
}
|
||||
else {
|
||||
$size_x = 8;
|
||||
$size_y = 5.4;
|
||||
$size = '';
|
||||
}
|
||||
|
||||
|
||||
if ($layout == 'radial') {
|
||||
|
|
Loading…
Reference in New Issue