nextbox-ui-plugin icon indicating copy to clipboard operation
nextbox-ui-plugin copied to clipboard

Saved topology updating

Open dbmkin opened this issue 2 years ago • 3 comments

Comparing current topology with saved and asking to update. All new interfaces positioning on 0.0 coords.

Also added new field in "layout_context" to prevent fail when resaving topologies and deleting parent topology.

dbmkin avatar Jul 13 '22 06:07 dbmkin

Hi. I tried to merge idebugall:master and dbmkin:adding_new_interfaces_to_saved locally. I built nexbox with nextbox-ui-plugin and launched it via docker compose up. When trying to save the topology in the browser, it gives an error:

Uncaught ReferenceError: initialFilters is not defined
    at saveView (next_app.js:469:39)

I can't understand where it is defined initialFilters? Here is my custom function:

'layout_context': JSON.stringify({
                    'initialLayout': initialLayout,
                    'displayUnconnected': !displayUnconnected,
                    'undisplayedRoles': undisplayedRoles,
                    'undisplayedDeviceTags': undisplayedDeviceTags,
                    'displayPassiveDevices': !displayPassiveDevices,
                    'displayLogicalMultiCableLinks': displayLogicalMultiCableLinks,
                    'requestGET': requestGET,
                    'initialFilters': initialFilters,
                })

iglagolev avatar Jan 15 '23 13:01 iglagolev

Hi. I tried to merge idebugall:master and dbmkin:adding_new_interfaces_to_saved locally. I built nexbox with nextbox-ui-plugin and launched it via docker compose up. When trying to save the topology in the browser, it gives an error:

Uncaught ReferenceError: initialFilters is not defined
    at saveView (next_app.js:469:39)

I can't understand where it is defined initialFilters? Here is my custom function:

'layout_context': JSON.stringify({
                    'initialLayout': initialLayout,
                    'displayUnconnected': !displayUnconnected,
                    'undisplayedRoles': undisplayedRoles,
                    'undisplayedDeviceTags': undisplayedDeviceTags,
                    'displayPassiveDevices': !displayPassiveDevices,
                    'displayLogicalMultiCableLinks': displayLogicalMultiCableLinks,
                    'requestGET': requestGET,
                    'initialFilters': initialFilters,
                })

I forgot to add this variable in template file at pull request. Check the commits, it should work correctly now.

dbmkin avatar Jan 16 '23 03:01 dbmkin

Please note that this Pull request cannot be checked and run after commit: Install the plugin from PyPi because the plugin installation sources have changed.

iglagolev avatar Jan 22 '23 19:01 iglagolev