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():
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

View File

@ -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"