stages/identification: auto-redirect to source when no user fields are selected (#5583)
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
@ -5,7 +5,7 @@ import { t } from "@lingui/macro";
|
||||
|
||||
import { TemplateResult, html } from "lit";
|
||||
|
||||
import { EventActions } from "@goauthentik/api";
|
||||
import { EventActions, SeverityEnum } from "@goauthentik/api";
|
||||
|
||||
export function EventGeo(event: EventWithContext): TemplateResult {
|
||||
let geo: KeyUnknown | undefined = undefined;
|
||||
@ -78,3 +78,16 @@ export function ActionToLabel(action?: EventActions): string {
|
||||
return action;
|
||||
}
|
||||
}
|
||||
|
||||
export function SeverityToLabel(severity: SeverityEnum | null | undefined): string {
|
||||
if (!severity) return t`Unknown severity`;
|
||||
switch (severity) {
|
||||
case SeverityEnum.Alert:
|
||||
return t`Alert`;
|
||||
case SeverityEnum.Notice:
|
||||
return t`Notice`;
|
||||
case SeverityEnum.Warning:
|
||||
return t`Warning`;
|
||||
}
|
||||
return t`Unknown severity`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user