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

Extend Widget time schema with support for new fixed_span and live_span object #1951

Merged
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
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-09-03 15:34:19.182802",
"spec_repo_commit": "e8b83f9d"
"regenerated": "2024-09-03 18:07:13.266236",
"spec_repo_commit": "2d21d782"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-09-03 15:34:19.200837",
"spec_repo_commit": "e8b83f9d"
"regenerated": "2024-09-03 18:07:13.283808",
"spec_repo_commit": "2d21d782"
}
}
}
89 changes: 85 additions & 4 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21867,6 +21867,13 @@ components:
type: string
x-enum-varnames:
- ORDERED
WidgetLegacyLiveSpan:
additionalProperties: false
description: Wrapper for live span
properties:
live_span:
$ref: '#/components/schemas/WidgetLiveSpan'
type: object
WidgetLegendSize:
description: Available legend sizes for a widget. Should be one of "0", "2",
"4", "8", "16", or "auto".
Expand Down Expand Up @@ -21933,6 +21940,24 @@ components:
- MONTH_TO_DATE
- PAST_ONE_YEAR
- ALERT
WidgetLiveSpanUnit:
description: Unit of the time span.
enum:
- minute
- hour
- day
- week
- month
- year
example: minute
type: string
x-enum-varnames:
- MINUTE
- HOUR
- DAY
- WEEK
- MONTH
- YEAR
WidgetMargin:
description: 'Size of the margins around the image.

Expand Down Expand Up @@ -22037,6 +22062,62 @@ components:
- TRIGGERED_DESCENDING
- PRIORITY_ASCENDING
- PRIORITY_DESCENDING
WidgetNewFixedSpan:
description: Used for fixed span times, such as 'March 1 to March 7'.
properties:
from:
description: Start time in seconds since epoch.
example: 1712080128
format: int64
minimum: 0
type: integer
to:
description: End time in seconds since epoch.
example: 1712083128
format: int64
minimum: 0
type: integer
type:
$ref: '#/components/schemas/WidgetNewFixedSpanType'
required:
- type
- from
- to
type: object
WidgetNewFixedSpanType:
description: Type "fixed" denotes a fixed span.
enum:
- fixed
example: fixed
type: string
x-enum-varnames:
- FIXED
WidgetNewLiveSpan:
description: Used for arbitrary live span times, such as 17 minutes or 6 hours.
properties:
type:
$ref: '#/components/schemas/WidgetNewLiveSpanType'
unit:
$ref: '#/components/schemas/WidgetLiveSpanUnit'
value:
description: Value of the time span.
example: 4
format: int64
minimum: 1
type: integer
required:
- type
- value
- unit
type: object
WidgetNewLiveSpanType:
description: Type "live" denotes a live span in the new format.
enum:
- live
example: live
type: string
x-enum-varnames:
- LIVE
WidgetNodeType:
description: Which type of node to use in the map.
enum:
Expand Down Expand Up @@ -22209,10 +22290,10 @@ components:
- TOP
WidgetTime:
description: Time setting for the widget.
properties:
live_span:
$ref: '#/components/schemas/WidgetLiveSpan'
type: object
oneOf:
- $ref: '#/components/schemas/WidgetLegacyLiveSpan'
- $ref: '#/components/schemas/WidgetNewLiveSpan'
- $ref: '#/components/schemas/WidgetNewFixedSpan'
WidgetTimeWindows:
description: Define a time window.
enum:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2024-08-08T16:08:49.284Z

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

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2024-08-08T16:09:04.492Z

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

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2024-08-08T16:09:15.828Z

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_1177423752.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
title: "",
title_size: "16",
title_align: DatadogAPIClient::V1::WidgetTextAlign::LEFT,
time: DatadogAPIClient::V1::WidgetTime.new({}),
time: DatadogAPIClient::V1::WidgetLegacyLiveSpan.new({}),
type: DatadogAPIClient::V1::HeatMapWidgetDefinitionType::HEATMAP,
requests: [
DatadogAPIClient::V1::HeatMapWidgetRequest.new({
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/dashboards/CreateDashboard_1213075383.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
title: "",
title_size: "16",
title_align: DatadogAPIClient::V1::WidgetTextAlign::LEFT,
time: DatadogAPIClient::V1::WidgetTime.new({}),
time: DatadogAPIClient::V1::WidgetLegacyLiveSpan.new({}),
style: DatadogAPIClient::V1::ToplistWidgetStyle.new({
display: DatadogAPIClient::V1::ToplistWidgetStacked.new({
type: DatadogAPIClient::V1::ToplistWidgetStackedType::STACKED,
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 @@ -35,7 +35,7 @@
display_type: DatadogAPIClient::V1::WidgetDisplayType::BARS,
}),
],
time: DatadogAPIClient::V1::WidgetTime.new({
time: DatadogAPIClient::V1::WidgetLegacyLiveSpan.new({
live_span: DatadogAPIClient::V1::WidgetLiveSpan::WEEK_TO_DATE,
}),
}),
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 @@ -18,7 +18,7 @@
DatadogAPIClient::V1::TimeseriesWidgetLegendColumn::VALUE,
DatadogAPIClient::V1::TimeseriesWidgetLegendColumn::SUM,
],
time: DatadogAPIClient::V1::WidgetTime.new({}),
time: DatadogAPIClient::V1::WidgetLegacyLiveSpan.new({}),
type: DatadogAPIClient::V1::TimeseriesWidgetDefinitionType::TIMESERIES,
requests: [
DatadogAPIClient::V1::TimeseriesWidgetRequest.new({
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/dashboards/CreateDashboard_2064651578.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
title: "",
title_size: "16",
title_align: DatadogAPIClient::V1::WidgetTextAlign::LEFT,
time: DatadogAPIClient::V1::WidgetTime.new({}),
time: DatadogAPIClient::V1::WidgetLegacyLiveSpan.new({}),
type: DatadogAPIClient::V1::ChangeWidgetDefinitionType::CHANGE,
requests: [
DatadogAPIClient::V1::ChangeWidgetRequest.new({
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/dashboards/CreateDashboard_2308247857.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
title: "",
title_size: "16",
title_align: DatadogAPIClient::V1::WidgetTextAlign::LEFT,
time: DatadogAPIClient::V1::WidgetTime.new({}),
time: DatadogAPIClient::V1::WidgetLegacyLiveSpan.new({}),
type: DatadogAPIClient::V1::AlertGraphWidgetDefinitionType::ALERT_GRAPH,
alert_id: "7",
viz_type: DatadogAPIClient::V1::WidgetVizType::TIMESERIES,
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/dashboards/CreateDashboard_2336428357.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
title: "",
title_size: "16",
title_align: DatadogAPIClient::V1::WidgetTextAlign::LEFT,
time: DatadogAPIClient::V1::WidgetTime.new({}),
time: DatadogAPIClient::V1::WidgetLegacyLiveSpan.new({}),
type: DatadogAPIClient::V1::TableWidgetDefinitionType::QUERY_TABLE,
requests: [
DatadogAPIClient::V1::TableWidgetRequest.new({
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/dashboards/CreateDashboard_2342457693.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
title: "",
title_size: "16",
title_align: DatadogAPIClient::V1::WidgetTextAlign::LEFT,
time: DatadogAPIClient::V1::WidgetTime.new({}),
time: DatadogAPIClient::V1::WidgetLegacyLiveSpan.new({}),
type: DatadogAPIClient::V1::ScatterPlotWidgetDefinitionType::SCATTERPLOT,
requests: DatadogAPIClient::V1::ScatterPlotWidgetDefinitionRequests.new({
table: DatadogAPIClient::V1::ScatterplotTableRequest.new({
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/dashboards/CreateDashboard_2349863258.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
title: "",
title_size: "16",
title_align: DatadogAPIClient::V1::WidgetTextAlign::LEFT,
time: DatadogAPIClient::V1::WidgetTime.new({}),
time: DatadogAPIClient::V1::WidgetLegacyLiveSpan.new({}),
type: DatadogAPIClient::V1::QueryValueWidgetDefinitionType::QUERY_VALUE,
requests: [
DatadogAPIClient::V1::QueryValueWidgetRequest.new({
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/dashboards/CreateDashboard_2563642929.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
title: "",
title_size: "16",
title_align: DatadogAPIClient::V1::WidgetTextAlign::LEFT,
time: DatadogAPIClient::V1::WidgetTime.new({}),
time: DatadogAPIClient::V1::WidgetLegacyLiveSpan.new({}),
style: DatadogAPIClient::V1::ToplistWidgetStyle.new({
display: DatadogAPIClient::V1::ToplistWidgetStacked.new({
type: DatadogAPIClient::V1::ToplistWidgetStackedType::STACKED,
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/dashboards/CreateDashboard_2610827685.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
title: "Run workflow title",
title_size: "16",
title_align: DatadogAPIClient::V1::WidgetTextAlign::LEFT,
time: DatadogAPIClient::V1::WidgetTime.new({}),
time: DatadogAPIClient::V1::WidgetLegacyLiveSpan.new({}),
type: DatadogAPIClient::V1::RunWorkflowWidgetDefinitionType::RUN_WORKFLOW,
workflow_id: "2e055f16-8b6a-4cdd-b452-17a34c44b160",
inputs: [
Expand Down
Loading
Loading