mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-08-10 02:33:04 +02:00
Plumb through total neighbor count from radio and expose that in the UI. Closes #310.
This commit is contained in:
@@ -672,6 +672,14 @@ class RepeaterNeighborsResponse(BaseModel):
|
||||
neighbors: list[NeighborInfo] = Field(
|
||||
default_factory=list, description="List of neighbors seen by repeater"
|
||||
)
|
||||
reported_count: int | None = Field(
|
||||
default=None,
|
||||
description=(
|
||||
"Total neighbor count reported by the repeater firmware, independent of "
|
||||
"how many entries were actually returned. May exceed len(neighbors) when a "
|
||||
"multi-chunk fetch is incomplete (dropped follow-up query / duty-cycle throttle)."
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
class RepeaterAclResponse(BaseModel):
|
||||
|
||||
@@ -265,7 +265,8 @@ async def repeater_neighbors(public_key: str) -> RepeaterNeighborsResponse:
|
||||
)
|
||||
)
|
||||
|
||||
return RepeaterNeighborsResponse(neighbors=neighbors)
|
||||
reported_count = neighbors_data.get("neighbours_count") if neighbors_data else None
|
||||
return RepeaterNeighborsResponse(neighbors=neighbors, reported_count=reported_count)
|
||||
|
||||
|
||||
@router.post("/{public_key}/repeater/acl", response_model=RepeaterAclResponse)
|
||||
|
||||
Reference in New Issue
Block a user