feat: catch-all page for stopped apps, deploy controls, dashboard open button
Stopped/undeployed app subdomains now show a branded page instead of Traefik 404. Deploy settings page gains start/stop/restart controls. Dashboard shows "Megnyitás" button for running apps. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
{{define "catchall"}}
|
||||
<!DOCTYPE html>
|
||||
<html lang="hu">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{if .AppName}}{{.AppName}} — {{end}}felhom.eu</title>
|
||||
<style>
|
||||
*{margin:0;padding:0;box-sizing:border-box}
|
||||
body{background:#0d1117;color:#e6edf3;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;min-height:100vh;display:flex;align-items:center;justify-content:center}
|
||||
.container{text-align:center;max-width:480px;padding:2rem}
|
||||
.logo{width:80px;height:auto;margin-bottom:1.5rem;opacity:.85}
|
||||
.app-name{font-size:1.5rem;font-weight:600;margin-bottom:.5rem}
|
||||
.status-text{color:#8b949e;font-size:1.1rem;margin-bottom:2rem;line-height:1.5}
|
||||
.status-icon{font-size:2.5rem;margin-bottom:1rem}
|
||||
.status-stopped .status-icon{color:#da3633}
|
||||
.status-not_deployed .status-icon{color:#8b949e}
|
||||
.status-unknown .status-icon{color:#8b949e}
|
||||
.btn{display:inline-block;padding:.6rem 1.2rem;border-radius:6px;text-decoration:none;font-size:.9rem;font-weight:500;transition:all .2s}
|
||||
.btn-primary{background:#0088cc;color:#fff}
|
||||
.btn-primary:hover{background:#00aaff}
|
||||
.btn-outline{border:1px solid #30363d;color:#8b949e;margin-left:.5rem}
|
||||
.btn-outline:hover{border-color:#8b949e;color:#e6edf3}
|
||||
.host-label{color:#6e7681;font-size:.85rem;margin-top:2rem}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container status-{{.Status}}">
|
||||
<img class="logo" src="{{.ControllerURL}}/static/felhom-logo.svg" alt="felhom.eu">
|
||||
<div class="status-icon">
|
||||
{{if eq .Status "stopped"}}⏸{{else if eq .Status "not_deployed"}}📦{{else}}🔍{{end}}
|
||||
</div>
|
||||
{{if .AppName}}<div class="app-name">{{.AppName}}</div>{{end}}
|
||||
<div class="status-text">{{.StatusText}}</div>
|
||||
<div>
|
||||
{{if .AppSlug}}
|
||||
<a class="btn btn-primary" href="{{.ControllerURL}}/apps/{{.AppSlug}}">Alkalmazás kezelése</a>
|
||||
{{else}}
|
||||
<a class="btn btn-primary" href="{{.ControllerURL}}/stacks">Alkalmazások</a>
|
||||
{{end}}
|
||||
<a class="btn btn-outline" href="{{.ControllerURL}}">Vezérlőpult</a>
|
||||
</div>
|
||||
<div class="host-label">{{.Host}}</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
{{end}}
|
||||
@@ -174,6 +174,8 @@
|
||||
<a href="/stacks/{{.Name}}/deploy" class="btn btn-sm btn-primary" onclick="return checkBeforeDeploy(event, '{{.Name}}')">Telepítés</a>
|
||||
{{else}}
|
||||
{{if isOperational .State}}
|
||||
{{$subdomain := index $.Subdomains .Name}}
|
||||
{{if $subdomain}}<a href="https://{{$subdomain}}.{{$.Domain}}" target="_blank" class="btn btn-sm btn-outline" onclick="event.stopPropagation()">Megnyitás ↗</a>{{end}}
|
||||
<button class="btn btn-sm btn-warning" onclick="stackAction(event, '{{.Name}}', 'restart')">↻</button>
|
||||
<button class="btn btn-sm btn-danger" onclick="stackAction(event, '{{.Name}}', 'stop')">■</button>
|
||||
{{else}}
|
||||
|
||||
@@ -6,7 +6,20 @@
|
||||
<a href="/stacks" class="btn btn-sm btn-outline">← Vissza</a>
|
||||
<h2>{{.Meta.DisplayName}} — {{if .AlreadyDeployed}}Beállítások{{else}}Telepítés{{end}}</h2>
|
||||
</div>
|
||||
<a href="/apps/{{.Meta.Slug}}" class="btn btn-sm btn-outline">ℹ️ Részletek</a>
|
||||
<div style="display:flex;align-items:center;gap:.5rem">
|
||||
{{if .AlreadyDeployed}}
|
||||
{{if isOperational .Stack.State}}
|
||||
<button class="btn btn-sm btn-warning" onclick="stackAction(event, '{{.Stack.Name}}', 'restart')">Újraindítás</button>
|
||||
<button class="btn btn-sm btn-danger" onclick="stackAction(event, '{{.Stack.Name}}', 'stop')">Leállítás</button>
|
||||
{{else}}
|
||||
<button class="btn btn-sm btn-success" onclick="stackAction(event, '{{.Stack.Name}}', 'start')">Indítás</button>
|
||||
{{end}}
|
||||
{{if and (isOperational .Stack.State) .EffectiveSubdomain}}
|
||||
<a href="https://{{.EffectiveSubdomain}}.{{.Domain}}" target="_blank" class="btn btn-sm btn-outline">Megnyitás ↗</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
<a href="/apps/{{.Meta.Slug}}" class="btn btn-sm btn-outline">ℹ️ Részletek</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="deploy-container">
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<div>
|
||||
<h3>{{.Meta.DisplayName}}</h3>
|
||||
{{$subdomain := index $.Subdomains .Name}}
|
||||
{{if $subdomain}}
|
||||
{{if and $subdomain .Deployed}}
|
||||
<a class="subdomain-link" href="https://{{$subdomain}}.{{$.Domain}}" target="_blank">
|
||||
{{$subdomain}}.{{$.Domain}} ↗
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user