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 Template Variable Presets for Boards #296

Merged

Conversation

jackellenberger
Copy link
Contributor

What

image

"Template Variable Presets" aka "Saved Views" are a quick shortcut that
can be added by hand or via json to dashboards in datadog, and appear in
the top left corner.

They allow you to string together common combinations of template
variable values, so if for example you want a "production us-east-2"
view of your dashboard, you could have a "production us-east-2" preset
that sets your template variables to environment = production and
region = us-east-2.

This PR adds support for template variable presets to Boards (aka
dashboards, not to be confused with screenboards or timeboards, which
are not supported by the API). This will be a necessary step towards
adding template variable preset support to the datadog terraform
provider
.

Cheers!

Jack Ellenberger added 2 commits January 3, 2020 20:09
 ## What

<img width="625" alt="image"
src="https://user-images.githubusercontent.com/6370918/71746068-9073ba00-2e31-11ea-83c5-8498d3a14cb8.png">

"Template Variable Presets" aka "Saved Views" are a quick shortcut that
can be added by hand or via json to dashboards in datadog, and appear in
the top left corner.

They allow you to string together common combinations of template
variable values, so if for example you want a "production us-east-2"
view of your dashboard, you could have a "production us-east-2" preset
that sets your template variables to `environment = production` and
`region = us-east-2`.

This PR adds support for template variable presets to Boards (aka
dashboards, not to be confused with screenboards or timeboards, which
are not supported by the API). This will be a necessary step towards
adding template variable preset support to the [datadog terraform
provider](https://github.com/terraform-providers/terraform-provider-datadog).

Cheers!
@jackellenberger
Copy link
Contributor Author

Of note: this functionality is sort of wonky on DD's side. As an update, template_variable_presets works everywhere. As a create, template_variable_presets is valid for both screenboards and timeboards, but only actually does something for timeboards (layout_type: ordered). I don't think that's the desired behavior, so I have a message in to DD to verify.

@jackellenberger
Copy link
Contributor Author

Datadog has fixed this strange behavior so this should be good to go.

Copy link
Collaborator

@bkabrda bkabrda left a comment

Choose a reason for hiding this comment

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

LGTM, merging. Thanks a lot for sending the PR!

@bkabrda bkabrda merged commit 261ab16 into zorkian:master Feb 3, 2020
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.

2 participants