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

Device labels hidden when images are enabled in Rack view #2966

Closed
lschweiss opened this issue Dec 8, 2022 · 3 comments · Fixed by #3005
Closed

Device labels hidden when images are enabled in Rack view #2966

lschweiss opened this issue Dec 8, 2022 · 3 comments · Fixed by #3005
Labels
type: feature Introduction of substantial new functionality to the application

Comments

@lschweiss
Copy link
Contributor

Environment

  • Nautobot version (Docker tag too if applicable): 1.5.4
  • Python version: 3.9
  • Database platform, version: Postgres 14
  • Middleware(s): N/A

Steps to Reproduce

  1. Add a device to a Rack
  2. Add a device name and image for the device

Expected Behavior

Expect the device name to show over the image

Observed Behavior

The device name is seen for a split second as the page loads. Then the image is rendered over the device name.

With images enabled:
image
With images disabled:
image

@lschweiss
Copy link
Contributor Author

Looking at the code, the primary cause is the order of images being added in nautobot/dcim/elevations.py.

Putting the if self.include_images code before the link.add() statements get the labels on top. However, they also need a shadow rendered, or the text is not always legible.

This change: lschweiss@5498c6c

Renders this way:
image

@bryanculver
Copy link
Member

I think an issue here is the legibility of your example which I believe is why this approach was chosen. However, maybe a text background can be applied to help with that.

@bryanculver bryanculver added the type: feature Introduction of substantial new functionality to the application label Dec 8, 2022
@lschweiss
Copy link
Contributor Author

I loaded the same data in Netbox. It renders nicely creating shadows:
image

The code seems to have diverged quite a bit in elevations.py. I'm not more than a python script kiddie, so I don't see an obvious way to duplicate this.

@bryanculver bryanculver linked a pull request Dec 15, 2022 that will close this issue
5 tasks
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature Introduction of substantial new functionality to the application
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants