Create Config Params
To create configuration parameters for your extension, follow the steps given below:
- In your local drive, go to your Project folder which you created initially while building your widget
Open plugin-manifest file.
In plugin-manifest.json file, provide the Sample Configuration including details of the parameters in "config" attribute
You can utilize the provided sample JSON configuration for the config attribute.
Attributes Data Type Description name* Text Represents the unique name for the parameter in the extension.This name can be used further in mapping resources or placeholders.The name should not have an upper case and no space is allowed. displayName Text The text that will be displayed as label.
Note: If the displayName is not given, then the value for the name attribute will be considered as display name.
description Text Description about the input configuration parameter. The description can also include hyperlinks by enclosing the text for the hyperlink in square brackets followed by the url enclosed in brackets. E.g Please provide the [API Key](https://www.fortinet.com/resources/cyberglossary/api-key). secure* Boolean Secure the data entered by the user or not. true - The values provided will be protected on the server's end, where they will be concealed by showing asterisks (*). false -The values entered will not be protected and the user will be able to view the provided value.. type* Text The type of the parameter's field for user input.The data type of the user input for the configuration parameter. Supported values : text, number, switch, checkbox, radio, picklist, and multiselect. mandatory* Boolean Specifies how to receive input for the configuration parameter(link to be provided).
true - The user should provide the value to configure the parameter.false - User interaction is not needed to configure the parameter, and the values will be passed dynamically.
userdefined* Boolean Specifies how to receive input for the configuration parameter. authType Text The authentication type is determined by the user profile. The allowed values are org, personal.
- org- The configuration parameter needs to be set by the admin, while other users using the extension may not need to configure it. The parameter value is set organization-wide
- personal -If the value is set to personal, then each user using the extension must individually configure the config parameter.
default Text The default value that should be assigned to the configuration parameter if no input was given.
Note: To assign a default value, set the userdefined parameter to false and specify the value in the default attribute.
- Save the file.
- Pack and publish the extension.
Note: The installed extension now includes an additional tab called Configuration, located next to the General Settings tab. Within this tab, users can provide the necessary parameters, which can then be accessed and utilized to customize the functionalities of the extension according to specific requirements.
Sample Configuration
Copied{
"name" : "apiKey",
"displayName" : "API Key",
"mandatory" : true,
"secure" : true,
"type" : "text",
"userdefined" : true,
"authType" : "personal",
"maxLength" : 100,
"defaultValue" : "default",
"description" : "Please provide the [API Key](https://www.fortinet.com/resources/cyberglossary/api-key)"
}