netbox
netbox copied to clipboard
Rack elevations stuck in light mode when HTMX navigation is enabled
Deployment Type
Self-hosted
NetBox Version
v4.0-beta2
Python Version
3.11
Steps to Reproduce
- Switch to dark mode
- Visit
/dcim/rack-elevations/
or any rack directly
Expected Behavior
I expect the racks to be display with a dark background.
Correctly displayed elevations happening some times in my self-hosted NetBox:
Observed Behavior
The racks and the numbers to their left are displayed with a light background. Sometimes they are displayed correctly in my self-hosted install, but I could not reproduce when this is happening.
Elevations in light mode while NetBox is in dark mode (NetBox demo page):
Thank you for opening a bug report. I was unable to reproduce the reported behavior on NetBox v4.0-beta2. Please see if you can identify steps to reproduce the behavior consistently.
I can confirm this issue, also happening the other way around in light mode,
- Enable HTMX Navigation
- Go to racks -> open rack
- Toggle color theme
- Go back to racks -> open rack again
- See this
- Bonus: color theme toggle does not work anymore + bottom right corner date, servername and netbox version dissapear
- STRG+F5 everything works as expected
I would like to at that I can also reproduce this issue without HTMX at https://beta-demo.netbox.dev/dcim/rack-elevations/ even without being logged in. Just visit the rack elevations and switch to dark mode and the racks will be displayed with a light background. This also affects my local self-hosted install, but there it changes to dark mode after page load in finished.
Note: Any fix for this should also check cable trace SVG.
@v0tti I think this is fixed in the latest releases, can you please re-try in NetBox 4.0.3?
This is still a problem in 4.0.5. Refreshing the page fixes it.
@v0tti I think this is fixed in the latest releases, can you please re-try in NetBox 4.0.3?
It seems to still display the elevations in light mode during page load, but as soon as the page is fully loaded they are displayed correctly:
After manually switching to light mode they seem to be stuck in the wrong mode:
By reloading the page they are properly displayed in light mode (notice the different hue of white behind the unit numbers):