@platformatic/watt-admin 0.2.0 → 0.4.0
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/lib/start.js +1 -1
- package/package.json +25 -17
- package/watt.json +8 -2
- package/web/backend/dist/plugins/websocket.js +11 -0
- package/web/backend/dist/plugins/websocket.js.map +1 -0
- package/web/backend/dist/routes/metrics.js +45 -0
- package/web/backend/dist/routes/metrics.js.map +1 -0
- package/web/backend/dist/routes/root.js +28 -31
- package/web/backend/dist/routes/root.js.map +1 -1
- package/web/backend/dist/routes/ws.js +38 -0
- package/web/backend/dist/routes/ws.js.map +1 -0
- package/web/backend/dist/schemas/index.js +8 -1
- package/web/backend/dist/schemas/index.js.map +1 -1
- package/web/backend/dist/utils/calc.js +127 -82
- package/web/backend/dist/utils/calc.js.map +1 -1
- package/web/backend/dist/utils/client.openapi.js +1 -1
- package/web/backend/openapi.json +279 -84
- package/web/backend/platformatic.json +1 -1
- package/web/composer/platformatic.json +6 -1
- package/web/frontend/dist/assets/{index-uJpC0VpC.js → index-BpxIrIMq.js} +50 -50
- package/web/frontend/dist/assets/index-BpxIrIMq.js.map +1 -0
- package/web/frontend/dist/assets/{index-D-ld0Cou.css → index-DM7peTyq.css} +1 -1
- package/web/frontend/dist/index.html +2 -2
- package/web/frontend/watt.json +1 -1
- package/web/frontend/dist/assets/index-uJpC0VpC.js.map +0 -1
package/web/backend/openapi.json
CHANGED
|
@@ -9,17 +9,16 @@
|
|
|
9
9
|
"schemas": {}
|
|
10
10
|
},
|
|
11
11
|
"paths": {
|
|
12
|
-
"/runtimes": {
|
|
12
|
+
"/runtimes/{pid}/metrics": {
|
|
13
13
|
"get": {
|
|
14
14
|
"parameters": [
|
|
15
15
|
{
|
|
16
16
|
"schema": {
|
|
17
|
-
"type": "
|
|
18
|
-
"default": false
|
|
17
|
+
"type": "number"
|
|
19
18
|
},
|
|
20
|
-
"in": "
|
|
21
|
-
"name": "
|
|
22
|
-
"required":
|
|
19
|
+
"in": "path",
|
|
20
|
+
"name": "pid",
|
|
21
|
+
"required": true
|
|
23
22
|
}
|
|
24
23
|
],
|
|
25
24
|
"responses": {
|
|
@@ -28,65 +27,128 @@
|
|
|
28
27
|
"content": {
|
|
29
28
|
"application/json": {
|
|
30
29
|
"schema": {
|
|
31
|
-
"type": "
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
"platformaticVersion": {
|
|
69
|
-
"type": "string"
|
|
70
|
-
},
|
|
71
|
-
"selected": {
|
|
72
|
-
"type": "boolean"
|
|
30
|
+
"type": "object",
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"properties": {
|
|
33
|
+
"dataMem": {
|
|
34
|
+
"type": "array",
|
|
35
|
+
"items": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"additionalProperties": false,
|
|
38
|
+
"properties": {
|
|
39
|
+
"date": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"format": "date-time"
|
|
42
|
+
},
|
|
43
|
+
"rss": {
|
|
44
|
+
"type": "number"
|
|
45
|
+
},
|
|
46
|
+
"totalHeap": {
|
|
47
|
+
"type": "number"
|
|
48
|
+
},
|
|
49
|
+
"usedHeap": {
|
|
50
|
+
"type": "number"
|
|
51
|
+
},
|
|
52
|
+
"newSpace": {
|
|
53
|
+
"type": "number"
|
|
54
|
+
},
|
|
55
|
+
"oldSpace": {
|
|
56
|
+
"type": "number"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"required": [
|
|
60
|
+
"date",
|
|
61
|
+
"rss",
|
|
62
|
+
"totalHeap",
|
|
63
|
+
"usedHeap",
|
|
64
|
+
"newSpace",
|
|
65
|
+
"oldSpace"
|
|
66
|
+
]
|
|
73
67
|
}
|
|
74
68
|
},
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
69
|
+
"dataCpu": {
|
|
70
|
+
"type": "array",
|
|
71
|
+
"items": {
|
|
72
|
+
"type": "object",
|
|
73
|
+
"additionalProperties": false,
|
|
74
|
+
"properties": {
|
|
75
|
+
"date": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"format": "date-time"
|
|
78
|
+
},
|
|
79
|
+
"cpu": {
|
|
80
|
+
"type": "number"
|
|
81
|
+
},
|
|
82
|
+
"eventLoop": {
|
|
83
|
+
"type": "number"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"required": [
|
|
87
|
+
"date",
|
|
88
|
+
"cpu",
|
|
89
|
+
"eventLoop"
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"dataLatency": {
|
|
94
|
+
"type": "array",
|
|
95
|
+
"items": {
|
|
96
|
+
"type": "object",
|
|
97
|
+
"additionalProperties": false,
|
|
98
|
+
"properties": {
|
|
99
|
+
"date": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"format": "date-time"
|
|
102
|
+
},
|
|
103
|
+
"p90": {
|
|
104
|
+
"type": "number"
|
|
105
|
+
},
|
|
106
|
+
"p95": {
|
|
107
|
+
"type": "number"
|
|
108
|
+
},
|
|
109
|
+
"p99": {
|
|
110
|
+
"type": "number"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"required": [
|
|
114
|
+
"date",
|
|
115
|
+
"p90",
|
|
116
|
+
"p95",
|
|
117
|
+
"p99"
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"dataReq": {
|
|
122
|
+
"type": "array",
|
|
123
|
+
"items": {
|
|
124
|
+
"type": "object",
|
|
125
|
+
"additionalProperties": false,
|
|
126
|
+
"properties": {
|
|
127
|
+
"date": {
|
|
128
|
+
"type": "string",
|
|
129
|
+
"format": "date-time"
|
|
130
|
+
},
|
|
131
|
+
"count": {
|
|
132
|
+
"type": "number"
|
|
133
|
+
},
|
|
134
|
+
"rps": {
|
|
135
|
+
"type": "number"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"required": [
|
|
139
|
+
"date",
|
|
140
|
+
"count",
|
|
141
|
+
"rps"
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"required": [
|
|
147
|
+
"dataMem",
|
|
148
|
+
"dataCpu",
|
|
149
|
+
"dataLatency",
|
|
150
|
+
"dataReq"
|
|
151
|
+
]
|
|
90
152
|
}
|
|
91
153
|
}
|
|
92
154
|
}
|
|
@@ -94,7 +156,7 @@
|
|
|
94
156
|
}
|
|
95
157
|
}
|
|
96
158
|
},
|
|
97
|
-
"/runtimes/{pid}/metrics": {
|
|
159
|
+
"/runtimes/{pid}/metrics/{serviceId}": {
|
|
98
160
|
"get": {
|
|
99
161
|
"parameters": [
|
|
100
162
|
{
|
|
@@ -104,6 +166,14 @@
|
|
|
104
166
|
"in": "path",
|
|
105
167
|
"name": "pid",
|
|
106
168
|
"required": true
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"schema": {
|
|
172
|
+
"type": "string"
|
|
173
|
+
},
|
|
174
|
+
"in": "path",
|
|
175
|
+
"name": "serviceId",
|
|
176
|
+
"required": true
|
|
107
177
|
}
|
|
108
178
|
],
|
|
109
179
|
"responses": {
|
|
@@ -113,11 +183,13 @@
|
|
|
113
183
|
"application/json": {
|
|
114
184
|
"schema": {
|
|
115
185
|
"type": "object",
|
|
186
|
+
"additionalProperties": false,
|
|
116
187
|
"properties": {
|
|
117
188
|
"dataMem": {
|
|
118
189
|
"type": "array",
|
|
119
190
|
"items": {
|
|
120
191
|
"type": "object",
|
|
192
|
+
"additionalProperties": false,
|
|
121
193
|
"properties": {
|
|
122
194
|
"date": {
|
|
123
195
|
"type": "string",
|
|
@@ -153,6 +225,7 @@
|
|
|
153
225
|
"type": "array",
|
|
154
226
|
"items": {
|
|
155
227
|
"type": "object",
|
|
228
|
+
"additionalProperties": false,
|
|
156
229
|
"properties": {
|
|
157
230
|
"date": {
|
|
158
231
|
"type": "string",
|
|
@@ -176,6 +249,7 @@
|
|
|
176
249
|
"type": "array",
|
|
177
250
|
"items": {
|
|
178
251
|
"type": "object",
|
|
252
|
+
"additionalProperties": false,
|
|
179
253
|
"properties": {
|
|
180
254
|
"date": {
|
|
181
255
|
"type": "string",
|
|
@@ -203,6 +277,7 @@
|
|
|
203
277
|
"type": "array",
|
|
204
278
|
"items": {
|
|
205
279
|
"type": "object",
|
|
280
|
+
"additionalProperties": false,
|
|
206
281
|
"properties": {
|
|
207
282
|
"date": {
|
|
208
283
|
"type": "string",
|
|
@@ -236,7 +311,7 @@
|
|
|
236
311
|
}
|
|
237
312
|
}
|
|
238
313
|
},
|
|
239
|
-
"/runtimes/{pid}/metrics/{serviceId}": {
|
|
314
|
+
"/runtimes/{pid}/metrics/{serviceId}/{workerId}": {
|
|
240
315
|
"get": {
|
|
241
316
|
"parameters": [
|
|
242
317
|
{
|
|
@@ -254,6 +329,14 @@
|
|
|
254
329
|
"in": "path",
|
|
255
330
|
"name": "serviceId",
|
|
256
331
|
"required": true
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"schema": {
|
|
335
|
+
"type": "number"
|
|
336
|
+
},
|
|
337
|
+
"in": "path",
|
|
338
|
+
"name": "workerId",
|
|
339
|
+
"required": true
|
|
257
340
|
}
|
|
258
341
|
],
|
|
259
342
|
"responses": {
|
|
@@ -263,11 +346,13 @@
|
|
|
263
346
|
"application/json": {
|
|
264
347
|
"schema": {
|
|
265
348
|
"type": "object",
|
|
349
|
+
"additionalProperties": false,
|
|
266
350
|
"properties": {
|
|
267
351
|
"dataMem": {
|
|
268
352
|
"type": "array",
|
|
269
353
|
"items": {
|
|
270
354
|
"type": "object",
|
|
355
|
+
"additionalProperties": false,
|
|
271
356
|
"properties": {
|
|
272
357
|
"date": {
|
|
273
358
|
"type": "string",
|
|
@@ -303,6 +388,7 @@
|
|
|
303
388
|
"type": "array",
|
|
304
389
|
"items": {
|
|
305
390
|
"type": "object",
|
|
391
|
+
"additionalProperties": false,
|
|
306
392
|
"properties": {
|
|
307
393
|
"date": {
|
|
308
394
|
"type": "string",
|
|
@@ -326,6 +412,7 @@
|
|
|
326
412
|
"type": "array",
|
|
327
413
|
"items": {
|
|
328
414
|
"type": "object",
|
|
415
|
+
"additionalProperties": false,
|
|
329
416
|
"properties": {
|
|
330
417
|
"date": {
|
|
331
418
|
"type": "string",
|
|
@@ -353,6 +440,7 @@
|
|
|
353
440
|
"type": "array",
|
|
354
441
|
"items": {
|
|
355
442
|
"type": "object",
|
|
443
|
+
"additionalProperties": false,
|
|
356
444
|
"properties": {
|
|
357
445
|
"date": {
|
|
358
446
|
"type": "string",
|
|
@@ -386,6 +474,132 @@
|
|
|
386
474
|
}
|
|
387
475
|
}
|
|
388
476
|
},
|
|
477
|
+
"/runtimes": {
|
|
478
|
+
"get": {
|
|
479
|
+
"parameters": [
|
|
480
|
+
{
|
|
481
|
+
"schema": {
|
|
482
|
+
"type": "boolean",
|
|
483
|
+
"default": false
|
|
484
|
+
},
|
|
485
|
+
"in": "query",
|
|
486
|
+
"name": "includeAdmin",
|
|
487
|
+
"required": false
|
|
488
|
+
}
|
|
489
|
+
],
|
|
490
|
+
"responses": {
|
|
491
|
+
"200": {
|
|
492
|
+
"description": "Default Response",
|
|
493
|
+
"content": {
|
|
494
|
+
"application/json": {
|
|
495
|
+
"schema": {
|
|
496
|
+
"type": "array",
|
|
497
|
+
"items": {
|
|
498
|
+
"type": "object",
|
|
499
|
+
"additionalProperties": false,
|
|
500
|
+
"properties": {
|
|
501
|
+
"pid": {
|
|
502
|
+
"type": "integer"
|
|
503
|
+
},
|
|
504
|
+
"cwd": {
|
|
505
|
+
"type": "string"
|
|
506
|
+
},
|
|
507
|
+
"argv": {
|
|
508
|
+
"type": "array",
|
|
509
|
+
"items": {
|
|
510
|
+
"type": "string"
|
|
511
|
+
}
|
|
512
|
+
},
|
|
513
|
+
"uptimeSeconds": {
|
|
514
|
+
"type": "number"
|
|
515
|
+
},
|
|
516
|
+
"execPath": {
|
|
517
|
+
"type": "string"
|
|
518
|
+
},
|
|
519
|
+
"nodeVersion": {
|
|
520
|
+
"type": "string"
|
|
521
|
+
},
|
|
522
|
+
"projectDir": {
|
|
523
|
+
"type": "string"
|
|
524
|
+
},
|
|
525
|
+
"packageName": {
|
|
526
|
+
"type": "string"
|
|
527
|
+
},
|
|
528
|
+
"packageVersion": {
|
|
529
|
+
"type": "string"
|
|
530
|
+
},
|
|
531
|
+
"url": {
|
|
532
|
+
"type": "string"
|
|
533
|
+
},
|
|
534
|
+
"platformaticVersion": {
|
|
535
|
+
"type": "string"
|
|
536
|
+
},
|
|
537
|
+
"selected": {
|
|
538
|
+
"type": "boolean"
|
|
539
|
+
}
|
|
540
|
+
},
|
|
541
|
+
"required": [
|
|
542
|
+
"pid",
|
|
543
|
+
"cwd",
|
|
544
|
+
"argv",
|
|
545
|
+
"uptimeSeconds",
|
|
546
|
+
"execPath",
|
|
547
|
+
"nodeVersion",
|
|
548
|
+
"projectDir",
|
|
549
|
+
"packageName",
|
|
550
|
+
"packageVersion",
|
|
551
|
+
"url",
|
|
552
|
+
"platformaticVersion",
|
|
553
|
+
"selected"
|
|
554
|
+
]
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
},
|
|
563
|
+
"/runtimes/{pid}/health": {
|
|
564
|
+
"get": {
|
|
565
|
+
"parameters": [
|
|
566
|
+
{
|
|
567
|
+
"schema": {
|
|
568
|
+
"type": "number"
|
|
569
|
+
},
|
|
570
|
+
"in": "path",
|
|
571
|
+
"name": "pid",
|
|
572
|
+
"required": true
|
|
573
|
+
}
|
|
574
|
+
],
|
|
575
|
+
"responses": {
|
|
576
|
+
"200": {
|
|
577
|
+
"description": "Default Response",
|
|
578
|
+
"content": {
|
|
579
|
+
"application/json": {
|
|
580
|
+
"schema": {
|
|
581
|
+
"type": "object",
|
|
582
|
+
"additionalProperties": false,
|
|
583
|
+
"properties": {
|
|
584
|
+
"status": {
|
|
585
|
+
"type": "string",
|
|
586
|
+
"enum": [
|
|
587
|
+
"OK",
|
|
588
|
+
"KO"
|
|
589
|
+
],
|
|
590
|
+
"description": "Status can only be 'OK' or 'KO'"
|
|
591
|
+
}
|
|
592
|
+
},
|
|
593
|
+
"required": [
|
|
594
|
+
"status"
|
|
595
|
+
]
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
},
|
|
389
603
|
"/runtimes/{pid}/services": {
|
|
390
604
|
"get": {
|
|
391
605
|
"parameters": [
|
|
@@ -508,25 +722,6 @@
|
|
|
508
722
|
}
|
|
509
723
|
}
|
|
510
724
|
},
|
|
511
|
-
"/runtimes/{pid}/logs": {
|
|
512
|
-
"get": {
|
|
513
|
-
"parameters": [
|
|
514
|
-
{
|
|
515
|
-
"schema": {
|
|
516
|
-
"type": "number"
|
|
517
|
-
},
|
|
518
|
-
"in": "path",
|
|
519
|
-
"name": "pid",
|
|
520
|
-
"required": true
|
|
521
|
-
}
|
|
522
|
-
],
|
|
523
|
-
"responses": {
|
|
524
|
-
"200": {
|
|
525
|
-
"description": "Default Response"
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
},
|
|
530
725
|
"/runtimes/{pid}/openapi/{serviceId}": {
|
|
531
726
|
"get": {
|
|
532
727
|
"parameters": [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "https://schemas.platformatic.dev/@platformatic/composer/2.
|
|
2
|
+
"$schema": "https://schemas.platformatic.dev/@platformatic/composer/2.67.0.json",
|
|
3
3
|
"composer": {
|
|
4
4
|
"services": [
|
|
5
5
|
{
|
|
@@ -7,6 +7,11 @@
|
|
|
7
7
|
"openapi": {
|
|
8
8
|
"url": "/documentation/json",
|
|
9
9
|
"prefix": "/api"
|
|
10
|
+
},
|
|
11
|
+
"proxy": {
|
|
12
|
+
"ws": {
|
|
13
|
+
},
|
|
14
|
+
"prefix": "/api"
|
|
10
15
|
}
|
|
11
16
|
},
|
|
12
17
|
{
|