mirror of
https://github.com/henrygd/beszel.git
synced 2026-04-26 22:41:50 +02:00
updte
This commit is contained in:
@@ -69,15 +69,15 @@ export function LazyNetworkProbesTableNew({ systemId, systemData }: { systemId:
|
|||||||
const cachedProbeStats = cache.get(ss_cache_key) as NetworkProbeStatsRecord[] | undefined
|
const cachedProbeStats = cache.get(ss_cache_key) as NetworkProbeStatsRecord[] | undefined
|
||||||
|
|
||||||
// Render from cache immediately if available
|
// Render from cache immediately if available
|
||||||
// if (cachedProbeStats?.length) {
|
if (cachedProbeStats?.length) {
|
||||||
// setProbeStats(cachedProbeStats)
|
setProbeStats(cachedProbeStats)
|
||||||
|
|
||||||
// // Skip the fetch if the latest cached point is recent enough that no new point is expected yet
|
// Skip the fetch if the latest cached point is recent enough that no new point is expected yet
|
||||||
// const lastCreated = cachedProbeStats.at(-1)?.created as number | undefined
|
const lastCreated = cachedProbeStats.at(-1)?.created as number | undefined
|
||||||
// if (lastCreated && Date.now() - lastCreated < expectedInterval * 0.9) {
|
if (lastCreated && Date.now() - lastCreated < expectedInterval * 0.9) {
|
||||||
// return
|
return
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
getStats<NetworkProbeStatsRecord>("network_probe_stats", systemId, chartTime, cachedProbeStats).then(
|
getStats<NetworkProbeStatsRecord>("network_probe_stats", systemId, chartTime, cachedProbeStats).then(
|
||||||
(probeStats) => {
|
(probeStats) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user