Platform / IntegrationTrung tâm thông báo
Notification Event Log
Log từng sự kiện đã trigger Notification Task: event_id, status, job_count, date_received. Dùng để kiểm tra quá trình gửi.
Notification Event Log ghi lịch sử event đã đẩy vào engine. Mỗi row tương ứng 1 sự kiện trigger task; chứa số job (số message đã sinh) và status tổng hợp.
Vị trí menu admin
Route-only:
- List:
/notificationeventlog. - Detail:
/notificationeventlog/detail/id/{id}.
Component: features/notificationeventlog/list/NotificationEventLogList.tsx, detail/NotificationEventLogDetail.tsx.
Giao diện danh sách
<PageDataTable> cột:
| Cột | Key | Width | Ghi chú |
|---|---|---|---|
| ID | id | 80 | center. |
| Event ID | event_id | flex | <Link to="/notificationeventlog/detail/id/{id}"> - mã định danh event (do backend sinh). Trống = —. |
| Event code | event_code | 120 | Mã event ràng buộc task. |
| Job count | job_count | 72 | center - số message engine đã enqueue cho event này. |
| Trạng thái | status | 120 | Tag màu - status tổng hợp (pending/processing/completed/failed). |
| Ngày nhận | date_received | 130 | Format HH:mm, DD/MM/YYYY. |
| Actions | fixed right | 120 | Nút Chi tiết + nút Xoá (Popconfirm). |
Filter: NotificationEventLogListFilter - keyword/event_code/status/date range.
Detail page /notificationeventlog/detail/id/{id}
NotificationEventLogDetail hiển thị:
- Thông tin event (id, code, payload, source).
- List job đã enqueue, mỗi job có channel, recipient owner, template, status, error nếu fail.
- Timeline xử lý (received → enqueued → sent → delivered/failed).
Thao tác chính
- Kiểm tra task không gửi: vào list, lọc theo event_code và date range → tìm event đã trigger, mở detail xem job list.
- Xoá event log cũ: nhấn icon delete trên row, confirm popup. Backend gọi
deleteItem.
Các lối đi từ trang
- Notification Task - thay đổi task khi log fail.
- Notification Channel - sửa config khi channel sai.
Lưu ý - Lỗi thường gặp
- Event log trống dù task Enabled: kiểm tra event_code có thực sự được trigger không. Backend phải emit event tương ứng - nếu emit trật, log không có.
- Status pending mãi: worker enqueue chưa pickup, kiểm tra Cron Scheduler có job dispatch enabled.
- Status failed nhưng không có error: dữ liệu cũ - mở detail xem job-level error. Backend log mới có error gốc.
- Xoá log: thao tác xoá làm mất dữ liệu kiểm tra lịch sử gửi; chỉ nên thực hiện khi đã chắc chắn log không còn cần tra cứu.
Ai được xem và chỉnh?
- Mở list/detail: tài khoản đã đăng nhập.
- Xoá event log: phụ thuộc quyền thao tác do backend cấu hình cho tenant.