diff --git a/app.py b/app.py index fcfdc76..3b0abf2 100644 --- a/app.py +++ b/app.py @@ -128,33 +128,6 @@ def port_summary(info): return ", ".join(out) if out else None -def list_projects(): - out = subprocess.run( - ["docker", "ps", "-a", "--filter", "label=traefik.enable=true", "--format", "{{.ID}}"], - capture_output=True, text=True, check=True, - ).stdout.split() - - projects = [] - for cid in out: - info = inspect_all(cid) - name = info["Name"].lstrip("/") - if name == SELF_NAME: - continue - labels = info["Config"]["Labels"] or {} - state = info["State"] - status = state["Status"] - when = human_relative(state.get("StartedAt") if status == "running" else state.get("FinishedAt")) - projects.append({ - "name": name, - "hostname": extract_hostname(labels), - "status": status, - "since": when, - "image": info["Config"]["Image"], - }) - projects.sort(key=lambda p: p["name"]) - return projects - - def list_all_containers(): out = subprocess.run( ["docker", "ps", "-a", "--format", "{{.ID}}"], @@ -329,13 +302,12 @@ BASE_STYLE = """ NAV = """ """ -PROJECTS_TEMPLATE = """ +CONTAINERS_TEMPLATE = """
@@ -347,7 +319,7 @@ PROJECTS_TEMPLATE = """| Proje | Adres | Durum | İmaj | |
|---|---|---|---|---|
| {{ p.name }} | -{% if p.hostname %}{{ p.hostname }}{% else %}—{% endif %} | -- {{ p.status }} - {% if p.since %}{{ p.since }}{% endif %} - | -{{ p.image }} | -
-
- Loglar
-
-
-
- |
-
Henüz deploy edilmiş bir proje yok.
- {% endif %} - - -""" - -CONTAINERS_TEMPLATE = """ - - - -| İsim | Adres | Portlar | Durum | İmaj |
|---|