helium / cargo-elixir

Apache License 2.0
15 stars 6 forks source link

Filter Device list by device Name #52

Open samgutentag opened 2 months ago

samgutentag commented 2 months ago

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