mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-03 07:06:36 +08:00
b7d38590ba
- Introduced NodeAccessLog model and corresponding database migrations. - Implemented access log retrieval in the service layer. - Created API endpoint for accessing logs with appropriate security measures. - Developed frontend components for displaying access logs, including filtering and summary statistics. - Updated observability buffer to include access logs and ensure proper merging and retention. - Enhanced traffic report and observability tests to validate new access log features. - Updated documentation to reflect changes in access log handling and data retention policies.
12 lines
373 B
TypeScript
12 lines
373 B
TypeScript
import { apiRequest } from '@/lib/api/client';
|
|
|
|
import type { AccessLogItem } from '@/features/access-logs/types';
|
|
|
|
export function getAccessLogs(nodeId?: string) {
|
|
const normalizedNodeId = nodeId?.trim();
|
|
const query = normalizedNodeId
|
|
? `?node_id=${encodeURIComponent(normalizedNodeId)}`
|
|
: '';
|
|
return apiRequest<AccessLogItem[]>(`/access-logs/${query}`);
|
|
}
|