File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
src/netbox_initializers/initializers Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,12 @@ def load_data(self):
4949 if cf_details .get ("weight" , - 1 ) >= 0 :
5050 custom_field .weight = cf_details ["weight" ]
5151
52+ if cf_details .get ("group_name" , False ):
53+ custom_field .group_name = cf_details ["group_name" ]
54+
55+ if cf_details .get ("ui_visibility" , False ):
56+ custom_field .ui_visibility = cf_details ["ui_visibility" ]
57+
5258 # object_type should only be applied when type is object, multiobject
5359 if cf_details .get ("object_type" ):
5460 if cf_details .get ("type" ) not in (
Original file line number Diff line number Diff line change 1313# # - disabled
1414# # - loose
1515# # - exact
16+ # # ui_visibility:
17+ # # - read-write
18+ # # - read-only
19+ # # - hidden
1620# #
1721# # Examples:
1822
2226# description: Enter text in a text field.
2327# required: false
2428# weight: 0
29+ # group_name: group1
30+ # ui_visibility: read-only
2531# on_objects:
2632# - dcim.models.Device
2733# - dcim.models.Rack
4046# validation_minimum: 0
4147# validation_maximum: 255
4248# weight: 10
49+ # group_name: group1
4350# on_objects:
4451# - tenancy.models.Tenant
4552# select_field:
You can’t perform that action at this time.
0 commit comments