Files
upstream-corteza/server/auth/assets/templates/sessions.html.tpl
upstream-mirror 7e385fc126
Some checks failed
SonarQube / SonarQube (push) Failing after 5m28s
E2e test on main branch push / server and client test (map[name:admin port:8080]) (push) Failing after 3m33s
Server and lib tests / Library test (js) (push) Failing after 1m36s
Server and lib tests / Library test (vue) (push) Successful in 2m24s
Server and lib tests / Web client test (admin) (push) Successful in 2m52s
Server and lib tests / Web client test (compose) (push) Successful in 3m23s
Server and lib tests / Web client test (discovery) (push) Successful in 2m49s
Server and lib tests / Web client test (one) (push) Successful in 2m52s
Server and lib tests / Web client test (privacy) (push) Successful in 2m44s
Server and lib tests / Web client test (reporter) (push) Successful in 2m56s
Server and lib tests / Web client test (workflow) (push) Successful in 3m0s
Server and lib tests / Server tests (push) Failing after 4m55s
E2e test on main branch push / notify-failure (push) Failing after 9s
Server and lib tests / Send matrix testing notification (push) Successful in 2s
Mark stale issues and pull requests / stale (push) Successful in 40s
snapshot of https://github.com/cortezaproject/corteza.git (2024.9.x, 2026-09-18; blobs > 131072B omitted)
2026-09-18 01:22:23 +05:00

69 lines
2.6 KiB
Smarty

{{ template "inc_header.html.tpl" set . "activeNav" "sessions" }}
<div class="card-body p-0">
<form
method="POST"
action="{{ links.Sessions }}"
>
{{ .csrfField }}
{{- if and .sessions (gt (len .sessions) 1) }}
<div class="mb-0 p-3 border-bottom">
<h4 class="card-title d-inline">{{ tr "sessions.template.title" }}</h4>
<button
data-test-id="button-logout-from-everywhere"
type="submit"
name="delete-all-but-current"
value="true"
class="btn btn-sm btn-danger float-right"
>
{{ tr "sessions.template.delete-all" }}
</button>
</div>
{{ end }}
</form>
<form
method="POST"
action="{{ links.Sessions }}"
class="p-3"
>
{{ .csrfField }}
{{ range .sessions}}
<div class="mb-2 border-bottom">
{{ if .Current }}
<h5>{{ tr "sessions.template.list.current" }}</h5>
{{ end }}
<label class="mb-0 d-block">{{ tr "sessions.template.list.authorized-on" }}</label>
<p class="w-75 d-inline-block">
<time datetime="{{ .CreatedAt }}">{{ .CreatedAt | date "Mon, 02 Jan 2006 15:04 MST" }}</time>
</p>
<label class="mb-0 d-block">{{ tr "sessions.template.list.ip-address" }}</label>
<p class="w-75 d-inline-block">{{ .RemoteAddr }}</p>
{{ if .SameRemoteAddr}}
<span class="badge badge-light float-right">{{ tr "sessions.template.list.same-machine" }}</span>
{{ end }}
<label class="mb-0 d-block">{{ tr "sessions.template.list.expires" }}</label>
<p class="w-75 d-inline-block">
<time datetime="{{ .ExpiresAt }}">{{ .ExpiresAt | date "Mon, 02 Jan 2006 15:04 MST" }}</time>
</p>
{{ if .Expired }}
<span class="badge badge-warning float-right">{{ tr "sessions.template.list.expired" }}</span>
{{ else if eq .ExpiresIn 0 }}
<span class="badge badge-warning float-right">{{ tr "sessions.template.list.today" }}</span>
{{ else if eq .ExpiresIn 1 }}
<span class="badge badge-light float-right">{{ tr "sessions.template.list.tomorrow" }}</span>
{{ else }}
<span class="badge badge-light float-right">{{ tr "sessions.template.list.soon" "days" .ExpiresIn }}</span>
{{ end }}
<label class="mb-0 d-block">{{ tr "sessions.template.list.browser" }}</label>
<p class="small w-75 d-inline-block">
{{ .UserAgent }}
</p>
{{ if .SameUserAgent}}
<span class="badge badge-light float-right">{{ tr "sessions.template.list.same-browser" }}</span>
{{ end }}
</div>
{{ end }}
</form>
</div>
{{ template "inc_footer.html.tpl" . }}