mirror of
https://github.com/yogeshojha/rengine.git
synced 2026-09-30 05:34:52 +02:00
Fixed Report Download domain name
This commit is contained in:
@@ -175,7 +175,7 @@
|
||||
{% endif %}
|
||||
{% if scan.scan_status != -1%}
|
||||
<div class="dropdown-divider"></div>
|
||||
<a href="#" class="dropdown-item text-dark" onclick="initiate_report({{scan_history.id}}, '{{scan_history.subdomain_discovery}}', '{{scan_history.vulnerability_scan}}')">
|
||||
<a href="#" class="dropdown-item text-dark" onclick="initiate_report({{scan_history.id}}, '{{scan_history.subdomain_discovery}}', '{{scan_history.vulnerability_scan}}', '{{ scan_history.domain.name }}')">
|
||||
<i class="fe-download"></i> Download Report</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
@@ -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([{
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user