Skip to content

Commit bd8d683

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add show_year option for event stream widget (#1147)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 57f83df commit bd8d683

File tree

8 files changed

+39
-25
lines changed

8 files changed

+39
-25
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.4",
7-
"regenerated": "2023-05-17 20:58:15.183994",
8-
"spec_repo_commit": "d8186149"
7+
"regenerated": "2023-05-19 14:45:08.510425",
8+
"spec_repo_commit": "937a9438"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.4",
12-
"regenerated": "2023-05-17 20:58:15.204157",
13-
"spec_repo_commit": "d8186149"
12+
"regenerated": "2023-05-19 14:45:08.523508",
13+
"spec_repo_commit": "937a9438"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2234,6 +2234,9 @@ components:
22342234
description: Query to filter the event stream with.
22352235
example: ''
22362236
type: string
2237+
show_year:
2238+
description: Option to display the year in the date column.
2239+
type: boolean
22372240
tags_execution:
22382241
description: The execution method for multi-value filters. Can be either
22392242
and or or.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2022-01-06T00:50:30.857Z"
1+
"2023-05-19T14:24:41.183Z"

cassettes/v1/Dashboards_1335235736/Create-a-new-dashboard-with-event_stream-widget_2820487547/recording.har

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
},
99
"entries": [
1010
{
11-
"_id": "3879fec4f6fa1c422ce3f6a535a94a13",
11+
"_id": "ed8b7422b62cf4715c891834a8c8a955",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
15-
"bodySize": 386,
15+
"bodySize": 403,
1616
"cookies": [],
1717
"headers": [
1818
{
@@ -26,23 +26,23 @@
2626
"value": "application/json"
2727
}
2828
],
29-
"headersSize": 474,
29+
"headersSize": 557,
3030
"httpVersion": "HTTP/1.1",
3131
"method": "POST",
3232
"postData": {
3333
"mimeType": "application/json",
3434
"params": [],
35-
"text": "{\"description\":\"\",\"is_read_only\":false,\"layout_type\":\"free\",\"notify_list\":[],\"template_variables\":[],\"title\":\"Test-Create_a_new_dashboard_with_event_stream_widget-1641430230\",\"widgets\":[{\"definition\":{\"event_size\":\"s\",\"query\":\"example-query\",\"tags_execution\":\"and\",\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"event_stream\"},\"layout\":{\"height\":38,\"width\":47,\"x\":0,\"y\":0}}]}"
35+
"text": "{\"description\":\"\",\"is_read_only\":false,\"layout_type\":\"free\",\"notify_list\":[],\"template_variables\":[],\"title\":\"Test-Create_a_new_dashboard_with_event_stream_widget-1684506281\",\"widgets\":[{\"definition\":{\"event_size\":\"s\",\"query\":\"example-query\",\"show_year\":true,\"tags_execution\":\"and\",\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"event_stream\"},\"layout\":{\"height\":38,\"width\":47,\"x\":0,\"y\":0}}]}"
3636
},
3737
"queryString": [],
3838
"url": "https://api.datadoghq.com/api/v1/dashboard"
3939
},
4040
"response": {
41-
"bodySize": 690,
41+
"bodySize": 708,
4242
"content": {
4343
"mimeType": "application/json",
44-
"size": 690,
45-
"text": "{\"notify_list\":[],\"description\":\"\",\"restricted_roles\":[],\"author_name\":null,\"template_variables\":[],\"is_read_only\":false,\"id\":\"2dc-bzm-gzi\",\"title\":\"Test-Create_a_new_dashboard_with_event_stream_widget-1641430230\",\"url\":\"/dashboard/2dc-bzm-gzi/test-createanewdashboardwitheventstreamwidget-1641430230\",\"created_at\":\"2022-01-06T00:50:31.037679+00:00\",\"modified_at\":\"2022-01-06T00:50:31.037679+00:00\",\"author_handle\":\"[email protected]\",\"widgets\":[{\"definition\":{\"title_size\":\"16\",\"title\":\"\",\"title_align\":\"left\",\"tags_execution\":\"and\",\"query\":\"example-query\",\"type\":\"event_stream\",\"event_size\":\"s\"},\"layout\":{\"y\":0,\"width\":47,\"x\":0,\"height\":38},\"id\":5676594590872385}],\"layout_type\":\"free\"}"
44+
"size": 708,
45+
"text": "{\"id\":\"6fx-j89-9ip\",\"title\":\"Test-Create_a_new_dashboard_with_event_stream_widget-1684506281\",\"description\":\"\",\"author_handle\":\"[email protected]\",\"author_name\":null,\"layout_type\":\"free\",\"url\":\"/dashboard/6fx-j89-9ip/test-createanewdashboardwitheventstreamwidget-1684506281\",\"is_read_only\":false,\"template_variables\":[],\"widgets\":[{\"definition\":{\"event_size\":\"s\",\"query\":\"example-query\",\"show_year\":true,\"tags_execution\":\"and\",\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"event_stream\"},\"layout\":{\"height\":38,\"width\":47,\"x\":0,\"y\":0},\"id\":4666982916800865}],\"notify_list\":[],\"created_at\":\"2023-05-19T14:24:41.495188+00:00\",\"modified_at\":\"2023-05-19T14:24:41.495188+00:00\",\"restricted_roles\":[]}\n"
4646
},
4747
"cookies": [],
4848
"headers": [
@@ -51,17 +51,17 @@
5151
"value": "application/json"
5252
}
5353
],
54-
"headersSize": 383,
54+
"headersSize": 517,
5555
"httpVersion": "HTTP/1.1",
5656
"redirectURL": "",
5757
"status": 200,
5858
"statusText": "OK"
5959
},
60-
"startedDateTime": "2022-01-06T00:50:30.864Z",
61-
"time": 275
60+
"startedDateTime": "2023-05-19T14:24:41.201Z",
61+
"time": 351
6262
},
6363
{
64-
"_id": "ff9ac10a9fbffe0210a1d64f998e8483",
64+
"_id": "c143cfa0caede40ec402fd1bd378319f",
6565
"_order": 0,
6666
"cache": {},
6767
"request": {
@@ -74,18 +74,18 @@
7474
"value": "application/json"
7575
}
7676
],
77-
"headersSize": 435,
77+
"headersSize": 519,
7878
"httpVersion": "HTTP/1.1",
7979
"method": "DELETE",
8080
"queryString": [],
81-
"url": "https://api.datadoghq.com/api/v1/dashboard/2dc-bzm-gzi"
81+
"url": "https://api.datadoghq.com/api/v1/dashboard/6fx-j89-9ip"
8282
},
8383
"response": {
84-
"bodySize": 38,
84+
"bodySize": 39,
8585
"content": {
8686
"mimeType": "application/json",
87-
"size": 38,
88-
"text": "{\"deleted_dashboard_id\":\"2dc-bzm-gzi\"}"
87+
"size": 39,
88+
"text": "{\"deleted_dashboard_id\":\"6fx-j89-9ip\"}\n"
8989
},
9090
"cookies": [],
9191
"headers": [
@@ -94,14 +94,14 @@
9494
"value": "application/json"
9595
}
9696
],
97-
"headersSize": 382,
97+
"headersSize": 516,
9898
"httpVersion": "HTTP/1.1",
9999
"redirectURL": "",
100100
"status": 200,
101101
"statusText": "OK"
102102
},
103-
"startedDateTime": "2022-01-06T00:50:31.147Z",
104-
"time": 367
103+
"startedDateTime": "2023-05-19T14:24:41.564Z",
104+
"time": 269
105105
}
106106
],
107107
"pages": [],

examples/v1/dashboards/CreateDashboard_2634813877.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const params: v1.DashboardsApiCreateDashboardRequest = {
2727
query: "example-query",
2828
tagsExecution: "and",
2929
eventSize: "s",
30+
showYear: true,
3031
},
3132
},
3233
],

features/v1/dashboards.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ Feature: Dashboards
277277
Then the response status is 200 OK
278278
And the response "widgets[0].definition.type" is equal to "event_stream"
279279
And the response "widgets[0].definition.query" is equal to "example-query"
280+
And the response "widgets[0].definition.show_year" is equal to true
280281

281282
@team:DataDog/dashboards-backend
282283
Scenario: Create a new dashboard with event_timeline widget

features/v1/dashboards_json_payload/event_stream_widget.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"type":"event_stream",
1717
"query":"example-query",
1818
"tags_execution":"and",
19-
"event_size":"s"
19+
"event_size":"s",
20+
"show_year": true
2021
}
2122
}
2223
],

packages/datadog-api-client-v1/models/EventStreamWidgetDefinition.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ export class EventStreamWidgetDefinition {
2323
* Query to filter the event stream with.
2424
*/
2525
"query": string;
26+
/**
27+
* Option to display the year in the date column.
28+
*/
29+
"showYear"?: boolean;
2630
/**
2731
* The execution method for multi-value filters. Can be either and or or.
2832
*/
@@ -66,6 +70,10 @@ export class EventStreamWidgetDefinition {
6670
type: "string",
6771
required: true,
6872
},
73+
showYear: {
74+
baseName: "show_year",
75+
type: "boolean",
76+
},
6977
tagsExecution: {
7078
baseName: "tags_execution",
7179
type: "string",

0 commit comments

Comments
 (0)