Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin buttons not responding - take 2 #44

Open
xavbroadcast opened this issue Sep 4, 2024 · 4 comments
Open

Plugin buttons not responding - take 2 #44

xavbroadcast opened this issue Sep 4, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@xavbroadcast
Copy link

xavbroadcast commented Sep 4, 2024

Having read #27, I've been through it and this doesn't seem to fix my issue.
Ubuntu 22.04
Netbox 4.0.10
Python 3.10.12

I have debug set to true.
Plugin is installed.

As a sidenote, there's some confusion in the documentation. Sometimes, it's netbox_floorplan, sometimes it's netbox_floorplan_plugin.

I've opted for the shorter version, but the documentation still suggests:

cd /opt/netbox
sudo ./venv/bin/python3 netbox/manage.py makemigrations netbox_floorplan_plugin
sudo ./venv/bin/python3 netbox/manage.py migrate

Running these commande (but using the netbox_floorplan value instead), I get:

(venv) root@netbox:/opt/netbox/netbox# python3 manage.py makemigrations
Migrations for 'core':
  core/migrations/0011_alter_datafile_hash.py
    - Alter field hash on datafile
(venv) root@netbox:/opt/netbox/netbox# python3 manage.py migrate
Operations to perform:
  Apply all migrations: account, auth, circuits, contenttypes, core, dcim, django_rq, extras, ipam, netbox_floorplan, netbox_topology_views, sessions, social_django, taggit, tenancy, users, viualization, vpn, wireless
Running migrations:
  Applying core.0011_alter_datafile_hash... OK

I then do the

(venv) root@netbox:/opt/netbox/netbox# python3 manage.py makemigrations netbox_floorplan
No changes detected in app 'netbox_floorplan'
(venv) root@netbox:/opt/netbox/netbox# python3 manage.py collectstatic --no-input

0 static files copied to '/opt/netbox-4.0.10/netbox/static', 549 unmodified.

So nothing is changed?

I can see all the files in the static/netbox_floorplan/ (in case it was an issue someone had commented on before) :

(venv) root@netbox:/opt/netbox/netbox/static/netbox_floorplan/floorplan# ls -al
total 44
drwxr-xr-x 2 root root  4096 Sep  4 15:38 .
drwxr-xr-x 4 root root  4096 Sep  4 15:19 ..
-rw-r--r-- 1 root root 20894 Sep  4 15:38 edit.js
-rw-r--r-- 1 root root  5611 Sep  4 15:38 utils.js
-rw-r--r-- 1 root root  1515 Sep  4 15:38 view.js

So as far as I can tell, it looks like it's all there,
But when I go to a location, I have the Floorplan tab, when I go to add a new floorplan, when I click on the Set Dimensions button, nothing happens. Opening up in the developer tab in Chrome, I get this error: (index):2642 Uncaught ReferenceError: set_dimensions is not defined at HTMLAnchorElement.onclick ((index):2642:72)

Any ideas?

@Pyromonkey83
Copy link

I am also having this issue on an offline install. The plugin works fine on an online dev environment. Further issues pop up in the console tab of:

Uncaught ReferenceError: htmx is not defined at edit.js:25:1

It then appears to reach out to https://unpkg.com/[email protected] and fails to load a resource, again, as the host is offline and disconnected from the internet.

Is there a required dependency for htmx not otherwise installed with netbox, or if it is installed with netbox, how/where do I change the reference to point to an internal location?

@xavbroadcast
Copy link
Author

It then appears to reach out to https://unpkg.com/[email protected] and fails to load a resource, again, as the host is offline and disconnected from the internet.

Is there a required dependency for htmx not otherwise installed with netbox, or if it is installed with netbox, how/where do I change the reference to point to an internal location?

You're right, I did notice this too and this install is also offline with no easy way to provide internet access. I can confirm by testing anothe online install I have and see if I have the same problem, but I guess it'll be ok.

If there's a dependency missing, I'm hoping it can be resolved separately so my NetBox can remain airgapped from the internet.

@cruse1977 cruse1977 self-assigned this Oct 8, 2024
@cruse1977 cruse1977 added the enhancement New feature or request label Oct 8, 2024
@cruse1977
Copy link
Member

in 0.5.0 we'll move this to packaged with the plugin

@Idoheled
Copy link

When do you think 0.5.0 will be released?
This is so needed for my organization at the moment!
Thank you very much, much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants