{= # # # # get_log_format_options.cfv # # # This gets numerical fields and snapon form parameters of the given log format. # # # include "templates.util.base_util"; include "templates.util.encoding"; include "templates.util.rbac.rbac_util"; include "templates.util.snapon_parameters_util"; include "templates.new_profile_wizard.get_log_format_options_util"; debug_message("\n#### get_log_format_options.cfv START \n"); string session_id = volatile.session_id; bool is_root_admin = get_is_root_admin(); string page_token = v.fp.page_token; # # Check RBAC permissions # if ((is_root_admin or get_admin_feature_permission(session_id, "profiles", "add")) and get_is_valid_page_token(session_id, "new_profile_wizard", page_token)) then ( string log_format_name = v.fp.log_format_name; node log_format = "log_formats." . log_format_name; debug_message("#### log_format_name: " . log_format_name . "\n"); # string create_profile_wizard_options_path = "log_formats." . log_format . ".create_profile_wizard_options"; # # Get numerical fields # string numerical_fields_dat = get_numerical_fields_dat(log_format); # # Get snapons # string snapons_dat = get_snapons_dat(log_format); debug_message("log format options - numerical_fields_dat:\n " . numerical_fields_dat . "\n\n"); debug_message("log format options - snapons_dat:\n " . snapons_dat . "\n"); # # # Server response # # string dat = "{"; dat .= add_json("numericalFieldsDb", numerical_fields_dat, "obj"); dat .= add_json("snapons", snapons_dat, "obj"); dat = close_json(dat); 'newProfileWizard.get_log_format_options_response(' . dat . ')\n'; ) else ( # No permission to view this resource (URL) display_no_permission_html(); ); =}