-
Notifications
You must be signed in to change notification settings - Fork 143
Add listing all contact points with pagination #81
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for your contribution @sunwupark !
One small comment from my side! :)
I have also removed the page parameter from the alert test file. |
tools/alerting.go
Outdated
return result | ||
} | ||
|
||
func applyContactPointPagination(items []*models.EmbeddedContactPoint, limit int) ([]*models.EmbeddedContactPoint, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tiny last comment, can we change the name of this function now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you be okay with renaming the function to applyLimitToContactPoints? I think it accurately reflects the current functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to clean it up!
yup! changed and commited |
Added listContactPoints function to fetch and paginate contact points from Grafana.
Supports filtering by name and returns summarized data (UID, Name, Type).
Tests included for pagination, filtering, and invalid parameters.