mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-01-23 17:26:46 +00:00
hhh
This commit is contained in:
parent
80e5550f7d
commit
45c3e3003d
|
@ -4,7 +4,7 @@ import subprocess
|
||||||
import typing
|
import typing
|
||||||
import strawberry
|
import strawberry
|
||||||
|
|
||||||
from selfprivacy_api.graphql.queries.common import Alert
|
from selfprivacy_api.graphql.queries.common import Alert, Severity
|
||||||
from selfprivacy_api.graphql.queries.providers import DnsProvider, ServerProvider
|
from selfprivacy_api.graphql.queries.providers import DnsProvider, ServerProvider
|
||||||
from selfprivacy_api.utils import ReadUserData
|
from selfprivacy_api.utils import ReadUserData
|
||||||
|
|
||||||
|
@ -150,9 +150,14 @@ class System:
|
||||||
Base system type which represents common system status
|
Base system type which represents common system status
|
||||||
"""
|
"""
|
||||||
|
|
||||||
status: Alert
|
status: Alert = strawberry.field(resolver=lambda: Alert(
|
||||||
|
severity=Severity.INFO,
|
||||||
|
title="Test message",
|
||||||
|
message="Test message",
|
||||||
|
timestamp=None
|
||||||
|
))
|
||||||
domain: SystemDomainInfo = strawberry.field(resolver=get_system_domain_info)
|
domain: SystemDomainInfo = strawberry.field(resolver=get_system_domain_info)
|
||||||
settings: SystemSettings
|
settings: SystemSettings = SystemSettings()
|
||||||
info: SystemInfo
|
info: SystemInfo = SystemInfo()
|
||||||
provider: SystemProviderInfo = strawberry.field(resolver=get_system_provider_info)
|
provider: SystemProviderInfo = strawberry.field(resolver=get_system_provider_info)
|
||||||
busy: bool = False
|
busy: bool = False
|
||||||
|
|
|
@ -11,7 +11,10 @@ from selfprivacy_api.graphql.queries.system import System
|
||||||
class Query:
|
class Query:
|
||||||
"""Root schema for queries"""
|
"""Root schema for queries"""
|
||||||
|
|
||||||
system: System
|
@strawberry.field
|
||||||
|
def system(self) -> System:
|
||||||
|
"""System queries"""
|
||||||
|
return System()
|
||||||
|
|
||||||
@strawberry.field
|
@strawberry.field
|
||||||
def api(self) -> Api:
|
def api(self) -> Api:
|
||||||
|
|
Loading…
Reference in a new issue