diff --git a/web/startScan/templates/startScan/history.html b/web/startScan/templates/startScan/history.html index a0ca5a38..ab68088b 100644 --- a/web/startScan/templates/startScan/history.html +++ b/web/startScan/templates/startScan/history.html @@ -175,7 +175,7 @@ {% endif %} {% if scan.scan_status != -1%}
- + Download Report {% endif %} @@ -455,7 +455,7 @@ } } - function initiate_report(id, is_subdomain_scan, is_vulnerability_scan) { + function initiate_report(id, is_subdomain_scan, is_vulnerability_scan, domain_name) { $('#generateReportModal').modal('show'); $('#report_alert_message').empty(); $('#report_type_select').empty(); @@ -492,10 +492,10 @@ })); } - $('#generateReportButton').attr('onClick', `generate_report(${id})`); + $('#generateReportButton').attr('onClick', `generate_report(${id}, '${domain_name}')`); } - function generate_report(id) { + function generate_report(id, domain_name) { var report_type = $("#report_type_select option:selected").val(); $('#generateReportModal').modal('hide'); swal.queue([{ diff --git a/web/startScan/views.py b/web/startScan/views.py index 5bec22d3..17229c32 100644 --- a/web/startScan/views.py +++ b/web/startScan/views.py @@ -724,8 +724,6 @@ def create_report(request, id): html = template.render(data) pdf = HTML(string=html).write_pdf() - print(report_type) - if 'download' in request.GET: response = HttpResponse(pdf, content_type='application/octet-stream') else: