{{define "stacks"}} {{template "layout_start" .}}
{{range .Stacks}} {{$im := infraMeta .Name}}

{{if $im}}{{$im.DisplayName}}{{else}}{{.Meta.DisplayName}}{{end}}

{{$subdomain := index $.Subdomains .Name}} {{if and $subdomain (or .Deployed .Protected)}} {{$subdomain}}.{{$.Domain}} ↗ {{if and .Deployed (routeUnpublished .State)}} {{T "stacks.url_nem_elerheto_utvonal_nincs"}} {{end}} {{end}}
{{stateLabel .State}} {{if .Orphaned}}{{T "common.elavult"}}{{end}} {{template "meta_badge" (lifecycleBadge .Meta)}} {{template "meta_badge" (updateBadge .)}} {{$ms := index $.MissingStorage .Name}}{{if $ms}}{{T "stacks.hianyzo_tarhely"}}{{end}} {{$ns := index $.NetworkStubs .Name}}{{if $ns}}{{T "stacks.halozati_tarhely_hibas_az_alkalmazas"}}{{end}} {{$nw := index $.NetworkWarnings .Name}}{{if $nw}}{{T "stacks.halozati_tarhely_nem_elerheto"}}{{end}}
{{if $im}}

{{$im.Description}}

{{else if .Meta.Description}}

{{.Meta.Description}}

{{end}}
{{if .Meta.Resources.MemRequest}}~{{.Meta.Resources.MemRequest}}{{end}} {{if .Meta.Resources.PiCompatible}}{{T "common.pi_kompatibilis"}}{{end}} {{if .Meta.Resources.NeedsHDD}}{{T "common.hdd_szukseges"}}{{end}} {{if .Meta.Resources.HungarianUI}}{{T "common.magyar_felulet"}}{{end}} {{if and .Deployed (index $.StorageLabels .Name)}}{{index $.StorageLabels .Name}}{{end}}
{{if .Containers}}
{{range .Containers}}
{{.Name}} {{.Status}}
{{end}}
{{end}}
{{if .Protected}} {{T "stacks.vedett_rendszerkomponens"}} {{if isOperational .State}} {{end}} {{if .Meta.Slug}} {{T "stacks.reszletek"}} {{end}} {{else if not .Deployed}} {{/* The endpoint refuses a non-installable template server-side; hiding the button here keeps the two consistent rather than offering an action that will fail. */}} {{if canInstall .Meta}}{{T "stacks.telepites"}}{{end}} {{T "stacks.reszletek"}} {{else}} {{/* Slice 4 (v0.238.0): the UPDATING and HELD checks come BEFORE isOperational. That predicate counts `restarting` as operational, which is how the 2026-09-01 spike saw a green Frissítés beside a crash loop. An app being updated offers no lifecycle button; a held app offers none that would start it, only the way back. */}} {{if .Updating}} {{.UpdatePhaseLabel}} {{else if .HoldReason}}
{{.HoldReason}} {{T "stacks.mentesek"}}
{{if not .Orphaned}}{{end}} {{else if isOperational .State}} {{if .UpdateError}}
{{.UpdateError}}
{{end}} {{if not .Orphaned}}{{end}} {{else}} {{if .UpdateError}}
{{.UpdateError}}
{{end}} {{if not .Orphaned}}{{end}} {{end}} {{T "stacks.naplok"}} {{if not .Orphaned}}{{T "stacks.reszletek"}}{{end}} {{if .Orphaned}}{{end}} {{end}}
{{end}}
{{template "layout_end" .}} {{end}}