36 lines
2.1 KiB
Markdown
36 lines
2.1 KiB
Markdown
## ADDED Requirements
|
|
|
|
### Requirement: Carrier Traffic Threshold Hit Record Query
|
|
|
|
The admin frontend SHALL provide a read-only paginated view of carrier traffic threshold hit records using `GET /api/admin/carrier-traffic-threshold-hits`.
|
|
|
|
#### Scenario: Restrict page access to platform accounts
|
|
|
|
- **GIVEN** a user is not a super administrator or platform account
|
|
- **WHEN** the user navigates to the carrier traffic threshold hit page
|
|
- **THEN** the frontend MUST deny access and MUST NOT issue the hit-record query
|
|
- **AND** backend authorization and card data-scope filtering MUST remain authoritative
|
|
|
|
#### Scenario: Filter hit records
|
|
|
|
- **GIVEN** an authorized platform user opens the hit-record page
|
|
- **WHEN** the user searches by optional carrier ID, card ID, billing period start, or judged-at time range
|
|
- **THEN** the frontend MUST send `carrier_id`, `card_id`, `period_start`, `start_time`, and `end_time` only when provided
|
|
- **AND** period and judged-at timestamps MUST be timezone-qualified RFC3339 values with second precision
|
|
- **AND** `start_time` and `end_time` MUST represent the API's inclusive time interval
|
|
|
|
#### Scenario: Display immutable hit evidence and recovery result
|
|
|
|
- **GIVEN** the query returns threshold-hit records
|
|
- **WHEN** the frontend renders the table
|
|
- **THEN** it MUST display record/card/carrier IDs, hit traffic, frozen threshold value and unit, billing period start, judged time, trigger source, lock status, unlock time, resume result, failure reason, and creation time
|
|
- **AND** it MUST NOT recompute hit traffic or threshold from current channel configuration
|
|
- **AND** it MUST display nullable historical traffic/threshold values as “无”, blank resume results as “未处理或历史记录”, and missing unlock/failure details as “无”
|
|
|
|
#### Scenario: Preserve server ordering and pagination
|
|
|
|
- **GIVEN** the user queries hit records
|
|
- **WHEN** the frontend loads or changes the page
|
|
- **THEN** it MUST send `page` and `page_size` (never exceeding 100)
|
|
- **AND** it MUST render the server-provided page, size, total, and item order without client-side re-sorting
|