Feat : Better stats
Some checks failed
Build and Push Docker Images / docker (push) Failing after 7s

This commit is contained in:
jeanotx32
2026-05-18 23:54:44 -04:00
parent c7cc18101a
commit 3080826806
7 changed files with 476 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
import { Server, Wifi, WifiOff, Trash2, ChevronDown, ChevronUp, RefreshCw, Cpu, MemoryStick, ArrowUp, ArrowDown, Pencil } from 'lucide-react'
import { Server, Wifi, WifiOff, Trash2, ChevronDown, ChevronUp, RefreshCw, Cpu, MemoryStick, ArrowUp, ArrowDown, Pencil, BarChart2 } from 'lucide-react'
import { useState } from 'react'
import ContainerRow from './ContainerRow'
import { tagColor } from './TagInput'
@@ -14,7 +14,7 @@ function formatRam(bytes) {
return `${(bytes / 1024 ** 3).toFixed(1)} GB`
}
export default function VpsCard({ vps, onAction, onLogs, onDelete, onUpdate, onEdit }) {
export default function VpsCard({ vps, onAction, onLogs, onDelete, onUpdate, onEdit, onStats }) {
const [collapsed, setCollapsed] = useState(false)
const [updatingProject, setUpdatingProject] = useState(null)
@@ -62,6 +62,16 @@ export default function VpsCard({ vps, onAction, onLogs, onDelete, onUpdate, onE
{collapsed ? <ChevronDown size={14} /> : <ChevronUp size={14} />}
</button>
{vps.online && (
<button
onClick={() => onStats(vps.id, vps.name)}
className="p-1.5 rounded hover:bg-gray-800 text-gray-500 hover:text-indigo-400 transition-colors"
title="Graphiques de performance"
>
<BarChart2 size={14} />
</button>
)}
<button
onClick={() => onEdit(vps)}
className="p-1.5 rounded hover:bg-gray-800 text-gray-500 hover:text-gray-300 transition-colors"