Skip to content

Commit

Permalink
Regenerate client from commit c588c56 of spec repo (#263)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <[email protected]>
Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec authored Nov 12, 2021
1 parent d1bdf7f commit 2d4f905
Show file tree
Hide file tree
Showing 6 changed files with 329 additions and 4 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.5.1.dev2",
"regenerated": "2021-11-12 11:37:10.876032",
"spec_repo_commit": "fabbc01"
"regenerated": "2021-11-12 15:05:10.211771",
"spec_repo_commit": "c588c56"
},
"v2": {
"apigentools_version": "1.5.1.dev2",
"regenerated": "2021-11-12 11:37:10.908515",
"spec_repo_commit": "fabbc01"
"regenerated": "2021-11-12 15:05:10.240638",
"spec_repo_commit": "c588c56"
}
}
}
14 changes: 14 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,12 @@ components:
$ref: '#/components/schemas/WidgetCompareTo'
event_query:
$ref: '#/components/schemas/LogQueryDefinition'
formulas:
description: List of formulas that operate on queries. **This feature is
currently in beta.**
items:
$ref: '#/components/schemas/WidgetFormula'
type: array
increase_good:
description: Whether to show increase as good.
type: boolean
Expand All @@ -754,6 +760,14 @@ components:
q:
description: Query definition.
type: string
queries:
description: List of queries that can be returned directly or used in formulas.
**This feature is currently in beta.**
items:
$ref: '#/components/schemas/FormulaAndFunctionQueryDefinition'
type: array
response_format:
$ref: '#/components/schemas/FormulaAndFunctionResponseFormat'
rum_query:
$ref: '#/components/schemas/LogQueryDefinition'
security_query:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"2021-11-12T15:01:21.644Z"
Original file line number Diff line number Diff line change
@@ -0,0 +1,269 @@
{
"log": {
"_recordingName": "Dashboards/Create a new dashboard with a formulas and functions change widget",
"creator": {
"comment": "persister:fs",
"name": "Polly.JS",
"version": "5.1.0"
},
"entries": [
{
"_id": "82255a04cc78dc098057203ae783c46b",
"_order": 0,
"cache": {},
"request": {
"bodySize": 626,
"cookies": [],
"headers": [
{
"_fromType": "array",
"name": "user-agent",
"value": "datadog-api-client-typescript/1.0.0-beta.6 (node 14.18.1; os Linux; arch x64)"
},
{
"_fromType": "array",
"name": "accept",
"value": "application/json, */*;q=0.8"
},
{
"_fromType": "array",
"name": "content-type",
"value": "application/json"
},
{
"_fromType": "array",
"name": "x-datadog-parent-id",
"value": "8731715351358858124"
},
{
"_fromType": "array",
"name": "x-datadog-trace-id",
"value": "5873467306450681742"
},
{
"_fromType": "array",
"name": "content-length",
"value": "626"
},
{
"_fromType": "array",
"name": "connection",
"value": "close"
},
{
"name": "host",
"value": "api.datadoghq.com"
}
],
"headersSize": 476,
"httpVersion": "HTTP/1.1",
"method": "POST",
"postData": {
"mimeType": "application/json",
"params": [],
"text": "{\"layout_type\":\"ordered\",\"title\":\"Test-Create_a_new_dashboard_with_a_formulas_and_functions_change_widget-1636729281\",\"widgets\":[{\"definition\":{\"requests\":[{\"change_type\":\"absolute\",\"compare_to\":\"hour_before\",\"formulas\":[{\"formula\":\"hour_before(query1)\"},{\"formula\":\"query1\"}],\"increase_good\":true,\"order_by\":\"change\",\"order_dir\":\"desc\",\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"logs\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"\"}}],\"response_format\":\"scalar\"}],\"time\":{},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"change\"},\"layout\":{\"height\":4,\"width\":4,\"x\":0,\"y\":0}}]}"
},
"queryString": [],
"url": "https://api.datadoghq.com/api/v1/dashboard"
},
"response": {
"bodySize": 1031,
"content": {
"mimeType": "application/json",
"size": 1031,
"text": "{\"notify_list\":null,\"description\":null,\"restricted_roles\":[],\"author_name\":null,\"template_variables\":null,\"is_read_only\":false,\"id\":\"dwk-ej2-e2f\",\"title\":\"Test-Create_a_new_dashboard_with_a_formulas_and_functions_change_widget-1636729281\",\"url\":\"/dashboard/dwk-ej2-e2f/test-createanewdashboardwithaformulasandfunctionschangewidget-1636729281\",\"created_at\":\"2021-11-12T15:01:21.989698+00:00\",\"modified_at\":\"2021-11-12T15:01:21.989698+00:00\",\"author_handle\":\"[email protected]\",\"widgets\":[{\"definition\":{\"title_size\":\"16\",\"title\":\"\",\"title_align\":\"left\",\"time\":{},\"requests\":[{\"formulas\":[{\"formula\":\"hour_before(query1)\"},{\"formula\":\"query1\"}],\"order_by\":\"change\",\"order_dir\":\"desc\",\"compare_to\":\"hour_before\",\"response_format\":\"scalar\",\"increase_good\":true,\"queries\":[{\"search\":{\"query\":\"\"},\"data_source\":\"logs\",\"compute\":{\"aggregation\":\"count\"},\"name\":\"query1\",\"indexes\":[\"*\"],\"group_by\":[]}],\"change_type\":\"absolute\"}],\"type\":\"change\"},\"layout\":{\"y\":0,\"width\":4,\"x\":0,\"height\":4},\"id\":1892792703041590}],\"layout_type\":\"ordered\"}"
},
"cookies": [],
"headers": [
{
"name": "date",
"value": "Fri, 12 Nov 2021 15:01:22 GMT"
},
{
"name": "content-type",
"value": "application/json"
},
{
"name": "content-length",
"value": "1031"
},
{
"name": "connection",
"value": "close"
},
{
"name": "pragma",
"value": "no-cache"
},
{
"name": "cache-control",
"value": "no-cache"
},
{
"name": "x-envoy-upstream-service-time",
"value": "326"
},
{
"name": "vary",
"value": "Accept-Encoding"
},
{
"name": "x-content-type-options",
"value": "nosniff"
},
{
"name": "strict-transport-security",
"value": "max-age=15724800;"
},
{
"name": "content-security-policy",
"value": "frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report"
},
{
"name": "x-frame-options",
"value": "SAMEORIGIN"
}
],
"headersSize": 420,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2021-11-12T15:01:21.668Z",
"time": 365,
"timings": {
"blocked": -1,
"connect": -1,
"dns": -1,
"receive": 0,
"send": 0,
"ssl": -1,
"wait": 365
}
},
{
"_id": "c2474a11dcdebd269c3d458c798513b8",
"_order": 0,
"cache": {},
"request": {
"bodySize": 0,
"cookies": [],
"headers": [
{
"_fromType": "array",
"name": "user-agent",
"value": "datadog-api-client-typescript/1.0.0-beta.6 (node 14.18.1; os Linux; arch x64)"
},
{
"_fromType": "array",
"name": "accept",
"value": "application/json, */*;q=0.8"
},
{
"_fromType": "array",
"name": "x-datadog-parent-id",
"value": "1167209965635326775"
},
{
"_fromType": "array",
"name": "x-datadog-trace-id",
"value": "5873467306450681742"
},
{
"_fromType": "array",
"name": "connection",
"value": "close"
},
{
"name": "host",
"value": "api.datadoghq.com"
}
],
"headersSize": 437,
"httpVersion": "HTTP/1.1",
"method": "DELETE",
"queryString": [],
"url": "https://api.datadoghq.com/api/v1/dashboard/dwk-ej2-e2f"
},
"response": {
"bodySize": 38,
"content": {
"mimeType": "application/json",
"size": 38,
"text": "{\"deleted_dashboard_id\":\"dwk-ej2-e2f\"}"
},
"cookies": [],
"headers": [
{
"name": "date",
"value": "Fri, 12 Nov 2021 15:01:22 GMT"
},
{
"name": "content-type",
"value": "application/json"
},
{
"name": "content-length",
"value": "38"
},
{
"name": "connection",
"value": "close"
},
{
"name": "pragma",
"value": "no-cache"
},
{
"name": "cache-control",
"value": "no-cache"
},
{
"name": "x-envoy-upstream-service-time",
"value": "298"
},
{
"name": "vary",
"value": "Accept-Encoding"
},
{
"name": "x-content-type-options",
"value": "nosniff"
},
{
"name": "strict-transport-security",
"value": "max-age=15724800;"
},
{
"name": "content-security-policy",
"value": "frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report"
},
{
"name": "x-frame-options",
"value": "SAMEORIGIN"
}
],
"headersSize": 418,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2021-11-12T15:01:22.053Z",
"time": 361,
"timings": {
"blocked": -1,
"connect": -1,
"dns": -1,
"receive": 0,
"send": 0,
"ssl": -1,
"wait": 361
}
}
],
"pages": [],
"version": "1.2"
}
}
17 changes: 17 additions & 0 deletions features/v1/dashboards.feature
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,23 @@ Feature: Dashboards
When the request is sent
Then the response status is 200 OK

Scenario: Create a new dashboard with a formulas and functions change widget
Given new "CreateDashboard" request
And body with value { "title": "{{ unique }}", "widgets": [ { "definition": { "title": "", "title_size": "16", "title_align": "left", "time": {}, "type": "change", "requests": [ { "formulas": [ { "formula": "hour_before(query1)" }, { "formula": "query1" } ], "queries": [ { "data_source": "logs", "name": "query1", "search": { "query": "" }, "indexes": [ "*" ], "compute": { "aggregation": "count" }, "group_by": [] } ], "response_format": "scalar", "compare_to": "hour_before", "increase_good": true, "order_by": "change", "change_type": "absolute", "order_dir": "desc" } ] }, "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.requests[0].response_format" is equal to "scalar"
And the response "widgets[0].definition.requests[0].compare_to" is equal to "hour_before"
And the response "widgets[0].definition.requests[0].increase_good" is equal to true
And the response "widgets[0].definition.requests[0].order_by" is equal to "change"
And the response "widgets[0].definition.requests[0].change_type" is equal to "absolute"
And the response "widgets[0].definition.requests[0].order_dir" is equal to "desc"
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 "count"
And the response "widgets[0].definition.requests[0].formulas[0].formula" is equal to "hour_before(query1)"
And the response "widgets[0].definition.requests[0].formulas[1].formula" is equal to "query1"

Scenario: Create a new dashboard with a profile metric query
Given new "CreateDashboard" request
And body from file "dashboard_payload.json"
Expand Down
Loading

0 comments on commit 2d4f905

Please sign in to comment.