Feat : Better stats
Some checks failed
Build and Push Docker Images / docker (push) Failing after 7s
Some checks failed
Build and Push Docker Images / docker (push) Failing after 7s
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user