netbox icon indicating copy to clipboard operation
netbox copied to clipboard

Pop-up Notes Field

Open craigmoscardini opened this issue 1 year ago • 1 comments

NetBox version

4.0.9

Feature type

New functionality

Triage priority

N/A

Proposed functionality

To ensure important information is being read many systems implement the concept of pop-up note fields. When opening an item (for example a site) the user is presented with a pop-up box (better rendered as an object on page than an actual window) that the user must click OK or similar to close the message.

Use case

To relay important information that would not necessarily be read in the comments or other fields unless the user was looking for that information. I think this adds most value to sites but can also extend to other data models such as contacts or devices.

For example on a site a user could add note relating to access constraints "Authorised engineers only" or "ID required". Or for contacts "Do not call after 6pm".

Database changes

Additional long text field required on any object types where this is implemented.

External dependencies

Probably none

craigmoscardini avatar Oct 23 '24 12:10 craigmoscardini

An alerts() method was added for plug-ins in v4.1 (https://netbox.readthedocs.io/en/stable/plugins/development/views/#extra-template-content) that I think gets close to what you are looking for. In our instance, we are looking to use that to fulfill the same use case that you have described. Using a plug-in would allow you to implement whatever business logic you need to in order to display the alert. The simplest would be to add a custom field to whatever object types you need to enter the alert text, then a trivial plug-in that just has a PluginTemplateExtension class that implements the alert method to look for a value in the custom field that you defined for the passed object.

sleepinggenius2 avatar Oct 23 '24 19:10 sleepinggenius2

Thanks that does get close. It would be nice to implement this functionality natively though, especially since it looks like the foundations of it now exists

craigmoscardini avatar Oct 28 '24 10:10 craigmoscardini

IMO this use case seems to be served well by the nearly-ubiquitous "comments" field. But you could try implementing this as a plugin to see if it catches on.

jeremystretch avatar Feb 06 '25 18:02 jeremystretch