Skip to content

Commit d0dc370

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

File tree

7 files changed

+12
-26
lines changed

7 files changed

+12
-26
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 14:57:13.521035",
8-
"spec_repo_commit": "a5ef3fab"
7+
"regenerated": "2023-05-25 19:52:06.501650",
8+
"spec_repo_commit": "e4c04414"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.4",
12-
"regenerated": "2023-05-24 14:57:13.535784",
13-
"spec_repo_commit": "a5ef3fab"
12+
"regenerated": "2023-05-25 19:52:06.521319",
13+
"spec_repo_commit": "e4c04414"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4289,10 +4289,6 @@ 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
42964292
storage:
42974293
description: Option for storage location. Feature in Private Beta.
42984294
example: indexes

examples/v1/dashboards/CreateDashboard_2432046716.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
data_source=ListStreamSource.EVENT_STREAM,
3737
query_string="",
3838
event_size=WidgetEventSize.LARGE,
39-
show_year=True,
4039
),
4140
response_format=ListStreamResponseFormat.EVENT_LIST,
4241
),

src/datadog_api_client/v1/model/list_stream_query.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ def openapi_types(_):
4545
"group_by": ([ListStreamGroupByItems],),
4646
"indexes": ([str],),
4747
"query_string": (str,),
48-
"show_year": (bool,),
4948
"storage": (str,),
5049
}
5150

@@ -56,7 +55,6 @@ def openapi_types(_):
5655
"group_by": "group_by",
5756
"indexes": "indexes",
5857
"query_string": "query_string",
59-
"show_year": "show_year",
6058
"storage": "storage",
6159
}
6260

@@ -68,7 +66,6 @@ def __init__(
6866
event_size: Union[WidgetEventSize, UnsetType] = unset,
6967
group_by: Union[List[ListStreamGroupByItems], UnsetType] = unset,
7068
indexes: Union[List[str], UnsetType] = unset,
71-
show_year: Union[bool, UnsetType] = unset,
7269
storage: Union[str, UnsetType] = unset,
7370
**kwargs,
7471
):
@@ -93,9 +90,6 @@ def __init__(
9390
:param query_string: Widget query.
9491
:type query_string: str
9592
96-
:param show_year: Option to display the year in the date column. To be used with the ``event_stream``.
97-
:type show_year: bool, optional
98-
9993
:param storage: Option for storage location. Feature in Private Beta.
10094
:type storage: str, optional
10195
"""
@@ -107,8 +101,6 @@ def __init__(
107101
kwargs["group_by"] = group_by
108102
if indexes is not unset:
109103
kwargs["indexes"] = indexes
110-
if show_year is not unset:
111-
kwargs["show_year"] = show_year
112104
if storage is not unset:
113105
kwargs["storage"] = storage
114106
super().__init__(kwargs)
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2023-05-23T16:19:21.371Z
1+
2023-02-08T16:18:06.266Z

tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_event_stream_list_stream_widget.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
interactions:
22
- request:
3-
body: '{"layout_type":"ordered","title":"Test-Create_a_new_dashboard_with_event_stream_list_stream_widget-1684858761
4-
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"}}]}'
3+
body: '{"layout_type":"ordered","title":"Test-Create_a_new_dashboard_with_event_stream_list_stream_widget-1675873086
4+
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"}}]}'
55
headers:
66
accept:
77
- application/json
@@ -11,8 +11,8 @@ interactions:
1111
uri: https://api.datadoghq.com/api/v1/dashboard
1212
response:
1313
body:
14-
string: '{"id":"s56-ph7-gmi","title":"Test-Create_a_new_dashboard_with_event_stream_list_stream_widget-1684858761
15-
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":[]}
14+
string: '{"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
15+
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"}
1616
1717
'
1818
headers:
@@ -27,10 +27,10 @@ interactions:
2727
accept:
2828
- application/json
2929
method: DELETE
30-
uri: https://api.datadoghq.com/api/v1/dashboard/s56-ph7-gmi
30+
uri: https://api.datadoghq.com/api/v1/dashboard/zmh-rud-g4b
3131
response:
3232
body:
33-
string: '{"deleted_dashboard_id":"s56-ph7-gmi"}
33+
string: '{"deleted_dashboard_id":"zmh-rud-g4b"}
3434
3535
'
3636
headers:

tests/v1/features/dashboards.feature

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,14 +261,13 @@ 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", "show_year": true},"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"},"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
272271

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

0 commit comments

Comments
 (0)