mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-19 20:04:52 +02:00
Fixed combo in editor
This commit is contained in:
parent
60757b0ad6
commit
bc557573ec
@ -1447,7 +1447,7 @@ function networkmap_open_graph ($layout, $nooverlap, $pure, $zoom,
|
|||||||
$head .= "size=\"$size\";";
|
$head .= "size=\"$size\";";
|
||||||
|
|
||||||
$head .= "\n";
|
$head .= "\n";
|
||||||
|
|
||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,6 +69,7 @@ function networkmap_process_networkmap($id = 0) {
|
|||||||
$layout = "spring2";
|
$layout = "spring2";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$simple = 0;
|
$simple = 0;
|
||||||
$font_size = 12;
|
$font_size = 12;
|
||||||
$nooverlap = false;
|
$nooverlap = false;
|
||||||
@ -85,7 +86,7 @@ function networkmap_process_networkmap($id = 0) {
|
|||||||
case 1:
|
case 1:
|
||||||
$recon_task = db_get_row_filter('trecon_task',
|
$recon_task = db_get_row_filter('trecon_task',
|
||||||
array('id_rt' => $networkmap['source_data']));
|
array('id_rt' => $networkmap['source_data']));
|
||||||
|
|
||||||
$ip_mask = $recon_task['subnet'];
|
$ip_mask = $recon_task['subnet'];
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
@ -140,7 +141,7 @@ function networkmap_process_networkmap($id = 0) {
|
|||||||
$filename_dot .= "_nooverlap";
|
$filename_dot .= "_nooverlap";
|
||||||
}
|
}
|
||||||
$filename_dot .= "_" . $id . ".dot";
|
$filename_dot .= "_" . $id . ".dot";
|
||||||
|
|
||||||
file_put_contents($filename_dot, $graph);
|
file_put_contents($filename_dot, $graph);
|
||||||
|
|
||||||
switch (PHP_OS) {
|
switch (PHP_OS) {
|
||||||
@ -154,11 +155,12 @@ function networkmap_process_networkmap($id = 0) {
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$filename_plain = sys_get_temp_dir() . "/plain.txt";
|
$filename_plain = sys_get_temp_dir() . "/plain.txt";
|
||||||
|
|
||||||
$cmd = "$filter -Tplain -o " . $filename_plain . " " .
|
$cmd = "$filter -Tplain -o " . $filename_plain . " " .
|
||||||
$filename_dot;
|
$filename_dot;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
system ($cmd);
|
system ($cmd);
|
||||||
|
|
||||||
unlink($filename_dot);
|
unlink($filename_dot);
|
||||||
|
@ -207,12 +207,14 @@ else if ($update_networkmap || $copy_networkmap || $delete) {
|
|||||||
|
|
||||||
$recon_task_id = (int) get_parameter(
|
$recon_task_id = (int) get_parameter(
|
||||||
'recon_task_id', 0);
|
'recon_task_id', 0);
|
||||||
|
|
||||||
$source = (string)get_parameter('source', 'group');
|
$source = (string)get_parameter('source', 'group');
|
||||||
|
|
||||||
$values = array();
|
$values = array();
|
||||||
$values['name'] = $name;
|
$values['name'] = $name;
|
||||||
$values['id_group'] = $id_group;
|
$values['id_group'] = $id_group;
|
||||||
|
|
||||||
|
/*
|
||||||
if ($source == 'group') {
|
if ($source == 'group') {
|
||||||
$values['source'] = 0;
|
$values['source'] = 0;
|
||||||
$values['source_data'] = $id_group;
|
$values['source_data'] = $id_group;
|
||||||
@ -225,6 +227,32 @@ else if ($update_networkmap || $copy_networkmap || $delete) {
|
|||||||
$values['source'] = 2;
|
$values['source'] = 2;
|
||||||
$values['source_data'] = $ip_mask;
|
$values['source_data'] = $ip_mask;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
switch ($method) {
|
||||||
|
case 'twopi':
|
||||||
|
$values['generation_method'] = 2;
|
||||||
|
break;
|
||||||
|
case 'dot':
|
||||||
|
$values['generation_method'] = 1;
|
||||||
|
break;
|
||||||
|
case 'circo':
|
||||||
|
$values['generation_method'] = 0;
|
||||||
|
break;
|
||||||
|
case 'neato':
|
||||||
|
$values['generation_method'] = 3;
|
||||||
|
break;
|
||||||
|
case 'fdp':
|
||||||
|
$values['generation_method'] = 4;
|
||||||
|
break;
|
||||||
|
case 'radial_dinamic':
|
||||||
|
$values['generation_method'] = 6;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$values['generation_method'] = 2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
$description = get_parameter('description', '');
|
$description = get_parameter('description', '');
|
||||||
$values['description'] = $description;
|
$values['description'] = $description;
|
||||||
|
|
||||||
|
@ -756,6 +756,7 @@ else {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$nodes_and_relations = networkmap_process_networkmap($id);
|
$nodes_and_relations = networkmap_process_networkmap($id);
|
||||||
|
|
||||||
show_networkmap($id, $user_readonly, $nodes_and_relations, $dash_mode, $map_dash_details);
|
show_networkmap($id, $user_readonly, $nodes_and_relations, $dash_mode, $map_dash_details);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user