events: add option to send notifications to event user (#15083)
* events: add option to send notifications to event user Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix tests Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
@ -3,6 +3,7 @@ import "@goauthentik/admin/policies/BoundPoliciesList";
|
||||
import "@goauthentik/admin/rbac/ObjectPermissionModal";
|
||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||
import { severityToLabel } from "@goauthentik/common/labels";
|
||||
import "@goauthentik/components/ak-status-label";
|
||||
import "@goauthentik/elements/buttons/SpinnerButton";
|
||||
import "@goauthentik/elements/forms/DeleteBulkForm";
|
||||
import "@goauthentik/elements/forms/ModalForm";
|
||||
@ -51,6 +52,7 @@ export class RuleListPage extends TablePage<NotificationRule> {
|
||||
|
||||
columns(): TableColumn[] {
|
||||
return [
|
||||
new TableColumn(msg("Enabled")),
|
||||
new TableColumn(msg("Name"), "name"),
|
||||
new TableColumn(msg("Severity"), "severity"),
|
||||
new TableColumn(msg("Sent to group"), "group"),
|
||||
@ -81,12 +83,16 @@ export class RuleListPage extends TablePage<NotificationRule> {
|
||||
}
|
||||
|
||||
row(item: NotificationRule): TemplateResult[] {
|
||||
const enabled = !!item.destinationGroupObj || item.destinationEventUser;
|
||||
return [
|
||||
html`<ak-status-label type="warning" ?good=${enabled}></ak-status-label>`,
|
||||
html`${item.name}`,
|
||||
html`${severityToLabel(item.severity)}`,
|
||||
html`${item.groupObj
|
||||
? html`<a href="#/identity/groups/${item.groupObj.pk}">${item.groupObj.name}</a>`
|
||||
: msg("None (rule disabled)")}`,
|
||||
html`${item.destinationGroupObj
|
||||
? html`<a href="#/identity/groups/${item.destinationGroupObj.pk}"
|
||||
>${item.destinationGroupObj.name}</a
|
||||
>`
|
||||
: msg("-")}`,
|
||||
html`<ak-forms-modal>
|
||||
<span slot="submit"> ${msg("Update")} </span>
|
||||
<span slot="header"> ${msg("Update Notification Rule")} </span>
|
||||
|
Reference in New Issue
Block a user