Profile selection to automate form filling #5955

Closed
opened 2025-12-29 19:34:52 +01:00 by adam · 2 comments
Owner

Originally created by @Flocon29 on GitHub (Jan 17, 2022).

NetBox version

v3.1.5

Feature type

New functionality

Proposed functionality

We are currently working on a profile feature for several models.
This profile field can dynamically modify several other fields of a form, like on the editing form of an interface below.

149481701-4b13f680-c302-4ab7-b53a-1a815b47711f

The detailed operation of what we have set up with custom fields and context data on this discussion: https://github.com/netbox-community/netbox/discussions/7506

Because we think this feature would be interesting for the community, we would like to see it integrated natively into the NetBox application through a new model dedicated to the selection of profiles.

The profile model should:

  • Define as many profiles as needed
  • For each profile, define for which model(s) it can be selected
    image
  • When a profile is selected for a model, modify all the fields concerned by the profile (standard fields and custom fields)
    And also every type of field (textField, checkboxField, selectionField, multipleSelectionField ...)
  • When a profile is edited, all the models associated to this profile will have to be updated too
  • A profile can be selected from any form of a model.
    Editing a single item, editing multiple at once (bulk_edit), when creating a new item (create_edit) and any other ...
  • It could be interesting to disable the modification of some fields when a profile is selected.
    For example, selecting a profile named Cisco C2960x would change the manufacturer field to Cisco and disable editing that field as long as the profile is selected

I see two possibilities for profile edition:

  • Simply write to Json format (like config-context) the key/value relations between form fields and the default value.
    The database will simply store this Json data.
  • Or, more complex, a profile assigned to the device model behaves like a device. So the database must store the default values assigned to it for each field.
    When editing the profile, the user see an exact copy of the device form
  • You may have better ideas and do not hesitate to apply them.

Use case

This feature will allow NetBox users to generate configuration profiles.

These profiles will concretely provide:

  • Saving time on equipment configuration
  • Reducing risk of error on equipment configuration

Database changes

A new model implies a new table in the database (for example : extras_profile ?)
Add a new profile column in each models (devices, interfaces, ...) in order to be able to save the profile assigned.

External dependencies

No response

Originally created by @Flocon29 on GitHub (Jan 17, 2022). ### NetBox version v3.1.5 ### Feature type New functionality ### Proposed functionality We are currently working on a profile feature for several models. This profile field can dynamically modify several other fields of a form, like on the editing form of an interface below. ![149481701-4b13f680-c302-4ab7-b53a-1a815b47711f](https://user-images.githubusercontent.com/18680214/149550411-7eddcb0b-3b6b-4fe1-aebe-862f61c11a21.gif) The detailed operation of what we have set up with custom fields and context data on this discussion: https://github.com/netbox-community/netbox/discussions/7506 Because we think this feature would be interesting for the community, we would like to see it integrated natively into the NetBox application through a new model dedicated to the selection of profiles. The profile model should: * Define as many profiles as needed * For each profile, define for which model(s) it can be selected ![image](https://user-images.githubusercontent.com/18680214/149746696-ff3b028b-524f-4da9-b33b-42d22c472dfd.png) * When a profile is selected for a model, modify all the fields concerned by the profile (standard fields and custom fields) And also every type of field (textField, checkboxField, selectionField, multipleSelectionField ...) * When a profile is edited, all the models associated to this profile will have to be updated too * A profile can be selected from any form of a model. Editing a single item, editing multiple at once (bulk_edit), when creating a new item (create_edit) and any other ... * It could be interesting to disable the modification of some fields when a profile is selected. For example, selecting a profile named `Cisco C2960x` would change the manufacturer field to `Cisco` and disable editing that field as long as the profile is selected I see two possibilities for profile edition: * Simply write to Json format (like config-context) the key/value relations between form fields and the default value. The database will simply store this Json data. * Or, more complex, a profile assigned to the `device` model behaves like a `device`. So the database must store the default values assigned to it for each field. When editing the profile, the user see an exact copy of the device form * You may have better ideas and do not hesitate to apply them. ### Use case This feature will allow NetBox users to generate configuration profiles. These profiles will concretely provide: * Saving time on equipment configuration * Reducing risk of error on equipment configuration ### Database changes A new model implies a new table in the database (for example : extras_profile ?) Add a new profile column in each models (devices, interfaces, ...) in order to be able to save the profile assigned. ### External dependencies _No response_
adam added the type: featurepending closure labels 2025-12-29 19:34:52 +01:00
adam closed this issue 2025-12-29 19:34:53 +01:00
Author
Owner

@github-actions[bot] commented on GitHub (Mar 19, 2022):

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. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Mar 19, 2022): 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. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@github-actions[bot] commented on GitHub (Apr 18, 2022):

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.

@github-actions[bot] commented on GitHub (Apr 18, 2022): This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5955