diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index d9bb88a10f27..590559216b1f 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -1741,6 +1741,9 @@ components: type: string markers: description: List of markers. + example: + - display_type: percentile + value: '90' items: $ref: '#/components/schemas/WidgetMarker' type: array @@ -1816,6 +1819,11 @@ components: $ref: '#/components/schemas/ApmStatsQueryDefinition' event_query: $ref: '#/components/schemas/LogQueryDefinition' + formulas: + description: List of formulas that operate on queries. + items: + $ref: '#/components/schemas/WidgetFormula' + type: array log_query: $ref: '#/components/schemas/LogQueryDefinition' network_query: @@ -1827,10 +1835,17 @@ components: q: description: Widget query. type: string + queries: + description: List of queries that can be returned directly or used in formulas. + items: + $ref: '#/components/schemas/FormulaAndFunctionQueryDefinition' + type: array query: $ref: '#/components/schemas/DistributionWidgetHistogramRequestQuery' request_type: $ref: '#/components/schemas/DistributionWidgetHistogramRequestType' + response_format: + $ref: '#/components/schemas/FormulaAndFunctionResponseFormat' rum_query: $ref: '#/components/schemas/LogQueryDefinition' security_query: @@ -1854,6 +1869,11 @@ components: description: Specifies minimum value to show on the x-axis. It takes a number, percentile (p90 === 90th percentile), or auto for default behavior. type: string + num_buckets: + description: Number of value buckets to target, also known as the resolution + of the value bins. + format: int64 + type: integer scale: default: linear description: Specifies the scale type. Possible values are `linear`. @@ -3752,6 +3772,14 @@ components: type: array legend_size: $ref: '#/components/schemas/WidgetLegendSize' + markers: + description: List of markers. + example: + - display_type: percentile + value: '90' + items: + $ref: '#/components/schemas/WidgetMarker' + type: array requests: description: List of widget types. example: @@ -3776,6 +3804,8 @@ components: type: string type: $ref: '#/components/schemas/HeatMapWidgetDefinitionType' + xaxis: + $ref: '#/components/schemas/HeatMapWidgetXAxis' yaxis: $ref: '#/components/schemas/WidgetAxis' required: @@ -3819,6 +3849,10 @@ components: items: $ref: '#/components/schemas/FormulaAndFunctionQueryDefinition' type: array + query: + $ref: '#/components/schemas/FormulaAndFunctionMetricQueryDefinition' + request_type: + $ref: '#/components/schemas/DistributionWidgetHistogramRequestType' response_format: $ref: '#/components/schemas/FormulaAndFunctionResponseFormat' rum_query: @@ -3828,6 +3862,16 @@ components: style: $ref: '#/components/schemas/WidgetStyle' type: object + HeatMapWidgetXAxis: + description: X Axis controls for the heat map widget. + properties: + num_buckets: + description: Number of time buckets to target, also known as the resolution + of the time bins. This is only applicable for distribution of points (group + distributions use the roll-up modifier). + format: int64 + type: integer + type: object Host: description: Object representing a host. properties: @@ -25245,7 +25289,7 @@ components: display_type: description: "Combination of:\n - A severity error, warning, ok, or info\n \ - A line type: dashed, solid, or bold\nIn this case of a Distribution - widget, this can be set to be `x_axis_percentile`." + widget, this can be set to be `percentile`." example: error dashed type: string label: @@ -25256,8 +25300,11 @@ components: description: Timestamp for the widget. type: string value: - description: Value to apply. Can be a single value y = 15 or a range of + description: 'Value to apply. Can be a single value y = 15 or a range of values 0 < y < 10. + + For Distribution widgets with `display_type` set to `percentile`, this + should be a numeric percentile value (for example, "90" for P90).' example: y = 15 type: string required: diff --git a/cassettes/v1/Dashboards_1335235736/Create-a-new-dashboard-with-distribution-widget-with-markers-and-num_buckets_3407795848/frozen.json b/cassettes/v1/Dashboards_1335235736/Create-a-new-dashboard-with-distribution-widget-with-markers-and-num_buckets_3407795848/frozen.json new file mode 100644 index 000000000000..6b8f2ed40232 --- /dev/null +++ b/cassettes/v1/Dashboards_1335235736/Create-a-new-dashboard-with-distribution-widget-with-markers-and-num_buckets_3407795848/frozen.json @@ -0,0 +1 @@ +"2025-12-04T23:08:04.708Z" diff --git a/cassettes/v1/Dashboards_1335235736/Create-a-new-dashboard-with-distribution-widget-with-markers-and-num_buckets_3407795848/recording.har b/cassettes/v1/Dashboards_1335235736/Create-a-new-dashboard-with-distribution-widget-with-markers-and-num_buckets_3407795848/recording.har new file mode 100644 index 000000000000..86ab16eb9732 --- /dev/null +++ b/cassettes/v1/Dashboards_1335235736/Create-a-new-dashboard-with-distribution-widget-with-markers-and-num_buckets_3407795848/recording.har @@ -0,0 +1,110 @@ +{ + "log": { + "_recordingName": "Dashboards/Create a new dashboard with distribution widget with markers and num_buckets", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "1965461eb336d2a7fcff22eeba84a215", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 738, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 559, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"layout_type\":\"ordered\",\"title\":\"Test-Create_a_new_dashboard_with_distribution_widget_with_markers_and_num_buckets-1764889684\",\"widgets\":[{\"definition\":{\"markers\":[{\"display_type\":\"percentile\",\"value\":\"50\"},{\"display_type\":\"percentile\",\"value\":\"99\"},{\"display_type\":\"percentile\",\"value\":\"90\"}],\"requests\":[{\"queries\":[{\"aggregator\":\"avg\",\"data_source\":\"metrics\",\"name\":\"query1\",\"query\":\"avg:system.cpu.user{*} by {service}\"}],\"response_format\":\"scalar\"}],\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"distribution\",\"xaxis\":{\"include_zero\":true,\"max\":\"auto\",\"min\":\"auto\",\"num_buckets\":55,\"scale\":\"linear\"},\"yaxis\":{\"include_zero\":true,\"max\":\"auto\",\"min\":\"auto\",\"scale\":\"linear\"}},\"layout\":{\"height\":4,\"width\":4,\"x\":0,\"y\":0}}]}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v1/dashboard" + }, + "response": { + "bodySize": 1143, + "content": { + "mimeType": "application/json", + "size": 1143, + "text": "{\"id\":\"ved-atm-2g5\",\"title\":\"Test-Create_a_new_dashboard_with_distribution_widget_with_markers_and_num_buckets-1764889684\",\"description\":null,\"author_handle\":\"shishi.liu@datadoghq.com\",\"author_name\":\"Shishi Liu\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/ved-atm-2g5/test-createanewdashboardwithdistributionwidgetwithmarkersandnumbuckets-176488968\",\"template_variables\":null,\"widgets\":[{\"definition\":{\"markers\":[{\"display_type\":\"percentile\",\"value\":\"50\"},{\"display_type\":\"percentile\",\"value\":\"99\"},{\"display_type\":\"percentile\",\"value\":\"90\"}],\"requests\":[{\"queries\":[{\"aggregator\":\"avg\",\"data_source\":\"metrics\",\"name\":\"query1\",\"query\":\"avg:system.cpu.user{*} by {service}\"}],\"response_format\":\"scalar\"}],\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"distribution\",\"xaxis\":{\"include_zero\":true,\"max\":\"auto\",\"min\":\"auto\",\"num_buckets\":55,\"scale\":\"linear\"},\"yaxis\":{\"include_zero\":true,\"max\":\"auto\",\"min\":\"auto\",\"scale\":\"linear\"}},\"layout\":{\"height\":4,\"width\":4,\"x\":0,\"y\":0},\"id\":984443192078703}],\"notify_list\":null,\"created_at\":\"2025-12-04T23:08:05.111437+00:00\",\"modified_at\":\"2025-12-04T23:08:05.111437+00:00\",\"restricted_roles\":[]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 381, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-12-04T23:08:04.722Z", + "time": 504 + }, + { + "_id": "05322de5f1c06078f3806223fd28da2c", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 520, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v1/dashboard/ved-atm-2g5" + }, + "response": { + "bodySize": 38, + "content": { + "mimeType": "application/json", + "size": 38, + "text": "{\"deleted_dashboard_id\":\"ved-atm-2g5\"}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 379, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-12-04T23:08:05.249Z", + "time": 675 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v1/Dashboards_1335235736/Create-a-new-dashboard-with-formula-and-function-distribution-widget_518041603/frozen.json b/cassettes/v1/Dashboards_1335235736/Create-a-new-dashboard-with-formula-and-function-distribution-widget_518041603/frozen.json new file mode 100644 index 000000000000..afd68020112f --- /dev/null +++ b/cassettes/v1/Dashboards_1335235736/Create-a-new-dashboard-with-formula-and-function-distribution-widget_518041603/frozen.json @@ -0,0 +1 @@ +"2025-12-15T17:03:52.164Z" diff --git a/cassettes/v1/Dashboards_1335235736/Create-a-new-dashboard-with-formula-and-function-distribution-widget_518041603/recording.har b/cassettes/v1/Dashboards_1335235736/Create-a-new-dashboard-with-formula-and-function-distribution-widget_518041603/recording.har new file mode 100644 index 000000000000..61d886ae8b9c --- /dev/null +++ b/cassettes/v1/Dashboards_1335235736/Create-a-new-dashboard-with-formula-and-function-distribution-widget_518041603/recording.har @@ -0,0 +1,110 @@ +{ + "log": { + "_recordingName": "Dashboards/Create a new dashboard with formula and function distribution widget", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "db029f7077dde3aa94094d0b02ae83f1", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 607, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 559, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"layout_type\":\"free\",\"notify_list\":[],\"template_variables\":[],\"title\":\"Test-Create_a_new_dashboard_with_formula_and_function_distribution_widget-1765818232\",\"widgets\":[{\"definition\":{\"requests\":[{\"queries\":[{\"compute\":{\"aggregation\":\"avg\",\"metric\":\"@duration\"},\"data_source\":\"logs\",\"group_by\":[{\"facet\":\"service\",\"limit\":1000,\"sort\":{\"aggregation\":\"count\",\"order\":\"desc\"}}],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"\"},\"storage\":\"hot\"}],\"response_format\":\"scalar\"}],\"time\":{},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"distribution\"},\"layout\":{\"height\":15,\"width\":47,\"x\":0,\"y\":0}}]}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v1/dashboard" + }, + "response": { + "bodySize": 963, + "content": { + "mimeType": "application/json", + "size": 963, + "text": "{\"id\":\"ii3-z6t-p8x\",\"title\":\"Test-Create_a_new_dashboard_with_formula_and_function_distribution_widget-1765818232\",\"description\":null,\"author_handle\":\"shishi.liu@datadoghq.com\",\"author_name\":\"Shishi Liu\",\"layout_type\":\"free\",\"url\":\"/dashboard/ii3-z6t-p8x/test-createanewdashboardwithformulaandfunctiondistributionwidget-1765818232\",\"template_variables\":[],\"widgets\":[{\"definition\":{\"requests\":[{\"queries\":[{\"compute\":{\"aggregation\":\"avg\",\"metric\":\"@duration\"},\"data_source\":\"logs\",\"group_by\":[{\"facet\":\"service\",\"limit\":1000,\"sort\":{\"aggregation\":\"count\",\"order\":\"desc\"}}],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"\"},\"storage\":\"hot\"}],\"response_format\":\"scalar\"}],\"time\":{},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"distribution\"},\"layout\":{\"height\":15,\"width\":47,\"x\":0,\"y\":0},\"id\":1822470106302094}],\"notify_list\":[],\"created_at\":\"2025-12-15T17:03:52.607823+00:00\",\"modified_at\":\"2025-12-15T17:03:52.607823+00:00\",\"restricted_roles\":[]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 379, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-12-15T17:03:52.176Z", + "time": 585 + }, + { + "_id": "2a9d55c736a90318e46feebe3c54cd02", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 520, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v1/dashboard/ii3-z6t-p8x" + }, + "response": { + "bodySize": 38, + "content": { + "mimeType": "application/json", + "size": 38, + "text": "{\"deleted_dashboard_id\":\"ii3-z6t-p8x\"}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 378, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-12-15T17:03:52.785Z", + "time": 670 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v1/Dashboards_1335235736/Create-a-new-dashboard-with-heatmap-widget-with-markers-and-num_buckets_3970320818/frozen.json b/cassettes/v1/Dashboards_1335235736/Create-a-new-dashboard-with-heatmap-widget-with-markers-and-num_buckets_3970320818/frozen.json new file mode 100644 index 000000000000..3698f5587678 --- /dev/null +++ b/cassettes/v1/Dashboards_1335235736/Create-a-new-dashboard-with-heatmap-widget-with-markers-and-num_buckets_3970320818/frozen.json @@ -0,0 +1 @@ +"2025-12-15T17:39:03.378Z" diff --git a/cassettes/v1/Dashboards_1335235736/Create-a-new-dashboard-with-heatmap-widget-with-markers-and-num_buckets_3970320818/recording.har b/cassettes/v1/Dashboards_1335235736/Create-a-new-dashboard-with-heatmap-widget-with-markers-and-num_buckets_3970320818/recording.har new file mode 100644 index 000000000000..39da74d5f128 --- /dev/null +++ b/cassettes/v1/Dashboards_1335235736/Create-a-new-dashboard-with-heatmap-widget-with-markers-and-num_buckets_3970320818/recording.har @@ -0,0 +1,110 @@ +{ + "log": { + "_recordingName": "Dashboards/Create a new dashboard with heatmap widget with markers and num_buckets", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "5805834db0c21af94aea89ac0853ff0c", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 598, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 559, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"layout_type\":\"ordered\",\"title\":\"Test-Create_a_new_dashboard_with_heatmap_widget_with_markers_and_num_buckets-1765820343\",\"widgets\":[{\"definition\":{\"markers\":[{\"display_type\":\"percentile\",\"value\":\"50\"},{\"display_type\":\"percentile\",\"value\":\"99\"}],\"requests\":[{\"query\":{\"data_source\":\"metrics\",\"name\":\"query1\",\"query\":\"histogram:trace.servlet.request{*}\"},\"request_type\":\"histogram\"}],\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"heatmap\",\"xaxis\":{\"num_buckets\":75},\"yaxis\":{\"include_zero\":true,\"max\":\"auto\",\"min\":\"auto\",\"scale\":\"linear\"}},\"layout\":{\"height\":4,\"width\":4,\"x\":0,\"y\":0}}]}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v1/dashboard" + }, + "response": { + "bodySize": 1000, + "content": { + "mimeType": "application/json", + "size": 1000, + "text": "{\"id\":\"r3p-kik-ven\",\"title\":\"Test-Create_a_new_dashboard_with_heatmap_widget_with_markers_and_num_buckets-1765820343\",\"description\":null,\"author_handle\":\"shishi.liu@datadoghq.com\",\"author_name\":\"Shishi Liu\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/r3p-kik-ven/test-createanewdashboardwithheatmapwidgetwithmarkersandnumbuckets-1765820343\",\"template_variables\":null,\"widgets\":[{\"definition\":{\"markers\":[{\"display_type\":\"percentile\",\"value\":\"50\"},{\"display_type\":\"percentile\",\"value\":\"99\"}],\"requests\":[{\"query\":{\"data_source\":\"metrics\",\"name\":\"query1\",\"query\":\"histogram:trace.servlet.request{*}\"},\"request_type\":\"histogram\"}],\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"heatmap\",\"xaxis\":{\"num_buckets\":75},\"yaxis\":{\"include_zero\":true,\"max\":\"auto\",\"min\":\"auto\",\"scale\":\"linear\"}},\"layout\":{\"height\":4,\"width\":4,\"x\":0,\"y\":0},\"id\":4627813855695599}],\"notify_list\":null,\"created_at\":\"2025-12-15T17:39:03.852775+00:00\",\"modified_at\":\"2025-12-15T17:39:03.852775+00:00\",\"restricted_roles\":[]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 381, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-12-15T17:39:03.391Z", + "time": 534 + }, + { + "_id": "594d80bce9fd8b3d7938ac4f944e6b93", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 520, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v1/dashboard/r3p-kik-ven" + }, + "response": { + "bodySize": 38, + "content": { + "mimeType": "application/json", + "size": 38, + "text": "{\"deleted_dashboard_id\":\"r3p-kik-ven\"}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 379, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-12-15T17:39:03.949Z", + "time": 657 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/features/v1/dashboards.feature b/features/v1/dashboards.feature index 588c609ceddb..076546114f1f 100644 --- a/features/v1/dashboards.feature +++ b/features/v1/dashboards.feature @@ -368,6 +368,15 @@ Feature: Dashboards And the response "widgets[0].definition.requests[0].apm_stats_query.service" is equal to "cassandra" And the response "widgets[0].definition.requests[0].apm_stats_query.name" is equal to "cassandra.query" + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with distribution widget with markers and num_buckets + Given new "CreateDashboard" request + And body with value { "title": "{{ unique }}", "widgets": [{"definition": { "title": "", "title_size": "16", "title_align": "left", "type": "distribution", "xaxis": { "scale": "linear", "min": "auto", "max": "auto", "include_zero": true, "num_buckets": 55 }, "yaxis": { "scale": "linear", "min": "auto", "max": "auto", "include_zero": true }, "markers": [{ "display_type": "percentile", "value": "50" }, { "display_type": "percentile", "value": "99" }, { "display_type": "percentile", "value": "90" }], "requests": [{ "response_format": "scalar", "queries": [{ "data_source": "metrics", "name": "query1", "query": "avg:system.cpu.user{*} by {service}", "aggregator": "avg" }] }] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 4 } } ], "layout_type": "ordered" } + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.xaxis.num_buckets" is equal to 55 + And the response "widgets[0].definition.markers" is equal to [{"display_type": "percentile", "value": "50"}, {"display_type": "percentile", "value": "99"}, {"display_type": "percentile", "value": "90"}] + @team:DataDog/dashboards-backend Scenario: Create a new dashboard with event_stream list_stream widget Given new "CreateDashboard" request @@ -397,6 +406,20 @@ Feature: Dashboards And the response "widgets[0].definition.type" is equal to "event_timeline" And the response "widgets[0].definition.query" is equal to "status:error priority:all" + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with formula and function distribution widget + Given new "CreateDashboard" request + And body with value {"title": "{{ unique }}", "widgets": [{"layout": {"x": 0, "y": 0, "width": 47, "height": 15}, "definition": {"title": "", "title_size": "16", "title_align": "left", "time": {}, "type": "distribution", "requests": [{"response_format": "scalar", "queries": [{"data_source": "logs", "name": "query1", "search": {"query": ""}, "indexes": ["*"], "compute": {"aggregation": "avg", "metric": "@duration"}, "group_by": [{"facet": "service", "limit": 1000, "sort": {"aggregation": "count", "order": "desc"}}], "storage": "hot"}]}]}}], "template_variables": [], "layout_type": "free", "notify_list": []} + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "distribution" + And the response "widgets[0].definition.requests[0].response_format" is equal to "scalar" + And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "logs" + And the response "widgets[0].definition.requests[0].queries[0].name" is equal to "query1" + And the response "widgets[0].definition.requests[0].queries[0].compute.aggregation" is equal to "avg" + And the response "widgets[0].definition.requests[0].queries[0].compute.metric" is equal to "@duration" + And the response "widgets[0].definition.requests[0].queries[0].group_by[0].facet" is equal to "service" + @team:DataDog/dashboards-backend Scenario: Create a new dashboard with formula and function heatmap widget Given new "CreateDashboard" request @@ -471,6 +494,15 @@ Feature: Dashboards And the response "widgets[0].definition.type" is equal to "heatmap" And the response "widgets[0].definition.requests[0].q" is equal to "avg:system.cpu.user{*} by {service}" + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with heatmap widget with markers and num_buckets + Given new "CreateDashboard" request + And body with value { "title": "{{ unique }}", "widgets": [{"definition": { "title": "", "title_size": "16", "title_align": "left", "type": "heatmap", "xaxis": { "num_buckets": 75 }, "yaxis": { "scale": "linear", "min": "auto", "max": "auto", "include_zero": true }, "markers": [{ "display_type": "percentile", "value": "50" }, { "display_type": "percentile", "value": "99" }], "requests": [{ "request_type": "histogram", "query": { "data_source": "metrics", "name": "query1", "query": "histogram:trace.servlet.request{*}"} }] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 4 } }], "layout_type": "ordered" } + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.xaxis.num_buckets" is equal to 75 + And the response "widgets[0].definition.markers" is equal to [{"display_type": "percentile", "value": "50"}, {"display_type": "percentile", "value": "99"}] + @team:DataDog/dashboards-backend Scenario: Create a new dashboard with hostmap widget Given new "CreateDashboard" request diff --git a/services/dashboards/src/v1/index.ts b/services/dashboards/src/v1/index.ts index 52e5bfebfc49..5ddb00e904c4 100644 --- a/services/dashboards/src/v1/index.ts +++ b/services/dashboards/src/v1/index.ts @@ -110,6 +110,7 @@ export { GroupWidgetDefinitionType } from "./models/GroupWidgetDefinitionType"; export { HeatMapWidgetDefinition } from "./models/HeatMapWidgetDefinition"; export { HeatMapWidgetDefinitionType } from "./models/HeatMapWidgetDefinitionType"; export { HeatMapWidgetRequest } from "./models/HeatMapWidgetRequest"; +export { HeatMapWidgetXAxis } from "./models/HeatMapWidgetXAxis"; export { HostMapRequest } from "./models/HostMapRequest"; export { HostMapWidgetDefinition } from "./models/HostMapWidgetDefinition"; export { HostMapWidgetDefinitionRequests } from "./models/HostMapWidgetDefinitionRequests"; diff --git a/services/dashboards/src/v1/models/DistributionWidgetRequest.ts b/services/dashboards/src/v1/models/DistributionWidgetRequest.ts index 0ab57ef01d1d..b9619caa6536 100644 --- a/services/dashboards/src/v1/models/DistributionWidgetRequest.ts +++ b/services/dashboards/src/v1/models/DistributionWidgetRequest.ts @@ -3,8 +3,11 @@ import { AttributeTypeMap } from "@datadog/datadog-api-client"; import { ApmStatsQueryDefinition } from "./ApmStatsQueryDefinition"; import { DistributionWidgetHistogramRequestQuery } from "./DistributionWidgetHistogramRequestQuery"; import { DistributionWidgetHistogramRequestType } from "./DistributionWidgetHistogramRequestType"; +import { FormulaAndFunctionQueryDefinition } from "./FormulaAndFunctionQueryDefinition"; +import { FormulaAndFunctionResponseFormat } from "./FormulaAndFunctionResponseFormat"; import { LogQueryDefinition } from "./LogQueryDefinition"; import { ProcessQueryDefinition } from "./ProcessQueryDefinition"; +import { WidgetFormula } from "./WidgetFormula"; import { WidgetStyle } from "./WidgetStyle"; /** @@ -23,6 +26,10 @@ export class DistributionWidgetRequest { * The log query. */ "eventQuery"?: LogQueryDefinition; + /** + * List of formulas that operate on queries. + */ + "formulas"?: Array; /** * The log query. */ @@ -43,6 +50,10 @@ export class DistributionWidgetRequest { * Widget query. */ "q"?: string; + /** + * List of queries that can be returned directly or used in formulas. + */ + "queries"?: Array; /** * Query definition for Distribution Widget Histogram Request */ @@ -51,6 +62,10 @@ export class DistributionWidgetRequest { * Request type for the histogram request. */ "requestType"?: DistributionWidgetHistogramRequestType; + /** + * Timeseries, scalar, or event list response. Event list response formats are supported by Geomap widgets. + */ + "responseFormat"?: FormulaAndFunctionResponseFormat; /** * The log query. */ @@ -90,6 +105,10 @@ export class DistributionWidgetRequest { baseName: "event_query", type: "LogQueryDefinition", }, + formulas: { + baseName: "formulas", + type: "Array", + }, logQuery: { baseName: "log_query", type: "LogQueryDefinition", @@ -110,6 +129,10 @@ export class DistributionWidgetRequest { baseName: "q", type: "string", }, + queries: { + baseName: "queries", + type: "Array", + }, query: { baseName: "query", type: "DistributionWidgetHistogramRequestQuery", @@ -118,6 +141,10 @@ export class DistributionWidgetRequest { baseName: "request_type", type: "DistributionWidgetHistogramRequestType", }, + responseFormat: { + baseName: "response_format", + type: "FormulaAndFunctionResponseFormat", + }, rumQuery: { baseName: "rum_query", type: "LogQueryDefinition", diff --git a/services/dashboards/src/v1/models/DistributionWidgetXAxis.ts b/services/dashboards/src/v1/models/DistributionWidgetXAxis.ts index 863b482f54dd..76e7c404dbad 100644 --- a/services/dashboards/src/v1/models/DistributionWidgetXAxis.ts +++ b/services/dashboards/src/v1/models/DistributionWidgetXAxis.ts @@ -16,6 +16,10 @@ export class DistributionWidgetXAxis { * Specifies minimum value to show on the x-axis. It takes a number, percentile (p90 === 90th percentile), or auto for default behavior. */ "min"?: string; + /** + * Number of value buckets to target, also known as the resolution of the value bins. + */ + "numBuckets"?: number; /** * Specifies the scale type. Possible values are `linear`. */ @@ -47,6 +51,11 @@ export class DistributionWidgetXAxis { baseName: "min", type: "string", }, + numBuckets: { + baseName: "num_buckets", + type: "number", + format: "int64", + }, scale: { baseName: "scale", type: "string", diff --git a/services/dashboards/src/v1/models/HeatMapWidgetDefinition.ts b/services/dashboards/src/v1/models/HeatMapWidgetDefinition.ts index 1eb272fa8777..c3149717c3cd 100644 --- a/services/dashboards/src/v1/models/HeatMapWidgetDefinition.ts +++ b/services/dashboards/src/v1/models/HeatMapWidgetDefinition.ts @@ -2,9 +2,11 @@ import { AttributeTypeMap } from "@datadog/datadog-api-client"; import { HeatMapWidgetDefinitionType } from "./HeatMapWidgetDefinitionType"; import { HeatMapWidgetRequest } from "./HeatMapWidgetRequest"; +import { HeatMapWidgetXAxis } from "./HeatMapWidgetXAxis"; import { WidgetAxis } from "./WidgetAxis"; import { WidgetCustomLink } from "./WidgetCustomLink"; import { WidgetEvent } from "./WidgetEvent"; +import { WidgetMarker } from "./WidgetMarker"; import { WidgetTextAlign } from "./WidgetTextAlign"; import { WidgetTime } from "./WidgetTime"; @@ -24,6 +26,10 @@ export class HeatMapWidgetDefinition { * Available legend sizes for a widget. Should be one of "0", "2", "4", "8", "16", or "auto". */ "legendSize"?: string; + /** + * List of markers. + */ + "markers"?: Array; /** * List of widget types. */ @@ -52,6 +58,10 @@ export class HeatMapWidgetDefinition { * Type of the heat map widget. */ "type": HeatMapWidgetDefinitionType; + /** + * X Axis controls for the heat map widget. + */ + "xaxis"?: HeatMapWidgetXAxis; /** * Axis controls for the widget. */ @@ -83,6 +93,10 @@ export class HeatMapWidgetDefinition { baseName: "legend_size", type: "string", }, + markers: { + baseName: "markers", + type: "Array", + }, requests: { baseName: "requests", type: "[HeatMapWidgetRequest]", @@ -113,6 +127,10 @@ export class HeatMapWidgetDefinition { type: "HeatMapWidgetDefinitionType", required: true, }, + xaxis: { + baseName: "xaxis", + type: "HeatMapWidgetXAxis", + }, yaxis: { baseName: "yaxis", type: "WidgetAxis", diff --git a/services/dashboards/src/v1/models/HeatMapWidgetRequest.ts b/services/dashboards/src/v1/models/HeatMapWidgetRequest.ts index 43153bb3a265..be131ec33dc9 100644 --- a/services/dashboards/src/v1/models/HeatMapWidgetRequest.ts +++ b/services/dashboards/src/v1/models/HeatMapWidgetRequest.ts @@ -1,6 +1,8 @@ import { AttributeTypeMap } from "@datadog/datadog-api-client"; +import { DistributionWidgetHistogramRequestType } from "./DistributionWidgetHistogramRequestType"; import { EventQueryDefinition } from "./EventQueryDefinition"; +import { FormulaAndFunctionMetricQueryDefinition } from "./FormulaAndFunctionMetricQueryDefinition"; import { FormulaAndFunctionQueryDefinition } from "./FormulaAndFunctionQueryDefinition"; import { FormulaAndFunctionResponseFormat } from "./FormulaAndFunctionResponseFormat"; import { LogQueryDefinition } from "./LogQueryDefinition"; @@ -48,6 +50,14 @@ export class HeatMapWidgetRequest { * List of queries that can be returned directly or used in formulas. */ "queries"?: Array; + /** + * A formula and functions metrics query. + */ + "query"?: FormulaAndFunctionMetricQueryDefinition; + /** + * Request type for the histogram request. + */ + "requestType"?: DistributionWidgetHistogramRequestType; /** * Timeseries, scalar, or event list response. Event list response formats are supported by Geomap widgets. */ @@ -115,6 +125,14 @@ export class HeatMapWidgetRequest { baseName: "queries", type: "Array", }, + query: { + baseName: "query", + type: "FormulaAndFunctionMetricQueryDefinition", + }, + requestType: { + baseName: "request_type", + type: "DistributionWidgetHistogramRequestType", + }, responseFormat: { baseName: "response_format", type: "FormulaAndFunctionResponseFormat", diff --git a/services/dashboards/src/v1/models/HeatMapWidgetXAxis.ts b/services/dashboards/src/v1/models/HeatMapWidgetXAxis.ts new file mode 100644 index 000000000000..0f31e4507bab --- /dev/null +++ b/services/dashboards/src/v1/models/HeatMapWidgetXAxis.ts @@ -0,0 +1,45 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * X Axis controls for the heat map widget. + */ +export class HeatMapWidgetXAxis { + /** + * Number of time buckets to target, also known as the resolution of the time bins. This is only applicable for distribution of points (group distributions use the roll-up modifier). + */ + "numBuckets"?: number; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + numBuckets: { + baseName: "num_buckets", + type: "number", + format: "int64", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return HeatMapWidgetXAxis.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/dashboards/src/v1/models/TypingInfo.ts b/services/dashboards/src/v1/models/TypingInfo.ts index ba8c95f573ec..5c15c732a9c5 100644 --- a/services/dashboards/src/v1/models/TypingInfo.ts +++ b/services/dashboards/src/v1/models/TypingInfo.ts @@ -51,6 +51,7 @@ import { GeomapWidgetRequestStyle } from "./GeomapWidgetRequestStyle"; import { GroupWidgetDefinition } from "./GroupWidgetDefinition"; import { HeatMapWidgetDefinition } from "./HeatMapWidgetDefinition"; import { HeatMapWidgetRequest } from "./HeatMapWidgetRequest"; +import { HeatMapWidgetXAxis } from "./HeatMapWidgetXAxis"; import { HostMapRequest } from "./HostMapRequest"; import { HostMapWidgetDefinition } from "./HostMapWidgetDefinition"; import { HostMapWidgetDefinitionRequests } from "./HostMapWidgetDefinitionRequests"; @@ -642,6 +643,7 @@ export const TypingInfo: ModelTypingInfo = { GroupWidgetDefinition: GroupWidgetDefinition, HeatMapWidgetDefinition: HeatMapWidgetDefinition, HeatMapWidgetRequest: HeatMapWidgetRequest, + HeatMapWidgetXAxis: HeatMapWidgetXAxis, HostMapRequest: HostMapRequest, HostMapWidgetDefinition: HostMapWidgetDefinition, HostMapWidgetDefinitionRequests: HostMapWidgetDefinitionRequests, diff --git a/services/dashboards/src/v1/models/WidgetMarker.ts b/services/dashboards/src/v1/models/WidgetMarker.ts index a7b9f8c793bb..afa80a298621 100644 --- a/services/dashboards/src/v1/models/WidgetMarker.ts +++ b/services/dashboards/src/v1/models/WidgetMarker.ts @@ -8,7 +8,7 @@ export class WidgetMarker { * Combination of: * - A severity error, warning, ok, or info * - A line type: dashed, solid, or bold - * In this case of a Distribution widget, this can be set to be `x_axis_percentile`. + * In this case of a Distribution widget, this can be set to be `percentile`. */ "displayType"?: string; /** @@ -21,6 +21,7 @@ export class WidgetMarker { "time"?: string; /** * Value to apply. Can be a single value y = 15 or a range of values 0 < y < 10. + * For Distribution widgets with `display_type` set to `percentile`, this should be a numeric percentile value (for example, "90" for P90). */ "value": string; /** diff --git a/services/notebooks/src/v1/index.ts b/services/notebooks/src/v1/index.ts index 2f95126fdae0..f06a2b3cbfa4 100644 --- a/services/notebooks/src/v1/index.ts +++ b/services/notebooks/src/v1/index.ts @@ -52,6 +52,7 @@ export { GroupType } from "./models/GroupType"; export { HeatMapWidgetDefinition } from "./models/HeatMapWidgetDefinition"; export { HeatMapWidgetDefinitionType } from "./models/HeatMapWidgetDefinitionType"; export { HeatMapWidgetRequest } from "./models/HeatMapWidgetRequest"; +export { HeatMapWidgetXAxis } from "./models/HeatMapWidgetXAxis"; export { LogQueryDefinition } from "./models/LogQueryDefinition"; export { LogQueryDefinitionGroupBy } from "./models/LogQueryDefinitionGroupBy"; export { LogQueryDefinitionGroupBySort } from "./models/LogQueryDefinitionGroupBySort"; diff --git a/services/notebooks/src/v1/models/DistributionWidgetRequest.ts b/services/notebooks/src/v1/models/DistributionWidgetRequest.ts index 0ab57ef01d1d..b9619caa6536 100644 --- a/services/notebooks/src/v1/models/DistributionWidgetRequest.ts +++ b/services/notebooks/src/v1/models/DistributionWidgetRequest.ts @@ -3,8 +3,11 @@ import { AttributeTypeMap } from "@datadog/datadog-api-client"; import { ApmStatsQueryDefinition } from "./ApmStatsQueryDefinition"; import { DistributionWidgetHistogramRequestQuery } from "./DistributionWidgetHistogramRequestQuery"; import { DistributionWidgetHistogramRequestType } from "./DistributionWidgetHistogramRequestType"; +import { FormulaAndFunctionQueryDefinition } from "./FormulaAndFunctionQueryDefinition"; +import { FormulaAndFunctionResponseFormat } from "./FormulaAndFunctionResponseFormat"; import { LogQueryDefinition } from "./LogQueryDefinition"; import { ProcessQueryDefinition } from "./ProcessQueryDefinition"; +import { WidgetFormula } from "./WidgetFormula"; import { WidgetStyle } from "./WidgetStyle"; /** @@ -23,6 +26,10 @@ export class DistributionWidgetRequest { * The log query. */ "eventQuery"?: LogQueryDefinition; + /** + * List of formulas that operate on queries. + */ + "formulas"?: Array; /** * The log query. */ @@ -43,6 +50,10 @@ export class DistributionWidgetRequest { * Widget query. */ "q"?: string; + /** + * List of queries that can be returned directly or used in formulas. + */ + "queries"?: Array; /** * Query definition for Distribution Widget Histogram Request */ @@ -51,6 +62,10 @@ export class DistributionWidgetRequest { * Request type for the histogram request. */ "requestType"?: DistributionWidgetHistogramRequestType; + /** + * Timeseries, scalar, or event list response. Event list response formats are supported by Geomap widgets. + */ + "responseFormat"?: FormulaAndFunctionResponseFormat; /** * The log query. */ @@ -90,6 +105,10 @@ export class DistributionWidgetRequest { baseName: "event_query", type: "LogQueryDefinition", }, + formulas: { + baseName: "formulas", + type: "Array", + }, logQuery: { baseName: "log_query", type: "LogQueryDefinition", @@ -110,6 +129,10 @@ export class DistributionWidgetRequest { baseName: "q", type: "string", }, + queries: { + baseName: "queries", + type: "Array", + }, query: { baseName: "query", type: "DistributionWidgetHistogramRequestQuery", @@ -118,6 +141,10 @@ export class DistributionWidgetRequest { baseName: "request_type", type: "DistributionWidgetHistogramRequestType", }, + responseFormat: { + baseName: "response_format", + type: "FormulaAndFunctionResponseFormat", + }, rumQuery: { baseName: "rum_query", type: "LogQueryDefinition", diff --git a/services/notebooks/src/v1/models/DistributionWidgetXAxis.ts b/services/notebooks/src/v1/models/DistributionWidgetXAxis.ts index 863b482f54dd..76e7c404dbad 100644 --- a/services/notebooks/src/v1/models/DistributionWidgetXAxis.ts +++ b/services/notebooks/src/v1/models/DistributionWidgetXAxis.ts @@ -16,6 +16,10 @@ export class DistributionWidgetXAxis { * Specifies minimum value to show on the x-axis. It takes a number, percentile (p90 === 90th percentile), or auto for default behavior. */ "min"?: string; + /** + * Number of value buckets to target, also known as the resolution of the value bins. + */ + "numBuckets"?: number; /** * Specifies the scale type. Possible values are `linear`. */ @@ -47,6 +51,11 @@ export class DistributionWidgetXAxis { baseName: "min", type: "string", }, + numBuckets: { + baseName: "num_buckets", + type: "number", + format: "int64", + }, scale: { baseName: "scale", type: "string", diff --git a/services/notebooks/src/v1/models/HeatMapWidgetDefinition.ts b/services/notebooks/src/v1/models/HeatMapWidgetDefinition.ts index 1eb272fa8777..c3149717c3cd 100644 --- a/services/notebooks/src/v1/models/HeatMapWidgetDefinition.ts +++ b/services/notebooks/src/v1/models/HeatMapWidgetDefinition.ts @@ -2,9 +2,11 @@ import { AttributeTypeMap } from "@datadog/datadog-api-client"; import { HeatMapWidgetDefinitionType } from "./HeatMapWidgetDefinitionType"; import { HeatMapWidgetRequest } from "./HeatMapWidgetRequest"; +import { HeatMapWidgetXAxis } from "./HeatMapWidgetXAxis"; import { WidgetAxis } from "./WidgetAxis"; import { WidgetCustomLink } from "./WidgetCustomLink"; import { WidgetEvent } from "./WidgetEvent"; +import { WidgetMarker } from "./WidgetMarker"; import { WidgetTextAlign } from "./WidgetTextAlign"; import { WidgetTime } from "./WidgetTime"; @@ -24,6 +26,10 @@ export class HeatMapWidgetDefinition { * Available legend sizes for a widget. Should be one of "0", "2", "4", "8", "16", or "auto". */ "legendSize"?: string; + /** + * List of markers. + */ + "markers"?: Array; /** * List of widget types. */ @@ -52,6 +58,10 @@ export class HeatMapWidgetDefinition { * Type of the heat map widget. */ "type": HeatMapWidgetDefinitionType; + /** + * X Axis controls for the heat map widget. + */ + "xaxis"?: HeatMapWidgetXAxis; /** * Axis controls for the widget. */ @@ -83,6 +93,10 @@ export class HeatMapWidgetDefinition { baseName: "legend_size", type: "string", }, + markers: { + baseName: "markers", + type: "Array", + }, requests: { baseName: "requests", type: "[HeatMapWidgetRequest]", @@ -113,6 +127,10 @@ export class HeatMapWidgetDefinition { type: "HeatMapWidgetDefinitionType", required: true, }, + xaxis: { + baseName: "xaxis", + type: "HeatMapWidgetXAxis", + }, yaxis: { baseName: "yaxis", type: "WidgetAxis", diff --git a/services/notebooks/src/v1/models/HeatMapWidgetRequest.ts b/services/notebooks/src/v1/models/HeatMapWidgetRequest.ts index 43153bb3a265..be131ec33dc9 100644 --- a/services/notebooks/src/v1/models/HeatMapWidgetRequest.ts +++ b/services/notebooks/src/v1/models/HeatMapWidgetRequest.ts @@ -1,6 +1,8 @@ import { AttributeTypeMap } from "@datadog/datadog-api-client"; +import { DistributionWidgetHistogramRequestType } from "./DistributionWidgetHistogramRequestType"; import { EventQueryDefinition } from "./EventQueryDefinition"; +import { FormulaAndFunctionMetricQueryDefinition } from "./FormulaAndFunctionMetricQueryDefinition"; import { FormulaAndFunctionQueryDefinition } from "./FormulaAndFunctionQueryDefinition"; import { FormulaAndFunctionResponseFormat } from "./FormulaAndFunctionResponseFormat"; import { LogQueryDefinition } from "./LogQueryDefinition"; @@ -48,6 +50,14 @@ export class HeatMapWidgetRequest { * List of queries that can be returned directly or used in formulas. */ "queries"?: Array; + /** + * A formula and functions metrics query. + */ + "query"?: FormulaAndFunctionMetricQueryDefinition; + /** + * Request type for the histogram request. + */ + "requestType"?: DistributionWidgetHistogramRequestType; /** * Timeseries, scalar, or event list response. Event list response formats are supported by Geomap widgets. */ @@ -115,6 +125,14 @@ export class HeatMapWidgetRequest { baseName: "queries", type: "Array", }, + query: { + baseName: "query", + type: "FormulaAndFunctionMetricQueryDefinition", + }, + requestType: { + baseName: "request_type", + type: "DistributionWidgetHistogramRequestType", + }, responseFormat: { baseName: "response_format", type: "FormulaAndFunctionResponseFormat", diff --git a/services/notebooks/src/v1/models/HeatMapWidgetXAxis.ts b/services/notebooks/src/v1/models/HeatMapWidgetXAxis.ts new file mode 100644 index 000000000000..0f31e4507bab --- /dev/null +++ b/services/notebooks/src/v1/models/HeatMapWidgetXAxis.ts @@ -0,0 +1,45 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * X Axis controls for the heat map widget. + */ +export class HeatMapWidgetXAxis { + /** + * Number of time buckets to target, also known as the resolution of the time bins. This is only applicable for distribution of points (group distributions use the roll-up modifier). + */ + "numBuckets"?: number; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + numBuckets: { + baseName: "num_buckets", + type: "number", + format: "int64", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return HeatMapWidgetXAxis.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/notebooks/src/v1/models/TypingInfo.ts b/services/notebooks/src/v1/models/TypingInfo.ts index e15a61b77673..05925f1e3550 100644 --- a/services/notebooks/src/v1/models/TypingInfo.ts +++ b/services/notebooks/src/v1/models/TypingInfo.ts @@ -21,6 +21,7 @@ import { FormulaAndFunctionProcessQueryDefinition } from "./FormulaAndFunctionPr import { FormulaAndFunctionSLOQueryDefinition } from "./FormulaAndFunctionSLOQueryDefinition"; import { HeatMapWidgetDefinition } from "./HeatMapWidgetDefinition"; import { HeatMapWidgetRequest } from "./HeatMapWidgetRequest"; +import { HeatMapWidgetXAxis } from "./HeatMapWidgetXAxis"; import { LogQueryDefinition } from "./LogQueryDefinition"; import { LogQueryDefinitionGroupBy } from "./LogQueryDefinitionGroupBy"; import { LogQueryDefinitionGroupBySort } from "./LogQueryDefinitionGroupBySort"; @@ -341,6 +342,7 @@ export const TypingInfo: ModelTypingInfo = { FormulaAndFunctionSLOQueryDefinition: FormulaAndFunctionSLOQueryDefinition, HeatMapWidgetDefinition: HeatMapWidgetDefinition, HeatMapWidgetRequest: HeatMapWidgetRequest, + HeatMapWidgetXAxis: HeatMapWidgetXAxis, LogQueryDefinition: LogQueryDefinition, LogQueryDefinitionGroupBy: LogQueryDefinitionGroupBy, LogQueryDefinitionGroupBySort: LogQueryDefinitionGroupBySort, diff --git a/services/notebooks/src/v1/models/WidgetMarker.ts b/services/notebooks/src/v1/models/WidgetMarker.ts index a7b9f8c793bb..afa80a298621 100644 --- a/services/notebooks/src/v1/models/WidgetMarker.ts +++ b/services/notebooks/src/v1/models/WidgetMarker.ts @@ -8,7 +8,7 @@ export class WidgetMarker { * Combination of: * - A severity error, warning, ok, or info * - A line type: dashed, solid, or bold - * In this case of a Distribution widget, this can be set to be `x_axis_percentile`. + * In this case of a Distribution widget, this can be set to be `percentile`. */ "displayType"?: string; /** @@ -21,6 +21,7 @@ export class WidgetMarker { "time"?: string; /** * Value to apply. Can be a single value y = 15 or a range of values 0 < y < 10. + * For Distribution widgets with `display_type` set to `percentile`, this should be a numeric percentile value (for example, "90" for P90). */ "value": string; /**