diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-12-05 11:19:07 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-12-05 11:19:07 +0100 |
commit | 31b65e41043900c0cadd80961f4b22cdfc171e7d (patch) | |
tree | cdeceac026a2d1e0fe8c00af5d0f867767d17ef4 /python/gui.py | |
parent | 5cf52c74e9eb6bf8a82af4509ff3eb5106f928f9 (diff) | |
download | dabmod-31b65e41043900c0cadd80961f4b22cdfc171e7d.tar.gz dabmod-31b65e41043900c0cadd80961f4b22cdfc171e7d.tar.bz2 dabmod-31b65e41043900c0cadd80961f4b22cdfc171e7d.zip |
Get GUI to communicate with DPDCE
Diffstat (limited to 'python/gui.py')
-rwxr-xr-x | python/gui.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/python/gui.py b/python/gui.py index 512afef..ce7948c 100755 --- a/python/gui.py +++ b/python/gui.py @@ -35,9 +35,9 @@ env = Environment(loader=FileSystemLoader('gui/templates')) base_js = ["js/odr.js"] class Root: - def __init__(self): + def __init__(self, dpd_port): self.mod_rc = zmqrc.ModRemoteControl("localhost") - self.api = API(self.mod_rc) + self.api = API(self.mod_rc, dpd_port) @cherrypy.expose def index(self): @@ -81,6 +81,7 @@ if __name__ == '__main__': allconfig = configparser.ConfigParser() allconfig.read(cli_args.config) config = allconfig['gui'] + dpd_port = allconfig['dpdce'].getint('control_port') daemon = False if daemon: @@ -105,7 +106,7 @@ if __name__ == '__main__': staticdir = os.path.realpath(config['static_directory']) cherrypy.tree.mount( - Root(), config={ + Root(dpd_port), config={ '/': { }, '/dpd': { 'tools.staticdir.on': True, |