The people running the multi-tenant service (SUPERMARKET_PLATFORM_ADMINS, with two-factor sign-in) see every team at /platform with its size, people and what failed lately, and can suspend or restore a team, resend its invitations and release its domain. They don't see a team's data unless they view as it: with a reason, for at most an hour, read-only, recorded in the team's own audit log. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
31 lines
3.0 KiB
HTML
31 lines
3.0 KiB
HTML
{{define "content"}}{{with .Data}}
|
|
<div class="page-head"><h1>Platform</h1>
|
|
<p class="lede">The teams on this Supermarket, and how they're doing. You don't see a team's data: to look, <em>view as</em> it, with a reason, for a while; it's recorded in the team's own log.</p></div>
|
|
{{if .Need2FA}}
|
|
<section class="card warn"><p>The platform's admin pages need two-factor sign-in. <a href="/settings/account/two-factor">Turn it on</a>, then come back.</p></section>
|
|
{{else}}
|
|
<section class="card">
|
|
<table class="list">
|
|
<thead><tr><th>Team</th><th>Domain</th><th>People</th><th class="num">Data</th><th>Last week</th><th>Last active</th><th></th></tr></thead>
|
|
<tbody>{{range .Teams}}<tr>
|
|
<td><strong>{{.Name}}</strong> {{if ne .Status "active"}}<span class="pill warn">{{.Status}}</span>{{end}}<br><span class="muted small">since {{.Created.Local.Format "2 Jan 2006"}}</span>{{with .Err}}<br><span class="error-text small">{{.}}</span>{{end}}</td>
|
|
<td>{{.Domain}} {{if .Proved}}<span class="pill ok">proved</span>{{else}}<span class="pill">not proved</span>{{end}}</td>
|
|
<td>{{.Members}}{{if .Invited}} <span class="muted small">({{.Invited}} invited)</span>{{end}}</td>
|
|
<td class="num">{{bytes .Bytes}}</td>
|
|
<td>{{if or .FailedPosts .FailedEmails .FailedRequests}}<span class="error-text small">{{with .FailedPosts}}{{.}} posts failed. {{end}}{{with .FailedEmails}}{{.}} emails failed. {{end}}{{with .FailedRequests}}{{.}} agent requests failed.{{end}}</span>{{else}}<span class="muted small">nothing failed</span>{{end}}</td>
|
|
<td>{{ago .LastActivity}}</td>
|
|
<td><details><summary class="small">Act</summary>
|
|
<div class="actions">
|
|
{{if eq .Status "active"}}<form method="post" action="/platform/teams/{{.ID}}/suspend" data-confirm="Suspend {{.Name}}? Its people can't use it, and its work waits."><input name="reason" placeholder="Why" class="small" required><button type="submit" class="secondary small danger">Suspend</button></form>
|
|
{{else}}<form method="post" action="/platform/teams/{{.ID}}/restore"><button type="submit" class="secondary small">Restore</button></form>{{end}}
|
|
{{if .Invited}}<form method="post" action="/platform/teams/{{.ID}}/resend"><button type="submit" class="secondary small">Resend invitations</button></form>{{end}}
|
|
{{if .Proved}}<form method="post" action="/platform/teams/{{.ID}}/release-domain" data-confirm="Release {{.Domain}}? Another team could then prove it."><button type="submit" class="secondary small">Release the domain</button></form>{{end}}
|
|
<form method="post" action="/platform/teams/{{.ID}}/view-as"><input name="reason" placeholder="Why you need to look" required class="small"> <input name="minutes" type="number" min="1" max="{{$.Data.MaxView}}" value="15" class="tiny"> min <button type="submit" class="secondary small">View as</button></form>
|
|
</div>
|
|
</details></td>
|
|
</tr>{{else}}<tr><td colspan="7" class="muted">No teams yet.</td></tr>{{end}}</tbody>
|
|
</table>
|
|
</section>
|
|
{{end}}
|
|
{{end}}{{end}}
|