mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-18 00:19:15 +00:00
hhh
This commit is contained in:
parent
80e5550f7d
commit
45c3e3003d
|
@ -4,7 +4,7 @@ import subprocess
|
|||
import typing
|
||||
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.utils import ReadUserData
|
||||
|
||||
|
@ -150,9 +150,14 @@ class System:
|
|||
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)
|
||||
settings: SystemSettings
|
||||
info: SystemInfo
|
||||
settings: SystemSettings = SystemSettings()
|
||||
info: SystemInfo = SystemInfo()
|
||||
provider: SystemProviderInfo = strawberry.field(resolver=get_system_provider_info)
|
||||
busy: bool = False
|
||||
|
|
|
@ -11,7 +11,10 @@ from selfprivacy_api.graphql.queries.system import System
|
|||
class Query:
|
||||
"""Root schema for queries"""
|
||||
|
||||
system: System
|
||||
@strawberry.field
|
||||
def system(self) -> System:
|
||||
"""System queries"""
|
||||
return System()
|
||||
|
||||
@strawberry.field
|
||||
def api(self) -> Api:
|
||||
|
|
Loading…
Reference in a new issue