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 new properties to group widget, note widget and image widget #331

Merged
merged 1 commit into from
Apr 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.4.1.dev6",
"regenerated": "2021-04-28 06:30:58.161552",
"spec_repo_commit": "267134d"
"regenerated": "2021-04-28 10:12:23.403106",
"spec_repo_commit": "75ca6ae"
},
"v2": {
"apigentools_version": "1.4.1.dev6",
"regenerated": "2021-04-28 06:31:12.077454",
"spec_repo_commit": "267134d"
"regenerated": "2021-04-28 10:12:36.306753",
"spec_repo_commit": "75ca6ae"
}
}
}
107 changes: 95 additions & 12 deletions data/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1005,10 +1005,10 @@ components:
type: array
type: object
DashboardReflowType:
description: 'Reflow type for a multi-size layout dashboard. Set this only when
layout type is ''ordered''.
description: 'Reflow type for a **new dashboard layout** dashboard. Set this
only when layout type is ''ordered''.

If set to ''fixed'', the dashboard expect all widgets to have a layout, and
If set to ''fixed'', the dashboard expects all widgets to have a layout, and
if it''s set to ''auto'',

widgets should not have layouts.'
Expand Down Expand Up @@ -2304,8 +2304,15 @@ components:
background_color:
description: Background color of the group title.
type: string
banner_img:
description: URL of image to display as a banner for the group.
type: string
layout_type:
$ref: '#/components/schemas/WidgetLayoutType'
show_title:
default: true
description: Whether to show the title or not.
type: boolean
title:
description: Title of the widget.
type: string
Expand Down Expand Up @@ -3000,6 +3007,18 @@ components:
An image can be a PNG, JPG, or animated GIF. Only available on FREE layout
dashboards.
properties:
has_background:
default: true
description: Whether to display a background or not.
example: true
type: boolean
has_border:
default: true
description: Whether to display a border or not.
example: true
type: boolean
horizontal_align:
$ref: '#/components/schemas/WidgetHorizontalAlign'
margin:
$ref: '#/components/schemas/WidgetMargin'
sizing:
Expand All @@ -3008,8 +3027,14 @@ components:
$ref: '#/components/schemas/ImageWidgetDefinitionType'
url:
description: URL of the image.
example: ''
example: https://example.com/image.png
type: string
url_dark_theme:
description: URL of the image in dark mode.
example: https://example.com/image-dark-mode.png
type: string
vertical_align:
$ref: '#/components/schemas/WidgetVerticalAlign'
required:
- type
- url
Expand Down Expand Up @@ -5108,6 +5133,10 @@ components:
font_size:
description: Size of the text.
type: string
has_padding:
default: true
description: Whether to add padding or not.
type: boolean
show_tick:
description: Whether to show a tick or not.
type: boolean
Expand All @@ -5120,6 +5149,8 @@ components:
type: string
type:
$ref: '#/components/schemas/NoteWidgetDefinitionType'
vertical_align:
$ref: '#/components/schemas/WidgetVerticalAlign'
required:
- type
- content
Expand Down Expand Up @@ -10927,11 +10958,11 @@ components:
$ref: '#/components/schemas/User'
type: object
Widget:
description: 'Information about widget.


Note: The `layout` property is required for widgets in dashboards with `free`
`layout_type` only.'
description: "Information about widget.\n\n**Note**: The `layout` property is\
\ required for widgets in dashboards with `free` `layout_type`.\n For\
\ the **new dashboard layout**, the `layout` property depends on the `reflow_type`\
\ of the dashboard.\n - If `reflow_type` is `fixed`, `layout` is required.\n\
\ - If `reflow_type` is `auto`, `layout` should not be set."
properties:
definition:
$ref: '#/components/schemas/WidgetDefinition'
Expand Down Expand Up @@ -11196,26 +11227,59 @@ components:
x-enum-varnames:
- CHECK
- CLUSTER
WidgetHorizontalAlign:
description: Horizontal alignment.
enum:
- center
- left
- right
type: string
x-enum-varnames:
- CENTER
- LEFT
- RIGHT
WidgetImageSizing:
description: How to size the image on the widget.
description: 'How to size the image on the widget. The values are based on the
image `object-fit` CSS properties.

**Note**: `zoom`, `fit` and `center` values are deprecated.'
enum:
- fill
- contain
- cover
- none
- scale-down
- zoom
- fit
- center
type: string
x-enum-varnames:
- FILL
- CONTAIN
- COVER
- NONE
- SCALEDOWN
- ZOOM
- FIT
- CENTER
WidgetLayout:
description: The layout for a widget on a free dashboard.
description: The layout for a widget on a `free` or **new dashboard layout**
dashboard.
properties:
height:
description: The height of the widget. Should be a non-negative integer.
example: 0
format: int64
minimum: 0
type: integer
is_column_break:
default: false
description: 'Whether the widget should be the first one on the second column
in high density or not.

**Note**: Only for the **new dashboard layout** and only one widget in
the dashboard should have this property set to `true`.'
type: boolean
width:
description: The width of the widget. Should be a non-negative integer.
example: 0
Expand Down Expand Up @@ -11311,12 +11375,20 @@ components:
- PAST_ONE_YEAR
- ALERT
WidgetMargin:
description: Size of the margins around the image.
description: 'Size of the margins around the image.

**Note**: `small` and `large` values are deprecated.'
enum:
- sm
- md
- lg
- small
- large
type: string
x-enum-varnames:
- SM
- MD
- LG
- SMALL
- LARGE
WidgetMarker:
Expand Down Expand Up @@ -11576,6 +11648,17 @@ components:
- MONTH_TO_DATE
- PREVIOUS_MONTH
- GLOBAL_TIME
WidgetVerticalAlign:
description: Vertical alignment.
enum:
- center
- top
- bottom
type: string
x-enum-varnames:
- CENTER
- TOP
- BOTTOM
WidgetViewMode:
description: Define how you want the SLO to be displayed.
enum:
Expand Down
4 changes: 4 additions & 0 deletions docs/v1/GroupWidgetDefinition.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **background_color** | **String** | Background color of the group title. | [optional] |
| **banner_img** | **String** | URL of image to display as a banner for the group. | [optional] |
| **layout_type** | [**WidgetLayoutType**](WidgetLayoutType.md) | | |
| **show_title** | **Boolean** | Whether to show the title or not. | [optional][default to true] |
| **title** | **String** | Title of the widget. | [optional] |
| **title_align** | [**WidgetTextAlign**](WidgetTextAlign.md) | | [optional] |
| **type** | [**GroupWidgetDefinitionType**](GroupWidgetDefinitionType.md) | | [default to 'group'] |
Expand All @@ -18,7 +20,9 @@ require 'datadog_api_client/v1'

instance = DatadogAPIClient::V1::GroupWidgetDefinition.new(
background_color: null,
banner_img: null,
layout_type: null,
show_title: null,
title: null,
title_align: null,
type: null,
Expand Down
12 changes: 11 additions & 1 deletion docs/v1/ImageWidgetDefinition.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,31 @@

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **has_background** | **Boolean** | Whether to display a background or not. | [optional][default to true] |
| **has_border** | **Boolean** | Whether to display a border or not. | [optional][default to true] |
| **horizontal_align** | [**WidgetHorizontalAlign**](WidgetHorizontalAlign.md) | | [optional] |
| **margin** | [**WidgetMargin**](WidgetMargin.md) | | [optional] |
| **sizing** | [**WidgetImageSizing**](WidgetImageSizing.md) | | [optional] |
| **type** | [**ImageWidgetDefinitionType**](ImageWidgetDefinitionType.md) | | [default to 'image'] |
| **url** | **String** | URL of the image. | |
| **url_dark_theme** | **String** | URL of the image in dark mode. | [optional] |
| **vertical_align** | [**WidgetVerticalAlign**](WidgetVerticalAlign.md) | | [optional] |

## Example

```ruby
require 'datadog_api_client/v1'

instance = DatadogAPIClient::V1::ImageWidgetDefinition.new(
has_background: true,
has_border: true,
horizontal_align: null,
margin: null,
sizing: null,
type: null,
url:
url: https://example.com/image.png,
url_dark_theme: https://example.com/image-dark-mode.png,
vertical_align: null
)
```

6 changes: 5 additions & 1 deletion docs/v1/NoteWidgetDefinition.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@
| **background_color** | **String** | Background color of the note. | [optional] |
| **content** | **String** | Content of the note. | |
| **font_size** | **String** | Size of the text. | [optional] |
| **has_padding** | **Boolean** | Whether to add padding or not. | [optional][default to true] |
| **show_tick** | **Boolean** | Whether to show a tick or not. | [optional] |
| **text_align** | [**WidgetTextAlign**](WidgetTextAlign.md) | | [optional] |
| **tick_edge** | [**WidgetTickEdge**](WidgetTickEdge.md) | | [optional] |
| **tick_pos** | **String** | Where to position the tick on an edge. | [optional] |
| **type** | [**NoteWidgetDefinitionType**](NoteWidgetDefinitionType.md) | | [default to 'note'] |
| **vertical_align** | [**WidgetVerticalAlign**](WidgetVerticalAlign.md) | | [optional] |

## Example

Expand All @@ -22,11 +24,13 @@ instance = DatadogAPIClient::V1::NoteWidgetDefinition.new(
background_color: null,
content: ,
font_size: null,
has_padding: null,
show_tick: null,
text_align: null,
tick_edge: null,
tick_pos: null,
type: null
type: null,
vertical_align: null
)
```

2 changes: 2 additions & 0 deletions docs/v1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,7 @@ Class | Method | HTTP request | Description
- [DatadogAPIClient::V1::WidgetFormula](WidgetFormula.md)
- [DatadogAPIClient::V1::WidgetFormulaLimit](WidgetFormulaLimit.md)
- [DatadogAPIClient::V1::WidgetGrouping](WidgetGrouping.md)
- [DatadogAPIClient::V1::WidgetHorizontalAlign](WidgetHorizontalAlign.md)
- [DatadogAPIClient::V1::WidgetImageSizing](WidgetImageSizing.md)
- [DatadogAPIClient::V1::WidgetLayout](WidgetLayout.md)
- [DatadogAPIClient::V1::WidgetLayoutType](WidgetLayoutType.md)
Expand All @@ -729,6 +730,7 @@ Class | Method | HTTP request | Description
- [DatadogAPIClient::V1::WidgetTickEdge](WidgetTickEdge.md)
- [DatadogAPIClient::V1::WidgetTime](WidgetTime.md)
- [DatadogAPIClient::V1::WidgetTimeWindows](WidgetTimeWindows.md)
- [DatadogAPIClient::V1::WidgetVerticalAlign](WidgetVerticalAlign.md)
- [DatadogAPIClient::V1::WidgetViewMode](WidgetViewMode.md)
- [DatadogAPIClient::V1::WidgetVizType](WidgetVizType.md)

Expand Down
15 changes: 15 additions & 0 deletions docs/v1/WidgetHorizontalAlign.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# DatadogAPIClient::V1::WidgetHorizontalAlign

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |

## Example

```ruby
require 'datadog_api_client/v1'

instance = DatadogAPIClient::V1::WidgetHorizontalAlign.new()
```

2 changes: 2 additions & 0 deletions docs/v1/WidgetLayout.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **height** | **Integer** | The height of the widget. Should be a non-negative integer. | |
| **is_column_break** | **Boolean** | Whether the widget should be the first one on the second column in high density or not. **Note**: Only for the **new dashboard layout** and only one widget in the dashboard should have this property set to `true`. | [optional][default to false] |
| **width** | **Integer** | The width of the widget. Should be a non-negative integer. | |
| **x** | **Integer** | The position of the widget on the x (horizontal) axis. Should be a non-negative integer. | |
| **y** | **Integer** | The position of the widget on the y (vertical) axis. Should be a non-negative integer. | |
Expand All @@ -16,6 +17,7 @@ require 'datadog_api_client/v1'

instance = DatadogAPIClient::V1::WidgetLayout.new(
height: 0,
is_column_break: null,
width: 0,
x: 0,
y: 0
Expand Down
15 changes: 15 additions & 0 deletions docs/v1/WidgetVerticalAlign.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# DatadogAPIClient::V1::WidgetVerticalAlign

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |

## Example

```ruby
require 'datadog_api_client/v1'

instance = DatadogAPIClient::V1::WidgetVerticalAlign.new()
```

2 changes: 2 additions & 0 deletions lib/datadog_api_client/v1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@
require 'datadog_api_client/v1/models/widget_formula'
require 'datadog_api_client/v1/models/widget_formula_limit'
require 'datadog_api_client/v1/models/widget_grouping'
require 'datadog_api_client/v1/models/widget_horizontal_align'
require 'datadog_api_client/v1/models/widget_image_sizing'
require 'datadog_api_client/v1/models/widget_layout'
require 'datadog_api_client/v1/models/widget_layout_type'
Expand All @@ -532,6 +533,7 @@
require 'datadog_api_client/v1/models/widget_tick_edge'
require 'datadog_api_client/v1/models/widget_time'
require 'datadog_api_client/v1/models/widget_time_windows'
require 'datadog_api_client/v1/models/widget_vertical_align'
require 'datadog_api_client/v1/models/widget_view_mode'
require 'datadog_api_client/v1/models/widget_viz_type'

Expand Down
Loading