feat: show export and import progress

This commit is contained in:
2026-08-05 12:42:40 +02:00
parent d78a8280e4
commit 80ef1be239
5 changed files with 130 additions and 6 deletions
+1 -1
View File
@@ -57,6 +57,7 @@ class DashboardView(UserPassesTestMixin, View):
filename = f"netbox-export-{form.cleaned_data['scope_type']}-{slugify(str(scope)) or scope.pk}.zip"
response = HttpResponse(payload, content_type="application/zip")
response["Content-Disposition"] = f'attachment; filename="{filename}"'
response["Content-Length"] = len(payload)
response["X-Content-Type-Options"] = "nosniff"
return response
@@ -85,4 +86,3 @@ class DashboardView(UserPassesTestMixin, View):
self.template_name,
self._context(import_form=ImportForm(prefix="import"), report=report, manifest=parsed.manifest),
)