#NEWLINE# def generate_client_charting_page( self , data_sources ) : #NEWLINE# #INDENT# '\n    Create the client charting page for the diff report, with time series data from the two diffed reports.\n    :return: generated html to be written to disk\n    ' #NEWLINE# if ( not os . path . exists ( self . resource_directory ) ) : #NEWLINE# #INDENT# os . makedirs ( self . resource_directory ) #NEWLINE# #UNINDENT# self . copy_local_includes ( ) #NEWLINE# template_loader = FileSystemLoader ( self . get_resources_location ( ) ) #NEWLINE# template_environment = Environment ( loader = template_loader ) #NEWLINE# client_html = ( template_environment . get_template ( CONSTANTS . TEMPLATE_HEADER ) . render ( custom_stylesheet_includes = CONSTANTS . STYLESHEET_INCLUDES , custom_javascript_includes = CONSTANTS . JAVASCRIPT_INCLUDES , resource_path = self . resource_path , report_title = 'naarad diff report' ) + '\n' ) #NEWLINE# client_html += ( template_environment . get_template ( CONSTANTS . TEMPLATE_DIFF_CLIENT_CHARTING ) . render ( data_series = data_sources , resource_path = data_sources . resource_path ) + '\n' ) #NEWLINE# client_html += template_environment . get_template ( CONSTANTS . TEMPLATE_FOOTER ) . render ( ) #NEWLINE# return client_html