Skip to content

Commit 1e683f6

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 51cbf00f of spec repo (#794)
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>
1 parent 66796bb commit 1e683f6

File tree

10 files changed

+235
-5
lines changed

10 files changed

+235
-5
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.2",
7-
"regenerated": "2022-08-09 11:24:25.402502",
8-
"spec_repo_commit": "f62be169"
7+
"regenerated": "2022-08-15 14:37:09.699404",
8+
"spec_repo_commit": "51cbf00f"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.2",
12-
"regenerated": "2022-08-09 11:24:25.415050",
13-
"spec_repo_commit": "f62be169"
12+
"regenerated": "2022-08-15 14:37:09.711637",
13+
"spec_repo_commit": "51cbf00f"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6593,6 +6593,10 @@ components:
65936593
description: Whether to show the time that has elapsed since the monitor/group
65946594
triggered.
65956595
type: boolean
6596+
show_priority:
6597+
default: false
6598+
description: Whether to show the priorities column.
6599+
type: boolean
65966600
sort:
65976601
$ref: '#/components/schemas/WidgetMonitorSummarySort'
65986602
start:
@@ -17099,6 +17103,8 @@ components:
1709917103
- tags,desc
1710017104
- triggered,asc
1710117105
- triggered,desc
17106+
- priority,asc
17107+
- priority,desc
1710217108
example: name,asc
1710317109
type: string
1710417110
x-enum-varnames:
@@ -17117,6 +17123,8 @@ components:
1711717123
- TAGS_DESCENDING
1711817124
- TRIGGERED_ASCENDING
1711917125
- TRIGGERED_DESCENDING
17126+
- PRIORITY_ASCENDING
17127+
- PRIORITY_DESCENDING
1712017128
WidgetNodeType:
1712117129
description: Which type of node to use in the map.
1712217130
enum:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2022-08-12T17:10:43.185Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
{
2+
"log": {
3+
"_recordingName": "Dashboards/Create a new dashboard with manage_status widget and show_priority parameter",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "32cea16db7095b8771eab188a84321a2",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 515,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
},
23+
{
24+
"_fromType": "array",
25+
"name": "content-type",
26+
"value": "application/json"
27+
}
28+
],
29+
"headersSize": 559,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "POST",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"description\":\"\",\"is_read_only\":false,\"layout_type\":\"free\",\"notify_list\":[],\"template_variables\":[],\"title\":\"Test-Create_a_new_dashboard_with_manage_status_widget_and_show_priority_parameter-1660324243\",\"widgets\":[{\"definition\":{\"color_preference\":\"text\",\"count\":50,\"display_format\":\"countsAndList\",\"hide_zero_counts\":true,\"query\":\"\",\"show_last_triggered\":false,\"show_priority\":false,\"sort\":\"priority,asc\",\"start\":0,\"summary_type\":\"monitors\",\"type\":\"manage_status\"},\"layout\":{\"height\":25,\"width\":50,\"x\":0,\"y\":0}}]}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v1/dashboard"
39+
},
40+
"response": {
41+
"bodySize": 843,
42+
"content": {
43+
"mimeType": "application/json",
44+
"size": 843,
45+
"text": "{\"notify_list\":[],\"description\":\"\",\"restricted_roles\":[],\"author_name\":null,\"template_variables\":[],\"is_read_only\":false,\"id\":\"a28-2ea-xeq\",\"title\":\"Test-Create_a_new_dashboard_with_manage_status_widget_and_show_priority_parameter-1660324243\",\"url\":\"/dashboard/a28-2ea-xeq/test-createanewdashboardwithmanagestatuswidgetandshowpriorityparameter-166032424\",\"created_at\":\"2022-08-12T17:10:43.357911+00:00\",\"modified_at\":\"2022-08-12T17:10:43.357911+00:00\",\"author_handle\":\"[email protected]\",\"widgets\":[{\"definition\":{\"count\":50,\"sort\":\"priority,asc\",\"color_preference\":\"text\",\"show_priority\":false,\"hide_zero_counts\":true,\"start\":0,\"summary_type\":\"monitors\",\"show_last_triggered\":false,\"query\":\"\",\"display_format\":\"countsAndList\",\"type\":\"manage_status\"},\"layout\":{\"y\":0,\"width\":50,\"x\":0,\"height\":25},\"id\":559045226435119}],\"layout_type\":\"free\"}\n"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/json"
52+
}
53+
],
54+
"headersSize": 593,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 200,
58+
"statusText": "OK"
59+
},
60+
"startedDateTime": "2022-08-12T17:10:43.206Z",
61+
"time": 204
62+
},
63+
{
64+
"_id": "ce0851bfd32a5148784c46a65cb4de01",
65+
"_order": 0,
66+
"cache": {},
67+
"request": {
68+
"bodySize": 0,
69+
"cookies": [],
70+
"headers": [
71+
{
72+
"_fromType": "array",
73+
"name": "accept",
74+
"value": "application/json"
75+
}
76+
],
77+
"headersSize": 520,
78+
"httpVersion": "HTTP/1.1",
79+
"method": "DELETE",
80+
"queryString": [],
81+
"url": "https://api.datadoghq.com/api/v1/dashboard/a28-2ea-xeq"
82+
},
83+
"response": {
84+
"bodySize": 39,
85+
"content": {
86+
"mimeType": "application/json",
87+
"size": 39,
88+
"text": "{\"deleted_dashboard_id\":\"a28-2ea-xeq\"}\n"
89+
},
90+
"cookies": [],
91+
"headers": [
92+
{
93+
"name": "content-type",
94+
"value": "application/json"
95+
}
96+
],
97+
"headersSize": 592,
98+
"httpVersion": "HTTP/1.1",
99+
"redirectURL": "",
100+
"status": 200,
101+
"statusText": "OK"
102+
},
103+
"startedDateTime": "2022-08-12T17:10:43.423Z",
104+
"time": 171
105+
}
106+
],
107+
"pages": [],
108+
"version": "1.2"
109+
}
110+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/**
2+
* Create a new dashboard with manage_status widget and show_priority parameter
3+
*/
4+
5+
import { client, v1 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v1.DashboardsApi(configuration);
9+
10+
const params: v1.DashboardsApiCreateDashboardRequest = {
11+
body: {
12+
title:
13+
"Example-Create_a_new_dashboard_with_manage_status_widget_and_show_priority_parameter",
14+
description: "",
15+
widgets: [
16+
{
17+
layout: {
18+
x: 0,
19+
y: 0,
20+
width: 50,
21+
height: 25,
22+
},
23+
definition: {
24+
type: "manage_status",
25+
summaryType: "monitors",
26+
displayFormat: "countsAndList",
27+
colorPreference: "text",
28+
hideZeroCounts: true,
29+
showLastTriggered: false,
30+
query: "",
31+
sort: "priority,asc",
32+
count: 50,
33+
start: 0,
34+
showPriority: false,
35+
},
36+
},
37+
],
38+
templateVariables: [],
39+
layoutType: "free",
40+
isReadOnly: false,
41+
notifyList: [],
42+
},
43+
};
44+
45+
apiInstance
46+
.createDashboard(params)
47+
.then((data: v1.Dashboard) => {
48+
console.log(
49+
"API called successfully. Returned data: " + JSON.stringify(data)
50+
);
51+
})
52+
.catch((error: any) => console.error(error));

features/v1/dashboards.feature

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,16 @@ Feature: Dashboards
330330
Then the response status is 200 OK
331331
And the response "widgets[0].definition.type" is equal to "manage_status"
332332

333+
@team:DataDog/dashboards
334+
Scenario: Create a new dashboard with manage_status widget and show_priority parameter
335+
Given new "CreateDashboard" request
336+
And body from file "dashboards_json_payload/manage_status_widget_priority_sort.json"
337+
When the request is sent
338+
Then the response status is 200 OK
339+
And the response "widgets[0].definition.type" is equal to "manage_status"
340+
And the response "widgets[0].definition.show_priority" is false
341+
And the response "widgets[0].definition.sort" is equal to "priority,asc"
342+
333343
@team:DataDog/dashboards
334344
Scenario: Create a new dashboard with note widget
335345
Given new "CreateDashboard" request
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"title":"{{ unique }}",
3+
"description":"",
4+
"widgets":[
5+
{
6+
"layout":{
7+
"x":0,
8+
"y":0,
9+
"width":50,
10+
"height":25
11+
},
12+
"definition":{
13+
"type":"manage_status",
14+
"summary_type":"monitors",
15+
"display_format":"countsAndList",
16+
"color_preference":"text",
17+
"hide_zero_counts":true,
18+
"show_last_triggered":false,
19+
"query":"",
20+
"sort":"priority,asc",
21+
"count":50,
22+
"start":0,
23+
"show_priority": false
24+
}
25+
}
26+
],
27+
"template_variables":[
28+
29+
],
30+
"layout_type":"free",
31+
"is_read_only":false,
32+
"notify_list":[
33+
34+
]
35+
}

packages/datadog-api-client-v1/models/MonitorSummaryWidgetDefinition.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ export class MonitorSummaryWidgetDefinition {
4040
* Whether to show the time that has elapsed since the monitor/group triggered.
4141
*/
4242
"showLastTriggered"?: boolean;
43+
/**
44+
* Whether to show the priorities column.
45+
*/
46+
"showPriority"?: boolean;
4347
/**
4448
* Widget sorting methods.
4549
*/
@@ -104,6 +108,10 @@ export class MonitorSummaryWidgetDefinition {
104108
baseName: "show_last_triggered",
105109
type: "boolean",
106110
},
111+
showPriority: {
112+
baseName: "show_priority",
113+
type: "boolean",
114+
},
107115
sort: {
108116
baseName: "sort",
109117
type: "WidgetMonitorSummarySort",

packages/datadog-api-client-v1/models/ObjectSerializer.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,6 +1205,8 @@ const enumsMap: { [key: string]: any[] } = {
12051205
"tags,desc",
12061206
"triggered,asc",
12071207
"triggered,desc",
1208+
"priority,asc",
1209+
"priority,desc",
12081210
],
12091211
WidgetNodeType: ["host", "container"],
12101212
WidgetOrderBy: ["change", "name", "present", "past"],

packages/datadog-api-client-v1/models/WidgetMonitorSummarySort.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ export type WidgetMonitorSummarySort =
1919
| typeof TAGS_ASCENDING
2020
| typeof TAGS_DESCENDING
2121
| typeof TRIGGERED_ASCENDING
22-
| typeof TRIGGERED_DESCENDING;
22+
| typeof TRIGGERED_DESCENDING
23+
| typeof PRIORITY_ASCENDING
24+
| typeof PRIORITY_DESCENDING;
2325
export const NAME = "name";
2426
export const GROUP = "group";
2527
export const STATUS = "status";
@@ -35,3 +37,5 @@ export const TAGS_ASCENDING = "tags,asc";
3537
export const TAGS_DESCENDING = "tags,desc";
3638
export const TRIGGERED_ASCENDING = "triggered,asc";
3739
export const TRIGGERED_DESCENDING = "triggered,desc";
40+
export const PRIORITY_ASCENDING = "priority,asc";
41+
export const PRIORITY_DESCENDING = "priority,desc";

0 commit comments

Comments
 (0)