extend the configuration for the UI communication
This commit is contained in:
30
aman/com/WebUI.py
Normal file
30
aman/com/WebUI.py
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import json
|
||||
|
||||
from aman.config.Server import Server
|
||||
from aman.types.Inbound import Inbound
|
||||
|
||||
class WebUI:
|
||||
def __init__(self):
|
||||
self.Config = None
|
||||
self.Aman = None
|
||||
|
||||
def __del__(self):
|
||||
self.release()
|
||||
|
||||
def acquire(self, config : Server, aman):
|
||||
self.Config = config
|
||||
self.Aman = aman
|
||||
|
||||
def release(self):
|
||||
return
|
||||
|
||||
def sendSequence(self, airport, inbounds):
|
||||
sequence = []
|
||||
|
||||
for inbound in inbounds:
|
||||
sequence.append(str(inbound.toJSON()))
|
||||
|
||||
# TODO send to the server
|
||||
#print(json.dumps({ 'airport': airport, 'sequence': sequence }, ensure_ascii=True))
|
||||
Reference in New Issue
Block a user