User Tools

Site Tools


menu:admin:custom_attributes:custom_attributes

Custom attributes

Custom attributes facilitate in defining format boundaries which can be used within one or more node types. For example you can define the Snmp_sysname variable's size/format and which user role is required to edit this variable.

Add custom attribute group

Click the plus sign to add a custom attribute group, the following field will appear

Enter the desired name for the new custom attribute group and click the Add button to create it.

Delete custom attribute group

To delete a custom attribute group select the group in question and click the trashcan icon a prompt will show up asking if you are sure, click the Yes button to delete the parameter group.

Duplicate custom attribute group

Select the custom attribute group you want to duplicate and click the 'Duplicate' button , the following field will appear:

Enter the desired name for the new custom attribute group and click the Duplicate button to create it.

Parameter group variables

Add variable

To add a custom attribute, click the new-button, the following window will appear

enter the desired variable name here and click the Save button to create it.

A variable of the type CHAR with a edit level of Operator will be created by default

Remove attribute

To remove a custom attribute, select the attribute in question and click the trashcan icon a prompt will show up asking if you are sure, click the Yes button to delete the custom attribute

Edit attribute

Select the custom attribute you want to edit and make the desired changes.

After making changes to your custom attribute commit them by clicking the Apply button.

Most custom attribute types are quite self-explanatory: CHAR is a string of text, NUM is a number, IPv4 is an IPv4 address, etc. However the MENU type needs a bit of explanation. This is for if you want to have a dropdown of various options.

A menu doesn't have a size, but a format, which can have four possible options: Str_value, Num_value, Str_value&Num_value and Num_value&Str_value. When you select a menu custom attribute a grid with profiles appears. This grid corresponds to the Par_group_profiles table in the netYCE database. A profile consists out of a number, a string and a default. Only one profile in a par group menu can be set, and this will be the standard value whenever it's created. When you try to set a second value as default, the older default value will lose its default status.

What you see in the actual frontend is based on the format:

  • Str_value shows a dropdown list of the string values of the profiles
  • Num_value shows a dropdown list of the numerical values of the profiles
  • Num_value&Str_value shows a dropdown list of the string values of the profiles, but saves the numerical values upon form submission.
  • Str_Value&Num_value shows a dropdown list of the numerical values of the profiles, but saves the string values upon form submission.

Note that if the format is set to Str_value or Str_value&Num_value, it is not possible to have profiles within the same menu that have the same string value. Likewise, if the format is set to Num_value or Num_value&Str_value you can not have duplicate numerical values.

menu/admin/custom_attributes/custom_attributes.txt · Last modified: 2021/10/22 08:50 by pgels