web/admin: fix geo display with no city

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens Langhammer 2023-02-13 10:39:29 +01:00
parent 6a25cf6c5d
commit eb8181daa0
No known key found for this signature in database
2 changed files with 4 additions and 2 deletions

View File

@ -133,7 +133,9 @@ export class EventInfoPage extends AKElement {
<div class="pf-c-description-list__text"> <div class="pf-c-description-list__text">
<div>${this.event.clientIp || t`-`}</div> <div>${this.event.clientIp || t`-`}</div>
${geo ${geo
? html`<small>${geo.city}, ${geo.country}</small> ` ? html`<small
>${[geo.city, geo.country].join(", ")}</small
>`
: html``} : html``}
</div> </div>
</dd> </dd>

View File

@ -77,7 +77,7 @@ export class EventListPage extends TablePage<Event> {
: html`-`, : html`-`,
html`<span>${item.created?.toLocaleString()}</span>`, html`<span>${item.created?.toLocaleString()}</span>`,
html`<div>${item.clientIp || t`-`}</div> html`<div>${item.clientIp || t`-`}</div>
${geo ? html`<small>${geo.city}, ${geo.country}</small> ` : html``}`, ${geo ? html`<small>${[geo.city, geo.country].join(", ")}</small>` : html``}`,
html`<span>${item.tenant?.name || t`-`}</span>`, html`<span>${item.tenant?.name || t`-`}</span>`,
html`<a href="#/events/log/${item.pk}"> html`<a href="#/events/log/${item.pk}">
<i class="fas fa-share-square"></i> <i class="fas fa-share-square"></i>