Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter Device list by device Name #52

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

samgutentag
Copy link

@samgutentag samgutentag commented Sep 4, 2024

Cargo has long displayed every device which feeds data to it, commonly resulting in a _large number of duplicated devices and very slow load times.

This PR proposed filtering the device list based on the the name attribute of the devices to include just a single entry for each.

As an example: RAK5205-1-phil has dozens and dozens and dozens of entries all reporting the same location for the given device name.

Using RAK5205-1-phil as an example: Inspecting the incoming data there are two fields of interest (subsection of data provided below) the name and the device_id (device_id randomized for clarity, and other fields omitted)

[
  {
    "name": "RAK5205-1-phil",
    ...
    "device_id": "12345678-1234-1234-1234-1234567891011",
    ...
  }
]


[
  {
    "name": "RAK5205-1-phil",
    ...
    "device_id": "ABCDEFGH-ABCD-ABCD-ABCD-ABCDEFGHIJKL"
    ...
  }
]

trying to avoid this 🫨
cargo-crazy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant