feature/multiple-compose #11

Merged
unsalted_salt merged 7 commits from feature/multiple-compose into master 2024-11-18 14:27:31 -04:00
1 changed files with 8 additions and 0 deletions
Showing only changes of commit 43fead1589 - Show all commits

View File

@ -6,6 +6,7 @@ import os
import sh import sh
import subprocess import subprocess
from nicegui import ui, run, app from nicegui import ui, run, app
import yaml
import docker import docker
import aiodocker import aiodocker
@ -117,12 +118,19 @@ class Robot:
# ui.label(container.attrs["Config"]["Cmd"]) # 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 = ui.codemirror(" ".join(container.attrs["Config"]["Cmd"]), language="bash",theme="basicDark").classes('h-auto max-h-32')
cmd_widget.enabled = False 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 = ( logelement = (
ui.expansion("Logs") ui.expansion("Logs")
.style("margin: 10px;") .style("margin: 10px;")
.classes("w-full outline outline-1") .classes("w-full outline outline-1")
) )
asyncio.create_task(container_logs(container, logelement)) 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 # Check for containers that have been removed
removed = set(docker_elements.keys()) - set(self.containers()) removed = set(docker_elements.keys()) - set(self.containers())
for container in removed: for container in removed: