tfstated/pkg/webui/html/statesId.html
Julien Dessaux 2bf1731343
All checks were successful
main / main (push) Successful in 1m53s
main / deploy (push) Has been skipped
main / publish (push) Has been skipped
feat(webui): add user account status page
2025-04-13 09:33:11 +02:00

43 lines
961 B
HTML

{{ define "main" }}
<h1>State</h1>
<p>
The state at path
<span class="button">{{ .State.Path }}</span>
has
<span class="button">{{ len .Versions }}</span>
versions and is currently
<span class="button">
{{ if eq .State.Lock nil }}
unlocked
{{ else }}
<span class="tooltip">
locked
<span class="tooltip-text">
{{ .State.Lock }}
</span>
</span>
{{ end }}
</span>
.
</p>
<p>Use this page to inspect the existing versions.</p>
<article>
<table style="width:100%;">
<thead>
<tr>
<th>Created</th>
<th>By</th>
</tr>
</thead>
<tbody>
{{ range .Versions }}
<tr>
<td><a href="/versions/{{ .Id }}">{{ .Created }}</a></td>
<td><a href="/accounts/{{ .AccountId }}">{{ index $.Usernames .AccountId.String }}</a></td>
</tr>
{{ end }}
</tbody>
</table>
</article>
<a href="/states">Go back to the states list</a>
{{ end }}