mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-22 20:11:30 +00:00
Bytes from int to str
This commit is contained in:
parent
5532114668
commit
a6fe72608f
|
@ -7,9 +7,9 @@ from selfprivacy_api.utils.block_devices import BlockDevices
|
||||||
|
|
||||||
@strawberry.type
|
@strawberry.type
|
||||||
class StorageVolume:
|
class StorageVolume:
|
||||||
total_space: int
|
total_space: str
|
||||||
free_space: int
|
free_space: str
|
||||||
used_space: int
|
used_space: str
|
||||||
root: bool
|
root: bool
|
||||||
name: str
|
name: str
|
||||||
|
|
||||||
|
@ -21,9 +21,9 @@ class Storage:
|
||||||
"""Get list of volumes"""
|
"""Get list of volumes"""
|
||||||
return [
|
return [
|
||||||
StorageVolume(
|
StorageVolume(
|
||||||
total_space=volume.fssize if volume.fssize is not None else volume.size,
|
total_space=str(volume.fssize) if volume.fssize is not None else str(volume.size),
|
||||||
free_space=volume.fsavail,
|
free_space=str(volume.fsavail),
|
||||||
used_space=volume.fsused,
|
used_space=str(volume.fsused),
|
||||||
root=volume.name == "sda1",
|
root=volume.name == "sda1",
|
||||||
name=volume.name,
|
name=volume.name,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue