feat: add user activity report page - #878
Merged
Merged
Conversation
Add EE-only user activity dashboard with KPI cards, trend charts, module and hourly distribution, user ranking table, API client, routes, and QuickActions entry.
Default stat date to today, pad chart axes, fill 24-hour slots, and show uid fallback in user ranking when name is missing.
Restrict page to global admins, improve chart layout and 24-hour axis, hide pagination when ranking fits on a single page.
Align the table label with backend logic that excludes session and bootstrap modules when picking each user's primary module.
Import ResponseCode, table helpers and utils from @actiontech/dms-kit after they moved out of @actiontech/shared, update QuickActions assertions for the added shortcut, and pin the system time in the page test so the default "today" stat date no longer drifts the snapshot.
The new quick action shortcut renders in both CE and EE side menus, so the affected snapshots gain the entry markup.
The report route already lives inside an ee conditional block, so without the same guard the CE build renders a shortcut that navigates to a missing route.
4 tasks
Coverage report
Test suite run success3750 tests passing in 821 suites. Report generated by 🧪jest coverage report action from 32d13bf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
用户活跃度报表前端页面,与后端 actiontech/dms#664(CE 契约)、actiontech/dms-ee#960(EE 实现)配套。
packages/base/src/page/UserActivity/:报表页面,含概览卡片、日趋势、模块分布、时段分布四张图与用户排行表;默认查询当天,图表面板高度受约束,不会随数据量把页面撑开。router.base.tsx、QuickActions、permissions.ts/permissionManifest.ts、中英文文案。packages/shared/lib/api/base/service/UserActivity/:接口客户端与类型定义;配套 mock 数据供测试使用。页面与菜单入口都用
// #if [ee]做了构建期门禁,社区版构建里不会出现入口,也不会打进路由。Problem
该页面此前只存在于 CSVW 定制分支(
dms-ui-ee的csvw-4.2505.x),未进入主干。按前端 CE/EE 规范,含条件编译的共用源文件仍走 CE 仓库交付,合入main后经 Sync 进入dms-ui-ee的main-ee,因此不再单独提dms-ui-ee功能 PR。Test plan
pnpm checker(ts-check / eslint / stylelint / prettier)全部通过sh ./scripts/jest/run-ci.sh <shard> 4四个分片全部通过,快照无漂移