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

Add support for style block in dashboard widgets #277

Merged
merged 7 commits into from
Aug 5, 2019

Conversation

enbashi
Copy link
Contributor

@enbashi enbashi commented Aug 2, 2019

Add support for style block in dashboard widgets. Fixes https://github.com/terraform-providers/terraform-provider-datadog/issues/275.

@enbashi enbashi changed the title Rami/add style Add support for style block in dashboard widgets Aug 2, 2019
@enbashi
Copy link
Contributor Author

enbashi commented Aug 2, 2019

While both the datadog API and Go client support style param in toplist widget, it's not offered as an option in our widget editor UI. I added the support for it in code, but I intentionally omitted it in the tests and code to minimize confusion.

Copy link
Contributor

@nmuesch nmuesch left a comment

Choose a reason for hiding this comment

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

Overall looks good, thanks for this and the test too! Left one comment about docs, but I think this can be merged whenever you're ready either way.

@@ -683,6 +709,10 @@ Nested `widget` blocks have the following structure:
- `log_query`: (Optional) The log query to use in the widget. The structure of this block is described [below](dashboard.html#nested-apm_query-and-log_query-blocks).
- `process_query`: (Optional) The process query to use in the widget. The structure of this block is described [below](dashboard.html#nested-process_query-blocks).
- `display_type` - (Optional) Type of display to use for the request. Available values are: `area`, `bars`, or `line`.
- `style` - (Optional) Style of the widget graph. One nested block is allowed with the following structure:
- `palette` - (Optional) Color palette to apply to the widget.
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have docs about what values these can be? Can we link to those here?

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 catch. For some reason markdown link syntax was causing the URLs to disappear from the docs when added in a nested list item so I just added the link URL as text instead.

Copy link
Contributor

@nmuesch nmuesch left a comment

Choose a reason for hiding this comment

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

LGTM, thanks again!

@nmuesch nmuesch merged commit dd86b27 into DataDog:master Aug 5, 2019
enbashi added a commit to enbashi/terraform-provider-datadog that referenced this pull request Aug 5, 2019
Add support for style block in dashboard widgets (DataDog#277)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for style block in new datadog_dashboard
2 participants