Added the options in networkmap editor
This commit is contained in:
parent
0653c17a9d
commit
3ead7ca3da
|
@ -38,6 +38,9 @@ if ($new_networkmap) {
|
|||
$source = 'group';
|
||||
$ip_mask = '';
|
||||
$dont_show_subgroups = false;
|
||||
$offset_x = "";
|
||||
$offset_y = "";
|
||||
$scale_z = 0.5;
|
||||
}
|
||||
|
||||
$disabled_generation_method_select = false;
|
||||
|
@ -75,6 +78,10 @@ if ($edit_networkmap) {
|
|||
$description = $values['description'];
|
||||
|
||||
$filter = json_decode($values['filter'], true);
|
||||
|
||||
$offset_x = $filter['x_offs'];
|
||||
$offset_y = $filter['y_offs'];
|
||||
$scale_z = $filter['z_dash'];
|
||||
|
||||
$node_radius = $filter['node_radius'];
|
||||
|
||||
|
@ -190,6 +197,17 @@ else {
|
|||
|
||||
$table->data[3][0] = __('Description');
|
||||
$table->data[3][1] = html_print_textarea ('description', 7, 25, $description, '', true);
|
||||
|
||||
$table->data[4][0] = __('Position X');
|
||||
$table->data[4][1] = html_print_input_text ('pos_x', $offset_x, '', 2, 10,true);
|
||||
$table->data[5][0] = __('Position Y');
|
||||
$table->data[5][1] = html_print_input_text ('pos_y', $offset_y, '', 2, 10,true);
|
||||
|
||||
$table->data[6][0] = __('Zoom scale');
|
||||
if ($scale_z == "") {
|
||||
$scale_z = 0.5;
|
||||
}
|
||||
$table->data[6][1] = html_print_input_text ('scale_z', $scale_z, '', 2, 10,true) . ui_print_help_tip (__('Introduce zoom level. 1 = Highest resolution. Figures may include decimals'), true);
|
||||
|
||||
$table->data['source'][0] = __('Source');
|
||||
$table->data['source'][1] =
|
||||
|
@ -222,8 +240,8 @@ else {
|
|||
'radial_dinamic' => 'radial dinamic'
|
||||
);
|
||||
|
||||
$table->data[4][0] = __('Method generation networkmap');
|
||||
$table->data[4][1] = html_print_select($methods, 'method', $method,
|
||||
$table->data[7][0] = __('Method generation networkmap');
|
||||
$table->data[7][1] = html_print_select($methods, 'method', $method,
|
||||
'', '', 'twopi', true, false, true, '',
|
||||
$disabled_generation_method_select);
|
||||
|
||||
|
|
|
@ -84,6 +84,10 @@ if ($new_networkmap || $save_networkmap) {
|
|||
$dont_show_subgroups = (int)get_parameter('dont_show_subgroups', 0);
|
||||
$node_radius = (int)get_parameter('node_radius', 40);
|
||||
$description = get_parameter('description', '');
|
||||
|
||||
$offset_x = get_parameter('pos_x');
|
||||
$offset_y = get_parameter('pos_y');
|
||||
$scale_z = get_parameter('scale_z', 0.5);
|
||||
|
||||
$values = array();
|
||||
$values['name'] = $name;
|
||||
|
@ -141,6 +145,9 @@ if ($new_networkmap || $save_networkmap) {
|
|||
$filter = array();
|
||||
$filter['dont_show_subgroups'] = $dont_show_subgroups;
|
||||
$filter['node_radius'] = $node_radius;
|
||||
$filter['x_offs'] = $offset_x;
|
||||
$filter['y_offs'] = $offset_y;
|
||||
$filter['z_dash'] = $scale_z;
|
||||
$values['filter'] = json_encode($filter);
|
||||
|
||||
$result = false;
|
||||
|
@ -209,26 +216,15 @@ else if ($update_networkmap || $copy_networkmap || $delete) {
|
|||
'recon_task_id', 0);
|
||||
|
||||
$source = (string)get_parameter('source', 'group');
|
||||
|
||||
$offset_x = get_parameter('pos_x');
|
||||
$offset_y = get_parameter('pos_y');
|
||||
$scale_z = get_parameter('scale_z', 0.5);
|
||||
|
||||
$values = array();
|
||||
$values['name'] = $name;
|
||||
$values['id_group'] = $id_group;
|
||||
|
||||
/*
|
||||
if ($source == 'group') {
|
||||
$values['source'] = 0;
|
||||
$values['source_data'] = $id_group;
|
||||
}
|
||||
else if ($source == 'recon_task') {
|
||||
$values['source'] = 1;
|
||||
$values['source_data'] = $recon_task_id;
|
||||
}
|
||||
else if ($source == 'ip_mask') {
|
||||
$values['source'] = 2;
|
||||
$values['source_data'] = $ip_mask;
|
||||
}
|
||||
*/
|
||||
|
||||
switch ($method) {
|
||||
case 'twopi':
|
||||
$values['generation_method'] = 2;
|
||||
|
@ -262,6 +258,9 @@ else if ($update_networkmap || $copy_networkmap || $delete) {
|
|||
$filter = json_decode($row['filter'], true);
|
||||
$filter['dont_show_subgroups'] = $dont_show_subgroups;
|
||||
$filter['node_radius'] = $node_radius;
|
||||
$filter['x_offs'] = $offset_x;
|
||||
$filter['y_offs'] = $offset_y;
|
||||
$filter['z_dash'] = $scale_z;
|
||||
|
||||
$values['filter'] = json_encode($filter);
|
||||
|
||||
|
|
|
@ -681,6 +681,8 @@ $id = (int) get_parameter('id_networkmap', 0);
|
|||
$dash_mode = 0;
|
||||
$map_dash_details = array();
|
||||
|
||||
$networkmap = db_get_row('tmap', 'id', $id);
|
||||
|
||||
if (enterprise_installed()) {
|
||||
include_once("enterprise/dashboard/widgets/network_map.php");
|
||||
if ($id_networkmap) {
|
||||
|
@ -693,10 +695,14 @@ if (enterprise_installed()) {
|
|||
$map_dash_details['y_offs'] = $y_offs;
|
||||
$map_dash_details['z_dash'] = $z_dash;
|
||||
}
|
||||
else {
|
||||
$networkmap_filter = json_decode($networkmap['filter'], true);
|
||||
$map_dash_details['x_offs'] = $networkmap_filter['x_offs'];
|
||||
$map_dash_details['y_offs'] = $networkmap_filter['y_offs'];
|
||||
$map_dash_details['z_dash'] = $networkmap_filter['z_dash'];
|
||||
}
|
||||
}
|
||||
|
||||
$networkmap = db_get_row('tmap', 'id', $id);
|
||||
|
||||
if ($networkmap === false) {
|
||||
ui_print_page_header(__('Networkmap'),
|
||||
"images/bricks.png", false, "network_map_enterprise", false);
|
||||
|
|
Loading…
Reference in New Issue