WebUI.py 702 B

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/env python
  2. import json
  3. from aman.config.Server import Server
  4. from aman.types.Inbound import Inbound
  5. class WebUI:
  6. def __init__(self):
  7. self.Config = None
  8. self.Aman = None
  9. def __del__(self):
  10. self.release()
  11. def acquire(self, config : Server, aman):
  12. self.Config = config
  13. self.Aman = aman
  14. def release(self):
  15. return
  16. def sendSequence(self, airport, inbounds):
  17. sequence = []
  18. for inbound in inbounds:
  19. sequence.append(str(inbound.toJSON()))
  20. # TODO send to the server
  21. #print(json.dumps({ 'airport': airport, 'sequence': sequence }, ensure_ascii=True))