--- node: snapons.$snapon_node_name.parameters.$name infos_node: snapon.parameters structure: parameters: _: node-list # foreach parameter parameter_value: string final_node_name: string condition: string validation_type: string validate_field_label_for: log_fields: bool database_fields: bool report_fields: bool min: float max: float form_element_label: string form_element_type: string form_element_width: int select_options_source: string select_options: _: node-list label: string option_value: string description: string infos: - node: parameter_value value: text or a Salang expression comment: Note, every parameter_value is expanded because some snapon parameter values are based on Salang expresions. Labels (field_label, report_label, etc.) are also parameter values and expanded but the expression is maintained when the label isn't modified by the user or system. - node: final_node_name required_if: if validation_type is equal field_label or report_label or report_group_label comment: This defines the node name of the parameter, respectively field, report or report group. A re-defined default final_node_name is required if a snapon becomes attached by the system without GUI interaction, respectively without prompting for parameters. When attaching a snapon via the parameters form in the GUI then the final_node_name is generated via javascript from the actual label and added to the parameters node dynamically before snapon attachment. - node: condition value: Arbitrary Salang expression with one or more parameter names of the snapon parameters node. comment: The parameter with the condition is only displayed and validated if the condition expression evaluates to true. This allows to show/hide parameters depending of the active form input. For Example condition = "field_1 ne 'hits' and field_2 eq 'unique'" - node: validation_type values: - value: "" - value: string - value: int - value: float - value: field_label comment: Indicates that the label is validated against the field(s) defined in the "validate_field_label_for" node, which can be log_fields and/or database_fields and/or report_fields. - value: report_label comment: This checks against existing report labels though it allows duplicate report labels as in Config/Reports. However, a warning will be shown if the entered report label already exists. - value: report_group_label comment: This checks against existsing report group labels though it allows duplicate report group labels as in Config/Reports. However, a warning will be shown if the entered report group label already exists. - value: snapon_label comment: This checks against all attached snapon labels in the profile. This option is only used on the client side when the user enters the snapon label. comment: | This defines how the value is validated. An empty string indicates that the value is not validated at all, so it is allowed to be empty. The "" (empty) string is also used when form_element_type is equal "checkbox" because there is nothing to validate, it just gets the value true or false. The *_label validation types are not supported for snapons attached in log format plug-ins due the absence of label lookup and the "final_node_name" node when the snapon becomes attached. - node: validate_field_label_for required_if: if validation_type is equal field_label comment: Validates the field label to be unique among the field labels specified as subnodes which are log_fields, database_fields or report_fields. One or all subnodes can be specified at once, depending for which fields the value will be used. - node: min required_if: If validation type is int or float comment: This specifies that the entered value must be equal or greater than min. - node: max required_if: If validation type is int or float comment: This specifies that the entered value must be equal or smaller than max. - node: form_element_label comment: The form element label. - node: form_element_type values: [text, checkbox, select] comment: This specifies the form element type. - node: form_element_width comment: The width in pixel of input elements of type text. - node: select_options_source values: - log_fields - database_fields - report_fields - custom_fields comment: This describes the source to generate a select list element. - node: select_options required_if: if select_options_source is equal custom_fields comment: This defines a custom set of select options. - node: description comment: Description for the user about the value to be entered or selected. ... # Example snapon_N = { parameters= { set_value = { parameter_value = "2" validation_type = "int" min = 1 form_element_label = "Multiply hits with" form_element_type = "text" form_element_width = "220" description = "" } # set_value field_name = { parameter_value = "Double hits" validation_type = "field_label" validate_field_label_for = { database_fields = true report_fields = true } # validate_label_for form_element_label = "Field name" form_element_type = "text" form_element_width = "380" description = "This is the label for the database field and report field added by the snapon." } # field_name field_2 = { parameter_value = "page_views" validation_type = "string" form_element_label = "Some field" form_element_type = "select" select_options_source = "custom_fields" select_options = { 0 = { option_value = "page_views" label = "Page views" } # 0 1 = { option_value = "hits" label = "Hits" } # 1 } # select_options description = "" } # field_2 } # parameters } # snapon_N