diff --git a/guiTools/spiri_sdk_guitools/launcher.py b/guiTools/spiri_sdk_guitools/launcher.py index c44ddeb..45eae63 100644 --- a/guiTools/spiri_sdk_guitools/launcher.py +++ b/guiTools/spiri_sdk_guitools/launcher.py @@ -44,8 +44,8 @@ async def main(): for app_name, command in applications.items(): ui.button(app_name, on_click=lambda cmd=command: launch_app(cmd)).style('width: 150px; height: 50px; margin: 5px;') with ui.tab_panel(tab_robots): - new_robot_widget = ui.element() - with ui.element(): + new_robot_widget = ui.element().classes("w-1/2") + with ui.element().classes("w-1/2"): ui.label("Debug") def cleanup_all_containers(): #Find all containers that start with spiri-sdk diff --git a/guiTools/spiri_sdk_guitools/sim_drone.py b/guiTools/spiri_sdk_guitools/sim_drone.py index 8cf519d..1717775 100644 --- a/guiTools/spiri_sdk_guitools/sim_drone.py +++ b/guiTools/spiri_sdk_guitools/sim_drone.py @@ -47,11 +47,12 @@ robots = set() async def container_logs(container, element): adocker = aiodocker.Docker() with element: - acontainer = await adocker.containers.get(container.id) - async for log in acontainer.log(stdout=True, stderr=True, follow=True): - for line in log.splitlines(): - ui.label(line) - # ui.html(conv.convert(bytes(log,'utf-8').decode('utf-8', 'xmlcharrefreplace'), full=False)) + with ui.scroll_area(): + acontainer = await adocker.containers.get(container.id) + async for log in acontainer.log(stdout=True, stderr=True, follow=True): + for line in log.splitlines(): + ui.label(line) + # ui.html(conv.convert(bytes(log,'utf-8').decode('utf-8', 'xmlcharrefreplace'), full=False)) class Robot: robot_type = "spiri-mu"