Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
19 changes: 18 additions & 1 deletion .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19536,6 +19536,23 @@ components:
x-enum-varnames:
- BARS
- AREA
TimeseriesRequestStyle:
description: Define request widget style for timeseries widgets.
properties:
has_value_labels:
description: If true, the value is displayed as a label relative to the
data point.
type: boolean
line_type:
$ref: '#/components/schemas/WidgetLineType'
line_width:
$ref: '#/components/schemas/WidgetLineWidth'
order_by:
$ref: '#/components/schemas/WidgetStyleOrderBy'
palette:
description: Color palette to apply to the widget.
type: string
type: object
TimeseriesWidgetDefinition:
description: The timeseries visualization allows you to display the evolution
of one or more metrics, log events, or Indexed Spans over time.
Expand Down Expand Up @@ -19711,7 +19728,7 @@ components:
deprecated: true
description: Deprecated - Use `queries` and `formulas` instead.
style:
$ref: '#/components/schemas/WidgetRequestStyle'
$ref: '#/components/schemas/TimeseriesRequestStyle'
type: object
ToplistWidgetDefinition:
description: The top list visualization enables you to display a list of Tag
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2026-03-02T17:38:31.339Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/v1/dashboards/CreateDashboard_1259346254.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
requests: [
DatadogAPIClient::V1::TimeseriesWidgetRequest.new({
q: "avg:system.cpu.user{*} by {host}",
style: DatadogAPIClient::V1::WidgetRequestStyle.new({
style: DatadogAPIClient::V1::TimeseriesRequestStyle.new({
palette: "warm",
order_by: DatadogAPIClient::V1::WidgetStyleOrderBy::VALUES,
}),
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/dashboards/CreateDashboard_1284514532.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
}),
],
response_format: DatadogAPIClient::V1::FormulaAndFunctionResponseFormat::TIMESERIES,
style: DatadogAPIClient::V1::WidgetRequestStyle.new({
style: DatadogAPIClient::V1::TimeseriesRequestStyle.new({
palette: "dog_classic",
line_type: DatadogAPIClient::V1::WidgetLineType::SOLID,
line_width: DatadogAPIClient::V1::WidgetLineWidth::NORMAL,
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/dashboards/CreateDashboard_1307120899.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
}),
],
response_format: DatadogAPIClient::V1::FormulaAndFunctionResponseFormat::TIMESERIES,
style: DatadogAPIClient::V1::WidgetRequestStyle.new({
style: DatadogAPIClient::V1::TimeseriesRequestStyle.new({
palette: "dog_classic",
line_type: DatadogAPIClient::V1::WidgetLineType::SOLID,
line_width: DatadogAPIClient::V1::WidgetLineWidth::NORMAL,
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/dashboards/CreateDashboard_1433408735.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
}),
],
response_format: DatadogAPIClient::V1::FormulaAndFunctionResponseFormat::TIMESERIES,
style: DatadogAPIClient::V1::WidgetRequestStyle.new({
style: DatadogAPIClient::V1::TimeseriesRequestStyle.new({
palette: "dog_classic",
line_type: DatadogAPIClient::V1::WidgetLineType::SOLID,
line_width: DatadogAPIClient::V1::WidgetLineWidth::NORMAL,
Expand Down
29 changes: 29 additions & 0 deletions examples/v1/dashboards/CreateDashboard_1705253330.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Create a new dashboard with timeseries widget using has_value_labels

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::DashboardsAPI.new

body = DatadogAPIClient::V1::Dashboard.new({
layout_type: DatadogAPIClient::V1::DashboardLayoutType::ORDERED,
title: "Example-Dashboard with has_value_labels",
widgets: [
DatadogAPIClient::V1::Widget.new({
definition: DatadogAPIClient::V1::TimeseriesWidgetDefinition.new({
type: DatadogAPIClient::V1::TimeseriesWidgetDefinitionType::TIMESERIES,
requests: [
DatadogAPIClient::V1::TimeseriesWidgetRequest.new({
q: "avg:system.cpu.user{*} by {host}",
style: DatadogAPIClient::V1::TimeseriesRequestStyle.new({
palette: "dog_classic",
line_type: DatadogAPIClient::V1::WidgetLineType::SOLID,
line_width: DatadogAPIClient::V1::WidgetLineWidth::NORMAL,
has_value_labels: true,
}),
display_type: DatadogAPIClient::V1::WidgetDisplayType::LINE,
}),
],
}),
}),
],
})
p api_instance.create_dashboard(body)
2 changes: 1 addition & 1 deletion examples/v1/dashboards/CreateDashboard_2261785072.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
query: "avg:system.cpu.user{*}",
}),
],
style: DatadogAPIClient::V1::WidgetRequestStyle.new({
style: DatadogAPIClient::V1::TimeseriesRequestStyle.new({
palette: "purple",
line_type: DatadogAPIClient::V1::WidgetLineType::SOLID,
line_width: DatadogAPIClient::V1::WidgetLineWidth::NORMAL,
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/dashboards/CreateDashboard_2278756614.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
query: "avg:system.cpu.user{*}",
}),
],
style: DatadogAPIClient::V1::WidgetRequestStyle.new({
style: DatadogAPIClient::V1::TimeseriesRequestStyle.new({
palette: "dog_classic",
line_type: DatadogAPIClient::V1::WidgetLineType::SOLID,
line_width: DatadogAPIClient::V1::WidgetLineWidth::NORMAL,
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/dashboards/CreateDashboard_2800096921.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
}),
],
response_format: DatadogAPIClient::V1::FormulaAndFunctionResponseFormat::TIMESERIES,
style: DatadogAPIClient::V1::WidgetRequestStyle.new({
style: DatadogAPIClient::V1::TimeseriesRequestStyle.new({
palette: "dog_classic",
line_type: DatadogAPIClient::V1::WidgetLineType::SOLID,
line_width: DatadogAPIClient::V1::WidgetLineWidth::NORMAL,
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/dashboards/CreateDashboard_3066042014.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
}),
],
response_format: DatadogAPIClient::V1::FormulaAndFunctionResponseFormat::TIMESERIES,
style: DatadogAPIClient::V1::WidgetRequestStyle.new({
style: DatadogAPIClient::V1::TimeseriesRequestStyle.new({
palette: "dog_classic",
line_type: DatadogAPIClient::V1::WidgetLineType::SOLID,
line_width: DatadogAPIClient::V1::WidgetLineWidth::NORMAL,
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/dashboards/CreateDashboard_3451918078.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
}),
],
response_format: DatadogAPIClient::V1::FormulaAndFunctionResponseFormat::TIMESERIES,
style: DatadogAPIClient::V1::WidgetRequestStyle.new({
style: DatadogAPIClient::V1::TimeseriesRequestStyle.new({
palette: "dog_classic",
line_type: DatadogAPIClient::V1::WidgetLineType::SOLID,
line_width: DatadogAPIClient::V1::WidgetLineWidth::NORMAL,
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/dashboards/CreateDashboard_3631423980.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
requests: [
DatadogAPIClient::V1::TimeseriesWidgetRequest.new({
q: "avg:system.cpu.user{*} by {host}",
style: DatadogAPIClient::V1::WidgetRequestStyle.new({
style: DatadogAPIClient::V1::TimeseriesRequestStyle.new({
palette: "dog_classic",
line_type: DatadogAPIClient::V1::WidgetLineType::SOLID,
line_width: DatadogAPIClient::V1::WidgetLineWidth::NORMAL,
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/dashboards/CreateDashboard_3982498788.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
DatadogAPIClient::V1::TimeseriesWidgetRequest.new({
q: "sum:trace.test.errors{env:prod,service:datadog-api-spec} by {resource_name}.as_count()",
on_right_yaxis: false,
style: DatadogAPIClient::V1::WidgetRequestStyle.new({
style: DatadogAPIClient::V1::TimeseriesRequestStyle.new({
palette: "warm",
line_type: DatadogAPIClient::V1::WidgetLineType::SOLID,
line_width: DatadogAPIClient::V1::WidgetLineWidth::NORMAL,
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/dashboards/CreateDashboard_41622531.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
}),
],
response_format: DatadogAPIClient::V1::FormulaAndFunctionResponseFormat::TIMESERIES,
style: DatadogAPIClient::V1::WidgetRequestStyle.new({
style: DatadogAPIClient::V1::TimeseriesRequestStyle.new({
palette: "dog_classic",
line_type: DatadogAPIClient::V1::WidgetLineType::SOLID,
line_width: DatadogAPIClient::V1::WidgetLineWidth::NORMAL,
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/dashboards/CreateDashboard_416487533.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
requests: [
DatadogAPIClient::V1::TimeseriesWidgetRequest.new({
q: "avg:system.cpu.user{*} by {host}",
style: DatadogAPIClient::V1::WidgetRequestStyle.new({
style: DatadogAPIClient::V1::TimeseriesRequestStyle.new({
palette: "dog_classic",
order_by: DatadogAPIClient::V1::WidgetStyleOrderBy::TAGS,
}),
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/dashboards/CreateDashboard_4262729673.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
}),
],
response_format: DatadogAPIClient::V1::FormulaAndFunctionResponseFormat::TIMESERIES,
style: DatadogAPIClient::V1::WidgetRequestStyle.new({
style: DatadogAPIClient::V1::TimeseriesRequestStyle.new({
palette: "dog_classic",
line_type: DatadogAPIClient::V1::WidgetLineType::SOLID,
line_width: DatadogAPIClient::V1::WidgetLineWidth::NORMAL,
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/dashboards/CreateDashboard_607525069.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
}),
],
response_format: DatadogAPIClient::V1::FormulaAndFunctionResponseFormat::TIMESERIES,
style: DatadogAPIClient::V1::WidgetRequestStyle.new({
style: DatadogAPIClient::V1::TimeseriesRequestStyle.new({
palette: "dog_classic",
line_type: DatadogAPIClient::V1::WidgetLineType::SOLID,
line_width: DatadogAPIClient::V1::WidgetLineWidth::NORMAL,
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/dashboards/CreateDashboard_985012506.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
}),
],
response_format: DatadogAPIClient::V1::FormulaAndFunctionResponseFormat::TIMESERIES,
style: DatadogAPIClient::V1::WidgetRequestStyle.new({
style: DatadogAPIClient::V1::TimeseriesRequestStyle.new({
palette: "dog_classic",
line_type: DatadogAPIClient::V1::WidgetLineType::SOLID,
line_width: DatadogAPIClient::V1::WidgetLineWidth::NORMAL,
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/notebooks/CreateNotebook.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
DatadogAPIClient::V1::TimeseriesWidgetRequest.new({
display_type: DatadogAPIClient::V1::WidgetDisplayType::LINE,
q: "avg:system.load.1{*}",
style: DatadogAPIClient::V1::WidgetRequestStyle.new({
style: DatadogAPIClient::V1::TimeseriesRequestStyle.new({
line_type: DatadogAPIClient::V1::WidgetLineType::SOLID,
line_width: DatadogAPIClient::V1::WidgetLineWidth::NORMAL,
palette: "dog_classic",
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/notebooks/UpdateNotebook.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
DatadogAPIClient::V1::TimeseriesWidgetRequest.new({
display_type: DatadogAPIClient::V1::WidgetDisplayType::LINE,
q: "avg:system.load.1{*}",
style: DatadogAPIClient::V1::WidgetRequestStyle.new({
style: DatadogAPIClient::V1::TimeseriesRequestStyle.new({
line_type: DatadogAPIClient::V1::WidgetLineType::SOLID,
line_width: DatadogAPIClient::V1::WidgetLineWidth::NORMAL,
palette: "dog_classic",
Expand Down
11 changes: 11 additions & 0 deletions features/v1/dashboards.feature
Original file line number Diff line number Diff line change
Expand Up @@ -966,6 +966,17 @@ Feature: Dashboards
And the response "widgets[0].definition.requests[0].display_type" is equal to "bars"
And the response "widgets[0].definition.requests[0].q" is equal to "sum:trace.test.errors{env:prod,service:datadog-api-spec} by {resource_name}.as_count()"

@team:DataDog/dashboards-backend
Scenario: Create a new dashboard with timeseries widget using has_value_labels
Given new "CreateDashboard" request
And body with value {"layout_type": "ordered", "title": "{{ unique }} with has_value_labels","widgets": [{"definition": {"type": "timeseries","requests": [{"q": "avg:system.cpu.user{*} by {host}","style": {"palette": "dog_classic","line_type": "solid","line_width": "normal","has_value_labels": true},"display_type": "line"}]}}]}
When the request is sent
Then the response status is 200 OK
And the response "widgets[0].definition.requests[0].style.has_value_labels" is equal to true
And the response "widgets[0].definition.requests[0].style.palette" is equal to "dog_classic"
And the response "widgets[0].definition.requests[0].style.line_type" is equal to "solid"
And the response "widgets[0].definition.requests[0].style.line_width" is equal to "normal"

@team:DataDog/dashboards-backend
Scenario: Create a new dashboard with timeseries widget using order_by tags
Given new "CreateDashboard" request
Expand Down
1 change: 1 addition & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,7 @@ def overrides
"v1.target_format_type" => "TargetFormatType",
"v1.timeseries_background" => "TimeseriesBackground",
"v1.timeseries_background_type" => "TimeseriesBackgroundType",
"v1.timeseries_request_style" => "TimeseriesRequestStyle",
"v1.timeseries_widget_definition" => "TimeseriesWidgetDefinition",
"v1.timeseries_widget_definition_type" => "TimeseriesWidgetDefinitionType",
"v1.timeseries_widget_expression_alias" => "TimeseriesWidgetExpressionAlias",
Expand Down
Loading
Loading