mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-26 05:51:29 +00:00
fix: add type annotations to monitoring.py
This commit is contained in:
parent
0834360961
commit
60c5e12946
|
@ -1,18 +1,18 @@
|
||||||
import strawberry
|
import strawberry
|
||||||
|
|
||||||
from selfprivacy_api.utils.prometheus import PrometheusQueries
|
from selfprivacy_api.utils.prometheus import PrometheusQueries, PrometheusQueryResult
|
||||||
|
|
||||||
|
|
||||||
@strawberry.type
|
@strawberry.type
|
||||||
class Monitoring:
|
class Monitoring:
|
||||||
@strawberry.field
|
@strawberry.field
|
||||||
def disk_usage():
|
def disk_usage() -> PrometheusQueryResult:
|
||||||
return PrometheusQueries.disk_usage()
|
return PrometheusQueries.disk_usage()
|
||||||
|
|
||||||
@strawberry.field
|
@strawberry.field
|
||||||
def memory_usage():
|
def memory_usage() -> PrometheusQueryResult:
|
||||||
return PrometheusQueries.memory_usage()
|
return PrometheusQueries.memory_usage()
|
||||||
|
|
||||||
@strawberry.field
|
@strawberry.field
|
||||||
def cpu_usage():
|
def cpu_usage() -> PrometheusQueryResult:
|
||||||
return PrometheusQueries.cpu_usage()
|
return PrometheusQueries.cpu_usage()
|
||||||
|
|
Loading…
Reference in a new issue