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