ZoneInterface outputs are taken care of.

This commit is contained in:
Philippe Pittoli 2023-07-09 15:59:49 +02:00
parent b178a830cc
commit f9ab384d06

View File

@ -30,6 +30,7 @@ data Action
| DomainListComponentEvent DomainListInterface.Output | DomainListComponentEvent DomainListInterface.Output
| AuthenticationDaemonEvent WS.Output | AuthenticationDaemonEvent WS.Output
| DNSManagerDaemonEvent WS.Output | DNSManagerDaemonEvent WS.Output
| ZoneInterfaceEvent ZoneInterface.Output
| AuthenticateToDNSManager | AuthenticateToDNSManager
| Routing Page | Routing Page
@ -92,7 +93,7 @@ render state
-- TODO -- TODO
render_home = render_nothing render_home = render_nothing
render_zone domain = Bulma.box [ HH.slot_ _zi unit ZoneInterface.component domain ] render_zone domain = Bulma.box [ HH.slot _zi unit ZoneInterface.component domain ZoneInterfaceEvent]
authenticated = case state.token of authenticated = case state.token of
Nothing -> false Nothing -> false
@ -170,6 +171,11 @@ handleAction = case _ of
state <- H.get state <- H.get
H.tell _aai unit (AAI.ProvideState state.store_AuthenticationDaemonAdmin_state) H.tell _aai unit (AAI.ProvideState state.store_AuthenticationDaemonAdmin_state)
ZoneInterfaceEvent ev -> case ev of
ZoneInterface.MessageToSend message -> H.tell _ws_dns unit (WS.ToSend message)
ZoneInterface.Log message -> H.tell _log unit (Log.Log message)
ZoneInterface.DNSManagerReconnect -> handleAction AuthenticateToDNSManager
DomainListComponentEvent ev -> case ev of DomainListComponentEvent ev -> case ev of
DomainListInterface.MessageToSend message -> H.tell _ws_dns unit (WS.ToSend message) DomainListInterface.MessageToSend message -> H.tell _ws_dns unit (WS.ToSend message)
DomainListInterface.Log message -> H.tell _log unit (Log.Log message) DomainListInterface.Log message -> H.tell _log unit (Log.Log message)