Skip to content

feat(TAP-13052): §4.1 navigation, alarm events and notification records - #658

Merged
feynmx merged 15 commits into
developfrom
hardy/TAP-13052-6ad1cd94
Oct 27, 2026
Merged

feynmx merged 15 commits into
developfrom
hardy/TAP-13052-6ad1cd94

Conversation

@weiliang110100

@weiliang110100 weiliang110100 commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

TAP-13052 P0:§4.1 导航、告警事件与通知记录

Jira:https://tapdata.atlassian.net/browse/TAP-13052

变更

  • 主菜单:运维中心 › 告警事件;消息与通知 › 通知记录 / 通知设置;系统管理 › 操作审计。旧 /notification/* 路由重定向(保留原路由名),移除 NotifyLayout。
  • 铃铛弹层:未读站内告警通知(最多 10 条,角标 99+),管理员许可证提醒,点击即标为已读并打开详情,全部标为已读前展示影响条数;挂载及每次 WebSocket 重连后订阅通知推送,新告警无需刷新即更新角标。
  • 告警事件页:统计卡、URL 同步筛选、发生次数、对象类型、通知结果、详情抽屉,关闭说明“不代表问题已恢复”。
  • 通知记录页:按告警聚合、全部/未读/发送失败页签、筛选、批次与收件人投递明细、单条/批量已读未读。
  • 通知渠道只保留站内消息与邮件(企业版告警通知渠道;短信、微信仅云版,暂不考虑)。
  • 通知设置页:隐藏已下线的站内通知开关,提示前往告警设置。
  • 关联告警事件已被清除(历史版本任务重新运行时删除)的通知:列表提示,详情禁用「查看告警事件」并说明原因;告警事件详情显示“任务重新运行时归档”;两个详情抽屉的告警类型显示为可读名称。
  • 文案:渠道「站内」改为「站内消息」,「投递结果/状态/明细」改为「发送结果/状态/明细」,结果标签悬停说明“成功数/收件人数”。
  • 权限:告警事件、通知记录、操作审计路由配置 v2_alarm_event / v2_notification_record / v2_audit_log(菜单与路由守卫自动生效);关闭按钮需要 v2_alarm_event_ack_close 并改调 POST /api/alarms/close;铃铛「查看全部」、详情中跳转告警事件/通知记录按目标权限显示;他人通知不显示未读、不可标记,详情提示阅读状态不受影响。
  • 角色权限页(固定模块树)增加「运维中心 › 告警事件(功能权限:关闭)」「消息与通知 › 通知记录」,「系统管理」下增加「操作审计」。
  • 中文简体/繁体/英文文案。

验证

  • 已合入最新 develop;pnpm build:daas 通过;改动文件 eslint 无新增问题(i18n 文件中 default export 与重复键为既有问题)。
  • 手工验收(配合 tapdata、tapdata-enterprise 同名分支):138 个步骤中失败的 5 个已修复并回归通过——铃铛角标数字(el-badge 改用 value)、实时推送订阅、打开通知详情自动标为已读(markReadOnOpen 默认为 true,未传的布尔 prop 会被转换为 false)。

🤖 Generated with Claude Code

- Main menu: Operations > Alarm Events, Messages & Notifications >
  Notification Records / Settings, System > Operation Audit; old
  /notification/* routes redirect, NotifyLayout removed
- Bell popover: unread in-app alarm notifications (99+), license reminder
  for admins, open-to-read, mark-all-read with scope confirmation
- Alarm events: stats cards, URL-synced filters, occurrence count, object
  type, delivery result, detail drawer, close hint
- Notification records: aggregated by alarm event, All/Unread/Failed tabs,
  filters, batch/recipient delivery details, single/batch read & unread
- Notification setting: in-app toggles retired, link to alarm settings
- zh-CN / zh-TW / en texts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@weiliang110100
weiliang110100 requested a review from feynmx October 16, 2026 09:04
weiliang110100 and others added 9 commits October 20, 2026 09:16
…cation views

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ation views

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rds and operation audit

Routes carry v2_alarm_event / v2_notification_record / v2_audit_log_list,
the close action needs v2_alarm_event_ack_close and uses /api/alarms/close,
cross-module links follow the target permission, and other users'
notifications show no unread state and cannot be marked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n role permissions

The role editor renders a fixed module tree, so add v2_ops-center
(alarm events with the close button), v2_message-center (notification
records) and v2_audit_log under system management.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The enterprise edition sends alarm notifications through in-app messages
and email only; SMS and WeChat are cloud-only, so drop them from the
channel filter and labels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@weiliang110100
weiliang110100 marked this pull request as ready for review October 21, 2026 02:26
@weiliang110100
weiliang110100 marked this pull request as draft October 21, 2026 03:40
weiliang110100 and others added 4 commits October 21, 2026 11:42
…and mark read on open

- el-badge uses value; model-value is ignored by Element Plus 2.14
- register the notification subscription on connect and every reconnect
- default markReadOnOpen to true; an omitted boolean prop is cast to false

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@weiliang110100
weiliang110100 marked this pull request as ready for review October 22, 2026 06:21
]
},
async handleClose(id) {
const ids = this.multipleSelection?.length

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] 单行关闭应优先使用当前行的 ID。先勾选告警 A,再点击未勾选告警 B 行的「关闭」时,这里会忽略传入的 B,实际关闭 A;确认弹窗也没有显示目标,用户会误以为关闭了 B。请区分批量操作与单行操作,并在传入 ID 时只关闭该行。

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已在 7cb21e3 中修复:顶部批量关闭按钮改为 @click="handleClose()",handleClose(id) 优先判断传入的单行 ID,有传入时只关闭当前行,未传入时才使用勾选列表。

},
data() {
const query = { ...this.$route.query }
if (!query.start && !query.end) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] 从告警详情的「查看通知记录」跳转时只带了 alarmEventId,这里仍自动加上最近 7 天的范围。该告警的通知若早于 7 天,目标列表就会为空或缺失历史记录,用户无法看到该告警的完整通知。针对 alarmEventId 深链接请避免自动添加时间范围,或显式传入覆盖相关历史的范围。

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已在 7cb21e3 中修复:当 URL 携带 alarmEventId 深链接时不自动添加最近 7 天的默认时间范围。


function goTask() {
if (!detail.value?.taskId) return
router.push({ name: 'TaskMonitor', params: { id: detail.value.taskId } })

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] 迁移任务的通知也会走到这里,但跳转被固定为 TaskMonitor(/dataflow/monitor),而告警详情对 migrate 使用 MigrationMonitor(/migrate/monitor)。因此从迁移任务通知进入时会落到错误的监控路由。请取得任务的 syncType,并与告警详情一致地选择对应路由。

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已在 7cb21e3 中修复:goTask() 优先读取详情的 syncType,若无则通过 getTaskById 获取任务 syncType,与告警详情一致地按 syncType === 'migrate' 跳转 MigrationMonitor 或 TaskMonitor。

<FilterBar
v-model:value="searchParams"
:items="filterItems"
@fetch="table.fetch(1)"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] 手动修改筛选条件时这里只刷新表格,没有将 searchParams 写入路由。TAP-13052 §6.3 要求筛选写入 URL,以便刷新保留和复制分享;例如选择状态或输入关键字后刷新,条件就会丢失,复制链接也无法重现结果。请在筛选变更时同步 query;通知记录页的 FilterBar 也存在相同问题。

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已在 7cb21e3 中修复:告警事件页与通知记录页的 FilterBar 均绑定 @search="syncQuery" 与 @fetch="syncQuery",在筛选变更及清除时将 searchParams(含通知记录页的 tab 与 alarmEventId)同步写入路由 query,并在路由变更时重置已清除的筛选项。

@weiliang110100
weiliang110100 requested a review from feynmx October 27, 2026 04:26
@feynmx
feynmx merged commit a754f1d into develop Oct 27, 2026
3 checks passed
@feynmx
feynmx deleted the hardy/TAP-13052-6ad1cd94 branch October 27, 2026 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants