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
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-11-20 20:14:17.376953",
"spec_repo_commit": "ebf27b5e"
"regenerated": "2024-11-20 21:48:38.093015",
"spec_repo_commit": "34905ccb"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-11-20 20:14:17.395595",
"spec_repo_commit": "ebf27b5e"
"regenerated": "2024-11-20 21:48:38.111701",
"spec_repo_commit": "34905ccb"
}
}
}
11 changes: 11 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4654,6 +4654,11 @@ components:
description: Widget column field.
example: content
type: string
is_clustering_pattern_field_path:
description: Identifies the clustering pattern field column, usable only
with logs_pattern_stream.
example: true
type: boolean
width:
$ref: '#/components/schemas/ListStreamColumnWidth'
required:
Expand Down Expand Up @@ -4733,6 +4738,12 @@ components:
ListStreamQuery:
description: Updated list stream widget.
properties:
clustering_pattern_field_path:
default: message
description: Specifies the field for logs pattern clustering. Usable only
with logs_pattern_stream.
example: message
type: string
compute:
description: Compute configuration for the List Stream Widget. Compute can
be used only with the logs_transaction_stream (from 1 to 5 items) list
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-11-15T19:32:46.627Z
2024-11-20T19:43:46.485Z

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

6 changes: 6 additions & 0 deletions examples/v1/dashboards/CreateDashboard_1039800684.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,16 @@
width: DatadogAPIClient::V1::ListStreamColumnWidth::AUTO,
field: "timestamp",
}),
DatadogAPIClient::V1::ListStreamColumn.new({
width: DatadogAPIClient::V1::ListStreamColumnWidth::AUTO,
field: "message",
is_clustering_pattern_field_path: true,
}),
],
query: DatadogAPIClient::V1::ListStreamQuery.new({
data_source: DatadogAPIClient::V1::ListStreamSource::LOGS_PATTERN_STREAM,
query_string: "",
clustering_pattern_field_path: "message",
group_by: [
DatadogAPIClient::V1::ListStreamGroupByItems.new({
facet: "service",
Expand Down
3 changes: 2 additions & 1 deletion features/v1/dashboards.feature
Original file line number Diff line number Diff line change
Expand Up @@ -534,11 +534,12 @@ Feature: Dashboards
@team:DataDog/dashboards-backend
Scenario: Create a new dashboard with logs_pattern_stream list_stream widget
Given new "CreateDashboard" request
And body with value {"layout_type": "ordered", "title": "{{ unique }} with list_stream widget","widgets": [{"definition": {"type": "list_stream","requests": [{"columns":[{"width":"auto","field":"timestamp"}],"query":{"data_source":"logs_pattern_stream","query_string":"","group_by":[{"facet":"service"}]},"response_format":"event_list"}]}}]}
And body with value {"layout_type": "ordered", "title": "{{ unique }} with list_stream widget","widgets": [{"definition": {"type": "list_stream","requests": [{"columns":[{"width":"auto","field":"timestamp"},{"width":"auto","field":"message", "is_clustering_pattern_field_path": true}],"query":{"data_source":"logs_pattern_stream","query_string":"","clustering_pattern_field_path":"message","group_by":[{"facet":"service"}]}, "response_format":"event_list"}]}}]}
When the request is sent
Then the response status is 200 OK
And the response "widgets[0].definition.requests[0].query.data_source" is equal to "logs_pattern_stream"
And the response "widgets[0].definition.requests[0].query.group_by[0].facet" is equal to "service"
And the response "widgets[0].definition.requests[0].query.clustering_pattern_field_path" is equal to "message"

@team:DataDog/dashboards-backend
Scenario: Create a new dashboard with logs_stream list_stream widget and storage parameter
Expand Down
12 changes: 11 additions & 1 deletion lib/datadog_api_client/v1/models/list_stream_column.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ class ListStreamColumn
# Widget column field.
attr_reader :field

# Identifies the clustering pattern field column, usable only with logs_pattern_stream.
attr_accessor :is_clustering_pattern_field_path

# Widget column width.
attr_reader :width

Expand All @@ -34,6 +37,7 @@ class ListStreamColumn
def self.attribute_map
{
:'field' => :'field',
:'is_clustering_pattern_field_path' => :'is_clustering_pattern_field_path',
:'width' => :'width'
}
end
Expand All @@ -43,6 +47,7 @@ def self.attribute_map
def self.openapi_types
{
:'field' => :'String',
:'is_clustering_pattern_field_path' => :'Boolean',
:'width' => :'ListStreamColumnWidth'
}
end
Expand All @@ -69,6 +74,10 @@ def initialize(attributes = {})
self.field = attributes[:'field']
end

if attributes.key?(:'is_clustering_pattern_field_path')
self.is_clustering_pattern_field_path = attributes[:'is_clustering_pattern_field_path']
end

if attributes.key?(:'width')
self.width = attributes[:'width']
end
Expand Down Expand Up @@ -130,6 +139,7 @@ def ==(o)
return true if self.equal?(o)
self.class == o.class &&
field == o.field &&
is_clustering_pattern_field_path == o.is_clustering_pattern_field_path &&
width == o.width
additional_properties == o.additional_properties
end
Expand All @@ -138,7 +148,7 @@ def ==(o)
# @return [Integer] Hash code
# @!visibility private
def hash
[field, width].hash
[field, is_clustering_pattern_field_path, width].hash
end
end
end
12 changes: 11 additions & 1 deletion lib/datadog_api_client/v1/models/list_stream_query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ module DatadogAPIClient::V1
class ListStreamQuery
include BaseGenericModel

# Specifies the field for logs pattern clustering. Usable only with logs_pattern_stream.
attr_accessor :clustering_pattern_field_path

# Compute configuration for the List Stream Widget. Compute can be used only with the logs_transaction_stream (from 1 to 5 items) list stream source.
attr_reader :compute

Expand Down Expand Up @@ -51,6 +54,7 @@ class ListStreamQuery
# @!visibility private
def self.attribute_map
{
:'clustering_pattern_field_path' => :'clustering_pattern_field_path',
:'compute' => :'compute',
:'data_source' => :'data_source',
:'event_size' => :'event_size',
Expand All @@ -66,6 +70,7 @@ def self.attribute_map
# @!visibility private
def self.openapi_types
{
:'clustering_pattern_field_path' => :'String',
:'compute' => :'Array<ListStreamComputeItems>',
:'data_source' => :'ListStreamSource',
:'event_size' => :'WidgetEventSize',
Expand Down Expand Up @@ -95,6 +100,10 @@ def initialize(attributes = {})
end
}

if attributes.key?(:'clustering_pattern_field_path')
self.clustering_pattern_field_path = attributes[:'clustering_pattern_field_path']
end

if attributes.key?(:'compute')
if (value = attributes[:'compute']).is_a?(Array)
self.compute = value
Expand Down Expand Up @@ -215,6 +224,7 @@ def to_hash
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
clustering_pattern_field_path == o.clustering_pattern_field_path &&
compute == o.compute &&
data_source == o.data_source &&
event_size == o.event_size &&
Expand All @@ -230,7 +240,7 @@ def ==(o)
# @return [Integer] Hash code
# @!visibility private
def hash
[compute, data_source, event_size, group_by, indexes, query_string, sort, storage].hash
[clustering_pattern_field_path, compute, data_source, event_size, group_by, indexes, query_string, sort, storage].hash
end
end
end
Loading