{= # # # # get_log_format_db.cfv # # # include "templates.util.base_util"; include "templates.util.encoding"; include "templates.new_profile_wizard.log_format_labels_util"; include "templates.util.rbac.rbac_util"; debug_message("#### get_log_format_db.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 ( node log_format; node supported_log_format; string all_log_formats_dat = "["; string log_format_item_dat; string log_format_name; bool is_limited_by_license = false; # Use check_licensing() to makes sure that the licensing node exists node licensing = check_licensing(); node supported_log_formats; if (licensing?{"supported_log_formats"} and (num_subnodes(licensing{"supported_log_formats"}) > 0)) then ( supported_log_formats = licensing{"supported_log_formats"}; is_limited_by_license = true; ); if (!is_limited_by_license) then ( foreach log_format "log_formats" ( log_format_item_dat = get_log_format_item_dat(log_format); all_log_formats_dat .= log_format_item_dat . ','; ); ) else ( # # Supported log formats given by license # foreach supported_log_format supported_log_formats ( log_format_name = node_name(supported_log_format); log_format = "log_formats." . log_format_name; log_format_item_dat = get_log_format_item_dat(log_format); all_log_formats_dat .= log_format_item_dat . ','; ); ); all_log_formats_dat = replace_last(all_log_formats_dat,",","]"); debug_message("all_log_formats_dat:\n" . all_log_formats_dat . "\n"); 'newProfileWizard.server_response_get_log_format_db(' . all_log_formats_dat . ')\n'; ) else ( # No permission to view this resource (URL) display_no_permission_html(); ); =}