Add target owners and alert notification management.
PostgreSQL Compatibility Matrix / PG14 smoke (push) Successful in 8s
PostgreSQL Compatibility Matrix / PG15 smoke (push) Successful in 7s
PostgreSQL Compatibility Matrix / PG16 smoke (push) Successful in 7s
PostgreSQL Compatibility Matrix / PG17 smoke (push) Successful in 6s
PostgreSQL Compatibility Matrix / PG18 smoke (push) Successful in 6s
PostgreSQL Compatibility Matrix / PG14 smoke (push) Successful in 8s
PostgreSQL Compatibility Matrix / PG15 smoke (push) Successful in 7s
PostgreSQL Compatibility Matrix / PG16 smoke (push) Successful in 7s
PostgreSQL Compatibility Matrix / PG17 smoke (push) Successful in 6s
PostgreSQL Compatibility Matrix / PG18 smoke (push) Successful in 6s
This commit implements the addition of `target_owners` and `alert_notification_events` tables, enabling management of responsible users for targets. Backend and frontend components are updated to allow viewing, assigning, and notifying target owners about critical alerts via email.
This commit is contained in:
1 parent
7acfb498b4
commit
ea26ef4d33
10 files changed
+546
-14
No files matched your search
@@ -10,6 +10,7 @@ class TargetBase(BaseModel):
|
||||
username: str
|
||||
sslmode: str = "prefer"
|
||||
use_pg_stat_statements: bool = True
|
||||
owner_user_ids: list[int] = Field(default_factory=list)
|
||||
tags: dict = Field(default_factory=dict)
|
||||
|
||||
|
||||
@@ -35,6 +36,7 @@ class TargetUpdate(BaseModel):
|
||||
password: str | None = None
|
||||
sslmode: str | None = None
|
||||
use_pg_stat_statements: bool | None = None
|
||||
owner_user_ids: list[int] | None = None
|
||||
tags: dict | None = None
|
||||
|
||||
|
||||
@@ -43,3 +45,13 @@ class TargetOut(TargetBase):
|
||||
created_at: datetime
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
|
||||
class TargetOwnerOut(BaseModel):
|
||||
user_id: int
|
||||
email: str
|
||||
role: str
|
||||
|
||||
|
||||
class TargetOwnersUpdate(BaseModel):
|
||||
user_ids: list[int] = Field(default_factory=list)
|
||||
Reference in new issue
Block a user