Compare commits

...

2 Commits

Author SHA1 Message Date
sagitchu d4579b8af5 fix(frontend): constrain service monitor records modal 2026-09-24 16:09:14 +08:00
sagit cf7246c71b feat: adaptive traffic units and precise MB–PB quotas (#556)
## Summary

- Format traffic amounts adaptively through PB across the user,
dashboard, forwarding, node, monitoring, and panel sharing views. Closes
#548.
- Let administrators choose MB, GB, TB, or PB when setting user, tunnel
permission, and panel sharing traffic limits. Closes #549.
- Persist exact MiB limits for users and tunnel permissions while
retaining the legacy GB field and existing data. Apply the precise limit
in forwarding policy checks and preserve it in backups.

## Verification

- `go test ./...` in `go-backend` (724 passed)
- `pnpm run build` in `vite-frontend`
- ESLint on changed frontend files
- `git diff --check`
2026-09-24 15:40:11 +08:00
@@ -1931,13 +1931,15 @@ export function MonitorView({ nodeMap, viewMode = "grid" }: MonitorViewProps) {
<Modal
isOpen={resultsModalOpen}
scrollBehavior="inside"
size="xl"
onClose={() => {
setResultsModalOpen(false);
setResultsMonitorId(null);
}}
>
<ModalContent>
<ModalHeader className="flex flex-row items-center justify-between gap-3">
<ModalHeader className="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">
<div className="min-w-0">
<div className="text-base font-semibold truncate">
监控记录
@@ -1965,7 +1967,7 @@ export function MonitorView({ nodeMap, viewMode = "grid" }: MonitorViewProps) {
) : null}
</div>
{resultsMonitorId != null ? (
<div className="flex items-center gap-2 shrink-0">
<div className="flex shrink-0 items-center gap-2">
<Select
className="w-28"
selectedKeys={[String(resultsLimit)]}
@@ -2011,7 +2013,7 @@ export function MonitorView({ nodeMap, viewMode = "grid" }: MonitorViewProps) {
) : modalResults.length > 0 ? (
<Table
aria-label="监控记录"
className="w-full overflow-x-auto"
className="min-w-[32rem]"
classNames={{
wrapper:
"bg-transparent p-0 shadow-none border-none overflow-auto rounded-2xl",