add datastorage to csv
This commit is contained in:
parent
57882ca2c5
commit
dc07b4973b
|
@ -345,6 +345,9 @@ class DeviceRow(BaseDeviceRow):
|
||||||
self['IMEI'] = device.imei or ''
|
self['IMEI'] = device.imei or ''
|
||||||
self.get_erasure_datawipe_mobile(device)
|
self.get_erasure_datawipe_mobile(device)
|
||||||
|
|
||||||
|
if isinstance(device, d.DataStorage):
|
||||||
|
self.get_erasure_datawipe_mobile(device)
|
||||||
|
|
||||||
def components(self):
|
def components(self):
|
||||||
"""Function to get all components information of a device."""
|
"""Function to get all components information of a device."""
|
||||||
assert isinstance(self.device, d.Computer)
|
assert isinstance(self.device, d.Computer)
|
||||||
|
@ -424,8 +427,16 @@ class DeviceRow(BaseDeviceRow):
|
||||||
erasure = erasures[-1] if erasures else None
|
erasure = erasures[-1] if erasures else None
|
||||||
if erasure:
|
if erasure:
|
||||||
self['Erasure DataStorage 1'] = none2str(device.chid)
|
self['Erasure DataStorage 1'] = none2str(device.chid)
|
||||||
|
if isinstance(device, d.Mobile):
|
||||||
serial_number = none2str(device.imei)
|
serial_number = none2str(device.imei)
|
||||||
storage_size = none2str(device.data_storage_size)
|
size = device.data_storage_size
|
||||||
|
size = size * 1000 if size else 0
|
||||||
|
storage_size = none2str(size)
|
||||||
|
|
||||||
|
if isinstance(device, d.DataStorage):
|
||||||
|
serial_number = none2str(device.serial_number)
|
||||||
|
storage_size = none2str(device.size)
|
||||||
|
|
||||||
self['Erasure DataStorage 1 Serial Number'] = serial_number
|
self['Erasure DataStorage 1 Serial Number'] = serial_number
|
||||||
self['Erasure DataStorage 1 Size (MB)'] = storage_size
|
self['Erasure DataStorage 1 Size (MB)'] = storage_size
|
||||||
self['Erasure DataStorage 1 Software'] = erasure.document.software
|
self['Erasure DataStorage 1 Software'] = erasure.document.software
|
||||||
|
|
|
@ -162,6 +162,7 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for ac in erasure.items %}
|
{% for ac in erasure.items %}
|
||||||
|
{% if not ac.device.is_mobile() %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<input type="checkbox" class="deviceSelect" data="{{ ac.device.my_partner.id }}"
|
<input type="checkbox" class="deviceSelect" data="{{ ac.device.my_partner.id }}"
|
||||||
|
@ -227,6 +228,7 @@
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
Reference in New Issue