Некоторые проверки не удались
CI / test (push) Failing after 6s
Docker / Build and publish worker image (push) Failing after 8s
Add an internal/compose package that discovers Compose projects via `docker compose ls` + `docker ps` labels (grouped by com.docker.compose.project/service) and enriches each container with `docker inspect` ports/mounts and Traefik router labels. Management runs `docker compose` in each project's working directory for up/down/stop/restart/pull plus per-service variants and log tails. Wire it into the webapp: a 60s ComposeRefresher (constructed in New, started in Start, stopped in Close), a /compose list + detail + logs HTML surface, and /web/api/compose/* JSON endpoints (list, detail, logs, project/service lifecycle). Browser lifecycle POSTs are session+CSRF protected; the /web/api/* variants accept HTTP basic auth. WORKER_COMPOSE_ENABLED defaults on (false to disable). Tests cover discovery parsing/grouping/traefik/summary, the action allowlists, and the full handler surface (list/detail/logs HTML+API, CSRF enforcement, disabled/unknown-action rejection, audit writes, success+failure exec paths) via a stub Docker binary.
41 строка
1.2 KiB
HTML
41 строка
1.2 KiB
HTML
{{define "layout"}}<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta name="referrer" content="no-referrer">
|
|
<title>{{.Title}}</title>
|
|
<link rel="stylesheet" href="/static/style.css">
|
|
</head>
|
|
<body>
|
|
<header class="topbar">
|
|
<div class="brand">RSMon worker</div>
|
|
{{if not .IsLogin}}
|
|
<nav>
|
|
<a href="/overview">Overview</a>
|
|
<a href="/apps">Apps</a>
|
|
<a href="/compose">Compose</a>
|
|
<a href="/checks">Checks</a>
|
|
<a href="/notifications">Notifications</a>
|
|
<a href="/logs">Logs</a>
|
|
<a href="/status">Status</a>
|
|
<a href="/settings">Settings</a>
|
|
<a href="/updates">Updates</a>
|
|
</nav>
|
|
<div class="who">
|
|
<form action="/web/logout" method="post" class="logout-form">
|
|
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
|
|
<button type="submit" class="link">Logout</button>
|
|
</form>
|
|
</div>
|
|
{{end}}
|
|
</header>
|
|
<main>
|
|
{{template "body" .}}
|
|
</main>
|
|
<footer class="footer">
|
|
<span>RSMon worker v{{.Version}} · built {{.BuildDate}}</span>
|
|
</footer>
|
|
</body>
|
|
</html>{{end}}
|