netbox icon indicating copy to clipboard operation
netbox copied to clipboard

Add image field to Device Type

Open jcralbino opened this issue 3 years ago • 6 comments

NetBox version

v3.3.4

Feature type

Change to existing functionality

Proposed functionality

Currently in the device type, we are allowing the introduction of two types of images:

  • rear image. Used for the rack rendering
  • front image. Used for the rack rendering

[ ]The Device Type "Front" and "Rear" images have a very limited scope as we want those images to be super high-quality or detailed (as they are used in the Rack Elevation and get shrunk down fairly small anyway, plus you want them to be perfectly straight-on for the Rack Elevation view).

  • I propose that within the device type we also introduce a generic image field, that is then copied to every new device created using this template.

Use case

Image inside the device are used to provide additional relevant information for each device, improving the documentation on site and the utilisation of this information with non technical people

  • a generic image of a device can be helpful to describe various aspects about the equipment to them, and is much better than "no images at all."

Database changes

  • adding a new field in the device-type data model referring to the image. As used in the device itself.

External dependencies

No response

jcralbino avatar Sep 20 '22 08:09 jcralbino

I'm sorry but I don't follow exactly what it is you're proposing, or why. Please rewrite your proposal above to clearly convey the proposed change and cited use case.

jeremystretch avatar Sep 26 '22 12:09 jeremystretch

I think I understand what the OP is asking for here - they're asking for a generic "image" field on a Device Type that would automatically be inherited by (copied into) all Device instances that are spawned from that Device Type. Device already allows Image uploads which is great for documenting devices in situ, but in the real world, we don't always have a photo of the specific device we're talking about.

This sort of thing is incredibly useful when you're dealing with "non-technical remote hands" (i.e. end-users) - a generic image of a device can be helpful to describe various aspects about the equipment to them, and is much better than "no images at all."

The Device Type "Front" and "Rear" images aren't even necessarily the best for this kind of "generic picture," since you don't really want those images to be super high-quality or detailed (as they are used in the Rack Elevation and get shrunk down fairly small anyway, plus you want them to be perfectly straight-on for the Rack Elevation view).

Sure, you can always search the web for a generic image, but a lot of person-hours can be saved in aggregate if someone takes a few minutes to put a quality generic image into the DCIM when creating the Device Type. Needing to duplicate / re-attach that image to every Device instance is a pain, and it would be nice to have some way to provide a generic and have it apply to everything spawned from the Type.

I have no clue how feasible this is, but I definitely think it would be helpful.

ZPrimed avatar Sep 30 '22 05:09 ZPrimed

We could add support for generic image attachments to the DeviceType model, but I don't see any reason for anything more complex than that. At any rate, let's wait for @jcralbino to clarify his intent.

jeremystretch avatar Sep 30 '22 12:09 jeremystretch

I have changed slightly the text in the initial request but the goal is aligned with what was explained by @ZPrimed

jcralbino avatar Oct 01 '22 08:10 jcralbino

I propose that within the device type we also introduce a generic image field, that is then copied to every new device created using this template.

There is no need to copy this field's value to instantiated devices, because each device already has a relationship to the device type: What is true for one instance is true for all.

As I mentioned, we could introduce support for attaching images to device types, which seems like it would satisfy your use case. If it does not, please elaborate on why.

jeremystretch avatar Oct 04 '22 18:10 jeremystretch

As long as the images associated with the device type are also seen under the device view also that would work

jcralbino avatar Oct 07 '22 21:10 jcralbino

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

github-actions[bot] avatar Jan 02 '23 04:01 github-actions[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

github-actions[bot] avatar Apr 06 '23 04:04 github-actions[bot]