mirror of
https://github.com/henrygd/beszel.git
synced 2026-05-06 19:01:48 +02:00
updates
This commit is contained in:
@@ -216,20 +216,11 @@ export function useNetworkProbeStats(props: UseNetworkProbeStatsProps) {
|
||||
|
||||
return probeStats
|
||||
}
|
||||
// function probesToStats(probes: NetworkProbeRecord[]): NetworkProbeStatsRecord["stats"] {
|
||||
// const stats: NetworkProbeStatsRecord["stats"] = {}
|
||||
// for (const probe of probes) {
|
||||
// // TODO: include only if probe.updated < charttime
|
||||
// stats[probe.id] = [probe.res, probe.resAvg1h, probe.resMin1h, probe.resMax1h, probe.loss, probe.loss1h]
|
||||
// }
|
||||
// return stats
|
||||
// }
|
||||
|
||||
async function fetchProbes(systemId?: string) {
|
||||
async function fetchProbes(system?: string) {
|
||||
try {
|
||||
const res = await pb.collection<NetworkProbeRecord>("network_probes").getList(0, 2000, {
|
||||
fields: NETWORK_PROBE_FIELDS,
|
||||
filter: systemId ? pb.filter("system={:system}", { system: systemId }) : undefined,
|
||||
filter: system ? pb.filter("system={:system}", { system }) : undefined,
|
||||
})
|
||||
return res.items
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user