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

Hide deprecated monitor summary widget params #403

Merged
merged 3 commits into from
Feb 4, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions datadog/resource_datadog_dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -2355,10 +2355,12 @@ func getManageStatusDefinitionSchema() map[string]*schema.Schema {
Type: schema.TypeString,
Optional: true,
},
// The count param is deprecated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add the Deprecated attribute to these two? https://godoc.org/github.com/hashicorp/terraform/helper/schema#Schema

"count": {
Type: schema.TypeInt,
Optional: true,
},
// The start param is deprecated
"start": {
Type: schema.TypeInt,
Optional: true,
Expand Down
1 change: 1 addition & 0 deletions datadog/resource_datadog_screenboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -1208,6 +1208,7 @@ func buildWidgets(tfWidgets *[]interface{}) []datadog.Widget {
matches: []match{
{"sort", &d.Params.Sort},
{"text", &d.Params.Text},
// The count and start params are deprecated for the monitor summary widget
{"count", &d.Params.Count},
{"start", &d.Params.Start},
}})
Expand Down
4 changes: 1 addition & 3 deletions website/docs/r/dashboard.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -685,9 +685,7 @@ Nested `widget` blocks have the following structure:
- `manage_status_definition`: The definition for a Manage Status, aka Monitor Summary, widget. Exactly one nested block is allowed with the following structure:
- `query`: (Required) The query to use in the widget.
- `summary_type` - (Optional) The monitor summary type to use. One of "monitors", "groups", or "combined". Defaults to "monitors".
- `sort` - (Optional) The method to use to sort monitors. One of : "desc" or "asc".
`count` - (Optional) The number of monitors to display.
`start` - (Optional) The start of the list. Typically 0.
- `sort` - (Optional) The method to use to sort monitors. Example: "status,asc".
- `display_format` - (Optional") The display setting to use. One of "counts", "list", or "countsAndList".
- `color_preference` - (Optional") Whether to colorize text or background. One of "text", "background".
- `hide_zero_counts` - (Optional") Boolean indicating whether to hide empty categories.
Expand Down
4 changes: 0 additions & 4 deletions website/docs/r/screenboard.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,6 @@ resource "datadog_screenboard" "acceptance_test" {
params = {
sort = "status,asc"
text = "status:alert"
count = 50
start = 0
}
}

Expand Down Expand Up @@ -544,8 +542,6 @@ Nested `widget` `params` blocks have the following structure:

- `sort` - (Optional) The method to use to sort monitors. Example: "status,asc".
- `text` - (Optional) The query to use to get monitors. Example: "status:alert".
- `count` - (Optional) The number of monitors to display.
- `start` - (Optional) The start of the list. Typically 0.

### Nested `widget` `tile_def` blocks

Expand Down