fix: wireguard health_check error + logs page ALL service + rotate confirmation

- WireGuardManager.test_connectivity: make peer_ip optional so health_check
  can call it without args (was logging ERROR on every health poll)
- Logs page: add ALL option to service selector (uses search across all services)
- Logs page: show service tag on each log line when in ALL/search mode
- Logs page: require window.confirm before rotating logs to prevent accidental data loss

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-21 01:47:41 -04:00
parent 67ddc97795
commit 50f2200b45
2 changed files with 13 additions and 7 deletions
+8 -5
View File
@@ -6,7 +6,7 @@ import {
} from 'lucide-react';
import { monitoringAPI, logsAPI, containerAPI } from '../services/api';
const SERVICES = ['network', 'wireguard', 'routing', 'email', 'calendar', 'files', 'vault', 'container'];
const SERVICES = ['ALL', 'network', 'wireguard', 'routing', 'email', 'calendar', 'files', 'vault', 'container'];
const LEVELS = ['ALL', 'DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'];
const LEVEL_COLORS = {
DEBUG: 'text-gray-400',
@@ -51,10 +51,11 @@ function ServiceLogsTab() {
const fetch = useCallback(async () => {
setLoading(true);
try {
if (searchMode && query) {
const allServices = SERVICES.filter(s => s !== 'ALL');
if (service === 'ALL' || (searchMode && query)) {
const res = await logsAPI.searchLogs({
query,
services: [service],
query: query || '',
services: service === 'ALL' ? allServices : [service],
level: level === 'ALL' ? undefined : level,
});
setLogs(res.data.results || []);
@@ -273,7 +274,9 @@ function StatisticsTab() {
useEffect(() => { fetch(); }, []);
const rotate = async (service) => {
setRotating(service);
const label = service || 'all services';
if (!window.confirm(`Rotate logs for ${label}? Current log file will be archived and a new one started.`)) return;
setRotating(service || 'all');
try {
await logsAPI.rotateLogs(service || null);
await fetch();