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

Support for SVGs #10515

Closed
wolfspyre opened this issue Sep 29, 2022 · 4 comments
Closed

Support for SVGs #10515

wolfspyre opened this issue Sep 29, 2022 · 4 comments
Labels
status: duplicate This issue has already been raised type: feature Introduction of new functionality to the application

Comments

@wolfspyre
Copy link

NetBox version

3.3.4

Feature type

Change to existing functionality

Proposed functionality

IF an SVG were created such that it had layered graphical elements which corresponded with a device's interfaces/connections/modules/etc... then netbox could use that information to represent connections, truer to life.

for image types which don't have layers / don't have native metadata structures which might inform such relationships, a coordinate map could be used to reference where on an image a particular thing/connection resides.

IE: This could allow one to convey that 'interface 0' represents the section of pixels contained within the coordinates (10,0 and 30,20) of the device's image... 'module Y' is represented within the coordinates ( 125,0 and 250,125 ) enabling any number of interactions to be more rich/true-to-life...

Use case

SVGs have a lot of interesting properties... animations, layers, etc. I could see them being one path to have device models more realistically represent the current population and disposition of modules/interfaces/etc.

Database changes

No response

External dependencies

one path to minimal support seems to involve python-pillow svg changes. This issue points out that there's prototypical code Here in this fork to bring SVG support to Pillow.

I don't know about other paths.

@wolfspyre wolfspyre added the type: feature Introduction of new functionality to the application label Sep 29, 2022
@kkthxbye-code
Copy link
Contributor

I'm having a hard time understanding exactly what you want to do. It almost seems like you are suggesting that part of the UI is to be replaced by SVG's generated by netbox.

Could you please specify exactly what you are proposing to implement and how.

@kkthxbye-code kkthxbye-code added the status: revisions needed This issue requires additional information to be actionable label Sep 30, 2022
@wolfspyre
Copy link
Author

First and foremost, I want to be able to use SVGs as device template images...

I thought a secondary potential upside involved an option to be able to, for example
take an svg of a line card....
say it has 8 10g sfp ports...

if each port were in its own layer, named sfp0 sfp1 sfp2 sfp3 sfp4 sfp5 sfp6 sfp7 ... netbox could potentially more accurately portray real-world connections by having the ability to relate sub-elements to corresponding image elements...

This isn't an immediate goal... or even one I'd expect manifest... Rather, it's an option that could be explored once svg support exists.
or a far reaching example of benefits from the effort...

@jeremystretch
Copy link
Member

First and foremost, I want to be able to use SVGs as device template images...

This has already been proposed under #10295 and its feasibility is under review. Going to close out this issue as a duplicate.

This isn't an immediate goal... or even one I'd expect manifest... Rather, it's an option that could be explored once svg support exists.

Something like this, while interesting, is likely not going to be worth the effort required at this point in time. However if you'd like to explore it, you're welcome to open a separate, detailed FR with a proposed implementation.

@jeremystretch jeremystretch closed this as not planned Won't fix, can't repro, duplicate, stale Sep 30, 2022
@jeremystretch jeremystretch added status: duplicate This issue has already been raised and removed status: revisions needed This issue requires additional information to be actionable labels Sep 30, 2022
@wolfspyre
Copy link
Author

wolfspyre commented Sep 30, 2022

Thanks for linking #10295. I'd searched for 'SVG' in open issues which returned 0 issues at the time??? ¯\_(ツ)_/¯

regardless, the basic support is really all I'm after.... Sorry for the extra noise.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: duplicate This issue has already been raised type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

3 participants