From b006ec19736e4cacb184ad58a8f09344c5b3bb80 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 21 Sep 2022 09:42:31 +0200 Subject: [PATCH] new export actions erasure --- ereuse_devicehub/inventory/views.py | 5 +++++ ereuse_devicehub/templates/inventory/erasure_list.html | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ereuse_devicehub/inventory/views.py b/ereuse_devicehub/inventory/views.py index d0532c16..95f140c3 100644 --- a/ereuse_devicehub/inventory/views.py +++ b/ereuse_devicehub/inventory/views.py @@ -798,6 +798,7 @@ class ExportsView(View): export_ids = { 'metrics': self.metrics, 'devices': self.devices_list, + 'actions_erasures': self.actions_erasures, 'certificates': self.erasure, 'lots': self.lots_export, 'devices_lots': self.devices_lots_export, @@ -898,6 +899,10 @@ class ExportsView(View): insert_hash(res.data) return res + def actions_erasures(self): + data = StringIO() + return self.response_csv(data, "Erasures.csv") + def build_erasure_certificate(self): erasures = [] for device in self.find_devices(): diff --git a/ereuse_devicehub/templates/inventory/erasure_list.html b/ereuse_devicehub/templates/inventory/erasure_list.html index cf702a40..b871b48c 100644 --- a/ereuse_devicehub/templates/inventory/erasure_list.html +++ b/ereuse_devicehub/templates/inventory/erasure_list.html @@ -29,7 +29,7 @@