Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add has_search_bar and cell_display_mode properties to table widget definition #502

Merged
merged 8 commits into from
Oct 2, 2020
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.2.0",
"regenerated": "2020-10-02 08:27:57.372637",
"spec_repo_commit": "77e1e09"
"regenerated": "2020-10-02 09:00:39.435113",
"spec_repo_commit": "bdbc1cb"
},
"v2": {
"apigentools_version": "1.2.0",
"regenerated": "2020-10-02 08:28:03.467301",
"spec_repo_commit": "77e1e09"
"regenerated": "2020-10-02 09:00:45.228506",
"spec_repo_commit": "bdbc1cb"
}
}
}
20 changes: 20 additions & 0 deletions api/v1/datadog/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14848,6 +14848,15 @@ components:
items:
$ref: '#/components/schemas/WidgetCustomLink'
type: array
has_search_bar:
default: auto
description: Controls the display of the search bar.
enum:
- always
- never
- auto
example: auto
type: string
requests:
description: Widget definition.
example:
Expand Down Expand Up @@ -14892,6 +14901,17 @@ components:
$ref: '#/components/schemas/LogQueryDefinition'
apm_stats_query:
$ref: '#/components/schemas/ApmStatsQueryDefinition'
cell_display_mode:
description: A list of display modes for each table cell.
items:
default: number
description: Define a display mode for the table cell.
enum:
- number
- bar
example: number
type: string
type: array
conditional_formats:
description: List of conditional formats.
items:
Expand Down
2 changes: 1 addition & 1 deletion api/v1/datadog/docs/DashboardsApi.md

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions api/v1/datadog/docs/TableWidgetDefinition.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**CustomLinks** | Pointer to [**[]WidgetCustomLink**](WidgetCustomLink.md) | List of custom links. | [optional]
**HasSearchBar** | Pointer to **string** | Controls the display of the search bar. | [optional] [default to "auto"]
**Requests** | [**[]TableWidgetRequest**](TableWidgetRequest.md) | Widget definition. |
**Time** | Pointer to [**WidgetTime**](WidgetTime.md) | | [optional]
**Title** | Pointer to **string** | Title of your widget. | [optional]
Expand Down Expand Up @@ -56,6 +57,31 @@ SetCustomLinks sets CustomLinks field to given value.

HasCustomLinks returns a boolean if a field has been set.

### GetHasSearchBar

`func (o *TableWidgetDefinition) GetHasSearchBar() string`

GetHasSearchBar returns the HasSearchBar field if non-nil, zero value otherwise.

### GetHasSearchBarOk

`func (o *TableWidgetDefinition) GetHasSearchBarOk() (*string, bool)`

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

### SetHasSearchBar

`func (o *TableWidgetDefinition) SetHasSearchBar(v string)`

SetHasSearchBar sets HasSearchBar field to given value.

### HasHasSearchBar

`func (o *TableWidgetDefinition) HasHasSearchBar() bool`

HasHasSearchBar returns a boolean if a field has been set.

### GetRequests

`func (o *TableWidgetDefinition) GetRequests() []TableWidgetRequest`
Expand Down
26 changes: 26 additions & 0 deletions api/v1/datadog/docs/TableWidgetRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Name | Type | Description | Notes
**Alias** | Pointer to **string** | The column name (defaults to the metric name). | [optional]
**ApmQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional]
**ApmStatsQuery** | Pointer to [**ApmStatsQueryDefinition**](ApmStatsQueryDefinition.md) | | [optional]
**CellDisplayMode** | Pointer to **[]string** | 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]
**Limit** | Pointer to **int64** | For metric queries, the number of lines to show in the table. Only one request should have this property. | [optional]
Expand Down Expand Up @@ -138,6 +139,31 @@ SetApmStatsQuery sets ApmStatsQuery field to given value.

HasApmStatsQuery returns a boolean if a field has been set.

### GetCellDisplayMode

`func (o *TableWidgetRequest) GetCellDisplayMode() []string`

GetCellDisplayMode returns the CellDisplayMode field if non-nil, zero value otherwise.

### GetCellDisplayModeOk

`func (o *TableWidgetRequest) GetCellDisplayModeOk() (*[]string, bool)`

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

### SetCellDisplayMode

`func (o *TableWidgetRequest) SetCellDisplayMode(v []string)`

SetCellDisplayMode sets CellDisplayMode field to given value.

### HasCellDisplayMode

`func (o *TableWidgetRequest) HasCellDisplayMode() bool`

HasCellDisplayMode returns a boolean if a field has been set.

### GetConditionalFormats

`func (o *TableWidgetRequest) GetConditionalFormats() []WidgetConditionalFormat`
Expand Down
26 changes: 26 additions & 0 deletions api/v1/datadog/docs/WidgetDefinition.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ Name | Type | Description | Notes
**ShowResourceList** | Pointer to **bool** | Whether to show the resource list or not. | [optional]
**SizeFormat** | Pointer to [**WidgetSizeFormat**](WidgetSizeFormat.md) | | [optional]
**SpanName** | **string** | APM span name. |
**HasSearchBar** | Pointer to **string** | Controls the display of the search bar. | [optional] [default to "auto"]
**Markers** | Pointer to [**[]WidgetMarker**](WidgetMarker.md) | List of markers. | [optional]
**RightYaxis** | Pointer to [**WidgetAxis**](WidgetAxis.md) | | [optional]

Expand Down Expand Up @@ -1943,6 +1944,31 @@ and a boolean to check if the value has been set.
SetSpanName sets SpanName field to given value.


### GetHasSearchBar

`func (o *WidgetDefinition) GetHasSearchBar() string`

GetHasSearchBar returns the HasSearchBar field if non-nil, zero value otherwise.

### GetHasSearchBarOk

`func (o *WidgetDefinition) GetHasSearchBarOk() (*string, bool)`

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

### SetHasSearchBar

`func (o *WidgetDefinition) SetHasSearchBar(v string)`

SetHasSearchBar sets HasSearchBar field to given value.

### HasHasSearchBar

`func (o *WidgetDefinition) HasHasSearchBar() bool`

HasHasSearchBar returns a boolean if a field has been set.

### GetMarkers

`func (o *WidgetDefinition) GetMarkers() []WidgetMarker`
Expand Down
41 changes: 41 additions & 0 deletions api/v1/datadog/model_table_widget_definition.go

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

37 changes: 37 additions & 0 deletions api/v1/datadog/model_table_widget_request.go

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

2 changes: 2 additions & 0 deletions tests/api/v1/datadog/api_dashboards_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ func TestDashboardLifecycle(t *testing.T) {
CustomFgColor: datadog.PtrString("black"),
ImageUrl: datadog.PtrString("https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4"),
}},
CellDisplayMode: &[]string{"number"},
}})
tableWidgetDefinition.SetTitle("Test Table Widget")
tableWidgetDefinition.SetTitleAlign(datadog.WIDGETTEXTALIGN_CENTER)
Expand All @@ -442,6 +443,7 @@ func TestDashboardLifecycle(t *testing.T) {
Label: "Test Custom Link label",
Link: "https://app.datadoghq.com/dashboard/lists",
}})
tableWidgetDefinition.SetHasSearchBar("auto")

tableWidget := datadog.NewWidget(datadog.TableWidgetDefinitionAsWidgetDefinition(tableWidgetDefinition))

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2020-10-01T12:22:12.804889+02:00
2020-10-02T13:14:31.61366+02:00
Loading