Replies: 2 comments 4 replies
-
That would be great! |
Beta Was this translation helpful? Give feedback.
0 replies
-
Would you be interested in this feature that we have developed using Custom-fields and Config-Context? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently we are working on adding a profile field in several models.
This profile field will be able to dynamically modify several other fields on a form, like the interface edition page below:
Interface Edition
Here, when a profile is selected, it dynamically updates fields like
VLANs
and also custom fields likeLink Mode
.Custom-fields paired with config-contexts seemed to us to be a good solution to configure and customize our profiles on different models.
I will explain below how we set this up.
Custom-Field Edition
First, our
Profile
field is defined as a classiccustom field
, but we needed to be able to differentiate it from others.That's why we've added a
Profile Mode
checkbox that defines whether ourcustom field
should behave like a profile on the edit page.If the checkbox is marked, the above field named
Config context
replaces theChoices
field.This new field defines the profiles available in the selection
dropdown-menu
.Config-Context Edition
And these profiles are
Config-Contexts
associated to a model (hereDCIM> interface
).Then defined in JSON format, the various default values to be assigned to this profile.
Javascript
Then, when a profile is selected on the interface edition page, a javascript file will fill the form, according to the
context-data
defined for this profile.An
Update Profile
checkbox has also been added to theconfig-context
edit page.If this box is marked during a Congfig-Context edition, a javascript file will update via the NetBox API all the elements for which this profile has already been defined.
Would you be interested in integrating this feature or an equivalent in Netbox?
If this is the case, we are open to share with you our developments in order to integrate and share these features with the community.
Beta Was this translation helpful? Give feedback.
All reactions