整理文件
This commit is contained in:
@@ -1,25 +1,25 @@
|
||||
# User Online Devices Plugin
|
||||
# UserOnlineDevices
|
||||
|
||||
This plugin provides online IP monitoring for Xboard users and administrators.
|
||||
An admin-only Xboard plugin that shows all users' live online IP counts and active IP lists.
|
||||
|
||||
## Features
|
||||
|
||||
- Shows the current online device count based on Xboard's built-in `DeviceStateService`
|
||||
- Provides an administrator page to inspect all users' online IP counts
|
||||
- Provides an administrator API endpoint with paginated user online IP data
|
||||
- Provides a temporary signed dashboard page for a single user snapshot
|
||||
- Server-rendered admin page, no extra browser token parsing
|
||||
- Search by user ID or email
|
||||
- Page size switching
|
||||
- Live online IP list from `DeviceStateService`
|
||||
- Subscription name, last online time, and created time display
|
||||
|
||||
## Routes
|
||||
## Route
|
||||
|
||||
- `GET /api/v1/user-online-devices/summary`
|
||||
- `GET /api/v1/user-online-devices/panel-url`
|
||||
- `GET /api/v2/{secure_path}/user-online-devices/users`
|
||||
- `GET /{secure_path}/user-online-devices`
|
||||
- `GET /user-online-devices/panel/{user}` (temporary signed URL)
|
||||
After the plugin is installed and enabled, open:
|
||||
|
||||
`/{secure_path}/user-online-devices`
|
||||
|
||||
`secure_path` is your Xboard admin secure path.
|
||||
|
||||
## Notes
|
||||
|
||||
- This plugin reuses Xboard's existing real-time device state data from Redis.
|
||||
- In current Xboard releases, plugin development is primarily backend-oriented, so this plugin ships standalone pages instead of patching the compiled SPA bundle directly.
|
||||
- The "online device" count is effectively the number of unique online IPs reported by nodes.
|
||||
- The administrator entry is `/{secure_path}/user-online-devices`, which reads the current admin login token and shows paginated user online IP data.
|
||||
- The page is protected by Xboard's `admin` middleware
|
||||
- The plugin does not expose a public user page
|
||||
- Active IP data comes from node-reported device state in Redis
|
||||
|
||||
Reference in New Issue
Block a user