def generate_diff_html(self):
if not os.path.exists(self.resource_directory):<EOL><INDENT>os.makedirs(self.resource_directory)<EOL><DEDENT>self.copy_local_includes()<EOL>div_html = '<STR_LIT>'<EOL>for plot_div in sorted(self.plot_files):<EOL><INDENT>with open(plot_div, '<STR_LIT:r>') as div_file:<EOL><INDENT>div_html += '<STR_LIT:\n>' + div_file.read()<EOL><DEDENT><DEDENT>template_loader = FileSystemLoader(self.get_resources_location())<EOL>template_environment = Environment(loader=template_loader)<EOL>template_environment.filters['<STR_LIT>'] = naarad.utils.sanitize_string<EOL>diff_html = template_environment.get_template(CONSTANTS.TEMPLATE_HEADER).render(custom_stylesheet_includes=CONSTANTS.STYLESHEET_INCLUDES,<EOL>custom_javascript_includes=CONSTANTS.JAVASCRIPT_INCLUDES,<EOL>resource_path=self.resource_path,<EOL>report_title='<STR_LIT>') + '<STR_LIT:\n>'<EOL>diff_html += template_environment.get_template(CONSTANTS.TEMPLATE_DIFF_PAGE).render(diff_data=self.diff_data, plot_div_content=div_html,<EOL>reports=self.reports, sla_failure_list=self.sla_failure_list,<EOL>sla_map=self.sla_map) + '<STR_LIT:\n>'<EOL>diff_html += template_environment.get_template(CONSTANTS.TEMPLATE_FOOTER).render()<EOL>return diff_html<EOL>
Generate the summary diff report html from template
:return: generated html to be written to disk