# # # build_html_standard() # # # This builds the a standard html table element from the raw report element # # # include "templates.util.get_web_server_root_path"; include "templates.util.encoding"; include "templates.util.date_time.date_time_formatting"; include "templates.statistics.html_report_element.build_html_graphs"; include "templates.statistics.html_report_element.build_html_standard_util"; subroutine(build_html_standard( string session_id, bool is_root_admin, string profile_name, node raw_report_element, node html_formatting, string html_report_element_id, node collected_whitelist_objects), ( debug_message("\n\n#### build_html_standard() START \n\n"); string web_server_root_path = get_web_server_root_path(); node query_fields = get_query_fields(session_id, is_root_admin, profile_name); string report_element_id = node_name(raw_report_element); string short_report_element_id = @raw_report_element{"short_report_element_id"}; string report_element_type = @raw_report_element{"report_element_type"}; string output_format = @html_formatting{"output_format"}; bool is_pivot_table = @raw_report_element{"is_pivot_table"}; bool is_hierarchical_table = @raw_report_element{"is_hierarchical_table"}; bool is_dynamic_report = (output_format eq "dynamic"); bool add_zoom_icon = (is_dynamic_report and report_element_type ne "log_detail"); bool show_http_link = @html_formatting{"show_http_link"}; string server_root = @html_formatting{"server_root"}; # Modify show_http_link if ouput_format is not appropriate, # we disable show_http_link in printer friendly and PDF files if (show_http_link and (output_format eq "static_print" or output_format eq "static_pdf")) then ( show_http_link = false; ); bool is_graphs = (raw_report_element?{"graphs"}); bool is_table = (raw_report_element?{"rows"}); # bool display_graphs_table_side_by_side = @raw_report_element{"display_graphs_table_side_by_side"}; node text_sizes = html_formatting . ".sizes.table_cell"; v.text_info = ""; v.text_info.maximum_text_length = @text_sizes{"maximum_text_length"}; v.text_info.maximum_continuous_text_length = @text_sizes{"maximum_continuous_text_length"}; v.text_info.maximum_continuous_text_length_offset = @text_sizes{"maximum_continuous_text_length_offset"}; v.text_info.dash_breaks = @html_formatting{"dash_breaks"}; v.text_info.break_entity = @html_formatting{"break_entity"}; node text_info = "v.text_info"; string table_bar_graph_color_scheme = @html_formatting{"graph_color_scheme_types"}{"table_bar_graph"}; node permissions; if (is_dynamic_report) then ( permissions = html_formatting{"permissions"}; ); # # # # # Graphs # # # # if (is_graphs) then ( node raw_report_element_graphs = raw_report_element{"graphs"}; # # Verify that all raw graphs exist # bool raw_graph_exists; bool all_raw_graphs_exist = true; node raw_report_element_graph_item; string graph_id; foreach raw_report_element_graph_item raw_report_element_graphs ( graph_id = @raw_report_element_graph_item; raw_graph_exists = get_raw_graph_exists(profile_name, graph_id, collected_whitelist_objects); if (!raw_graph_exists) then ( all_raw_graphs_exist = false; last; ); ); debug_message("#### build_html_standard() - all_raw_graphs_exist: " . all_raw_graphs_exist . "\n"); if (all_raw_graphs_exist) then ( # Add a customize link (Opens Customize Window with graphs tab active as default) # if (is_dynamic_report and @permissions{"customize_report_element"}) then ( # # '
'; # ); build_html_graphs(query_fields, profile_name, raw_report_element, raw_report_element_graphs, html_formatting, html_report_element_id); ); # Add clearence for the table ''; # # This uses $starting_row, $ending_row, and $total_rows # if (!is_unknown_total_rows) then ( # expand(lang_stats.general.item_n_m_of_total); # ) # else ( # expand(lang_stats.general.item_n_m_of_unknown_total); # ); # # ' | '; # # if (is_dynamic_report and (total_rows > 0 or number_of_rows_in_table > 0)) then ( # # # Add the rows bar container # string id = "rows_number_container:" . short_report_element_id; # ''; # ); # # ' |
---|