Store device group relationships in a pivot table. #3589

merged 2 commits into from Jun 6, 2016


None yet

2 participants

murrant commented Jun 2, 2016

This will help implement device groups in V2.

  • After a device is polled, we check if any groups need to be changed and update the relationship table.
  • When a group is added or edited, we update the relationship table.

This will add some overhead when polling and save some overhead when getting groups.

*This changes the output of GetDevicesFromGroup() to be just an array of ids, but I had to add a compatibility option for the API. This could be removed if we want to change the API output.

@murrant murrant Store device group relationships in a pivot table.
laf commented Jun 2, 2016

Think the sql file needs to have all queries to be on one line rather than multi line as it reads the file in and loops through it.

@murrant murrant SQL query on one line
laf commented Jun 3, 2016

+1 from me, I don't extensively use groups but it works for me.

@librenms/reviewers anyone else care to test before we merge in 48 hours.

@laf laf merged commit c7ec9aa into librenms:master Jun 6, 2016

1 of 2 checks passed

Auto-Deploy Triggered
continuous-integration/travis-ci/pr The Travis CI build passed
@murrant murrant deleted the murrant:device-groups-pivot branch Jul 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment