working save/restore node positions with groups
This commit is contained in:
@@ -70,12 +70,11 @@ $.getJSON('[% uri_for('/ajax/data/device/netmap') %]?[% my_query %]', function(m
|
||||
if (mapdata['v3']['newnodes']) {
|
||||
$.post(
|
||||
'[% uri_for('/ajax/data/device/netmappositions') %]'
|
||||
,'vlan=[% params.vlan %]&positions=' + JSON.stringify(graph.positions())
|
||||
,$("#nd_vlan-entry, #nd_devgrp-select, input[name='mapshow']").serialize()
|
||||
+ '&positions=' + JSON.stringify(graph.positions())
|
||||
);
|
||||
}
|
||||
// else {
|
||||
// graph.zoomToFit();
|
||||
// }
|
||||
// else { graph.zoomToFit() }
|
||||
|
||||
graph.inspect().main.nodes.on('mouseup.dragall', function(n) {
|
||||
graph['nd2']['dragging'] = false;
|
||||
|
||||
@@ -123,7 +123,8 @@
|
||||
// if user enters vlan but does not submit this will save wrong data
|
||||
$.post(
|
||||
'[% uri_for('/ajax/data/device/netmappositions') %]'
|
||||
,'vlan=' + $('#nd_vlan-entry').val() + '&positions=' + JSON.stringify(graph.positions())
|
||||
,$("#nd_vlan-entry, #nd_devgrp-select, input[name='mapshow']").serialize()
|
||||
+ '&positions=' + JSON.stringify(graph.positions())
|
||||
);
|
||||
});
|
||||
$('#nd_netmap-zoomtodevice').on('click', function(event) {
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
[% IF devgrp_list.size %]
|
||||
<div class="clearfix">
|
||||
<select class="nd_side-select" size="[% devgrp_list.size > 5 ? 5 : devgrp_list.size %]"
|
||||
multiple="on" name="devgrp"
|
||||
multiple="on" name="devgrp" id="nd_devgrp-select"
|
||||
rel="tooltip" data-placement="left" data-offset="5" data-title="Host Groups"/>
|
||||
[% FOREACH opt IN devgrp_list.pairs %]
|
||||
<option[% ' selected="selected"' IF devgrp_lkp.exists(opt.key) %]
|
||||
|
||||
Reference in New Issue
Block a user