Fix run build

This commit is contained in:
Orionis312050 committed 2026-04-16 21:51:15 +02:00
1 parent e8a92bf87b
commit 4beb27e618
3 files changed
+8 -8

No files matched your search

+2 -1
View File
@@ -1,9 +1,10 @@
export interface LogService {
id: number;
id: number | string;
name: string;
type: string;
pathOrContainerId: string;
alertKeyword: string | null;
createdAt?: string;
}
export interface GlobalSettings {
+4 -6
View File
@@ -1,6 +1,6 @@
import { useState, useEffect } from 'react';
import { useNavigate } from 'react-router-dom';
import { PlusCircle, Clock, Server, HardDrive, LayoutGrid, Search, SearchX, Globe, Cpu, ChevronRight } from 'lucide-react';
import { PlusCircle, Clock, Server, HardDrive, LayoutGrid, Search, SearchX, Globe, ChevronRight } from 'lucide-react';
import AddServiceModal from '../components/AddServiceModal';
import type { LogService } from '../types';
@@ -18,7 +18,6 @@ export default function HomeView() {
const [isModalOpen, setIsModalOpen] = useState(false);
const [searchTerm, setSearchTerm] = useState('');
const [systemServices, setSystemServices] = useState<SystemService[]>([]);
const [isSearchingSystem, setIsSearchingSystem] = useState(false);
const navigate = useNavigate();
const fetchServices = async () => {
@@ -31,8 +30,8 @@ export default function HomeView() {
// Load recents from localStorage
const recentIds: number[] = JSON.parse(localStorage.getItem('recentServiceIds') || '[]');
const recents = data.filter((s: LogService) => recentIds.includes(s.id))
.sort((a: LogService, b: LogService) => recentIds.indexOf(a.id) - recentIds.indexOf(b.id));
const recents = data.filter((s: LogService) => recentIds.includes(s.id as any))
.sort((a: LogService, b: LogService) => recentIds.indexOf(a.id as any) - recentIds.indexOf(b.id as any));
setRecentServices(recents);
} catch (e) {
console.error('API non joignable', e);
@@ -41,7 +40,6 @@ export default function HomeView() {
const fetchSystemServices = async () => {
if (systemServices.length > 0) return; // Only fetch once or when forced
setIsSearchingSystem(true);
try {
const apiUrl = import.meta.env.VITE_API_URL || 'http://localhost:3001';
const [dockerRes, osRes] = await Promise.allSettled([
@@ -67,7 +65,7 @@ export default function HomeView() {
} catch (e) {
console.error('Erreur lors du fetch des services système', e);
} finally {
setIsSearchingSystem(false);
// setIsSearchingSystem(false);
}
};
+2 -1
View File
@@ -68,10 +68,11 @@ export default function ServiceView() {
const logs = await logsRes.json();
setService({
id: `ephemeral-${target}` as any, // On triche avec le type pour le passer au terminal
id: `ephemeral-${target}`,
name,
type: type as any,
pathOrContainerId: target,
alertKeyword: null,
createdAt: new Date().toISOString()
});
setInitialLogs(logs);