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

Provide URL to image of filtered topology #172

Open
ekrichbaum opened this issue Sep 30, 2022 · 1 comment
Open

Provide URL to image of filtered topology #172

ekrichbaum opened this issue Sep 30, 2022 · 1 comment
Labels
status: under review Further discussion is needed to determine this issue's scope and/or implementation type: feature Request for new feature or change to existing feature

Comments

@ekrichbaum
Copy link

ekrichbaum commented Sep 30, 2022

API return of image. Similar to the api in core for rack face elevations. Potentially using a saved filter or a given set of parameters.

api/dcim/racks/{id}/elevation/?face=front&render=svg&unit_width=220&unit_height=22&legend_width=30&expand_devices=true&include_images=true

This would allow for topology diagram to be included in other views or projects.

@dreng dreng changed the title Feature Request Provide URL to image of filtered topology Dec 9, 2022
@dreng dreng added the type: feature Request for new feature or change to existing feature label Dec 10, 2022
@dreng
Copy link
Collaborator

dreng commented Sep 26, 2023

While I like your idea, I currently don't see a way to implement it.

We use vis.js which doesn't provide image exports nor API calls. Our current implemented PNG export feature uses the trick that a user can click a button to export the current canvas. Both vis.js and the export feature need Javascript. We collect all needed data and pass it to vis.js which then renders the canvas. Since Javascript runs on a client, we are unable to render a canvas on the NetBox server and pass the result as an API response.

The rack SVG export is a total different story. Everything can me calculated and rendered using pure python which runs on the server. That's basically what we do with our XML export feature. Therefore you are able to export to XML by API call, which unfortunately doesn't help here.

Coorect me if I'm wrong but I don't see a chance to implement this feature.

@dreng dreng added the status: under review Further discussion is needed to determine this issue's scope and/or implementation label Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: under review Further discussion is needed to determine this issue's scope and/or implementation type: feature Request for new feature or change to existing feature
Projects
None yet
Development

No branches or pull requests

2 participants