snp-connection-monitoring/frontend/src/services/monitoringService.ts
HYOJIN 071489ced6 feat(phase4): API Gateway 프록시 + 요청 로깅
백엔드:
- GatewayController (ANY /gateway/{serviceCode}/**)
- GatewayService (API Key prefix 매칭 + AES 복호화, 권한 확인, WebClient 프록시)
- AsyncConfig + RequestLogService (@Async 비동기 로깅)
- RequestLogController (검색 + 상세 API, JPA Specification)
- request_url을 gateway 경로로 통일 저장
- tenant_id 로그 기록 추가
- ErrorCode 6개 (GW001-GW006)

프론트엔드:
- RequestLogsPage (검색 폼 + 결과 테이블 + 페이지네이션)
- RequestLogDetailPage (요청/응답 상세)
- 날짜 검색 LocalDate 변환 수정

Closes #9

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 11:20:08 +09:00

13 lines
537 B
TypeScript

import { get } from './apiClient';
import type { RequestLog, PageResponse } from '../types/monitoring';
export const searchLogs = (params: Record<string, string | number | undefined>) => {
const query = Object.entries(params)
.filter(([, v]) => v !== undefined && v !== '')
.map(([k, v]) => `${k}=${encodeURIComponent(String(v))}`)
.join('&');
return get<PageResponse<RequestLog>>(`/monitoring/logs${query ? '?' + query : ''}`);
};
export const getLogDetail = (id: number) => get<RequestLog>(`/monitoring/logs/${id}`);