make signal handlers customizable #15593
jpengenheiro
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
hello,
First of all I'd like to thank and congratulate everyone who contributes to netbox,
I think the nature of this request is aptly described as "user managed automatic actions".
Recently I was asked to investigate the possibility of customizing the way the UI displays the cable objects, at the moment cables are displayed as a #cable-id hyperlink to the cable.
I've looked into the
Cable
class and it seems the only attribute I would need to change isdisplay
to something that provides a little more information on the cable itself.An example would be a broad categorization of the Cable type (whether it is Copper or FO or power etc), something that could show the user something like this:
I've investigated how I could accomplish this, and I found 3 ways:
Scheduled custom scripts could be a way to do this (I use these to pull data into netbox), but would not have immediate action on a new or updated
Cable
.A webhook would provide real time actions, but requires an external micro-service that would be idle 99% of the time, is a lot of trouble to develop, configure and maintain for such a small thing (I've also tried this for other things).
Which brought to me to signal handlers.
I read through the django docs and these appear to be simple enough to develop, solve the issue of "immediate action", run alongside netbox, but require explicit import and don't seem to be "user extensible" (like custom scripts or reports are) at the moment.
Furthermore I found netbox already uses these signal handlers to do quite a bit of work behind the scenes.
I think providing a way for admins to install some of these "at their own risk" in way "that makes sense to the organization" could be a way to increase netbox's already great flexibility.
Some use cases could be:
I'm not a python or django specialist by any means, but I think the project could be easily modifiable to import user code from specific modules or folders (again like custom scripts and reports) to accommodate for this.
Does anyone see a problem with this proposal?
Beta Was this translation helpful? Give feedback.
All reactions