def render_content(report_file, base_url): formatter = abdweb_htmlformatter.HtmlFormatter() report = _read_json_file(report_file) abdweb_arcydcontent.render( formatter, base_url, report) content = formatter.get_content() formatter = abdweb_htmlformatter.HtmlFormatter() abdweb_page.render(formatter, content) return formatter.get_content()
def _write_arcyd_status_page(filename, report): filename += '.html' formatter = abdweb_htmlformatter.HtmlFormatter() abdweb_arcydcontent.render( formatter, 'https://server.test/', report) content = formatter.get_content() formatter = abdweb_htmlformatter.HtmlFormatter() abdweb_page.render(formatter, content) with open(filename, 'w') as f: f.write(formatter.get_content()) print "wrote:", filename
def render_content(reset_file, pause_file, report_file, base_url): is_reset_scheduled = False is_pause_scheduled = False if reset_file: is_reset_scheduled = os.path.isfile(reset_file) if pause_file: is_pause_scheduled = os.path.isfile(pause_file) formatter = abdweb_htmlformatter.HtmlFormatter() report = _read_json_file(report_file) abdweb_arcydcontent.render( formatter, base_url, report, is_reset_scheduled=is_reset_scheduled, is_pause_scheduled=is_pause_scheduled) content = formatter.get_content() formatter = abdweb_htmlformatter.HtmlFormatter() abdweb_page.render(formatter, content) return formatter.get_content()