mirror of
https://github.com/liberatedsystems/openCom-Companion.git
synced 2024-11-22 05:20:36 +01:00
Added network stats to object details
This commit is contained in:
parent
20f0e12651
commit
4eea61b629
@ -641,7 +641,7 @@ class RVDetails(MDRecycleView):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
nh = RNS.Transport.hops_to(self.delegate.object_hash)
|
nh = RNS.Transport.hops_to(self.delegate.object_hash)
|
||||||
nhi = RNS.Transport.next_hop_interface(self.delegate.object_hash)
|
nhi = self.delegate.app.sideband.reticulum.get_next_hop_if_name(self.delegate.object_hash)
|
||||||
if nhi:
|
if nhi:
|
||||||
self.entries.append({"icon": "routes", "text": f"Current path on [b]{nhi}[/b]", "on_release": pass_job})
|
self.entries.append({"icon": "routes", "text": f"Current path on [b]{nhi}[/b]", "on_release": pass_job})
|
||||||
|
|
||||||
@ -655,13 +655,13 @@ class RVDetails(MDRecycleView):
|
|||||||
lers = RNS.prettyspeed(ler, "b")
|
lers = RNS.prettyspeed(ler, "b")
|
||||||
self.entries.append({"icon": "lock-check-outline", "text": f"Direct link established, LER is [b]{lers}[/b]", "on_release": pass_job})
|
self.entries.append({"icon": "lock-check-outline", "text": f"Direct link established, LER is [b]{lers}[/b]", "on_release": pass_job})
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
pass
|
RNS.trace_exception(e)
|
||||||
|
|
||||||
if nh != RNS.Transport.PATHFINDER_M:
|
if nh != RNS.Transport.PATHFINDER_M:
|
||||||
hs = "hop" if nh == 1 else "hops"
|
hs = "hop" if nh == 1 else "hops"
|
||||||
self.entries.append({"icon": "atom-variant", "text": f"Network distance is [b]{nh} {hs}[/b]", "on_release": pass_job})
|
self.entries.append({"icon": "atom-variant", "text": f"Network distance is [b]{nh} {hs}[/b]", "on_release": pass_job})
|
||||||
except:
|
except Exception as e:
|
||||||
pass
|
RNS.trace_exception(e)
|
||||||
|
|
||||||
if len(self.entries) == 0:
|
if len(self.entries) == 0:
|
||||||
self.entries.append({"icon": "timeline-question-outline", "text": f"No telemetry available for this device"})
|
self.entries.append({"icon": "timeline-question-outline", "text": f"No telemetry available for this device"})
|
||||||
|
Loading…
Reference in New Issue
Block a user