Adding device's field in get_alert_rule and list-alert-rules API function (new)#14481
Merged
murrant merged 5 commits intolibrenms:masterfrom Nov 9, 2022
Merged
Conversation
3 tasks
murrant
reviewed
Oct 24, 2022
Contributor
Author
|
Thanks a lot it is working like a charm. I added the resource's file but for #14500 It is already merged after this PR (I hope it will be kept back) |
Contributor
Author
|
Ah I guess I need to add the changes from #14500 to pass the pipeline... Or rebase to master. |
Contributor
Author
|
Thank you again Murrant! |
murrant
approved these changes
Nov 9, 2022
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello dear LibreNMS community,
Sorry for posting twice but here is the same PR as #14376 (I created it on master by mistake)
I am trying to solve the pipeline error by rebasing from upstream master and not creating a PR on my fork master.
Previous text :
Here I added the ability to retrieve the Devices field in get_alert_rules and list_alert_rules API request either if it is a device, group or location.
Before that nothing was returned.
If one of these 3 variables are set they will be shown as a array of integer.
If there is no such variable nothing will be returned.
I know that the SQL request is quite complex and can maybe add latency on simple query.
I also added some PHP code to reset the variable if empty and to convert the string returned in SQL to an array of integer.
I split the SQL in several lines. Tell me if you really want to use eloquent, but I will need help on this.
Have a nice day!
Please give a short description what your pull request is for
DO NOT DELETE THE UNDERLYING TEXT
Please note
Testers
If you would like to test this pull request then please run:
./scripts/github-apply <pr_id>, i.e./scripts/github-apply 5926After 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.