diff --git a/web/src/admin/events/EventListPage.ts b/web/src/admin/events/EventListPage.ts index 14c4d3fd8..3e8eea4e6 100644 --- a/web/src/admin/events/EventListPage.ts +++ b/web/src/admin/events/EventListPage.ts @@ -3,6 +3,7 @@ import { ActionToLabel } from "@goauthentik/admin/events/utils"; import { DEFAULT_CONFIG } from "@goauthentik/common/api/config"; import { EventWithContext } from "@goauthentik/common/events"; import { uiConfig } from "@goauthentik/common/ui/config"; +import { KeyUnknown } from "@goauthentik/elements/forms/Form"; import { PaginatedResponse } from "@goauthentik/elements/table/Table"; import { TableColumn } from "@goauthentik/elements/table/Table"; import { TablePage } from "@goauthentik/elements/table/TablePage"; @@ -55,6 +56,10 @@ export class EventListPage extends TablePage { } row(item: EventWithContext): TemplateResult[] { + let geo: KeyUnknown | undefined = undefined; + if (Object.hasOwn(item.context, "geo")) { + geo = item.context.geo as KeyUnknown; + } return [ html`
${ActionToLabel(item.action)}
${item.app}`, @@ -67,7 +72,8 @@ export class EventListPage extends TablePage { : html``}` : html`-`, html`${item.created?.toLocaleString()}`, - html`${item.clientIp || t`-`}`, + html`
${item.clientIp || t`-`}
+ ${geo ? html`${geo.city}, ${geo.country} ` : html``}`, html`${item.tenant?.name || t`-`}`, html` diff --git a/web/src/flow/stages/base.ts b/web/src/flow/stages/base.ts index 07998299d..d9e3865ea 100644 --- a/web/src/flow/stages/base.ts +++ b/web/src/flow/stages/base.ts @@ -1,4 +1,5 @@ import { AKElement } from "@goauthentik/elements/Base"; +import { KeyUnknown } from "@goauthentik/elements/forms/Form"; import { TemplateResult, html } from "lit"; import { property } from "lit/decorators.js"; @@ -25,10 +26,6 @@ export function readFileAsync(file: Blob) { }); } -export type KeyUnknown = { - [key: string]: unknown; -}; - export class BaseStage extends AKElement { host!: StageHost;