feat(access-logs): 概览支持 Zone/域名多选筛选

概览可按 Zone→Domain 层级多选域名并折叠展开;明细列表 IP 旁展示地区。
后端 overview 支持 hosts 多域名精确匹配。
This commit is contained in:
ryan
2026-07-18 23:07:19 +08:00
parent 6f221b042e
commit 0bb6830047
11 changed files with 426 additions and 21 deletions
@@ -20,10 +20,16 @@ import type {
function buildSearchParams(filters: object): Record<string, unknown> {
const params: Record<string, unknown> = {};
Object.entries(
filters as Record<string, string | number | undefined>,
).forEach(([key, value]) => {
Object.entries(filters as Record<string, unknown>).forEach(([key, value]) => {
if (value === undefined || value === null || value === '') return;
if (Array.isArray(value)) {
const items = value
.map((item) => String(item).trim())
.filter((item) => item !== '');
if (items.length === 0) return;
params[key] = items;
return;
}
params[key] = value;
});
return params;
+1
View File
@@ -503,6 +503,7 @@ export interface AccessLogFilters {
export interface AccessLogOverviewFilters {
node_id?: string;
host?: string;
hosts?: string[];
hours?: number;
}