Use GUI attributes in a custom StyleBook
You can add GUI attributes in the parameters section of your StyleBook to make the fields intuitive when displayed on NetScaler Console.
Add a label with tooltip for parameters
You can add a descriptive name for the parameter by using the label attribute. Add a tooltip for this parameter by using the description attribute.
Example:
name: ip
label: Virtual Server IP Address
description: IP address of the virtual server that represents the load balanced application.
type: ipaddress
required: true
Set a collapsible pane for the parameter
If you have a parameter of type object, you can define the layout by using the gui attribute.
Example-1:
name: svcg-advanced
label: Advanced Application Server Settings
type: object
required: false
gui:
collapse_pane: true
columns: 2
In this example, the layout is a collapsible object where fields are displayed in two columns.
You can also display a summary view of a parameter of
type: object[] (list of objects) as a table with the inner parameters representing the columns. To include or exclude an inner parameter from the summary view, you can use the summary_display attribute in the gui section as follows:
Example-2:
name: settings
label: Settings
type: object[]
parameters:
-
name: name
label: Name
description: Name of this setting
type: string
gui:
summary_display: true
Set the user options as radio buttons
You can list the user options as radio buttons using
layout and allowed-values attributes. So, when the user is creating a configuration pack, the parameter values appear as radio buttons.
By default, if the gui attribute is not specified, the parameter values are displayed as a drop-down menu.
-
name: block-by-category-action
label: Action
description: Set an action if the bot is detected.
type: string
default: RESET
gui:
layout: radio
allowed-values:
- NONE
- DROP
- REDIRECT
- RESET
- MITIGATION
In this example, the user options to set an action appear as radio buttons. And, the RESET option is selected by default.