Part B: infra stacks carry identity — curated Hungarian metadata for cloudflared/traefik/filebrowser (v0.126.0)
- inframeta.go: static display-only map (name/description/Linked) + infraMeta template func; filebrowser is the ONLY Linked stack (files.<domain> Megnyitás on the dashboard row; the stacks card already links via Subdomains) - generic infra icon: embedded /static/infra-logo.svg (Lucide-style server, monochrome) wired through the app-row FallbackIcon slot + the stacks-card onerror chain - dashboard rows + app cards: infra name + description + existing Védett chip - guarded WRONG outcome: no customer link for cloudflared/traefik — render tests count exactly ONE https:// link; red-proven (Linked:true on cloudflared → test FAILS)
This commit is contained in:
@@ -146,7 +146,12 @@
|
||||
|
||||
<div class="stack-list">
|
||||
{{range .Stacks}}
|
||||
{{$im := infraMeta .Name}}
|
||||
{{if $im}}
|
||||
{{template "app_list_row" dict "Slug" .Meta.Slug "Name" $im.DisplayName "Secondary" $im.Description "RowClass" (printf "stack-state-%s" (stateColor .State)) "Href" (appHref .Meta.Slug) "FallbackIcon" "/static/infra-logo.svg"}}
|
||||
{{else}}
|
||||
{{template "app_list_row" dict "Slug" .Meta.Slug "Name" .Meta.DisplayName "Secondary" .Meta.Description "RowClass" (printf "stack-state-%s" (stateColor .State)) "Href" (appHref .Meta.Slug)}}
|
||||
{{end}}
|
||||
<span class="tag tag-{{stateColor .State}}"><span class="dot"></span>{{stateLabel .State}}</span>
|
||||
{{if .Orphaned}}<span class="tag tag-warn">Elavult</span>{{end}}
|
||||
{{$ms := index $.MissingStorage .Name}}{{if $ms}}<span class="tag tag-warn" title="Az alkalmazás adattárolója nem elérhető. Csatlakoztasd újra a meghajtót, vagy helyezd át az adatokat egy másik tárhelyre."><svg class="ico ico-sm"><use href="#i-triangle-alert"/></svg>Hiányzó tárhely: {{$ms}}</span>{{end}}
|
||||
@@ -156,6 +161,12 @@
|
||||
|
||||
{{if .Protected}}
|
||||
<span class="tag"><svg class="ico ico-sm"><use href="#i-lock"/></svg>Védett</span>
|
||||
{{/* Customer link ONLY for Linked infra (filebrowser → files.<domain>) —
|
||||
cloudflared/traefik have no customer UI (guarded by render test). */}}
|
||||
{{if and $im $im.Linked}}
|
||||
{{$subdomain := index $.Subdomains .Name}}
|
||||
{{if $subdomain}}<a href="https://{{$subdomain}}.{{$.Domain}}{{.Meta.OpenPath}}" target="_blank" class="btn btn-sm btn-outline" onclick="event.stopPropagation()">Megnyitás <svg class="ico ico-sm"><use href="#i-external-link"/></svg></a>{{end}}
|
||||
{{end}}
|
||||
{{if isOperational .State}}
|
||||
<button class="btn btn-sm btn-warning" onclick="stackAction(event, '{{.Name}}', 'restart')" title="Újraindítás"><svg class="ico ico-sm"><use href="#i-rotate-cw"/></svg></button>
|
||||
{{end}}
|
||||
|
||||
@@ -18,13 +18,14 @@
|
||||
|
||||
<div class="stack-grid">
|
||||
{{range .Stacks}}
|
||||
{{$im := infraMeta .Name}}
|
||||
<div class="stack-detail-card stack-state-{{stateColor .State}}" data-filter-state="{{filterCategory .State .Deployed}}"{{if .Meta.Slug}} data-href="/apps/{{.Meta.Slug}}"{{end}}>
|
||||
<div class="stack-detail-header">
|
||||
<div class="stack-title-row">
|
||||
<img class="stack-logo-lg" src="{{logoURL .Meta.Slug}}"
|
||||
alt="" onerror="this.onerror=function(){this.style.display='none'};this.src='{{logoPNGURL .Meta.Slug}}'">
|
||||
<img class="stack-logo-lg" src="{{logoURL .Meta.Slug}}" alt=""{{if $im}} data-fallback="/static/infra-logo.svg"{{end}}
|
||||
onerror="if(!this.dataset.step){this.dataset.step='1';this.src='{{logoPNGURL .Meta.Slug}}';}else if(this.dataset.fallback&&this.dataset.step==='1'){this.dataset.step='2';this.src=this.dataset.fallback;}else{this.onerror=null;this.style.visibility='hidden';}">
|
||||
<div>
|
||||
<h3>{{.Meta.DisplayName}}</h3>
|
||||
<h3>{{if $im}}{{$im.DisplayName}}{{else}}{{.Meta.DisplayName}}{{end}}</h3>
|
||||
{{$subdomain := index $.Subdomains .Name}}
|
||||
{{if and $subdomain (or .Deployed .Protected)}}
|
||||
<a class="subdomain-link" href="https://{{$subdomain}}.{{$.Domain}}" target="_blank">
|
||||
@@ -43,7 +44,9 @@
|
||||
{{$nw := index $.NetworkWarnings .Name}}{{if $nw}}<span class="tag tag-warn" title="A hálózati tárhely (NAS) jelenleg nem érhető el. Az alkalmazás fut; az adatok elérése a NAS visszatértével helyreáll."><svg class="ico ico-sm"><use href="#i-triangle-alert"/></svg>Hálózati tárhely nem elérhető: {{$nw}}</span>{{end}}
|
||||
</div>
|
||||
|
||||
{{if .Meta.Description}}
|
||||
{{if $im}}
|
||||
<p class="stack-detail-desc">{{$im.Description}}</p>
|
||||
{{else if .Meta.Description}}
|
||||
<p class="stack-detail-desc">{{.Meta.Description}}</p>
|
||||
{{end}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user