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

[dashboards] Implement support for sunburst widget #1324

Merged
merged 5 commits into from
Jan 14, 2022

Conversation

DrkSephy
Copy link
Contributor

This pull request implements support for the sunburst widget in Terraform.

@DrkSephy DrkSephy requested review from a team as code owners January 11, 2022 21:25
@DrkSephy DrkSephy changed the title [dashboards] Implement support for sunburst widget in Terraform [dashboards] Implement support for sunburst widget Jan 11, 2022
alai97
alai97 previously approved these changes Jan 11, 2022
Copy link
Contributor

@alai97 alai97 left a comment

Choose a reason for hiding this comment

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

This is a hefty PR with big doc impact! These changes look great, suggested three minor period nits 👍

- **title** (String) The title of the widget.
- **title_align** (String) The alignment of the widget's title. Valid values are `center`, `left`, `right`.
- **title_size** (String) The size of the widget's title (defaults to 16).
- **yaxis** (Block List, Max: 1) A nested block describing the Y-Axis Controls. The structure of this block is described below (see [below for nested schema](#nestedblock--widget--group_definition--widget--timeseries_definition--yaxis))
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- **yaxis** (Block List, Max: 1) A nested block describing the Y-Axis Controls. The structure of this block is described below (see [below for nested schema](#nestedblock--widget--group_definition--widget--timeseries_definition--yaxis))
- **yaxis** (Block List, Max: 1) A nested block describing the Y-Axis Controls. The structure of this block is described below. (see [below for nested schema](#nestedblock--widget--group_definition--widget--timeseries_definition--yaxis))

@@ -2102,6 +2103,7 @@ Optional:
- **scatterplot_definition** (Block List, Max: 1) The definition for a Scatterplot widget. (see [below for nested schema](#nestedblock--widget--group_definition--widget--scatterplot_definition))
- **service_level_objective_definition** (Block List, Max: 1) The definition for a Service Level Objective widget. (see [below for nested schema](#nestedblock--widget--group_definition--widget--service_level_objective_definition))
- **servicemap_definition** (Block List, Max: 1) The definition for a Service Map widget. (see [below for nested schema](#nestedblock--widget--group_definition--widget--servicemap_definition))
- **sunburst_definition** (Block List, Max: 1) The definition for a Sunburst widget (see [below for nested schema](#nestedblock--widget--group_definition--widget--sunburst_definition))
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- **sunburst_definition** (Block List, Max: 1) The definition for a Sunburst widget (see [below for nested schema](#nestedblock--widget--group_definition--widget--sunburst_definition))
- **sunburst_definition** (Block List, Max: 1) The definition for a Sunburst widget. (see [below for nested schema](#nestedblock--widget--group_definition--widget--sunburst_definition))

docs/resources/dashboard.md Outdated Show resolved Hide resolved
@DrkSephy
Copy link
Contributor Author

DrkSephy commented Jan 12, 2022

@alai97 thanks for the review! Note that the docs you see here are autogenerated using make docs which creates this documentation from all of the description keys in the corresponding resource file(s). So the easiest way to review would be to look at all of the description keys inside of datadog/resource_datadog_dashboard.go. I've gone ahead and updated the punctuation in said descriptions and regenerated the docs.

"legend_inline": {
Description: "Used to configure the inline legend. Cannot be used in conjunction with legend_table.",
Type: schema.TypeList,
Optional: true,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Optional: true,
Optional: true,
MaxItems: 1,

Copy link
Member

Choose a reason for hiding this comment

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

We can also add conflictsWith property here to make sure both are not set

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My understanding is that conflictsWith will not work here due to the details in this ticket. Am I mistaken?

Copy link
Member

Choose a reason for hiding this comment

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

You right, completely forgot thanks for linking the PR. What do you think about keeping legend_inline and legend_table under one key and document that hide_value and hide_value only useful for inline type?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good suggestion -- I thought about it but decided to split this into two types of legend configurations because we get good enum validation on legend_inline.type and legend_table.type (versus rolling up the legend configurations under one key would also require users to combine the values correctly), so I'm leaning more towards keeping the API as is. What do you think?

Copy link
Member

Choose a reason for hiding this comment

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

👍 fair point. We can keep it this way.

datadog/resource_datadog_dashboard.go Show resolved Hide resolved
datadog/resource_datadog_dashboard.go Outdated Show resolved Hide resolved
datadog/resource_datadog_dashboard.go Outdated Show resolved Hide resolved
@skarimo
Copy link
Member

skarimo commented Jan 13, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@skarimo
Copy link
Member

skarimo commented Jan 14, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@skarimo skarimo enabled auto-merge (squash) January 14, 2022 19:04
@skarimo skarimo merged commit 5f07adc into master Jan 14, 2022
@skarimo skarimo deleted the david.leonard/implement-sunburst-widget branch January 14, 2022 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants