mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-11-17 19:16:25 +00:00
Update AppImage
This commit is contained in:
@@ -180,7 +180,7 @@ export default function Hardware() {
|
||||
error: dynamicError,
|
||||
isLoading: dynamicLoading,
|
||||
} = useSWR<HardwareData>("/api/hardware", fetcher, {
|
||||
refreshInterval: 5000, // 5 second refresh for dynamic data
|
||||
refreshInterval: 7000,
|
||||
})
|
||||
|
||||
// Merge static and dynamic data, preferring static for CPU/memory/PCI/disks
|
||||
|
||||
@@ -149,7 +149,7 @@ export function NetworkMetrics() {
|
||||
error,
|
||||
isLoading,
|
||||
} = useSWR<NetworkData>("/api/network", fetcher, {
|
||||
refreshInterval: 60000, // Refresh every 60 seconds
|
||||
refreshInterval: 53000,
|
||||
revalidateOnFocus: false,
|
||||
revalidateOnReconnect: true,
|
||||
})
|
||||
@@ -161,13 +161,13 @@ export function NetworkMetrics() {
|
||||
const [interfaceTotals, setInterfaceTotals] = useState<{ received: number; sent: number }>({ received: 0, sent: 0 })
|
||||
|
||||
const { data: modalNetworkData } = useSWR<NetworkData>(selectedInterface ? "/api/network" : null, fetcher, {
|
||||
refreshInterval: 15000, // Refresh every 15 seconds when modal is open
|
||||
refreshInterval: 17000,
|
||||
revalidateOnFocus: false,
|
||||
revalidateOnReconnect: true,
|
||||
})
|
||||
|
||||
const { data: interfaceHistoricalData } = useSWR<any>(`/api/node/metrics?timeframe=${timeframe}`, fetcher, {
|
||||
refreshInterval: 30000,
|
||||
refreshInterval: 29000,
|
||||
revalidateOnFocus: false,
|
||||
})
|
||||
|
||||
|
||||
@@ -123,12 +123,11 @@ export function ProxmoxDashboard() {
|
||||
// Siempre fetch inicial
|
||||
fetchSystemData()
|
||||
|
||||
// Solo hacer polling si estamos en overview
|
||||
let interval: ReturnType<typeof setInterval> | null = null
|
||||
if (activeTab === "overview") {
|
||||
interval = setInterval(fetchSystemData, 10000)
|
||||
interval = setInterval(fetchSystemData, 9000) // Cambiado de 10000 a 9000ms
|
||||
} else {
|
||||
interval = setInterval(fetchSystemData, 60000)
|
||||
interval = setInterval(fetchSystemData, 61000) // Cambiado de 60000 a 61000ms
|
||||
}
|
||||
|
||||
return () => {
|
||||
|
||||
@@ -259,7 +259,7 @@ export function SystemOverview() {
|
||||
fetchSystemData().then((data) => {
|
||||
if (data) setSystemData(data)
|
||||
})
|
||||
}, 10000)
|
||||
}, 9000) // Cambiado de 10000 a 9000ms
|
||||
|
||||
return () => {
|
||||
clearInterval(systemInterval)
|
||||
@@ -273,7 +273,7 @@ export function SystemOverview() {
|
||||
}
|
||||
|
||||
fetchVMs()
|
||||
const vmInterval = setInterval(fetchVMs, 60000)
|
||||
const vmInterval = setInterval(fetchVMs, 59000) // Cambiado de 60000 a 59000ms
|
||||
|
||||
return () => {
|
||||
clearInterval(vmInterval)
|
||||
@@ -290,7 +290,7 @@ export function SystemOverview() {
|
||||
}
|
||||
|
||||
fetchStorage()
|
||||
const storageInterval = setInterval(fetchStorage, 60000)
|
||||
const storageInterval = setInterval(fetchStorage, 59000) // Cambiado de 60000 a 59000ms
|
||||
|
||||
return () => {
|
||||
clearInterval(storageInterval)
|
||||
@@ -304,7 +304,7 @@ export function SystemOverview() {
|
||||
}
|
||||
|
||||
fetchNetwork()
|
||||
const networkInterval = setInterval(fetchNetwork, 60000)
|
||||
const networkInterval = setInterval(fetchNetwork, 59000) // Cambiado de 60000 a 59000ms
|
||||
|
||||
return () => {
|
||||
clearInterval(networkInterval)
|
||||
|
||||
@@ -197,7 +197,7 @@ export function TwoFactorSetup({ open, onClose, onSuccess }: TwoFactorSetupProps
|
||||
placeholder="000000"
|
||||
value={verificationCode}
|
||||
onChange={(e) => setVerificationCode(e.target.value.replace(/\D/g, "").slice(0, 6))}
|
||||
className="text-center text-lg tracking-widest font-mono"
|
||||
className="text-center text-lg tracking-widest font-mono text-base"
|
||||
maxLength={6}
|
||||
disabled={loading}
|
||||
/>
|
||||
|
||||
@@ -264,7 +264,7 @@ export function VirtualMachines() {
|
||||
isLoading,
|
||||
mutate,
|
||||
} = useSWR<VMData[]>("/api/vms", fetcher, {
|
||||
refreshInterval: 30000,
|
||||
refreshInterval: 23000,
|
||||
revalidateOnFocus: false,
|
||||
revalidateOnReconnect: true,
|
||||
})
|
||||
@@ -451,7 +451,7 @@ export function VirtualMachines() {
|
||||
"/api/system",
|
||||
fetcher,
|
||||
{
|
||||
refreshInterval: 30000,
|
||||
refreshInterval: 23000,
|
||||
revalidateOnFocus: false,
|
||||
},
|
||||
)
|
||||
@@ -1102,7 +1102,6 @@ export function VirtualMachines() {
|
||||
<DialogDescription>
|
||||
View and manage configuration, resources, and status for this virtual machine
|
||||
</DialogDescription>
|
||||
{/* </CHANGE> */}
|
||||
</DialogHeader>
|
||||
|
||||
<div className="flex-1 overflow-y-auto px-6 py-4">
|
||||
|
||||
@@ -284,6 +284,8 @@ pip3 install --target "$APP_DIR/usr/lib/python3/dist-packages" \
|
||||
psutil \
|
||||
requests \
|
||||
PyJWT \
|
||||
pyotp \
|
||||
qrcode[pil] \
|
||||
googletrans==4.0.0-rc1 \
|
||||
httpx==0.13.3 \
|
||||
httpcore==0.9.1 \
|
||||
|
||||
Reference in New Issue
Block a user