carlos / platform Public

Clone
git clone https://amadan.net/carlos/platform

Plain git — no account needed to clone.

Download

Download this file

1{{define "app_overview"}}{{template "top" .}}
2{{if .Flash}}<p class="banner">{{.Flash}}</p>{{end}}
3{{if .FlashErr}}<p class="banner error">{{.FlashErr}}</p>{{end}}
4{{template "appnav" .}}
5{{template "accountreviewbanner" .}}
6{{with .Overview}}
7<section class="pagehead" aria-label="App status">
8 <p><span class="chip chip-health-{{.Verdict}}">{{.VerdictLabel}}</span></p>
9 <h2>{{$.StatusCopy.ObservedLabel}}</h2>
10 {{if not .Deployment.HasRoutes}}
11 <p>{{$.StatusCopy.NoInstances}}</p>
12 {{else if not .Deployment.HasReportable}}
13 <p>—</p>
14 {{else if not .Deployment.HasReportedVersion}}
15 <p>{{$.StatusCopy.NoVersion}}</p>
16 {{else}}
17 <p>{{.Deployment.ReportingText}}</p>
18 <ul>{{range .Deployment.Versions}}<li><code>{{.Version}}</code></li>{{end}}</ul>
19 {{if .Deployment.UnknownCount}}<p>{{$.StatusCopy.Partial}}</p>{{end}}
20 {{end}}
21</section>
22{{end}}
23{{template "flow" .}}
24{{with .Overview}}
25<section class="tiles stat-tiles" aria-label="Vital statistics">
26 {{/* "Running" answers health, not headcount: the count this tile used to
27 show was byte-for-byte the Web addresses count beside it, under a name
28 ("Machines") that also implied one computer per row when several rows
29 routinely share a box. */}}
30 <a class="tile" href="{{$.Nav}}/apps/{{$.AppName}}/instances">
31 <h2>Running</h2>
32 <p class="tile-value">{{if eq .InstanceTotal 0}}—{{else if eq .InstanceExpected 0}}Served{{else if .MetricsUnavailable}}?{{else if eq .InstanceCounted 0}}?{{else}}{{.InstanceReporting}} of {{.InstanceCounted}}{{end}}</p>
33 <p class="tile-detail">{{if eq .InstanceTotal 0}}nothing running yet{{else if eq .InstanceExpected 0}}static — the platform serves it, nothing to run{{else if .MetricsUnavailable}}no data right now{{else if eq .InstanceCounted 0}}no readings for {{.InstanceNoReadings}} copies — stamp their units to see health{{else}}copies reporting{{if .InstanceAsleep}} · {{.InstanceAsleep}} asleep{{end}}{{if .InstanceNoReadings}} · {{.InstanceNoReadings}} no readings{{end}}{{end}}</p>
34 </a>
35 <a class="tile" href="{{$.Nav}}/apps/{{$.AppName}}/instances">
36 <h2>Resources</h2>
37 <p class="tile-value">{{pct .CPUSum}} · {{bytesOrDash .MemSum}}</p>
38 <p class="tile-detail">{{if .CPUSum}}CPU · memory, from the copies responding{{else if .MetricsUnavailable}}no data right now{{else}}no recent data{{end}}</p>
39 </a>
40 {{/* Sizes come from the routes, not the metrics sweep: a sleeping copy's
41 database is still on disk. Hidden for apps that run nothing. */}}
42 {{if or .DBSizeSum .InstanceExpected}}
43 <a class="tile" href="{{$.Nav}}/apps/{{$.AppName}}/instances">
44 <h2>Database</h2>
45 <p class="tile-value">{{bytesOrDash .DBSizeSum}}</p>
46 <p class="tile-detail">{{if .DBSizeSum}}on disk, including copies that are asleep{{else}}no size reported yet{{end}}</p>
47 </a>
48 {{end}}
49 <a class="tile" href="{{$.Nav}}/apps/{{$.AppName}}/settings/domains">
50 <h2>Web addresses</h2>
51 <p class="tile-value">{{.DomainTotal}}</p>
52 <p class="tile-detail">{{if eq .DomainTotal 0}}one appears after your first deploy{{else if .DomainAttention}}<span class="error">{{.DomainAttention}} need{{if eq .DomainAttention 1}}s{{end}} attention</span>{{else}}DNS &amp; certs OK{{end}}</p>
53 </a>
54 <a class="tile" href="{{$.Nav}}/apps/{{$.AppName}}/releases">
55 <h2>{{$.DeploymentsCopy.History}}</h2>
56 <p class="tile-value">{{.ReleaseCount}}{{if .ReleasesCapped}}+{{end}}</p>
57 <p class="tile-detail">{{if .LatestVersion}}latest <code>{{.LatestVersion}}</code>{{else}}nothing shipped yet{{end}}</p>
58 </a>
59</section>
60{{end}}
61{{/* The legacy safety-delay flag: legacy-path-only, exactly as ladder.html
62 skips this same block in pipeline mode. A pipelined app's bake story is
63 its own per-channel windows (spec §3) — this global on/off line would
64 dangle or actively mislead once ladder.html stopped offering the
65 control it points at. */}}
66{{if not .Detail.Pipeline}}
67{{with .Detail.Production}}
68{{if .Err}}
69<p class="small error">Safety delay: this app's setting can't be read right now, so the delay stays on. Repair it on the <a href="{{$.Nav}}/apps/{{$.AppName}}/releases">{{$.DeploymentsCopy.History}}</a> tab.</p>
70{{else if .On}}
71<p class="small">Safety delay: <strong>on</strong> — new versions wait before going live. Managed on <a href="{{$.Nav}}/apps/{{$.AppName}}/releases">{{$.DeploymentsCopy.History}}</a>.</p>
72{{else if .TurningOff}}
73<p class="small">Safety delay: <strong>turning off</strong> — in effect until ~{{fmtTime .EffectiveAt}}.</p>
74{{else}}
75<p class="small">Safety delay: off — new versions go live as soon as they're promoted.{{if .Nudge}} {{icon "triangle-alert"}} This app looks like it's serving real users — consider turning it on, on <a href="{{$.Nav}}/apps/{{$.AppName}}/releases">{{$.DeploymentsCopy.History}}</a>.{{end}}</p>
76{{end}}
77{{end}}
78{{end}}
79{{template "pending" .}}
80{{if .Events}}
81<h2>Recent activity</h2>
82<ul class="feed">
83 {{range .Events}}
84 <li><span class="small" title="{{fmtTime .CreatedAt}}">{{ago .CreatedAt}}</span> {{.Address}} — {{.Detail}}</li>
85 {{end}}
86</ul>
87<p class="small"><a href="{{.Nav}}/apps/{{.AppName}}/activity">All activity</a></p>
88{{end}}
89{{if not .CanPromote}}<p class="small">Deploys are unavailable on this console — it has no signing key.</p>{{end}}
90{{template "bottom" .}}{{end}}
91