feat(notifications): deep-link bell rows to source stack and container logs (#692)

Add stack_name and container_name columns to notification_history so bell
rows can act as jump points. Producers (AutoHeal, Docker events) pass the
container context through dispatchAlert; the panel renders routable rows
as buttons that load the target stack and, when a container name is
present, open its logs modal. Non-structural notifications stay as
passive display rows.
This commit is contained in:
Anso
2026-04-19 03:56:59 -04:00
committed by GitHub
parent 7c01906e70
commit ed2a16af79
9 changed files with 165 additions and 28 deletions
+9 -2
View File
@@ -39,12 +39,19 @@ export class NotificationService {
* - agents table (all tiers): global fallback channels used when no
* notification_routes match or when no stackName is provided.
*/
public async dispatchAlert(level: 'info' | 'warning' | 'error', message: string, stackName?: string) {
public async dispatchAlert(
level: 'info' | 'warning' | 'error',
message: string,
stackName?: string,
containerName?: string,
) {
// 1. Log to history and get the full inserted record (with id)
const notification = this.dbService.addNotificationHistory({
level,
message,
timestamp: Date.now()
timestamp: Date.now(),
stack_name: stackName,
container_name: containerName,
});
// 2. Push to connected browser clients via WebSocket