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.4",
"regenerated": "2022-09-09 15:07:39.432310",
"spec_repo_commit": "0bdea812"
"regenerated": "2022-09-12 15:21:54.308244",
"spec_repo_commit": "dcd92077"
},
"v2": {
"apigentools_version": "1.6.4",
"regenerated": "2022-09-09 15:07:39.447908",
"spec_repo_commit": "0bdea812"
"regenerated": "2022-09-12 15:21:54.320601",
"spec_repo_commit": "dcd92077"
}
}
}
86 changes: 86 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13380,6 +13380,91 @@ components:
style:
$ref: '#/components/schemas/WidgetRequestStyle'
type: object
TopologyMapWidgetDefinition:
description: This widget displays a topology of nodes and edges for different
data sources. It replaces the service map widget.
properties:
custom_links:
description: List of custom links.
items:
$ref: '#/components/schemas/WidgetCustomLink'
type: array
requests:
description: One or more Topology requests.
items:
$ref: '#/components/schemas/TopologyRequest'
minItems: 1
type: array
title:
description: Title of your widget.
type: string
title_align:
$ref: '#/components/schemas/WidgetTextAlign'
title_size:
description: Size of the title.
type: string
type:
$ref: '#/components/schemas/TopologyMapWidgetDefinitionType'
required:
- type
- requests
type: object
TopologyMapWidgetDefinitionType:
default: topology_map
description: Type of the topology map widget.
enum:
- topology_map
example: topology_map
type: string
x-enum-varnames:
- TOPOLOGY_MAP
TopologyQuery:
description: Query to service-based topology data sources like the service map
or data streams.
properties:
data_source:
$ref: '#/components/schemas/TopologyQueryDataSource'
filters:
description: Your environment and primary tag (or * if enabled for your
account).
example:
- env:prod
- az:us-east
items:
description: Environment or primary tag, generally in a key:value format
type: string
minItems: 1
type: array
service:
description: Name of the service
example: myService
type: string
type: object
TopologyQueryDataSource:
description: Name of the data source
enum:
- data_streams
- service_map
type: string
x-enum-varnames:
- DATA_STREAMS
- SERVICE_MAP
TopologyRequest:
description: Request that will return nodes and edges to be used by topology
map.
properties:
query:
$ref: '#/components/schemas/TopologyQuery'
request_type:
$ref: '#/components/schemas/TopologyRequestType'
type: object
TopologyRequestType:
description: Widget request type.
enum:
- topology
type: string
x-enum-varnames:
- TOPOLOGY
TreeMapColorBy:
default: user
deprecated: true
Expand Down Expand Up @@ -16916,6 +17001,7 @@ components:
- $ref: '#/components/schemas/TreeMapWidgetDefinition'
- $ref: '#/components/schemas/ListStreamWidgetDefinition'
- $ref: '#/components/schemas/FunnelWidgetDefinition'
- $ref: '#/components/schemas/TopologyMapWidgetDefinition'
type: object
WidgetDisplayType:
description: Type of display to use for the request.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2022-09-12T15:16:05.847Z

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

43 changes: 43 additions & 0 deletions examples/v1/dashboards/CreateDashboard_2652180930.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Create a new dashboard with topology_map widget

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

body = DatadogAPIClient::V1::Dashboard.new({
title: "Example-Create_a_new_dashboard_with_topology_map_widget",
description: "",
widgets: [
DatadogAPIClient::V1::Widget.new({
layout: DatadogAPIClient::V1::WidgetLayout.new({
x: 0,
y: 0,
width: 47,
height: 15,
}),
definition: DatadogAPIClient::V1::TopologyMapWidgetDefinition.new({
title: "",
title_size: "16",
title_align: DatadogAPIClient::V1::WidgetTextAlign::LEFT,
type: DatadogAPIClient::V1::TopologyMapWidgetDefinitionType::TOPOLOGY_MAP,
requests: [
DatadogAPIClient::V1::TopologyRequest.new({
request_type: DatadogAPIClient::V1::TopologyRequestType::TOPOLOGY,
query: DatadogAPIClient::V1::TopologyQuery.new({
data_source: DatadogAPIClient::V1::TopologyQueryDataSource::SERVICE_MAP,
service: "",
filters: [
"env:none",
"environment:*",
],
}),
}),
],
}),
}),
],
template_variables: [],
layout_type: DatadogAPIClient::V1::DashboardLayoutType::FREE,
is_read_only: false,
notify_list: [],
})
p api_instance.create_dashboard(body)
12 changes: 12 additions & 0 deletions features/v1/dashboards.feature
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,18 @@ Feature: Dashboards
Then the response status is 200 OK
And the response "widgets[0].definition.type" is equal to "toplist"

@team:DataDog/dashboards
Scenario: Create a new dashboard with topology_map widget
Given new "CreateDashboard" request
And body from file "dashboards_json_payload/topology_map_widget.json"
When the request is sent
Then the response status is 200 OK
And the response "widgets[0].definition.type" is equal to "topology_map"
And the response "widgets[0].definition.requests[0].request_type" is equal to "topology"
And the response "widgets[0].definition.requests[0].query.data_source" is equal to "service_map"
And the response "widgets[0].definition.requests[0].query.service" is equal to ""
And the response "widgets[0].definition.requests[0].query.filters" is equal to ["env:none","environment:*"]

@team:DataDog/dashboards
Scenario: Create a new dashboard with trace_service widget
Given new "CreateDashboard" request
Expand Down
34 changes: 34 additions & 0 deletions features/v1/dashboards_json_payload/topology_map_widget.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"title": "{{ unique }}",
"description": "",
"widgets": [
{
"layout": {
"x": 0,
"y": 0,
"width": 47,
"height": 15
},
"definition": {
"title": "",
"title_size": "16",
"title_align": "left",
"type": "topology_map",
"requests": [
{
"request_type": "topology",
"query": {
"data_source": "service_map",
"service": "",
"filters": ["env:none", "environment:*"]
}
}
]
}
}
],
"template_variables": [],
"layout_type": "free",
"is_read_only": false,
"notify_list": []
}
6 changes: 6 additions & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,12 @@ def overrides
"v1.toplist_widget_definition" => "ToplistWidgetDefinition",
"v1.toplist_widget_definition_type" => "ToplistWidgetDefinitionType",
"v1.toplist_widget_request" => "ToplistWidgetRequest",
"v1.topology_map_widget_definition" => "TopologyMapWidgetDefinition",
"v1.topology_map_widget_definition_type" => "TopologyMapWidgetDefinitionType",
"v1.topology_query" => "TopologyQuery",
"v1.topology_query_data_source" => "TopologyQueryDataSource",
"v1.topology_request" => "TopologyRequest",
"v1.topology_request_type" => "TopologyRequestType",
"v1.tree_map_color_by" => "TreeMapColorBy",
"v1.tree_map_group_by" => "TreeMapGroupBy",
"v1.tree_map_size_by" => "TreeMapSizeBy",
Expand Down
Loading