{= # # # get_db_info_data.cfv # # include "templates.util.base_util"; include "templates.util.database"; include "templates.util.encoding"; include "templates.util.date_time.date_time_formatting"; debug_message("\n#### get_db_info_data.cfv START \n\n"); string session_id = volatile.session_id; bool is_root_admin = get_is_root_admin(); bool is_view_permission = is_root_admin; string profile_name = internal.profile_name; string page_token = v.fp.page_token; if (!is_root_admin) then ( # # Check if the user has permission to view this data # node super_role = get_super_role_of_profile(session_id, profile_name); is_view_permission = (?(super_role . ".reports.database_info")); ); if (is_view_permission and get_is_valid_page_token(session_id, "statistics", page_token)) then ( # # # Get database info data # # node db_info = get_database_info(profile_name, false); # debug_message("\n#### get_db_info_data.cfv - database_info:\n" . node_as_string(db_info) . "\n"); bool is_active_snapon_operation = get_is_active_snapon_operation(profile_name); bool is_real_time_processing = get_is_real_time_processing(profile_name); bool database_is_building = get_database_is_building(profile_name, db_info); string last_modification_time_localtime = ""; if (db_info?{"last_modification_time_localtime"} and (@db_info{"last_modification_time_localtime"} ne "")) then ( last_modification_time_localtime = format_date_time(@db_info{"last_modification_time_localtime"}); ); # Clean up delete_node(db_info); # # # Send response # # string dat = "{"; dat .= add_json("isActiveSnaponOperation", is_active_snapon_operation, "bool"); dat .= add_json("isRealTimeProcessing", is_real_time_processing, "bool"); dat .= add_json("databaseIsBuilding", database_is_building, "bool"); dat .= add_json("lastModificationTime", last_modification_time_localtime, "string"); dat = close_json(dat); debug_message("#### dat:\n" . dat . "\n"); "databaseUtil.getDatabaseInfoDataResponse(" . dat . ")\n"; ) else ( # No permission to view this resource (URL) display_no_permission_html(); ); =}