Skip to content

Commit 412f33e

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add show_year option for event list widget (#1154)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent e74350e commit 412f33e

File tree

7 files changed

+37
-23
lines changed

7 files changed

+37
-23
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-24 13:15:52.349852",
8-
"spec_repo_commit": "61d57b72"
7+
"regenerated": "2023-05-24 14:20:11.109038",
8+
"spec_repo_commit": "89276ce5"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.4",
12-
"regenerated": "2023-05-24 13:15:52.364402",
13-
"spec_repo_commit": "61d57b72"
12+
"regenerated": "2023-05-24 14:20:11.121453",
13+
"spec_repo_commit": "89276ce5"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4289,6 +4289,10 @@ components:
42894289
description: Widget query.
42904290
example: '@service:app'
42914291
type: string
4292+
show_year:
4293+
description: Option to display the year in the date column. To be used with
4294+
the `event_stream`.
4295+
type: boolean
42924296
storage:
42934297
description: Option for storage location. Feature in Private Beta.
42944298
example: indexes
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2023-02-08T16:18:06.266Z"
1+
"2023-05-23T16:19:21.371Z"

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

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
},
99
"entries": [
1010
{
11-
"_id": "e13a56fb8e7ecc8fcccd1dc11cfaf098",
11+
"_id": "3b2bfad3f58d6875c744251ff9e36f51",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
15-
"bodySize": 354,
15+
"bodySize": 371,
1616
"cookies": [],
1717
"headers": [
1818
{
@@ -26,23 +26,23 @@
2626
"value": "application/json"
2727
}
2828
],
29-
"headersSize": 559,
29+
"headersSize": 557,
3030
"httpVersion": "HTTP/1.1",
3131
"method": "POST",
3232
"postData": {
3333
"mimeType": "application/json",
3434
"params": [],
35-
"text": "{\"layout_type\":\"ordered\",\"title\":\"Test-Create_a_new_dashboard_with_event_stream_list_stream_widget-1675873086 with list_stream widget\",\"widgets\":[{\"definition\":{\"requests\":[{\"columns\":[{\"field\":\"timestamp\",\"width\":\"auto\"}],\"query\":{\"data_source\":\"event_stream\",\"event_size\":\"l\",\"query_string\":\"\"},\"response_format\":\"event_list\"}],\"type\":\"list_stream\"}}]}"
35+
"text": "{\"layout_type\":\"ordered\",\"title\":\"Test-Create_a_new_dashboard_with_event_stream_list_stream_widget-1684858761 with list_stream widget\",\"widgets\":[{\"definition\":{\"requests\":[{\"columns\":[{\"field\":\"timestamp\",\"width\":\"auto\"}],\"query\":{\"data_source\":\"event_stream\",\"event_size\":\"l\",\"query_string\":\"\",\"show_year\":true},\"response_format\":\"event_list\"}],\"type\":\"list_stream\"}}]}"
3636
},
3737
"queryString": [],
3838
"url": "https://api.datadoghq.com/api/v1/dashboard"
3939
},
4040
"response": {
41-
"bodySize": 768,
41+
"bodySize": 785,
4242
"content": {
4343
"mimeType": "application/json",
44-
"size": 768,
45-
"text": "{\"notify_list\":null,\"description\":null,\"restricted_roles\":[],\"author_name\":null,\"template_variables\":null,\"is_read_only\":false,\"id\":\"zmh-rud-g4b\",\"title\":\"Test-Create_a_new_dashboard_with_event_stream_list_stream_widget-1675873086 with list_stream widget\",\"url\":\"/dashboard/zmh-rud-g4b/test-createanewdashboardwitheventstreamliststreamwidget-1675873086-with-liststre\",\"created_at\":\"2023-02-08T16:18:06.512655+00:00\",\"modified_at\":\"2023-02-08T16:18:06.512655+00:00\",\"author_handle\":\"[email protected]\",\"widgets\":[{\"definition\":{\"requests\":[{\"query\":{\"query_string\":\"\",\"data_source\":\"event_stream\",\"event_size\":\"l\"},\"response_format\":\"event_list\",\"columns\":[{\"field\":\"timestamp\",\"width\":\"auto\"}]}],\"type\":\"list_stream\"},\"id\":3303593204363469}],\"layout_type\":\"ordered\"}\n"
44+
"size": 785,
45+
"text": "{\"id\":\"s56-ph7-gmi\",\"title\":\"Test-Create_a_new_dashboard_with_event_stream_list_stream_widget-1684858761 with list_stream widget\",\"description\":null,\"author_handle\":\"[email protected]\",\"author_name\":null,\"layout_type\":\"ordered\",\"url\":\"/dashboard/s56-ph7-gmi/test-createanewdashboardwitheventstreamliststreamwidget-1684858761-with-liststre\",\"is_read_only\":false,\"template_variables\":null,\"widgets\":[{\"definition\":{\"requests\":[{\"columns\":[{\"field\":\"timestamp\",\"width\":\"auto\"}],\"query\":{\"data_source\":\"event_stream\",\"event_size\":\"l\",\"query_string\":\"\",\"show_year\":true},\"response_format\":\"event_list\"}],\"type\":\"list_stream\"},\"id\":3197043212239739}],\"notify_list\":null,\"created_at\":\"2023-05-23T16:19:21.576643+00:00\",\"modified_at\":\"2023-05-23T16:19:21.576643+00:00\",\"restricted_roles\":[]}\n"
4646
},
4747
"cookies": [],
4848
"headers": [
@@ -51,17 +51,17 @@
5151
"value": "application/json"
5252
}
5353
],
54-
"headersSize": 490,
54+
"headersSize": 517,
5555
"httpVersion": "HTTP/1.1",
5656
"redirectURL": "",
5757
"status": 200,
5858
"statusText": "OK"
5959
},
60-
"startedDateTime": "2023-02-08T16:18:06.275Z",
61-
"time": 272
60+
"startedDateTime": "2023-05-23T16:19:21.388Z",
61+
"time": 246
6262
},
6363
{
64-
"_id": "ee1b2016b8d93d3f4959f703304bf7c6",
64+
"_id": "a93850478692fdce320fae4670782faa",
6565
"_order": 0,
6666
"cache": {},
6767
"request": {
@@ -74,18 +74,18 @@
7474
"value": "application/json"
7575
}
7676
],
77-
"headersSize": 520,
77+
"headersSize": 518,
7878
"httpVersion": "HTTP/1.1",
7979
"method": "DELETE",
8080
"queryString": [],
81-
"url": "https://api.datadoghq.com/api/v1/dashboard/zmh-rud-g4b"
81+
"url": "https://api.datadoghq.com/api/v1/dashboard/s56-ph7-gmi"
8282
},
8383
"response": {
8484
"bodySize": 39,
8585
"content": {
8686
"mimeType": "application/json",
8787
"size": 39,
88-
"text": "{\"deleted_dashboard_id\":\"zmh-rud-g4b\"}\n"
88+
"text": "{\"deleted_dashboard_id\":\"s56-ph7-gmi\"}\n"
8989
},
9090
"cookies": [],
9191
"headers": [
@@ -94,14 +94,14 @@
9494
"value": "application/json"
9595
}
9696
],
97-
"headersSize": 489,
97+
"headersSize": 516,
9898
"httpVersion": "HTTP/1.1",
9999
"redirectURL": "",
100100
"status": 200,
101101
"statusText": "OK"
102102
},
103-
"startedDateTime": "2023-02-08T16:18:06.574Z",
104-
"time": 215
103+
"startedDateTime": "2023-05-23T16:19:21.645Z",
104+
"time": 173
105105
}
106106
],
107107
"pages": [],

examples/v1/dashboards/CreateDashboard_2432046716.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const params: v1.DashboardsApiCreateDashboardRequest = {
2727
dataSource: "event_stream",
2828
queryString: "",
2929
eventSize: "l",
30+
showYear: true,
3031
},
3132
responseFormat: "event_list",
3233
},

features/v1/dashboards.feature

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,13 +261,14 @@ Feature: Dashboards
261261
@team:DataDog/dashboards-backend
262262
Scenario: Create a new dashboard with event_stream list_stream widget
263263
Given new "CreateDashboard" request
264-
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": "event_stream","query_string": "","event_size": "l"},"response_format": "event_list"}]}}]}
264+
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": "event_stream","query_string": "","event_size": "l", "show_year": true},"response_format": "event_list"}]}}]}
265265
When the request is sent
266266
Then the response status is 200 OK
267267
And the response "widgets[0].definition.type" is equal to "list_stream"
268268
And the response "widgets[0].definition.requests[0].response_format" is equal to "event_list"
269269
And the response "widgets[0].definition.requests[0].query.data_source" is equal to "event_stream"
270270
And the response "widgets[0].definition.requests[0].query.event_size" is equal to "l"
271+
And the response "widgets[0].definition.requests[0].query.show_year" is equal to true
271272

272273
@team:DataDog/dashboards-backend
273274
Scenario: Create a new dashboard with event_stream widget

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ export class ListStreamQuery {
3838
* Widget query.
3939
*/
4040
"queryString": string;
41+
/**
42+
* Option to display the year in the date column. To be used with the `event_stream`.
43+
*/
44+
"showYear"?: boolean;
4145
/**
4246
* Option for storage location. Feature in Private Beta.
4347
*/
@@ -78,6 +82,10 @@ export class ListStreamQuery {
7882
type: "string",
7983
required: true,
8084
},
85+
showYear: {
86+
baseName: "show_year",
87+
type: "boolean",
88+
},
8189
storage: {
8290
baseName: "storage",
8391
type: "string",

0 commit comments

Comments
 (0)