Container now provides messages from dnsmanagerd to the ZoneInterface module.

beta
Philippe Pittoli 2023-07-10 04:08:02 +02:00
parent 5dc03a9649
commit 8130a90f4a
1 changed files with 6 additions and 1 deletions

View File

@ -205,7 +205,12 @@ handleAction = case _ of
-- TODO: depending on the current page, we should provide the received message to different components.
DNSManagerDaemonEvent ev -> case ev of
WS.MessageReceived (Tuple _ message) -> H.tell _dli unit (DomainListInterface.MessageReceived message)
WS.MessageReceived (Tuple _ message) -> do
{ current_page } <- H.get
case current_page of
DomainList -> H.tell _dli unit (DomainListInterface.MessageReceived message)
Zone _ -> H.tell _zi unit (ZoneInterface.MessageReceived message)
_ -> H.tell _log unit (Log.Log $ SystemLog "unexpected message from dnsmanagerd")
WS.WSJustConnected -> do
H.tell _log unit (Log.Log $ SimpleLog "Connection with dnsmanagerd was closed, let's re-authenticate")
handleAction AuthenticateToDNSManager