From 2b1f01e5c20dacb639432f6ef8d7a02507aace7e Mon Sep 17 00:00:00 2001 From: Adrian D'Alessandro Date: Thu, 21 Sep 2023 17:36:34 +0100 Subject: [PATCH] Setup the sections with WebRTC apps, where required --- app/core_api.py | 34 ++++++++++++++++++++++++---------- configure.py | 1 - 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/app/core_api.py b/app/core_api.py index f73d503..650ff8a 100644 --- a/app/core_api.py +++ b/app/core_api.py @@ -9,7 +9,6 @@ """ Constants for API URLs. """ -APP_URL = os.environ.get("APP_URL", "http://146.179.34.13:8080/app/html") API_URL = os.environ.get("API_URL", "http://liionsden.rcs.ic.ac.uk:8080") PLOT_URL = os.environ.get("PLOT_URL", "http://liionsden.rcs.ic.ac.uk:8050") @@ -23,7 +22,10 @@ "w": 1440, "h": 808, "space": "Tablet", - "app": {"url": APP_URL, "states": {"load": {"url": f"{PLOT_URL}"}}}, + "app": { + "url": f"{API_URL}/app/html", + "states": {"load": {"url": f"{PLOT_URL}"}}, + }, }, { "x": 0, @@ -31,7 +33,7 @@ "w": 1920, "h": 1080, "space": "PC01-Top", - "app": {"url": APP_URL, "states": {"load": {"url": f"{PLOT_URL}/plot1"}}}, + "app": {"url": f"{API_URL}/app/webrtc", "states": {"load": "ScreenShare"}}, }, { "x": 0, @@ -39,7 +41,10 @@ "w": 1920, "h": 1080, "space": "PC01-Left", - "app": {"url": APP_URL, "states": {"load": {"url": f"{PLOT_URL}/plot2"}}}, + "app": { + "url": f"{API_URL}/app/html", + "states": {"load": {"url": f"{PLOT_URL}/plot2"}}, + }, }, { "x": 0, @@ -47,7 +52,10 @@ "w": 1920, "h": 1080, "space": "PC01-Right", - "app": {"url": APP_URL, "states": {"load": {"url": f"{PLOT_URL}/plot3"}}}, + "app": { + "url": f"{API_URL}/app/html", + "states": {"load": {"url": f"{PLOT_URL}/plot3"}}, + }, }, { "x": 0, @@ -55,7 +63,7 @@ "w": 1920, "h": 1080, "space": "PC02-Top", - "app": {"url": APP_URL, "states": {"load": {"url": f"{PLOT_URL}/plot4"}}}, + "app": {"url": f"{API_URL}/app/webrtc", "states": {"load": "ScreenShare"}}, }, { "x": 0, @@ -63,7 +71,7 @@ "w": 1920, "h": 1080, "space": "PC02-Left", - "app": {"url": APP_URL, "states": {"load": {"url": f"{PLOT_URL}/plot5"}}}, + "app": {"url": f"{API_URL}/app/webrtc", "states": {"load": "ScreenShare"}}, }, { "x": 0, @@ -71,7 +79,7 @@ "w": 1920, "h": 1080, "space": "PC02-Right", - "app": {"url": APP_URL, "states": {"load": {"url": f"{PLOT_URL}/plot6"}}}, + "app": {"url": f"{API_URL}/app/webrtc", "states": {"load": "ScreenShare"}}, }, { "x": 0, @@ -79,7 +87,10 @@ "w": 3840, "h": 2160, "space": "Hub01", - "app": {"url": APP_URL, "states": {"load": {"url": f"{PLOT_URL}/plot7"}}}, + "app": { + "url": f"{API_URL}/app/html", + "states": {"load": {"url": f"{PLOT_URL}/plot7"}}, + }, }, { "x": 0, @@ -87,7 +98,10 @@ "w": 3840, "h": 2160, "space": "Hub02", - "app": {"url": APP_URL, "states": {"load": {"url": f"{PLOT_URL}/plot8"}}}, + "app": { + "url": f"{API_URL}/app/html", + "states": {"load": {"url": f"{PLOT_URL}/plot8"}}, + }, }, ] diff --git a/configure.py b/configure.py index 3d66d75..9586521 100755 --- a/configure.py +++ b/configure.py @@ -70,7 +70,6 @@ def generate_docker_compose(template_file: str, ip: str, develop: bool = False) "ports": ["8050:8050"], "volumes": ["./app:/app"], "environment": { - "APP_URL": f"http://{lines_to_replace['OVE_HOST']}/app/html", "API_URL": f"http://{lines_to_replace['OVE_HOST']}", "PLOT_URL": f"http://{lines_to_replace['PLOT_URL']}", },