From 43fead1589dbd0a6f822d1108c9a32dc42088c77 Mon Sep 17 00:00:00 2001 From: Alex Davies Date: Fri, 15 Nov 2024 13:11:47 -0400 Subject: [PATCH] Added more useful docker tools --- guiTools/spiri_sdk_guitools/sim_drone.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/guiTools/spiri_sdk_guitools/sim_drone.py b/guiTools/spiri_sdk_guitools/sim_drone.py index aee195d..f2eb508 100644 --- a/guiTools/spiri_sdk_guitools/sim_drone.py +++ b/guiTools/spiri_sdk_guitools/sim_drone.py @@ -6,6 +6,7 @@ import os import sh import subprocess from nicegui import ui, run, app +import yaml import docker import aiodocker @@ -117,12 +118,19 @@ class Robot: # ui.label(container.attrs["Config"]["Cmd"]) cmd_widget = ui.codemirror(" ".join(container.attrs["Config"]["Cmd"]), language="bash",theme="basicDark").classes('h-auto max-h-32') cmd_widget.enabled = False + + with ui.expansion("Env Variables").classes("w-full outline outline-1").style("margin: 10px;"): + env_widget = ui.codemirror("\n".join(container.attrs["Config"]["Env"]), language="bash",theme="basicDark") + env_widget.enabled = False + logelement = ( ui.expansion("Logs") .style("margin: 10px;") .classes("w-full outline outline-1") ) asyncio.create_task(container_logs(container, logelement)) + with ui.expansion("Full details").classes("w-full outline outline-1").style("margin: 10px;"): + details_widget = ui.codemirror(yaml.dump(container.attrs), language="yaml",theme="basicDark") # Check for containers that have been removed removed = set(docker_elements.keys()) - set(self.containers()) for container in removed: