@pagopa/opex-dashboard 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/index.js +1 -1
- package/config.schema.json +73 -73
- package/package.json +9 -9
package/bin/index.js
CHANGED
|
@@ -1482,5 +1482,5 @@ async function generateHandler(options) {
|
|
|
1482
1482
|
// src/cli/index.ts
|
|
1483
1483
|
var program = new Command2();
|
|
1484
1484
|
program.name("opex_dashboard").description("Generate operational dashboards from OpenAPI 3 specifications");
|
|
1485
|
-
program.addCommand(createGenerateCommand()).version("0.2.
|
|
1485
|
+
program.addCommand(createGenerateCommand()).version("0.2.3");
|
|
1486
1486
|
program.parse(process.argv);
|
package/config.schema.json
CHANGED
|
@@ -3,51 +3,51 @@
|
|
|
3
3
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
4
|
"description": "Configuration schema for generating operational dashboards from OpenAPI specifications",
|
|
5
5
|
"title": "OpEx Dashboard Configuration",
|
|
6
|
-
"version": "0.2.
|
|
6
|
+
"version": "0.2.3",
|
|
7
7
|
"type": "object",
|
|
8
8
|
"properties": {
|
|
9
9
|
"action_groups": {
|
|
10
|
-
"description": "Array of Azure Action Group resource IDs for alarm notifications",
|
|
11
10
|
"type": "array",
|
|
12
11
|
"items": {
|
|
13
12
|
"type": "string"
|
|
14
|
-
}
|
|
13
|
+
},
|
|
14
|
+
"description": "Array of Azure Action Group resource IDs for alarm notifications"
|
|
15
15
|
},
|
|
16
16
|
"availability_threshold": {
|
|
17
|
-
"description": "Default minimum availability percentage (0-1). Default: 0.99 (99%)",
|
|
18
17
|
"default": 0.99,
|
|
18
|
+
"description": "Default minimum availability percentage (0-1). Default: 0.99 (99%)",
|
|
19
19
|
"type": "number"
|
|
20
20
|
},
|
|
21
21
|
"data_source": {
|
|
22
|
-
"
|
|
23
|
-
"
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "Azure resource ID for metrics data source (Application Gateway or API Management)"
|
|
24
24
|
},
|
|
25
25
|
"evaluation_frequency": {
|
|
26
|
-
"description": "Default frequency in minutes to evaluate alarms. Default: 10",
|
|
27
26
|
"default": 10,
|
|
27
|
+
"description": "Default frequency in minutes to evaluate alarms. Default: 10",
|
|
28
28
|
"type": "number"
|
|
29
29
|
},
|
|
30
30
|
"evaluation_time_window": {
|
|
31
|
-
"description": "Default time window in minutes for alarm evaluation. Default: 20",
|
|
32
31
|
"default": 20,
|
|
32
|
+
"description": "Default time window in minutes for alarm evaluation. Default: 20",
|
|
33
33
|
"type": "number"
|
|
34
34
|
},
|
|
35
35
|
"event_occurrences": {
|
|
36
|
-
"description": "Default number of event occurrences to trigger an alarm. Default: 1",
|
|
37
36
|
"default": 1,
|
|
37
|
+
"description": "Default number of event occurrences to trigger an alarm. Default: 1",
|
|
38
38
|
"type": "number"
|
|
39
39
|
},
|
|
40
40
|
"location": {
|
|
41
|
-
"
|
|
42
|
-
"
|
|
41
|
+
"type": "string",
|
|
42
|
+
"description": "Azure region/location for the dashboard (e.g., West Europe)"
|
|
43
43
|
},
|
|
44
44
|
"name": {
|
|
45
|
-
"
|
|
46
|
-
"
|
|
45
|
+
"type": "string",
|
|
46
|
+
"description": "Name of the dashboard"
|
|
47
47
|
},
|
|
48
48
|
"oa3_spec": {
|
|
49
|
-
"
|
|
50
|
-
"
|
|
49
|
+
"type": "string",
|
|
50
|
+
"description": "Path or HTTP URL to OpenAPI 3.x specification file (supports OA2 and OA3)"
|
|
51
51
|
},
|
|
52
52
|
"overrides": {
|
|
53
53
|
"description": "Optional overrides for hosts, per-endpoint alarm thresholds, and query configurations",
|
|
@@ -110,12 +110,11 @@
|
|
|
110
110
|
"type": "object",
|
|
111
111
|
"properties": {
|
|
112
112
|
"response_time_percentile": {
|
|
113
|
-
"description": "Percentile for response time queries. Default: 95",
|
|
114
113
|
"default": 95,
|
|
114
|
+
"description": "Percentile for response time queries. Default: 95",
|
|
115
115
|
"type": "number"
|
|
116
116
|
},
|
|
117
117
|
"status_code_categories": {
|
|
118
|
-
"description": "HTTP status code categories for response codes queries",
|
|
119
118
|
"default": [
|
|
120
119
|
"1XX",
|
|
121
120
|
"2XX",
|
|
@@ -123,6 +122,7 @@
|
|
|
123
122
|
"4XX",
|
|
124
123
|
"5XX"
|
|
125
124
|
],
|
|
125
|
+
"description": "HTTP status code categories for response codes queries",
|
|
126
126
|
"type": "array",
|
|
127
127
|
"items": {
|
|
128
128
|
"type": "string"
|
|
@@ -143,12 +143,11 @@
|
|
|
143
143
|
"type": "object",
|
|
144
144
|
"properties": {
|
|
145
145
|
"response_time_percentile": {
|
|
146
|
-
"description": "Percentile for response time queries. Default: 95",
|
|
147
146
|
"default": 95,
|
|
147
|
+
"description": "Percentile for response time queries. Default: 95",
|
|
148
148
|
"type": "number"
|
|
149
149
|
},
|
|
150
150
|
"status_code_categories": {
|
|
151
|
-
"description": "HTTP status code categories for response codes queries",
|
|
152
151
|
"default": [
|
|
153
152
|
"1XX",
|
|
154
153
|
"2XX",
|
|
@@ -156,6 +155,7 @@
|
|
|
156
155
|
"4XX",
|
|
157
156
|
"5XX"
|
|
158
157
|
],
|
|
158
|
+
"description": "HTTP status code categories for response codes queries",
|
|
159
159
|
"type": "array",
|
|
160
160
|
"items": {
|
|
161
161
|
"type": "string"
|
|
@@ -169,13 +169,13 @@
|
|
|
169
169
|
"additionalProperties": false
|
|
170
170
|
},
|
|
171
171
|
"resource_group": {
|
|
172
|
-
"description": "Azure resource group name where dashboard and alerts will be created. Default: dashboards",
|
|
173
172
|
"default": "dashboards",
|
|
173
|
+
"description": "Azure resource group name where dashboard and alerts will be created. Default: dashboards",
|
|
174
174
|
"type": "string"
|
|
175
175
|
},
|
|
176
176
|
"resource_type": {
|
|
177
|
-
"description": "Type of Azure resource to monitor: app-gateway (Application Gateway) or api-management (API Management). Default: app-gateway",
|
|
178
177
|
"default": "app-gateway",
|
|
178
|
+
"description": "Type of Azure resource to monitor: app-gateway (Application Gateway) or api-management (API Management). Default: app-gateway",
|
|
179
179
|
"type": "string",
|
|
180
180
|
"enum": [
|
|
181
181
|
"app-gateway",
|
|
@@ -183,8 +183,8 @@
|
|
|
183
183
|
]
|
|
184
184
|
},
|
|
185
185
|
"response_time_threshold": {
|
|
186
|
-
"description": "Default maximum response time in seconds. Default: 1.0",
|
|
187
186
|
"default": 1,
|
|
187
|
+
"description": "Default maximum response time in seconds. Default: 1.0",
|
|
188
188
|
"type": "number"
|
|
189
189
|
},
|
|
190
190
|
"terraform": {
|
|
@@ -198,20 +198,20 @@
|
|
|
198
198
|
"type": "object",
|
|
199
199
|
"properties": {
|
|
200
200
|
"container_name": {
|
|
201
|
-
"
|
|
202
|
-
"
|
|
201
|
+
"type": "string",
|
|
202
|
+
"description": "Blob container name for Terraform state"
|
|
203
203
|
},
|
|
204
204
|
"key": {
|
|
205
|
-
"
|
|
206
|
-
"
|
|
205
|
+
"type": "string",
|
|
206
|
+
"description": "State file key/path"
|
|
207
207
|
},
|
|
208
208
|
"resource_group_name": {
|
|
209
|
-
"
|
|
210
|
-
"
|
|
209
|
+
"type": "string",
|
|
210
|
+
"description": "Azure resource group for backend state"
|
|
211
211
|
},
|
|
212
212
|
"storage_account_name": {
|
|
213
|
-
"
|
|
214
|
-
"
|
|
213
|
+
"type": "string",
|
|
214
|
+
"description": "Storage account for Terraform state"
|
|
215
215
|
}
|
|
216
216
|
},
|
|
217
217
|
"required": [
|
|
@@ -223,14 +223,14 @@
|
|
|
223
223
|
"additionalProperties": false
|
|
224
224
|
},
|
|
225
225
|
"env_short": {
|
|
226
|
-
"description": "Environment short name (1 char: 'd'=dev, 'u'=uat, 'p'=prod)",
|
|
227
226
|
"type": "string",
|
|
228
|
-
"maxLength": 1
|
|
227
|
+
"maxLength": 1,
|
|
228
|
+
"description": "Environment short name (1 char: 'd'=dev, 'u'=uat, 'p'=prod)"
|
|
229
229
|
},
|
|
230
230
|
"prefix": {
|
|
231
|
-
"description": "Project prefix (max 6 chars, e.g., 'io', 'pagopa')",
|
|
232
231
|
"type": "string",
|
|
233
|
-
"maxLength": 6
|
|
232
|
+
"maxLength": 6,
|
|
233
|
+
"description": "Project prefix (max 6 chars, e.g., 'io', 'pagopa')"
|
|
234
234
|
}
|
|
235
235
|
},
|
|
236
236
|
"required": [
|
|
@@ -243,7 +243,6 @@
|
|
|
243
243
|
"type": "object",
|
|
244
244
|
"properties": {
|
|
245
245
|
"environments": {
|
|
246
|
-
"description": "Environment-specific configurations for dev/uat/prod",
|
|
247
246
|
"type": "object",
|
|
248
247
|
"properties": {
|
|
249
248
|
"dev": {
|
|
@@ -254,20 +253,20 @@
|
|
|
254
253
|
"type": "object",
|
|
255
254
|
"properties": {
|
|
256
255
|
"container_name": {
|
|
257
|
-
"
|
|
258
|
-
"
|
|
256
|
+
"type": "string",
|
|
257
|
+
"description": "Blob container name for Terraform state"
|
|
259
258
|
},
|
|
260
259
|
"key": {
|
|
261
|
-
"
|
|
262
|
-
"
|
|
260
|
+
"type": "string",
|
|
261
|
+
"description": "State file key/path"
|
|
263
262
|
},
|
|
264
263
|
"resource_group_name": {
|
|
265
|
-
"
|
|
266
|
-
"
|
|
264
|
+
"type": "string",
|
|
265
|
+
"description": "Azure resource group for backend state"
|
|
267
266
|
},
|
|
268
267
|
"storage_account_name": {
|
|
269
|
-
"
|
|
270
|
-
"
|
|
268
|
+
"type": "string",
|
|
269
|
+
"description": "Storage account for Terraform state"
|
|
271
270
|
}
|
|
272
271
|
},
|
|
273
272
|
"required": [
|
|
@@ -279,14 +278,14 @@
|
|
|
279
278
|
"additionalProperties": false
|
|
280
279
|
},
|
|
281
280
|
"env_short": {
|
|
282
|
-
"description": "Environment short name (1 char: 'd'=dev, 'u'=uat, 'p'=prod)",
|
|
283
281
|
"type": "string",
|
|
284
|
-
"maxLength": 1
|
|
282
|
+
"maxLength": 1,
|
|
283
|
+
"description": "Environment short name (1 char: 'd'=dev, 'u'=uat, 'p'=prod)"
|
|
285
284
|
},
|
|
286
285
|
"prefix": {
|
|
287
|
-
"description": "Project prefix (max 6 chars, e.g., 'io', 'pagopa')",
|
|
288
286
|
"type": "string",
|
|
289
|
-
"maxLength": 6
|
|
287
|
+
"maxLength": 6,
|
|
288
|
+
"description": "Project prefix (max 6 chars, e.g., 'io', 'pagopa')"
|
|
290
289
|
}
|
|
291
290
|
},
|
|
292
291
|
"required": [
|
|
@@ -303,20 +302,20 @@
|
|
|
303
302
|
"type": "object",
|
|
304
303
|
"properties": {
|
|
305
304
|
"container_name": {
|
|
306
|
-
"
|
|
307
|
-
"
|
|
305
|
+
"type": "string",
|
|
306
|
+
"description": "Blob container name for Terraform state"
|
|
308
307
|
},
|
|
309
308
|
"key": {
|
|
310
|
-
"
|
|
311
|
-
"
|
|
309
|
+
"type": "string",
|
|
310
|
+
"description": "State file key/path"
|
|
312
311
|
},
|
|
313
312
|
"resource_group_name": {
|
|
314
|
-
"
|
|
315
|
-
"
|
|
313
|
+
"type": "string",
|
|
314
|
+
"description": "Azure resource group for backend state"
|
|
316
315
|
},
|
|
317
316
|
"storage_account_name": {
|
|
318
|
-
"
|
|
319
|
-
"
|
|
317
|
+
"type": "string",
|
|
318
|
+
"description": "Storage account for Terraform state"
|
|
320
319
|
}
|
|
321
320
|
},
|
|
322
321
|
"required": [
|
|
@@ -328,14 +327,14 @@
|
|
|
328
327
|
"additionalProperties": false
|
|
329
328
|
},
|
|
330
329
|
"env_short": {
|
|
331
|
-
"description": "Environment short name (1 char: 'd'=dev, 'u'=uat, 'p'=prod)",
|
|
332
330
|
"type": "string",
|
|
333
|
-
"maxLength": 1
|
|
331
|
+
"maxLength": 1,
|
|
332
|
+
"description": "Environment short name (1 char: 'd'=dev, 'u'=uat, 'p'=prod)"
|
|
334
333
|
},
|
|
335
334
|
"prefix": {
|
|
336
|
-
"description": "Project prefix (max 6 chars, e.g., 'io', 'pagopa')",
|
|
337
335
|
"type": "string",
|
|
338
|
-
"maxLength": 6
|
|
336
|
+
"maxLength": 6,
|
|
337
|
+
"description": "Project prefix (max 6 chars, e.g., 'io', 'pagopa')"
|
|
339
338
|
}
|
|
340
339
|
},
|
|
341
340
|
"required": [
|
|
@@ -352,20 +351,20 @@
|
|
|
352
351
|
"type": "object",
|
|
353
352
|
"properties": {
|
|
354
353
|
"container_name": {
|
|
355
|
-
"
|
|
356
|
-
"
|
|
354
|
+
"type": "string",
|
|
355
|
+
"description": "Blob container name for Terraform state"
|
|
357
356
|
},
|
|
358
357
|
"key": {
|
|
359
|
-
"
|
|
360
|
-
"
|
|
358
|
+
"type": "string",
|
|
359
|
+
"description": "State file key/path"
|
|
361
360
|
},
|
|
362
361
|
"resource_group_name": {
|
|
363
|
-
"
|
|
364
|
-
"
|
|
362
|
+
"type": "string",
|
|
363
|
+
"description": "Azure resource group for backend state"
|
|
365
364
|
},
|
|
366
365
|
"storage_account_name": {
|
|
367
|
-
"
|
|
368
|
-
"
|
|
366
|
+
"type": "string",
|
|
367
|
+
"description": "Storage account for Terraform state"
|
|
369
368
|
}
|
|
370
369
|
},
|
|
371
370
|
"required": [
|
|
@@ -377,14 +376,14 @@
|
|
|
377
376
|
"additionalProperties": false
|
|
378
377
|
},
|
|
379
378
|
"env_short": {
|
|
380
|
-
"description": "Environment short name (1 char: 'd'=dev, 'u'=uat, 'p'=prod)",
|
|
381
379
|
"type": "string",
|
|
382
|
-
"maxLength": 1
|
|
380
|
+
"maxLength": 1,
|
|
381
|
+
"description": "Environment short name (1 char: 'd'=dev, 'u'=uat, 'p'=prod)"
|
|
383
382
|
},
|
|
384
383
|
"prefix": {
|
|
385
|
-
"description": "Project prefix (max 6 chars, e.g., 'io', 'pagopa')",
|
|
386
384
|
"type": "string",
|
|
387
|
-
"maxLength": 6
|
|
385
|
+
"maxLength": 6,
|
|
386
|
+
"description": "Project prefix (max 6 chars, e.g., 'io', 'pagopa')"
|
|
388
387
|
}
|
|
389
388
|
},
|
|
390
389
|
"required": [
|
|
@@ -394,7 +393,8 @@
|
|
|
394
393
|
"additionalProperties": false
|
|
395
394
|
}
|
|
396
395
|
},
|
|
397
|
-
"additionalProperties": false
|
|
396
|
+
"additionalProperties": false,
|
|
397
|
+
"description": "Environment-specific configurations for dev/uat/prod"
|
|
398
398
|
}
|
|
399
399
|
},
|
|
400
400
|
"required": [
|
|
@@ -405,8 +405,8 @@
|
|
|
405
405
|
]
|
|
406
406
|
},
|
|
407
407
|
"timespan": {
|
|
408
|
-
"description": "Time range for dashboard queries (e.g., 5m, 1h, 24h). Default: 5m",
|
|
409
408
|
"default": "5m",
|
|
409
|
+
"description": "Time range for dashboard queries (e.g., 5m, 1h, 24h). Default: 5m",
|
|
410
410
|
"type": "string"
|
|
411
411
|
}
|
|
412
412
|
},
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"url": "git+https://github.com/pagopa/dx.git",
|
|
6
6
|
"directory": "apps/opex-dashboard"
|
|
7
7
|
},
|
|
8
|
-
"version": "0.2.
|
|
8
|
+
"version": "0.2.3",
|
|
9
9
|
"description": "Generate operational dashboards from OpenAPI specifications",
|
|
10
10
|
"main": "dist/index.js",
|
|
11
11
|
"bin": {
|
|
@@ -31,24 +31,24 @@
|
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@apidevtools/swagger-parser": "^12.1.0",
|
|
34
|
-
"commander": "^14.0.
|
|
34
|
+
"commander": "^14.0.3",
|
|
35
35
|
"js-yaml": "^4.1.1",
|
|
36
36
|
"tmp": "^0.2.5",
|
|
37
|
-
"zod": "^4.
|
|
37
|
+
"zod": "^4.3.6"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@tsconfig/node24": "24.0.
|
|
40
|
+
"@tsconfig/node24": "24.0.4",
|
|
41
41
|
"@types/js-yaml": "^4.0.9",
|
|
42
|
-
"@types/node": "^22.19.
|
|
42
|
+
"@types/node": "^22.19.15",
|
|
43
43
|
"@types/tmp": "^0.2.6",
|
|
44
44
|
"@vitest/coverage-v8": "^3.2.4",
|
|
45
|
-
"eslint": "^
|
|
46
|
-
"prettier": "3.
|
|
45
|
+
"eslint": "^10.1.0",
|
|
46
|
+
"prettier": "3.8.1",
|
|
47
47
|
"tsup": "^8.5.1",
|
|
48
48
|
"tsx": "^4.21.0",
|
|
49
|
-
"typescript": "~5.
|
|
49
|
+
"typescript": "~5.9.3",
|
|
50
50
|
"vitest": "^3.2.4",
|
|
51
|
-
"@pagopa/eslint-config": "^
|
|
51
|
+
"@pagopa/eslint-config": "^6.0.1"
|
|
52
52
|
},
|
|
53
53
|
"engines": {
|
|
54
54
|
"node": ">=22.0.0"
|