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

Sort Devices and Groups in Alert Rules 'map to' droplist #10530

Merged
merged 2 commits into from Aug 21, 2019

Conversation

@SourceDoctor
Copy link
Contributor

commented Aug 16, 2019

sort Devices and Groups alphabetic in
Alert Rule -> "Map To"

DO NOT DELETE THIS TEXT

Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.

Testers

If you would like to test this pull request then please run: ./scripts/github-apply <pr_id>, i.e ./scripts/github-apply 10530
After you are done testing, you can remove the changes with ./scripts/github-remove. If there are schema changes, you can ask on discord how to revert.

@PipoCanaja PipoCanaja changed the title alphabetic order of Devices and Groups in Alert Rules Sort Devices and Groups in Alert Rules 'map to' droplist Aug 20, 2019

@PipoCanaja PipoCanaja added the WebUI label Aug 20, 2019

@PipoCanaja PipoCanaja self-assigned this Aug 20, 2019

@PipoCanaja

This comment has been minimized.

Copy link
Contributor

commented Aug 20, 2019

Works well for the groups. Not so OK for devices, because they depend on force_ip_to_sysname option.
You need to sort in PHP (and not in the SQL part) the $devices array, in which the text was already processed by format_hostname according to user preferences.

@PipoCanaja
Copy link
Contributor

left a comment

Sorting the devices after format_hostname() call.

@SourceDoctor

This comment has been minimized.

Copy link
Contributor Author

commented Aug 20, 2019

@PipoCanaja
device sorting has been moved

@laf
Copy link
Member

left a comment

Just one thing then this should be good.

@laf laf added the User-Pending label Aug 20, 2019

@PipoCanaja
Copy link
Contributor

left a comment

LGTM

Sort OK now with last changes.

@PipoCanaja PipoCanaja merged commit 9e02040 into librenms:master Aug 21, 2019

6 checks passed

Inspection Summary
Details
Node: analysis
Details
Travis CI - Pull Request Build Passed
Details
WIP Ready for review
Details
codeclimate All good!
Details
license/cla Contributor License Agreement is signed.
Details
@murrant

This comment has been minimized.

Copy link
Member

commented Sep 3, 2019

This pull request has been mentioned on LibreNMS Community. There might be relevant details there:

https://community.librenms.org/t/v1-55-release-changelog-august-2019/9428/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.