Skip to content

Commit

Permalink
Change event_query property to use log query definition in dashboard …
Browse files Browse the repository at this point in the history
…widgets (#573)

* change event_query data source -> EventQueryDefinition to LogQueryDefinition
add legacy_event_query data source -> LogQueryDefinition

* remove deprecated widgets based on the old definition of `event_query`.
Since the new `event_query` query definition is the same as log we don't need to add additional tests

* add tests for event_query data source

* Regenerate client from commit bea8b79 of spec repo

Co-authored-by: MichaelTROEHLER <michael.troehler@datadoghq.com>
Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
  • Loading branch information
3 people authored Nov 18, 2020
1 parent a71345b commit 0982eed
Show file tree
Hide file tree
Showing 21 changed files with 292 additions and 274 deletions.
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.3.0",
"regenerated": "2020-11-17 16:22:27.031496",
"spec_repo_commit": "96d901b"
"regenerated": "2020-11-17 18:40:45.694224",
"spec_repo_commit": "bea8b79"
},
"v2": {
"apigentools_version": "1.3.0",
"regenerated": "2020-11-17 16:22:32.970149",
"spec_repo_commit": "96d901b"
"regenerated": "2020-11-17 18:40:51.132813",
"spec_repo_commit": "bea8b79"
}
}
}
16 changes: 8 additions & 8 deletions api/v1/datadog/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7449,7 +7449,7 @@ components:
compare_to:
$ref: '#/components/schemas/WidgetCompareTo'
event_query:
$ref: '#/components/schemas/EventQueryDefinition'
$ref: '#/components/schemas/LogQueryDefinition'
increase_good:
description: Whether to show increase as good.
type: boolean
Expand Down Expand Up @@ -7945,7 +7945,7 @@ components:
apm_query:
$ref: '#/components/schemas/LogQueryDefinition'
event_query:
$ref: '#/components/schemas/EventQueryDefinition'
$ref: '#/components/schemas/LogQueryDefinition'
log_query:
$ref: '#/components/schemas/LogQueryDefinition'
network_query:
Expand Down Expand Up @@ -8897,7 +8897,7 @@ components:
apm_query:
$ref: '#/components/schemas/LogQueryDefinition'
event_query:
$ref: '#/components/schemas/EventQueryDefinition'
$ref: '#/components/schemas/LogQueryDefinition'
log_query:
$ref: '#/components/schemas/LogQueryDefinition'
network_query:
Expand Down Expand Up @@ -11980,7 +11980,7 @@ components:
$ref: '#/components/schemas/WidgetConditionalFormat'
type: array
event_query:
$ref: '#/components/schemas/EventQueryDefinition'
$ref: '#/components/schemas/LogQueryDefinition'
log_query:
$ref: '#/components/schemas/LogQueryDefinition'
network_query:
Expand Down Expand Up @@ -12571,7 +12571,7 @@ components:
apm_query:
$ref: '#/components/schemas/LogQueryDefinition'
event_query:
$ref: '#/components/schemas/EventQueryDefinition'
$ref: '#/components/schemas/LogQueryDefinition'
log_query:
$ref: '#/components/schemas/LogQueryDefinition'
network_query:
Expand Down Expand Up @@ -15299,7 +15299,7 @@ components:
$ref: '#/components/schemas/WidgetConditionalFormat'
type: array
event_query:
$ref: '#/components/schemas/EventQueryDefinition'
$ref: '#/components/schemas/LogQueryDefinition'
limit:
description: For metric queries, the number of lines to show in the table.
Only one request should have this property.
Expand Down Expand Up @@ -15428,7 +15428,7 @@ components:
display_type:
$ref: '#/components/schemas/WidgetDisplayType'
event_query:
$ref: '#/components/schemas/EventQueryDefinition'
$ref: '#/components/schemas/LogQueryDefinition'
log_query:
$ref: '#/components/schemas/LogQueryDefinition'
metadata:
Expand Down Expand Up @@ -15511,7 +15511,7 @@ components:
minItems: 1
type: array
event_query:
$ref: '#/components/schemas/EventQueryDefinition'
$ref: '#/components/schemas/LogQueryDefinition'
log_query:
$ref: '#/components/schemas/LogQueryDefinition'
network_query:
Expand Down
8 changes: 4 additions & 4 deletions api/v1/datadog/docs/ChangeWidgetRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Name | Type | Description | Notes
**ApmQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional]
**ChangeType** | Pointer to [**WidgetChangeType**](WidgetChangeType.md) | | [optional]
**CompareTo** | Pointer to [**WidgetCompareTo**](WidgetCompareTo.md) | | [optional]
**EventQuery** | Pointer to [**EventQueryDefinition**](EventQueryDefinition.md) | | [optional]
**EventQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional]
**IncreaseGood** | Pointer to **bool** | Whether to show increase as good. | [optional]
**LogQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional]
**NetworkQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional]
Expand Down Expand Up @@ -115,20 +115,20 @@ HasCompareTo returns a boolean if a field has been set.

### GetEventQuery

`func (o *ChangeWidgetRequest) GetEventQuery() EventQueryDefinition`
`func (o *ChangeWidgetRequest) GetEventQuery() LogQueryDefinition`

GetEventQuery returns the EventQuery field if non-nil, zero value otherwise.

### GetEventQueryOk

`func (o *ChangeWidgetRequest) GetEventQueryOk() (*EventQueryDefinition, bool)`
`func (o *ChangeWidgetRequest) GetEventQueryOk() (*LogQueryDefinition, bool)`

GetEventQueryOk returns a tuple with the EventQuery field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetEventQuery

`func (o *ChangeWidgetRequest) SetEventQuery(v EventQueryDefinition)`
`func (o *ChangeWidgetRequest) SetEventQuery(v LogQueryDefinition)`

SetEventQuery sets EventQuery field to given value.

Expand Down
8 changes: 4 additions & 4 deletions api/v1/datadog/docs/DistributionWidgetRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ApmQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional]
**EventQuery** | Pointer to [**EventQueryDefinition**](EventQueryDefinition.md) | | [optional]
**EventQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional]
**LogQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional]
**NetworkQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional]
**ProcessQuery** | Pointer to [**ProcessQueryDefinition**](ProcessQueryDefinition.md) | | [optional]
Expand Down Expand Up @@ -60,20 +60,20 @@ HasApmQuery returns a boolean if a field has been set.

### GetEventQuery

`func (o *DistributionWidgetRequest) GetEventQuery() EventQueryDefinition`
`func (o *DistributionWidgetRequest) GetEventQuery() LogQueryDefinition`

GetEventQuery returns the EventQuery field if non-nil, zero value otherwise.

### GetEventQueryOk

`func (o *DistributionWidgetRequest) GetEventQueryOk() (*EventQueryDefinition, bool)`
`func (o *DistributionWidgetRequest) GetEventQueryOk() (*LogQueryDefinition, bool)`

GetEventQueryOk returns a tuple with the EventQuery field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetEventQuery

`func (o *DistributionWidgetRequest) SetEventQuery(v EventQueryDefinition)`
`func (o *DistributionWidgetRequest) SetEventQuery(v LogQueryDefinition)`

SetEventQuery sets EventQuery field to given value.

Expand Down
8 changes: 4 additions & 4 deletions api/v1/datadog/docs/HostMapRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ApmQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional]
**EventQuery** | Pointer to [**EventQueryDefinition**](EventQueryDefinition.md) | | [optional]
**EventQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional]
**LogQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional]
**NetworkQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional]
**ProcessQuery** | Pointer to [**ProcessQueryDefinition**](ProcessQueryDefinition.md) | | [optional]
Expand Down Expand Up @@ -59,20 +59,20 @@ HasApmQuery returns a boolean if a field has been set.

### GetEventQuery

`func (o *HostMapRequest) GetEventQuery() EventQueryDefinition`
`func (o *HostMapRequest) GetEventQuery() LogQueryDefinition`

GetEventQuery returns the EventQuery field if non-nil, zero value otherwise.

### GetEventQueryOk

`func (o *HostMapRequest) GetEventQueryOk() (*EventQueryDefinition, bool)`
`func (o *HostMapRequest) GetEventQueryOk() (*LogQueryDefinition, bool)`

GetEventQueryOk returns a tuple with the EventQuery field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetEventQuery

`func (o *HostMapRequest) SetEventQuery(v EventQueryDefinition)`
`func (o *HostMapRequest) SetEventQuery(v LogQueryDefinition)`

SetEventQuery sets EventQuery field to given value.

Expand Down
8 changes: 4 additions & 4 deletions api/v1/datadog/docs/QueryValueWidgetRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Name | Type | Description | Notes
**Aggregator** | Pointer to [**WidgetAggregator**](WidgetAggregator.md) | | [optional]
**ApmQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional]
**ConditionalFormats** | Pointer to [**[]WidgetConditionalFormat**](WidgetConditionalFormat.md) | List of conditional formats. | [optional]
**EventQuery** | Pointer to [**EventQueryDefinition**](EventQueryDefinition.md) | | [optional]
**EventQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional]
**LogQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional]
**NetworkQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional]
**ProcessQuery** | Pointer to [**ProcessQueryDefinition**](ProcessQueryDefinition.md) | | [optional]
Expand Down Expand Up @@ -111,20 +111,20 @@ HasConditionalFormats returns a boolean if a field has been set.

### GetEventQuery

`func (o *QueryValueWidgetRequest) GetEventQuery() EventQueryDefinition`
`func (o *QueryValueWidgetRequest) GetEventQuery() LogQueryDefinition`

GetEventQuery returns the EventQuery field if non-nil, zero value otherwise.

### GetEventQueryOk

`func (o *QueryValueWidgetRequest) GetEventQueryOk() (*EventQueryDefinition, bool)`
`func (o *QueryValueWidgetRequest) GetEventQueryOk() (*LogQueryDefinition, bool)`

GetEventQueryOk returns a tuple with the EventQuery field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetEventQuery

`func (o *QueryValueWidgetRequest) SetEventQuery(v EventQueryDefinition)`
`func (o *QueryValueWidgetRequest) SetEventQuery(v LogQueryDefinition)`

SetEventQuery sets EventQuery field to given value.

Expand Down
8 changes: 4 additions & 4 deletions api/v1/datadog/docs/ScatterPlotRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Aggregator** | Pointer to [**WidgetAggregator**](WidgetAggregator.md) | | [optional]
**ApmQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional]
**EventQuery** | Pointer to [**EventQueryDefinition**](EventQueryDefinition.md) | | [optional]
**EventQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional]
**LogQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional]
**NetworkQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional]
**ProcessQuery** | Pointer to [**ProcessQueryDefinition**](ProcessQueryDefinition.md) | | [optional]
Expand Down Expand Up @@ -85,20 +85,20 @@ HasApmQuery returns a boolean if a field has been set.

### GetEventQuery

`func (o *ScatterPlotRequest) GetEventQuery() EventQueryDefinition`
`func (o *ScatterPlotRequest) GetEventQuery() LogQueryDefinition`

GetEventQuery returns the EventQuery field if non-nil, zero value otherwise.

### GetEventQueryOk

`func (o *ScatterPlotRequest) GetEventQueryOk() (*EventQueryDefinition, bool)`
`func (o *ScatterPlotRequest) GetEventQueryOk() (*LogQueryDefinition, bool)`

GetEventQueryOk returns a tuple with the EventQuery field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetEventQuery

`func (o *ScatterPlotRequest) SetEventQuery(v EventQueryDefinition)`
`func (o *ScatterPlotRequest) SetEventQuery(v LogQueryDefinition)`

SetEventQuery sets EventQuery field to given value.

Expand Down
8 changes: 4 additions & 4 deletions api/v1/datadog/docs/TableWidgetRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Name | Type | Description | Notes
**ApmStatsQuery** | Pointer to [**ApmStatsQueryDefinition**](ApmStatsQueryDefinition.md) | | [optional]
**CellDisplayMode** | Pointer to [**[]TableWidgetCellDisplayMode**](TableWidgetCellDisplayMode.md) | A list of display modes for each table cell. | [optional]
**ConditionalFormats** | Pointer to [**[]WidgetConditionalFormat**](WidgetConditionalFormat.md) | List of conditional formats. | [optional]
**EventQuery** | Pointer to [**EventQueryDefinition**](EventQueryDefinition.md) | | [optional]
**EventQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional]
**Limit** | Pointer to **int64** | For metric queries, the number of lines to show in the table. Only one request should have this property. | [optional]
**LogQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional]
**NetworkQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional]
Expand Down Expand Up @@ -191,20 +191,20 @@ HasConditionalFormats returns a boolean if a field has been set.

### GetEventQuery

`func (o *TableWidgetRequest) GetEventQuery() EventQueryDefinition`
`func (o *TableWidgetRequest) GetEventQuery() LogQueryDefinition`

GetEventQuery returns the EventQuery field if non-nil, zero value otherwise.

### GetEventQueryOk

`func (o *TableWidgetRequest) GetEventQueryOk() (*EventQueryDefinition, bool)`
`func (o *TableWidgetRequest) GetEventQueryOk() (*LogQueryDefinition, bool)`

GetEventQueryOk returns a tuple with the EventQuery field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetEventQuery

`func (o *TableWidgetRequest) SetEventQuery(v EventQueryDefinition)`
`func (o *TableWidgetRequest) SetEventQuery(v LogQueryDefinition)`

SetEventQuery sets EventQuery field to given value.

Expand Down
8 changes: 4 additions & 4 deletions api/v1/datadog/docs/TimeseriesWidgetRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ApmQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional]
**DisplayType** | Pointer to [**WidgetDisplayType**](WidgetDisplayType.md) | | [optional]
**EventQuery** | Pointer to [**EventQueryDefinition**](EventQueryDefinition.md) | | [optional]
**EventQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional]
**LogQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional]
**Metadata** | Pointer to [**[]TimeseriesWidgetRequestMetadata**](TimeseriesWidgetRequest_metadata.md) | Used to define expression aliases. | [optional]
**NetworkQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional]
Expand Down Expand Up @@ -88,20 +88,20 @@ HasDisplayType returns a boolean if a field has been set.

### GetEventQuery

`func (o *TimeseriesWidgetRequest) GetEventQuery() EventQueryDefinition`
`func (o *TimeseriesWidgetRequest) GetEventQuery() LogQueryDefinition`

GetEventQuery returns the EventQuery field if non-nil, zero value otherwise.

### GetEventQueryOk

`func (o *TimeseriesWidgetRequest) GetEventQueryOk() (*EventQueryDefinition, bool)`
`func (o *TimeseriesWidgetRequest) GetEventQueryOk() (*LogQueryDefinition, bool)`

GetEventQueryOk returns a tuple with the EventQuery field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetEventQuery

`func (o *TimeseriesWidgetRequest) SetEventQuery(v EventQueryDefinition)`
`func (o *TimeseriesWidgetRequest) SetEventQuery(v LogQueryDefinition)`

SetEventQuery sets EventQuery field to given value.

Expand Down
8 changes: 4 additions & 4 deletions api/v1/datadog/docs/ToplistWidgetRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ApmQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional]
**ConditionalFormats** | Pointer to [**[]WidgetConditionalFormat**](WidgetConditionalFormat.md) | List of conditional formats. | [optional]
**EventQuery** | Pointer to [**EventQueryDefinition**](EventQueryDefinition.md) | | [optional]
**EventQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional]
**LogQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional]
**NetworkQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional]
**ProcessQuery** | Pointer to [**ProcessQueryDefinition**](ProcessQueryDefinition.md) | | [optional]
Expand Down Expand Up @@ -86,20 +86,20 @@ HasConditionalFormats returns a boolean if a field has been set.

### GetEventQuery

`func (o *ToplistWidgetRequest) GetEventQuery() EventQueryDefinition`
`func (o *ToplistWidgetRequest) GetEventQuery() LogQueryDefinition`

GetEventQuery returns the EventQuery field if non-nil, zero value otherwise.

### GetEventQueryOk

`func (o *ToplistWidgetRequest) GetEventQueryOk() (*EventQueryDefinition, bool)`
`func (o *ToplistWidgetRequest) GetEventQueryOk() (*LogQueryDefinition, bool)`

GetEventQueryOk returns a tuple with the EventQuery field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetEventQuery

`func (o *ToplistWidgetRequest) SetEventQuery(v EventQueryDefinition)`
`func (o *ToplistWidgetRequest) SetEventQuery(v LogQueryDefinition)`

SetEventQuery sets EventQuery field to given value.

Expand Down
Loading

0 comments on commit 0982eed

Please sign in to comment.