feat: overhaul Logs page with search, container logs, statistics, and rotation
- Added 4-tab layout: Service Logs, Container Logs, Statistics & Rotation, Health History - Service Logs: service/level/line-count selector, keyword search, auto-refresh (5s) - Container Logs: container picker, tail lines selector, auto-refresh - Statistics & Rotation: per-service file size, entry/error/warning counts, per-service and bulk rotate buttons - Added logsAPI in api.js: getServiceLogs, searchLogs, exportLogs, getStatistics, rotateLogs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -186,6 +186,17 @@ export const monitoringAPI = {
|
||||
getHealthHistory: () => api.get('/api/health/history'),
|
||||
};
|
||||
|
||||
// Logs API
|
||||
export const logsAPI = {
|
||||
getServiceLogs: (service, level = 'ALL', lines = 100) =>
|
||||
api.get(`/api/logs/services/${service}`, { params: { level, lines } }),
|
||||
searchLogs: (data) => api.post('/api/logs/search', data),
|
||||
exportLogs: (data) => api.post('/api/logs/export', data),
|
||||
getStatistics: (service) =>
|
||||
api.get('/api/logs/statistics', service ? { params: { service } } : {}),
|
||||
rotateLogs: (service) => api.post('/api/logs/rotate', service ? { service } : {}),
|
||||
};
|
||||
|
||||
// Container Management API
|
||||
export const containerAPI = {
|
||||
// Containers
|
||||
|
||||
Reference in New Issue
Block a user