A few more style tweaks

This commit is contained in:
Alex Davies 2024-11-06 16:40:07 -04:00
parent 2a252cb6a6
commit e42b5f1740
2 changed files with 8 additions and 7 deletions

View File

@ -44,8 +44,8 @@ async def main():
for app_name, command in applications.items(): 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;') 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): with ui.tab_panel(tab_robots):
new_robot_widget = ui.element() new_robot_widget = ui.element().classes("w-1/2")
with ui.element(): with ui.element().classes("w-1/2"):
ui.label("Debug") ui.label("Debug")
def cleanup_all_containers(): def cleanup_all_containers():
#Find all containers that start with spiri-sdk #Find all containers that start with spiri-sdk

View File

@ -47,11 +47,12 @@ robots = set()
async def container_logs(container, element): async def container_logs(container, element):
adocker = aiodocker.Docker() adocker = aiodocker.Docker()
with element: with element:
acontainer = await adocker.containers.get(container.id) with ui.scroll_area():
async for log in acontainer.log(stdout=True, stderr=True, follow=True): acontainer = await adocker.containers.get(container.id)
for line in log.splitlines(): async for log in acontainer.log(stdout=True, stderr=True, follow=True):
ui.label(line) for line in log.splitlines():
# ui.html(conv.convert(bytes(log,'utf-8').decode('utf-8', 'xmlcharrefreplace'), full=False)) ui.label(line)
# ui.html(conv.convert(bytes(log,'utf-8').decode('utf-8', 'xmlcharrefreplace'), full=False))
class Robot: class Robot:
robot_type = "spiri-mu" robot_type = "spiri-mu"