--- file: snapons/$snapon_node_name.cfg node: snapons.$snapon_node_name infos_node: snapon structure: snapon: label: string comment: string config_snapon_category: string parameters: node-list parameters_form: node-list attach_operations: _: node-list # foreach attach operation type: string # add_condition and add_in_snapon # are sub nodes of specific # attach_operations sub nodes. add_condition: string add_in_snapon: string infos: - node: label - node: comment comment: This describes the purpose of the snapon. The comment is displayed in the Config/Snapons GUI. - node: config_snapon_category values: [hidden] comment: Defines which snapons are hidden in Config/Snapons by the hidden value. Other values are planned in future. - node: parameters defined_in_file: snapon.parameters.yaml - node: parameters_form defined_in_file: snapon.parameters_form.yaml - node: attach_operations comment: This node is the top level of the snapon node. Its subnodes are operations which are run, in the order they appear in the node, when the snapon is attached to a profile. Each subnode of attach_operations has a "type" subnode which specifies the type of the operation. - node: attach_operations.type values: - value: add_database_fields comment: This operation adds one or more database fields to a profile. It contains a subnode "fields", each of whose subnodes is a database field to add to the profile. The database fields are added to the database.fields section of the profile. If some subnodes of the field node are not specified, standard defaults are used. If a main_table exists in the profile database, the database fields are added to that table. - value: add_log_fields comment: This operation adds one or more log fields to a profile. It contains a subnode "fields", each of whose subnodes is a log field to add to the profile. The database fields are added to the database.fields section of the profile. If some subnodes of the field node are not specified, standard defaults are used. - value: add_database_filters comment: This operation adds one or more database filters to a profile. It contains a subnode "filters", each of whose subnodes is a database filter to add to the profile. After adding the filters, if there is a main_table in the profile database, it runs the filters against all rows of the main_table. - value: add_log_filters comment: This operation adds one or more log filters to a profile. It contains a subnode "filters", each of whose subnodes is a log filter to add to the profile. The log filter node layout is described here. If the subnode for a filter contains an add_position subnode, the filter is added at the integer position specified; otherwise it it added to the end of the log filters list. - value: add_log_filter_initializations comment: This operation adds one or more log filter initializations to a profile. It contains a subnode "log_filter_initializations", each of whose subnodes is a log filter initialization to add to the profile. - value: add_log_filter_finalizations comment: This operation adds one or more log filter finalizations to a profile. It contains a subnode "log_filter_finalizations", each of whose subnodes is a log filter finalization to add to the profile. - value: add_report_fields comment: This operation adds one or more report fields to a profile. It contains a subnode "fields", each of whose subnodes is a report field to add to the profile. The report fields are added to the statistics.report_fields section of the profile. - value: add_xref_fields comment: This operation adds one or more fields to the xref tables of a profile. It contains a subnode "xref_group" whose value is a wildcard pattern which is matched against the node names of xref groups to determine which will be affected--those that match will have the specified fields added. It contains a subnode "fields", each of whose subnodes specifies the name of a field to add to the xrefs groups (the name of the subnode is the name of the field to add). If an affected xref table exists in the database, it is dropped and marked as needing to be rebuilt. - value: add_xref_groups comment: This operation adds one or more xref groups to a profile. It contains a subnode "xref_groups" which contains xref group nodes as they would appear in the profile, and which are copied directly to the profile. In addition, each xref group node may contain a subnode add_all_aggregating_fields, which if true or absent, causes all aggregating database fields corresponding to report fields where include_field_in_reports_by_default=true, to be added to the xref group. - value: add_reports comment: > This operation adds one or more reports and report elements a profile. It contains a "reports" subnode, whose values are report nodes as in a profile. However, nearly any option can be omitted, and will be given a default value when copying the option into the report. The required parameters are sort_by for report elements, and report_field for report element columns. If a value is of the format "variable:_fieldname_", it will be converted to the value of the database filter variable _fieldname_ when it is written to the profile. The top-level add_reports node also contains a "reports_menu" subnode, which has one item for each top-level report or group in the reports menu. Each of the group items must have an "items" subnode, and within it, items for second-level reports. I.e., this node layout is identical to reports_menu in a profile. A special value of "top_level" for a report group, causes the reports in that group to be put in the top level of the menu (not in any group). The following values, if present, will be copied from a report element in the snapon, to a report element in the profile: label, show_header_bar, header, footer, date_filter.df, filter.expression, table_filter_expression. If a "columns" node is present (i.e., if it's a table reports), the following values, if present, will be copied from a report element in the snapon, to a report element in the profile: omit_parenthesized_items, use_overview_for_totals, report_field, show_graphs, show_table, sort_by, sort_direction, show_remainder_row, show_averages_row, show_min_row, show_max_row, show_totals_row. If the report element type is of type sessions_overview, the following values must be present, and will be copied from a report element in the snapon, to a report element in the profile: session_user_field, session_date_time_field, session_id_field, session_duration_field, session_events_field, session_entrances_field, session_exits_field. If the report element type is of type session_paths, the following values must be present, and will be copied from a report element in the snapon, to a report element in the profile: session_user_field, session_sequence_number_field, session_id_field, session_page_field. If the report element type is of type session_page_paths, the following values must be present, and will be copied from a report element in the snapon, to a report element in the profile: session_page_field, session_date_time_field, session_id_field, session_entrances_field, session_exits_field. - value: add_report_element_columns comment: This operation adds one or more fields to the report elements of a profile. It contains a subnode "report" and a subnode "report_element" whose values are wildcard patterns which are matched against the node names of reports and report elements to determine which will be affected--report element will have the specified fields added if the report element node name matches the specified report_element pattern, and the report node name matches the specified report_element pattern. It contains a subnode "columns", each of whose subnodes is a column node to be added to the report element. - value: add_snapons comment: This operation adds one or more snapons to a profile. It contains a subnode "snapons", each of whose subnodes is a snapon information node, intended to be overlaid over the target snapon, and passed to attach_snapon() to attach the snapon with the specified parameters. - value: edit_profile_node comment: This operation changes the value of a single node in the profile. It contains a subnode "node" which is the relative nodepath in the profile of the node to edit, and a subnode "new_value" which is the new value of the node; it sets the specified node to the specified value. - value: execute_expression comment: This operation executes a Salang expression. It contains a subnode "expression" which is a string containing the Salang expression to execute. This is not reversible. - node: attach_operations.add_condition required_if: optionally if attach_operations.type is equal add_report_element_columns comment: The operation's node may contain an add_condition subnode, which is compiled and executed as Salang each time an addition is considered, and the operation does not occur for that iteration if the expression evaluates to false. - node: attach_operations.add_in_snapon required_if: optionally if attach_operations.type is equal add_database_fields or add_log_fields or add_database_filters or add_report_fields or add_reports or add_snapons or add_log_filters comment: The operation's node may contain an add_in_snapon subnode, which is expanded/executed as the snapon is expanded, evaluating to true or false at that initial expansion; if it is false, the operation will not add that item. ...