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

Allow Table Widget requests to specify text replace formatting in dashboards #2147

Merged
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.6.6",
"regenerated": "2024-09-13 20:35:30.960636",
"spec_repo_commit": "6093038f"
"regenerated": "2024-09-16 14:02:51.199796",
"spec_repo_commit": "966987f5"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-09-13 20:35:30.978308",
"spec_repo_commit": "6093038f"
"regenerated": "2024-09-16 14:02:51.217373",
"spec_repo_commit": "966987f5"
}
}
}
175 changes: 175 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16752,6 +16752,181 @@ components:
$ref: '#/components/schemas/LogQueryDefinition'
sort:
$ref: '#/components/schemas/WidgetSortBy'
text_formats:
description: List of text formats for columns produced by tags.
items:
$ref: '#/components/schemas/TableWidgetTextFormat'
type: array
type: object
TableWidgetTextFormat:
description: Text format rules for a tag-based column within a table widget.
example:
- match:
type: is
value: fruit
replace:
type: all
with: vegetable
- match:
type: is
value: cake
palette: white_on_green
items:
$ref: '#/components/schemas/TableWidgetTextFormatRule'
minItems: 1
type: array
TableWidgetTextFormatMatch:
description: Match rule for the table widget text format.
example:
type: is
value: fruit
properties:
type:
$ref: '#/components/schemas/TableWidgetTextFormatMatchType'
value:
description: Table Widget Match String.
example: Match Value
type: string
required:
- type
- value
type: object
TableWidgetTextFormatMatchType:
description: Match or compare option.
enum:
- is
- is_not
- contains
- does_not_contain
- starts_with
- ends_with
example: is
type: string
x-enum-varnames:
- IS
- IS_NOT
- CONTAINS
- DOES_NOT_CONTAIN
- STARTS_WITH
- ENDS_WITH
TableWidgetTextFormatPalette:
default: white_on_green
description: Color-on-color palette to highlight replaced text.
enum:
- white_on_red
- white_on_yellow
- white_on_green
- black_on_light_red
- black_on_light_yellow
- black_on_light_green
- red_on_white
- yellow_on_white
- green_on_white
- custom_bg
- custom_text
type: string
x-enum-varnames:
- WHITE_ON_RED
- WHITE_ON_YELLOW
- WHITE_ON_GREEN
- BLACK_ON_LIGHT_RED
- BLACK_ON_LIGHT_YELLOW
- BLACK_ON_LIGHT_GREEN
- RED_ON_WHITE
- YELLOW_ON_WHITE
- GREEN_ON_WHITE
- CUSTOM_BG
- CUSTOM_TEXT
TableWidgetTextFormatReplace:
description: Replace rule for the table widget text format.
example:
type: all
with: vegetable
oneOf:
- $ref: '#/components/schemas/TableWidgetTextFormatReplaceAll'
- $ref: '#/components/schemas/TableWidgetTextFormatReplaceSubstring'
TableWidgetTextFormatReplaceAll:
description: Match All definition.
example:
type: all
with: vegetable
properties:
type:
$ref: '#/components/schemas/TableWidgetTextFormatReplaceAllType'
with:
description: Replace All type.
example: all
type: string
required:
- type
- with
type: object
TableWidgetTextFormatReplaceAllType:
description: Table widget text format replace all type.
enum:
- all
example: all
type: string
x-enum-varnames:
- ALL
TableWidgetTextFormatReplaceSubstring:
description: Match Sub-string definition.
example:
substring: fruit
type: substring
with: vegetable
properties:
substring:
description: Text that will be replaced.
example: string to replace
type: string
type:
$ref: '#/components/schemas/TableWidgetTextFormatReplaceSubstringType'
with:
description: Text that will replace original sub-string.
example: replacement
type: string
required:
- type
- with
- substring
type: object
TableWidgetTextFormatReplaceSubstringType:
description: Table widget text format replace sub-string type.
enum:
- substring
example: substring
type: string
x-enum-varnames:
- SUBSTRING
TableWidgetTextFormatRule:
description: Text format rules.
example:
match:
type: is
value: apple
replace:
type: all
with: vegetable
properties:
custom_bg_color:
description: Hex representation of the custom background color. Used with
custom background palette option.
example: '#632ca6'
type: string
custom_fg_color:
description: Hex representation of the custom text color. Used with custom
text palette option.
example: '#632ca6'
type: string
match:
$ref: '#/components/schemas/TableWidgetTextFormatMatch'
palette:
$ref: '#/components/schemas/TableWidgetTextFormatPalette'
replace:
$ref: '#/components/schemas/TableWidgetTextFormatReplace'
required:
- match
type: object
TagToHosts:
description: In this object, the key is the tag, the value is a list of host
Expand Down
63 changes: 63 additions & 0 deletions docs/datadog_api_client.v1.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4883,6 +4883,69 @@ datadog\_api\_client.v1.model.table\_widget\_request module
:members:
:show-inheritance:

datadog\_api\_client.v1.model.table\_widget\_text\_format\_match module
-----------------------------------------------------------------------

.. automodule:: datadog_api_client.v1.model.table_widget_text_format_match
:members:
:show-inheritance:

datadog\_api\_client.v1.model.table\_widget\_text\_format\_match\_type module
-----------------------------------------------------------------------------

.. automodule:: datadog_api_client.v1.model.table_widget_text_format_match_type
:members:
:show-inheritance:

datadog\_api\_client.v1.model.table\_widget\_text\_format\_palette module
-------------------------------------------------------------------------

.. automodule:: datadog_api_client.v1.model.table_widget_text_format_palette
:members:
:show-inheritance:

datadog\_api\_client.v1.model.table\_widget\_text\_format\_replace module
-------------------------------------------------------------------------

.. automodule:: datadog_api_client.v1.model.table_widget_text_format_replace
:members:
:show-inheritance:

datadog\_api\_client.v1.model.table\_widget\_text\_format\_replace\_all module
------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v1.model.table_widget_text_format_replace_all
:members:
:show-inheritance:

datadog\_api\_client.v1.model.table\_widget\_text\_format\_replace\_all\_type module
------------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v1.model.table_widget_text_format_replace_all_type
:members:
:show-inheritance:

datadog\_api\_client.v1.model.table\_widget\_text\_format\_replace\_substring module
------------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v1.model.table_widget_text_format_replace_substring
:members:
:show-inheritance:

datadog\_api\_client.v1.model.table\_widget\_text\_format\_replace\_substring\_type module
------------------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v1.model.table_widget_text_format_replace_substring_type
:members:
:show-inheritance:

datadog\_api\_client.v1.model.table\_widget\_text\_format\_rule module
----------------------------------------------------------------------

.. automodule:: datadog_api_client.v1.model.table_widget_text_format_rule
:members:
:show-inheritance:

datadog\_api\_client.v1.model.tag\_to\_hosts module
---------------------------------------------------

Expand Down
Loading
Loading