-
Notifications
You must be signed in to change notification settings - Fork 232
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
Add a resource for group attribute mapping #1850
base: main
Are you sure you want to change the base?
Conversation
In order to lower resource usage and have a faster runtime, PRs will not run Cloud tests automatically. |
@@ -42,14 +42,14 @@ var ( | |||
func(t *models.NotificationTemplate) string { return t.Name }, | |||
func(client *goapi.GrafanaHTTPAPI, id string) (*models.NotificationTemplate, error) { | |||
resp, err := client.Provisioning.GetTemplate(id) | |||
return payloadOrError(resp, err) | |||
return payloadOrError[models.NotificationTemplate](resp, err) |
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.
I couldn't make it to automatically infer types, but I am not sure why. Let me know if you have any ideas.
params := provisioning.NewDeleteTemplateParams().WithName(name) | ||
_, err := client.Provisioning.DeleteTemplate(params) |
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.
Looks like the openAPI spec has changed slightly for alerting.
Waiting for #1905 to be merged (it updates the openAPI client dependency). Will then rebase on top of that and fix any remaining issues. |
Adding a resource for group attribute mapping feature.
Requires grafana/grafana-openapi-client-go#103 to be merged first, so that we can bump the openAPI client dependency.
Here is an example of how the new resource can be used to map a role to a group: