netbox-topology-views icon indicating copy to clipboard operation
netbox-topology-views copied to clipboard

Topology view not showing

Open NULLProtogen opened this issue 2 years ago • 15 comments

Possible user error but I can't get the topology views plugin to show any views.

I'm not sure what logs or configs I can provide so please let me know what you would like.

PLUGINS = ["netbox_topology_views"] PLUGINS_CONFIG = { 'netbox_topology_views': { 'enable_circuit_terminations': False, 'draw_default_layout': True, 'ignore_cable_type': 'circuit termination' } }

Python 3.8.10 Netbox 3.2.5

Installed Plugins NAME PACKAGE NAME AUTHOR DESCRIPTION VERSION Topology views netbox_topology_views Mattijs Vanhaverbeke An plugin to render topology maps 2.0.1

NULLProtogen avatar Jul 09 '22 00:07 NULLProtogen

Same issue here. Setting Hide Unconnected filter makes the nodes appear.

jaydabi avatar Jul 21 '22 14:07 jaydabi

Hi,

Sorry for the late reply. Can you check if you have this issue still on netbox 3.27? I was unable to replicatie this, but it is not so easy to get the logs from netbox.

mattieserver avatar Jul 28 '22 07:07 mattieserver

I'm on 3.27 and haven't gotten anything to display yet.

hardaker avatar Jul 31 '22 19:07 hardaker

So it turns out that the problem is that the static js/css/etc files are not getting installed in my docker version of netbox. Mounting the source code's static code into /opt/netbox/netbox/static/netbox_topology_views in the docker container let it work.

hardaker avatar Jul 31 '22 20:07 hardaker

Hi @hardaker,

Do you have the python3 manage.py collectstatic --no-input command in your docker build process? If you run this after you install the plugin it should copy the css & js files to the correct location.

mattieserver avatar Aug 01 '22 11:08 mattieserver

Sorry for the delay. I do. But your point is valid: why isn't it collecting it? I'll try to look into it as well.

hardaker avatar Aug 04 '22 02:08 hardaker

@hardaker were you able to find a solution? I'm having (was having) the same problem. I also see that there's no network-topology-views in the static folder. I added the following to my Dockerfile

COPY ./netbox_topology_views/static/netbox_topology_views /opt/netbox/netbox/static/netbox_topology_views

And now I have icons

dwilliss avatar Aug 10 '22 04:08 dwilliss

I admittedly have been swamped with a much more pressing deadline and haven't gotten back to debugging. But yes, copying in solved it for me too and hence motivation is low :-/

hardaker avatar Aug 10 '22 14:08 hardaker

This is not working for me on netbox-3.3.1.

I'm not seeing anything in the logs...

andrewm659 avatar Sep 12 '22 18:09 andrewm659

Did you clear your browser cache after the update?

mattieserver avatar Sep 12 '22 18:09 mattieserver

Stupid me. I did not but just tried it using Vivaldi. No dice after clearing cache. Will try another browser and computer.

andrewm659 avatar Sep 12 '22 18:09 andrewm659

Just tried on a different computer. Nothing comes up. Even when I check Hide Unconnected

andrewm659 avatar Sep 12 '22 18:09 andrewm659

Is this also with a docker setup?

mattieserver avatar Sep 12 '22 18:09 mattieserver

No. Not using docker.

andrewm659 avatar Sep 12 '22 18:09 andrewm659

This is currently not working in a docker environment as already pointed out from @hardaker and @dwilliss .

RUN /opt/netbox/venv/bin/pip install --no-warn-script-location -r /tmp/externals_plugins.txt && \
    # Copy static or plugin will not work
    cp -r /opt/netbox/venv/lib/python3.10/site-packages/netbox_topology_views/static/netbox_topology_views /opt/netbox/netbox/static && \
    /opt/netbox/netbox/manage.py collectstatic --no-input

Result in

🧬 loaded config '/etc/netbox/config/configuration.py' 🧬 loaded config '/etc/netbox/config/extra.py' 🧬 loaded config '/etc/netbox/config/logging.py' 🧬 loaded config '/etc/netbox/config/plugins.py'

0 static files copied to '/opt/netbox/netbox/static', 514 unmodified.

rizlas avatar Sep 26 '22 16:09 rizlas