-
Notifications
You must be signed in to change notification settings - Fork 389
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 new monitor summary widget parameters #396
Add new monitor summary widget parameters #396
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 for this. Looks mostly good, just a couple small comments.
@@ -2335,6 +2335,10 @@ func getManageStatusDefinitionSchema() map[string]*schema.Schema { | |||
Type: schema.TypeString, | |||
Required: true, | |||
}, | |||
"summary_type": { | |||
Type: schema.TypeString, | |||
Optional: true, |
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.
Can we add description in this schema as well https://github.com/terraform-providers/terraform-provider-datadog/pull/396/files#diff-22ba5b0fbe5d1b3cdfe783aeb61bf51aR561
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.
Should we also set a validation here to ensure its one of the three types - https://www.terraform.io/docs/extend/schemas/schema-behaviors.html#validatefunc or will these change?
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 for the review. I added a description and validation. Please let me know if I should move the validation function somewhere or otherwise alter it (I don't use Go much at the moment).
@jirikuncar @nmuesch thanks for reviewing. I don't have write access to this repo, so could you please merge this PR for me? |
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.
LGTM and tests are passing. Merging, thanks for the contribution!
This PR adds two new, optional parameters for the monitor summary (manage status) widget:
summary_type
, andshow_last_triggered
: https://docs.datadoghq.com/graphing/widgets/monitor_summary/#api.go-datadog-api was updated here: zorkian/go-datadog-api#290
It also updates the acceptance tests for screenboards and dashboards, both of which pass with these changes.